| | |
| | | //明细表操作栏事件 |
| | | table.on('tool(LAY-app-content-list2)', function (obj) { |
| | | var data = obj.data; |
| | | var lotno = data.LotNo; |
| | | |
| | | var id = data.Id; |
| | | switch(obj.event) |
| | | { |
| | |
| | | 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 |
| | |
| | | { |
| | | if (!TypeLot.Contains(model.Type)) |
| | | { |
| | | if (detailModel.LotNo.Length != 10) |
| | | if (detailModel.LotNo.Length != 12 && detailModel.LotNo.Length != 11 && detailModel.LotNo.Length != 10) |
| | | { |
| | | strMessage = "-1:进厂编号位数长度有误;"; |
| | | continue; |
| | |
| | | { |
| | | throw new Exception("未查询到单据明细信息"); |
| | | } |
| | | if (asnList.LotNo.Length != 10) |
| | | if (asnList.LotNo.Length != 10 && asnList.LotNo.Length != 11 && asnList.LotNo.Length != 12) |
| | | { |
| | | throw new Exception("单据进厂编号位数长度错误"); |
| | | } |
| | |
| | | var timeStr = toDayTime.Substring(2, 6); |
| | | if (lotStr == timeStr) |
| | | { |
| | | maxLotNoStr = toDayTime.Substring(2, 6) + (int.Parse(maxCode.Substring(6, 4)) + 1).ToString().PadLeft(4, '0'); |
| | | maxLotNoStr = toDayTime.Substring(2, 6) + (int.Parse(maxCode.Substring(maxCode.Length - 4, 4)) + 1).ToString().PadLeft(4, '0'); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | maxBoxCode = maxBoxCode.Substring(0, 11) + (int.Parse(maxBoxCode.Substring(11, 6)) + 1).ToString().PadLeft(6, '0'); |
| | | maxBoxCode = maxBoxCode.Substring(0, maxBoxCode.Length - 6) + (int.Parse(maxBoxCode.Substring(maxBoxCode.Length - 6, 6)) + 1).ToString().PadLeft(6, '0'); |
| | | } |
| | | |
| | | // 将条码保存到原料条码表 |
| | |
| | | } |
| | | else |
| | | { |
| | | maxboxcode2 = maxboxcode2.Substring(0, 11) + (int.Parse(maxboxcode2.Substring(11, 6)) + 1).ToString().PadLeft(6, '0'); |
| | | maxboxcode2 = maxboxcode2.Substring(0, maxboxcode2.Length - 6) + (int.Parse(maxboxcode2.Substring(maxboxcode2.Length-6, 6)) + 1).ToString().PadLeft(6, '0'); |
| | | } |
| | | //获取箱内支标签数量 |
| | | if (i == labelNum2) |
| | |
| | | } |
| | | else |
| | | { |
| | | maxboxcode3 = maxboxcode3.Substring(0, 11) + (int.Parse(maxboxcode3.Substring(11, 4)) + 1).ToString().PadLeft(4, '0'); |
| | | maxboxcode3 = maxboxcode3.Substring(0, maxboxcode3.Length - 4) + (int.Parse(maxboxcode3.Substring(maxboxcode3.Length - 4, 4)) + 1).ToString().PadLeft(4, '0'); |
| | | } |
| | | |
| | | //var ssss = d.ToString("0"); |