Browse Source

Merge branch 'dev' of http://git.echepei.com/zhujiawei/Warehouse_management_ui into dev

QuKatie 3 năm trước cách đây
mục cha
commit
89f869ab60

+ 96 - 28
src/views/Warehousing/cargoClearance/AddOrUpdate.vue

@@ -1185,7 +1185,7 @@
                 filterable
                 clearable
                 placeholder="客户名称"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
               >
                 <el-option
                   v-for="(item, index) in fMblnoOptions"
@@ -1209,7 +1209,7 @@
                 clearable
                 filterable
                 placeholder="费用名称"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
               >
                 <el-option
                   v-for="(item, index) in fDNameOptions"
@@ -1255,7 +1255,7 @@
                 v-model="scope.row.fFeeUnitid"
                 placeholder="请选择计价单位"
                 clearable
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 @change="changeFeeUnit(scope.row)"
               >
                 <el-option
@@ -1279,7 +1279,7 @@
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 v-model="scope.row.fQty"
                 placeholder="数量"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 @change="changeContractAmt(scope.row)"
                 show-word-limit
               />
@@ -1297,7 +1297,7 @@
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 v-model="scope.row.fUnitprice"
                 placeholder="单价"
-                :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
+                :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus === 6"
                 @change="changeContractAmt(scope.row)"
                 show-word-limit
               />
@@ -1331,7 +1331,7 @@
               <el-select
                 v-model="scope.row.fStltypeid"
                 placeholder="请选择结算表票结、月结"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
               >
                 <el-option
                   v-for="(item, index) in fStltypeOptions"
@@ -1352,7 +1352,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fCurrency"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="币别"
                 show-word-limit
               />
@@ -1368,7 +1368,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fExrate"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="汇率"
                 show-word-limit
               />
@@ -1384,7 +1384,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fTaxrate"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="税率"
                 show-word-limit
               />
@@ -1400,7 +1400,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fMblno"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="提单号"
                 show-word-limit
               />
@@ -1416,7 +1416,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fProductName"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="品名"
                 show-word-limit
               />
@@ -1432,7 +1432,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fMarks"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="品牌"
                 show-word-limit
               />
@@ -1462,7 +1462,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.Remarks"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="备注"
                 show-word-limit
               />
@@ -1479,9 +1479,19 @@
               <el-button
                 @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
                 size="small"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 >移除</el-button
               >
+              <el-button
+                size="small"
+                @click="listCheck(scope.row)"
+                v-if="scope.row.fBillstatus < 6"
+              >请核</el-button>
+              <el-button
+                size="small"
+                @click="revokeListCheck(scope.row)"
+                v-if="scope.row.fBillstatus == 6"
+              >撤销请核</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -1564,7 +1574,7 @@
                 filterable
                 clearable
                 placeholder="客户名称"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
               >
                 <el-option
                   v-for="(item, index) in fMblnoOptions"
@@ -1588,7 +1598,7 @@
                 clearable
                 filterable
                 placeholder="费用名称"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
               >
                 <el-option
                   v-for="(item, index) in fCNameOptions"
@@ -1635,7 +1645,7 @@
                 v-model="scope.row.fFeeUnitid"
                 placeholder="请选择计价单位"
                 clearable
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 @change="changeFeeUnit(scope.row)"
               >
                 <el-option
@@ -1658,7 +1668,7 @@
               <el-input
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
                 v-model="scope.row.fQty"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 @change="changeContractAmt(scope.row)"
                 placeholder="数量"
                 show-word-limit
@@ -1676,7 +1686,7 @@
               <el-input
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 v-model="scope.row.fUnitprice"
-                :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
+                :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus === 6"
                 @change="changeContractAmt(scope.row)"
                 placeholder="单价"
                 show-word-limit
