From 3974d3927f2dbb4d6a351ba58ba3abf936542613 Mon Sep 17 00:00:00 2001
From: TanYibin <5491541@qq.com>
Date: Fri, 20 Sep 2024 15:40:31 +0800
Subject: [PATCH] 库存查看页 快速出库选择修复

---
 ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue | 63 ++++++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 34 insertions(+), 29 deletions(-)

diff --git a/ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue b/ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
index 8f802df..d517c54 100644
--- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
+++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
@@ -192,6 +192,7 @@ export default {
       description: '库存表管理页面',
       zoneOptions:[],
       firstLoad:0,
+      querySource: {},
       inventoryHeaderList:[],
       // 表头
       columns: [
@@ -452,36 +453,40 @@ export default {
     quickShipment() {
       if (this.selectedRowKeys.length <= 0) {
         this.$message.warning('请选择一条记录!');
-      } else {
-        let zoneCodes = this.selectRecord.map(row => row.zoneCode);
-        if (new Set(zoneCodes).size !== 1) {
-          this.$message.warning('所选数据非同库区');
-          return;
-        }
-        this.inventoryHeaderList = this.selectionRows;
-        selectOutPort(this.selectionRows[0]).then(res => {
-          if (res.success) {
-            var portList = res.result;
-            if (portList.length == 1) {
-              this.loading = true;
-              this.inventoryHeaderList.forEach(x=>{
-                x["toPortCode"]= portList[0].code;
-              })
-              shipmentInventoryHeader(this.inventoryHeaderList).then((res) => {
-                this.loading = false;
-                if (res.success) {
-                  this.$message.success(res.message);
-                } else {
-                  this.$message.error(res.message);
-                }
-              });
-            } else {
-              this.$refs.quickShipmentModel.edit(this.selectRecord);
-              this.$refs.quickShipmentModel.title = '选择出库口';
-            }
-          }
-        })
+        return;
+      }
+      let zoneCodes = this.selectRecord.map(row => row.zoneCode);
+      if (new Set(zoneCodes).size !== 1) {
+        this.$message.warning('所选数据非同库区');
+        return;
       }
+      debugger
+      this.inventoryHeaderList = this.selectionRows;
+      this.querySource.containerCode = this.selectRecord[0].containerCode;
+      this.querySource.zoneCode = this.selectRecord[0].zoneCode;
+      selectOutPort(this.querySource).then(res => {
+        if (res.success) {
+          debugger
+          var portList = res.result;
+          if (portList.length == 1) {
+            this.loading = true;
+            this.inventoryHeaderList.forEach(x=>{
+              x["toPortCode"]= portList[0].code;
+            })
+            shipmentInventoryHeader(this.inventoryHeaderList).then((res) => {
+              this.loading = false;
+              if (res.success) {
+                this.$message.success(res.message);
+              } else {
+                this.$message.error(res.message);
+              }
+            });
+          } else {
+            this.$refs.quickShipmentModel.edit(this.selectRecord);
+            this.$refs.quickShipmentModel.title = '选择出库口';
+          }
+        }
+      })
     },
     together() {
       if (this.selectedRowKeys.length <= 0) {
--
libgit2 0.22.2