From cf6a69eed3ac59698f16ee08aedd73d34cf6790d Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期四, 15 一月 2026 11:43:08 +0800
Subject: [PATCH] 代码优化

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs           |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockSelectViewDTO.cs                           |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs                       |   12 ++--
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/InboundOrderAddDTO.cs                         |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs                          |    1 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs   |    7 +
 项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue                             |   83 +++++++++++++++++++++++----
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs |    3 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs                          |    7 +
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Outbound/OutboundOrderAddDTO.cs                       |    2 
 10 files changed, 96 insertions(+), 25 deletions(-)

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 2201e5b..0fc8112 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"
@@ -64,17 +64,27 @@
             :width="item.width"
             align="center"
           >
-            <template #default="scoped" v-if="item.type == 'icon'">
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="item.title"
-                placement="bottom"
-                ><el-button
-                  type="text"
-                  @click="tableButtonClick(scoped.row, item)"
-                  ><i :class="item.icon" style="font-size: 22px"></i></el-button
-              ></el-tooltip>
+            <template #default="scoped">
+              <div v-if="item.type == 'icon'">
+                <el-tooltip
+                  class="item"
+                  effect="dark"
+                  :content="item.title"
+                  placement="bottom"
+                  ><el-button
+                    type="text"
+                    @click="tableButtonClick(scoped.row, item)"
+                    ><i :class="item.icon" style="font-size: 22px"></i></el-button
+                ></el-tooltip>
+              </div>
+              <div v-else-if="item.type == 'tag'">
+                <el-tag size="small">
+                  {{ getDictionary(scoped.row, item) }}
+                </el-tag>
+              </div>
+              <div v-else>
+                {{ scoped.row[item.prop] }}
+              </div>
             </template>
           </el-table-column>
         </el-table>
@@ -153,6 +163,7 @@
       showDetialBox: false,
       showStationDialog: false, // 绔欏彴閫夋嫨寮圭獥鏄剧ず鎺у埗
       tableData: [],
+      dictionaryList: null, // 鏂板锛氬瓧鍏告暟鎹�
       tableColumns: [
         {
           prop: "materielCode",
@@ -200,6 +211,13 @@
           type: "string",
         },
         {
+          prop: "stockStatus",
+          title: "搴撳瓨鏄庣粏鐘舵��",
+          type: "tag",
+          width: 90,
+          bindKey: "stockStatusEmun",
+        },
+        {
           prop: "stockId",
           title: "搴撳瓨涓婚敭",
           type: "string",
@@ -232,6 +250,9 @@
       this.showDetialBox = true;
       this.originalQuantity = this.row.lockQuantity;
       this.selectionSum = this.row.lockQuantity;
+      
+      // 鍔犺浇瀛楀吀鏁版嵁
+      this.getDictionaryData();
       this.getData();
 
       if (this.selectionSum == this.row.orderQuantity) {
@@ -241,6 +262,44 @@
       } else {
         this.selectionClass = "more-style";
       }
+    },
+
+    // 鑾峰彇瀛楀吀鏁版嵁
+    getDictionaryData() {
+      if (this.dictionaryList) {
+        return;
+      }
+      var param = [];
+      this.tableColumns.forEach((x) => {
+        if (x.type == "tag" && x.bindKey != "") {
+          param.push(x.bindKey);
+        }
+      });
+      this.http
+        .post("api/Sys_Dictionary/GetVueDictionary", param, "鏌ヨ涓�")
+        .then((x) => {
+          if (x.length > 0) {
+            this.dictionaryList = x;
+          }
+        });
+    },
+
+    // 鑾峰彇瀛楀吀鍊�
+    getDictionary(row, column) {
+      if (this.dictionaryList) {
+        var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);
+        if (item) {
+          var dicItem = item.data.find((x) => x.key == row[column.prop]);
+          if (dicItem) {
+            return dicItem.value;
+          } else {
+            return row[column.prop];
+          }
+        } else {
+          return row[column.prop];
+        }
+      }
+      return row[column.prop];
     },
 
     // 鎵撳紑绔欏彴閫夋嫨寮圭獥