@@ -1711,7 +1721,7 @@
               <el-select
                 v-model="scope.row.fStltypeid"
                 placeholder="请选择结算表票结、月结"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
               >
                 <el-option
                   v-for="(item, index) in fStltypeOptions"
@@ -1733,7 +1743,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fCurrency"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="币别"
                 show-word-limit
               />
@@ -1749,7 +1759,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fExrate"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="汇率"
                 show-word-limit
               />
@@ -1765,7 +1775,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fTaxrate"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="税率"
                 show-word-limit
               />
@@ -1782,7 +1792,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fMblno"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="提单号"
                 show-word-limit
               />
@@ -1798,7 +1808,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fProductName"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="品名"
                 show-word-limit
               />
@@ -1815,7 +1825,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fMarks"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="品牌"
                 show-word-limit
               />
@@ -1844,7 +1854,7 @@
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.remarks"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 placeholder="备注"
                 show-word-limit
               />
@@ -1862,9 +1872,19 @@
               <el-button
                 @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
                 size="small"
-                :disabled="browseStatus"
+                :disabled="browseStatus || scope.row.fBillstatus === 6"
                 >移除</el-button
               >
+              <el-button
+                size="small"
+                @click="listCheck(scope.row)"
+                v-if="scope.row.fBillstatus < 6"
+              >请核</el-button>
+              <el-button
+                size="small"
+                @click="revokeListCheck(scope.row)"
+                v-if="scope.row.fBillstatus == 6"
+              >撤销请核</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -2653,6 +2673,8 @@ import {
   submitWarehousingApproval,
   ordersRevoke,
   checkCode,
+  feesCheck,
+  revokefeeCheck
 } from "@/api/warehouseBusiness/stockTransfer";
 import { operationAgreement } from "@/api/agreement/agreement";
 import { listCorps } from "@/api/basicdata/corps";
@@ -4284,6 +4306,24 @@ export default {
             this.form.fMarks = "";
           }
           this.form.fBillstatus = 2;
+          for (let item in this.warehouseDrList) {
+            if (!this.warehouseDrList[item].fCorpid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+            } else if (!this.warehouseDrList[item].fFeeid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+            } else if (!this.warehouseDrList[item].fFeeUnitid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+            }
+          }
+          for (let item in this.warehouseCrList) {
+            if (!this.warehouseCrList[item].fCorpid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+            } else if (!this.warehouseCrList[item].fFeeid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+            } else if (!this.warehouseCrList[item].fFeeUnitid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+            }
+          }
           let formData = new window.FormData();
           formData.append("type", "2");
           formData.append("warehouseBills", JSON.stringify(this.form));
@@ -5076,6 +5116,34 @@ export default {
         query: { data: data},
       });
     },
