From 2654a849bcbbd03df38592b29c22df56d750fb27 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期一, 12 一月 2026 15:48:04 +0800
Subject: [PATCH] 优化

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs     |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs |   12 ++
 项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue           |  212 +++++++++++++++++++++++++++++++-----------
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs      |    9 +
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs          |   28 ++--
 项目代码/WIDESEA_WMSClient/src/extension/check/recheckOrder.js                     |   21 ----
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs |   11 +
 8 files changed, 197 insertions(+), 100 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/recheckOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/recheckOrder.js"
index 1ac007c..59e5567 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/recheckOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/recheckOrder.js"
@@ -48,26 +48,7 @@
   methods: {
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {  //妗嗘灦鍒濆鍖栭厤缃墠锛�
-      this.columns.push({
-        field: '鎿嶄綔',
-        title: '鎿嶄綔',
-        width: 90,
-        fixed: 'right',
-        align: 'center',
-        formatter: (row) => {
-          return (
-            '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鎸囧畾搴撳瓨</i>'
-          );
-        },
-        click: (row) => {
-          const table = this.$refs.table.$refs.table;
-          if (table) {
-            table.clearSelection();
-            table.toggleRowSelection(row, true);
-          }
-          this.$refs.gridBody.open(row);
-        }
-      });
+
       let EmptyTrayOutboundBtn = this.buttons.find(x => x.value == 'BatchOrder');
       if (EmptyTrayOutboundBtn) {
         EmptyTrayOutboundBtn.onClick = function () {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
index f2e53d8..2201e5b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
@@ -1,5 +1,6 @@
 <template>
   <div>
+    <!-- 搴撳瓨鎸囧畾寮圭獥 -->
     <vol-box
       v-model="showDetialBox"
       :lazy="true"
@@ -26,13 +27,6 @@
               </span>
             </el-col>
             <el-col :span="8">
-             <!--  <el-link
-                type="primary"
-                size="small"
-                style="float: right; height: 20px"
-                @click="getData(false)"
-                >{{ kcname }}</el-link
-              > -->
               <el-link
                 type="primary"
                 size="small"
@@ -40,13 +34,6 @@
                 @click="getData"
                 >鍒锋柊</el-link
               >
-      <!--         <el-link
-                type="primary"
-                size="small"
-                style="float: right; height: 20px; margin-right: 10px"
-                @click="revokeAssign"
-                >鎾ら攢鍒嗛厤</el-link
-              > -->
             </el-col>
           </el-row>
         </el-alert>
@@ -61,7 +48,6 @@
           height="500px"
           @selection-change="handleSelectionChange"
         >
-          >
           <el-table-column type="selection" width="55"> </el-table-column>
           <el-table-column
             label="搴忓彿"
@@ -94,29 +80,78 @@
         </el-table>
       </div>
       <template #footer>
-       <el-button type="primary" size="small" @click="outbound"
+        <el-button type="primary" size="small" @click="openStationDialog"
           >鐩存帴鍑哄簱</el-button
         >
-
         <el-button type="danger" size="small" @click="showDetialBox = false"
           >鍏抽棴</el-button
         >
       </template>
     </vol-box>
+
+    <!-- 绔欏彴閫夋嫨寮圭獥 -->
+    <el-dialog
+      v-model="showStationDialog"
+      title="閫夋嫨鍑哄簱绔欏彴"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <div class="station-dialog-content">
+        <el-form :model="stationForm" label-width="100px">
+          <el-form-item label="閫夋嫨绔欏彴锛�" required>
+            <el-select
+              v-model="stationForm.selectedPlatform"
+              placeholder="璇烽�夋嫨鍑哄簱绔欏彴"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in stations"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="鍑哄簱鏁伴噺锛�">
+            <el-input
+              v-model="selectionSum"
+              readonly
+              style="width: 100%"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="鐗╂枡淇℃伅锛�">
+            <div style="font-size: 12px; color: #666; line-height: 1.5">
+              <div>鐗╂枡缂栧彿锛歿{ row.materielCode }}</div>
+              <div>鐗╂枡鍚嶇О锛歿{ row.materielName }}</div>
+            </div>
+          </el-form-item>
+        </el-form>
+      </div>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="showStationDialog = false">鍙栨秷</el-button>
+          <el-button type="primary" @click="confirmOutbound">纭鍑哄簱</el-button>
+        </span>
+      </template>
+    </el-dialog>
   </div>
 </template>
+
 <script>
 import VolBox from "@/components/basic/VolBox.vue";
-import { fa } from "element-plus/es/locales.mjs";
+// 寮曞叆绔欏彴绠$悊宸ュ叿
+import { stationManager } from "@/../src/uitils/stationManager";
+
 export default {
   components: { VolBox },
   data() {
     return {
       row: null,
       kcname: "",
-      mainOrderNo: '',
+      mainOrderNo: "",
       pkcx: false,
       showDetialBox: false,
+      showStationDialog: false, // 绔欏彴閫夋嫨寮圭獥鏄剧ず鎺у埗
       tableData: [],
       tableColumns: [
         {
@@ -168,7 +203,8 @@
           prop: "stockId",
           title: "搴撳瓨涓婚敭",
           type: "string",
-        },{
+        },
+        {
           prop: "orderDetailId",
           title: "鍗曟嵁鏄庣粏涓婚敭",
           type: "string",
@@ -178,13 +214,22 @@
       selectionSum: 0,
       selectionClass: "less-style",
       originalQuantity: 0,
+      
+      // 绔欏彴鐩稿叧鏁版嵁
+      stations: [
+        { label: "绔欏彴2", value: "2-1" },
+        { label: "绔欏彴3", value: "3-1" },
+      ],
+      stationForm: {
+        selectedPlatform: "", // 淇敼瀛楁鍚嶄互鍖归厤鍙傛暟
+      },
     };
   },
   methods: {
     open(row, orderNo) {
-    this.row = row;
-    this.mainOrderNo = orderNo; // 瀛樺偍涓诲崟鎹紪鍙�
-    this.showDetialBox = true;
+      this.row = row;
+      this.mainOrderNo = orderNo;
+      this.showDetialBox = true;
       this.originalQuantity = this.row.lockQuantity;
       this.selectionSum = this.row.lockQuantity;
       this.getData();
@@ -197,40 +242,80 @@
         this.selectionClass = "more-style";
       }
     },
-    lockStock() {
-      this.http
-        .post(
-          "api/OutboundOrderDetail/LockOutboundStock?id=" + this.row.id,
-          this.selection,
-          "鏁版嵁澶勭悊涓�"
-        )
-        .then((x) => {
-          if (!x.status) return this.$message.error(x.message);
-          this.$message.success("鎿嶄綔鎴愬姛");
-          this.showDetialBox = false;
-          this.$emit("parentCall", ($vue) => {
-            $vue.getData();
-          });
-        });
-    },
-    outbound() {
+
+    // 鎵撳紑绔欏彴閫夋嫨寮圭獥
+    openStationDialog() {
       if (this.selection.length <= 0) {
-        return this.$message.error("璇峰嬀閫�");
+        return this.$message.error("璇峰厛鍕鹃�夎鍑哄簱鐨勫簱瀛�");
       }
-      let url = this.pkcx
-        ? "api/Task/GenerateOutboundTask?orderDetailId="
-        : "api/Task/GenerateOutboundTask?orderDetailId=";
-      this.http
-        .post(url + this.row.id, this.selection, "鏁版嵁澶勭悊涓�")
-        .then((x) => {
-          if (!x.status) return this.$message.error(x.message);
-          this.$message.success("鎿嶄綔鎴愬姛");
-          this.showDetialBox = false;
-          this.$emit("parentCall", ($vue) => {
-            $vue.getData();
-          });
-        });
+      
+      // 浠庣紦瀛樹腑鑾峰彇榛樿绔欏彴
+      const cachedStation = stationManager.getStation();
+      this.stationForm.selectedPlatform = cachedStation || "";
+      
+      this.showStationDialog = true;
     },
+
+    // 纭鍑哄簱
+    async confirmOutbound() {
+      if (!this.stationForm.selectedPlatform) {
+        return this.$message.error("璇烽�夋嫨鍑哄簱绔欏彴");
+      }
+
+      // 鍑嗗璇锋眰鍙傛暟
+      const requestParams = {
+        detailIds: [this.row.id], // 鍑哄簱鍗曠殑鏄庣粏ID
+        outboundTargetLocation: this.stationForm.selectedPlatform, // 閫夋嫨鐨勭珯鍙�
+        outboundQuantity: this.selectionSum, // 宸查�夋暟閲�
+        operator: this.getCurrentOperator(), // 鑾峰彇褰撳墠鎿嶄綔浜�
+        orderNo: this.mainOrderNo, // 鍗曟嵁缂栧彿
+        stockDetailIds: this.selection.map(item => item.stockId) // 搴撳瓨鏄庣粏涓婚敭鏁扮粍
+      };
+
+      try {
+        const x = await this.http.post(
+          "api/Outbound/ProcessPickingOutbound",
+          requestParams,
+          "鏁版嵁澶勭悊涓�"
+        );
+
+        if (!x.status) {
+          return this.$message.error(x.message);
+        }
+        
+        this.$message.success("鍑哄簱浠诲姟鍒涘缓鎴愬姛");
+        this.showStationDialog = false;
+        this.showDetialBox = false;
+        this.$emit("parentCall", ($vue) => {
+          $vue.getData();
+        });
+      } catch (error) {
+        this.$message.error(error.message || "鍑哄簱澶勭悊澶辫触");
+      }
+    },
+
+    // 鑾峰彇褰撳墠鎿嶄綔浜�
+    getCurrentOperator() {
+      // 鍙互浠庢湰鍦板瓨鍌ㄣ�乂uex鎴栧叏灞�鐘舵�佷腑鑾峰彇褰撳墠鐢ㄦ埛
+      try {
+        // 绀轰緥锛氫粠localStorage鑾峰彇鐢ㄦ埛淇℃伅
+        const userInfo = JSON.parse(localStorage.getItem('userInfo') || '{}');
+        if (userInfo.userName) {
+          return userInfo.userName;
+        }
+        
+        // 绀轰緥锛氫粠Vuex鑾峰彇鐢ㄦ埛淇℃伅
+        if (this.$store && this.$store.state.user) {
+          return this.$store.state.user.userName;
+        }
+      } catch (error) {
+        console.error('鑾峰彇鎿嶄綔浜轰俊鎭け璐�:', error);
+      }
+      
+      // 榛樿鎿嶄綔浜�
+      return "admin";
+    },
+
     getData(a) {
       if (!a) this.pkcx = !this.pkcx;
       let url = this.pkcx
@@ -247,7 +332,7 @@
           this.tableData = x;
         });
     },
-  
+
     handleSelectionChange(val) {
       this.selection = val;
       this.selectionSum =
@@ -264,6 +349,7 @@
         this.selectionClass = "more-style";
       }
     },
+
     toggleSelection(rows) {
       if (rows) {
         rows.forEach((row) => {
@@ -273,15 +359,18 @@
         this.$refs.singleTable.clearSelection();
       }
     },
+
     clearSelection() {
       this.$refs.singleTable.clearSelection();
     },
+
     handleRowClick(row) {
       this.$refs.singleTable.toggleRowSelection(row);
     },
   },
 };
 </script>
+
 <style scoped>
 .less-style {
   color: black;
@@ -293,6 +382,17 @@
 
 .more-style {
   color: red;
+}
+
+/* 绔欏彴閫夋嫨寮圭獥鏍峰紡 */
+.station-dialog-content {
+  padding: 10px 0;
+}
+
+.dialog-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
 }
 </style>
 
@@ -307,12 +407,10 @@
 
 .box-table .el-table tbody tr:hover > td {
   background-color: #d8e0d4 !important;
-  /* color: #ffffff; */
 }
 
 .box-table .el-table tbody tr.current-row > td {
   background-color: #f0f9eb !important;
-  /* color: #ffffff; */
 }
 
 .el-table .success-row {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
index 538c006..e1b4692 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
@@ -176,7 +176,7 @@
                 OrderType = InOrderTypeEnum.ReCheck.ObjToInt(),
                 OrderStatus = 0,
                 CreateType = 0,
-                BusinessType = "",
+                BusinessType = "30",
                 IsBatch = 0,
                 FactoryArea = reCheckOrder.FactoryArea,
                 Remark = "",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
index 3b0dbe7..c49a425 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
@@ -706,10 +706,15 @@
                     if (!string.IsNullOrEmpty(newBarcode))
                     {
                         // 鐗╂枡鏂版潯鐮佸洖浼�
-                        //_feedbackMesService.BarcodeFeedback(newBarcode);
+                        _feedbackMesService.BarcodeFeedback(newBarcode);
                     }
-
-                    //_feedbackMesService.OutboundFeedback(outboundOrder.OrderNo);
+                    List<Dt_OutboundOrderDetail> details = _outboundOrderDetailRepository.QueryData(x => x.OrderId == outboundOrder.Id);
+                    if(details.All(x => x.OverOutQuantity >= x.OrderQuantity - x.MoveQty))
+                    {
+                        outboundOrder.OrderStatus = OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt();
+                        _outboundOrderRepository.UpdateData(outboundOrder);
+                    }
+                    _feedbackMesService.OutboundFeedback(outboundOrder.OrderNo);
 
                 }
                 catch (Exception ex)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
index 9526c9a..91a8c46 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
@@ -359,7 +359,7 @@
             }
             var data = BaseDal.Db.Queryable<Dt_OutboundOrder>()
                 .WhereIF(!wheres.IsNullOrEmpty(), wheres)
-                .Where(x => x.OrderType == 0)
+                .Where(x => x.OrderType == 0 || x.OrderType == 116)
                 .OrderBy(orderByModels)
                 .ToPageList(options.Page, options.Rows, ref totalCount);
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index 99bb3e2..253ad0d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -1098,6 +1098,11 @@
                             ContractResolver = new CamelCasePropertyNamesContractResolver()
                         };
                         item.ReturnJsonData = JsonConvert.SerializeObject(barcodesList, settings);
+                        //閲嶆嫞鍑哄簱涓嶉渶瑕佸洖浼�
+                        if (outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt())
+                        {
+                            item.ReturnJsonData = "";
+                        }
                     }
 
                     lockInfo.SortedQuantity = lockInfo.SortedQuantity + actualOutboundQuantity;
