From 7e6d173d7fa274140b62bb28ea5ce830cbe28fc5 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 14 一月 2025 10:02:23 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs                                    |   16 +++
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs                                       |   26 +++---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderService.cs                                  |    1 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs                                         |    2 
 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js                                           |   34 ++++++++
 /dev/null                                                                                                    |    0 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs                              |    3 
 代码管理/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue                                              |   42 ++++++----
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs                                        |   20 +++-
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs                                        |   32 ++++++-
 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd0e45d4-3741-49da-b1eb-25a4729fc53f.vsidx |    0 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj                                        |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderController.cs                  |    9 ++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs            |    4 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs                            |    2 
 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8cc7cbb4-d887-4b48-8514-053a923806f4.vsidx |    0 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs                                         |    2 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/RGVJob_BC.cs                                                 |    7 +
 18 files changed, 149 insertions(+), 53 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8cc7cbb4-d887-4b48-8514-053a923806f4.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8cc7cbb4-d887-4b48-8514-053a923806f4.vsidx"
new file mode 100644
index 0000000..a94af99
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8cc7cbb4-d887-4b48-8514-053a923806f4.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index 4a64daf..94f4966 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -66,19 +66,19 @@
         WebResponseContent RequestWMSTask(string palletCode, string sourceAddress);
 
         /// <summary>
-        /// 
+        /// 鍚慦MS鐢宠浠诲姟
         /// </summary>
-        /// <param name="palletCode"></param>
-        /// <param name="sourceAddress"></param>
+        /// <param name="palletCode">鎵樼洏鍙�</param>
+        /// <param name="sourceAddress">璧峰鍦板潃</param>
         /// <returns></returns>
         WebResponseContent RequestWMSTaskSimple(string palletCode, string sourceAddress);
 
         /// <summary>
-        /// 
+        /// 鍚慦MS鐢宠浠诲姟
         /// </summary>
-        /// <param name="palletCode"></param>
-        /// <param name="sourceAddress"></param>
-        /// <param name="roadway"></param>
+        /// <param name="palletCode">鎵樼洏鍙�</param>
+        /// <param name="sourceAddress">璧峰鍦板潃</param>
+        /// <param name="roadway">宸烽亾鍙�</param>
         /// <returns></returns>
         WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway);
 
@@ -91,18 +91,18 @@
         string? RequestAssignLocation(int taskNum, string roadwayNo);
 
         /// <summary>
-        /// 
+        /// 鍚慦MS鐢宠鍒嗛厤璐т綅
         /// </summary>
-        /// <param name="taskNum"></param>
-        /// <param name="roadwayNo"></param>
-        /// <param name="heightType"></param>
+        /// <param name="taskNum">浠诲姟鍙�</param>
+        /// <param name="roadwayNo">宸烽亾鍙�</param>
+        /// <param name="heightType">楂樺害</param>
         /// <returns></returns>
         string? RequestAssignLocationByHeight(int taskNum, string roadwayNo, int heightType);
 
         /// <summary>
-        /// 
+        /// 浠诲姟瀹屾垚
         /// </summary>
-        /// <param name="taskNum"></param>
+        /// <param name="taskNum">浠诲姟鍙�</param>
         /// <returns></returns>
         WebResponseContent TaskCompleted(int taskNum);
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj"
index 5a4a541..f80f0ec 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj"
@@ -79,7 +79,7 @@
 			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
 		</Content>
 		<Content Update="wwwroot\swg-login.html">
-		  <CopyToOutputDirectory>Never</CopyToOutputDirectory>
+		  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 		</Content>
 		<Content Update="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Sys_Tenant.tsv">
 		  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 0c1cc60..7940d31 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -499,7 +499,7 @@
         }
 
         /// <summary>
-        /// 
+        /// 鍚慦MS鐢宠鍒嗛厤璐т綅
         /// </summary>
         /// <param name="taskNum"></param>
         /// <param name="roadwayNo"></param>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
index 9c98f0c..7f50783 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
@@ -104,7 +104,7 @@
                             {
                                 #region 鐢熸垚浠诲姟鍚庣粰杈撻�佺嚎鍚姩淇″彿
                                 Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) /*&& x.DeviceCode == item.StationDeviceCode*/ && (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.WarehouseId == warehouseDevice.WarehouseId);
