From 514076cd4779972d3532fbc9fd0989c2a5d30816 Mon Sep 17 00:00:00 2001 From: chengsc <Demo@DESKTOP-CPA90BF> Date: 星期四, 05 九月 2024 16:49:37 +0800 Subject: [PATCH] 修改问题 --- Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs | 2 +- Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs | 15 ++++++++++----- Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 1 + Pda/View/AsnSetting/productEnterQuantity.html | 1 + Wms/Wms/CreateBoxInfo.json | 10 ++++++---- HTML/views/ASNSetting/ArrivalNotice.html | 4 ++++ HTML/views/StatisticalReport/BoxInfor.html | 1 + Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | 17 ++++++++++++----- Wms/WMS.BLL/BllSoServer/CompleteDetailServer.cs | 2 +- 9 files changed, 37 insertions(+), 16 deletions(-) diff --git a/HTML/views/ASNSetting/ArrivalNotice.html b/HTML/views/ASNSetting/ArrivalNotice.html index e74eaea..5383c31 100644 --- a/HTML/views/ASNSetting/ArrivalNotice.html +++ b/HTML/views/ASNSetting/ArrivalNotice.html @@ -320,6 +320,10 @@ html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel2"> <i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`; } + if(d.AsnType == "5"&& (d.Status == "0" || d.Status == "1") && (d.PackagNo != ""|| d.PackagNo!=null)){ + html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel"> + <i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`; + } return html; } }} diff --git a/HTML/views/StatisticalReport/BoxInfor.html b/HTML/views/StatisticalReport/BoxInfor.html index e2939bb..ccb5ce0 100644 --- a/HTML/views/StatisticalReport/BoxInfor.html +++ b/HTML/views/StatisticalReport/BoxInfor.html @@ -412,6 +412,7 @@ {field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center'}, {field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus'}, {field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus'}, + {field: 'Demo', title: '瀵勫瓨澶囨敞', align: 'center'}, ]]; var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 //#endregion diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html index 01e96c1..6550d26 100644 --- a/Pda/View/AsnSetting/productEnterQuantity.html +++ b/Pda/View/AsnSetting/productEnterQuantity.html @@ -1247,6 +1247,7 @@ function checkBoxInfo() { var param = { "BoxNo": $("#BOXCODE").val(), + "AsnNo":$("#bar").val(), } sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 diff --git a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs index fa7aa45..d1d0140 100644 --- a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs +++ b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs @@ -980,7 +980,7 @@ LotNo = maxCodestr2, Standard = asnList.Standard, PackageStandard = packStr, - SupplierLot = asnList.SupplierLot, + SupplierLot = supplierLot, InspectMark = "0", BitBoxMark = bNum > boxQty ? "1" : "0", InspectStatus = "0", diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs index 2aa3b61..d8ef676 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs +++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs @@ -1817,12 +1817,19 @@ { throw new Exception("璇锋壂鎻忓绠辨潯鐮�!"); } - var count = Db.Queryable<BllBoxInfo>().Count(m => m.IsDel == "0" && m.Status == "0" && m.BoxNo == model.BoxNo); - if (count == 0) + if (!string.IsNullOrWhiteSpace(model.ASNNo)) { - GetBoxInfoByFuMa(model.BoxNo, ""); //浠庤祴鐮佺郴缁熻幏鍙栫鐮佷俊鎭� + var asnData = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == model.ASNNo); + if (asnData != null && (asnData.Type == "0" || asnData.Type == "3")) + { + var count = Db.Queryable<BllBoxInfo>().Count(m => m.IsDel == "0" && m.Status == "0" && m.BoxNo == model.BoxNo); + if (count == 0) + { + GetBoxInfoByFuMa(model.BoxNo, ""); //浠庤祴鐮佺郴缁熻幏鍙栫鐮佷俊鎭� + } + } + } - string sqlString = $@"SELECT ASNNo, BoxNo, @@ -1836,7 +1843,7 @@ AND BoxNo = '{model.BoxNo}' GROUP BY ASNNo,BoxNo,SkuNo,SkuName,LotNo; "; var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString); - if (models == null) + if (models.Count == 0) { throw new Exception("绠辩爜淇℃伅涓嶅瓨鍦�!"); } diff --git a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs index 863f920..a60709d 100644 --- a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs +++ b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs @@ -1,6 +1,7 @@ 锘縰sing System; using System.Collections.Generic; using System.Data; +using System.Linq; using System.Text; using Model.ModelDto.BllQualityDto; using Model.ModelVm; @@ -105,7 +106,7 @@ { throw new Exception("鎵规鍙蜂笉鍙负绌猴紝璇锋牳鏌ワ紒"); } - //int isTui = 0; + int isTui = 0; //楠岃瘉鍏ュ簱鍗曞彿鏄惁涓虹┖ if (!string.IsNullOrEmpty(model.ASNNo)) { @@ -122,7 +123,7 @@ { throw new Exception("杈撳叆鐨勬壒娆℃垨鐗╂枡淇℃伅涓庡叆搴撳崟鎹笉绗︼紝璇锋牳鏌ワ紒"); } - //isTui = 1; + isTui = 1; } //鏌ユ壘璐ㄦ淇℃伅涓槸鍚﹀瓨鍦ㄥ悓鎵规璐ㄦ褰曞叆璁板綍 @@ -155,9 +156,13 @@ //鏌ユ壘搴撳瓨鏄庣粏淇℃伅 List<DataStockDetail> detail = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo).ToList(); + if (isTui == 1) + { + detail = detail.Where(m=> m.ASNNo == model.ASNNo).ToList(); + } foreach (var item in detail) { - List<BllBoxInfo> box = Db.Queryable<BllBoxInfo>().Where(a => a.IsDel == "0" && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList(); + List<DataBoxInfo> box = Db.Queryable<DataBoxInfo>().Where(a => a.IsDel == "0" && a.StockDetailId == item.Id && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList(); //鍒ゆ柇鍚堟牸鐘舵�佹槸鍚﹀悎鏍� if (model.IsQualified == "1") { @@ -167,7 +172,7 @@ item.InspectStatus = "1"; //1鍚堟牸 foreach (var b1 in box) { - b1.InspectMark = "1"; //1鍚堟牸 + b1.InspectStatus = "1"; //1鍚堟牸 } } else //涓嶅悎鏍� @@ -177,7 +182,7 @@ item.InspectStatus = "2"; //2涓嶅悎鏍� foreach (var b1 in box) { - b1.InspectMark = "2"; //2涓嶅悎鏍� + b1.InspectStatus = "2"; //2涓嶅悎鏍� } } Db.Updateable(box).ExecuteCommand(); diff --git a/Wms/WMS.BLL/BllSoServer/CompleteDetailServer.cs b/Wms/WMS.BLL/BllSoServer/CompleteDetailServer.cs index b16669b..cd09b0a 100644 --- a/Wms/WMS.BLL/BllSoServer/CompleteDetailServer.cs +++ b/Wms/WMS.BLL/BllSoServer/CompleteDetailServer.cs @@ -27,7 +27,7 @@ { var total = 0; var detailInfo = Db.Queryable<BllCompleteDetail>().Where(w => w.ExportAllotId == id).ToList(); - var num = detailInfo.Count(w=> string.IsNullOrEmpty(w.BoxNo) && !string.IsNullOrEmpty(w.BoxNo3)); + var num = detailInfo.Count(w=> string.IsNullOrEmpty(w.BoxNo) && string.IsNullOrEmpty(w.BoxNo3)); if (detailInfo.Count>0 && num == 0) //绠辩爜鍜屾敮鐮侀兘涓虹┖鐨勬暟閲忕瓑涓�0 璇佹槑鏄鐮佹嫞璐� { Expression<Func<BllCompleteDetail, bool>> item = Expressionable.Create<BllCompleteDetail>() diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs index 61a35d6..c3a96e4 100644 --- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs +++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs @@ -475,6 +475,7 @@ .AndIF(!string.IsNullOrWhiteSpace(inspectStatus), it => inspectStatus.Contains(it.InspectStatus)) .And(m => skuList.Contains(m.SkuNo)) .AndIF(type == "6", m => m.OwnerNo == ownerNo)//浠e偍鍑哄簱闇�瑕佸叧鑱旇揣涓� + .AndIF(type == "2", m=> string.IsNullOrWhiteSpace(m.OwnerNo)) .AndIF(!string.IsNullOrWhiteSpace(msg), it => (it.SkuNo.Contains(msg) || it.SkuName.Contains(msg) || it.LotNo.Contains(msg))) .And(it => (it.Qty - it.LockQty - it.FrozenQty) > 0) .And(it => (it.Status == "0" || it.Status == "1")) diff --git a/Wms/Wms/CreateBoxInfo.json b/Wms/Wms/CreateBoxInfo.json index fd5eb8f..861478d 100644 --- a/Wms/Wms/CreateBoxInfo.json +++ b/Wms/Wms/CreateBoxInfo.json @@ -1,15 +1,16 @@ [ { "OrderCode": "", //明细生产单据号 - "BoxNo": "B2408190001000005", //箱号 + "BoxNo": "B2408190001000001", //箱号 "BoxNo2": "", //盒号 - "BoxNo3": "Z24081900010009", //支号 + "BoxNo3": "Z24081900010001", //支号 "Qty": 1, //数量 "FullQty": 2, //满箱数量 "SkuNo": "00001", //物料编码 "SkuName": "测试物料1", //物料名称 "LotNo": "CPPC240818001", //批次 "LotText": "", //批次描述 + "SupplierLot":"GH240818001", "ProductionTime": "2024-08-19T02:16:45.301Z", //生产日期 "ExpirationTime": "2025-08-19T02:16:45.301Z", //过期日期 "InspectMark": "0", //检验/抽检 标记 0否 1是 @@ -23,15 +24,16 @@ }, { "OrderCode": "", //明细生产单据号 - "BoxNo": "B2408190001000005", //箱号 + "BoxNo": "B2408190001000001", //箱号 "BoxNo2": "", //盒号 - "BoxNo3": "Z24081900010010", //支号 + "BoxNo3": "Z24081900010002", //支号 "Qty": 1, //数量 "FullQty": 2, //满箱数量 "SkuNo": "00001", //物料编码 "SkuName": "测试物料1", //物料名称 "LotNo": "CPPC240818001", //批次 "LotText": "", //批次描述 + "SupplierLot":"GH240818001", "ProductionTime": "2024-08-19T02:16:45.301Z", //生产日期 "ExpirationTime": "2025-08-19T02:16:45.301Z", //过期日期 "InspectMark": "0", //检验/抽检 标记 0否 1是 -- Gitblit v1.8.0