@@ -1124,13 +1129,13 @@
                     response.Success = true;
                     response.Message = "鍑哄簱瀹屾垚";
                     response.UpdatedDetails = updateDetails;
-
+                    
                     // 妫�鏌ュ嚭搴撳崟鏄惁瀹屾垚
                     if (CheckOutboundOrderCompleted(request.OrderNo))
                     {
                         UpdateOutboundOrderStatus(request.OrderNo, OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt());
 
-                        if (outboundOrder.OrderType != OutOrderTypeEnum.InternalAllocat.ObjToInt())
+                        if (outboundOrder.OrderType != OutOrderTypeEnum.InternalAllocat.ObjToInt()&& outboundOrder.OrderType!= InOrderTypeEnum.ReCheck.ObjToInt())
                         {
                             _feedbackMesService.OutboundFeedback(outboundOrder.OrderNo);
                         }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index fb53ba9..5e89b8c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -716,21 +716,9 @@
                 {
                     return WebResponseContent.Instance.Error($"璐т綅鐘舵�佷笉姝g‘");
                 }
-                List<Dt_AllocateMaterialInfo> allocateMaterialInfos = _allocateMaterialInfo.QueryData(x => x.OrderNo == stockInfo.Details.FirstOrDefault().OrderNo);
-                if(allocateMaterialInfos == null)
-                {
-                    return content.Error("鏈壘鍒板叆鏅轰粨鐨勭墿鏂欎俊鎭�");
-                }
-
-                string Operator = allocateMaterialInfos.FirstOrDefault().Creater;
 
                 _unitOfWorkManage.BeginTran();
-                var alldelete = _allocateMaterialInfo.DeleteAndMoveIntoHty(allocateMaterialInfos ,OperateTypeEnum.鑷姩鍒犻櫎);
-                if (!alldelete)
-                {
-                    await Db.Deleteable(task).ExecuteCommandAsync();
-                }
-
+                
                 var beforelocationStatus = locationInfo.LocationStatus;
                 locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
                 _locationInfoService.Repository.UpdateData(locationInfo);
@@ -749,7 +737,19 @@
                     await Db.Deleteable(task).ExecuteCommandAsync();
                 }
                 Dt_OutboundOrder outboundOrder = _outboundOrderService.Db.Queryable<Dt_OutboundOrder>().Where(x => x.OrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x=>x.Details).First();
