소스 검색

Merge branch 'dev' into dev-mlchen-wms-index

mlchen 1 일 전
부모
커밋
2c30f70906

+ 45 - 38
src/views/warehouseManagement/components/AssetsDialog.vue

@@ -215,8 +215,8 @@
     </el-container>
 
     <div slot="footer">
-      <el-button type="primary" @click="confirm">确定</el-button>
-      <el-button @click="cancel">关闭</el-button>
+      <el-button type="primary" :loading="confirmLoading" @click="confirm">确定</el-button>
+      <el-button :disabled="confirmLoading" @click="cancel">关闭</el-button>
     </div>
   </ele-modal>
 </template>
@@ -261,6 +261,7 @@
           }
         ],
         visible: false,
+        confirmLoading: false,
         tableData: [],
         total: 0,
         categoryLevelId: '',
@@ -780,6 +781,7 @@
       open(val) {
         let that = this;
         this.productLists = val || [];
+        this.confirmLoading = false;
         this.visible = true;
         this.$nextTick(() => {
           this.$refs.treeList.getTreeData().then((data) => {
@@ -809,43 +811,48 @@
         }
         console.log(this.selectionList);
         let data = null;
-        if (this.dimension == 3) {
-          data = await storageApi.getHierarchyList({
-            ids: this.selectionList.map((item) => item.id).join(','),
-            type: this.dimension,
-            warehouseId: this.searchForm.warehouseId,
-          });
-        } else if (this.dimension == 2) {
-          data = await storageApi.getHierarchyFifo({
-            type: this.dimension,
-            ids: this.selectionList.map((item) => item.id),
-            builders: this.selectionList.map((item) => {
-              return {
-                warehouseId: this.searchForm.warehouseId,
-                categoryId: item.categoryId,
-                batchNo: item.batchNo,
-                // 历史数据保持空值,由后端按外部批次号兼容匹配
-                systemBatchNo: item.systemBatchNo || '',
-                num: item.outboundNum,
-                id: item.id
-              };
-            })
-          });
-        } else if (this.dimension == 1) {
-          data = await storageApi.getHierarchyFifo({
-            type: this.dimension,
-            builders: this.selectionList.map((item) => {
-              return {
-                warehouseId: this.searchForm.warehouseId,
-                categoryId: item.categoryId,
-                num: item.outboundNum
-              };
-            })
-          });
+        this.confirmLoading = true;
+        try {
+          if (this.dimension == 3) {
+            data = await storageApi.getHierarchyList({
+              ids: this.selectionList.map((item) => item.id).join(','),
+              type: this.dimension,
+              warehouseId: this.searchForm.warehouseId,
+            });
+          } else if (this.dimension == 2) {
+            data = await storageApi.getHierarchyFifo({
+              type: this.dimension,
+              ids: this.selectionList.map((item) => item.id),
+              builders: this.selectionList.map((item) => {
+                return {
+                  warehouseId: this.searchForm.warehouseId,
+                  categoryId: item.categoryId,
+                  batchNo: item.batchNo,
+                  // 历史数据保持空值,由后端按外部批次号兼容匹配
+                  systemBatchNo: item.systemBatchNo || '',
+                  num: item.outboundNum,
+                  id: item.id
+                };
+              })
+            });
+          } else if (this.dimension == 1) {
+            data = await storageApi.getHierarchyFifo({
+              type: this.dimension,
+              builders: this.selectionList.map((item) => {
+                return {
+                  warehouseId: this.searchForm.warehouseId,
+                  categoryId: item.categoryId,
+                  num: item.outboundNum
+                };
+              })
+            });
+          }
+          console.log('data-------------------', data);
+          this.$emit('detailData', data, this.dimension);
+          this.cancel();
+        } finally {
+          this.confirmLoading = false;
         }
-        console.log('data-------------------', data);
-        this.$emit('detailData', data, this.dimension);
-        this.cancel();
       },
       cancel() {
         this.selectionList = [];

+ 5 - 0
src/views/warehouseManagement/inventoryAllocation/details.vue

@@ -26,6 +26,11 @@
                 <span>{{ infoData.allotName }}</span>
               </el-form-item>
             </el-col>
+            <el-col :span="8">
+              <el-form-item label="当前审核人">
+                <span>{{ infoData.currentApproverName || '-' }}</span>
+              </el-form-item>
+            </el-col>
             <el-col :span="8">
               <el-form-item label="创建时间">
                 <span>{{ infoData.createTime }}</span>

+ 7 - 0
src/views/warehouseManagement/inventoryAllocation/index.vue

@@ -304,6 +304,13 @@
             showOverflowTooltip: true,
             minWidth: 110
           },
+          {
+            prop: 'currentApproverName',
+            label: '当前审核人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
           {
             prop: 'createTime',
             label: '调拨时间',