From cbde6165c2a669898b9e21ef9d45cd0bd871003a Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Wed, 5 Mar 2025 18:49:45 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2.按货架、物料、批次排序 3.物料绑定那里 货架未送走无法进行第二轮的呼叫 --- .../productionLineCallOut.vue | 2 +- PDA/PDA/pages/queryBindList/queryBindList.vue | 8 +++++- .../dist/dev/app-plus/app-service.js | 26 ++++++++++++++----- WCS.BLL/Services/Service/PDAMatBindService.cs | 15 ++++++++--- .../PDAProductionLineCallInController.cs | 7 +++-- 5 files changed, 44 insertions(+), 14 deletions(-) diff --git a/PDA/PDA/pages/productionLineCallOut/productionLineCallOut.vue b/PDA/PDA/pages/productionLineCallOut/productionLineCallOut.vue index a1b9c47..0a298fa 100644 --- a/PDA/PDA/pages/productionLineCallOut/productionLineCallOut.vue +++ b/PDA/PDA/pages/productionLineCallOut/productionLineCallOut.vue @@ -723,7 +723,7 @@ } .scroll-view { - height: 73.7vh; + height: 71vh; } .popup-content { diff --git a/PDA/PDA/pages/queryBindList/queryBindList.vue b/PDA/PDA/pages/queryBindList/queryBindList.vue index a8701ac..93cd996 100644 --- a/PDA/PDA/pages/queryBindList/queryBindList.vue +++ b/PDA/PDA/pages/queryBindList/queryBindList.vue @@ -14,6 +14,10 @@ {{fixedInfo.matName}} + + + {{fixedInfo.matBatch}} + {{fixedInfo.matSpec}} @@ -132,6 +136,7 @@ matCode: '示例名称', matName: '这是一段示例描述', matSpec: '', + matBatch:'', matQty: 0, }; const popup = ref(null); @@ -141,6 +146,7 @@ fixedInfo.infoId = info.id; fixedInfo.matCode = info.matCode; fixedInfo.matName = info.matName; + fixedInfo.matBatch = info.matBatch; fixedInfo.matSpec = info.matSpec; fixedInfo.matQty = info.matQty; @@ -661,7 +667,7 @@ } .button-group button { - margin-top: 20rpx; + margin-top: 25rpx; padding: 10rpx 10rpx; border: none; border-radius: 5px; diff --git a/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js index f07bd14..0997b0c 100644 --- a/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js +++ b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js @@ -2816,6 +2816,7 @@ if (uni.restoreGlobal) { matCode: "示例名称", matName: "这是一段示例描述", matSpec: "", + matBatch: "", matQty: 0 }; const popup = vue.ref(null); @@ -2824,6 +2825,7 @@ if (uni.restoreGlobal) { fixedInfo.infoId = info.id; fixedInfo.matCode = info.matCode; fixedInfo.matName = info.matName; + fixedInfo.matBatch = info.matBatch; fixedInfo.matSpec = info.matSpec; fixedInfo.matQty = info.matQty; inputValue.value = info.matQty; @@ -2912,7 +2914,7 @@ if (uni.restoreGlobal) { }); }; const deleteData = () => { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:245", "123"); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:251", "123"); var serverIPAndPort = getServerIPAndPort(); uni.request({ url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/deleteMatDetailCurrentInfo", @@ -2999,10 +3001,10 @@ if (uni.restoreGlobal) { this.userName = getConfig("userName", "admin"); const self = this; recive(function(res) { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:342", "Success:" + res.data); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:348", "Success:" + res.data); self.analysisScanCode(res.data); }, function(err) { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:345", "Error:", JSON.stringify(err)); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:351", "Error:", JSON.stringify(err)); }); }, methods: { @@ -3010,11 +3012,11 @@ if (uni.restoreGlobal) { cameraScanCode() { uni.scanCode({ success: (res) => { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:353", "扫码结果:", res.result); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:359", "扫码结果:", res.result); this.analysisScanCode(res.result); }, fail: (err) => { - formatAppLog("error", "at pages/queryBindList/queryBindList.vue:357", "扫码失败:", err); + formatAppLog("error", "at pages/queryBindList/queryBindList.vue:363", "扫码失败:", err); } }); }, @@ -3085,7 +3087,7 @@ if (uni.restoreGlobal) { this.clear(); }, complete: (event) => { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:452", "请求完成", event); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:458", "请求完成", event); } }); }, @@ -3160,7 +3162,7 @@ if (uni.restoreGlobal) { this.clear(); }, complete: (event) => { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:537", "请求完成", event); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:543", "请求完成", event); } }); }, @@ -3230,6 +3232,16 @@ if (uni.restoreGlobal) { /* TEXT */ ) ]), + vue.createElementVNode("view", { class: "info-item" }, [ + vue.createElementVNode("label", null, "物料批次:"), + vue.createElementVNode( + "text", + null, + vue.toDisplayString($setup.fixedInfo.matBatch), + 1 + /* TEXT */ + ) + ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode("label", null, "物料规格:"), vue.createElementVNode( diff --git a/WCS.BLL/Services/Service/PDAMatBindService.cs b/WCS.BLL/Services/Service/PDAMatBindService.cs index 3a9eca7..a9916cc 100644 --- a/WCS.BLL/Services/Service/PDAMatBindService.cs +++ b/WCS.BLL/Services/Service/PDAMatBindService.cs @@ -51,8 +51,8 @@ namespace WCS.BLL.Services.Service //获取当前工位的货架 var shelf = await DbHelp.db.Queryable() - .Where(t => t.CurrentLocationId == endLocation.Id && t.TransStatus == TransStatusEnum.静止 - || t.DestinationLocationId == endLocation.Id && t.TransStatus == TransStatusEnum.运输中)//解决产线人员 呼叫后货架未到的时候绑定的问题 + .Where(t => (t.CurrentLocationId == endLocation.Id) + || (t.DestinationLocationId == endLocation.Id && t.TransStatus == TransStatusEnum.运输中))//解决产线人员 呼叫后货架未到的时候绑定的问题 .Where(t => t.IsEnable == true) .FirstAsync(); if (shelf != null) @@ -67,7 +67,7 @@ namespace WCS.BLL.Services.Service }; } //运输中 - else + else if(shelf.TransStatus == TransStatusEnum.运输中 && shelf.DestinationLocationId == endLocation.Id) { return new ResponseCommon() { @@ -76,6 +76,15 @@ namespace WCS.BLL.Services.Service Data = null, }; } + else if (shelf.TransStatus == TransStatusEnum.运输中 && shelf.CurrentLocationId == endLocation.Id) + { + return new ResponseCommon() + { + Code = 205, + Message = $"当前货架【{shelf.ShelfCode}】未从工位拉走!\r\n等待拉走后进行绑定!", + Data = null, + }; + } } #endregion diff --git a/WCS.WebApi/Controllers/PDAProductionLineCallInController.cs b/WCS.WebApi/Controllers/PDAProductionLineCallInController.cs index 12fb642..e078ed9 100644 --- a/WCS.WebApi/Controllers/PDAProductionLineCallInController.cs +++ b/WCS.WebApi/Controllers/PDAProductionLineCallInController.cs @@ -170,6 +170,9 @@ namespace WCS.WebApi.Controllers //货架状态是静止的 代表这个货架没有被呼叫走哦 .LeftJoin((mci, si, li) => (si.TransStatus == TransStatusEnum.静止 && si.CurrentLocationId == li.Id)) .WhereIF(!string.IsNullOrEmpty(request.MatCodeCondition), (mci, si, li) => mci.MatCode.Contains(request.MatCodeCondition) || mci.MatName.Contains(request.MatCodeCondition)) + .OrderBy((mci, si, li) => mci.ShelfCode)//排序规则 + .OrderBy((mci, si, li) => mci.MatCode) + .OrderBy((mci, si, li) => mci.MatBatch) .Select((mci, si, li) => new MatDetailCurrentInfoModel() { Id = mci.Id, @@ -197,8 +200,8 @@ namespace WCS.WebApi.Controllers //分页 var totalCount = await recordsQueryable.CountAsync(); var records = await recordsQueryable - .OrderByDescending(mci => mci.Id) - .Skip((1 - 1) * 300).Take(300) + + .Skip(0).Take(300) .ToListAsync(); return new PageQueryResponse() {