HTML/views/ASNSetting/ArrivalNotice.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HTML/views/ASNSetting/LabelPrintSelect.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HTML/views/ASNSetting/ArrivalNotice.html
@@ -310,9 +310,13 @@ html = `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del"> <i class="layui-icon layui-icon-delete"></i>删除</a>`; } if((d.AsnType =="1" || d.AsnType == "4") && (d.Status == "0" || d.Status == "1")){ if(d.AsnType =="1" && (d.Status == "0" || d.Status == "1")){ html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel"> <i class="layui-icon layui-icon-edit"></i>生成标签</a>`; } if(d.AsnType == "4"&& (d.Status == "0" || d.Status == "1")){ html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel2"> <i class="layui-icon layui-icon-edit"></i>生成标签</a>`; } return html; } @@ -1220,6 +1224,43 @@ }); break; case "Addlabel2" : layer.open({ type: 2, title: '生成标签', content: 'LabelPrintSelect.html?Id='+id+'&Type=4', maxmin: true, area: ['480px', '615px'], btn: ['确定','取消'], yes: function(index, layero){ var iframeWindow = window['layui-layer-iframe'+ index] ,submitID = 'layuiadmin-app-form-edit' ,submit = layero.find('iframe').contents().find('#'+ submitID); //监听提交 iframeWindow.layui.form.on('submit('+ submitID +')', function(data){ var field = data.field; //获取提交的字段 console.log(field); //提交 Ajax 成功后,静态更新表格中的数据 //"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+ var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty+"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime+"&StoreTime="+field.storeTime; layer.open({ type: 2, title: '生成标签', content: 'LabelPrint.html?'+str, maxmin: true, area: ['660px', '660px'], btn: ['取消'], }); }); submit.trigger('click'); } }); break; default:break; } }); HTML/views/ASNSetting/LabelPrintSelect.html
@@ -116,7 +116,16 @@ }); var id = getQueryString('Id'); var asnType = getQueryString('Type'); console.log(asnType); console.log(asnType == 4); if(asnType == 4){ $("#reset option[value='0']").attr("selected","selected"); //性别 $("#reset").attr("disabled","disabled"); form.render('select'); } var param = { id: parseInt(id), }; Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
@@ -618,7 +618,7 @@ { throw new Exception("到货数量不能小于0!"); } Db.BeginTran(); if (packLevel == 1) { #region 一级包装 @@ -664,17 +664,31 @@ if (isReset == "0") { var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList(); if (labelCount.Count <=0) //判断单据是否是余料退回单 if (asn.Type == "4") { throw new Exception("当前单据明细还未生成标签,请选择重置批次选项为‘是’;"); maxLotNoStr = asnList.LotNo; maxBoxCode = label.Where(m=>m.LotNo == maxLotNoStr).Max(a => a.BoxNo); if (string.IsNullOrWhiteSpace(maxLotNoStr)) { throw new Exception("车间余料退回单据批次不能为空"); } } maxLotNoStr = label.Max(a => a.LotNo); maxBoxCode = label.Max(a => a.BoxNo); if (string.IsNullOrWhiteSpace(maxLotNoStr)) else { maxLotNoStr = toDayTime.Substring(2, 6) + "0001"; var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList(); if (labelCount.Count <= 0) { throw new Exception("当前单据明细还未生成标签,请选择重置批次选项为‘是’;"); } maxLotNoStr = label.Max(a => a.LotNo); maxBoxCode = label.Max(a => a.BoxNo); if (string.IsNullOrWhiteSpace(maxLotNoStr)) { maxLotNoStr = toDayTime.Substring(2, 6) + "0001"; } } } else { @@ -814,21 +828,33 @@ string toDayTime2 = DateTime.Now.ToString("yyyyMMdd"); if (isReset == "0") { var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList(); if (labelCount.Count <= 0) //判断单据是否是余料退回单 if (asn.Type == "4") { throw new Exception("当前单据明细还未生成标签,请选择重置批次选项为‘是’;"); maxCodestr2 = asnList.LotNo; maxboxcode2 = label.Where(m => m.LotNo == maxCodestr2).Max(a => a.BoxNo); maxboxcode3 = label.Where(m => m.LotNo == maxCodestr2).Max(a => a.BoxNo3);//支号 if (string.IsNullOrWhiteSpace(maxCodestr2)) { throw new Exception("车间余料退回单据批次不能为空"); } } var maxCode = label.Max(a => a.LotNo); var boxCode1 = label.Max(a => a.BoxNo);//箱号 var boxCode2 = label.Max(a => a.BoxNo3);//支号 maxCodestr2 = maxCode; maxboxcode2 = boxCode1; maxboxcode3 = boxCode2; if (string.IsNullOrWhiteSpace(maxCodestr2)) else { maxCodestr2 = toDayTime2.Substring(2, 6) + "0001"; var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList(); if (labelCount.Count <= 0) { throw new Exception("当前单据明细还未生成标签,请选择重置批次选项为‘是’;"); } maxCodestr2 = label.Max(a => a.LotNo); ; maxboxcode2 = label.Max(a => a.BoxNo);//箱号; maxboxcode3 = label.Max(a => a.BoxNo3);//支号; if (string.IsNullOrWhiteSpace(maxCodestr2)) { maxCodestr2 = toDayTime2.Substring(2, 6) + "0001"; } } } else { @@ -988,7 +1014,7 @@ Db.Updateable(asnList).ExecuteCommand(); } } Db.CommitTran(); return modelList; @@ -996,6 +1022,7 @@ } catch (Exception e) { Db.RollbackTran(); throw new Exception(e.Message); } } Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -1916,6 +1916,7 @@ throw new Exception("-1:当前托盘正在执行中,绑定失败,请核实!"); } bindId = bind.Id; bind.Qty += model.SkuQty; } #region 箱码信息 @@ -1950,6 +1951,7 @@ // 更改箱支关系表 decimal factQty = 0.00m;//托盘总数量 //成品组托 if (model.SkuQty == 0) { var boxGroup = boxInfoList.GroupBy(m => m.BoxNo).ToList(); @@ -2009,7 +2011,7 @@ var sqlString = string.Empty; if (factQty == 0) { sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{bind.Qty}' where id = '{model.AsnDetailId}';"; sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{model.SkuQty}' where id = '{model.AsnDetailId}';"; } else {