| | |
| | | // btn: ['取消'] |
| | | }); |
| | | }); |
| | | //拆分标签 |
| | | $('#ChaiLabel').on('click', function () { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '拆分标签', |
| | | content: 'LabelChai.html', |
| | | maxmin: true, |
| | | area: ['430px', '290px'], |
| | | // btn: ['取消'] |
| | | }); |
| | | }); |
| | | $('#MergeLabel').on('click', function () { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '合并标签', |
| | | content: 'LabelMerge.html', |
| | | maxmin: true, |
| | | area: ['430px', '290px'], |
| | | // btn: ['取消'] |
| | | }); |
| | | }); |
| | | $("#AsnNoSelect").on('input', function () { |
| | | |
| | | if ($("#AsnNoSelect").val() == "" || $("#AsnNoSelect").val().length < 16) { |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>标签打印</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> |
| | | <style media="print"> |
| | | @page { |
| | | size: auto; |
| | | margin: 0 0 0 20px; |
| | | } |
| | | |
| | | .layui-input { |
| | | padding-left: 0px; |
| | | } |
| | | |
| | | .layui-form-item { |
| | | margin-bottom: 2px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .layui-form-item .layui-input-inline { |
| | | display: block; |
| | | float: none; |
| | | left: -3px; |
| | | width: auto; |
| | | margin: 0 0 10px 90px; |
| | | } |
| | | |
| | | .hideCls { |
| | | display: none; |
| | | } |
| | | |
| | | .showCls { |
| | | display: block; |
| | | } |
| | | |
| | | .font-size12 { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .font-size10 { |
| | | font-size: 10px; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div style="width:100%;"> |
| | | <div class="layui-form" style="padding: 30px 15px 0px; " id="button"> |
| | | <div class="layui-form-item" style="margin-bottom:0px;"> |
| | | <label class="layui-form-label" style="width: 60px;">箱码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="BoxCode" name="BoxCode" placeholder="箱码" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-bottom:0px;"> |
| | | <label class="layui-form-label" style="width: 60px;">拆分数量</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="number" id="ChaiQty" name="ChaiQty" placeholder="拆分数量" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-bottom:0px; text-align: center;"> |
| | | |
| | | <button id="btnChai" class="layui-btn layui-btn-edit" lay-event="Add"><i |
| | | class="layui-icon"></i>拆分</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../js/public.js"></script> |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script> |
| | | var boxcode = ""; |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'form', 'layer', 'laydate'], function () { |
| | | |
| | | var $ = layui.$, |
| | | form = layui.form, |
| | | layer = layui.layer; |
| | | var laydate = layui.laydate; |
| | | var indes = layer.index; |
| | | |
| | | var xun = 0; |
| | | |
| | | $('#btnChai').on('click', function () { |
| | | if ($("#BoxCode").val()=='' || $("#BoxCode").val() == undefined) { |
| | | layer.msg("请输入箱码!", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return -1; |
| | | } |
| | | if ($("#ChaiQty").val()=='' || $("#ChaiQty").val() == undefined || parseFloat($("#ChaiQty").val())<=0) { |
| | | layer.msg("请输入拆分数量!", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return -1; |
| | | } |
| | | var param = { |
| | | BoxNo: $("#BoxCode").val(), |
| | | ChaiQty:parseFloat($("#ChaiQty").val()), |
| | | }; |
| | | synData(IP + "/BllAsn/ChaiLableBox", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | parent.location.reload(); |
| | | parent.layer.close(layer.index); |
| | | }); |
| | | |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2500 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 获取传递参数 |
| | | function getQueryString(name) { |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) return unescape(r[2]); |
| | | return null; |
| | | } |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>标签打印</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> |
| | | <style media="print"> |
| | | @page { |
| | | size: auto; |
| | | margin: 0 0 0 20px; |
| | | } |
| | | |
| | | .layui-input { |
| | | padding-left: 0px; |
| | | } |
| | | |
| | | .layui-form-item { |
| | | margin-bottom: 2px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .layui-form-item .layui-input-inline { |
| | | display: block; |
| | | float: none; |
| | | left: -3px; |
| | | width: auto; |
| | | margin: 0 0 10px 90px; |
| | | } |
| | | |
| | | .hideCls { |
| | | display: none; |
| | | } |
| | | |
| | | .showCls { |
| | | display: block; |
| | | } |
| | | |
| | | .font-size12 { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .font-size10 { |
| | | font-size: 10px; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div style="width:100%;"> |
| | | <div class="layui-form" style="padding: 30px 15px 0px; " id="button"> |
| | | <div class="layui-form-item" style="margin-bottom:0px;"> |
| | | <label class="layui-form-label" style="width: 60px;">箱码1</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="BoxCode" name="BoxCode" placeholder="箱码1" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-bottom:0px;"> |
| | | <label class="layui-form-label" style="width: 60px;">箱码2</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="BoxCode2" name="BoxCode2" placeholder="箱码2" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-bottom:0px; text-align: center;"> |
| | | |
| | | <button id="btnMerge" class="layui-btn layui-btn-edit" lay-event="Add"><i |
| | | class="layui-icon"></i>合并</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../js/public.js"></script> |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script> |
| | | var boxcode = ""; |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'form', 'layer', 'laydate'], function () { |
| | | |
| | | var $ = layui.$, |
| | | form = layui.form, |
| | | layer = layui.layer; |
| | | var laydate = layui.laydate; |
| | | var indes = layer.index; |
| | | |
| | | var xun = 0; |
| | | |
| | | $('#btnMerge').on('click', function () { |
| | | if ($("#BoxCode").val() ==''|| $("#BoxCode").val() == undefined) { |
| | | layer.msg("请输入箱码1!", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return -1; |
| | | } |
| | | if ($("#BoxCode2").val()=='' || $("#BoxCode2").val() == undefined) { |
| | | layer.msg("请输入箱码2!", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return -1; |
| | | } |
| | | var param = { |
| | | BoxNo: $("#BoxCode").val(), |
| | | BoxNo2:$("#BoxCode2").val(), |
| | | }; |
| | | synData(IP + "/BllAsn/MergeLableBox", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | parent.location.reload(); |
| | | parent.layer.close(layer.index); |
| | | }); |
| | | |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2500 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 获取传递参数 |
| | | function getQueryString(name) { |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) return unescape(r[2]); |
| | | return null; |
| | | } |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | margin-bottom: 1px; |
| | | margin-right: 1px; |
| | | } |
| | | |
| | | .hideCls { |
| | | display: none; |
| | | } |
| | | |
| | | .showCls { |
| | | display: block; |
| | | } |
| | | </style> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs approvalBtnupt" id="approvalBtnupt" lay-event="edit"> |
| | | <i class="layui-icon layui-icon-edit"></i>详情 |
| | | </button> |
| | | |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs printBtnupt" id="printBtnupt" lay-event="print"> |
| | | <i class="layui-icon layui-icon-print"></i>补打 |
| | | </button> |
| | | </script> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form hideCls" lay-filter="layuiadmin-app-form-list" id="print" |
| | | style="width: 100%;height:100%;"> |
| | | <div style="display: flex;align-items: center;justify-content: center; height: 260px;"> |
| | | <table border="0" id="table" |
| | | style="width: 90%; height:240px;border-collapse: collapse;table-layout: fixed;border:none"> |
| | | <tr> |
| | | <td class="font-size12"> |
| | | 物料编号: |
| | | <table id="SkuNoP" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="font-size12"> |
| | | 物料名称: |
| | | <table id="SkuNameP" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="font-size12"> |
| | | 批次号: |
| | | <table id="LotNoP" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="font-size12"> |
| | | 生产日期: |
| | | <table id="ProductionTimeP" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="font-size12"> |
| | | 有效期: |
| | | <table id="ExpirationTimeP" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td style="padding: 5px 0px;"> |
| | | <img id="imgBar" style=" height: 60px;" /> |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | </div> |
| | | <div style="page-break-after: always;"></div> |
| | | </div> |
| | | <div class="layui-form hideCls" lay-filter="layuiadmin-app-form-list" id="print2" |
| | | style="width: 100%;height:100%;"></div> |
| | | </div> |
| | | |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../js/public.js"></script> |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script src="../../js/jquery.print.js"></script> |
| | | <script> |
| | | var uid = $.cookie('userId'); |
| | | layui.config({ |
| | |
| | | } |
| | | }); |
| | | } |
| | | //补打 |
| | | if (obj.event === 'print') { |
| | | var param1 = { |
| | | BoxNo: data.BoxNo, |
| | | }; |
| | | |
| | | synData(IP + "/Statistical/GetBuDaLabelList", param1, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | var labels = ""; |
| | | for (var z = 0; z < res.data.length; z++) { |
| | | var idd = ""; |
| | | if (z - 1 >= 0) { |
| | | idd = (z - 1).toString(); |
| | | } |
| | | $("#SkuNoP").attr("id", "SkuNoP" + z.toString()); |
| | | $("#SkuNoP" + z.toString()).html(res.data[z].SkuNo); |
| | | |
| | | $("#SkuNameP").attr("id", "SkuNameP" + z.toString()); |
| | | $("#SkuNameP" + z.toString()).html(res.data[z].SkuName); |
| | | |
| | | |
| | | $("#PackageStandardP").attr("id", "PackageStandardP" + z.toString()); |
| | | $("#PackageStandardP" + z.toString()).html(res.data[z].PackageStandard); |
| | | |
| | | $("#StandardP").attr("id", "StandardP" + z.toString()); |
| | | $("#StandardP" + z.toString()).html(res.data[z].Standard); |
| | | |
| | | $("#QtyP").attr("id", "QtyP" + z.toString()); |
| | | $("#QtyP" + z.toString()).html(res.data[z].Qty); |
| | | |
| | | $("#SupplierLotP").attr("id", "SupplierLotP" + z.toString()); |
| | | $("#SupplierLotP" + z.toString()).html(res.data[z].SupplierLot); |
| | | |
| | | $("#LotNoP").attr("id", "LotNoP" + z.toString()); |
| | | $("#LotNoP" + z.toString()).html(res.data[z].LotNo); |
| | | |
| | | $("#SupplierLotP").attr("id", "SupplierLotP" + z.toString()); |
| | | $("#SupplierLotP" + z.toString()).html(res.data[z].SupplierLot); |
| | | |
| | | $("#ExpirationTimeP").attr("id", "ExpirationTimeP" + z.toString()); |
| | | $("#ExpirationTimeP" + z.toString()).html(formatDate2(res.data[z].ExpirationTime)); |
| | | |
| | | |
| | | $("#ProductionTimeP").attr("id", "ProductionTimeP" + z.toString()); |
| | | $("#ProductionTimeP" + z.toString()).html(formatDate2(res.data[z].ProductionTime)); |
| | | |
| | | $("#imgBar").attr("id", "imgBar" + z.toString()); |
| | | $("#imgBar" + z.toString()).attr("src", res.data[z].ImgStr); |
| | | |
| | | |
| | | // console.log("#SkuNo"+z.toString()); |
| | | labels += $("#print").html(); |
| | | //console.log(labels); |
| | | $("#SkuNoP" + z.toString()).attr("id", "SkuNoP"); |
| | | $("#SkuNoP").html(""); |
| | | |
| | | $("#SkuNameP" + z.toString()).attr("id", "SkuNameP"); |
| | | $("#SkuNameP").html(""); |
| | | |
| | | $("#PackageStandardP" + z.toString()).attr("id", "PackageStandardP"); |
| | | $("#PackageStandardP").html(""); |
| | | |
| | | $("#QtyP" + z.toString()).attr("id", "QtyP"); |
| | | $("#QtyP").html(""); |
| | | |
| | | $("#StandardP" + z.toString()).attr("id", "StandardP"); |
| | | $("#StandardP").html(""); |
| | | |
| | | $("#LotNoP" + z.toString()).attr("id", "LotNoP"); |
| | | $("#LotNoP").html(""); |
| | | |
| | | $("#SupplierLotP" + z.toString()).attr("id", "SupplierLotP"); |
| | | $("#SupplierLotP").html(""); |
| | | |
| | | $("#StoreTimeP" + z.toString()).attr("id", "StoreTimeP"); |
| | | $("#StoreTimeP").html(""); |
| | | |
| | | $("#ExpirationTimeP" + z.toString()).attr("id", "ExpirationTimeP"); |
| | | $("#ExpirationTimeP").html(""); |
| | | |
| | | $("#imgBar" + z.toString()).attr("id", "imgBar"); |
| | | $("#imgBar").attr("src", ""); |
| | | } |
| | | // console.log(labels); |
| | | document.getElementById('print2').innerHTML = ""; |
| | | document.getElementById('print2').innerHTML = labels; |
| | | $("#print2").removeClass("hideCls"); |
| | | //$("#button").hide(); |
| | | $("#print2").print(); |
| | | //$("#button").show(); |
| | | $("#print2").addClass("hideCls"); |
| | | |
| | | // $("#LabelStream").val(""); |
| | | // $("#EndBoxCode").val(""); |
| | | // $("#LabelStream2").val(""); |
| | | // $("#EndBoxCode2").val(""); |
| | | |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | form.on('submit(daochu)', function () { |
| | |
| | | } |
| | | //标签信息 |
| | | var boxList = Db.Queryable<BllBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo).ToList(); |
| | | if (boxList.Count != 1) |
| | | if (boxList.Count < 1) |
| | | { |
| | | throw new Exception("该箱码信息错误,未查到此箱码信息"); |
| | | } |
| | | if (boxList.Count > 1) |
| | | { |
| | | throw new Exception("该箱码信息错误,存在多个此箱码信息"); |
| | | } |
| | |
| | | StoreTime = boxInfo.StoreTime, |
| | | ExpirationTime = boxInfo.ExpirationTime, |
| | | |
| | | Origin = "WMS", |
| | | Origin = "WMS生成", |
| | | CreateUser = userId, |
| | | CreateTime = DateTime.Now, |
| | | }; |
| | | Db.Insertable(boxModel).ExecuteCommand(); |
| | | |
| | | //添加操作日志 |
| | | new OperationASNServer().AddLogOperationAsn("入库作业", "物料标签", boxNo, "编辑", $"拆分了箱码{boxInfo}数量{chaiQty}到新箱码{boxNoNew}", userId); |
| | | new OperationASNServer().AddLogOperationAsn("入库作业", "物料标签", boxNo, "编辑", $"拆分了箱码{boxNo}数量{chaiQty}到新箱码{boxNoNew}", userId); |
| | | //提交事务 |
| | | Db.CommitTran(); |
| | | } |
| | |
| | | } |
| | | //标签信息 |
| | | var boxList = Db.Queryable<BllBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo).ToList(); |
| | | if (boxList.Count != 1) |
| | | if (boxList.Count < 1) |
| | | { |
| | | throw new Exception($"{boxNo}该箱码信息错误,未查到此箱码信息"); |
| | | } |
| | | if (boxList.Count > 1) |
| | | { |
| | | throw new Exception($"{boxNo}该箱码信息错误,存在多个此箱码信息"); |
| | | } |
| | |
| | | throw new Exception($"{boxNo}该箱码不是未组托状态,不允许合并!"); |
| | | } |
| | | var boxList2 = Db.Queryable<BllBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo2).ToList(); |
| | | if (boxList2.Count != 1) |
| | | if (boxList2.Count < 1) |
| | | { |
| | | throw new Exception($"{boxNo2}该箱码信息错误,未查到此箱码信息"); |
| | | } |
| | | if (boxList2.Count > 1) |
| | | { |
| | | throw new Exception($"{boxNo2}该箱码信息错误,存在多个此箱码信息"); |
| | | } |
| | |
| | | } |
| | | if (boxInfo.SkuNo != boxInfo2.SkuNo || boxInfo.LotNo != boxInfo2.LotNo) |
| | | { |
| | | throw new Exception($"两个箱码不是物料批次信息不一致,不允许合并!"); |
| | | throw new Exception($"两个箱码物料批次信息不一致,不允许合并!"); |
| | | } |
| | | if (boxInfo.ASNNo != boxInfo2.ASNNo || boxInfo.ASNDetailNo != boxInfo2.ASNDetailNo) |
| | | { |
| | | throw new Exception($"两个箱码不是所属入库单信息不一致,不允许合并!"); |
| | | throw new Exception($"两个箱码所属入库单信息不一致,不允许合并!"); |
| | | } |
| | | if (boxInfo.Qty + boxInfo2.Qty > boxInfo.FullQty) |
| | | { |
| | |
| | | { |
| | | throw new Exception("储位信息不存,请核查!"); |
| | | } |
| | | if (storageLocat.WareHouseNo != "W04") |
| | | { |
| | | throw new Exception("该储位不是平库储位,请检查!"); |
| | | } |
| | | if (storageLocat.Status != "0") |
| | | { |
| | | var detailInfo=Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == storageLocat.LocatNo); |
| | |
| | | { |
| | | throw new Exception("储位不是空闲状态,请核查!"); |
| | | } |
| | | var logIng = Db.Queryable<LogTask>().First(w => w.IsDel == "0" && w.EndLocat == storageLocat.LocatNo && w.Status == "1" && w.PalletNo != model.PalletNo); |
| | | if (logIng != null) |
| | | { |
| | | throw new Exception("该储位有正在执行的入库任务,请核查!"); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using Model.ModelDto; |
| | | using Model.ModelDto.DataDto; |
| | | using Model.ModelDto.SysDto; |
| | | using SqlSugar; |
| | | using Utility.Tools; |
| | | using WMS.DAL; |
| | | using WMS.Entity.BllAsnEntity; |
| | | using WMS.Entity.Context; |
| | | using WMS.Entity.DataEntity; |
| | | using WMS.Entity.SysEntity; |
| | | using WMS.IBLL.IDataServer; |
| | | |
| | | namespace WMS.BLL.DataServer |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region#补打标签 |
| | | /// <summary> |
| | | /// 补打库存明细箱码 |
| | | /// </summary> |
| | | /// <param name="boxNo"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public List<BoxInfoDto> GetBuDaLabelList(string boxNo) |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrWhiteSpace(boxNo)) |
| | | { |
| | | throw new Exception($"箱码不能为空"); |
| | | } |
| | | |
| | | //打印数据集合 |
| | | var printList = new List<BoxInfoDto>(); |
| | | |
| | | List<BoxInfoDto> printModelList = new List<BoxInfoDto>(); |
| | | |
| | | |
| | | var funSet = Db.Queryable<SysFunSetting>().First(m => m.IsDel == "0" && m.FunSetName == "物料码类型" && m.IsEnable == "NO"); |
| | | var allotSet = 1;//分配规则设定 |
| | | |
| | | if (funSet != null) |
| | | { |
| | | switch (funSet.SetValue) |
| | | { |
| | | case "One": |
| | | allotSet = 1;//一维条形码 |
| | | break; |
| | | case "Two": |
| | | allotSet = 2;//二维码 |
| | | break; |
| | | default: |
| | | allotSet = 1;// 默认:一维条形码、 |
| | | break; |
| | | } |
| | | } |
| | | #region 单个箱码标签 |
| | | |
| | | |
| | | var dataList = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == boxNo).ToList(); |
| | | var data = dataList.FirstOrDefault(); |
| | | if (data == null) |
| | | { |
| | | throw new Exception($"未查询到{boxNo}信息"); |
| | | } |
| | | //物料信息 |
| | | var skuInfo = Db.Queryable<SysMaterials>().First(w => w.IsDel == "0" && w.SkuNo == data.SkuNo); |
| | | if (skuInfo == null) |
| | | { |
| | | throw new Exception($"未查询到编码为{data.SkuNo}的物料信息"); |
| | | } |
| | | //包装信息 |
| | | var pack = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == skuInfo.PackagNo); |
| | | if (pack == null) |
| | | { |
| | | throw new Exception("未查询到当前单据中物料的包装信息"); |
| | | } |
| | | |
| | | var packStr = ""; |
| | | |
| | | if (!string.IsNullOrWhiteSpace(pack.L1Name)) |
| | | { |
| | | packStr += pack.L1Num + "/" + pack.L1Name; |
| | | } |
| | | if (!string.IsNullOrWhiteSpace(pack.L2Name)) |
| | | { |
| | | packStr += "-" + pack.L2Num + "/" + pack.L2Name; |
| | | } |
| | | if (!string.IsNullOrWhiteSpace(pack.L3Name)) |
| | | { |
| | | packStr += "-" + pack.L3Num + "/" + pack.L3Name; |
| | | } |
| | | if (!string.IsNullOrWhiteSpace(pack.L4Name)) |
| | | { |
| | | packStr += "-" + pack.L4Num + "/" + pack.L4Name; |
| | | } |
| | | if (!string.IsNullOrWhiteSpace(pack.L5Name)) |
| | | { |
| | | packStr += "-" + pack.L5Num + "/" + pack.L5Name; |
| | | } |
| | | // 物料条码信息赋值 |
| | | BoxInfoDto model = new BoxInfoDto(); |
| | | model.SkuNo = data.SkuNo; |
| | | model.SkuName = data.SkuName; |
| | | model.LotNo = data.LotNo; //批次 |
| | | model.SupplierLot = data.SupplierLot; // 原厂批号 |
| | | model.Standard = data.Standard; // 规格/型号 |
| | | model.PackageStandard = packStr; // 包装规格 |
| | | |
| | | model.ExpirationTime = data.ExpirationTime; // 有效期至 |
| | | model.StoreTime = null; // 储存期至 |
| | | model.ProductionTime = data.ProductionTime;//生产日期 |
| | | |
| | | model.Qty = dataList.Sum(m => m.Qty);// 数量 |
| | | |
| | | model.BoxNo = data.BoxNo; // 箱号 |
| | | |
| | | model.ImgStr = allotSet == 1 ? BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false) : BarcodeHelper.GetQrCodeBase64(model.BoxNo, 85, 85); |
| | | |
| | | // 添加到list集合 |
| | | printModelList.Add(model); |
| | | |
| | | //添加打印记录 |
| | | //WmsLabelPrintLog log = new WmsLabelPrintLog(); |
| | | //log.BoxCode = data.LabelStream; |
| | | //log.CreateTime = DateTime.Now; |
| | | //log.Demo = Demo; |
| | | //log.Isdel = 0; |
| | | //log.CreateUser = userId; |
| | | //printlog.Add(log); |
| | | #endregion |
| | | |
| | | return printModelList; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 废代码 仅供参考 |
| | | |
| | | ////获取分组后的箱码明细 |
| | |
| | | //} |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using Model.ModelDto; |
| | | using Model.ModelDto.DataDto; |
| | | using WMS.Entity.DataEntity; |
| | | |
| | |
| | | /// <returns></returns> |
| | | List<DataBoxInfo> GetDataBoxInfoDaoChu(string id, string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitBoxMark, string inspectStatus); |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 补打库存明细箱码 |
| | | /// </summary> |
| | | /// <param name="boxNo"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | List<BoxInfoDto> GetBuDaLabelList(string boxNo); |
| | | } |
| | | } |
| | |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.SysDto; |
| | | using WMS.BLL.LogServer; |
| | | using Model.ModelVm.BllTaskVm; |
| | | using Model.ModelVm; |
| | | |
| | | namespace Wms.Controllers |
| | | { |
| | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region#补打标签 |
| | | /// <summary> |
| | | /// 补打库存明细箱码 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetBuDaLabelList(BuDaLabelBoxVm model) |
| | | { |
| | | try |
| | | { |
| | | var list = _dataBoxInfo.GetBuDaLabelList(model.BoxNo); |
| | | return Ok(new { code = 0, msg = "获取补打箱码标签信息", data = list }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, count = 0, msg = e.Message }); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |