Преглед изворни кода

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

caojunjie пре 4 година
родитељ
комит
61295aad24

+ 1 - 1
src/components/Uploadfile/index.vue

@@ -44,7 +44,7 @@ export default {
     handleUploadSuccess(res) {
       console.log(res)
       this.$emit("input", res);
-      // this.$emit("fileName", res.fileName);
+      this.$emit("fileName", res.fileName);
       
       this.File = res.url;
       console.log(res.url)

+ 58 - 166
src/views/warehouseBusiness/inStock/index.vue

@@ -267,6 +267,7 @@
         :formatter="fTrademodeidFormat"
       /> -->
       <el-table-column label="仓库" align="center" prop="fWarehouseid" />
+      <el-table-column label="计划件数" align="center" prop="fPlannetweight" />
       <el-table-column label="入库件数" align="center" prop="fQty" />
       <!--      <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
       <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
@@ -1012,94 +1013,6 @@
             />
           </template>
         </el-table-column>
-        <!-- <el-table-column
-          prop="fPlangrossweight"
-          header-align="center"
-          align="center"
-          width="150px"
-          label="计划毛重"
-        >
-          <template slot-scope="scope">
-            <el-input
-              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
-              v-model="scope.row.fPlangrossweight"
-              placeholder="计划毛重"
-              :disabled="
-                browseStatus ||
-                scope.row.fBillstatus === 20 ||
-                scope.row.fBillstatus === 30 ||
-                scope.row.fBillstatus === 40
-              "
-              show-word-limit
-            />
-          </template>
-        </el-table-column> -->
-        <!-- <el-table-column
-          prop="fPlannetweight"
-          header-align="center"
-          align="center"
-          width="150px"
-          label="计划净重"
-        >
-          <template slot-scope="scope">
-            <el-input
-              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
-              v-model="scope.row.fPlannetweight"
-              :disabled="
-                browseStatus ||
-                scope.row.fBillstatus === 20 ||
-                scope.row.fBillstatus === 30 ||
-                scope.row.fBillstatus === 40
-              "
-              placeholder="计划净重"
-              show-word-limit
-            />
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="fPlanvolumn"
-          header-align="center"
-          width="150px"
-          align="center"
-          label="计划尺码"
-        >
-          <template slot-scope="scope">
-            <el-input
-              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'
-              v-model="scope.row.fPlanvolumn"
-              placeholder="尺码"
-              :disabled="
-                browseStatus ||
-                scope.row.fBillstatus === 20 ||
-                scope.row.fBillstatus === 30 ||
-                scope.row.fBillstatus === 40
-              "
-              show-word-limit
-            />
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="fPlanqty"
-          header-align="center"
-          width="150px"
-          align="center"
-          label="计划件数"
-        >
-          <template slot-scope="scope">
-            <el-input
-              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
-              v-model="scope.row.fPlanqty"
-              placeholder="件数"
-              :disabled="
-                browseStatus ||
-                scope.row.fBillstatus === 20 ||
-                scope.row.fBillstatus === 30 ||
-                scope.row.fBillstatus === 40
-              "
-              show-word-limit
-            />
-          </template>
-        </el-table-column> -->
         <el-table-column
           prop="fGrossweight"
           header-align="center"
@@ -1375,8 +1288,8 @@
           <template slot-scope="scope">
             <span v-if="scope.row.fBillstatus === 40">已入账</span>
             <span v-if="scope.row.fBillstatus === 20">待入库</span>
-            <span v-if="scope.row.fBillstatus === 30">卸货</span>
-            <span v-if="scope.row.fBillstatus === 10">未入账</span>
+            <span v-if="scope.row.fBillstatus === 30">卸货</span>
+            <span v-if="scope.row.fBillstatus === 10">计划</span>
             <!-- <span v-if="scope.row.fBillstatus === '30'">待入库</span> -->
 
             <!-- <span v-else>未入账</span> -->
@@ -2052,12 +1965,12 @@
         @close="closeDialog"
         width="70%"
       >
-       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+       <el-form ref="planningList" :model="form" :rules="rules" label-width="120px">
         <el-row>
           <el-col :span="8">
             <el-form-item label="计划件数" prop="fPlanqty">
              <el-input
-                v-model="form.fPlanqty"
+                v-model="planningList.fPlanqty"
                 style="width: 80%"
                 laceholder="计划件数"
                 @input="changeList(form)"
@@ -2067,7 +1980,7 @@
           <el-col :span="8">
             <el-form-item label="计划净重" prop="fPlannetweight">
              <el-input
-                v-model="form.fPlannetweight"
+                v-model="planningList.fPlannetweight"
                 style="width: 80%"
                 disabled
                 laceholder="计划毛重"
@@ -2077,7 +1990,7 @@
           <el-col :span="8">
             <el-form-item label="计划毛重" prop="fPlangrossweight">
              <el-input
-                v-model="form.fPlangrossweight"
+                v-model="planningList.fPlangrossweight"
                 style="width: 80%"
                 disabled
                 laceholder="计划毛重"
@@ -2773,6 +2686,11 @@ export default {
         fCorpid: null,
         fLineno: null,
       },
+      planningList: {
+        fPlanqty: null,
+        fPlannetweight: null,
+        fPlangrossweight: null
+      },
       // 表单参数
       form: {
         fItemsStatus: null,
@@ -2835,9 +2753,12 @@ export default {
     this.getDicts("data_stltype_type").then((response) => {
       this.fStltypeOptions = response.data;
     });
+    this.getDicts("tax_rate").then((response) => {
+      this.fTaxrate = response.data[0].dictValue
+      console.log(this.fTaxrate)
+    });
     this.getDicts("data_ifweigh_status").then((response) => {
       this.fIfweighOptions = response.data;
-      console.log(this.fIfweighOptions);
     });
     this.getDicts("data_ifpledge_status").then((response) => {
       this.fIfpledgeOptions = response.data;
@@ -2856,11 +2777,12 @@ export default {
   methods: {
     // 上传成功返回数据
     showFile(row) {
-      // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
-      this.$set(this.relevantAttachments[0], "fUrl", row.url);
+      for(let list in this.relevantAttachments) {
+        this.$set(this.relevantAttachments[list], "fUrl", row.url);
+        this.$set(this.relevantAttachments[list], "fName", row.fileName);
+      }
     },
     printSomething() {
-      console.log("111111");
       // 此处的style即为打印时的样式
       const style =
         "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
@@ -2959,15 +2881,13 @@ export default {
         });
         return false;
       }
+      this.planningList.fPlanqty =  Number(this.form.fPlanqty) - Number(this.fQty),
+      this.planningList.fPlannetweight = Number(this.form.fPlannetweight) - Number(this.fNetweight),
+      this.planningList.fPlangrossweight = Number(this.form.fPlangrossweight) - Number(this.fGrossweight),
       this.fPlaNnumber = this.form.fPlannetweight/this.form.fPlanqty;
       this.fPlangNumber = this.form.fPlangrossweight/this.form.fPlanqty;
       this.weightList = true;
       let time = null;
-      // console.log(this.dataList)
-      // console.log(this.dataList[0].fBillstatus)
-      
-     
-      // console.log(this.dataList[0].fBillstatus);
     },
 
     // 收货单打印界面
@@ -3130,6 +3050,7 @@ export default {
     getList() {
       this.loading = true;
       listWarehousebills(this.queryParams).then((response) => {
+        console.log(response)
         this.warehousebillsList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -3154,9 +3075,17 @@ export default {
     },
     // 导入计划重量
     costList() {
-      // if (this.form.fBsdate) {
-      //   time = this.form.fBsdate;
-      // }
+      console.log(this.planningList.fPlanqty)
+      console.log(this.form.fPlanqty)
+      if( Number(this.planningList.fPlanqty) > Number(this.form.fPlanqty)) {
+        console.log(this.planningList.fPlanqty)
+      console.log(this.form.fPlanqty)
+        this.$message({
+          message: "计划费件数不能大于主表计划费件数!",
+          type: "warning",
+        });
+        return false;
+      }
        this.dataList.push({
         fBsdate: this.form.fBsdate,
         fGoodsid: null,
@@ -3164,11 +3093,11 @@ export default {
         fCntqty: 1,
         // fPlangrossweight: 0,
         // fPlannetweight: 0,
-        fNetweight: this.form.fPlannetweight,
+        fNetweight: this.planningList.fPlannetweight,
         fPlanvolumn: 0,
         // fPlanqty: 0,
-        fGrossweight: this.form.fPlangrossweight,
-        fQty: this.form.fPlanqty,
+        fGrossweight: this.planningList.fPlangrossweight,
+        fQty: this.planningList.fPlanqty,
         fPackagespecs: null,
         fWarehouselocid: null,
         fBoxno: null,
@@ -3203,6 +3132,8 @@ export default {
             fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
             fCurrency: "RMB",
             fExrate: "1",
+            fTaxrate: this.fTaxrate
+
           });
           console.log(JSON.stringify(this.warehouseDrList));
         }
@@ -3228,6 +3159,7 @@ export default {
             fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
             fCurrency: "RMB",
             fExrate: "1",
+            fTaxrate: this.fTaxrate
           });
         }
         this.warehousingagreements = false;
@@ -3361,12 +3293,12 @@ export default {
         for (let se in selection) {
           if (
             !selection[se].fBillstatus ||
-            selection[se].fBillstatus !== "40"
+            selection[se].fBillstatus !== 40
           ) {
             this.dataListSelection.push(selection[se]);
           } else if (
             selection[se].fBillstatus &&
-            selection[se].fBillstatus === "40"
+            selection[se].fBillstatus === 40
           ) {
             this.dataWithdrawList.push(selection[se]);
           }
@@ -3509,18 +3441,9 @@ export default {
           sums[index] = "";
           return;
         }
-        // if (column.property === "fPlangrossweight") {
-        //   values = data.map((item) => Number(item["fPlangrossweight"]));
-        // }
-        // if (column.property === "fPlannetweight") {
-        //   values = data.map((item) => Number(item["fPlannetweight"]));
-        // }
         if (column.property === "fPlanvolumn") {
           values = data.map((item) => Number(item["fPlanvolumn"]));
         }
-        // if (column.property === "fPlanqty") {
-        //   values = data.map((item) => Number(item["fPlanqty"]));
-        // }
         if (column.property === "fGrossweight") {
           values = data.map((item) => Number(item["fGrossweight"]));
         }
@@ -3532,12 +3455,9 @@ export default {
         }
         if (column.property === "fCntqty") {
           values = data.map((item) => Number(item["fCntqty"]));
-        } // const values = data.map(item => Number(item[column.property]))
+        } 
         if (
-          // column.property === "fPlangrossweight" ||
-          // column.property === "fPlannetweight" ||
           column.property === "fPlanvolumn" ||
-          // column.property === "fPlanqty" ||
           column.property === "fGrossweight" ||
           column.property === "fNetweight" ||
           column.property === "fQty" ||
@@ -3546,18 +3466,9 @@ export default {
           sums[index] = values.reduce((prev, curr) => {
             const value = Number(curr);
             if (!isNaN(value)) {
-              // if (column.property === "fPlangrossweight") {
-              //   this.fPlangrossweight = prev + curr;
-              // }
-              // if (column.property === "fPlannetweight") {
-              //   this.fPlannetweight = prev + curr;
-              // }
               if (column.property === "fPlanvolumn") {
                 this.fPlanvolumn = prev + curr;
               }
-              // if (column.property === "fPlanqty") {
-              //   this.fPlanqty = prev + curr;
-              // }
               if (column.property === "fGrossweight") {
                 this.fGrossweight = prev + curr;
               }
@@ -3574,7 +3485,7 @@ export default {
             } else {
               return prev;
             }
-          }, 0); // sums[index]
+          }, 0);
         }
       });
       this.sums = sums;
@@ -3603,7 +3514,7 @@ export default {
             } else {
               return prev;
             }
-          }, 0); // sums[index]
+          }, 0);
         }
       });
       return sums;
@@ -3612,8 +3523,9 @@ export default {
     changeList(row) {
       console.log(row)
       console.log(this.fPlaNnumber)
-     this.form.fPlannetweight = Number(this.form.fPlanqty)*Number(this.fPlaNnumber);
-     this.form.fPlangrossweight = Number(this.form.fPlanqty)*Number(this.fPlangNumber);
+      
+     this.planningList.fPlannetweight = Number(this.planningList.fPlanqty)*Number(this.fPlaNnumber);
+     this.planningList.fPlangrossweight = Number(this.planningList.fPlanqty)*Number(this.fPlangNumber);
     },
     // 数量计算
     changeContractAmt(row) {
@@ -3663,10 +3575,16 @@ export default {
       if (!row.fFeeUnitid) {
         return false;
       }
-      if (row.fFeeUnitid === "0") {
-        this.$set(row, "fQty", this.fCntqty);
-      } else if (row.fFeeUnitid === "1") {
+      if (row.fFeeUnitid === "2") {
         this.$set(row, "fQty", this.fGrossweight);
+      }else if(row.fFeeUnitid === "1") {
+        this.$set(row, "fQty", this.fQty);
+      }
+      else if(row.fFeeUnitid === "3") {
+        this.$set(row, "fQty", this.fNetweight);
+      }
+      else {
+        this.$set(row, "fQty", 0);
       }
       if (row.fUnitprice) {
         this.$set(
@@ -3843,15 +3761,6 @@ export default {
                   this.$set(this.dataList[i], "fBillstatus", 20);
                 }
               }
-              // }
-
-              // this.$set(
-              //   this.dataList[i],
-              //   "fSerialNumber",
-              //   response.data.warehousebillsitems[list].fSerialNumber
-              // );
-              // }
-              // }
             }
             this.$refs.tableList.clearSelection();
           });
@@ -3910,20 +3819,8 @@ export default {
     discharge() {
       if (this.Printinglist.length > 0) {
         for (let warehouseCr in this.Printinglist) {
-          console.log(this.Printinglist);
-          // if (this.Printinglist[warehouseCr].fBillstatus === '20') {
-          // this.$message.error("请先入库");
-          // return false;
-          // if (
-          //   this.Printinglist[warehouseCr].fDriverName !=
-          //   this.Printinglist[0].fDriverName
-          // ) {
-          //   this.$message.error("请选择相同司机名");
-          //   return false;
-          // }
         }
           this.$refs["form"].validate((valid) => {
-            
             if (valid) {
               let formData = new window.FormData();
               console.log(this.form);
@@ -3982,11 +3879,6 @@ export default {
               });
             }
           });
-
-          // }else {
-          //   this.$message.error("请先入库");
-
-          // }
         
       } else {
         this.$message.error("请选择需要卸货的明细!");

+ 78 - 15
src/views/warehouseBusiness/outStock/index.vue

@@ -1072,6 +1072,55 @@
           </template>
         </el-table-column>
 
+      <el-table-column
+          prop="fChargedate"
+          header-align="center"
+          align="center"
+          width="170px"
+          label="*仓储费计算日期"
+        >
+          <template slot-scope="scope">
+            <el-date-picker
+              v-model="scope.row.fChargedate"
+              style="width: 138px"
+              :disabled="
+                browseStatus ||
+                scope.row.fBillstatus === 20 ||
+                scope.row.fBillstatus === 30 ||
+                scope.row.fBillstatus === 40
+              "
+              type="date"
+              value-format="timestamp"
+              placeholder="仓储费计算日期"
+            >
+            </el-date-picker>
+          </template>
+        </el-table-column>
+
+        <el-table-column
+          prop="fOriginalbilldate"
+          header-align="center"
+          align="center"
+          width="170px"
+          label="*原始入库日期"
+        >
+          <template slot-scope="scope">
+            <el-date-picker
+              v-model="scope.row.fOriginalbilldate"
+              style="width: 138px"
+              :disabled="
+                browseStatus ||
+                scope.row.fBillstatus === 20 ||
+                scope.row.fBillstatus === 30 ||
+                scope.row.fBillstatus === 40
+              "
+              type="date"
+              value-format="timestamp"
+              placeholder="原始入库日期"
+            >
+            </el-date-picker>
+          </template>
+        </el-table-column>
         <el-table-column
           prop="fCntrno"
           header-align="center"
@@ -1241,10 +1290,10 @@
           <template slot-scope="scope">
             <!-- <span v-if="scope.row.fBillstatus === '6'">已出库</span>
             <span v-if="scope.row.fBillstatus !== '6'">未出库</span> -->
-            <span v-if="scope.row.fBillstatus === 40">已入</span>
+            <span v-if="scope.row.fBillstatus === 40">已入</span>
             <span v-if="scope.row.fBillstatus === 20">待入库</span>
-            <span v-if="scope.row.fBillstatus === 30">卸货</span>
-            <span v-if="scope.row.fBillstatus === 10">未入账</span>
+            <span v-if="scope.row.fBillstatus === 30">卸货</span>
+            <span v-if="scope.row.fBillstatus === 10">计划</span>
           </template>
         </el-table-column>
         <el-table-column
@@ -2638,6 +2687,8 @@ export default {
       loading: true,
       // 打印地址
       fAddr: "",
+      // 税率
+      fTaxrate: '',
       // 选中数组
       ids: [],
       userVal: {
@@ -2856,7 +2907,6 @@ export default {
   },
   created() {
     this.getList();
-
     this.getDicts("data_trademodes").then((response) => {
       this.fTrademodeidOptions = response.data;
     });
@@ -2868,6 +2918,11 @@ export default {
     this.getDicts("data_stltype_type").then((response) => {
       this.fStltypeOptions = response.data;
     });
+    this.getDicts("tax_rate").then((response) => {
+      this.fTaxrate = response.data[0].dictValue
+      console.log(response)
+      console.log(this.fTaxrate)
+    });
     this.getDicts("data_ifweigh_status").then((response) => {
       this.fIfweighOptions = response.data;
     });
@@ -2887,8 +2942,10 @@ export default {
   methods: {
     // 上传成功返回数据
     showFile(row) {
-      // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
-      this.$set(this.relevantAttachments[0], "fUrl", row.url);
+      for(let list in this.relevantAttachments) {
+        this.$set(this.relevantAttachments[list], "fUrl", row.url);
+        this.$set(this.relevantAttachments[list], "fName", row.fileName);
+      }
     },
     printSomething() {
       // 此处的style即为打印时的样式
@@ -3027,6 +3084,7 @@ export default {
             fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
             fCurrency: "RMB",
             fCxrate: "1",
+            fRate: this.fTaxrate
           });
         }
         this.warehousingagreement = false;
@@ -3052,6 +3110,7 @@ export default {
             fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
             fCurrency: "RMB",
             fCxrate: "1",
+            fRate: this.fTaxrate
           });
         }
         this.warehousingagreements = false;
@@ -3706,15 +3765,20 @@ export default {
     },
     // 变更计价单位
     changeFeeUnit(row) {
-      console.log(this.fCntqty);
       console.log(row);
       if (!row.fFeeUnitid) {
         return false;
       }
-      if (row.fFeeUnitid === "0") {
-        this.$set(row, "fQty", this.fCntqty);
-      } else if (row.fFeeUnitid === "1") {
+      if (row.fFeeUnitid === "2") {
         this.$set(row, "fQty", this.fGrossweight);
+      }else if(row.fFeeUnitid === "1") {
+        this.$set(row, "fQty", this.fQty);
+      }
+      else if(row.fFeeUnitid === "3") {
+        this.$set(row, "fQty", this.fNetweight);
+      }
+      else {
+        this.$set(row, "fQty", 0);
       }
       if (row.fUnitprice) {
         this.$set(
@@ -3850,7 +3914,7 @@ export default {
               for (let i in this.dataList) {
                 let fQty =
                   this.dataList[i].fQty === this.dataListSelection[li].fQty;
-              
+
                 let fGoodsid =
                   this.dataList[i].fGoodsid ===
                   this.dataListSelection[li].fGoodsid;
@@ -3944,7 +4008,7 @@ export default {
           // }
         }
           this.$refs["form"].validate((valid) => {
-            
+
             if (valid) {
               let formData = new window.FormData();
               console.log(this.form);
@@ -3969,7 +4033,6 @@ export default {
               for (let i in this.dataList) {
                 let fQty =
                   this.dataList[i].fQty === this.dataListSelection[li].fQty;
-              
                 let fGoodsid =
                   this.dataList[i].fGoodsid ===
                   this.dataListSelection[li].fGoodsid;
@@ -4032,11 +4095,11 @@ export default {
         return false;
       } else {
         for (let se in selection) {
-          if (!selection[se].fBillstatus || selection[se].fBillstatus !== "40") {
+          if (!selection[se].fBillstatus || selection[se].fBillstatus !== 40) {
             this.dataListSelection.push(selection[se]);
           } else if (
             selection[se].fBillstatus &&
-            selection[se].fBillstatus === "40"
+            selection[se].fBillstatus === 40
           ) {
             this.dataWithdrawList.push(selection[se]);
           }

+ 107 - 64
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -167,57 +167,51 @@
       <el-table-column type="index" label="行号" align="center"/>
       <el-table-column
         :show-overflow-tooltip="true"
-        label="货权方"
+        label="单据编号"
         align="center"
-        prop="fCorpid"
+        prop="fBillno"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno"/>
+      <el-table-column label="客户名称" align="center" prop="fCorpid"/>
       <el-table-column
-        label="唛头"
+        label="计费日期"
         align="center"
-        prop="fMarks"
-      />
-      <el-table-column
-        label="出库日期"
-        align="center"
-        prop="createTime"
+        prop="fBillingDeadline"
         width="180"
       >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
+          <span>{{ parseTime(scope.row.fBillingDeadline, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="仓库" align="center" prop="fWarehouseid"/>
-
-      <el-table-column label="出库件数" align="center" prop="fQty"/>
-      <!--      <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
-      <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
-      <el-table-column label="出库毛重" align="center" prop="fGrossweight"/>
-      <el-table-column label="净重" align="center" prop="fNetweight"/>
       <el-table-column
-        width="100"
-        label="入库状态"
+        label="备注"
         align="center"
-        prop="fItemsStatus">
+        prop="remark"
+      />
+      <el-table-column
+        label="单据状态"
+        align="center"
+        prop="fBillstatus"
+      >
         <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === '1'">未入账</span>
-          <span v-if="scope.row.fItemsStatus === '2'">部分入账</span>
-          <span v-if="scope.row.fItemsStatus === '6'">全部入账</span>
+          <span v-if="scope.row.fBillstatus === 1">新建</span>
+          <span v-if="scope.row.fBillstatus === 2">暂存</span>
+          <span v-if="scope.row.fBillstatus === 3">审核驳回</span>
+          <span v-if="scope.row.fBillstatus === 4">提交审核</span>
+          <span v-if="scope.row.fBillstatus === 5">审核中</span>
+          <span v-if="scope.row.fBillstatus === 6">审核通过</span>
         </template>
       </el-table-column>
       <el-table-column
-        width="100"
-        label="费用状态"
+        label="制单人"
         align="center"
-        prop="fBillstatus">
-        <template slot-scope="scope">
-          <span v-if="scope.row.fBillstatus === '1'">录入</span>
-          <span v-if="scope.row.fBillstatus === '2'">录入</span>
-          <span v-if="scope.row.fBillstatus === '3'">驳回</span>
-          <span v-if="scope.row.fBillstatus === '4'">请核</span>
-          <span v-if="scope.row.fBillstatus === '5'">审核中</span>
-          <span v-if="scope.row.fBillstatus === '6'">全部入账</span>
-        </template>
+        prop="createBy"
+      />
+      <el-table-column
+        label="制单日期"
+        align="center"
+        prop="createTime"
+        width="180"
+      >
       </el-table-column>
       <el-table-column
         label="操作"
@@ -230,7 +224,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            v-if="scope.row.fBillstatus === '6'"
+            v-if="scope.row.fBillstatus > 3"
             @click="handleUpdate(scope.row, true)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
           >查看
@@ -239,6 +233,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
+            v-if="scope.row.fBillstatus <= 3"
             @click="handleUpdate(scope.row, false)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
           >修改
@@ -247,6 +242,7 @@
             size="mini"
             type="text"
             icon="el-icon-delete"
+            v-if="scope.row.fBillstatus <= 3"
             @click="handleDelete(scope.row)"
             v-hasPermi="['warehouseBusiness:warehousebills:remove']"
           >删除
@@ -335,6 +331,16 @@
         </el-row>
         <el-row>
           <el-col :span="5">
+            <el-form-item label="业务编号" prop="fBillno">
+              <el-input
+                disabled
+                v-model="form.fBillno"
+                style="width: 80%"
+                placeholder="业务编号"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="5">
             <el-form-item label="制单人" prop="createBy">
               <el-input
                 disabled
@@ -357,11 +363,21 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
+          <el-col :span="5">
+            <el-form-item disabled label="备注" prop="remark">
+              <el-input
+                :disabled="browseStatus"
+                v-model="form.remark"
+                placeholder="制单人"
+              />
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
       <div style="font-size:18px">
         计费物资明细
-        <el-button @click="calculateCost">计算仓储费</el-button>
+        <el-button :disabled="browseStatus" @click="calculateCost">计算仓储费</el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
       </div>
       <div class="dialogTableTitle flex a-center jlr"
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
@@ -433,6 +449,13 @@
             </template>
           </el-table-column>
           <el-table-column
+            prop="fMarks"
+            header-align="center"
+            align="center"
+            width="140px"
+            label="唛头"
+          />
+          <el-table-column
             prop="fBsdate"
             header-align="center"
             align="center"
@@ -554,6 +577,12 @@
           </el-table-column>
         </el-table>
       </div>
+      <div>
+        <el-button :disabled="browseStatus" @click.prevent="addCollection()"
+        >新行
+        </el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
+      </div>
       <div style="font-size:18px">应收款明细</div>
       <div class="dialogTableTitle flex a-center jlr"
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
@@ -660,7 +689,7 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="funitprice"
+            prop="fUnitprice"
             header-align="center"
             align="center"
             width="150px"
@@ -670,7 +699,7 @@
               <el-input
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 v-model="scope.row.fUnitprice"
-                @change="changeContractAmt(scope.row)"
+                @change="changeEstmateAmt(scope.row)"
                 :disabled="browseStatus"
                 placeholder="单价"
                 show-word-limit
@@ -743,7 +772,7 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="remarks"
+            prop="remark"
             header-align="center"
             align="center"
             width="150px"
@@ -751,7 +780,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                v-model="scope.row.remarks"
+                v-model="scope.row.remark"
                 :disabled="browseStatus"
                 placeholder="备注"
                 show-word-limit
@@ -780,15 +809,12 @@
         <el-button type="success" prop="取 消" @click="cancel"
         >取 消
         </el-button>
-        <el-button type="warning" prop="保 存" @click="submitForm(2)"
-        >保 存
-        </el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
         <el-button
           :disabled="browseStatus"
           style="background-color: #008000; color: #fff"
           @click="submitForm(6)"
-        >请 核</el-button
-        >
+        >请 核</el-button>
       </div>
     </el-dialog>
   </div>
@@ -808,6 +834,7 @@
   import { listGoods } from "@/api/basicdata/goods";
   import { listFees } from "@/api/basicdata/fees";
   import { listCorps } from "@/api/basicdata/corps";
+  import moment from 'moment'
 
   export default {
     name: "StorageFeeCalculation",
@@ -853,7 +880,7 @@
           fId: 'SJCK',
           fName: '出库'
         }, {
-          fId: 'CKZZ',
+          fId: 'KCZZ',
           fName: '库存总账'
         }],
         // 货权方(客户数据)
@@ -879,6 +906,7 @@
           dictLabel: '固定',
           dictValue: 5
         }],
+        fTaxrate: 0,
         // 费用名称
         fWbuOptions: [],
         // 查询参数
@@ -939,6 +967,9 @@
     },
     created() {
       this.getList();
+      this.getDicts("tax_rate").then((response) => {
+        this.fTaxrate = response.data[0].dictValue
+      });
     },
     methods: {
       queryUser() {
@@ -963,6 +994,7 @@
         this.loading = true;
         listStorageFeeCalculation(this.queryParams).then((response) => {
           this.warehousebillsList = response.rows;
+          this.$set(this.form, 'createTime', moment(Date.parse(this.warehousebillsList.createTime)).format("YYYY-MM-DD HH:mm:ss"))
           this.total = response.total;
           this.loading = false;
         });
@@ -971,6 +1003,7 @@
       cancel() {
         this.open = false;
         this.reset();
+        this.getList();
       },
       // 计算仓储费
       calculateCost() {
@@ -992,11 +1025,30 @@
           this.getStorageFee()
         }
       },
+      // 添加费用新行
+      // 收款信息
+      addCollection() {
+        this.warehouseDrList.push({
+          fCorpid: null,
+          fFeeid: null,
+          fFeeunitid: 2,
+          fQty: 0,
+          fUnitprice: 0,
+          fAmount: 0,
+          fCurrency: "RMB",
+          fExrate: "1",
+          fTaxrate: this.fTaxrate,
+          fCxrate: "1",
+          fRate: null,
+          remark: null,
+        });
+      },
       getStorageFee () {
         calculateStorageFees(this.form).then((response) => {
           this.dataList = []
           this.warehouseDrList = []
           this.form.fId = response.data.warehouseBills.fId
+          this.form.fBillno = response.data.warehouseBills.fBillno
           if (response.data.warehouseFeesList) {
             this.warehouseDrList = response.data.warehouseFeesList
           }
@@ -1147,24 +1199,16 @@
           this.title = "编辑仓储费计算";
         });
       },
-      // 数量计算
-      changeContractAmt(row) {
-        if (row.fUnitprice !== "") {
-          if (row.fQty !== "") {
-            this.$set(row, 'fAmount', Number(row.fUnitprice) * Number(row.fQty)).toFixed(2);
-          } else {
-            this.$set(row, 'fAmount', row.fUnitprice);
-          }
-        }
-      },
       changeEstmateAmt(row) {
-        if (row.fUnitprice !== "") {
-          if (row.fQty !== "") {
-            this.$set(row, "fAmount", Number(row.fUnitprice) * Number(row.fQty)).toFixed(2);
-          } else {
-            this.$set(row, "fAmount", row.fUnitprice);
-          }
+        let fQty = 0
+        let fUnitprice = 0
+        if (row.fUnitprice && row.fUnitprice !== "") {
+          fUnitprice = row.fUnitprice
+        }
+        if (row.fQty && row.fQty !== "") {
+          fQty = row.fQty
         }
+        this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
       },
       changefBsdate(row) {
         if (this.dataList.length > 0) {
@@ -1175,7 +1219,6 @@
       },
       // 合计
       getSummaries(param) {
-        console.log(param);
         const {columns, data} = param;
         const sums = [];
         var values = [];