+    // 费用明细请核
+    listCheck(row) {
+      feesCheck(row.fId).then(res => {
+        this.$message.success('请核成功')
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
+        if (res.data.fDc == 'D') {
+          let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
+          this.warehouseDrList.splice(index, 1, res.data)
+        } else {
+          let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
+          this.warehouseCrList.splice(index, 1, res.data)
+        }
+      })
+    },
+    // 费用明细撤销请核
+    revokeListCheck(row) {
+      revokefeeCheck(row.fId).then(res => {
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
+        this.$message.success('操作成功')
+        if (res.data.fDc == 'D') {
+          let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
+          this.warehouseDrList.splice(index, 1, res.data)
+        } else {
+          let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
+          this.warehouseCrList.splice(index, 1, res.data)
+        }
+      })
+    },
   },
   watch: {
     // 监听 addOrUpdateVisible 改变

+ 2 - 0
src/views/Warehousing/components/incomeMoney.vue

@@ -905,6 +905,7 @@ export default {
     listCheck(row) {
       feesCheck(row.fId).then(res => {
         this.$message.success('请核成功')
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
           this.warehouseDrList.splice(index, 1, res.data)
@@ -917,6 +918,7 @@ export default {
     // 费用明细撤销请核
     revokeListCheck(row) {
       revokefeeCheck(row.fId).then(res => {
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         this.$message.success('操作成功')
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)

+ 2 - 0
src/views/Warehousing/components/payMoney.vue

@@ -734,6 +734,7 @@ export default {
     listCheck(row) {
       feesCheck(row.fId).then(res => {
         this.$message.success('请核成功')
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
           this.warehouseDrList.splice(index, 1, res.data)
@@ -747,6 +748,7 @@ export default {
     revokeListCheck(row) {
       revokefeeCheck(row.fId).then(res => {
         this.$message.success('操作成功')
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
           this.warehouseDrList.splice(index, 1, res.data)

+ 89 - 0
src/views/Warehousing/goodsTransfer/AddOrUpdate.vue

@@ -3333,6 +3333,24 @@ export default {
             this.form.fMarks = "";
           }
           this.form.fBillstatus = 2;
+          for (let item in this.warehouseDrList) {
+            if (!this.warehouseDrList[item].fCorpid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+            } else if (!this.warehouseDrList[item].fFeeid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+            } else if (!this.warehouseDrList[item].fFeeUnitid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+            }
+          }
+          for (let item in this.warehouseCrList) {
+            if (!this.warehouseCrList[item].fCorpid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+            } else if (!this.warehouseCrList[item].fFeeid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+            } else if (!this.warehouseCrList[item].fFeeUnitid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+            }
+          }
           let formData = new window.FormData();
           formData.append("type", "1");
           formData.append("warehouseBills", JSON.stringify(this.form));
@@ -3415,6 +3433,75 @@ export default {
                 });
                 this.detailList = response.data.warehousebillsitems;
                 this.msgSuccess("保存成功");
+                getGoodsTransfer(this.form.fId).then((response) => {
+                  this.form = response.data.warehousebills;
+                  if (this.form.fBillstatus > 3) {
+                    this.approvalStatus = false;
+                    this.browseStatus = true;
+                  } else {
+                    this.approvalStatus = true;
+                    this.browseStatus = false;
+                  }
+                  this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+                  this.$set(this.form, "fBstifime", Date.parse(this.form.fBstime));
+                  this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+                  this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
+                  this.$set(this.form, "fBusinessType", "1");
+                  if (this.form.fCartype || this.form.fCartype == 0) {
+                    this.$set(this.form, "fCartype", this.form.fCartype.toString());
+                  }
+                  if (this.form.fStltypeid || this.form.fStltypeid == 0) {
+                    this.$set(this.form, "fStltypeid", this.form.fStltypeid.toString());
+                  }
+                  if (this.form.fTrademodeid) {
+                    this.$set(
+                      this.form,
+                      "fTrademodeid",
+                      this.form.fTrademodeid.toString()
+                    );
+                  }
+                  treeselect(this.form.fWarehouseid).then((response) => {
+                    this.fWarehouseidOptions = response.data;
+                  });
+                  if (!this.copyStatus) {
+                    if (response.data.warehouseBillsItem) {
+                      response.data.warehouseBillsItem.map((e) => {
+                        e.fBsdate = Date.parse(e.fBsdate);
+                        e.fBusinessType = e.fBusinessType.toString();
+                        e.fLntype = e.fLntype ? e.fLntype.toString() : null;
+                      });
+                      this.detailList = response.data.warehouseBillsItem;
+                    } else {
+                      this.detailList = [];
+                    }
+                    response.data.warehousebillsfeesCr.map((e) => {
+                      if (e.fFeeunitid) {
+                        e.fFeeUnitid = e.fFeeunitid.toString();
+                      }
+                      if (e.fStltypeid || e.fStltypeid == 0) {
+                        e.fStltypeid = e.fStltypeid.toString();
+                      }
+                    });
+                    this.warehouseCrList = response.data.warehousebillsfeesCr;
+                    response.data.warehousebillsfeesDr.map((e) => {
+                      if (e.fFeeunitid) {
+                        e.fFeeUnitid = e.fFeeunitid.toString();
+                      }
+                      if (e.fStltypeid || e.fStltypeid == 0) {
+                        e.fStltypeid = e.fStltypeid.toString();
+                      }
+                    });
+                    this.warehouseDrList = response.data.warehousebillsfeesDr;
+                    if (response.data.tCntrList) {
+                      this.CntrTable = response.data.tCntrList;
+                    } else {
+                      this.CntrTable = [];
+                    }
+                    if (response.data.enclosures) {
+                      this.relevantAttachments = response.data.enclosures;
+                    }
+                  }
+                });
                 if (status == "goBack") {
                   this.cancel();
                 }
@@ -3948,6 +4035,7 @@ export default {
     // 费用明细请核
     listCheck(row) {
       feesCheck(row.fId).then(res => {
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         this.$message.success('请核成功')
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
@@ -3961,6 +4049,7 @@ export default {
     // 费用明细撤销请核
     revokeListCheck(row) {
       revokefeeCheck(row.fId).then(res => {
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         this.$message.success('操作成功')
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)

+ 18 - 0
src/views/Warehousing/inAndOutStock/AddOrUpdate.vue

@@ -6436,6 +6436,24 @@ export default {
                   return false
                 }
               }
+              for (let item in this.warehouseDrList) {
+                if (!this.warehouseDrList[item].fCorpid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+                } else if (!this.warehouseDrList[item].fFeeid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+                } else if (!this.warehouseDrList[item].fFeeUnitid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+                }
+              }
+              for (let item in this.warehouseCrList) {
+                if (!this.warehouseCrList[item].fCorpid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+                } else if (!this.warehouseCrList[item].fFeeid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+                } else if (!this.warehouseCrList[item].fFeeUnitid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+                }
+              }
               formData.append("warehouseBills", JSON.stringify(this.form));
               // 库存明细
               const stockDc = this.detailList1.concat(this.detailList)

+ 18 - 0
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -7894,6 +7894,24 @@ export default {
               } else {
                 this.form.fMarks = "";
               }
+              for (let item in this.warehouseDrList) {
+                if (!this.warehouseDrList[item].fCorpid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+                } else if (!this.warehouseDrList[item].fFeeid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+                } else if (!this.warehouseDrList[item].fFeeUnitid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+                }
+              }
+              for (let item in this.warehouseCrList) {
+                if (!this.warehouseCrList[item].fCorpid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+                } else if (!this.warehouseCrList[item].fFeeid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+                } else if (!this.warehouseCrList[item].fFeeUnitid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+                }
+              }
               this.$set(this.form, 'fFeetunit', this.form.fFeetUnit)
               formData.append("tWarehouseBills", JSON.stringify(this.form));
               // 库存明细

+ 29 - 8
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -952,10 +952,11 @@
                   </span>
                 </span>
                 <span v-else-if="item.label == 'fBsdate'">
+<!--                  scope.row.fBillstatus >= 20"-->
                   <el-date-picker
                       v-model="scope.row.fBsdate"
                       style="width: 138px"
-                      :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
                       type="date"
                       value-format="timestamp"
                       placeholder="业务日期"
@@ -1028,14 +1029,14 @@
                 <span v-else-if="item.label == 'fPackagespecs'">
                   <el-input
                       v-model="scope.row.fPackagespecs"
-                      :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
                       placeholder="包装规格"
                   />
                 </span>
                 <span v-else-if="item.label == 'fCntrtype'">
                   <el-input
                       v-model="scope.row.fCntrtype"
-                      :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
                       placeholder="箱型"
                   />
                 </span>
@@ -1044,14 +1045,14 @@
                       oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                       v-model="scope.row.fCntqty"
                       placeholder="箱量"
-                      :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
                   />
                 </span>
                 <span v-else-if="item.label == 'fGoodsval'">
                   <el-input
                       v-model="scope.row.fGoodsval"
                       placeholder="货值"
-                      :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
                   />
                 </span>
                 <span v-else-if="item.label == 'fTruckno'">
@@ -1065,21 +1066,21 @@
                   <el-input
                       v-model="scope.row.fDriverName"
                       placeholder="司机名"
-                      :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
                   />
                 </span>
                 <span v-else-if="item.label == 'fDriverTel'">
                   <el-input
                       v-model="scope.row.fDriverTel"
                       placeholder="司机电话"
-                      :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
                   />
                 </span>
                 <span v-else-if="item.label == 'fDriverIdCar'">
                   <el-input
                       v-model="scope.row.fDriverIdCar"
                       placeholder="司机身份证"
-                      :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
                   />
                 </span>
                 <span v-else-if="item.label == 'fIsPass'">
@@ -5976,6 +5977,24 @@ export default {
                   }
                 }
               }
+              for (let item in this.warehouseDrList) {
+                if (!this.warehouseDrList[item].fCorpid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+                } else if (!this.warehouseDrList[item].fFeeid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+                } else if (!this.warehouseDrList[item].fFeeUnitid) {
+                  return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+                }
+              }
+              for (let item in this.warehouseCrList) {
+                if (!this.warehouseCrList[item].fCorpid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+                } else if (!this.warehouseCrList[item].fFeeid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+                } else if (!this.warehouseCrList[item].fFeeUnitid) {
+                  return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+                }
+              }
               formData.append("warehouseBills", JSON.stringify(this.form));
               this.detailList.forEach(item => {
                 if (item.srcId !== null) {
@@ -7262,6 +7281,7 @@ export default {
     listCheck(row) {
       feesCheck(row.fId).then(res => {
         this.$message.success('请核成功')
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
           this.warehouseDrList.splice(index, 1, res.data)
@@ -7274,6 +7294,7 @@ export default {
     // 费用明细撤销请核
     revokeListCheck(row) {
       revokefeeCheck(row.fId).then(res => {
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         this.$message.success('操作成功')
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)

+ 90 - 0
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -4815,6 +4815,24 @@ export default {
             this.form.fMarks = "";
           }
           this.form.fBillstatus = 2;
+          for (let item in this.warehouseDrList) {
+            if (!this.warehouseDrList[item].fCorpid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+            } else if (!this.warehouseDrList[item].fFeeid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+            } else if (!this.warehouseDrList[item].fFeeUnitid) {
+              return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+            }
+          }
+          for (let item in this.warehouseCrList) {
+            if (!this.warehouseCrList[item].fCorpid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
+            } else if (!this.warehouseCrList[item].fFeeid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
+            } else if (!this.warehouseCrList[item].fFeeUnitid) {
+              return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
+            }
+          }
           let formData = new window.FormData();
           formData.append("type", "1");
           formData.append("warehouseBills", JSON.stringify(this.form));
@@ -4897,6 +4915,76 @@ export default {
                 });
                 this.detailList = response.data.warehousebillsitems;
                 this.msgSuccess("保存成功");
+                getStockTransfer(this.form.fId).then((response) => {
+                  this.form = response.data.warehousebills;
+                  if (this.form.fBillstatus > 3) {
+                    this.approvalStatus = false;
+                    this.browseStatus = true;
+                  } else {
+                    this.approvalStatus = true;
+                    this.browseStatus = false;
+                  }
+                  this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+                  this.$set(this.form, "fBstifime", Date.parse(this.form.fBstime));
+                  this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+                  this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
+                  this.tfNetweightnum = (this.form.fPlannetweight / 1000).toFixed(4);
+                  this.tfGrossweightnum = (this.form.fPlangrossweight / 1000).toFixed(4);
+                  if (this.form.fCartype || this.form.fCartype == 0) {
+                    this.$set(this.form, "fCartype", this.form.fCartype.toString());
+                  }
+                  if (this.form.fStltypeid || this.form.fStltypeid == 0) {
+                    this.$set(this.form, "fStltypeid", this.form.fStltypeid.toString());
+                  }
+                  if (this.form.fTrademodeid) {
+                    this.$set(
+                      this.form,
+                      "fTrademodeid",
+                      this.form.fTrademodeid.toString()
+                    );
+                  }
+                  treeselect(this.form.fWarehouseid).then((response) => {
+                    this.fWarehouseidOptions = response.data;
+                  });
+                  if (!this.copyStatus) {
+                    if (response.data.warehouseBillsItem) {
+                      response.data.warehouseBillsItem.map((e) => {
+                        e.fBsdate = Date.parse(e.fBsdate);
+                        e.fBusinessType = e.fBusinessType.toString();
+                        e.fLntype = e.fLntype ? e.fLntype.toString() : null;
+                      });
+                      this.detailList = response.data.warehouseBillsItem;
+                    } else {
+                      this.detailList = [];
+                    }
+                    response.data.warehousebillsfeesCr.map((e) => {
+                      if (e.fFeeunitid) {
+                        e.fFeeUnitid = e.fFeeunitid.toString();
+                      }
+                      if (e.fStltypeid || e.fStltypeid == 0) {
+                        e.fStltypeid = e.fStltypeid.toString();
+                      }
+                    });
+                    this.warehouseCrList = response.data.warehousebillsfeesCr;
+                    response.data.warehousebillsfeesDr.map((e) => {
+                      if (e.fFeeunitid) {
+                        e.fFeeUnitid = e.fFeeunitid.toString();
+                      }
+                      if (e.fStltypeid || e.fStltypeid == 0) {
+                        e.fStltypeid = e.fStltypeid.toString();
+                      }
+                    });
+                    this.warehouseDrList = response.data.warehousebillsfeesDr;
+                    if (response.data.tCntrList) {
+                      this.CntrTable = response.data.tCntrList;
+                    } else {
+                      this.CntrTable = [];
+                    }
+                    if (response.data.enclosures) {
+                      this.relevantAttachments = response.data.enclosures;
+                    }
+                  }
+                });
                 if (status == "goBack") {
                   this.cancel();
                 }
@@ -5648,6 +5736,7 @@ export default {
     listCheck(row) {
       feesCheck(row.fId).then(res => {
         this.$message.success('请核成功')
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
           this.warehouseDrList.splice(index, 1, res.data)
@@ -5661,6 +5750,7 @@ export default {
     // 费用明细撤销请核
     revokeListCheck(row) {
       revokefeeCheck(row.fId).then(res => {
+        res.data.fFeeUnitid = res.data.fFeeunitid.toString();
         this.$message.success('操作成功')
         if (res.data.fDc == 'D') {
           let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)

+ 22 - 18
src/views/finance/contrast/index.vue

@@ -332,7 +332,8 @@
                 v-if="
                   scope.row.fBillstatus == '保存' ||
                   scope.row.fBillstatus == '暂存' ||
-                  scope.row.fBillstatus == '审批驳回'
+                  scope.row.fBillstatus == '审批驳回' ||
+                  scope.row.fBillstatus == '新建'
                 "
               >
                 修改</el-button
@@ -347,7 +348,8 @@
                 v-if="
                   scope.row.fBillstatus == '保存' ||
                   scope.row.fBillstatus == '暂存' ||
-                  scope.row.fBillstatus == '审批驳回'
+                  scope.row.fBillstatus == '审批驳回' ||
+                  scope.row.fBillstatus == '新建'
                 "
                 >删除</el-button
               >
@@ -491,7 +493,8 @@
                 v-if="
                   scope.row.fBillstatus == '保存' ||
                   scope.row.fBillstatus == '暂存' ||
-                  scope.row.fBillstatus == '审批驳回'
+                  scope.row.fBillstatus == '审批驳回' ||
+                  scope.row.fBillstatus == '新建'
                 "
               >
                 修改</el-button
@@ -506,7 +509,8 @@
                 v-if="
                   scope.row.fBillstatus == '保存' ||
                   scope.row.fBillstatus == '暂存' ||
-                  scope.row.fBillstatus == '审批驳回'
+                  scope.row.fBillstatus == '审批驳回' ||
+                  scope.row.fBillstatus == '新建'
                 "
                 >删除</el-button
               >
@@ -4212,13 +4216,13 @@ export default {
                   if (e.fChargedate) {
                     e.fChargedate = e.fChargedate.slice(0, 10);
                   }
-                  if (e.fSrcdc) {
-                    if (e.fSrcdc == "D") {
-                      e.fSrcdc = "收";
-                    } else {
-                      e.fSrcdc = "付";
-                    }
-                  }
+                  // if (e.fSrcdc) {
+                  //   if (e.fSrcdc == "D") {
+                  //     e.fSrcdc = "收";
+                  //   } else {
+                  //     e.fSrcdc = "付";
+                  //   }
+                  // }
                 });
               }
               this.DzfeeList = response.data.feeDoList;
@@ -4331,13 +4335,13 @@ export default {
                   if (e.fChargedate) {
                     e.fChargedate = e.fChargedate.slice(0, 10);
                   }
-                  if (e.fSrcdc) {
-                    if (e.fSrcdc == "D") {
-                      e.fSrcdc = "收";
-                    } else {
-                      e.fSrcdc = "付";
-                    }
-                  }
+                  // if (e.fSrcdc) {
+                  //   if (e.fSrcdc == "D") {
+                  //     e.fSrcdc = "收";
+                  //   } else {
+                  //     e.fSrcdc = "付";
+                  //   }
+                  // }
                 });
               }
               this.DzfeeList = response.data.feeDoList;

+ 25 - 0
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -406,6 +406,7 @@
                   style="width:80%"
                   :remote-method="corpsRemoteMethod"
                   placeholder="请输入模糊查找客户名称"
+                  @change="changeFeeDate"
               >
                 <el-option
                     v-for="(dict, index) in fMblnoOptions"
@@ -427,6 +428,7 @@
                   clearable
                   :remote-method="goodsRemoteMethod"
                   placeholder="请输入模糊查找货品名称"
+                  @change="changeFeeDate"
               >
                 <el-option
                     v-for="(dict, index) in goodsOptions"
@@ -460,6 +462,7 @@
                   :disabled="browseStatus"
                   value-format="timestamp"
                   placeholder="仓储费计算截止日期"
+                  @change="changeFeeDate"
               >
               </el-date-picker>
             </el-form-item>
@@ -527,6 +530,7 @@
                          placeholder="请选择仓库库区"
                          clearable
                          filterable
+                         @change="changeFeeDate"
               >
                 <el-option
                   v-for="(item, index) in warehouseOptions"
@@ -1774,6 +1778,27 @@ export default {
       this.reset();
       this.getList();
     },
+    changeFeeDate() {
+      if (!this.form.fCorpid || !this.form.fBillingDeadline) return
+      this.dataList = []
+      this.getStorageFee()
+      // if (this.dataList.length !== 0) {
+      //   this.$confirm(`仓储费已经存在,确定要删除重新计算吗?`, '提示', {
+      //     confirmButtonText: '确定',
+      //     cancelButtonText: '取消',
+      //     type: 'warning'
+      //   }).then(() => {
+      //     this.dataList = []
+      //     this.getStorageFee()
+      //   }).catch(() => {
+      //     return false
+      //   })
+      // } else {
+      //   this.dataList = []
+      //   this.getStorageFee()
+      // }
+
+    },
     // 计算仓储费
     calculateCost() {
       this.countstate = true