Jelajahi Sumber

退押审批列表新增合计行

chen 3 tahun lalu
induk
melakukan
672e2b2267

+ 1 - 1
src/styles/sidebar.scss

@@ -41,7 +41,7 @@
     &.has-logo {
       .el-scrollbar {
         height: calc(100% - 50px);
-        border-right: 1px solid #EBEEF5;
+        // border-right: 1px solid #EBEEF5;
       }
     }
 

+ 49 - 17
src/views/engin_deposit/components/refund_list-detail.vue

@@ -123,10 +123,12 @@
           fit
           highlight-current-row
           stripe
+          show-summary
+          :summary-method="$getSummaries"
         >
           <el-table-column
             align="center"
-            label="物料编码"
+            label="厂产品编码"
             prop="materialOldNumber"
             min-width="160"
             show-overflow-tooltip
@@ -153,59 +155,84 @@
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
-            align="center"
+            align="right"
             label="单价"
             prop="price"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              {{ scope.row.price | numToFixed }}
+            </template>
+          </el-table-column>
           <el-table-column
-            align="center"
+            align="right"
             label="数量"
             prop="qty"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
-            align="center"
+            align="right"
             label="金额"
             prop="totalAmount"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              {{ scope.row.totalAmount | numToFixed }}
+            </template>
+          </el-table-column>
           <el-table-column
-            align="center"
+            align="right"
             label="发货数量"
             prop="hasSendQty"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
-            align="center"
+            align="right"
+            label="上传资料"
+            prop="dataQty"
+            min-width="160"
+            show-overflow-tooltip
+            v-if="detailList.examineStatus !== 'WAIT'"
+          >
+          </el-table-column>
+          <el-table-column
+            align="right"
             label="上传资料"
             prop="dataQty"
             min-width="160"
             show-overflow-tooltip
+            v-if="detailList.examineStatus == 'WAIT'"
           >
             <template slot-scope="scope">
-              <el-input
-                :disabled="title == '详情'"
-                v-model="scope.row.dataQty"
-              ></el-input>
+              <el-input v-model="scope.row.dataQty"></el-input>
             </template>
           </el-table-column>
           <el-table-column
-            align="center"
+            align="right"
+            label="收差金额"
+            prop="diffAmount"
+            min-width="160"
+            show-overflow-tooltip
+            v-if="detailList.examineStatus !== 'WAIT'"
+          >
+            <template slot-scope="scope">
+              {{ scope.row.diffAmount | numToFixed }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="right"
             label="收差金额"
             prop="diffAmount"
             min-width="160"
             show-overflow-tooltip
+            v-if="detailList.examineStatus == 'WAIT'"
           >
             <template slot-scope="scope">
-              <el-input
-                :disabled="title == '详情'"
-                v-model="scope.row.diffAmount"
-              ></el-input>
+              <el-input v-model="scope.row.diffAmount"></el-input>
             </template>
           </el-table-column>
         </el-table>
@@ -530,6 +557,11 @@ export default {
     async getData(data) {
       const res = await getDepositManageDetail(data);
       console.log(res);
+      res.data.items.forEach((item) => {
+        // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
+        item.sums1 = ["hasSendQty", "dataQty", "qty"];
+        item.sums2 = ["totalAmount", "diffAmount", "price"];
+      });
       this.detailList = res.data;
       if (
         res.data.examineStatus == "SAVE" ||

+ 28 - 28
src/views/finance/standbook_list.vue

@@ -501,35 +501,35 @@ export default {
     // this.getDataDict();
   },
   methods: {
-    //合计
-    getSummaries(param) {
-      // console.log(this.$getSummaries, 333333333);
-      console.log(param, "param");
-      // const { columns, data } = param;
-      // const sums = [];
-      // columns.forEach((column, index) => {
-      //   if (index === 0) {
-      //     sums[index] = "总价";
-      //     return;
-      //   }
-      //   const values = data.map((item) => Number(item[column.property]));
-      //   if (!values.every((value) => isNaN(value))) {
-      //     sums[index] = values.reduce((prev, curr) => {
-      //       const value = Number(curr);
-      //       if (!isNaN(value)) {
-      //         return prev + curr;
-      //       } else {
-      //         return prev;
-      //       }
-      //     }, 0);
-      //     sums[index] += " 元";
-      //   } else {
-      //     sums[index] = "N/A";
-      //   }
-      // });
+    // //合计
+    // getSummaries(param) {
+    //   console.log(this.$getSummaries, 333333333);
+    //   console.log(param, "param");
+    //   // const { columns, data } = param;
+    //   // const sums = [];
+    //   // columns.forEach((column, index) => {
+    //   //   if (index === 0) {
+    //   //     sums[index] = "总价";
+    //   //     return;
+    //   //   }
+    //   //   const values = data.map((item) => Number(item[column.property]));
+    //   //   if (!values.every((value) => isNaN(value))) {
+    //   //     sums[index] = values.reduce((prev, curr) => {
+    //   //       const value = Number(curr);
+    //   //       if (!isNaN(value)) {
+    //   //         return prev + curr;
+    //   //       } else {
+    //   //         return prev;
+    //   //       }
+    //   //     }, 0);
+    //   //     sums[index] += " 元";
+    //   //   } else {
+    //   //     sums[index] = "N/A";
+    //   //   }
+    //   // });
 
-      // return sums;
-    },
+    //   // return sums;
+    // },
     //改变经销商
     async changeFn(v) {
       this.searchForm.customerWalletId = "";