tong 4 anni fa
parent
commit
2b13f4c163
1 ha cambiato i file con 111 aggiunte e 82 eliminazioni
  1. 111 82
      src/views/warehouseBusiness/inStock/index.vue

+ 111 - 82
src/views/warehouseBusiness/inStock/index.vue

@@ -300,7 +300,7 @@
 
           <el-col :span="8">
             <el-form-item label="仓管员" prop="fStorekeeper">
-               <el-select
+              <el-select
                 v-model="form.fStorekeeper"
                 filterable
                 remote
@@ -1041,6 +1041,7 @@
         border
         stripe
         show-summary
+        :summary-method="getTotal"
       >
         <el-table-column label="序号" type="index" width="80">
         </el-table-column>
@@ -1059,19 +1060,19 @@
               show-word-limitfMblnoOptions
             /> -->
             <el-select
-                v-model="scope.row.fCorpid"
-                filterable
-                remote
-                :remote-method="corpsRemoteMethod"
-                placeholder="客户名称"
-              >
-                <el-option
-                  v-for="dict in KHblnoOptions"
-                  :key="dict.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              v-model="scope.row.fCorpid"
+              filterable
+              remote
+              :remote-method="corpsRemoteMethod"
+              placeholder="客户名称"
+            >
+              <el-option
+                v-for="dict in KHblnoOptions"
+                :key="dict.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              ></el-option>
+            </el-select>
           </template>
         </el-table-column>
         <el-table-column
@@ -1088,19 +1089,19 @@
               show-word-limit
             /> -->
             <el-select
-                v-model="scope.row.fCorpid"
-                filterable
-                remote
-                :remote-method="fWRemoteMethod"
-                placeholder="费用名称"
-              >
-                <el-option
-                  v-for="dict in fWbuOptions"
-                  :key="dict.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              v-model="scope.row.fCorpid"
+              filterable
+              remote
+              :remote-method="fWRemoteMethod"
+              placeholder="费用名称"
+            >
+              <el-option
+                v-for="dict in fWbuOptions"
+                :key="dict.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              ></el-option>
+            </el-select>
           </template>
         </el-table-column>
         <el-table-column
@@ -1117,17 +1118,17 @@
               show-word-limit
             /> -->
             <el-select
-                v-model="scope.row.fFeeUnitid"
-                placeholder="请选择计费单位"
-                clearable
-              >
-                <el-option
-                  v-for="dict in jFeetunitOptions"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
-              </el-select>
+              v-model="scope.row.fFeeUnitid"
+              placeholder="请选择计费单位"
+              clearable
+            >
+              <el-option
+                v-for="dict in jFeetunitOptions"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              />
+            </el-select>
           </template>
         </el-table-column>
         <el-table-column
@@ -1292,19 +1293,19 @@
               show-word-limit
             /> -->
             <el-select
-                v-model="scope.row.fCorpid"
-                filterable
-                remote
-                :remote-method="corpsRemoteMethod"
-                placeholder="客户名称"
-              >
-                <el-option
-                  v-for="dict in KHblnoOptions"
-                  :key="dict.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              v-model="scope.row.fCorpid"
+              filterable
+              remote
+              :remote-method="corpsRemoteMethod"
+              placeholder="客户名称"
+            >
+              <el-option
+                v-for="dict in KHblnoOptions"
+                :key="dict.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              ></el-option>
+            </el-select>
           </template>
         </el-table-column>
         <el-table-column
@@ -1321,19 +1322,19 @@
               show-word-limit
             /> -->
             <el-select
-                v-model="scope.row.fCorpid"
-                filterable
-                remote
-                :remote-method="fWRemoteMethod"
-                placeholder="费用名称"
-              >
-                <el-option
-                  v-for="dict in fWbuOptions"
-                  :key="dict.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              v-model="scope.row.fCorpid"
+              filterable
+              remote
+              :remote-method="fWRemoteMethod"
+              placeholder="费用名称"
+            >
+              <el-option
+                v-for="dict in fWbuOptions"
+                :key="dict.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              ></el-option>
+            </el-select>
           </template>
         </el-table-column>
         <el-table-column
@@ -1350,17 +1351,17 @@
               show-word-limit
             /> -->
             <el-select
-                v-model="scope.row.fFeeUnitid"
-                placeholder="请选择计费单位"
-                clearable
-              >
-                <el-option
-                  v-for="dict in jFeetunitOptions"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
-              </el-select>
+              v-model="scope.row.fFeeUnitid"
+              placeholder="请选择计费单位"
+              clearable
+            >
+              <el-option
+                v-for="dict in jFeetunitOptions"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              />
+            </el-select>
           </template>
         </el-table-column>
         <el-table-column
@@ -1870,9 +1871,9 @@ export default {
       // 状态(数据字典),N 入字典
       fBillstatusOptions: [],
       // 费用名称
-      fWbuOptions:[],
+      fWbuOptions: [],
       // 计价单位
-      jFeetunitOptions:[],
+      jFeetunitOptions: [],
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -2357,6 +2358,34 @@ export default {
         }
       }
     },
+    // 合计
+    // getTotal(param) {
+    //   console.log(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 (column.property === "num") {
+    //       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] = "--";
+    //     }
+    //   });
+
+    //   return sums;
+    // },
     changefBsdate(row) {
       if (this.dataList.length > 0) {
         for (var i = 0; i < this.dataList.length; i++) {
@@ -2447,7 +2476,7 @@ export default {
       }
       let queryParams = { pageNum: 1, pageSize: 10, fName: name };
       listCorps(queryParams).then((response) => {
-        console.log(response)
+        console.log(response);
         this.fMblnoOptions = response.rows;
         this.KHblnoOptions = response.rows;
       });
@@ -2463,14 +2492,14 @@ export default {
       });
     },
     // 远程模糊查询费用名称
-    fWRemoteMethod(name) { 
-     if (name == null || name === "") {
+    fWRemoteMethod(name) {
+      if (name == null || name === "") {
         return false;
       }
       let queryParams = { pageNum: 1, pageSize: 10, fName: name };
       listFees(queryParams).then((response) => {
         this.fWbuOptions = response.rows;
-        console.log(response)
+        console.log(response);
       });
     },
     /* 远程模糊查询经营单位 */
@@ -2501,7 +2530,7 @@ export default {
       let queryParams = { pageNum: 1, pageSize: 10, userName: name };
       listUser(queryParams).then((response) => {
         this.userOptions = response.rows;
-        console.log(response.rows)
+        console.log(response.rows);
       });
     },
   },