Forráskód Böngészése

优化仓储费 列表页日期格式

阿伏兔 4 éve
szülő
commit
bb364adca3
1 módosított fájl, 15 hozzáadás és 35 törlés
  1. 15 35
      src/views/warehouseBusiness/storageFeeCalculation/index.vue

+ 15 - 35
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -212,6 +212,9 @@
         prop="createTime"
         width="180"
       >
+        <template slot-scope="scope">
+          {{scope.row.createTime.slice(0, 10)}}
+        </template>
       </el-table-column>
       <el-table-column
         label="操作"
@@ -794,7 +797,6 @@
             label="操作"
           >
             <template slot-scope="scope">
-              <el-button size="small">审核费用</el-button>
               <el-button
                 @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
                 size="small"
@@ -1182,6 +1184,7 @@
             for (let li in this.dataList) {
               this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
               this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
+              this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
               this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
             }
           }
@@ -1227,50 +1230,27 @@
             sums[index] = "合计";
             return;
           }
-          if (column.property === "fgrossweight") {
-            values = data.map((item) => Number(item["fGrossweight"]));
-          }
-          if (column.property === "fnetweight") {
-            values = data.map((item) => Number(item["fNetweight"]));
+          if (column.property === "fBillingQty") {
+            values = data.map((item) => Number(item["fBillingQty"]));
           }
-          if (column.property === "fqty") {
-            values = data.map((item) => Number(item["fQty"]));
+          if (column.property === "fAmt") {
+            values = data.map((item) => Number(item["fAmt"]));
           }
-          if (column.property === "fCntqty") {
-            values = data.map((item) => Number(item["fCntqty"]));
-          } // const values = data.map(item => Number(item[column.property]))
-          if (
-            column.property === "fgrossweight" ||
-            column.property === "fnetweight" ||
-            column.property === "fqty" ||
-            column.property === "fCntqty"
-          ) {
+          // const values = data.map(item => Number(item[column.property]))
+          if (column.property === "fBillingQty" || column.property === "fAmt") {
             sums[index] = values.reduce((prev, curr) => {
               const value = Number(curr);
               if (!isNaN(value)) {
-                if (column.property === "fgrossweight") {
-                  this.form.fGrossweight = prev + curr;
-                  this.fGrossweight = prev + curr;
-                }
-                if (column.property === "fnetweight") {
-                  this.form.fNetweight = prev + curr;
-                  this.fNetweight = prev + curr;
-                }
-                if (column.property === "fqty") {
-                  this.form.fQty = prev + curr;
-                  this.fQty = prev + curr;
-                }
-                if (column.property === "fCntqty") {
-                  this.fCntqty = prev + curr;
-                }
                 return prev + curr;
               } else {
                 return prev;
               }
-            }, 0); // sums[index]
+            }, 0);
+            sums[index] = sums[index].toFixed(2)
+          } else {
+            sums[index] = '-'
           }
         });
-        this.sums = sums;
         return sums;
       },
       // 付款合计
@@ -1314,7 +1294,7 @@
           }
         )
           .then(function () {
-            return delWarehousebills(fIds);
+            return delStorageFeeCalculation(fIds);
           })
           .then(() => {
             this.getList();