-                                if (task != null && conveyorLineInfoWrite.Spare2 == 0)
+                                if (task != null && conveyorLineInfoWrite.Spare2 == 0 && conveyorLineStatus.Goods)
                                 {
                                     List<string> stations = _routerExtension.GetEndPoint(item.StationCode, TaskTypeEnum.Inbound.ObjToInt()).Select(x => x.NextPosi).ToList();
                                     WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(stations, task.TaskNum, conveyorLineInfoRead.Spare2);
@@ -185,11 +185,17 @@
                                         WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(stations, task.TaskNum, conveyorLineInfoRead.Spare2);
                                         if (responseContent.Status)
                                         {
+                                            //string currentAddress = task.CurrentAddress;
+                                            //string nextAddress = task.NextAddress;
+                                            //string targetAddress = task.TargetAddress;
+                                            string roadwayNo = task.Roadway;
+
                                             string currentAddress = task.CurrentAddress;
                                             string nextAddress = task.NextAddress;
                                             string targetAddress = task.TargetAddress;
+                                            string deviceCode = task.DeviceCode;
                                             TaskStatusEnum taskState = TaskStatusEnum.Line_Executing;
-                                            List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, task.Roadway, task.TaskType);
+                                            List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, responseContent.Data.ToString(), task.TaskType);
                                             Dt_Router? router = routers.FirstOrDefault();
                                             if (routers == null || routers.Count == 0 || router == null)
                                             {
@@ -204,13 +210,15 @@
 
                                             if (router.IsEnd)
                                             {
-                                                string? targetLoca = _taskService.RequestAssignLocationByHeight(task.TaskNum, task.Roadway, conveyorLineInfoRead.Spare2);
+                                                string? targetLoca = _taskService.RequestAssignLocationByHeight(task.TaskNum, responseContent.Data.ToString(), conveyorLineInfoRead.Spare2);
                                                 if (!string.IsNullOrEmpty(targetLoca))
                                                 {
                                                     currentAddress = item.StackerCraneStationCode;
-                                                    nextAddress = targetAddress;
-                                                    taskState = TaskStatusEnum.SC_Execute;
                                                     targetAddress = targetLoca;
+                                                    nextAddress = targetLoca;
+                                                    taskState = TaskStatusEnum.SC_Execute;
+                                                    deviceCode = item.StackerCraneCode;
+                                                    roadwayNo = responseContent.Data.ToString();
                                                     device.SetValue(W_ConveyorLineDB.EndPos, task.CurrentAddress, item.StationCode);
                                                 }
                                                 else
@@ -227,7 +235,7 @@
                                             device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
                                             device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
                                             device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
-                                            _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress);
+                                            _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress, deviceCode: deviceCode, roadwayNo: roadwayNo);
                                         }
                                         #endregion
                                     }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs"
index 3c3ba6a..bff0b97 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs"
@@ -99,7 +99,7 @@
 
                         if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
                         {
-                            if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode) && conveyorLineInfoRead.TaskNum == 0)//鍏ュ簱
+                            if (conveyorLineSignalRead.STB && /*conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && */!conveyorLineSignalWrite.ACK && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode) && conveyorLineInfoRead.TaskNum == 0)//鍏ュ簱
                             {
                                 WebResponseContent content = _taskService.RequestWMSTaskSimple(conveyorLineInfoRead.Barcode, item.StationCode);
                                 if (content.Status)
@@ -110,6 +110,7 @@
                                         device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
                                         device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
                                         device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+                                        device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
                                         device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                         _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
                                     }
@@ -198,9 +199,9 @@
                                 //}
                                 #endregion
                             }
-                            else if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK && conveyorLineInfoRead.TaskNum > 0)//鍑哄簱
+                            else if (conveyorLineSignalRead.STB /*&& conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm*/ && !conveyorLineSignalWrite.ACK && conveyorLineInfoRead.TaskNum > 0)//鍑哄簱
                             {
-                                //_taskService.TaskCompleted(conveyorLineInfoRead.TaskNum);
+                                _taskService.TaskCompleted(conveyorLineInfoRead.TaskNum);
                                 device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                             }
                             else if (!conveyorLineSignalRead.STB && conveyorLineSignalWrite.ACK && !conveyorLineStatus.Alarm)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
index b688792..1725ca9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
@@ -135,14 +135,25 @@
         /// <param name="e"></param>
         private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e)
         {
-            CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
-            if (commonStackerCrane != null)
+            try
             {
-                if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
+                CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
+                if (commonStackerCrane != null)
                 {
-                    StackerCraneTaskCompleted(e.TaskNum, commonStackerCrane.DeviceCode);
-                    commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
+                    //if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
+                    {
+                        if (e.TaskNum != 0)
+                        {
+                            WriteDebug(commonStackerCrane.DeviceCode, $"璇诲彇鍒颁换鍔″畬鎴�,浠诲姟鍙�:{e.TaskNum}");
+                            StackerCraneTaskCompleted(e.TaskNum, commonStackerCrane.DeviceCode);
+                            commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
+                        }
+                    }
                 }
+            }
+            catch (Exception ex)
+            {
+                WriteError(nameof(StackerCraneJob_BC), "浠诲姟瀹屾垚澶辫触", ex);
             }
         }
 
