From 7cc4be28036bef1aa1f2fbc0f0e6aea6fc5a77c0 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 10 一月 2025 16:05:59 +0800
Subject: [PATCH] 优化库存视图前端,优化获取旧WMS辅料库存

---
 代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue                            |   11 +
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs                 |    3 
 代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js                         |  213 ++++++++++++++++++----------------
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs         |    1 
 代码管理/淮安PDA/pages/stash/OutEmpty.vue                                                 |   14 ++
 代码管理/WMS/WIDESEA_WMSClient/public/webconfig.js                                      |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs                        |   47 ++++---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs |    4 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs                 |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs           |   17 ++
 10 files changed, 181 insertions(+), 133 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/public/webconfig.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/public/webconfig.js"
index fe29087..53958a2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/public/webconfig.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/public/webconfig.js"
@@ -1,3 +1,3 @@
 window.webConfig = {
-    "webApiBaseUrl": "http://127.0.0.1:9293/"
+    "webApiBaseUrl": "http://10.30.4.92:9283/"
 }
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
index a009b54..92ad623 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
@@ -1,123 +1,134 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
 
+import { el } from "element-plus/es/locales.mjs";
+
 let extension = {
-    components: {
-      //鏌ヨ鐣岄潰鎵╁睍缁勪欢
-      gridHeader: '',
-      gridBody: '',
-      gridFooter: '',
-      //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
-      modelHeader: '',
-      modelBody: '',
-      modelFooter: ''
-    },
-    tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
-    buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
-    methods: {
-       //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
-      onInit() {  
-        // let InOrder = this.buttons.find(x => x.value == 'StockOutbound');
-        // if (InOrder) {
-        //   InOrder.onClick = function () {
-        //     let rows = this.$refs.table.getSelected();
-        //     if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
-        //     if (rows.length > 1) return this.$error("璇烽�夋嫨鍗曟潯鏁版嵁!");
-        //     var keys = rows.map(x => { return x.stockId });
-        //     this.http
-        //       .post("api/Task/Outbound?id="+keys[0], null, "鏁版嵁澶勭悊涓�")
-        //       .then((x) => {
-        //         if (!x.status) return this.$message.error(x.message);
-        //         this.$message.success("鎿嶄綔鎴愬姛");
-        //         this.refresh();
-        //       });
-        //   }
-        // }
-        this.columns.forEach(column => {
-          if (column.field == 'materielCode') {
-            column.formatter = (row) => {
-              var str='';
-              var list=row.materielCode.split(',');
-              for (let index = 0; index < list.length; index++) {
-                str+=list[index]+'<br>';
-              }
-              return str; 
+  components: {
+    //鏌ヨ鐣岄潰鎵╁睍缁勪欢
+    gridHeader: '',
+    gridBody: '',
+    gridFooter: '',
+    //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
+    modelHeader: '',
+    modelBody: '',
+    modelFooter: ''
+  },
+  tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
+  buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
+  methods: {
+    //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
+    onInit() {
+      // let InOrder = this.buttons.find(x => x.value == 'StockOutbound');
+      // if (InOrder) {
+      //   InOrder.onClick = function () {
+      //     let rows = this.$refs.table.getSelected();
+      //     if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+      //     if (rows.length > 1) return this.$error("璇烽�夋嫨鍗曟潯鏁版嵁!");
+      //     var keys = rows.map(x => { return x.stockId });
+      //     this.http
+      //       .post("api/Task/Outbound?id="+keys[0], null, "鏁版嵁澶勭悊涓�")
+      //       .then((x) => {
+      //         if (!x.status) return this.$message.error(x.message);
+      //         this.$message.success("鎿嶄綔鎴愬姛");
+      //         this.refresh();
+      //       });
+      //   }
+      // }
+      this.columns.forEach(column => {
+        if (column.field == 'materielCode') {
+          column.formatter = (row) => {
+            var str = '';
+            var list = row.materielCode.split(',');
+            for (let index = 0; index < list.length; index++) {
+              str += list[index] + '<br>';
             }
+            return str = list[0] == "" ? "绌虹" : str;
           }
-          if (column.field == 'batchNo') {
-            column.formatter = (row) => {
-              var str='';
-              var list=row.batchNo.split(',');
-              for (let index = 0; index < list.length; index++) {
-                str+=list[index]+'<br>';
-              }
-              return str; 
+        }
+        if (column.field == 'batchNo') {
+          column.formatter = (row) => {
+            var str = '';
+            var list = row.batchNo.split(',');
+            for (let index = 0; index < list.length; index++) {
+              str += list[index] + '<br>';
             }
+            return str = list[0] == "" ? "鏃�" : str;
           }
-          if (column.field == 'materielInfo') {
-            const today = new Date()
-            column.formatter = (row) => {
+        }
+        if (column.field == 'materielInfo') {
+          const today = new Date()
+          column.formatter = (row) => {
+            if (row.details.length > 0) {
               const today = new Date();
               const closestDate = row.details
-              .map(x => {
+                .map(x => {
                   const date = new Date(x.effectiveDate);
                   const diffInDays = Math.ceil(Math.abs((today - date) / (1000 * 60 * 60 * 24)));
                   return { date, diffInDays };
                 })
-              .reduce((closest, current) => (current.diffInDays < closest.diffInDays? current : closest))
-              .date;
+                .reduce((closest, current) => (current.diffInDays < closest.diffInDays ? current : closest))
+                .date;
 
               const daysSinceClosest = Math.ceil(Math.abs((today - closestDate) / (1000 * 60 * 60 * 24)));
-              return '<span style="color: #F56C6C">'+ daysSinceClosest+"澶�"+'</span>';
+              return '<span style="color: #F56C6C">' + daysSinceClosest + "澶�" + '</span>';
+            } else {
+              return '<span style="color: #F56C6C">' + "鏃犱繚璐ㄦ湡" + '</span>';
             }
+
           }
-          if (column.field == 'sumStock') {
-            column.formatter = (row) => {
-              var sum=0;
+        }
+        if (column.field == 'sumStock') {
+          column.formatter = (row) => {
+            if (row.details.length > 0) {
+              var sum = 0;
               const closestDate = row.details
-              .map(x => {
-                sum+=(x.stockQuantity)
-              })
-              return '<span style="color: #F56C6C">'+ sum+row.details[0].unit+'</span>';
+                .map(x => {
+                  sum += (x.stockQuantity)
+                })
+              return '<span style="color: #F56C6C">' + sum + row.details[0].unit + '</span>';
+            } else {
+              return '<span style="color: #F56C6C">' + "1涓�" + '</span>';
             }
+
           }
-        })
-      },
-      onInited() {
-        //妗嗘灦鍒濆鍖栭厤缃悗
-        //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
-        //this.detailOptions.columns.forEach(column=>{ });
-      },
-      searchBefore(param) {
-        //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
-        //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
-        return true;
-      },
-      searchAfter(result) {
-        //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
-        return true;
-      },
-      addBefore(formData) {
-        //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
-        return true;
-      },
-      updateBefore(formData) {
-        //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
-        return true;
-      },
-      rowClick({ row, column, event }) {
-        //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
-        this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
-      },
-      modelOpenAfter(row) {
-        //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
-        //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
-        //(2)缁欏脊鍑烘璁剧疆榛樿鍊�
-        //(3)this.editFormFields.瀛楁='xxx';
-        //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
-        //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
-      }
+        }
+      })
+    },
+    onInited() {
+      //妗嗘灦鍒濆鍖栭厤缃悗
+      //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
+      //this.detailOptions.columns.forEach(column=>{ });
+    },
+    searchBefore(param) {
+      //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
+      //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
+      return true;
+    },
+    searchAfter(result) {
+      //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
+      return true;
+    },
+    addBefore(formData) {
+      //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
+      return true;
+    },
+    updateBefore(formData) {
+      //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
+      return true;
+    },
+    rowClick({ row, column, event }) {
+      //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
+      this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+    },
+    modelOpenAfter(row) {
+      //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
+      //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
+      //(2)缁欏脊鍑烘璁剧疆榛樿鍊�
+      //(3)this.editFormFields.瀛楁='xxx';
+      //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
+      //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
     }
-  };
-  export default extension;
-  
\ No newline at end of file
+  }
+};
+export default extension;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
index 3804f15..4fe1d06 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
@@ -49,7 +49,8 @@
       ],
       [
         { title: "鐗╂枡缂栧彿", field: "materielCode",type: "like"},
-        { title: "鎵规鍙�", field: "batchNo",type: "like"}
+        { title: "鎵规鍙�", field: "batchNo",type: "like"},
+        { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouse",data: [],},
       ],
     ]);
     const columns = ref([
@@ -86,6 +87,14 @@
         align: "left",
       },
       {
+        field: "warehouseId",
+        title: "鎵�灞炰粨搴�",
+        type: "string",
+        width: 80,
+        align: "left",
+        bind: { key: "warehouse", data: [] },
+      },
+      {
         field: "roadwayNo",
         title: "宸烽亾缂栧彿",
         type: "decimal",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
index 45245fd..2178c1e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
@@ -131,6 +131,7 @@
                             Details = new List<Dt_StockInfoDetail>()
                         };
                         var ContainerDetailsInfos = TesugarClient.Queryable("ContainerDetailsInfo", "x").Where("CId", "=", id).ToList();
+                        if (ContainerDetailsInfos.Count < 1) stockInfo.PalletType = PalletTypeEnum.Empty.ObjToInt();
                         foreach (var ContainerDetailsInfo in ContainerDetailsInfos)
                         {
                             dynamic ruleConfig1 = ContainerDetailsInfo;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
index 29b47b1..479b9d3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
@@ -16,62 +16,67 @@
     public class StockViewDTO
     {
         /// <summary>
-        /// 
+        /// 璐т綅缂栧彿
         /// </summary>
         public string LocationCode { get; set; }
 
         /// <summary>
-        /// 
+        /// 璐т綅鍚嶇О
         /// </summary>
         public string LocationName { get; set; }
 
         /// <summary>
-        /// 
+        /// 璐т綅鍒�
         /// </summary>
         public int Column { get; set; }
 
         /// <summary>
-        /// 
+        /// 璐т綅琛�
         /// </summary>
         public int Row { get; set; }
 
         /// <summary>
-        /// 
+        /// 璐т綅灞�
         /// </summary>
         public int Layer { get; set; }
 
         /// <summary>
-        /// 
+        /// 搴撳尯涓婚敭
+        /// </summary>
+        public int WarehouseId {  get; set; }
+
+        /// <summary>
+        /// 璐т綅娣卞害
         /// </summary>
         public int Depth { get; set; }
 
         /// <summary>
-        /// 
+        /// 璐т綅鐘舵��
         /// </summary>
         public int LocationStatus { get; set; }
 
         /// <summary>
-        /// 
+        /// 璐т綅绫诲瀷
         /// </summary>
         public int LocationType { get; set; }
 
         /// <summary>
-        /// 
+        /// 宸烽亾缂栧彿
         /// </summary>
         public string RoadwayNo { get; set; }
 
         /// <summary>
-        /// 
+        /// 绂佺敤鐘舵��
         /// </summary>
         public int EnalbeStatus { get; set; }
 
         /// <summary>
-        /// 
+        /// 搴撳瓨涓婚敭
         /// </summary>
         public int StockId { get; set; }
 
         /// <summary>
-        /// 
+        /// 鎵樼洏鍙�
         /// </summary>
         public string PalletCode { get; set; }
 
@@ -81,47 +86,47 @@
         public bool IsFull { get; set; }
 
         /// <summary>
-        /// 
+        /// 鐗╂枡缂栫爜
         /// </summary>
         public string MaterielCode { get; set; }
 
         /// <summary>
-        /// 
+        /// 鐗╂枡鎵瑰彿
         /// </summary>
         public string BatchNo { get; set; }
 
         /// <summary>
-        /// 
+        /// 搴撳瓨鐘舵��
         /// </summary>
         public int StockStatus { get; set; }
 
         /// <summary>
-        /// 
+        /// 搴撳瓨澶囨敞
         /// </summary>
         public string StockRemark { get; set; }
 
         /// <summary>
-        /// 
+        /// 鍒涘缓浜�
         /// </summary>
         public string Creater { get; set; }
 
         /// <summary>
-        /// 
+        /// 鍒涘缓鏃堕棿
         /// </summary>
         public DateTime CreateDate { get; set; }
 
         /// <summary>
-        /// 
+        /// 淇敼浜�
         /// </summary>
         public string Modifier { get; set; }
 
         /// <summary>
-        /// 
+        /// 淇敼鏃堕棿
         /// </summary>
         public DateTime? ModifyDate { get; set; }
 
         /// <summary>
-        /// 
+        /// 搴撳瓨璇︽儏
         /// </summary>
         [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(StockId))]
         public List<Dt_StockInfoDetail> Details { get; set; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
index 07cc697..41ecf7e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -76,7 +76,7 @@
         /// <param name="qty">鏁伴噺</param>
         /// <param name="address">鍦板潃</param>
         /// <returns></returns>
-        WebResponseContent OutEmpty(int qty, string address, int WarehouseId);
+        WebResponseContent OutEmpty(int qty, string address, int WarehouseId, string barcode);
 
         /// <summary>
         /// WCS鐢宠鍏ュ簱
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
index 5348412..15ebd4b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
@@ -88,6 +88,7 @@
                     Depth = a.Depth,
                     EnalbeStatus = a.EnableStatus,
                     Layer = a.Layer,
+                    WarehouseId = b.WarehouseId,
                     LocationName = a.LocationName,
                     LocationStatus = a.LocationStatus,
                     LocationType = a.LocationType,
@@ -101,7 +102,7 @@
                     StockStatus = b.StockStatus,
                     Details = b.Details,
                 });
-            
+
 
             int totalCount = 0;
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index 2219ed3..b42dee9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -53,7 +53,7 @@
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
                 }
-                if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus!=StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt())
+                if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt())
                 {
                     return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱");
                 }
@@ -173,7 +173,7 @@
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }
-        public WebResponseContent OutEmpty(int qty, string address, int WarehouseId)
+        public WebResponseContent OutEmpty(int qty, string address, int WarehouseId, string barcode)
         {
             try
             {
@@ -182,8 +182,17 @@
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒板簱鍖�");
                 }
-                var stockInfos = _stockRepository.StockInfoRepository.QueryData(x => x.WarehouseId == WarehouseId && x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(), qty, nameof(Dt_StockInfo.CreateDate));
-                if (stockInfos == null) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}鏈壘鍒扮┖绠卞簱瀛�");
+                List<Dt_StockInfo> stockInfos = null;
+                if (string.IsNullOrEmpty(barcode))
+                {
+                    stockInfos = _stockRepository.StockInfoRepository.QueryData(x => x.WarehouseId == WarehouseId && x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(), qty, nameof(Dt_StockInfo.CreateDate));
+                }
+                else
+                {
+                    stockInfos = _stockRepository.StockInfoRepository.QueryData(x => x.WarehouseId == WarehouseId && x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.PalletCode == barcode);
+                    if (stockInfos.Count == 0) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}鏈壘鍒扮┖绠便�恵barcode}銆�");
+                }
+
                 if (stockInfos.Count < qty) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}绌虹搴撳瓨涓嶈冻,搴撳瓨鏁般�恵stockInfos.Count}銆�");
                 List<Dt_Task> tasks = GetTasks(stockInfos, TaskTypeEnum.OutEmpty);
                 stockInfos.ForEach(x =>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index b6d9fa6..4f09979 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -61,9 +61,9 @@
         /// <param name="address">鍦板潃</param>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("OutEmpty"), AllowAnonymous]
-        public WebResponseContent OutEmpty(int qty, string address, int WarehouseId)
+        public WebResponseContent OutEmpty(int qty, string address, int WarehouseId, string barcode)
         {
-            return Service.OutEmpty(qty, address, WarehouseId);
+            return Service.OutEmpty(qty, address, WarehouseId,barcode);
         }
 
         [HttpPost, HttpGet, Route("DeviceRequestInboundTask"), AllowAnonymous]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/OutEmpty.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/OutEmpty.vue"
index 29b279b..d5beb69 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/OutEmpty.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/OutEmpty.vue"
@@ -6,6 +6,9 @@
 					<uni-easyinput type="text" placeholder="璇疯緭鍏ユ暟閲�" ref='midInput' :focus="!focus" v-model="qty"
 						@input="barcodeInput" />
 				</uni-forms-item>
+				<uni-forms-item label="鎵樼洏鏉$爜:">
+					<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="focus" v-model="barcode" />
+				</uni-forms-item>
 				<uni-forms-item>
 					<button @click="OutEmpty" type="primary" size="default" style="margin-top: 2%;">绌虹鍑哄簱</button>
 				</uni-forms-item>
@@ -23,12 +26,14 @@
 				focus: false,
 				qty: "",
 				address: "",
+				barcode: "",
 			}
 		},
 		onShow() {},
 		onLoad(res) {
 			this.WarehouseId = res.warehouseId;
 			this.focus = false;
+			this.qty = 1;
 			if (res.warehouseId == 5) {
 				this.address = "8001";
 			}
@@ -53,8 +58,15 @@
 					})
 					return;
 				}
+				if (this.qty < 1) {
+					this.$refs.uToast.show({
+						title: "鏁伴噺涓嶈兘灏忎簬1",
+						type: 'error'
+					})
+					return;
+				}
 				this.$u.post('/api/Task/OutEmpty?qty=' + this.qty + '&address=' + this.address + '&WarehouseId=' +
-					this.WarehouseId).then(
+					this.WarehouseId + '&barcode=' + this.barcode).then(
 					res => {
 						if (res.status) {
 							this.$refs.uToast.show({

--
Gitblit v1.9.3