@@ -394,9 +453,7 @@
   justify-content: flex-end;
   gap: 10px;
 }
-</style>
 
-<style>
 .text-button:hover {
   background-color: #f0f9eb !important;
 }
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_BasicService/MESOperation/FeedbackMesService.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_BasicService/MESOperation/FeedbackMesService.cs"
index f5217a3..dd6cb2e 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_BasicService/MESOperation/FeedbackMesService.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_BasicService/MESOperation/FeedbackMesService.cs"
@@ -244,7 +244,7 @@
 
                 _unitOfWorkManage.CommitTran();
                 int successCount = returnRecords.Where(x => x.ReturnStatus == 1).Count() + (isSuccess ? 1 : 0);
-                int failCount = returnRecords.Where(x => x.ReturnStatus == 2).Count() + (isSuccess ? 1 : 0);
+                int failCount = returnRecords.Where(x => x.ReturnStatus == 2).Count() + (!isSuccess ? 1 : 0);
 
                 webResponse.Status = true;
                 webResponse.Message = $"鍥炶皟鎴愬姛鏉℃暟锛歿successCount}锛屽洖璋冨け璐ユ潯鏁帮細{failCount}";
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 cfd506a..02f8616 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"
@@ -66,7 +66,11 @@
         {
             try
             {
-
+                List<Dt_ReCheckOrder> reCheckOrders = BaseDal.Db.Queryable<Dt_ReCheckOrder>().Where(x => x.MaterielCode == model.MaterielCode && x.BatchNo == model.BatchNo).ToList();
+                if (reCheckOrders.Count() == 3)
+                {
+                    return WebResponseContent.Instance.Error($"璇ョ墿鏂欏拰鎵规宸茬粡閲嶆浜嗕笁娆★紝涓嶅厑璁稿啀杩涜閲嶆");
+                }
                 if (BaseDal.QueryFirst(x => x.OrderNo == model.OrderNo) != null)
                 {
                     return WebResponseContent.Instance.Error($"{model.OrderNo}鍗曞彿閲嶅");
@@ -106,11 +110,7 @@
             try
             {
                 List<Dt_ReCheckOrder> reCheckOrders = BaseDal.Db.Queryable<Dt_ReCheckOrder>().Where(x=>x.MaterielCode == model.MaterielCode && x.BatchNo == model.BatchNo).ToList();
-                if(reCheckOrders.Count() == 3)
-                {
-                    return WebResponseContent.Instance.Error($"璇ョ墿鏂欏拰鎵规宸茬粡閲嶆浜嗕笁娆★紝涓嶅厑璁稿啀杩涜閲嶆");
-                }
-
+               
                 var recheckOrder = Db.Queryable<Dt_ReCheckOrder>().Where(x => x.OrderNo == model.OrderNo).First();
                 if (recheckOrder == null)
                 {
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_DTO/Inbound/InboundOrderAddDTO.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_DTO/Inbound/InboundOrderAddDTO.cs"
index 7b0ad7c..32ee2f1 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_DTO/Inbound/InboundOrderAddDTO.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_DTO/Inbound/InboundOrderAddDTO.cs"
@@ -111,6 +111,8 @@
 
         public string warehouseCode { get; set; }
 
+        public string remark { get; set; }
+
         public List<BarcodesModel> barcodes { get; set; }
 
     }
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_DTO/Outbound/OutboundOrderAddDTO.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_DTO/Outbound/OutboundOrderAddDTO.cs"
index dedb25f..13efd64 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_DTO/Outbound/OutboundOrderAddDTO.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_DTO/Outbound/OutboundOrderAddDTO.cs"
@@ -55,6 +55,8 @@
 
         public string warehouseCode { get; set; }
 
+        public string remark { get; set; }
+
     }
 
     public class OutboundRequestModel
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_DTO/Stock/StockSelectViewDTO.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_DTO/Stock/StockSelectViewDTO.cs"
index 0497a6f..ebfda0a 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_DTO/Stock/StockSelectViewDTO.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_DTO/Stock/StockSelectViewDTO.cs"
@@ -27,6 +27,8 @@
         public string SupplyCode { get; set; }
         public DateTime StockCreateDate { get; set; }
         public int StockId { get; set; }
+
+        public int StockStatus { get; set; }
         public int? OrderDetailId { get; set; }
     }
 }
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/InboundService.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/InboundService.cs"
index 9d1b22e..700891d 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/InboundService.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/InboundService.cs"
@@ -142,8 +142,11 @@
 
                 foreach (var item in details)
                 {
-                    var datevaliDate = _inboundOrderRepository.Db.Queryable<Dt_MaterialExpirationDate>().Where(x=>x.MaterialCode.Contains(item.MaterielCode.Substring(0,6))).First();
-
+                    var datevaliDate = _inboundOrderRepository.Db.Queryable<Dt_MaterialExpirationDate>().Where(x => x.MaterialCode.Contains(item.MaterielCode.Substring(0, 6))).First();
+                    if (datevaliDate == null)
+                    {
+                        return content.Error($"璇ョ墿鏂檣item.MaterielCode}鏈壘鍒癕ES鎺ㄩ�佺殑鏈夋晥鏈熸暟鎹紝璇峰厛娣诲姞璇ョ墿鏂欑殑鏈夋晥鏈熷啀缁勭洏鍏ュ簱");
+                    }
                     stockInfo.Details.Add(new Dt_StockInfoDetail
                     {
                         StockId = stockInfo == null ? 0 : stockInfo.Id,
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_StockService/StockInfoService.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_StockService/StockInfoService.cs"
index 4e15598..0c4dcb3 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_StockService/StockInfoService.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_StockService/StockInfoService.cs"
@@ -537,6 +537,7 @@
                                 UseableQuantity = item.StockQuantity,
                                 StockCreateDate = stock.CreateDate,
                                 StockId = item.Id,
+                                StockStatus = item.Status,
                                 OrderDetailId = orderDetail.Id // 鍏宠仈鍒板叿浣撶殑鍑哄簱鍗曟槑缁�
                             });
                         }
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_WMSServer/Controllers/Inbound/InboundOrderController.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_WMSServer/Controllers/Inbound/InboundOrderController.cs"
index aeffcc5..5a398f2 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_WMSServer/Controllers/Inbound/InboundOrderController.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_WMSServer/Controllers/Inbound/InboundOrderController.cs"
@@ -167,7 +167,9 @@
                                 OutBoxbarcodes = barcode.outBoxbarcodes,
                                 BarcodeUnit = barcode.unit,
                                 BarcodeQty = barcode.qty,
-                                OrderQuantity = barcode.qty
+                                OrderQuantity = barcode.qty,
+                                Remark = detailitem.remark??"",
+                                
                             };
 
                             dt_InboundOrder.Details.Add(inboundOrderDetail);
@@ -187,7 +189,8 @@
                             OrderQuantity = detailitem.qty,
                             BarcodeUnit = detailitem.unit,
                             BarcodeQty = detailitem.qty,
-                            MaterielName = materialName
+                            MaterielName = materialName,
+                            Remark = detailitem.remark??""
                         };
                         dt_InboundOrder.Details.Add(inboundOrderDetail);
                     }
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_WMSServer/Controllers/Outbound/OutboundOrderController.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_WMSServer/Controllers/Outbound/OutboundOrderController.cs"
index 5df8879..57fed2a 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_WMSServer/Controllers/Outbound/OutboundOrderController.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_WMSServer/Controllers/Outbound/OutboundOrderController.cs"
@@ -52,7 +52,8 @@
                     BarcodeMoveQty=detailitem.moveQty,
                     BarcodeQty=detailitem.qty,
                     BarcodeUnit=detailitem.unit,
-                    OrderQuantity = detailitem.qty
+                    OrderQuantity = detailitem.qty,
+                    Remark = detailitem.remark??"",
                 };
                 dt_OutboundOrder.Details.Add(inboundOrderDetail);
             }

--
Gitblit v1.9.3