@@ -160,6 +171,7 @@
                         {
                             _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
                             _taskService.UpdateTaskExceptionMessage(taskNum, $"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
+                            WriteInfo(deviceCode, $"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
                             return WebResponseContent.Instance.Error($"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
                         }
                         Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == stationManger.StationCode);
@@ -205,6 +217,16 @@
         /// <returns></returns>
         private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane)
         {
+            try
+            {
+                Dt_Task oldTask = _taskRepository.QueryFirst(x => x.DeviceCode == commonStackerCrane.DeviceCode && x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt());
+                if (oldTask != null)
+                {
+                    StackerCraneTaskCompleted(oldTask.TaskNum, commonStackerCrane.DeviceCode);
+                }
+            }
+            catch { }
+
             Dt_Task task;
             if (commonStackerCrane.LastTaskType == null)
             {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js"
index 25f0128..dc5728a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js"
@@ -14,8 +14,42 @@
   tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
   buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
   methods: {
+    //鑾峰彇琛ㄥ崟閰嶇疆
+    getOption(field) {
+      let option;
+      this.editFormOptions.forEach(x => {
+        x.forEach(item => {
+          if (item.field == field) {
+            option = item;
+          }
+        })
+      })
+      return option;
+    },
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {  //妗嗘灦鍒濆鍖栭厤缃墠锛�
+      let materielCodeOption = this.getOption("materielCode");
+      let purchaseOrderNoOption = this.getOption("purchaseOrderNo");
+      purchaseOrderNoOption.onChange = (val, option) => {
+        this.editFormFields.materielCode = "";
+        materielCodeOption.data = [];
+        if (val == null || val == 0) {
+          return this.$error("璇烽�夋嫨鐗╂枡缂栧彿锛�")
+        }
+        // console.log(val)
+        // console.log(option)
+        this.http.post("/api/PurchaseOrder/GetPurchaseOrderInfo?purchaseOrderNo=" + val, {}, true).then(
+          source => {
+            if (!source.status) return this.$error(source.message);
+            for (let i = 0; i < source.data.length; i++) {
+              materielCodeOption.data.push({ key: i, value: source.data[i] })
+            }
+            // this.editFormFields.InputOder_itemname = source.data.itemName;
+            // this.$success(source.data.itemName);
+            this.refresh();
+          })
+      }
+
       this.columns.push({
         field: '鎿嶄綔',
         title: '鎿嶄綔',
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue"
index 868d5c8..ed96261 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue"
@@ -26,24 +26,32 @@
       url: "/MaterielCodeInfo/",
       sortName: "id",
     });
-    const editFormFields = ref({});
+    const editFormFields = ref({
+      purchaseOrderNo:"",
+      materielCode:"",
+    });
     const editFormOptions = ref([
-      [
-        {
-          title: "鐗╂枡缂栫爜",
-          field: "materielCode",
-          required: true,
-        },
-        {
-          title: "鎵规鍙�",
-          field: "lotNo",
-          required: true,
-        },
-      ],
       [
         {
           title: "閲囪喘鍗曞彿",
           field: "purchaseOrderNo",
+          type:"select",
+          dataKey: "purchaseOrderNos",
+          data: [],
+          required: true,
+        },
+        {
+          title: "鐗╂枡缂栫爜",
+          field: "materielCode",
+          type: "select",
+          dataKey: "MaterielCodes",
+          data: [],
+        },
+      ],
+      [
+        {
+          title: "鎵规鍙�",
+          field: "lotNo",
           required: true,
         },
         {
@@ -56,13 +64,13 @@
         {
           title: "鐢熶骇鏃ユ湡",
           field: "productionDate",
-          type:"date",
+          type: "date",
           required: true,
         },
         {
           title: "鏈夋晥鏈�",
           field: "effectiveDate",
-          type:"date",
+          type: "date",
           required: true,
         },
       ],
@@ -148,7 +156,7 @@
         title: "淇敼浜�",
         type: "string",
         width: 100,
-        hidden:true,
+        hidden: true,
         align: "left",
       },
       {
@@ -157,7 +165,7 @@
         type: "datetime",
         width: 160,
         align: "left",
-        hidden:true,
+        hidden: true,
         sort: true,
       },
     ]);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd0e45d4-3741-49da-b1eb-25a4729fc53f.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd0e45d4-3741-49da-b1eb-25a4729fc53f.vsidx"
new file mode 100644
index 0000000..586f76a
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd0e45d4-3741-49da-b1eb-25a4729fc53f.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ddab6c09-d32a-4e10-9c68-7904d199b1b7.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ddab6c09-d32a-4e10-9c68-7904d199b1b7.vsidx"
deleted file mode 100644
index 38d0388..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ddab6c09-d32a-4e10-9c68-7904d199b1b7.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs"
index 0b98ac2..2abe5f2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs"
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_Core;
 using WIDESEA_Core.BaseServices;
 using WIDESEA_IInboundRepository;
 using WIDESEA_Model.Models;
@@ -11,6 +12,5 @@
 {
     public interface IPurchaseOrderDetailService : IService<Dt_PurchaseOrderDetail>
     {
-
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderService.cs"
index 4fb1fff..fc2a5fd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderService.cs"
@@ -12,6 +12,7 @@
 {
     public interface IPurchaseOrderService : IService<Dt_PurchaseOrder>
     {
+        WebResponseContent GetPurchaseOrderInfo(string purchaseOrderNo);
         WebResponseContent ReceivePurchaseOrder(PurchaseOrderModel model);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs"
index d03a821..a314b9b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs"
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_Core;
 using WIDESEA_Core.BaseServices;
 using WIDESEA_Core.Enums;
 using WIDESEA_Core.Helper;
@@ -12,7 +13,7 @@
 
 namespace WIDESEA_InboundService
 {
-    public class PurchaseOrderDetailService : ServiceBase<Dt_PurchaseOrderDetail, IPurchaseOrderDetailRepository>,IPurchaseOrderDetailService
+    public class PurchaseOrderDetailService : ServiceBase<Dt_PurchaseOrderDetail, IPurchaseOrderDetailRepository>, IPurchaseOrderDetailService
     {
         public IPurchaseOrderDetailRepository Repository => BaseDal;
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs"
index ce12b7c..1e593eb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs"
@@ -36,7 +36,19 @@
             _supplierInfoRepository = supplierInfoRepository;
             _materielInfoRepository = materielInfoRepository;
         }
-
+        public WebResponseContent GetPurchaseOrderInfo(string purchaseOrderNo)
+        {
+            try
+            {
+                Dt_PurchaseOrder purchaseOrder = BaseDal.Db.Queryable<Dt_PurchaseOrder>().Where(x => x.PurchaseOrderNo == purchaseOrderNo).Includes(x => x.Details).First();
+                List<string> MaterielCodes = purchaseOrder.Details.Where(x => x.PurchaseDetailStatus != PurchaseOrderDetailStatusEnum.Received.ObjToInt()).Select(x => x.MaterielCode).ToList();
+                return WebResponseContent.Instance.OK(data: MaterielCodes);
+            }
+            catch (Exception ex)
+            {
+                return WebResponseContent.Instance.Error(ex.Message);
+            }
+        }
         public WebResponseContent ReceivePurchaseOrder(PurchaseOrderModel model)
         {
             try
@@ -87,7 +99,7 @@
                     {
                         MaterielCode = item.MCode,
                         PurchaseDetailQuantity = item.Qty,
-                        PurchaseDetailReceiveQty=0,
+                        PurchaseDetailReceiveQty = 0,
                         PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.NotReceived.ObjToInt(),
                         Unit = item.Unit,
                         WarehouseId = warehouse.WarehouseId,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index 7fba9f9..af36c1b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -438,7 +438,7 @@
                     PalletCode = model.CarrierCode,
                     PalletType = palletTypeInfo.PalletType,
                     WarehouseId = warehouse.WarehouseId,
-                    StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt()
+                    StockStatus = StockStatusEmun.MES閫�搴�.ObjToInt()
                 };
 
                 Dt_StockInfoDetail_Hty stockInfoDetail_Hty = _stockRepository.StockInfoDetail_HtyRepository.QueryFirst(x => x.BatchNo == model.MaterialLot && x.MaterielCode == model.MaterialCode);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderController.cs"
index cf735cb..b8bb804 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderController.cs"
@@ -1,5 +1,7 @@
-锘縰sing Microsoft.AspNetCore.Http;
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
+using WIDESEA_Core;
 using WIDESEA_Core.BaseController;
 using WIDESEA_IInboundService;
 using WIDESEA_Model.Models;
@@ -16,5 +18,10 @@
         public PurchaseOrderController(IPurchaseOrderService service) : base(service)
         {
         }
+        [HttpPost, HttpGet, Route("GetPurchaseOrderInfo"), AllowAnonymous]
+        public WebResponseContent GetPurchaseOrderInfo(string purchaseOrderNo)
+        {
+            return Service.GetPurchaseOrderInfo(purchaseOrderNo);
+        }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs"
index 7c1a91f..ee5c974 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs"
@@ -1,5 +1,7 @@
-锘縰sing Microsoft.AspNetCore.Http;
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
+using WIDESEA_Core;
 using WIDESEA_Core.BaseController;
 using WIDESEA_IInboundService;
 using WIDESEA_Model.Models;

--
Gitblit v1.9.3