-
+                foreach (var item in stockInfo.Details.Where(x => x.OrderNo == outboundOrder.OrderNo).ToList())
+                {
+                    var inbounddetail = _allocateMaterialInfo.QueryFirst(x => x.OrderNo == item.OrderNo && x.Barcode == item.Barcode);
+                    if (inbounddetail != null)
+                    {
+                        var alldelete = _allocateMaterialInfo.DeleteAndMoveIntoHty(inbounddetail, OperateTypeEnum.鑷姩鍒犻櫎);
+                        if (!alldelete)
+                        {
+                            await Db.Deleteable(task).ExecuteCommandAsync();
+                        }
+                    }
+                }
+                string Operator = outboundOrder.Modifier;
                 ///鍥炶皟MES
                 HttpResponseResult<MesResponseDTO> httpResponseResult = new HttpResponseResult<MesResponseDTO>();
                 string reqCode = Guid.NewGuid().ToString();
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 901532d..79d9d7f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -1090,6 +1090,14 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
+                var allFactoryAreas = stockViews.SelectMany(sv => sv.Details)
+                                                .Select(x => x.FactoryArea)
+                                                .GroupBy(x => x)
+                                                .ToList();
+                if (allFactoryAreas.Count >= 2)
+                {
+                    return content.Error($"璇烽�夋嫨鍚屼竴鍘傚尯鍖哄煙鐨勫簱瀛樿繘琛岀洏鐐癸紝褰撳墠娑夊強{allFactoryAreas.Count}涓笉鍚岀殑鍘傚尯");
+                }
                 List<int> ids = stockViews.Select(x => x.StockId).ToList();
                 //鑾峰彇搴撳瓨
                 List<Dt_StockInfo> stockInfos = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => ids.Contains(x.Id)).Includes(x => x.Details).ToList();
@@ -1122,9 +1130,9 @@
                         return content.Error($"鏈壘鍒皗item.PalletCode}搴撳瓨鏄庣粏鏁版嵁");
                     }
                     Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.LocationCode == item.LocationCode);
-                    if (locationInfo == null && (locationInfo.EnableStatus == EnableStatusEnum.Disable.ObjToInt() || locationInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && item.StockStatus != StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
+                    if (locationInfo == null || (locationInfo.EnableStatus == EnableStatusEnum.Disable.ObjToInt() || locationInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) || locationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt() || item.StockStatus != StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
                     {
-                        content.Error($"{item.PalletCode}璐т綅鎴栧簱瀛樼姸鎬佷笉婊¤冻鍑哄簱鏉′欢");
+                        return content.Error($"{item.PalletCode}璐т綅鎴栧簱瀛樼姸鎬佷笉婊¤冻鍑哄簱鏉′欢");
                     }   
                 }
                 List<Dt_Task> tasks = GetTasks(stockInfos, TaskTypeEnum.OutInventory,outStation);

--
Gitblit v1.9.3