Merge branch 'master' into csc
| | |
| | | /Wms/Wms/Logs |
| | | /数据文档/JC26表结构文档.xlsx |
| | | /Wms/Wms/wwwRoot/uploads/quality |
| | | /Wms/Wms/appsettings.json |
| | |
| | | } |
| | | console.log(TypeNum) |
| | | |
| | | if (TypeNum == 0) { |
| | | layer.msg("请输入批次!", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return -1; |
| | | } |
| | | // if (TypeNum == 0) { |
| | | // layer.msg("请输入批次!", { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }); |
| | | // return -1; |
| | | // } |
| | | |
| | | } |
| | | |
| | |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-normal buDaLabelClass" style="margin-left: 5px;" lay-event="BuDaLabel" id="BuDaLabel"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-normal buDaLabelClass" |
| | | style="margin-left: 5px;" lay-event="BuDaLabel" id="BuDaLabel"> |
| | | <i class="layui-icon layui-icon-print layuiadmin-button-btn"></i>补打标签 |
| | | </button> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-danger delLabelClass" style="margin-left: 5px;" lay-event="delLabel" id="delLabel"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-danger delLabelClass" |
| | | style="margin-left: 5px;" lay-event="delLabel" id="delLabel"> |
| | | <i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除标签 |
| | | </button> |
| | | <!-- <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-normal " style="margin-left: 5px;" lay-event="ceshiLabel" id="ceshiLabel"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">入库单据</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <input type="text" id="AsnNoSelect" name="AsnNoSelect" placeholder="入库单据" autocomplete="off" class="layui-input"> |
| | | |
| | | <input type="text" id="AsnNoSelect" name="AsnNoSelect" placeholder="入库单据" |
| | | autocomplete="off" class="layui-input"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline DivLoadingArea" style="margin-top: 10px;"> |
| | | <label class="layui-form-label">批次号</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <select name="LotNoSelect" id="LotNoSelect" lay-search> |
| | | <option value=""></option> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-card-body"> |
| | | <div class="position-relative"> |
| | | <table id="Box-list" lay-filter="Box-list"></table> |
| | | |
| | |
| | | }} |
| | | {{ GetBtn10(d) }} |
| | | </script> |
| | | |
| | | |
| | | |
| | | |
| | | <script type="text/html" id="templetCreateTime"> |
| | |
| | | content: 'LabelBoxCeShiPrint.html', |
| | | maxmin: true, |
| | | area: ['430px', '390px'], |
| | | |
| | | |
| | | }); |
| | | }); |
| | | |
| | |
| | | |
| | | //生成 |
| | | $('#BuDaLabel').on('click', function () { |
| | | layer.open({ |
| | | layer.open({ |
| | | type: 2, |
| | | title: '打印', |
| | | content: 'LabelBoxBuDa.html', |
| | |
| | | area: ['430px', '390px'], |
| | | // btn: ['取消'] |
| | | }); |
| | | }); |
| | | }); |
| | | $("#AsnNoSelect").on('input', function () { |
| | | |
| | | if ($("#AsnNoSelect").val() == "" || $("#AsnNoSelect").val().length < 16) { |
| | |
| | | function GetLotNoByAsnNo() { |
| | | |
| | | $("#LotNoSelect").empty() |
| | | $("#LotNoSelect").append('<option value =>' + '</option>'); |
| | | $("#LotNoSelect").append('<option value =>' + '</option>'); |
| | | form.render('select'); |
| | | var param = { |
| | | asnNo: $("#AsnNoSelect").val(), |
| | | }; |
| | | sendData(IP + "/BllAsn/GetLotNoListByAsn", param, 'get', function(res) { |
| | | sendData(IP + "/BllAsn/GetLotNoListByAsn", param, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#LotNoSelect").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); |
| | | } |
| | | } |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 3000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | |
| | | }, function () { |
| | | |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //删除标签 |
| | | //删除标签 |
| | | $('#delLabel').on('click', function () { |
| | | |
| | | layer.open({ |
| | |
| | | title: '删除标签', |
| | | content: $('#divDelLotNo'), |
| | | maxmin: false, |
| | | area: ['350px','340px'], |
| | | area: ['350px', '340px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function(index, layero) { |
| | | yes: function (index, layero) { |
| | | var param = { |
| | | AsnNo: $('#AsnNoSelect').val(), |
| | | LotNo: $('#LotNoSelect').val(), |
| | | }; |
| | | sendData(IP + "/BllAsn/DelLabelByAsnNo", param, 'post', function(res) { |
| | | sendData(IP + "/BllAsn/DelLabelByAsnNo", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | bindTable(); |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 1500 //1秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | }, function () { |
| | | $('#AsnNoSelect').val(""); |
| | | $("#LotNoSelect").empty() |
| | | $("#LotNoSelect").append('<option value =>' + '</option>'); |
| | |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 3000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | }, function () { |
| | | bindTable(); |
| | | $('#AsnNoSelect').val(""); |
| | | $("#LotNoSelect").empty() |
| | |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | |
| | | // // 删除箱支信息 |
| | |
| | | //#region 自定义表头 |
| | | var TotalColsArr = [[ |
| | | |
| | | { field: 'ASNNo', title: '入库单号', align: 'center',fixed: 'left', width: 180, "disabled": true }, |
| | | { field: 'ASNNo', title: '入库单号', align: 'center', fixed: 'left', width: 180, "disabled": true }, |
| | | { field: 'BoxNo', title: '箱号', align: 'center', fixed: 'left', width: 220, "disabled": true }, |
| | | { field: 'BoxNo2', title: '盒号', align: 'center', fixed: 'left', width: 220, }, |
| | | { field: 'BoxNo3', title: '支号', align: 'center', fixed: 'left', width: 220, "disabled": true }, |
| | | { field: 'BoxNo2', title: '盒号', align: 'center', fixed: 'left', width: 220, }, |
| | | { field: 'BoxNo3', title: '支号', align: 'center', fixed: 'left', width: 220, }, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', fixed: 'left', width: 140, "disabled": true }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center', width: 240, }, |
| | | { field: 'Qty', title: '数量', align: 'center', width: 100, }, |
| | |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 165 }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 155 }, |
| | | { field: 'Status', title: '状态', align: 'center', templet: '#templetStatus', width: 90 }, |
| | | |
| | | |
| | | { field: 'Standard', title: '规格/型号', align: 'center', width: 165 }, |
| | | { field: 'PackageStandard', title: '包装规格', align: 'center', width: 165 }, |
| | | |
| | | { field: 'ProductionTime', title: '生产日期', align: 'center', width: 160, templet: '#templetProductionTime' }, |
| | | { field: 'ExpirationTime', title: '过期日期', align: 'center', width: 160, templet: '#templetExpirationTime' }, |
| | | { field: 'StoreTime', title: '储存期至', align: 'center', width: 160, templet: '#templetStoreTime' }, |
| | | { field: 'CompleteTime', title: '完成日期', align: 'center', width: 160, templet: '#templetCompleteTime' }, |
| | | { field: 'CompleteTime', title: '完成日期', align: 'center', width: 160, templet: '#templetCompleteTime' }, |
| | | |
| | | {field: 'InspectMark',title: '抽检标记',align: 'center',templet: '#templetInspectMark',width: 90}, |
| | | {field: 'BitBoxMark',title: '零箱标记',align: 'center',templet: '#templetBitBoxMark',width: 90}, |
| | | {field: 'Origin',title: '来源',align: 'center',width: 90}, |
| | | { field: 'InspectMark', title: '抽检标记', align: 'center', templet: '#templetInspectMark', width: 90 }, |
| | | { field: 'BitBoxMark', title: '零箱标记', align: 'center', templet: '#templetBitBoxMark', width: 90 }, |
| | | { field: 'Origin', title: '来源', align: 'center', width: 90 }, |
| | | |
| | | { field: 'CreateUserName', title: '创建人', align: 'center', width: 100 }, |
| | | { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#templetCreateTime' }, |
| | |
| | | colsJson = TotalColsArr |
| | | } |
| | | var param = { |
| | | AsnNo:$("#ASNNo").val(), |
| | | AsnNo: $("#ASNNo").val(), |
| | | BoxNo: $("#BoxNo").val(), |
| | | Status: $("#Status").val(), |
| | | SkuNo: $("#SkuNo").val(), |
| | | LotNo: $("#LotNo").val(), |
| | | LotNo: $("#LotNo").val(), |
| | | ProductionTime: $("#ProductionTime").val(), |
| | | SupplierLot: $("#SupplierLot").val(), |
| | | SupplierLot: $("#SupplierLot").val(), |
| | | }; |
| | | table.render({ |
| | | elem: '#Box-list', |
| | |
| | | // 权限设置 |
| | | function setRight() { |
| | | $(function () { |
| | | $(".buDaLabelClass").hide(); |
| | | $(".delLabelClass").hide(); |
| | | $(".buDaLabelClass").hide(); |
| | | $(".delLabelClass").hide(); |
| | | }); |
| | | sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | |
| | | $(function () { |
| | | $(".buDaLabelClass").show(); |
| | | }); |
| | | } |
| | | } |
| | | if (res.data[k].MenuName == "删除标签") { |
| | | $(function () { |
| | | $(".delLabelClass").show(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } else { //不成功 |
| | | layer.msg('获取权限信息失败', { |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | //#region 自定义表头 |
| | | //自定义表头 |
| | | active = { |
| | |
| | | .showCls { |
| | | display: block; |
| | | } |
| | | .font-size12{ |
| | | font-size: 12px; |
| | | |
| | | .font-size12 { |
| | | font-size: 14px; |
| | | } |
| | | .font-size10{ |
| | | |
| | | .font-size10 { |
| | | font-size: 10px; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <body> |
| | | <div style="width:100%;"> |
| | | <div class="layui-form hideCls" lay-filter="layuiadmin-app-form-list" id="print" style="width: 100%;height:100%;"> |
| | | <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="1" id="table" style="width: 90%; height:240px; text-align: center;border-collapse: collapse;table-layout: fixed;"> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <img src="../../img/LiNuo.jpg" style="width: 80%; height: 15px;" /> |
| | | <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="SkuNo" class="font-size12"></table> |
| | | </td> |
| | | <td colspan="2" style="padding: 1px 0px;" class="font-size12">SMP-ST002-R08-01</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="4" class="font-size12">物料标签</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="font-size12">品名</td> |
| | | <td colspan="3" id="SkuName" class="font-size10"></td> |
| | | <td class="font-size12"> |
| | | 物料名称: |
| | | <table id="SkuName" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="font-size12">规格/型号</td> |
| | | <td id="Standard" class="font-size10"></td> |
| | | <td class="font-size12">包装规格</td> |
| | | <td id="PackageStandard" class="font-size10"></td> |
| | | <td class="font-size12"> |
| | | 批次号: |
| | | <table id="LotNo" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="font-size12">进厂编号</td> |
| | | <td id="LotNo" class="font-size10"></td> |
| | | <td class="font-size12">物料代码</td> |
| | | <td id="SkuNo" class="font-size10"></td> |
| | | <td class="font-size12"> |
| | | 生产日期: |
| | | <table id="ProductionTime" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="font-size12">原厂批号</td> |
| | | <td id="SupplierLot" class="font-size10"></td> |
| | | <td class="font-size12">数 量</td> |
| | | <td id="Qty" class="font-size10"></td> |
| | | <td class="font-size12"> |
| | | 有效期: |
| | | <table id="ExpirationTime" class="font-size12"></table> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td class="font-size12">有效期至</td> |
| | | <td id="ExpirationTime" class="font-size10"></td> |
| | | <td class="font-size12">储存期至</td> |
| | | <td id="StoreTime" class="font-size10"></td> |
| | | <td style="padding: 5px 0px;"> |
| | | <img id="imgBar" style=" height: 60px;" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="4" style="padding: 5px 0px;"> |
| | | <img id="imgBar" style=" height: 35px;" /> |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | |
| | | </table> |
| | | </div> |
| | | <div style="page-break-after: always;"></div> |
| | | </div> |
| | |
| | | class="layui-input" readonly> |
| | | </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"> |
| | |
| | | // console.log(z); |
| | | $("#SkuNo").attr("id", "SkuNo" + z.toString()); |
| | | $("#SkuNo" + z.toString()).html(res.data[z].SkuNo); |
| | | |
| | | $("#SkuName").attr("id", "SkuName" + z.toString()); |
| | | $("#SkuName" + z.toString()).html( res.data[z].SkuName); |
| | | |
| | | |
| | | $("#SkuName").attr("id", "SkuName" + z.toString()); |
| | | $("#SkuName" + z.toString()).html(res.data[z].SkuName); |
| | | |
| | | |
| | | $("#PackageStandard").attr("id", "PackageStandard" + z.toString()); |
| | | $("#PackageStandard" + z.toString()).html(res.data[z].PackageStandard); |
| | | |
| | |
| | | $("#Standard" + z.toString()).html(res.data[z].Standard); |
| | | |
| | | $("#Qty").attr("id", "Qty" + z.toString()); |
| | | $("#Qty" + z.toString()).html( res.data[z].Qty); |
| | | $("#Qty" + z.toString()).html(res.data[z].Qty); |
| | | |
| | | $("#SupplierLot").attr("id", "SupplierLot" + z.toString()); |
| | | $("#SupplierLot" + z.toString()).html( res.data[z].SupplierLot); |
| | | $("#SupplierLot" + z.toString()).html(res.data[z].SupplierLot); |
| | | |
| | | $("#LotNo").attr("id", "LotNo" + z.toString()); |
| | | $("#LotNo" + z.toString()).html( res.data[z].LotNo); |
| | | $("#LotNo" + z.toString()).html(res.data[z].LotNo); |
| | | |
| | | $("#SupplierLot").attr("id", "SupplierLot" + z.toString()); |
| | | $("#SupplierLot" + z.toString()).html( res.data[z].SupplierLot); |
| | | $("#SupplierLot" + z.toString()).html(res.data[z].SupplierLot); |
| | | |
| | | $("#ExpirationTime").attr("id", "ExpirationTime" + z.toString()); |
| | | $("#ExpirationTime" + z.toString()).html( formatDate2(res.data[z].ExpirationTime)); |
| | | $("#ExpirationTime" + z.toString()).html(formatDate2(res.data[z].ExpirationTime)); |
| | | |
| | | |
| | | $("#StoreTime").attr("id", "StoreTime" + z.toString()); |
| | | $("#StoreTime" + z.toString()).html(formatDate2(res.data[z].StoreTime)); |
| | | |
| | | |
| | | $("#ProductionTime").attr("id", "ProductionTime" + z.toString()); |
| | | $("#ProductionTime" + z.toString()).html(formatDate2(res.data[z].ProductionTime)); |
| | | |
| | | $("#imgBar").attr("id", "imgBar" + z.toString()); |
| | | $("#imgBar" + z.toString()).attr("src", res.data[z].ImgStr); |
| | | |
| | |
| | | }); |
| | | |
| | | var id = getQueryString('Id'); |
| | | var SupplierLot=getQueryString('SupplierLot');//供货批次 |
| | | $('#SupplierLot').val(SupplierLot); |
| | | if(SupplierLot!='' && SupplierLot!=null &&SupplierLot!=undefined){ |
| | | $('#SupplierLot').attr('readonly', 'readonly'); |
| | | } |
| | | // var SupplierLot=getQueryString('SupplierLot');//供货批次 |
| | | // $('#SupplierLot').val(SupplierLot); |
| | | // if(SupplierLot!='' && SupplierLot!=null &&SupplierLot!=undefined){ |
| | | // $('#SupplierLot').attr('readonly', 'readonly'); |
| | | // } |
| | | var asnType = getQueryString('Type'); |
| | | console.log(asnType); |
| | | // console.log(asnType == 4); |
| | |
| | | |
| | | synData(IP + "/BllAsn/GetAsnDetailQtyList", param , 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | $("#arriveQty").val(res.data); |
| | | $("#arriveQty").val(res.data.Qty); |
| | | $("#productionTime").val(res.data.ProductionTime); |
| | | $("#expirationTime").val(res.data.ExpirationTime); |
| | | $("#storeTime").val(res.data.StoreTime); |
| | | $("#SupplierLot").val(res.data.SupplierLot); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | |
| | | <!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"> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | | document.addEventListener("DOMContentLoaded", function() { |
| | | |
| | | //获取table默认显示数 |
| | | pageCntFirst(); |
| | | }); |
| | | </script> |
| | | </head> |
| | | <body id="body"> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" id="top"> |
| | | <div class="layui-form-item"> |
| | | <!-- 物料编码 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料编码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="SkuNo" name="SkuNo" placeholder="请输入物料编码" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <!-- 物料名称 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料名称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="SkuName" name="SkuName" placeholder="请输入物料名称" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!-- 审核状态 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">审核状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="AuditStatusNo" id="AuditStatusNo" lay-verify=""> |
| | | <option value=""></option> |
| | | <option value="0">待审核</option> |
| | | <option value="9">已通过</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!-- 类型 --> |
| | | <label class="layui-form-label" style="width: 60px;">类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">原料</option> |
| | | <option value="1">包材</option> |
| | | <option value="2">成品</option> |
| | | <option value="3">耗材</option> |
| | | <option value="4">中间品</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 是否受控 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">是否受控</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="IsControlled" id="IsControlled" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">受控</option> |
| | | <option value="1">非受控</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 是否免检 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">是否免检</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="IsInspect" id="IsInspect" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 存储环境 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">存储环境</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Environment" id="Environment" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">常温</option> |
| | | <option value="1">低温</option> |
| | | <!-- <option value="3">干燥通风</option> --> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!-- 物料类别 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料类别</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="CategoryNo" id="CategoryNo" lay-verify=""> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list approvalBtn" style="margin-right: 10px;" data-type="add" id="approvalBtn"> |
| | | <i class="layui-icon layuiadmin-button-btn"></i>添加 |
| | | </button> |
| | | |
| | | <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"> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | | document.addEventListener("DOMContentLoaded", function () { |
| | | |
| | | //获取table默认显示数 |
| | | pageCntFirst(); |
| | | }); |
| | | </script> |
| | | </head> |
| | | |
| | | <body id="body"> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" |
| | | id="top"> |
| | | <div class="layui-form-item"> |
| | | <!-- 物料编码 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料编码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="SkuNo" name="SkuNo" placeholder="请输入物料编码" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <!-- 物料名称 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料名称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="SkuName" name="SkuName" placeholder="请输入物料名称" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!-- 审核状态 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">审核状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="AuditStatusNo" id="AuditStatusNo" lay-verify=""> |
| | | <option value=""></option> |
| | | <option value="0">待审核</option> |
| | | <option value="9">已通过</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!-- 类型 --> |
| | | <label class="layui-form-label" style="width: 60px;">类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">原料</option> |
| | | <option value="1">包材</option> |
| | | <option value="2">成品</option> |
| | | <option value="3">耗材</option> |
| | | <option value="4">中间品</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 是否受控 JC34 变更为 是否请验 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">是否请验</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="IsControlled" id="IsControlled" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">是</option> |
| | | <option value="1">否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 是否免检 JC34 变更为 是否受控--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">是否受控</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="IsInspect" id="IsInspect" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">是</option> |
| | | <option value="1">否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 存储环境 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">存储环境</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Environment" id="Environment" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">常温</option> |
| | | <option value="1">低温</option> |
| | | <!-- <option value="3">干燥通风</option> --> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!-- 物料类别 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料类别</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="CategoryNo" id="CategoryNo" lay-verify=""> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list approvalBtn" |
| | | style="margin-right: 10px;" data-type="add" id="approvalBtn"> |
| | | <i class="layui-icon layuiadmin-button-btn"></i>添加 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="center"></div> |
| | | <div id="center"></div> |
| | | |
| | | <div class="layui-card-body"> |
| | | <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> |
| | | |
| | | <!-- 审核状态 --> |
| | | <!-- <script type="text/html" id="buttonAuditStatusNo"> |
| | | <div class="layui-card-body"> |
| | | <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> |
| | | |
| | | <!-- 审核状态 --> |
| | | <!-- <script type="text/html" id="buttonAuditStatusNo"> |
| | | {{# if(d.AuditStatusNo=='0'){ }} |
| | | <button class="layui-btn layui-btn-radius layui-btn-xs" style="background-color:RED;">待审核</button> |
| | | {{# } else if(d.AuditStatusNo=='9') { }} |
| | |
| | | <button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs" style="background-color: blue;">其它</button> |
| | | {{# } }} |
| | | </script> --> |
| | | <!-- 类型 --> |
| | | <script type="text/html" id="buttonType"> |
| | | <!-- 类型 --> |
| | | <script type="text/html" id="buttonType"> |
| | | {{# if(d.Type=='0'){ }} |
| | | <p>原料</p> |
| | | {{# } else if(d.Type=='1') { }} |
| | |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <!-- 是否受控 --> |
| | | <script type="text/html" id="buttonIsControlled"> |
| | | <!-- 是否受控 --> |
| | | <script type="text/html" id="buttonIsControlled"> |
| | | {{# if(d.IsControlled=='0'){ }} |
| | | <p>受控</p> |
| | | {{# } else if(d.IsControlled=='1') { }} |
| | | <p>非受控</p> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <!-- 是否免检 --> |
| | | <script type="text/html" id="buttonIsInspect"> |
| | | |
| | | <!-- 是否免检 --> |
| | | <script type="text/html" id="buttonIsInspect"> |
| | | {{# if(d.IsInspect=='0'){ }} |
| | | <p>否</p> |
| | | {{# } else if(d.IsInspect=='1') { }} |
| | | <p>是</p> |
| | | {{# } }} |
| | | </script> |
| | | <!-- 是否贴标 --> |
| | | <script type="text/html" id="buttonIsPasteCode"> |
| | | <!-- 是否贴标 --> |
| | | <script type="text/html" id="buttonIsPasteCode"> |
| | | {{# if(d.IsPasteCode=='0'){ }} |
| | | <p>否</p> |
| | | {{# } else if(d.IsPasteCode=='1') { }} |
| | |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <!-- 存储环境 --> |
| | | <script type="text/html" id="buttonEnvironment"> |
| | | <!-- 存储环境 --> |
| | | <script type="text/html" id="buttonEnvironment"> |
| | | {{# if(d.Environment=='0'){ }} |
| | | <p>常温</p> |
| | | {{# } else if(d.Environment=='1') { }} |
| | |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="table-content-list"> |
| | | <script type="text/html" id="table-content-list"> |
| | | <a class="layui-btn layui-btn-normal layui-btn-xs approvalBtnupt" lay-event="edit"> |
| | | <i class="layui-icon layui-icon-edit"></i>编辑 |
| | | </a> |
| | |
| | | <i class="layui-icon layui-icon-delete"></i>删除 |
| | | </a> |
| | | </script> |
| | | </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> |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'table', 'laypage', 'layer'], function() { |
| | | var table = layui.table, |
| | | form = layui.form, |
| | | laypage = layui.laypage, |
| | | layer = layui.layer; |
| | | </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> |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'table', 'laypage', 'layer'], function () { |
| | | var table = layui.table, |
| | | form = layui.form, |
| | | laypage = layui.laypage, |
| | | layer = layui.layer; |
| | | |
| | | var h1 = GetTableHeight(); |
| | | refreshTable("","","","","","","",""); |
| | | var tableIns; |
| | | //获取类别信息 |
| | | sendData(IP + "/sys/GetMaterialCategories1",{},'get',function(res){ |
| | | console.log(res) |
| | | if (res.code == 1) //成功 |
| | | { |
| | | Categoryhtml = '<option value =""></option>'; |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | Categoryhtml = Categoryhtml + '<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryName + '</option>' |
| | | } |
| | | $("#CategoryNo").append(Categoryhtml); |
| | | form.render('select'); |
| | | var h1 = GetTableHeight(); |
| | | refreshTable("", "", "", "", "", "", "", ""); |
| | | var tableIns; |
| | | //获取类别信息 |
| | | sendData(IP + "/sys/GetMaterialCategories1", {}, 'get', function (res) { |
| | | console.log(res) |
| | | if (res.code == 1) //成功 |
| | | { |
| | | Categoryhtml = '<option value =""></option>'; |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | Categoryhtml = Categoryhtml + '<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryName + '</option>' |
| | | } |
| | | }) |
| | | |
| | | function refreshTable(SkuNo,SkuName,AuditStatusNo,Type,IsControlled,IsInspect,Environment,CategoryNo) { |
| | | var param = { |
| | | SkuNo: SkuNo, |
| | | SkuName: SkuName, |
| | | AuditStatusNo: AuditStatusNo, |
| | | Type: Type, |
| | | IsControlled: IsControlled, |
| | | IsInspect: IsInspect, |
| | | Environment: Environment, |
| | | CategoryNo:CategoryNo |
| | | }; |
| | | |
| | | var url = "/Basis/GetMateList?SkuNo="+SkuNo+"&&SkuName="+SkuName+"&&AuditStatusNo="+AuditStatusNo+"&&Type="+Type+"&&IsControlled="+IsControlled+"&&IsInspect="+IsInspect+"&&Environment="+Environment+"&CategoryNo="+CategoryNo; |
| | | sendData(IP + url, {}, 'get', function(res) { |
| | | if (res.code == 0) //成功 |
| | | { |
| | | var list = res.data; |
| | | $.extend(infoOptions, { |
| | | data: list |
| | | }); |
| | | infoOptions.page = { |
| | | curr: 1 |
| | | } |
| | | tableIns = table.render(infoOptions); |
| | | } |
| | | else //不成功 |
| | | { |
| | | layer.msg('获取物料列表信息失败!', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }); |
| | | sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) { |
| | | $(function () { |
| | | $(".approvalBtn").hide(); |
| | | }); |
| | | $(function () { |
| | | $(".approvalBtndel").hide(); |
| | | }); |
| | | $(function () { |
| | | $(".approvalBtnupt").hide(); |
| | | }); |
| | | if (res.code == 0) //成功 |
| | | { |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "添加物料") { |
| | | $(function () { |
| | | $(".approvalBtn").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "删除物料") { |
| | | $(function () { |
| | | $(".approvalBtndel").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "编辑物料") { |
| | | $(function () { |
| | | $(".approvalBtnupt").show(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | else //不成功 |
| | | { |
| | | layer.msg( |
| | | "获取信息失败", |
| | | { |
| | | icon: 2, |
| | | time: 2000, //2秒关闭(如果不配置,默认是3秒) |
| | | }, |
| | | function () { |
| | | //回调 |
| | | } |
| | | ); |
| | | } |
| | | }); |
| | | $("#CategoryNo").append(Categoryhtml); |
| | | form.render('select'); |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | function refreshTable(SkuNo, SkuName, AuditStatusNo, Type, IsControlled, IsInspect, Environment, CategoryNo) { |
| | | var param = { |
| | | SkuNo: SkuNo, |
| | | SkuName: SkuName, |
| | | AuditStatusNo: AuditStatusNo, |
| | | Type: Type, |
| | | IsControlled: IsControlled, |
| | | IsInspect: IsInspect, |
| | | Environment: Environment, |
| | | CategoryNo: CategoryNo |
| | | }; |
| | | |
| | | var url = "/Basis/GetMateList?SkuNo=" + SkuNo + "&&SkuName=" + SkuName + "&&AuditStatusNo=" + AuditStatusNo + "&&Type=" + Type + "&&IsControlled=" + IsControlled + "&&IsInspect=" + IsInspect + "&&Environment=" + Environment + "&CategoryNo=" + CategoryNo; |
| | | sendData(IP + url, {}, 'get', function (res) { |
| | | if (res.code == 0) //成功 |
| | | { |
| | | var list = res.data; |
| | | $.extend(infoOptions, { |
| | | data: list |
| | | }); |
| | | infoOptions.page = { |
| | | curr: 1 |
| | | } |
| | | tableIns = table.render(infoOptions); |
| | | } |
| | | else //不成功 |
| | | { |
| | | layer.msg('获取物料列表信息失败!', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) { |
| | | $(function () { |
| | | $(".approvalBtn").hide(); |
| | |
| | | ); |
| | | } |
| | | }); |
| | | |
| | | |
| | | var infoOptions = { |
| | | elem: "#LAY-app-content-list", |
| | | height: h1, |
| | | id: "LAY-app-content-list", |
| | | page: true, |
| | | limit: pageCnt, |
| | | limits: pageLimits, |
| | | even: true, |
| | | cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | cols: |
| | | } |
| | | |
| | | |
| | | |
| | | sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) { |
| | | $(function () { |
| | | $(".approvalBtn").hide(); |
| | | }); |
| | | $(function () { |
| | | $(".approvalBtndel").hide(); |
| | | }); |
| | | $(function () { |
| | | $(".approvalBtnupt").hide(); |
| | | }); |
| | | if (res.code == 0) //成功 |
| | | { |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "添加物料") { |
| | | $(function () { |
| | | $(".approvalBtn").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "删除物料") { |
| | | $(function () { |
| | | $(".approvalBtndel").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "编辑物料") { |
| | | $(function () { |
| | | $(".approvalBtnupt").show(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | else //不成功 |
| | | { |
| | | layer.msg( |
| | | "获取信息失败", |
| | | { |
| | | icon: 2, |
| | | time: 2000, //2秒关闭(如果不配置,默认是3秒) |
| | | }, |
| | | function () { |
| | | //回调 |
| | | } |
| | | ); |
| | | } |
| | | }); |
| | | |
| | | |
| | | var infoOptions = { |
| | | elem: "#LAY-app-content-list", |
| | | height: h1, |
| | | id: "LAY-app-content-list", |
| | | page: true, |
| | | limit: pageCnt, |
| | | limits: pageLimits, |
| | | even: true, |
| | | cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | cols: |
| | | [[ |
| | | { |
| | | title: '序号',type: 'numbers',fixed: 'left',width:65 |
| | | title: '序号', type: 'numbers', fixed: 'left', width: 65 |
| | | }, |
| | | { |
| | | field: 'SkuNo',title: '物料编码',align: 'center',fixed: 'left',width: 100 |
| | | }, |
| | | { |
| | | field: 'SkuName',title: '物料名称',align: 'center',width: 150 |
| | | }, |
| | | { |
| | | field: 'Standard',title: '物料规格',align: 'center',width: 130 |
| | | }, |
| | | |
| | | { |
| | | field: 'Type',title: '类型',align: 'center',templet: '#buttonType',width: 100 |
| | | field: 'SkuNo', title: '物料编码', align: 'center', fixed: 'left', width: 100 |
| | | }, |
| | | { |
| | | field: 'IsControlled',templet: '#buttonIsControlled',title: '是否受控',align: 'center',width: 100 |
| | | }, |
| | | { |
| | | field: 'IsInspect',title: '是否免检',align: 'center',templet: '#buttonIsInspect',width: 100 |
| | | }, |
| | | { |
| | | field: 'IsPasteCode',title: '是否贴标',align: 'center',templet: '#buttonIsPasteCode',width: 100 |
| | | }, |
| | | { |
| | | field: 'Origin',title: '来源',align: 'center',width: 200 |
| | | }, |
| | | { |
| | | field: 'UnitNo',title: '单位',align: 'center',width: 100 |
| | | field: 'SkuName', title: '物料名称', align: 'center', width: 150 |
| | | }, |
| | | { |
| | | field: 'PackagName',title: '包装',align: 'center',width: 100 |
| | | field: 'Standard', title: '物料规格', align: 'center', width: 130 |
| | | }, |
| | | |
| | | { |
| | | field: 'Type', title: '类型', align: 'center', templet: '#buttonType', width: 100 |
| | | }, |
| | | { |
| | | field: 'Environment',title: '存储环境',align: 'center',templet: '#buttonEnvironment',width: 120 |
| | | field: 'IsControlled', templet: '#buttonIsControlled', title: '是否受控', align: 'center', width: 100 |
| | | }, |
| | | { |
| | | field: 'CategoryName',title: '物料类别',align: 'center',width: 120 |
| | | field: 'IsInspect', title: '是否免检', align: 'center', templet: '#buttonIsInspect', width: 100 |
| | | }, |
| | | { |
| | | field: 'Weight',title: '理论重量',align: 'center',width: 135 |
| | | }, |
| | | { |
| | | field: 'Warranty',title: '保质期(天)',align: 'center',width: 140 |
| | | }, |
| | | { |
| | | field: 'UnpackWarranty',title: '拆包效期(天)',align: 'center',width: 140 |
| | | }, |
| | | |
| | | { |
| | | field: 'AdventTime',title: '临期(天)',align: 'center',width: 140 |
| | | field: 'IsPasteCode', title: '是否贴标', align: 'center', templet: '#buttonIsPasteCode', width: 100 |
| | | }, |
| | | { |
| | | field: 'LowInventory',title: '低库存',align: 'center',width: 150 |
| | | field: 'Origin', title: '来源', align: 'center', width: 200 |
| | | }, |
| | | { |
| | | field: 'Demo',title: '备注',align: 'center',width: 200 |
| | | field: 'UnitNo', title: '单位', align: 'center', width: 100 |
| | | }, |
| | | { |
| | | field: 'CreateUserName',title: '创建人',align: 'center',width: 130 |
| | | field: 'PackagName', title: '包装', align: 'center', width: 100 |
| | | }, |
| | | { |
| | | field: 'CreateTime',title: '创建日期',align: 'center',width: 170, |
| | | field: 'Environment', title: '存储环境', align: 'center', templet: '#buttonEnvironment', width: 120 |
| | | }, |
| | | { |
| | | field: 'CategoryName', title: '物料类别', align: 'center', width: 120 |
| | | }, |
| | | { |
| | | field: 'Weight', title: '理论重量', align: 'center', width: 135 |
| | | }, |
| | | { |
| | | field: 'Warranty', title: '保质期(天)', align: 'center', width: 140 |
| | | }, |
| | | { |
| | | field: 'UnpackWarranty', title: '拆包效期(天)', align: 'center', width: 140 |
| | | }, |
| | | |
| | | { |
| | | field: 'AdventTime', title: '临期(天)', align: 'center', width: 140 |
| | | }, |
| | | { |
| | | field: 'LowInventory', title: '低库存', align: 'center', width: 150 |
| | | }, |
| | | { |
| | | field: 'Demo', title: '备注', align: 'center', width: 200 |
| | | }, |
| | | { |
| | | field: 'CreateUserName', title: '创建人', align: 'center', width: 130 |
| | | }, |
| | | { |
| | | field: 'CreateTime', title: '创建日期', align: 'center', width: 170, |
| | | templet: function (d) { |
| | | return formatDate(d.CreateTime); |
| | | } |
| | | }, |
| | | { |
| | | title: '操作',fixed: 'right',align: 'center',toolbar: '#table-content-list',width: 170 |
| | | title: '操作', fixed: 'right', align: 'center', toolbar: '#table-content-list', width: 170 |
| | | } |
| | | ]], |
| | | }; |
| | | |
| | | //监听搜索 |
| | | form.on('submit(LAY-app-contlist-search)', function (data) { |
| | | var SkuNo = data.field.SkuNo; |
| | | var SkuName = data.field.SkuName; |
| | | var AuditStatusNo = data.field.AuditStatusNo; |
| | | var Type = data.field.Type; |
| | | var IsControlled = data.field.IsControlled; |
| | | var IsInspect = data.field.IsInspect; |
| | | var Environment = data.field.Environment; |
| | | var CategoryNo = data.field.CategoryNo; |
| | | |
| | | refreshTable(SkuNo, SkuName, AuditStatusNo, Type, IsControlled, IsInspect, Environment, CategoryNo); |
| | | }); |
| | | var doing = true; |
| | | var $ = layui.$, |
| | | active = { |
| | | //新增 |
| | | add: function () { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '添加物料信息', |
| | | content: 'MaterialsForm.html', |
| | | maxmin: true, |
| | | area: ['640px', '746px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function (index, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index], |
| | | submitID = 'layuiadmin-app-form-submit', |
| | | submit = layero.find('iframe').contents().find('#' + submitID); |
| | | //监听提交 |
| | | iframeWindow.layui.form.on('submit(' + submitID + ')', function ( |
| | | data) { |
| | | var field = data.field; //获取提交的字段 |
| | | //提交 Ajax 成功后,静态更新表格中的数据 |
| | | var param = { |
| | | SkuNo: field.SkuNo, |
| | | SkuName: field.SkuName, |
| | | Standard: field.Standard, |
| | | //AuditStatusNo: field.AuditStatusNo, |
| | | Type: field.Type, |
| | | IsControlled: field.IsControlled, |
| | | IsInspect: field.IsInspect, |
| | | IsPasteCode: field.IsPasteCode, |
| | | Origin: field.Origin, |
| | | CategoryNo: field.CategoryNo, |
| | | UnitNo: field.UnitNo, |
| | | PackagNo: field.PackagNo, |
| | | Environment: field.Environment, |
| | | Weight: Number(field.Weight), |
| | | Warranty: Number(field.Warranty), |
| | | UnpackWarranty: Number(field.UnpackWarranty), |
| | | Price: Number(field.Price), |
| | | AdventTime: Number(field.AdventTime), //临期 |
| | | LowInventory: Number(field.LowInventory), //低库存 |
| | | Demo: field.Demo |
| | | }; |
| | | if (doing) { |
| | | doing = false; |
| | | sendData(IP + "/Basis/AddMate", param, 'post', function (res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | layer.close(index); //关闭弹层 |
| | | refreshTable |
| | | ( |
| | | $("#SkuNo").val(), |
| | | $("#SkuName").val(), |
| | | $("#AuditStatusNo").val(), |
| | | $("#Type").val(), |
| | | $("#IsControlled").val(), |
| | | $("#IsInspect").val(), |
| | | $("#Environment").val(), |
| | | $("#CategoryNo").val() |
| | | ); |
| | | doing = true; |
| | | }); |
| | | } |
| | | else if (res.code == 2) { |
| | | layer.msg("物料编码或名称重复,添加失败!", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { doing = true; }); |
| | | } |
| | | else //不成功 |
| | | { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { doing = true; }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | console.log(123); |
| | | } |
| | | |
| | | }); |
| | | submit.trigger('click'); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | //监听搜索 |
| | | form.on('submit(LAY-app-contlist-search)', function(data) { |
| | | var SkuNo = data.field.SkuNo; |
| | | var SkuName = data.field.SkuName; |
| | | var AuditStatusNo = data.field.AuditStatusNo; |
| | | var Type = data.field.Type; |
| | | var IsControlled = data.field.IsControlled; |
| | | var IsInspect = data.field.IsInspect; |
| | | var Environment = data.field.Environment; |
| | | var CategoryNo = data.field.CategoryNo; |
| | | |
| | | refreshTable(SkuNo,SkuName,AuditStatusNo,Type,IsControlled,IsInspect,Environment,CategoryNo); |
| | | }); |
| | | var doing = true; |
| | | var $ = layui.$, |
| | | active = { |
| | | //新增 |
| | | add: function() { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '添加物料信息', |
| | | content: 'MaterialsForm.html', |
| | | maxmin: true, |
| | | area: ['640px', '746px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function(index, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index], |
| | | submitID = 'layuiadmin-app-form-submit', |
| | | submit = layero.find('iframe').contents().find('#' + submitID); |
| | | //监听提交 |
| | | iframeWindow.layui.form.on('submit(' + submitID + ')', function( |
| | | data) { |
| | | var field = data.field; //获取提交的字段 |
| | | //提交 Ajax 成功后,静态更新表格中的数据 |
| | | var param = { |
| | | SkuNo: field.SkuNo, |
| | | SkuName: field.SkuName, |
| | | Standard: field.Standard, |
| | | //AuditStatusNo: field.AuditStatusNo, |
| | | Type: field.Type, |
| | | IsControlled: field.IsControlled, |
| | | IsInspect: field.IsInspect, |
| | | IsPasteCode: field.IsPasteCode, |
| | | Origin: field.Origin, |
| | | CategoryNo: field.CategoryNo, |
| | | UnitNo: field.UnitNo, |
| | | PackagNo: field.PackagNo, |
| | | Environment: field.Environment, |
| | | Weight: Number(field.Weight), |
| | | Warranty: Number(field.Warranty), |
| | | UnpackWarranty: Number(field.UnpackWarranty), |
| | | Price: Number(field.Price), |
| | | AdventTime: Number(field.AdventTime), //临期 |
| | | LowInventory: Number(field.LowInventory), //低库存 |
| | | Demo: field.Demo |
| | | }; |
| | | if(doing) |
| | | { |
| | | doing = false; |
| | | sendData(IP + "/Basis/AddMate", param, 'post',function(res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | layer.close(index); //关闭弹层 |
| | | refreshTable |
| | | ( |
| | | $("#SkuNo").val(), |
| | | $("#SkuName").val(), |
| | | $("#AuditStatusNo").val(), |
| | | $("#Type").val(), |
| | | $("#IsControlled").val(), |
| | | $("#IsInspect").val(), |
| | | $("#Environment").val(), |
| | | $("#CategoryNo").val() |
| | | ); |
| | | doing = true; |
| | | }); |
| | | } |
| | | else if (res.code == 2) { |
| | | layer.msg("物料编码或名称重复,添加失败!", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {doing = true;}); |
| | | } |
| | | else //不成功 |
| | | { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {doing = true;}); |
| | | } |
| | | }); |
| | | } |
| | | else{ |
| | | console.log(123); |
| | | } |
| | | |
| | | }); |
| | | submit.trigger('click'); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | $('.layui-btn.layuiadmin-btn-list').on('click', function() { |
| | | var type = $(this).data('type'); |
| | | active[type] ? active[type].call(this) : ''; |
| | | }); |
| | | $('.layui-btn.layuiadmin-btn-list').on('click', function () { |
| | | var type = $(this).data('type'); |
| | | active[type] ? active[type].call(this) : ''; |
| | | }); |
| | | |
| | | |
| | | var element = layui.element; |
| | | var houseId = 0; |
| | | var param = { |
| | | Id: $.cookie('userId') |
| | | } |
| | | var xml = ''; |
| | | function getchiled(data, mainId) { |
| | | if (data) |
| | | { |
| | | var list = data.filter(item => item.ParentId == mainId); |
| | | if (list) |
| | | { |
| | | for (var i = 0; i < list.length; i++) |
| | | { |
| | | var id = list[i].Id; |
| | | //查询有无子菜单 |
| | | var count = data.filter(item => item.ParentId == id).length; |
| | | if (count > 0) |
| | | { |
| | | xml = xml + '<dd>' + '<a href="javascript:;">' + list[i].Name + '</a>' + '<dl class="layui-nav-child">'; |
| | | getchiled(data, id); |
| | | xml = xml + '</dl></dd>'; |
| | | } |
| | | else |
| | | { |
| | | xml = xml + '<dd>' + '<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' + '</dd>'; |
| | | } |
| | | var element = layui.element; |
| | | var houseId = 0; |
| | | var param = { |
| | | Id: $.cookie('userId') |
| | | } |
| | | var xml = ''; |
| | | function getchiled(data, mainId) { |
| | | if (data) { |
| | | var list = data.filter(item => item.ParentId == mainId); |
| | | if (list) { |
| | | for (var i = 0; i < list.length; i++) { |
| | | var id = list[i].Id; |
| | | //查询有无子菜单 |
| | | var count = data.filter(item => item.ParentId == id).length; |
| | | if (count > 0) { |
| | | xml = xml + '<dd>' + '<a href="javascript:;">' + list[i].Name + '</a>' + '<dl class="layui-nav-child">'; |
| | | getchiled(data, id); |
| | | xml = xml + '</dl></dd>'; |
| | | } |
| | | else { |
| | | xml = xml + '<dd>' + '<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' + '</dd>'; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var uid = $.cookie('userId'); |
| | | table.on('tool(LAY-app-content-list)', function(obj) { |
| | | var data = obj.data; |
| | | //删除 |
| | | if (obj.event === 'del') |
| | | { |
| | | layer.confirm('确定删除选中的物料?', function(index) { |
| | | cusid = data.Id; |
| | | var arr = []; |
| | | arr.push(cusid); //属性 |
| | | var param = { |
| | | Ids: arr |
| | | }; |
| | | if(doing) |
| | | { |
| | | doing = false; |
| | | sendData(IP + "/Basis/DelMate?Id="+data.Id+"", {} , 'get', function(res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | refreshTable |
| | | ( |
| | | $("#SkuNo").val(), |
| | | $("#SkuName").val(), |
| | | $("#AuditStatusNo").val(), |
| | | $("#Type").val(), |
| | | $("#IsControlled").val(), |
| | | $("#IsInspect").val(), |
| | | $("#Environment").val(), |
| | | $("#CategoryNo").val() |
| | | ); |
| | | //table.reload('LAY-app-content-list'); //数据刷新 |
| | | doing = true; |
| | | }); |
| | | } |
| | | else //不成功 |
| | | { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {doing = true;}); |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | console.log(123); |
| | | } |
| | | }); |
| | | } |
| | | //编辑 |
| | | else if (obj.event === 'edit') |
| | | { |
| | | cusId = data.Id; |
| | | layer.open({ |
| | | type: 2, |
| | | title: '编辑物料信息', |
| | | content: 'MaterialsForm.html?id=' + cusId, |
| | | maxmin: true, |
| | | area: ['640px', '746px'], |
| | | 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; //获取提交的字段 |
| | | //提交 Ajax 成功后,静态更新表格中的数据 |
| | | var param = { |
| | | Id: cusId, |
| | | SkuNo: field.SkuNo, |
| | | SkuName: field.SkuName, |
| | | Standard: field.Standard, |
| | | AuditStatusNo: field.AuditStatusNo, |
| | | Type: field.Type, |
| | | IsControlled: field.IsControlled, |
| | | IsInspect: field.IsInspect, |
| | | IsPasteCode: field.IsPasteCode, |
| | | Origin: field.Origin, |
| | | CategoryNo: field.CategoryNo, |
| | | UnitNo: field.UnitNo, |
| | | PackagNo: field.PackagNo, |
| | | Environment: field.Environment, |
| | | Weight: Number(field.Weight), |
| | | Warranty: Number(field.Warranty), |
| | | UnpackWarranty: Number(field.UnpackWarranty), |
| | | Price: Number(field.Price), |
| | | AdventTime: Number(field.AdventTime), //临期 |
| | | LowInventory: Number(field.LowInventory), //低库存 |
| | | Demo: field.Demo |
| | | }; |
| | | if(doing) |
| | | { |
| | | doing = false; |
| | | sendData(IP + "/Basis/ExitMate", param, 'post', |
| | | function(res) { |
| | | } |
| | | var uid = $.cookie('userId'); |
| | | table.on('tool(LAY-app-content-list)', function (obj) { |
| | | var data = obj.data; |
| | | //删除 |
| | | if (obj.event === 'del') { |
| | | layer.confirm('确定删除选中的物料?', function (index) { |
| | | cusid = data.Id; |
| | | var arr = []; |
| | | arr.push(cusid); //属性 |
| | | var param = { |
| | | Ids: arr |
| | | }; |
| | | if (doing) { |
| | | doing = false; |
| | | sendData(IP + "/Basis/DelMate?Id=" + data.Id + "", {}, 'get', function (res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | refreshTable |
| | | ( |
| | | $("#SkuNo").val(), |
| | | $("#SkuName").val(), |
| | | $("#AuditStatusNo").val(), |
| | | $("#Type").val(), |
| | | $("#IsControlled").val(), |
| | | $("#IsInspect").val(), |
| | | $("#Environment").val(), |
| | | $("#CategoryNo").val() |
| | | ); |
| | | //table.reload('LAY-app-content-list'); //数据刷新 |
| | | doing = true; |
| | | }); |
| | | } |
| | | else //不成功 |
| | | { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { doing = true; }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | console.log(123); |
| | | } |
| | | }); |
| | | } |
| | | //编辑 |
| | | else if (obj.event === 'edit') { |
| | | cusId = data.Id; |
| | | layer.open({ |
| | | type: 2, |
| | | title: '编辑物料信息', |
| | | content: 'MaterialsForm.html?id=' + cusId, |
| | | maxmin: true, |
| | | area: ['640px', '746px'], |
| | | 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; //获取提交的字段 |
| | | //提交 Ajax 成功后,静态更新表格中的数据 |
| | | var param = { |
| | | Id: cusId, |
| | | SkuNo: field.SkuNo, |
| | | SkuName: field.SkuName, |
| | | Standard: field.Standard, |
| | | AuditStatusNo: field.AuditStatusNo, |
| | | Type: field.Type, |
| | | IsControlled: field.IsControlled, |
| | | IsInspect: field.IsInspect, |
| | | IsPasteCode: field.IsPasteCode, |
| | | Origin: field.Origin, |
| | | CategoryNo: field.CategoryNo, |
| | | UnitNo: field.UnitNo, |
| | | PackagNo: field.PackagNo, |
| | | Environment: field.Environment, |
| | | Weight: Number(field.Weight), |
| | | Warranty: Number(field.Warranty), |
| | | UnpackWarranty: Number(field.UnpackWarranty), |
| | | Price: Number(field.Price), |
| | | AdventTime: Number(field.AdventTime), //临期 |
| | | LowInventory: Number(field.LowInventory), //低库存 |
| | | Demo: field.Demo |
| | | }; |
| | | if (doing) { |
| | | doing = false; |
| | | sendData(IP + "/Basis/ExitMate", param, 'post', |
| | | function (res) { |
| | | if (res.code == 0) //成功 |
| | | { |
| | | layer.msg("修改成功", { |
| | | icon: 1, |
| | | time: 1000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | }, function () { |
| | | layer.close(index); //关闭弹层 |
| | | refreshTable |
| | | ( |
| | | $("#SkuNo").val(), |
| | | $("#SkuName").val(), |
| | | $("#AuditStatusNo").val(), |
| | | $("#Type").val(), |
| | | $("#IsControlled").val(), |
| | | $("#IsInspect").val(), |
| | | $("#Environment").val(), |
| | | $("#CategoryNo").val(), |
| | | ); |
| | | ( |
| | | $("#SkuNo").val(), |
| | | $("#SkuName").val(), |
| | | $("#AuditStatusNo").val(), |
| | | $("#Type").val(), |
| | | $("#IsControlled").val(), |
| | | $("#IsInspect").val(), |
| | | $("#Environment").val(), |
| | | $("#CategoryNo").val(), |
| | | ); |
| | | doing = true; |
| | | }); |
| | | } |
| | |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {doing = true;}); |
| | | }, function () { doing = true; }); |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | console.log(123); |
| | | } |
| | | }); |
| | | submit.trigger('click'); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | console.log(123); |
| | | } |
| | | }); |
| | | submit.trigger('click'); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
| | | }); |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" id="IsControlledshow"> |
| | | <label class="layui-form-label">是否受控</label> |
| | | <label class="layui-form-label">是否请验</label> |
| | | <div class="layui-input-block" style="width: 182px;"> |
| | | <select name="IsControlled" id="IsControlled" lay-verify="" lay-verify="" lay-search> |
| | | <!-- <option value=""></option> --> |
| | | <option value="0">受控</option> |
| | | <option value="1">非受控</option> |
| | | <option value="0">是</option> |
| | | <option value="1">否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" id="IsInspectshow"> |
| | | <label class="layui-form-label">是否免检</label> |
| | | <label class="layui-form-label">是否受控</label> |
| | | <div class="layui-input-block" style="width: 182px;"> |
| | | <select name="IsInspect" id="IsInspect" lay-verify="" lay-verify="" lay-search> |
| | | <!-- <option value=""></option> --> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | <option value="0">是</option> |
| | | <option value="1">否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | display: none; |
| | | } |
| | | |
| | | /* 样式用于美化图片展示 */ |
| | | .layui-table-cell img { |
| | | max-width: 100px; |
| | | max-height: 100px; |
| | | } |
| | | |
| | | /* 样式用于美化图片展示 */ |
| | | .layui-table-cell img { |
| | | max-width: 100px; |
| | | max-height: 100px; |
| | | } |
| | | </style> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | |
| | | |
| | | <div style="display: none;" id="UploadImageView"> |
| | | |
| | | <div id="UploadImage" style="margin-left: 35px;margin-top: 30px;"> |
| | | <label>上传图片:</label><button type="button" class="layui-btn" id="uploadBtn" style="margin-left: 20px;" >浏览</button> |
| | | <div id="UploadImage" style="margin-left: 35px;margin-top: 30px;"> |
| | | <label>上传图片:</label><button type="button" class="layui-btn" id="uploadBtn" |
| | | style="margin-left: 20px;">浏览</button> |
| | | <button type="button" class="layui-btn" id="upload" style="margin-left: 20px;">上传</button> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'table', 'laypage', 'element', 'layer', 'laydate','upload'], function () { |
| | | }).use(['index', 'table', 'laypage', 'element', 'layer', 'laydate', 'upload'], function () { |
| | | var table = layui.table, |
| | | form = layui.form, |
| | | element = layui.element, |
| | | laypage = layui.laypage, |
| | | layer = layui.layer, |
| | | laydate = layui.laydate, |
| | | upload = layui.upload; |
| | | upload = layui.upload; |
| | | var h1 = GetTableTabHeight(); |
| | | laydate.render({ |
| | | elem: '#StartTime' |
| | |
| | | { field: 'Status', title: '执行状态', align: 'center', width: 90, templet: '#templetStatus' }, |
| | | { field: 'RequestTime', title: '请验日期', align: 'center', width: 165, templet: '#templetCompleteTime' }, |
| | | { field: 'RequestUser', title: '请验人', align: 'center', width: 165 }, |
| | | { field: 'UDF5', title: '图片', align: 'center', width: 100 ,templet: function (d) { |
| | | return d.image ? '<img src="' + d.image + '" alt="图片">' : '无图片';}}, |
| | | { |
| | | field: 'UDF5', title: '图片', align: 'center', width: 100, templet: function (d) { |
| | | return d.image ? '<img src="' + d.image + '" alt="图片">' : '无图片'; |
| | | } |
| | | }, |
| | | // { field: 'UDF2', title: '自定义2', align: 'center', width: 100 }, |
| | | // { field: 'UDF3', title: '自定义3', align: 'center', width: 100 }, |
| | | // { field: 'UDF4', title: '自定义4', align: 'center', width: 100 }, |
| | |
| | | sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | |
| | | |
| | | if (res.data[k].MenuName == "上传") { |
| | | $(function () { |
| | | $(".shangClass").show(); |
| | |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case "upImage": |
| | | layer.open({ |
| | | type:1, |
| | | title: '上传图片', |
| | | content: $('#UploadImageView'), |
| | | maxmin: true, |
| | | area: ['350px','215px'], |
| | | btn: ['确定'], |
| | | success: function(index, layero){ |
| | | upload.render({ |
| | | elem: '#uploadBtn', |
| | | url: IP + '/BllQuality/UploadImage', |
| | | accept: 'images', |
| | | exts:'jpg|png|gif', |
| | | multiple: false, |
| | | size: 1024 * 5, // 5MB |
| | | auto: false, |
| | | bindAction: '#upload', |
| | | headers: { ToKen: $.cookie('token') }, |
| | | xhrFields: { |
| | | withCredentials: true // 携带cookie |
| | | }, |
| | | before: function(){ |
| | | this.data = { |
| | | qualityId:data.Id |
| | | }; |
| | | layer.load(1, {shade: [0.5, '#000']}); |
| | | }, |
| | | done: function(res){ |
| | | layer.open({ |
| | | type: 1, |
| | | title: '上传图片', |
| | | content: $('#UploadImageView'), |
| | | maxmin: true, |
| | | area: ['350px', '215px'], |
| | | btn: ['确定'], |
| | | success: function (index, layero) { |
| | | upload.render({ |
| | | elem: '#uploadBtn', |
| | | url: IP + '/BllQuality/UploadImage', |
| | | accept: 'images', |
| | | exts: 'jpg|png|gif', |
| | | multiple: false, |
| | | size: 1024 * 5, // 5MB |
| | | auto: false, |
| | | bindAction: '#upload', |
| | | headers: { ToKen: $.cookie('token') }, |
| | | xhrFields: { |
| | | withCredentials: true // 携带cookie |
| | | }, |
| | | before: function () { |
| | | this.data = { |
| | | qualityId: data.Id |
| | | }; |
| | | layer.load(1, { shade: [0.5, '#000'] }); |
| | | }, |
| | | done: function (res) { |
| | | layer.closeAll('loading'); |
| | | if(res.code == 0){ |
| | | layer.msg('上传成功', {icon: 1}); |
| | | if (res.code == 0) { |
| | | layer.msg('上传成功', { icon: 1 }); |
| | | // 上传成功后的回调,如刷新表格等 |
| | | // table.reload('LAY-app-content-list'); |
| | | } else { |
| | | layer.msg(res.msg || '上传失败', {icon: 2}); |
| | | layer.msg(res.msg || '上传失败', { icon: 2 }); |
| | | } |
| | | }, |
| | | error: function(){ |
| | | }, |
| | | error: function () { |
| | | layer.closeAll('loading'); |
| | | layer.msg('上传失败', {icon: 2}); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | break; |
| | | case "ViewImage": |
| | | layer.open({ |
| | | type:1, |
| | | title: '查看图片', |
| | | content: $('#ImagesShowView'), |
| | | maxmin: true, |
| | | area: ['650px','315px'], |
| | | btn: ['确定'], |
| | | success: function(index, layero){ |
| | | getImage(data.Id); |
| | | layer.msg('上传失败', { icon: 2 }); |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | break; |
| | | case "ViewImage": |
| | | layer.open({ |
| | | type: 1, |
| | | title: '查看图片', |
| | | content: $('#ImagesShowView'), |
| | | maxmin: true, |
| | | area: ['650px', '315px'], |
| | | btn: ['确定'], |
| | | success: function (index, layero) { |
| | | getImage(data.Id); |
| | | } |
| | | }); |
| | | break; |
| | | case "add": |
| | | layer.confirm('确定要发起请验?', function (index) { |
| | | var param = { |
| | |
| | | } |
| | | }); |
| | | |
| | | function getImage(id) |
| | | { |
| | | var param = { |
| | | Id:id |
| | | } |
| | | sendData(IP + "/BllQuality/GetImage", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | $("#ImagesShow").html(''); |
| | | res.data.forEach(function (item) { |
| | | $("#ImagesShow").append('<div>'+ |
| | | '<a href='+item+' target="_blank" class="image-item"><img src="'+ item + '" /></a>'+ |
| | | '<button class="layui-btn layui-btn-primary layui-btn-sm delete-btn" data-type="customCols" data_Url='+item+' >删除</button>'+ |
| | | '</div>'); |
| | | }) |
| | | $('.delete-btn').on('click', function ( ) { |
| | | var item = $(this); |
| | | var QualityId = id; |
| | | var imageUrl = item.attr('data_Url'); |
| | | layer.confirm('确定删除吗?', function (index) { |
| | | var param = { |
| | | QualityId: QualityId, |
| | | ImageUrl: imageUrl |
| | | } |
| | | sendData(IP + "/BllQuality/DeleteImage", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 1000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | getImage(id); |
| | | }); |
| | | } else { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | } |
| | | }); |
| | | })}); |
| | | } else { //不成功 |
| | | $("#ImagesShow").html(''); |
| | | res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | } |
| | | } |
| | | }) |
| | | function getImage(id) { |
| | | var param = { |
| | | Id: id |
| | | } |
| | | sendData(IP + "/BllQuality/GetImage", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | $("#ImagesShow").html(''); |
| | | res.data.forEach(function (item) { |
| | | $("#ImagesShow").append('<div>' + |
| | | '<a href=' + item + ' target="_blank" class="image-item"><img src="' + item + '" /></a>' + |
| | | '<button class="layui-btn layui-btn-primary layui-btn-sm delete-btn" data-type="customCols" data_Url=' + item + ' >删除</button>' + |
| | | '</div>'); |
| | | }) |
| | | $('.delete-btn').on('click', function () { |
| | | var item = $(this); |
| | | var QualityId = id; |
| | | var imageUrl = item.attr('data_Url'); |
| | | layer.confirm('确定删除吗?', function (index) { |
| | | var param = { |
| | | QualityId: QualityId, |
| | | ImageUrl: imageUrl |
| | | } |
| | | sendData(IP + "/BllQuality/DeleteImage", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 1000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | getImage(id); |
| | | }); |
| | | } else { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | | }); |
| | | } else { //不成功 |
| | | $("#ImagesShow").html(''); |
| | | res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 取样明细单机事件 |
| | | table.on('tool(SamplingDetails)', function (obj) { |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">批次号</label> |
| | | <div class="layui-input-block" style="width: 70%;"> |
| | | <input type="text" name="LotNo" placeholder="请输入批次号" lay-verify="required" autocomplete="off" |
| | | class="layui-input"> |
| | | <input type="text" name="LotNo" placeholder="请输入批次号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | |
| | | <!-- #region 自定义表头 --> |
| | | <script type="text/html" id="templetProductionTime"> |
| | | {{# function GetBtn(d){ |
| | | return formatDate(d.ProductionTime); |
| | | return formatDate2(d.ProductionTime); |
| | | } |
| | | }} |
| | | {{ GetBtn(d) }} |
| | | </script> |
| | | <script type="text/html" id="templetExpirationTime"> |
| | | {{# function GetBtn(d){ |
| | | return formatDate2(d.ExpirationTime); |
| | | } |
| | | }} |
| | | {{ GetBtn(d) }} |
| | |
| | | { field: 'Qty', title: '数量', width: 90, align: 'center' }, |
| | | { field: 'FullQty', title: '整箱数量', width: 100, align: 'center' }, |
| | | { field: 'ProductionTime', title: '生产日期', align: 'center', templet: '#templetProductionTime' }, |
| | | { field: 'ExpirationTime', title: '有效期', align: 'center', templet: '#templetExpirationTime' }, |
| | | { field: 'InspectMark', title: '抽检标记', align: 'center', templet: '#InspectMarkStatus' }, |
| | | { field: 'BitBoxMark', templet: '#BitPalletMarkStatus1', title: '零箱标记', align: 'center' }, |
| | | { field: 'InspectStatus', templet: '#InspectStatus1', title: '质检状态', align: 'center' }, |
| | |
| | | <!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 30px; |
| | | } |
| | | </style> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | | document.addEventListener("DOMContentLoaded", function() { |
| | | |
| | | //获取table默认显示数 |
| | | pageCntFirst(); |
| | | }); |
| | | </script> |
| | | </head> |
| | | <body id="body"> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" id="top"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">托盘条码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="PalletNo" name="PalletNo" placeholder="托盘条码" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">条码状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Status" id="Status" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">未使用</option> |
| | | <option value="1">使用中</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list add" data-type="add"> |
| | | <i class="layui-icon layuiadmin-button-btn"></i>添加 |
| | | </button> |
| | | |
| | | <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 30px; |
| | | } |
| | | </style> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | | document.addEventListener("DOMContentLoaded", function () { |
| | | |
| | | //获取table默认显示数 |
| | | pageCntFirst(); |
| | | }); |
| | | </script> |
| | | </head> |
| | | |
| | | <body id="body"> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" |
| | | id="top"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">托盘条码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="PalletNo" name="PalletNo" placeholder="托盘条码" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">条码状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Status" id="Status" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">未使用</option> |
| | | <option value="1">使用中</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list add" data-type="add"> |
| | | <i class="layui-icon layuiadmin-button-btn"></i>添加 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div id="center"></div> |
| | | <div class="layui-card-body"> |
| | | <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> |
| | | |
| | | <script type="text/html" id="table-content-list"> |
| | | </div> |
| | | <div id="center"></div> |
| | | <div class="layui-card-body"> |
| | | <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> |
| | | |
| | | <script type="text/html" id="table-content-list"> |
| | | <a class="approvalBtndel layui-btn layui-btn-normal layui-btn-xs queryClass" lay-event="edit"><i class="layui-icon layui-icon-search"></i>查看</a> |
| | | <a class="approvalBtn layui-btn layui-btn-normal layui-btn-xs buDaClass" lay-event="print"><i class="layui-icon layui-icon-print"></i>补打</a> |
| | | </script> |
| | | </div> |
| | | <div id="print"></div> |
| | | </div> |
| | | <div id="print"></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> |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'table', 'laypage', 'layer'], function() { |
| | | var table = layui.table, |
| | | form = layui.form, |
| | | laypage = layui.laypage, |
| | | layer = layui.layer; |
| | | var h1 = GetTableHeight(); |
| | | var isTrue= true; |
| | | |
| | | var where = { |
| | | PalletNo:$("#PalletNo").val(), |
| | | Status:$("#Status").val(), |
| | | } |
| | | var tableIns = table.render({ |
| | | elem: '#LAY-app-content-list', |
| | | height: h1, |
| | | id: 'LAY-app-content-list', |
| | | url: IP + "/Sys/GetPalletsList", |
| | | method: 'post', |
| | | where: where, |
| | | contentType: 'application/json', |
| | | headers:{ToKen:$.cookie('token')}, |
| | | page: true, |
| | | limit: pageCnt, |
| | | limits: pageLimits, |
| | | cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | done:function(){ |
| | | $(function() { |
| | | $(".queryClass").hide(); |
| | | $(".buDaClass").hide(); |
| | | $(".add").hide(); |
| | | }); |
| | | sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "添加条码") { |
| | | $(function() { |
| | | $(".add").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "查看条码") { |
| | | $(function() { |
| | | $(".queryClass").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "补打条码") { |
| | | $(function() { |
| | | $(".buDaClass").show(); |
| | | }); |
| | | } |
| | | </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> |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'table', 'laypage', 'layer'], function () { |
| | | var table = layui.table, |
| | | form = layui.form, |
| | | laypage = layui.laypage, |
| | | layer = layui.layer; |
| | | var h1 = GetTableHeight(); |
| | | var isTrue = true; |
| | | |
| | | var where = { |
| | | PalletNo: $("#PalletNo").val(), |
| | | Status: $("#Status").val(), |
| | | } |
| | | var tableIns = table.render({ |
| | | elem: '#LAY-app-content-list', |
| | | height: h1, |
| | | id: 'LAY-app-content-list', |
| | | url: IP + "/Sys/GetPalletsList", |
| | | method: 'post', |
| | | where: where, |
| | | contentType: 'application/json', |
| | | headers: { ToKen: $.cookie('token') }, |
| | | page: true, |
| | | limit: pageCnt, |
| | | limits: pageLimits, |
| | | cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | done: function () { |
| | | $(function () { |
| | | $(".queryClass").hide(); |
| | | $(".buDaClass").hide(); |
| | | $(".add").hide(); |
| | | }); |
| | | sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "添加条码") { |
| | | $(function () { |
| | | $(".add").show(); |
| | | }); |
| | | } |
| | | } else { //不成功 |
| | | layer.msg('获取权限信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | if (res.data[k].MenuName == "查看条码") { |
| | | $(function () { |
| | | $(".queryClass").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "补打条码") { |
| | | $(function () { |
| | | $(".buDaClass").show(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } else { //不成功 |
| | | layer.msg('获取权限信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | }, |
| | | cols: [ |
| | | [{ |
| | | title: '序号', |
| | | type: 'numbers', |
| | | width: 65, |
| | | fixed: 'left' |
| | | }, { |
| | | field: 'PalletNo', |
| | | title: '托盘条码', |
| | | align: 'center', |
| | | }, { |
| | | field: 'Status', |
| | | title: '条码状态', |
| | | align: 'center', |
| | | templet: function (d) { |
| | | switch (d.Status) { |
| | | case "0": |
| | | return `<button class="layui-btn layui-btn-radius layui-btn-xs">未使用</button>`; |
| | | case "1": |
| | | return `<button class="layui-btn layui-btn-radius layui-btn-warm layui-btn-xs">使用中</button>`; |
| | | default: |
| | | return ""; |
| | | } |
| | | } |
| | | }, { |
| | | field: 'CreateUserName', |
| | | title: '创建人', |
| | | align: 'center', |
| | | }, { |
| | | field: 'CreateTime', |
| | | title: '创建时间', |
| | | align: 'center', |
| | | templet: function (d) { |
| | | return formatDate(d.CreateTime); |
| | | } |
| | | }, { |
| | | field: 'LastUse', |
| | | title: '上次使用时间', |
| | | align: 'center', |
| | | templet: function (d) { |
| | | return formatDate(d.LastUse); |
| | | } |
| | | }, { |
| | | title: '操作', |
| | | fixed: 'right', |
| | | width: 220, |
| | | align: 'center', |
| | | toolbar: '#table-content-list' |
| | | }] |
| | | ], |
| | | }); |
| | | //监听搜索 |
| | | form.on('submit(LAY-app-contlist-search)', function (data) { |
| | | tableIns.reload({ |
| | | where: { |
| | | PalletNo: $("#PalletNo").val(), |
| | | Status: $("#Status").val(), |
| | | }, |
| | | cols: [ |
| | | [{ |
| | | title: '序号', |
| | | type: 'numbers', |
| | | width: 65, |
| | | fixed: 'left' |
| | | }, { |
| | | field: 'PalletNo', |
| | | title: '托盘条码', |
| | | align: 'center', |
| | | }, { |
| | | field: 'Status', |
| | | title: '条码状态', |
| | | align: 'center', |
| | | templet:function(d){ |
| | | switch (d.Status) { |
| | | case "0": |
| | | return `<button class="layui-btn layui-btn-radius layui-btn-xs">未使用</button>`; |
| | | case "1": |
| | | return `<button class="layui-btn layui-btn-radius layui-btn-warm layui-btn-xs">使用中</button>`; |
| | | default: |
| | | return ""; |
| | | } |
| | | } |
| | | }, { |
| | | field: 'CreateUserName', |
| | | title: '创建人', |
| | | align: 'center', |
| | | } ,{ |
| | | field: 'CreateTime', |
| | | title: '创建时间', |
| | | align: 'center', |
| | | templet:function(d){ |
| | | return formatDate(d.CreateTime); |
| | | } |
| | | }, { |
| | | field: 'LastUse', |
| | | title: '上次使用时间', |
| | | align: 'center', |
| | | templet:function(d){ |
| | | return formatDate(d.LastUse); |
| | | } |
| | | }, { |
| | | title: '操作', |
| | | fixed: 'right', |
| | | width: 220, |
| | | align: 'center', |
| | | toolbar: '#table-content-list' |
| | | }] |
| | | ], |
| | | }); |
| | | //监听搜索 |
| | | form.on('submit(LAY-app-contlist-search)', function(data) { |
| | | tableIns.reload({ |
| | | where:{ |
| | | PalletNo:$("#PalletNo").val(), |
| | | Status:$("#Status").val(), |
| | | }, |
| | | page: { |
| | | curr: 1 |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | $(function() { |
| | | $(".addClass").hide(); |
| | | }); |
| | | sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "添加条码") { |
| | | $(function() { |
| | | $(".addClass").show(); |
| | | }); |
| | | } |
| | | } |
| | | } else { //不成功 |
| | | layer.msg('获取权限信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | page: { |
| | | curr: 1 |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | $(function () { |
| | | $(".addClass").hide(); |
| | | }); |
| | | sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "添加条码") { |
| | | $(function () { |
| | | $(".addClass").show(); |
| | | }); |
| | | } |
| | | } |
| | | } else { //不成功 |
| | | layer.msg('获取权限信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | var active = { |
| | | add: function() { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '打印托盘条码', |
| | | content: 'PalletsPrintFrom.html', |
| | | maxmin: true, |
| | | area: ['600px', '300px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function(index, layero){ |
| | | var iframeWindow = window['layui-layer-iframe'+ index] |
| | | ,submitID = 'layuiadmin-app-form-submit' |
| | | ,submit = layero.find('iframe').contents().find('#'+ submitID); |
| | | //监听提交 |
| | | iframeWindow.layui.form.on('submit('+ submitID +')', function(data){ |
| | | var field = data.field; //获取提交的字段 |
| | | console.log(field); |
| | | if (isTrue = true) { |
| | | isTrue = false; |
| | | |
| | | var html = ""; |
| | | var xun = 0; |
| | | document.getElementById('print').innerHTML=""; |
| | | for(var i=0;i<field.GroupCount;i++){ |
| | | |
| | | for(var j=0;j<field.SameCount;j++){ |
| | | html ="<div class=\"layui-form\" lay-filter=\"layuiadmin-app-form-list\" id=\"print\" style=\"width: 50%; text-align: center;padding-top: 10%;margin-left: 0%;\">\n"+ |
| | | "<div class=\"layui-form-item\">\n"+ |
| | | "<div class=\"layui-inline\">\n"+ |
| | | "<div class=\"\">\n"+ |
| | | "<img id=\"imgBar\" width=\"245px\" height=\"120px\"/></div>\n"+ |
| | | "</div>\n"+ |
| | | "</div>\n"+ |
| | | "</div>\n"+ |
| | | "<div style=\"page-break-after: always;\"></div>\n"+ |
| | | "</div>" ; |
| | | document.getElementById('print').innerHTML+=html; |
| | | document.getElementById('imgBar').id="imgBar"+xun; |
| | | xun+=1 |
| | | } |
| | | } |
| | | GetimgBar(field.StockCode,field.GroupCount,field.SameCount); |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | submit.trigger('click'); |
| | | }, |
| | | end:function(){ |
| | | location.reload(); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | $('.layui-btn.layuiadmin-btn-list').on('click', function() { |
| | | var type = $(this).data('type'); |
| | | active[type] ? active[type].call(this) : ''; |
| | | }); |
| | | //获取添加条形码 |
| | | function GetimgBar(StockCode,GroupCount,SameCount){ |
| | | var param = { |
| | | PalletNo:StockCode, |
| | | GroupCount: parseInt(GroupCount), |
| | | SameCount:parseInt(SameCount), |
| | | }; |
| | | console.log(param); |
| | | synData(IP + "/Sys/GetImgBar", param, 'post', function(res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | for(var i=0;i<res.data.length;i++){ |
| | | $("#"+"imgBar"+i).attr("src", res.data[i]); |
| | | } |
| | | |
| | | AddPallets(StockCode,GroupCount); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | //添加条形码 |
| | | function AddPallets(StockCode,GroupCount){ |
| | | //提交 Ajax 成功后,静态更新表格中的数据 |
| | | var param = { |
| | | GroupCount:parseInt(GroupCount), |
| | | }; |
| | | synData(IP + "/Sys/AddPallets", param, 'post', function(res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | $("#print").print(); |
| | | |
| | | } else if(res.code == 1){ |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } else { //不成功 |
| | | layer.msg(res.statusText, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }); |
| | | }; |
| | | //获取补打条形码 |
| | | function GetimgBar1(StockCode,GroupCount,SameCount){ |
| | | |
| | | var param = { |
| | | PalletNo:StockCode, |
| | | GroupCount:parseInt(GroupCount), |
| | | SameCount:parseInt(SameCount), |
| | | }; |
| | | synData(IP + "/Sys/GetImgBarReprint", param, 'post', function(res) { |
| | | console.log(res); |
| | | |
| | | if (res.code == 0) { //成功 |
| | | var ok=false; |
| | | for(var i=0;i<res.data.length;i++){ |
| | | $("#"+"imgBar"+i).attr("src", res.data[i]); |
| | | if(i==(res.data.length-1)){ |
| | | ok=true; |
| | | } |
| | | } |
| | | if(ok){ |
| | | $("#print").print(); |
| | | } |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }) |
| | | }; |
| | | |
| | | table.on('tool(LAY-app-content-list)', function(obj) { |
| | | var data = obj.data; |
| | | if (obj.event === 'edit') { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '托盘时间线', |
| | | content: 'PalletsTimeLine.html?PalletNo=' + data.PalletNo, |
| | | maxmin: true, |
| | | area: ['700px', '650px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function(index, layero){ |
| | | layer.close(index); //关闭弹层 |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event === 'print') { |
| | | PalletNo = data.PalletNo; |
| | | |
| | | layer.open({ |
| | | type: 2, |
| | | title: '打印托盘条码', |
| | | content: 'PalletsPrintFrom.html?PalletNo='+PalletNo, |
| | | maxmin: true, |
| | | area: ['600px', '300px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function(index, layero){ |
| | | var iframeWindow = window['layui-layer-iframe'+ index] |
| | | ,submitID = 'layuiadmin-app-form-submit' |
| | | ,submit = layero.find('iframe').contents().find('#'+ submitID); |
| | | //监听提交 |
| | | iframeWindow.layui.form.on('submit('+ submitID +')', function(data){ |
| | | var field = data.field; //获取提交的字段 |
| | | console.log(field); |
| | | |
| | | |
| | | var active = { |
| | | add: function () { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '打印托盘条码', |
| | | content: 'PalletsPrintFrom.html', |
| | | maxmin: true, |
| | | area: ['600px', '300px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function (index, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index] |
| | | , submitID = 'layuiadmin-app-form-submit' |
| | | , submit = layero.find('iframe').contents().find('#' + submitID); |
| | | //监听提交 |
| | | iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) { |
| | | var field = data.field; //获取提交的字段 |
| | | console.log(field); |
| | | if (isTrue = true) { |
| | | isTrue = false; |
| | | |
| | | var html = ""; |
| | | var xun = 0; |
| | | var isOk = false; |
| | | document.getElementById('print').innerHTML=""; |
| | | |
| | | for(var i=0;i<parseInt(field.GroupCount);i++){ |
| | | |
| | | for(var j=0;j<parseInt(field.SameCount);j++){ |
| | | html ="<div class=\"layui-form\" lay-filter=\"layuiadmin-app-form-list\" id=\"print\" style=\"width: 50%; text-align: center;padding-top: 10%;margin-left: 0%;\">\n"+ |
| | | "<div class=\"layui-form-item\">\n"+ |
| | | "<div class=\"layui-inline\">\n"+ |
| | | "<div class=\"\">\n"+ |
| | | "<img id=\"imgBar\" width=\"245px\" height=\"120px\" /></div>\n"+ |
| | | "</div>\n"+ |
| | | "</div>\n"+ |
| | | "</div>\n"+ |
| | | "<div style=\"page-break-after: always;\"></div>\n"+ |
| | | "</div>" ; |
| | | document.getElementById('print').innerHTML+=html; |
| | | document.getElementById('imgBar').id="imgBar"+xun; |
| | | xun+=1 |
| | | |
| | | } |
| | | |
| | | if(i==(parseInt(field.GroupCount)-1)){ |
| | | isOk= true; |
| | | document.getElementById('print').innerHTML = ""; |
| | | for (var i = 0; i < field.GroupCount; i++) { |
| | | |
| | | for (var j = 0; j < field.SameCount; j++) { |
| | | html = "<div class=\"layui-form\" lay-filter=\"layuiadmin-app-form-list\" id=\"print\" style=\"width: 50%; text-align: center;padding-top: 20%;margin-left: 19%;\">\n" + |
| | | "<div class=\"layui-form-item\">\n" + |
| | | "<div class=\"layui-inline\">\n" + |
| | | "<div class=\"\">\n" + |
| | | "<img id=\"imgBar\" width=\"245px\" height=\"120px\"/></div>\n" + |
| | | "</div>\n" + |
| | | "</div>\n" + |
| | | "</div>\n" + |
| | | "<div style=\"page-break-after: always;\"></div>\n" + |
| | | "</div>"; |
| | | document.getElementById('print').innerHTML += html; |
| | | document.getElementById('imgBar').id = "imgBar" + xun; |
| | | xun += 1 |
| | | } |
| | | } |
| | | if(isOk){ |
| | | GetimgBar1(field.StockCode,field.GroupCount,field.SameCount); |
| | | } |
| | | }); |
| | | submit.trigger('click'); |
| | | }, |
| | | end:function(){ |
| | | location.reload(); |
| | | return false; |
| | | } |
| | | |
| | | }); |
| | | GetimgBar(field.StockCode, field.GroupCount, field.SameCount); |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | submit.trigger('click'); |
| | | }, |
| | | end: function () { |
| | | location.reload(); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | $('.layui-btn.layuiadmin-btn-list').on('click', function () { |
| | | var type = $(this).data('type'); |
| | | active[type] ? active[type].call(this) : ''; |
| | | }); |
| | | //获取添加条形码 |
| | | function GetimgBar(StockCode, GroupCount, SameCount) { |
| | | var param = { |
| | | PalletNo: StockCode, |
| | | GroupCount: parseInt(GroupCount), |
| | | SameCount: parseInt(SameCount), |
| | | }; |
| | | console.log(param); |
| | | synData(IP + "/Sys/GetImgBar", param, 'post', function (res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#" + "imgBar" + i).attr("src", res.data[i]); |
| | | } |
| | | |
| | | AddPallets(StockCode, GroupCount); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | }; |
| | | //添加条形码 |
| | | function AddPallets(StockCode, GroupCount) { |
| | | //提交 Ajax 成功后,静态更新表格中的数据 |
| | | var param = { |
| | | GroupCount: parseInt(GroupCount), |
| | | }; |
| | | synData(IP + "/Sys/AddPallets", param, 'post', function (res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | $("#print").print(); |
| | | |
| | | } else if (res.code == 1) { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } else { //不成功 |
| | | layer.msg(res.statusText, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | }; |
| | | //获取补打条形码 |
| | | function GetimgBar1(StockCode, GroupCount, SameCount) { |
| | | |
| | | var param = { |
| | | PalletNo: StockCode, |
| | | GroupCount: parseInt(GroupCount), |
| | | SameCount: parseInt(SameCount), |
| | | }; |
| | | synData(IP + "/Sys/GetImgBarReprint", param, 'post', function (res) { |
| | | console.log(res); |
| | | |
| | | if (res.code == 0) { //成功 |
| | | var ok = false; |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#" + "imgBar" + i).attr("src", res.data[i]); |
| | | if (i == (res.data.length - 1)) { |
| | | ok = true; |
| | | } |
| | | } |
| | | if (ok) { |
| | | $("#print").print(); |
| | | } |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }) |
| | | }; |
| | | |
| | | table.on('tool(LAY-app-content-list)', function (obj) { |
| | | var data = obj.data; |
| | | if (obj.event === 'edit') { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '托盘时间线', |
| | | content: 'PalletsTimeLine.html?PalletNo=' + data.PalletNo, |
| | | maxmin: true, |
| | | area: ['700px', '650px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function (index, layero) { |
| | | layer.close(index); //关闭弹层 |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event === 'print') { |
| | | PalletNo = data.PalletNo; |
| | | |
| | | layer.open({ |
| | | type: 2, |
| | | title: '打印托盘条码', |
| | | content: 'PalletsPrintFrom.html?PalletNo=' + PalletNo, |
| | | maxmin: true, |
| | | area: ['600px', '300px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function (index, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index] |
| | | , submitID = 'layuiadmin-app-form-submit' |
| | | , submit = layero.find('iframe').contents().find('#' + submitID); |
| | | //监听提交 |
| | | iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) { |
| | | var field = data.field; //获取提交的字段 |
| | | console.log(field); |
| | | var html = ""; |
| | | var xun = 0; |
| | | var isOk = false; |
| | | document.getElementById('print').innerHTML = ""; |
| | | |
| | | for (var i = 0; i < parseInt(field.GroupCount); i++) { |
| | | |
| | | for (var j = 0; j < parseInt(field.SameCount); j++) { |
| | | html = "<div class=\"layui-form\" lay-filter=\"layuiadmin-app-form-list\" id=\"print\" style=\"width: 50%; text-align: center;padding-top: 20%;margin-left: 19%;\">\n" + |
| | | "<div class=\"layui-form-item\">\n" + |
| | | "<div class=\"layui-inline\">\n" + |
| | | "<div class=\"\">\n" + |
| | | "<img id=\"imgBar\" width=\"245px\" height=\"120px\" /></div>\n" + |
| | | "</div>\n" + |
| | | "</div>\n" + |
| | | "</div>\n" + |
| | | "<div style=\"page-break-after: always;\"></div>\n" + |
| | | "</div>"; |
| | | document.getElementById('print').innerHTML += html; |
| | | document.getElementById('imgBar').id = "imgBar" + xun; |
| | | xun += 1 |
| | | |
| | | } |
| | | |
| | | if (i == (parseInt(field.GroupCount) - 1)) { |
| | | isOk = true; |
| | | } |
| | | } |
| | | if (isOk) { |
| | | GetimgBar1(field.StockCode, field.GroupCount, field.SameCount); |
| | | } |
| | | }); |
| | | submit.trigger('click'); |
| | | }, |
| | | end: function () { |
| | | location.reload(); |
| | | return false; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | }); |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | '</option>'); |
| | | } else { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | .SkuName + "=>" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | } else { |
| | |
| | | '</option>'); |
| | | } else { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | .SkuName + "=>" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | |
| | |
| | | '</option>'); |
| | | } else { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | .SkuName + "=>" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | } |
| | |
| | | .SkuName); |
| | | } |
| | | if (res.data[i].LotNo != null) { |
| | | $("#goodSelect1").append("-" + res.data[i].LotNo + |
| | | $("#goodSelect1").append("=>" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | } else { |
| | |
| | | '</option>'); |
| | | } else { |
| | | $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | .SkuName + "=>" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model.ModelDto.BllAsnDto |
| | | { |
| | | public class LabelPrintInfoDto |
| | | { |
| | | /// <summary> |
| | | /// 剩余打印的数量 |
| | | /// </summary> |
| | | public string Qty { get; set; } |
| | | /// <summary> |
| | | /// 生产日期 |
| | | /// </summary> |
| | | public string ProductionTime { get; set; } |
| | | /// <summary> |
| | | /// 有效期 |
| | | /// </summary> |
| | | public string ExpirationTime { get; set; } |
| | | /// <summary> |
| | | /// 储存期至 |
| | | /// </summary> |
| | | public string StoreTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供货批次 |
| | | /// </summary> |
| | | public string SupplierLot { get; set; } |
| | | } |
| | | } |
| | |
| | | public string Lot6 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 标签常值 |
| | | /// </summary> |
| | | public string BoxCodeStr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 自定义列1 |
| | | /// </summary> |
| | | public string UDF1 { get; set; } |
| | |
| | | using Model.InterFaceModel; |
| | | using Model.ModelDto; |
| | | using Model.ModelDto.BllAsnDto; |
| | | using Model.ModelDto.SysDto; |
| | | using Model.ModelVm; |
| | | using Model.ModelVm.SysVm; |
| | |
| | | } |
| | | |
| | | //获取入库单明细剩余打印数量 |
| | | public string GetAsnDetailQtyList(int id) |
| | | public LabelPrintInfoDto GetAsnDetailQtyList(int id) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | throw new Exception("未查询到入库单明细"); |
| | | } |
| | | var data = new LabelPrintInfoDto(); |
| | | |
| | | data.ProductionTime = string.IsNullOrEmpty(detail.Lot1) ? "" : Convert.ToDateTime(detail.Lot1).ToString("yyyy-MM-dd"); |
| | | data.ExpirationTime = string.IsNullOrEmpty(detail.Lot2) ? "" : Convert.ToDateTime(detail.Lot2).ToString("yyyy-MM-dd"); |
| | | data.SupplierLot = detail.SupplierLot; |
| | | var labelQty = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNDetailNo == id).Sum(m => m.Qty + (m.SamplingQty == null? 0: m.SamplingQty)); |
| | | if (labelQty == null) |
| | | { |
| | |
| | | { |
| | | qty = 0; |
| | | } |
| | | return qty.ToString(); |
| | | data.Qty = qty.ToString(); |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | detailModel.LotNo = maxLotNo; |
| | | } |
| | | } |
| | | if (model.Type == "0" || model.Type == "1" || model.Type == "2" || model.Type == "3" || model.Type == "4" && model.Type == "8") |
| | | //if (model.Type == "0" || model.Type == "1" || model.Type == "2" || model.Type == "3" || model.Type == "4" && model.Type == "8") |
| | | //{ |
| | | // if (string.IsNullOrWhiteSpace(detailModel.LotNo)) |
| | | // { |
| | | // throw new Exception("当前单据类型批次不可为空!"); |
| | | // } |
| | | //} |
| | | detailModel.BoxCodeStr = detailModel.LotNo; |
| | | if (string.IsNullOrWhiteSpace(detailModel.LotNo)) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(detailModel.LotNo)) |
| | | string toDayTime = DateTime.Now.ToString("yyyyMM"); |
| | | var maxBoxCodeStr = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && m.BoxCodeStr.Contains("BK") && m.CreateTime.ToString("yyyyMMdd") == DateTime.Now.ToString("yyyyMMdd")).Max(m => m.BoxCodeStr); |
| | | if(string.IsNullOrWhiteSpace(maxBoxCodeStr)) |
| | | { |
| | | throw new Exception("当前单据类型批次不可为空!"); |
| | | maxBoxCodeStr = "BK" + toDayTime.Substring(2, 4) + "0001"; |
| | | } |
| | | else |
| | | { |
| | | maxBoxCodeStr = "BK" + (int.Parse(maxBoxCodeStr.Replace("BK", "")) + 1).ToString(); |
| | | } |
| | | detailModel.BoxCodeStr = maxBoxCodeStr; |
| | | } |
| | | |
| | | // 判断是否已存在当前明细 |
| | |
| | | } |
| | | string lot1 = detailModel.Lot1; |
| | | string lot2 = detailModel.Lot2; |
| | | if (sku.IsPasteCode == "0") |
| | | if (sku.IsInspect == "0")//是否免检,0:否 1:是 |
| | | { |
| | | //不贴标物料 生产日期、有效期不能为空 |
| | | //不免检物料 生产日期、有效期不能为空 |
| | | DateTime lot12; |
| | | DateTime lot22; |
| | | if (!DateTime.TryParse(detailModel.Lot1, out lot12)) |
| | | { |
| | | throw new Exception("非贴标物料生产日期转换失败"); |
| | | throw new Exception("不免检物料生产日期转换失败"); |
| | | } |
| | | if (!DateTime.TryParse(detailModel.Lot2, out lot22)) |
| | | { |
| | | throw new Exception("非贴标物料过期日期转换失败"); |
| | | throw new Exception("不免检物料过期日期转换失败"); |
| | | } |
| | | lot1 = lot12.ToString(); |
| | | lot2 = lot22.ToString(); |
| | |
| | | SkuNo = detailModel.SkuNo, |
| | | SkuName = detailModel.SkuName, |
| | | Standard = detailModel.Standard, |
| | | LotNo = detailModel.LotNo.Trim(), |
| | | LotNo = detailModel.LotNo == null ? "" : detailModel.LotNo.Trim(), |
| | | LotText = detailModel.LotText, |
| | | Qty = (decimal)detailModel.Qty, |
| | | PackagNo = detailModel.PackagNo, |
| | |
| | | InspectStatus = "0", |
| | | Lot1 = lot1, //生产日期 |
| | | Lot2 = lot2, // 过期日期 |
| | | BoxCodeStr = detailModel.BoxCodeStr, |
| | | UDF1 = detailModel.UDF1, |
| | | UDF2 = detailModel.UDF2, |
| | | UDF3 = detailModel.UDF3, |
| | |
| | | return strMessage; |
| | | } |
| | | |
| | | if (model.Type == "0" || model.Type == "2" || model.Type == "3" || model.Type == "4") |
| | | { |
| | | if (string.IsNullOrWhiteSpace(detailModel.LotNo)) |
| | | { |
| | | throw new Exception("当前单据类型批次不可为空!"); |
| | | } |
| | | } |
| | | //if (model.Type == "0" || model.Type == "2" || model.Type == "3" || model.Type == "4") |
| | | //{ |
| | | // if (string.IsNullOrWhiteSpace(detailModel.LotNo)) |
| | | // { |
| | | // throw new Exception("当前单据类型批次不可为空!"); |
| | | // } |
| | | //} |
| | | |
| | | if (TypeLot.Contains(model.Type)) |
| | | { |
| | |
| | | //生成自有批次 |
| | | if (detailModel.Id == 0 || detailModel.Id == null || string.IsNullOrWhiteSpace(detailModel.LotNo)) |
| | | { |
| | | var notice = Db.Queryable<BllArrivalNotice>().Where(m => m.IsDel == "0" && TypeLot.Contains(m.Type)).Select(m => m.ASNNo).ToList(); |
| | | if (string.IsNullOrWhiteSpace(maxLotNo)) |
| | | //var notice = Db.Queryable<BllArrivalNotice>().Where(m => m.IsDel == "0" && TypeLot.Contains(m.Type)).Select(m => m.ASNNo).ToList(); |
| | | //if (string.IsNullOrWhiteSpace(maxLotNo)) |
| | | //{ |
| | | // maxLotNo = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && !string.IsNullOrWhiteSpace(m.LotNo) && notice.Contains(m.ASNNo)).Max(m => m.LotNo); |
| | | //} |
| | | //if (string.IsNullOrWhiteSpace(maxLotNo)) |
| | | //{ |
| | | // maxLotNo = toDayTime.Substring(2, 6) + "0001"; |
| | | //} |
| | | //else |
| | | //{ |
| | | // var lotStr = maxLotNo.Substring(0, 6); |
| | | // var timeStr = toDayTime.Substring(2, 6); |
| | | // if (lotStr == timeStr) |
| | | // { |
| | | // maxLotNo = toDayTime.Substring(2, 6) + (int.Parse(maxLotNo.Substring(6, 4)) + 1).ToString().PadLeft(4, '0'); |
| | | // } |
| | | // else |
| | | // { |
| | | // maxLotNo = timeStr + "0001"; |
| | | // } |
| | | //} |
| | | //detailModel.LotNo = maxLotNo; |
| | | var maxBoxCodeStr = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && m.BoxCodeStr.Contains("BK") && m.CreateTime.ToString("yyyyMMdd") == DateTime.Now.ToString("yyyyMMdd")).Max(m => m.BoxCodeStr); |
| | | if (string.IsNullOrWhiteSpace(maxBoxCodeStr)) |
| | | { |
| | | maxLotNo = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && !string.IsNullOrWhiteSpace(m.LotNo) && notice.Contains(m.ASNNo)).Max(m => m.LotNo); |
| | | } |
| | | if (string.IsNullOrWhiteSpace(maxLotNo)) |
| | | { |
| | | maxLotNo = toDayTime.Substring(2, 6) + "0001"; |
| | | maxBoxCodeStr = "BK" + toDayTime.Substring(2, 4) + "0001"; |
| | | } |
| | | else |
| | | { |
| | | var lotStr = maxLotNo.Substring(0, 6); |
| | | var timeStr = toDayTime.Substring(2, 6); |
| | | if (lotStr == timeStr) |
| | | { |
| | | maxLotNo = toDayTime.Substring(2, 6) + (int.Parse(maxLotNo.Substring(6, 4)) + 1).ToString().PadLeft(4, '0'); |
| | | } |
| | | else |
| | | { |
| | | maxLotNo = timeStr + "0001"; |
| | | } |
| | | maxBoxCodeStr = "BK" + (int.Parse(maxBoxCodeStr.Replace("BK", "")) + 1).ToString(); |
| | | } |
| | | detailModel.LotNo = maxLotNo; |
| | | detailModel.BoxCodeStr = maxBoxCodeStr; |
| | | } |
| | | |
| | | if (detailModel.Id == 0 || detailModel.Id == null) |
| | |
| | | SkuNo = detailModel.SkuNo, |
| | | SkuName = detailModel.SkuName, |
| | | Standard = detailModel.Standard, |
| | | LotNo = detailModel.LotNo.Trim(), |
| | | LotNo = detailModel.LotNo == null ? "" : detailModel.LotNo.Trim(), |
| | | LotText = detailModel.LotText, |
| | | Qty = (decimal)detailModel.Qty, |
| | | PackagNo = detailModel.PackagNo, |
| | |
| | | InspectStatus = "0", |
| | | Lot1 = detailModel.Lot1, |
| | | Lot2 = detailModel.Lot2, |
| | | BoxCodeStr = detailModel.BoxCodeStr, |
| | | UDF1 = detailModel.UDF1, |
| | | UDF2 = detailModel.UDF2, |
| | | UDF3 = detailModel.UDF3, |
| | |
| | | && it.IsBelt == detailModel.IsBelt |
| | | && it.Lot1 == detailModel.Lot1 // 生产日期 |
| | | && it.Lot2 == detailModel.Lot2 // 过期日期 |
| | | && it.BoxCodeStr == detailModel.BoxCodeStr |
| | | && it.UDF1 == detailModel.UDF1 |
| | | && it.UDF2 == detailModel.UDF2 |
| | | && it.UDF3 == detailModel.UDF3 |
| | |
| | | detailModel.Money = detailModel.Price * detailModel.Qty; |
| | | |
| | | dbDetail.Qty = (decimal)detailModel.Qty; |
| | | dbDetail.LotNo = detailModel.LotNo; |
| | | dbDetail.LotNo = detailModel.LotNo == null ? "" : detailModel.LotNo.Trim(); |
| | | dbDetail.Money = detailModel.Money; |
| | | dbDetail.LotText = detailModel.LotText; |
| | | dbDetail.SupplierLot = detailModel.SupplierLot; |
| | | dbDetail.IsBale = detailModel.IsBale; |
| | | dbDetail.Lot1 = detailModel.Lot1; |
| | | dbDetail.Lot2 = detailModel.Lot2; |
| | | dbDetail.BoxCodeStr = detailModel.BoxCodeStr; |
| | | dbDetail.UDF1 = detailModel.UDF1; |
| | | dbDetail.UDF2 = detailModel.UDF2; |
| | | dbDetail.UDF3 = detailModel.UDF3; |
| | |
| | | CreateTime = a.CreateTime, |
| | | UpdateTime = a.UpdateTime |
| | | |
| | | }).OrderByDescending(a => a.CreateTime).OrderBy(a => a.BoxNo).ToOffsetPage(model.Page, model.Limit, ref total); |
| | | }).OrderByDescending(a => a.ASNNo).OrderBy(a => a.BoxNo).ToOffsetPage(model.Page, model.Limit, ref total); |
| | | count = total; |
| | | return data; |
| | | } |
| | |
| | | { |
| | | throw new Exception("单据数量不能小于等于0"); |
| | | } |
| | | if (string.IsNullOrWhiteSpace(asnList.LotNo)) |
| | | //if (string.IsNullOrWhiteSpace(asnList.LotNo)) |
| | | //{ |
| | | // throw new Exception("单据批次号不能为空"); |
| | | //} |
| | | if (string.IsNullOrWhiteSpace(asnList.BoxCodeStr)) |
| | | { |
| | | throw new Exception("单据批次号不能为空"); |
| | | throw new Exception("单据箱码常值不能为空"); |
| | | } |
| | | var asn = Db.Queryable<BllArrivalNotice>().First(m => m.ASNNo == asnList.ASNNo && m.IsDel == "0"); |
| | | if (asn == null) |
| | |
| | | |
| | | string maxLotNoStr = ""; //批次号 |
| | | string maxBoxCode = ""; //箱码号 |
| | | |
| | | maxLotNoStr = asnList.LotNo; |
| | | maxBoxCode = label.Where(m => m.LotNo == maxLotNoStr).Max(a => a.BoxNo); |
| | | |
| | | maxLotNoStr = asnList.BoxCodeStr;//asnList.LotNo; |
| | | if (string.IsNullOrEmpty(asnList.LotNo)) |
| | | { |
| | | maxBoxCode = label.Where(m => m.ASNDetailNo == asnList.Id).Max(a => a.BoxNo); |
| | | } |
| | | else |
| | | { |
| | | maxBoxCode = label.Where(m => m.LotNo == maxLotNoStr).Max(a => a.BoxNo); |
| | | } |
| | | #endregion |
| | | |
| | | for (int i = 1; i <= labelNum; i++) |
| | |
| | | Status = "0", |
| | | SkuNo = asnList.SkuNo, |
| | | SkuName = asnList.SkuName, |
| | | LotNo = maxLotNoStr, |
| | | LotNo = asnList.LotNo,//maxLotNoStr, |
| | | Standard = asnList.Standard, |
| | | PackageStandard = packStr, |
| | | SupplierLot = supplierLot, |
| | |
| | | |
| | | model.ExpirationTime = data.ExpirationTime; // 有效期至 |
| | | model.StoreTime = data.StoreTime; // 储存期至 |
| | | model.ProductionTime = data.ProductionTime;//生产日期 |
| | | |
| | | model.Qty = dataList.Sum(m => m.Qty);// 数量 |
| | | |
| | |
| | | |
| | | model.ExpirationTime = data.ExpirationTime; // 有效期至 |
| | | model.StoreTime = data.StoreTime; // 储存期至 |
| | | model.ProductionTime = data.ProductionTime;//生产日期 |
| | | |
| | | model.Qty = data1.Sum(m => m.Qty);// 数量 |
| | | |
| | |
| | | |
| | | model.ExpirationTime = data.ExpirationTime; // 有效期至 |
| | | model.StoreTime = data.StoreTime; // 储存期至 |
| | | model.ProductionTime = data.ProductionTime;//生产日期 |
| | | |
| | | model.Qty = data.Qty;// 数量 |
| | | |
| | |
| | | |
| | | model.ExpirationTime = data.ExpirationTime; // 有效期至 |
| | | model.StoreTime = data.StoreTime; // 储存期至 |
| | | model.ProductionTime = data.ProductionTime;//生产日期 |
| | | |
| | | model.Qty = data.Qty;// 数量 |
| | | |
| | |
| | | |
| | | model1.ExpirationTime = data.ExpirationTime; // 有效期至 |
| | | model1.StoreTime = data.StoreTime; // 储存期至 |
| | | model1.ProductionTime = data.ProductionTime;//生产日期 |
| | | model1.Qty = dataList.Sum(m => m.Qty);// 数量 |
| | | model1.BoxNo = data.BoxNo; // 箱号 |
| | | |
| | |
| | | |
| | | model.ExpirationTime = data.ExpirationTime; // 有效期至 |
| | | model.StoreTime = data.StoreTime; // 储存期至 |
| | | model.ProductionTime = data.ProductionTime;//生产日期 |
| | | model.Qty = data.Qty;// 数量 |
| | | model.BoxNo = data.BoxNo3; // 支号 |
| | | |
| | |
| | | |
| | | model.ExpirationTime = boxData.ExpirationTime; // 有效期至 |
| | | model.StoreTime = boxData.StoreTime; // 储存期至 |
| | | model.ProductionTime = boxData.ProductionTime;//生产日期 |
| | | model.Qty = data.Sum(m => m.Qty); // 数量 |
| | | model.BoxNo = boxData.BoxNo; // 支号 |
| | | |
| | |
| | | |
| | | model1.ExpirationTime = item.ExpirationTime; // 有效期至 |
| | | model1.StoreTime = item.StoreTime; // 储存期至 |
| | | model1.ProductionTime = item.ProductionTime;//生产日期 |
| | | model1.Qty = item.Qty;// 数量 |
| | | model1.BoxNo = item.BoxNo3; // 支号 |
| | | |
| | |
| | | |
| | | model.ExpirationTime = boxData.ExpirationTime; // 有效期至 |
| | | model.StoreTime = boxData.StoreTime; // 储存期至 |
| | | model.ProductionTime = boxData.ProductionTime;//生产日期 |
| | | model.Qty = data.Sum(m => m.Qty); // 数量 |
| | | model.BoxNo = boxData.BoxNo; // 支号 |
| | | |
| | |
| | | |
| | | model1.ExpirationTime = item.ExpirationTime; // 有效期至 |
| | | model1.StoreTime = item.StoreTime; // 储存期至 |
| | | model.ProductionTime = item.ProductionTime;//生产日期 |
| | | model1.Qty = item.Qty; // 数量 |
| | | model1.BoxNo = item.BoxNo3; // 支号 |
| | | |
| | |
| | | |
| | | model.ExpirationTime = boxData.ExpirationTime; // 有效期至 |
| | | model.StoreTime = boxData.StoreTime; // 储存期至 |
| | | model.ProductionTime = boxData.ProductionTime;//生产日期 |
| | | model.Qty = data.Sum(m => m.Qty); // 数量 |
| | | model.BoxNo = boxData.BoxNo; // 支号 |
| | | |
| | |
| | | |
| | | model1.ExpirationTime = item.ExpirationTime; // 有效期至 |
| | | model1.StoreTime = item.StoreTime; // 储存期至 |
| | | model.ProductionTime = item.ProductionTime;//生产日期 |
| | | model1.Qty = item.Qty;// 数量 |
| | | model1.BoxNo = item.BoxNo3; // 支号 |
| | | |
| | |
| | | else |
| | | { |
| | | //从物料名称-批次中取出批次 |
| | | int indexOfDash = model.LotNo.IndexOf("-"); |
| | | int indexOfDash = model.LotNo.IndexOf("=>"); |
| | | if (indexOfDash != -1) |
| | | { |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 1); |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 2); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("物料-批次不可为空!"); |
| | | model.LotNo = ""; |
| | | //throw new Exception("物料-批次不可为空!"); |
| | | } |
| | | } |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region 质检请验 |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1") |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1") |
| | | { |
| | | var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot); |
| | | if (qualityRequest == null) |
| | |
| | | #endregion |
| | | |
| | | #region 质检请验 |
| | | if ((arrNotice.Type == "1" || arrNotice.Type == "4" || arrNotice.Type == "5") && sku.IsInspect != "1") |
| | | if ((arrNotice.Type == "1" || arrNotice.Type == "4" || arrNotice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1") |
| | | { |
| | | var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot); |
| | | if (qualityRequest == null) |
| | |
| | | else |
| | | { |
| | | //从物料名称-批次中取出批次 |
| | | int indexOfDash = model.LotNo.IndexOf("-"); |
| | | int indexOfDash = model.LotNo.IndexOf("=>"); |
| | | if (indexOfDash != -1) |
| | | { |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 1); |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 2); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("物料批次不可为空!"); |
| | | model.LotNo = ""; |
| | | //throw new Exception("物料批次不可为空!"); |
| | | } |
| | | } |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region 质检请验 |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1") |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1") |
| | | { |
| | | var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot); |
| | | if (qualityRequest == null) |
| | |
| | | if (boxNoList.Count > 0) |
| | | { |
| | | data.BoxNoList = boxNoList; |
| | | data.Date1 = item.ProductionTime.ToString(); |
| | | data.Date2 = item.ExpirationTime.ToString(); |
| | | data.Date1 = item.ProductionTime == null ? "" : Convert.ToDateTime(item.ProductionTime).ToString("yyyy-MM-dd"); |
| | | data.Date2 = item.ExpirationTime == null ? "" : Convert.ToDateTime(item.ExpirationTime).ToString("yyyy-MM-dd"); |
| | | |
| | | break; |
| | | } |
| | |
| | | #endregion |
| | | |
| | | #region 质检请验 |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1") |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1") |
| | | { |
| | | var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot); |
| | | if (qualityRequest == null) |
| | |
| | | throw new Exception("物料信息为空,请核查!"); |
| | | } |
| | | //验证批次号是否为空 |
| | | if (string.IsNullOrEmpty(model.LotNo)) |
| | | if (string.IsNullOrEmpty(model.LotNo) && string.IsNullOrEmpty(model.ASNNo)) |
| | | { |
| | | throw new Exception("批次号不可为空,请核查!"); |
| | | throw new Exception("请输入批次号或入库单号!"); |
| | | } |
| | | //验证入库单号是否为空 |
| | | if (string.IsNullOrEmpty(model.ASNNo)) |
| | | { |
| | | throw new Exception("入库单号不可为空!"); |
| | | //if (string.IsNullOrEmpty(model.ASNNo)) |
| | | //{ |
| | | // throw new Exception("入库单号不可为空!"); |
| | | |
| | | |
| | | //查询是否为退货入库单据 |
| | | //var Arrival = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.Type == "3"); |
| | | //if (Arrival == null) |
| | | //{ |
| | | // throw new Exception("只有入库单据为退货入库单可输入 入库单号,请核查!"); |
| | | //} |
| | | //查询是否为退货入库单据 |
| | | //var Arrival = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.Type == "3"); |
| | | //if (Arrival == null) |
| | | //{ |
| | | // throw new Exception("只有入库单据为退货入库单可输入 入库单号,请核查!"); |
| | | //} |
| | | |
| | | ////获取入库单明细 |
| | | //var ArrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.LotNo.Contains(model.LotNo) && a.SkuNo == model.SkuNo); |
| | | //if (ArrivalDetail == null) |
| | | //{ |
| | | // throw new Exception("输入的批次或物料信息与入库单据不符,请核查!"); |
| | | //} |
| | | //isTui = 1; |
| | | } |
| | | ////获取入库单明细 |
| | | //var ArrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.LotNo.Contains(model.LotNo) && a.SkuNo == model.SkuNo); |
| | | //if (ArrivalDetail == null) |
| | | //{ |
| | | // throw new Exception("输入的批次或物料信息与入库单据不符,请核查!"); |
| | | //} |
| | | //isTui = 1; |
| | | //} |
| | | |
| | | //查找质检信息中是否存在同批次质检录入记录 |
| | | //BllQualityInspect quality = Db.Queryable<BllQualityInspect>().First(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo); |
| | | |
| | | //if (quality != null) |
| | | //{ |
| | | ////判断是否为退货入库单 |
| | | //if (isTui == 1) |
| | | //{ |
| | | // if (quality.ASNNo == model.ASNNo) |
| | | // { |
| | | // throw new Exception("当前退货入库单已创建质检信息,请勿重复创建!"); |
| | | // } |
| | | //} |
| | | ////判断是否为退货入库单 |
| | | //if (isTui == 1) |
| | | //{ |
| | | // if (quality.ASNNo == model.ASNNo) |
| | | // { |
| | | // throw new Exception("当前退货入库单已创建质检信息,请勿重复创建!"); |
| | | // } |
| | | //} |
| | | // throw new Exception("当前物料和批次已进行质检,请核查!"); |
| | | //} |
| | | |
| | | ////查找同批次 同单据 入库单信息、 |
| | | BllArrivalNoticeDetail arrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" |
| | | && m.ASNNo == model.ASNNo && m.LotNo == model.LotNo && m.SkuNo == model.SkuNo); |
| | | string sqlStr = $@"select * from BllArrivalNoticeDetail where IsDel='0' and SkuNo='{model.SkuNo}' "; |
| | | if (!string.IsNullOrEmpty(model.ASNNo)) |
| | | { |
| | | sqlStr += $" and ASNNo='{model.ASNNo}' "; |
| | | } |
| | | if (!string.IsNullOrEmpty(model.LotNo)) |
| | | { |
| | | sqlStr += $" and LotNo='{model.LotNo}' "; |
| | | } |
| | | BllArrivalNoticeDetail arrivalDetail = Db.SqlQueryable<BllArrivalNoticeDetail>(sqlStr).First(); |
| | | if (arrivalDetail == null) |
| | | { |
| | | throw new Exception("未找到入库单信息!"); |
| | |
| | | model.PassQty = 0; //合格数量 |
| | | model.FailQty = 0; //不合格数量 |
| | | model.Standard = sku.Standard; //规格 |
| | | //model.SupplierLot = arrivalDetail.SupplierLot; //供货批次 |
| | | //model.SupplierLot = arrivalDetail.SupplierLot; //供货批次 |
| | | |
| | | //查找库存明细信息 |
| | | List<DataStockDetail> detail = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo).ToList(); |
| | | string sqlStr2 = $@"select * from DataStockDetail where IsDel='0' and SkuNo='{model.SkuNo}' "; |
| | | if (!string.IsNullOrEmpty(model.ASNNo)) |
| | | { |
| | | sqlStr2 += $" and ASNNo='{model.ASNNo}' "; |
| | | } |
| | | if (!string.IsNullOrEmpty(model.LotNo)) |
| | | { |
| | | sqlStr2 += $" and LotNo='{model.LotNo}' "; |
| | | } |
| | | List<DataStockDetail> detail = Db.SqlQueryable<DataStockDetail>(sqlStr2).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(); |
| | |
| | | foreach (var item in list) |
| | | { |
| | | var outModeLocate = ""; |
| | | if (outMode == "1") |
| | | if (outMode == "17") |
| | | { |
| | | if (i < outLocatelist1.Count) |
| | | { |
| | |
| | | else |
| | | { |
| | | var j = i % outLocatelist1.Count; |
| | | |
| | | |
| | | outModeLocate = outLocatelist1[j].LocatNo; |
| | | } |
| | | } |
| | | else if(outMode == "2") |
| | | else if (outMode == "18") |
| | | { |
| | | if (i < outLocatelist1.Count) |
| | | { |
| | |
| | | outModeLocate = outLocatelist2[j].LocatNo; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("出库口工位异常"); |
| | | } |
| | | |
| | | var taskNoStr = ""; |
| | | |
| | |
| | | string boxNo, string status, string inspectMark, string bitBoxMark, string inspectStatus) |
| | | { |
| | | string str = "select PalletNo,PalletNo2,PalletNo3,BoxNo,BoxNo2,BoxNo3,Status,LotNo,Qty,FullQty,SkuNo,SkuName," + |
| | | "LotText,ProductionTime,InspectMark,BitBoxMark,InspectStatus,InspectTime from DataBoxInfo Where IsDel = @isdel"; |
| | | "LotText,ProductionTime,ExpirationTime,InspectMark,BitBoxMark,InspectStatus,InspectTime from DataBoxInfo Where IsDel = @isdel"; |
| | | //判断id是否为空 |
| | | if (!string.IsNullOrEmpty(id)) |
| | | { |
| | |
| | | RQty = tb1.Qty, |
| | | RFactQty = tb1.Qty, |
| | | RCompleteQty = tb1.Qty, |
| | | CompleteTime = tb1.CompleteTime, |
| | | CompleteTime = tb2.CreateTime, |
| | | LotText = tb1.LotText, |
| | | SupplierLot = tb2.SupplierLot, |
| | | |
| | |
| | | |
| | | SONo = tb2.SONo, |
| | | CTaskNo = tb1.TaskNo, |
| | | CCreateTime = tb1.UpdateTime, |
| | | CCreateTime = tb1.CreateTime, |
| | | CQty = tb1.Qty, |
| | | CFactQty = tb1.Qty, |
| | | CAllotQty = tb1.Qty, |
| | |
| | | .Includes(x => x.CreateUserInfo) |
| | | .Includes(x => x.UpdateUserInfo) |
| | | .ToListAsync(); |
| | | count = counts; |
| | | count.Value = counts; |
| | | |
| | | return data.Select(m => new CustomerDto() |
| | | { |
| | |
| | | var data = await PackagRst.GetAllByOrderPage(item, limit, page, out int counts) |
| | | .Includes(x => x.CreateUserInfo) |
| | | .Includes(x => x.UpdateUserInfo).ToListAsync(); |
| | | count = counts; |
| | | |
| | | count.Value = counts; |
| | | |
| | | return data.Select(m => new PackagDto() |
| | | { |
| | |
| | | var data = await UnitRst.GetAllByOrderPage(item, limit, page, out int counts) |
| | | .Includes(x => x.CreateUserInfo) |
| | | .Includes(x => x.UpdateUserInfo).ToListAsync(); |
| | | count = counts; |
| | | count.Value = counts; |
| | | return data.Select(m => new UnitDto() |
| | | { |
| | | Id = m.Id, |
| | |
| | | public string Lot6 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 标签常值 |
| | | /// </summary> |
| | | public string BoxCodeStr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 自定义列1 |
| | | /// </summary> |
| | | public string UDF1 { get; set; } |
| | |
| | | using Model.InterFaceModel; |
| | | using Model.ModelDto; |
| | | using Model.ModelDto.BllAsnDto; |
| | | using Model.ModelDto.SysDto; |
| | | using Model.ModelVm; |
| | | using Model.ModelVm.SysVm; |
| | |
| | | /// </summary> |
| | | /// <param name="id">id</param> |
| | | /// <returns></returns> |
| | | string GetAsnDetailQtyList(int id); |
| | | LabelPrintInfoDto GetAsnDetailQtyList(int id); |
| | | |
| | | /// <summary> |
| | | /// 获取物料信息(添加入库单明细使用) |
| | |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _customerSvc.GetCustomerList(model.CustomerNo, model.CustomerName, model.Type, model.LinkMan, model.Phone, model.Page, model.Limit, count); |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count.Value }; |
| | | } |
| | | /// <summary> |
| | | /// 查询单条客户信息 |
| | |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var list = await _unitSvc.GetUnitList(model.UnitNo, model.UnitName, model.Page, model.Limit, count); |
| | | return new SqlSugarPagedList() { Items = list, Total = count }; |
| | | return new SqlSugarPagedList() { Items = list, Total = count.Value }; |
| | | } |
| | | /// <summary> |
| | | /// 查询单条单位信息 |
| | |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var list = await _packagSvc.GetPackagList(model.PackagNo, model.PackagName, model.Level, model.Page, model.Limit, count); |
| | | return new SqlSugarPagedList { Items = list, Total = count }; |
| | | return new SqlSugarPagedList { Items = list, Total = count.Value }; |
| | | } |
| | | |
| | | /// <summary> |