| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">批次号</label> |
| | | <label class="layui-form-label">进厂编号</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-right: 0;"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | { field: 'BoxNo3', title: '支号', align: 'center', fixed: 'left', width: 220, "disabled": true }, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', fixed: 'left', width: 140, "disabled": true }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center', fixed: 'left', width: 240, "disabled": true }, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 155, }, |
| | | { field: 'LotNo', title: '进厂编号', align: 'center', width: 155, }, |
| | | { field: 'Qty', title: '数量', align: 'center', width: 100, }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 165 }, |
| | | { field: 'ProductionTime', title: '生产日期', align: 'center', width: 160, templet: '#templetProductionTime' }, |
| | | { field: 'ExpirationTime', title: '过期日期', align: 'center', width: 160, templet: '#templetExpirationTime' }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 155 }, |
| | | { field: 'SupplierLot', title: '原厂批号', align: 'center', width: 155 }, |
| | | { field: 'InspectMark', title: '抽检标记', align: 'center', templet: '#templetInspectMark', width: 90 }, |
| | | { field: 'BitBoxMark', title: '零箱标记', align: 'center', templet: '#templetBitBoxMark', width: 90 }, |
| | | { field: 'Origin', title: '来源', align: 'center', }, |
| | |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function bindTable() { |
| | | //#region 原始非自定义列 |
| | | // var param = { |
| | | // BoxNo: $("#BoxNo").val(), |
| | | // // BoxNo2: $("#BoxNo2").val(), |
| | | // BoxNo3: $("#BoxNo3").val(), |
| | | // SkuNo: $("#SkuNo").val(), |
| | | // LotNo: $("#LotNo").val(), |
| | | // LotText: $("#LotText").val(), |
| | | // ProductionTime: $("#ProductionTime").val(), |
| | | // InspectMark: $("#InspectMark").val(), |
| | | // BitBoxMark: $("#BitBoxMark").val(), |
| | | // // Origin: "录入", |
| | | // }; |
| | | |
| | | // table.render({ |
| | | // elem: '#Box-list', |
| | | // url: IP + "/BllAsn/GetBllBoxInfoList", |
| | | // method: 'POST', |
| | | // height: 'full-136', |
| | | // id: 'Box-list', |
| | | // where: param, |
| | | // contentType: 'application/json', |
| | | // toolbar: '#toolbarDemo', |
| | | // defaultToolbar: [], //'filter','print', 'exports' |
| | | // headers: { ToKen: $.cookie('token') }, |
| | | // page: true, |
| | | // even: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // done: function (res) { |
| | | // setRight(); |
| | | // }, |
| | | // cols: [ |
| | | // [{ |
| | | // field: 'BoxNo', |
| | | // title: '箱号', |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // width: 220 |
| | | // }, { |
| | | // field: 'BoxNo2', |
| | | // title: '盒号', |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // hide:true |
| | | // }, { |
| | | // field: 'BoxNo3', |
| | | // title: '支号', |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // width: 220 |
| | | // }, { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // width: 140 |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // width: 240 |
| | | // }, { |
| | | // field: 'LotNo', |
| | | // title: '批次号', |
| | | // align: 'center', |
| | | // width: 155, |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '数量', |
| | | // align: 'center', |
| | | // width: 100, |
| | | // }, { |
| | | // field: 'LotText', |
| | | // title: '批次描述', |
| | | // align: 'center', |
| | | // width: 165 |
| | | |
| | | // }, { |
| | | // field: 'ProductionTime', |
| | | // title: '生产日期', |
| | | // align: 'center', |
| | | // width: 160, |
| | | // templet: function (d) { |
| | | // return formatDate2(d.ProductionTime); |
| | | // } |
| | | // }, { |
| | | // field: 'ExpirationTime', |
| | | // title: '过期日期', |
| | | // align: 'center', |
| | | // width: 160, |
| | | // templet: function (d) { |
| | | // return formatDate2(d.ExpirationTime); |
| | | // } |
| | | // }, { |
| | | // field: 'SupplierLot', |
| | | // title: '供货批次', |
| | | // align: 'center', |
| | | // width: 155 |
| | | // }, { |
| | | // field: 'InspectMark', |
| | | // title: '抽检标记', |
| | | // align: 'center', |
| | | // templet: function (d) { |
| | | // switch (d.InspectMark) { |
| | | // 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-xs layui-btn-danger ">是</button>'; |
| | | // default: return ""; |
| | | // } |
| | | // }, |
| | | // width: 90 |
| | | // }, { |
| | | // field: 'BitBoxMark', |
| | | // title: '零箱标记', |
| | | // align: 'center', |
| | | // templet: function (d) { |
| | | // switch (d.BitBoxMark) { |
| | | // 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-xs layui-btn-danger">是</button>'; |
| | | // default: return ""; |
| | | // } |
| | | // }, |
| | | // width: 90 |
| | | // }, { |
| | | // field: 'Origin', |
| | | // title: '来源', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'CreateUserName', |
| | | // title: '创建人', |
| | | // align: 'center', |
| | | // width: 100 |
| | | // }, { |
| | | // field: 'CreateTime', |
| | | // title: '创建时间', |
| | | // align: 'center', |
| | | // width: 160, |
| | | // templet: function (d) { |
| | | // return formatDate(d.CreateTime); |
| | | // } |
| | | // }, { |
| | | // title: '操作', |
| | | // fixed: 'right', |
| | | // width: 100, |
| | | // align: 'center', |
| | | // toolbar: '#toolbarDemoList' |
| | | // }] |
| | | // ], |
| | | |
| | | // }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region 自定义表头 |
| | | var colsJson |
| | | var param1 = { |
| | |
| | | return msg; |
| | | } |
| | | if ($("#LotNo").val() == "") { |
| | | layer.msg("请输入批次号!", { |
| | | layer.msg("请输入进厂编号!", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | |
| | | 'BoxNo3': 'C', //支号 |
| | | 'Qty': 'D', //数量 |
| | | 'SkuNo': 'E', //物料号 |
| | | 'LotNo': 'F', //批次 |
| | | 'LotNo': 'F', //进厂编号 |
| | | 'LotText': 'G', //批次描述 |
| | | 'ProductionTime': 'H', //生产日期 |
| | | 'InspectMark': 'I', //检验标记 |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-right: 0;"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-right: 0;"> |
| | | <label class="layui-form-label" style="width: 60px;">供货批次</label> |
| | | <label class="layui-form-label" style="width: 60px;">原厂批号</label> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <input type="text" id="SupplierLot" name="SupplierLot" placeholder="供货批次" |
| | | <input type="text" id="SupplierLot" name="SupplierLot" placeholder="原厂批号" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline DivLoadingArea" style="margin-top: 10px;"> |
| | | <label class="layui-form-label">批次号</label> |
| | | <label class="layui-form-label">进厂编号</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <select name="LotNoSelect" id="LotNoSelect" lay-search> |
| | | <option value=""></option> |
| | |
| | | { field: 'SkuName', title: '物料名称', align: 'center', width: 240, }, |
| | | { field: 'Qty', title: '数量', align: 'center', width: 100, }, |
| | | { field: 'FullQty', title: '整箱数量', align: 'center', width: 100, }, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 155, }, |
| | | { field: 'LotNo', title: '进厂编号', align: 'center', width: 155, }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 165 }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 155 }, |
| | | { field: 'SupplierLot', title: '原厂批号', align: 'center', width: 155 }, |
| | | { field: 'Status', title: '状态', align: 'center', templet: '#templetStatus', width: 90 }, |
| | | |
| | | { field: 'Standard', title: '规格/型号', align: 'center', width: 165 }, |
| | |
| | | var expirationTime = getQueryString('ExpirationTime'); |
| | | var storeTime = getQueryString('StoreTime'); |
| | | |
| | | var supplierLot=getQueryString('SupplierLot'); //供货批次 |
| | | var supplierLot=getQueryString('SupplierLot'); //原厂批号 |
| | | $("#SupplierLot").html(supplierLot); |
| | | console.log(supplierLot); |
| | | var doing = true; |
| | |
| | | ProductionTime:productionTime, |
| | | ExpirationTime:expirationTime, |
| | | StoreTime:storeTime, |
| | | SupplierLot:supplierLot//供货批次 |
| | | SupplierLot:supplierLot//原厂批号 |
| | | }; |
| | | // console.log(param); |
| | | synData(IP + "/BllAsn/AddLabelBox", param , 'post', function (res) { |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function bindPalletBind() { |
| | | //#region 原始非自定义列 |
| | | // var param = { |
| | | // ASNNo: $("#ASNNo").val(), |
| | | // PalletNo: $("#PalletNo").val(), |
| | | // LocatNo: $("#LocatNo").val(), |
| | | // Status: $("#Status").val(), |
| | | // SkuNo: $("#SkuNo").val(), |
| | | // SkuName: $("#SkuName").val(), |
| | | // LotNo: $("#LotNo").val(), |
| | | // StartTime: $("#StartTime").val(), |
| | | // EndTime: $("#EndTime").val() |
| | | // }; |
| | | |
| | | // table.render({ |
| | | // id: 'PalletBind', |
| | | // elem: '#PalletBind', |
| | | // height: 'full-210', |
| | | // url: IP + "/BllAsn/GetPalletBindList", |
| | | // method: 'post', |
| | | // contentType: 'application/json', |
| | | // headers: { ToKen: $.cookie('token') }, |
| | | // where: param, |
| | | // page: true, |
| | | // even: true, |
| | | // limit: pageCnt, // 默认多少页 |
| | | // limits: pageLimits, // 默认数组[10,20,30,40,50] |
| | | // cellMinWidth: 60, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // done: function () { |
| | | // setRight() |
| | | // //bindBoxInfo(res.data[0].BindNo); |
| | | // }, |
| | | // cols: [ |
| | | // [{ |
| | | // title: '序号', |
| | | // type: 'numbers', |
| | | // width: 60, |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // }, |
| | | // { |
| | | // field: 'ASNNo', |
| | | // title: '入库单号', |
| | | // align: 'center', |
| | | // width: 180, |
| | | // }, |
| | | // { |
| | | // field: 'ASNDetailNo', |
| | | // title: '入库明细号', |
| | | // align: 'center', |
| | | // hide: true, |
| | | // }, |
| | | // { |
| | | // field: 'PalletNo', |
| | | // title: '托盘号', |
| | | // align: 'center', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // field: 'PalletNo2', |
| | | // title: '托盘号LV2', |
| | | // align: 'center', |
| | | // hide: true, |
| | | // }, |
| | | // { |
| | | // field: 'PalletNo3', |
| | | // title: '托盘号LV3', |
| | | // align: 'center', |
| | | // hide: true, |
| | | // }, { |
| | | // field: 'LocatNo', |
| | | // title: '储位地址', |
| | | // align: 'center', |
| | | // width: 90, |
| | | // }, { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // align: 'center', |
| | | // width: 110, |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '数量', |
| | | // align: 'center', |
| | | // width: 90, |
| | | // }, { |
| | | // field: 'FullQty', |
| | | // title: '整托数量', |
| | | // align: 'center', |
| | | // width: 90, |
| | | // }, |
| | | // { |
| | | // field: 'Status', |
| | | // title: '执行状态',//等待入库/正在入库/入库完成 --0/1/2 |
| | | // align: 'center', |
| | | // width: 90, |
| | | // 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-danger layui-btn-xs">入库中</button>'; |
| | | // case "2": return '<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">入库完成</button>'; |
| | | // default: return ""; |
| | | // } |
| | | // } |
| | | // }, |
| | | // // { |
| | | // // field: 'InspectMark', |
| | | // // title: '抽检标记',//等待入库/正在入库/入库完成 --0/1/2 |
| | | // // align: 'center', |
| | | // // templet: function (d) { |
| | | // // switch (d.InspectMark) { |
| | | // // 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-xs">抽检托</button>'; |
| | | // // default: return ""; |
| | | // // } |
| | | // // } |
| | | // // }, |
| | | // { |
| | | // field: 'BitPalletMark', |
| | | // title: '零托标记',//等待入库/正在入库/入库完成 --0/1/2 |
| | | // align: 'center', |
| | | // width: 90, |
| | | // templet: function (d) { |
| | | // switch (d.BitPalletMark) { |
| | | // 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-xs layui-btn-danger ">是</button>'; |
| | | // default: return ""; |
| | | // } |
| | | // } |
| | | // }, |
| | | // // { |
| | | // // field: 'IsBale', |
| | | // // title: '是否裹包', |
| | | // // align: 'center', |
| | | // // templet: function (d) { |
| | | // // switch (d.IsBale) { |
| | | // // case "0": return "否"; |
| | | // // case "1": return "是"; |
| | | // // default: return ""; |
| | | // // } |
| | | // // } |
| | | // // }, |
| | | // // { |
| | | // // field: 'IsBelt', |
| | | // // title: '是否打带', |
| | | // // align: 'center', |
| | | // // templet: function (d) { |
| | | // // switch (d.IsBelt) { |
| | | // // case "0": return "否"; |
| | | // // case "1": return "是"; |
| | | // // default: return ""; |
| | | // // } |
| | | // // } |
| | | // // }, |
| | | // { |
| | | // field: 'CompleteTime', |
| | | // title: '完成时间', |
| | | // align: 'center', |
| | | // width: 165, |
| | | // templet: function (d) { |
| | | // return formatDate(d.CompleteTime); |
| | | // }, |
| | | // }, { |
| | | // field: 'CreateTime', |
| | | // title: '创建时间', |
| | | // align: 'center', |
| | | // width: 165, |
| | | // templet: function (d) { |
| | | // return formatDate(d.CreateTime); |
| | | // }, |
| | | // }, { |
| | | // title: '操作', |
| | | // fixed: 'right', |
| | | // width: 180, |
| | | // align: 'center', |
| | | // toolbar: '#PalletBindDemoList' |
| | | // }] |
| | | // ] |
| | | // }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region 自定义表头 |
| | | var colsJson |
| | | var param1 = { |
| | |
| | | { field: 'BoxNo3', title: '支号', align: 'center', width: 220 }, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', width: 150 }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center', align: 'center', width: 226 }, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 150, }, |
| | | { field: 'LotNo', title: '进厂编号', align: 'center', width: 150, }, |
| | | { field: 'Qty', title: '数量', align: 'center', width: 105, }, |
| | | { field: 'FullQty', title: '整箱数量', align: 'center', width: 105, }, |
| | | { field: 'ProductionTime', title: '生产日期', align: 'center', width: 160, templet: '#templetProductionTime' }, |
| | | { field: 'ExpirationTime', title: '过期日期', align: 'center', width: 180, templet: '#templetExpirationTime' }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 150, }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 150, }, |
| | | { field: 'SupplierLot', title: '原厂批号', align: 'center', width: 150, }, |
| | | { field: 'InspectMark', title: '抽检标记', align: 'center', width: 95, templet: '#templetInspectMark' }, |
| | | { field: 'BitBoxMark', title: '零箱标记', align: 'center', width: 95, templet: '#templetBitBoxMark' }, |
| | | { field: 'InspectStatus', title: '质量状态', align: 'center', width: 95, templet: '#templetInspectStatus' }, |
| | |
| | | var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function bindBoxInfo(BindNo) { |
| | | //#region 原始非自定义列 |
| | | // var param = { |
| | | // BindNo: parseInt(BindNo) |
| | | // }; |
| | | // table.render({ |
| | | // id: 'BoxInfo', |
| | | // elem: '#BoxInfo', |
| | | // height: 'full-210', |
| | | // url: IP + "/BllAsn/GetBoxInfoList", |
| | | // method: 'post', |
| | | // contentType: 'application/json', |
| | | // headers: { ToKen: $.cookie('token') }, |
| | | // where: param, |
| | | // // toolbar: '#BoxInfoDemo', |
| | | // // defaultToolbar: ['filter'], //'print', 'exports' |
| | | // page: true, |
| | | // limit: pageCnt, // 默认多少页 |
| | | // limits: pageLimits, // 默认数组[10,20,30,40,50] |
| | | // cellMinWidth: 60, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // even: true, |
| | | // done: function () { |
| | | // setRight() |
| | | // }, |
| | | // cols: [ |
| | | // [{ |
| | | |
| | | // title: '序号', |
| | | // type: 'numbers', |
| | | // width: 60, |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // } |
| | | // , { |
| | | // field: 'PalletNo', |
| | | // title: '托盘号', |
| | | // align: 'center', |
| | | // width: 95 |
| | | // }, { |
| | | // field: 'PalletNo2', |
| | | // title: '托盘编号LV2', |
| | | // align: 'center', |
| | | // hide: true, |
| | | // }, |
| | | // { |
| | | // field: 'PalletNo3', |
| | | // title: '托盘编号LV3', |
| | | // align: 'center', |
| | | // hide: true, |
| | | // }, |
| | | // { |
| | | // field: 'BoxNo', |
| | | // title: '箱号', |
| | | // align: 'center', |
| | | // width: 220 |
| | | // }, { |
| | | // field: 'BoxNo2', |
| | | // title: '盒号', |
| | | // align: 'center', |
| | | // hide: true, |
| | | // }, |
| | | // { |
| | | // field: 'BoxNo3', |
| | | // title: '支号', |
| | | // align: 'center', |
| | | // width: 220, |
| | | // hide: true, |
| | | // }, |
| | | // { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // align: 'center', |
| | | // width: 150, |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // align: 'center', |
| | | // width: 226, |
| | | // }, { |
| | | // field: 'LotNo', |
| | | // title: '批次号', |
| | | // align: 'center', |
| | | // width: 150, |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '数量', |
| | | // align: 'center', |
| | | // width: 105, |
| | | // }, { |
| | | // field: 'FullQty', |
| | | // title: '整箱数量', |
| | | // align: 'center', |
| | | // width: 105, |
| | | // }, { |
| | | // field: 'ProductionTime', |
| | | // title: '生产日期', |
| | | // align: 'center', |
| | | // width: 160, |
| | | // templet: function (d) { |
| | | // return formatDate2(d.ProductionTime); |
| | | // }, |
| | | // }, { |
| | | // field: 'ExpirationTime', |
| | | // title: '过期日期', |
| | | // align: 'center', |
| | | // width: 180, |
| | | // templet: function (d) { |
| | | // return formatDate2(d.ExpirationTime); |
| | | // }, |
| | | // }, { |
| | | // field: 'LotText', |
| | | // title: '批次描述', |
| | | // align: 'center', |
| | | // width: 150, |
| | | // }, { |
| | | // field: 'SupplierLot', |
| | | // title: '供货批次', |
| | | // align: 'center', |
| | | // width: 150, |
| | | // }, { |
| | | // field: 'InspectMark', |
| | | // title: '抽检标记',//等待入库/正在入库/入库完成 --0/1/2 |
| | | // align: 'center', |
| | | // width:95, |
| | | // templet: function (d) { |
| | | // switch (d.InspectMark) { |
| | | // 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-xs layui-btn-danger ">是</button>'; |
| | | // default: return ""; |
| | | // } |
| | | // } |
| | | // }, |
| | | // { |
| | | // field: 'BitBoxMark', |
| | | // title: '零箱标记',//等待入库/正在入库/入库完成 --0/1/2 |
| | | // align: 'center', |
| | | // width:95, |
| | | // templet: function (d) { |
| | | // switch (d.BitBoxMark) { |
| | | // 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-xs layui-btn-danger ">是</button>'; |
| | | // default: return ""; |
| | | // } |
| | | // } |
| | | // }, |
| | | // { |
| | | // field: 'InspectStatus', |
| | | // title: '质量状态',//等待入库/正在入库/入库完成 --0/1/2 |
| | | // align: 'center', |
| | | // width:95, |
| | | // templet: function (d) { |
| | | // switch (d.InspectStatus) { |
| | | // case "0": return '待检验'; |
| | | // case "1": return '检验合格'; |
| | | // case "2": return '不合格'; |
| | | // case "3": return '放置期'; |
| | | // default: return ""; |
| | | // } |
| | | // } |
| | | // }, |
| | | // { |
| | | // title: '操作', |
| | | // fixed: 'right', |
| | | // width: 155, |
| | | // align: 'center', |
| | | // toolbar: '#BoxInfoDemoList' |
| | | // }] |
| | | // ], |
| | | |
| | | // }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region 自定义表头 |
| | | var colsJson2 |
| | | var param1 = { |
| | |
| | | if (res.code == 0) { //成功 |
| | | $("#BillCode").empty(); |
| | | $("#BillCode").append("<option value =''></option>"); |
| | | console.log(res); |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#BillCode").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i].ASNNo + |
| | | $("#BillCode").append('<option value =' + res.data[i] + '>' + res.data[i] + |
| | | '</option>'); |
| | | } |
| | | form.render('select'); |
| | |
| | | {field: 'BoxNo',title: '箱码',align: 'center',fixed: 'left',width:220}, |
| | | {field: 'SkuNo',title: '物料编号',align: 'center',width:150}, |
| | | {field: 'SkuName',title: '物料名称',align: 'center'}, |
| | | {field: 'LotNo',templet: '#buttonTpl',title: '批次号',align: 'center',width:150}, |
| | | {field: 'LotNo',templet: '#buttonTpl',title: '进厂编号',align: 'center',width:150}, |
| | | {field: 'Qty',title: '实际数量',align: 'center',width:150}, |
| | | // {field: 'Standard',title: '物品规格',align: 'center'}, |
| | | //{title: '操作',width: 100,align: 'center',toolbar: '#table-content-list'} |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">批次</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次" autocomplete="off" |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | {field:'SkuNo', title:'物料编码', align:'center', width:105, }, |
| | | {field:'SkuName', title:'物料名称', align:'center', width:125, }, |
| | | {field:'Standard', title:'规格', align:'center', width:225, }, |
| | | {field:'LotNo', title:'批次号', align:'center', width:105, }, |
| | | {field:'LotNo', title:'进厂编号', align:'center', width:105, }, |
| | | {field:'LotText', title:'批次描述', align:'center', width:105, }, |
| | | {field:'SupplierLot', title:'供货批次', align:'center', width:105, }, |
| | | {field:'SupplierLot', title:'原厂批号', align:'center', width:105, }, |
| | | {field: 'CreateUserName', title:'创建人', align:'center', width:100, }, |
| | | {field: 'CreateTime',title: '创建时间',align: 'center',width: 160, templet: '#CreateTimeButton',}, |
| | | {field: 'UpdateUserName',title: '修改人',align: 'center',width: 120,hide:true}, |
| | |
| | | // {field:'SkuNo', title:'物料编码', align:'center', width:105, }, |
| | | // {field:'SkuName', title:'物料名称', align:'center', width:125, }, |
| | | // {field:'Standard', title:'规格', align:'center', width:225, }, |
| | | // {field:'LotNo', title:'批次号', align:'center', width:105, }, |
| | | // {field:'LotNo', title:'进厂编号', align:'center', width:105, }, |
| | | // {field:'LotText', title:'批次描述', align:'center', width:105, }, |
| | | // {field:'SupplierLot', title:'供货批次', align:'center', width:105, }, |
| | | // {field:'SupplierLot', title:'原厂批号', align:'center', width:105, }, |
| | | // {field: 'CreateUserName', title:'创建人', align:'center', width:100, }, |
| | | // {field: 'CreateTime',title: '创建时间',align: 'center',width: 160, templet: '#CreateTimeButton',}, |
| | | // {field: 'UpdateUserName',title: '修改人',align: 'center',width: 120,hide:true}, |
| | |
| | | {field: 'Standard',title: '物品规格',align: 'center'}, |
| | | {field: 'LocatNo',title: '储位编码',align: 'center',width: 120,hide:true,}, |
| | | {field: 'PalletNo',title: '托盘条码',align: 'center',width: 100,}, |
| | | {field: 'LotNo',align: 'center',title: '批次',width: 150,}, |
| | | {field: 'LotNo',align: 'center',title: '进厂编号',width: 150,}, |
| | | {field: 'LotText',align: 'center',title: '批次描述',width: 120,}, |
| | | {field: 'Qty',title: '库存数量',width: 100,align: 'center',fixed: 'right'}, |
| | | {title: '操作',fixed: 'right',align: 'center',templet: '#table-content-list',width: 85,} |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">批次号</label> |
| | | <label class="layui-form-label">进厂编号</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', width: 105, }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center', width: 105, }, |
| | | { field: 'Standard', title: '规格', align: 'center', width: 105, }, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 105, }, |
| | | { field: 'LotNo', title: '进厂编号', align: 'center', width: 105, }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 105, }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 105, }, |
| | | { field: 'SupplierLot', title: '原厂批号', align: 'center', width: 105, }, |
| | | { field: 'CreateUserName', title: '创建人', align: 'center', width: 100, }, |
| | | { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#CreateTimeButton', }, |
| | | { field: 'UpdateUserName', title: '修改人', align: 'center', width: 120, hide: true }, |
| | |
| | | // { field: 'SkuNo', title: '物料编码', align: 'center', width: 105, }, |
| | | // { field: 'SkuName', title: '物料名称', align: 'center', width: 105, }, |
| | | // { field: 'Standard', title: '规格', align: 'center', width: 105, }, |
| | | // { field: 'LotNo', title: '批次号', align: 'center', width: 105, }, |
| | | // { field: 'LotNo', title: '进厂编号', align: 'center', width: 105, }, |
| | | // { field: 'LotText', title: '批次描述', align: 'center', width: 105, }, |
| | | // { field: 'SupplierLot', title: '供货批次', align: 'center', width: 105, }, |
| | | // { field: 'SupplierLot', title: '原厂批号', align: 'center', width: 105, }, |
| | | |
| | | // { field: 'CreateUserName', title: '创建人', align: 'center', width: 100, }, |
| | | // { |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">批次</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | field: 'Standard', title: '规格', align: 'center' |
| | | }, |
| | | { |
| | | title: '批次', field: 'LotNo', align: 'center' |
| | | title: '进厂编号', field: 'LotNo', align: 'center' |
| | | }, |
| | | { |
| | | field: 'LotText', title: '批次描述',align: 'center' |
| | | }, |
| | | { |
| | | field: 'SupplierLot',title: '供货批次', align: 'center' |
| | | field: 'SupplierLot',title: '原厂批号', align: 'center' |
| | | }, |
| | | { |
| | | field: 'PalletNo', title: '托盘号', align: 'center' |
| | |
| | | <input type="text" id="ASNNo" name="ASNNo" placeholder="请输入入库单据" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> --> |
| | | <!-- 批次 --> |
| | | <!-- 进厂编号 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="请输入物料名称" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="请输入进厂编号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <!-- 物料号 --> |
| | |
| | | field: 'Standard',title: '物料规格',align: 'center' |
| | | }, |
| | | { |
| | | field: 'LotNo',title: '批次号',align: 'center' |
| | | field: 'LotNo',title: '进厂编号',align: 'center' |
| | | }, |
| | | { |
| | | field: 'IsQualified',title: '检验结果',align: 'center',templet: '#IsQualifiedButton', |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | { field: 'PalletNo', title: '托盘号', align: 'center', width: 95, }, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', minWidth: 120 }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center', width: 150 }, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 125 }, |
| | | { field: 'LotNo', title: '进厂编号', align: 'center', width: 125 }, |
| | | { field: 'Status', align: 'center', title: '状态', width: 90, templet: '#templetStatus' }, |
| | | { field: 'Qty', title: '出库数量', align: 'center', width: 90, }, |
| | | { field: 'CompleteQty', title: '拣货数量', align: 'center', width: 90 }, |
| | |
| | | { field: 'OutMode', title: '出库口', align: 'center', width: 90, templet: '#outType', }, |
| | | { field: 'LoadingAddre', title: '装车口', align: 'center', width: 90, templet: '#outType', }, |
| | | { field: 'IsAdvance', title: '拣货类型', align: 'center', width: 90, templet: '#templetIsAdvance' }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 110 }, |
| | | { field: 'SupplierLot', title: '原厂批号', align: 'center', width: 110 }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 150 }, |
| | | { field: 'Standard', title: '物料规格', align: 'center', minWidth: 120, }, |
| | | { field: 'IsBale', title: '是否裹包', align: 'center', templet: '#templetIsBale', width: 90 }, |
| | |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function refreshTable() { |
| | | //#region 原始非自定义列 |
| | | // var param = { |
| | | // SoNo: $("#SoNo").val(), |
| | | // // WaveNo:$("#WaveNo").val(), |
| | | // PalletNo: $("#PalletNo").val(), |
| | | // SkuNo: $("#SkuNo").val(), |
| | | // SkuName: $("#SkuName").val(), |
| | | // LotNo: $("#LotNo").val(), |
| | | // Status: $("#Status").val(), |
| | | // BoxNo: $("#BoxNo").val(), |
| | | // }; |
| | | |
| | | // table.render({ |
| | | // elem: '#LAY-app-content-list', |
| | | // url: IP + "/BllSo/GetExportAllotList", |
| | | // method: 'POST', |
| | | // height: 'full-206', |
| | | // id: 'LAY-app-content-list', |
| | | // where: param, |
| | | // contentType: 'application/json', |
| | | // headers: { ToKen: $.cookie('token') }, |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // done: function(){ |
| | | // initMenu(); |
| | | // }, |
| | | // cols: [ |
| | | // [{ |
| | | // title: '序号', |
| | | // type: 'numbers', |
| | | // width: 60, |
| | | // fixed: 'left' |
| | | // }, { |
| | | // field: 'SONo', |
| | | // title: '出库单号', |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // width: 180, |
| | | // }, { |
| | | // field: 'WaveNo', |
| | | // title: '波次单号', |
| | | // align: 'center', |
| | | // width: 180, |
| | | // hide: true |
| | | // }, { |
| | | // field: 'PalletNo', |
| | | // title: '托盘号', |
| | | // align: 'center', |
| | | // width: 95, |
| | | // }, { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // align: 'center', |
| | | // minWidth: 120, |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // width: 150, |
| | | // }, { |
| | | // field: 'LotNo', |
| | | // title: '批次号', |
| | | // align: 'center', |
| | | // width: 125, |
| | | // }, { |
| | | // field: 'Status', |
| | | // align: 'center', |
| | | // title: '状态', |
| | | // width: 90, |
| | | // 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>`; |
| | | // case "2": |
| | | // return `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">待拣货</button>`; |
| | | // case "3": |
| | | // return `<button class="layui-btn layui-btn-radius layui-btn-warm layui-btn-xs">部分拣货</button>`; |
| | | // case "4": |
| | | // // return `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">待回库</button>`; |
| | | // case "5": |
| | | // return `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">已完成</button>`; |
| | | // case "6": |
| | | // return `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">异常取消</button>`; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | // }, |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '出库数量', |
| | | // align: 'center', |
| | | // width: 90, |
| | | // }, { |
| | | // field: 'CompleteQty', |
| | | // title: '拣货数量', |
| | | // align: 'center', |
| | | // width: 90, |
| | | // }, { |
| | | // field: 'OutMode', |
| | | // title: '出库口', |
| | | // align: 'center', |
| | | // width: 90, |
| | | // templet: '#outType', |
| | | // }, { |
| | | // field: 'IsAdvance', |
| | | // title: '拣货类型', |
| | | // align: 'center', |
| | | // width: 90, |
| | | // templet: function (d) { |
| | | // switch (d.IsAdvance) { |
| | | // case "0": |
| | | // return "出库"; |
| | | // case "1": |
| | | // return "预拣"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | // }, |
| | | // }, { |
| | | // field: 'SupplierLot', |
| | | // title: '供货批次', |
| | | // align: 'center', |
| | | // width: 110, |
| | | // }, { |
| | | // field: 'LotText', |
| | | // title: '批次描述', |
| | | // align: 'center', |
| | | // width: 150, |
| | | // }, { |
| | | // field: 'Standard', |
| | | // title: '物料规格', |
| | | // align: 'center', |
| | | // minWidth: 120, |
| | | // }, { |
| | | // field: 'IsBale', |
| | | // title: '是否裹包', |
| | | // align: 'center', |
| | | // templet: function (d) { |
| | | // switch (d.IsBale) { |
| | | // case "0": |
| | | // return "不裹包"; |
| | | // case "1": |
| | | // return "裹包"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | |
| | | // }, |
| | | // width: 90, |
| | | // hide: true, |
| | | // }, { |
| | | // field: 'IsBelt', |
| | | // title: '是否打带', |
| | | // align: 'center', |
| | | // templet: function (d) { |
| | | // switch (d.IsBelt) { |
| | | // case "0": |
| | | // return "不打带"; |
| | | // case "1": |
| | | // return "打带"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | |
| | | // }, |
| | | // width: 90, |
| | | // hide: true, |
| | | // }, { |
| | | // field: 'CreateTime', |
| | | // align: 'center', |
| | | // title: '创建时间', |
| | | // width: 160, |
| | | // templet: function (d) { |
| | | // return formatDate(d.CreateTime); |
| | | // }, |
| | | // }, { |
| | | // title: '操作', |
| | | // fixed: 'right', |
| | | // width: 100, |
| | | // align: 'center', |
| | | // toolbar: '#table-content-list' |
| | | // }] |
| | | // ] |
| | | // }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region 自定义表头 |
| | | var colsJson |
| | | var param1 = { |
| | |
| | | //{field: 'BoxNo3',title: '支号',align: 'center',width: 115}, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', width: 120, }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center' }, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 125, }, |
| | | { field: 'LotNo', title: '进厂编号', align: 'center', width: 125, }, |
| | | { field: 'CompleteQty', title: '拣货数量', align: 'center', width: 90, }, |
| | | { field: 'NowPalletNo', title: '新托盘', align: 'center', width: 95, }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 150, }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 110, }, |
| | | { field: 'SupplierLot', title: '原厂批号', align: 'center', width: 110, }, |
| | | { field: 'Standard', title: '物料规格', align: 'center', width: 120, }, |
| | | //{field: 'CreateTime',align: 'center',title: '拣货时间',width: 165,templet: '#templetCreateTime2'}, |
| | | { field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'left', toolbar: '#table-content-list2', "disabled": true } |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">批次号</label> |
| | | <label class="layui-form-label">进厂编号</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | var TotalColsArr = [[ |
| | | {field: '',title: '序号',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true}, |
| | | {field: 'SONo',title: '出库单号',align: 'center',fixed: 'left',width: 165, "disabled": true}, |
| | | {field: 'Type',title: '单据类型',align: 'center',templet:'#templetType'}, |
| | | {field: 'Type',title: '单据类型',align: 'center',width: 124,templet:'#templetType'}, |
| | | {field: 'Status',title: '执行状态', align: 'center',templet: '#templetStatus'}, |
| | | {field: 'LogisticsName',title: '承运商',align: 'center'}, |
| | | {field: 'CustomerName',title: '客户名称',align: 'center'}, |
| | | {field: 'LotNo',title: '批次号',align: 'center'}, |
| | | {field: 'LotNo',title: '进厂编号',align: 'center'}, |
| | | {field: 'LotNoText',title: '批次描述',align: 'center'}, |
| | | {field: 'IsDespatch',title: '是否发运',align: 'center',templet: '#templetIsDespatch'}, |
| | | {field: 'SupplierLot',title: '供货批次',align: 'center'}, |
| | | {field: 'SupplierLot',title: '原厂批号',align: 'center'}, |
| | | {field: 'Origin',title: '来源',align: 'center'}, |
| | | {field: 'Demo',title: '备注',align: 'center',width: 180}, |
| | | {field: 'CreateUserName',title: '创建人',align: 'center'}, |
| | |
| | | var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function refreshTable() { |
| | | //#region 原始非自定义列 |
| | | // var param = { |
| | | // No: $("#No").val(), |
| | | // Type: $("#Type").val(), |
| | | // Status: $("#Status").val(), |
| | | // LotNo: $("#LotNo").val(), |
| | | // LogisticsId: parseInt($("#LogisticsId").val()), |
| | | // IsWave: $("#IsWave").val(), |
| | | // IsDespatch: $("#IsDespatch").val(), |
| | | // // WaveNo: $("#WaveNo").val(), |
| | | // }; |
| | | |
| | | // table.render({ |
| | | // elem: '#LAY-app-content-list', |
| | | // url: IP+"/BllSo/GetExportNoticeList", |
| | | // method: 'POST', |
| | | // height: h1 ,//'full-'+hei1 |
| | | // id: 'LAY-app-content-list', |
| | | // where: param, |
| | | // contentType: 'application/json', |
| | | // headers:{ToKen:$.cookie('token')}, |
| | | // page: true, |
| | | // defaultToolbar: ['filter'], //'print', 'exports' |
| | | // even: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // even:true, |
| | | // done: function(res){ |
| | | // initMenu(); |
| | | // var soCode = "res.data[0].SONo"; |
| | | // if (res.data.length != 0) { |
| | | // soCode = res.data[0].SONo; |
| | | // } |
| | | // refreshTablemx(soCode) |
| | | // }, |
| | | // cols: [ |
| | | // [ { |
| | | // title: '序号', |
| | | // type: 'numbers', |
| | | // width: 65, |
| | | // fixed: 'left', |
| | | // },{ |
| | | // field: 'SONo', |
| | | // title: '出库单号', |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // width: 165, |
| | | // },{ |
| | | // field: 'Type', |
| | | // title: '单据类型', |
| | | // align: 'center', |
| | | // // width: 150, |
| | | // templet:function(d){ |
| | | // switch (d.Type) { |
| | | // case "0": |
| | | // return "标准销售出库"; |
| | | // case "1": |
| | | // return "非标准销售出库"; |
| | | // case "2": |
| | | // return "标准调拨出库"; |
| | | // case "3": |
| | | // return "非标准调拨出库"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | // } |
| | | // },{ |
| | | // field: 'Status', |
| | | // title: '执行状态', |
| | | // align: 'center', |
| | | // // width: 130, |
| | | // 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>`; |
| | | // case "2": |
| | | // return `<button class="layui-btn layui-btn-radius layui-btn-warm layui-btn-xs">已分配</button>`; |
| | | // case "3": |
| | | // return `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">正在执行</button>`; |
| | | // case "4": |
| | | // return `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">执行完毕</button>`; |
| | | // case "5": |
| | | // return `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">上传完毕</button>`; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | // } |
| | | // },{ |
| | | // field: 'LogisticsName', |
| | | // title: '承运商', |
| | | // align: 'center', |
| | | // // minWidth: 150 |
| | | // },{ |
| | | // field: 'CustomerName', |
| | | // title: '客户名称', |
| | | // align: 'center', |
| | | // // minwidth: 130 |
| | | // },{ |
| | | // field: 'LotNo', |
| | | // title: '批次号', |
| | | // align: 'center', |
| | | // // width: 180, |
| | | // hide:true |
| | | // },{ |
| | | // field: 'LotNoText', |
| | | // title: '批次描述', |
| | | // align: 'center', |
| | | // // width: 180, |
| | | // hide:true |
| | | // }, |
| | | // // { |
| | | // // field: 'IsWave', |
| | | // // title: '生成波次', |
| | | // // align: 'center', |
| | | // // width: 95, |
| | | // // templet: function (d) { |
| | | // // switch (d.IsWave) { |
| | | // // case "0": |
| | | // // return "否"; |
| | | // // case "1": |
| | | // // return "是"; |
| | | // // default: |
| | | // // return ""; |
| | | // // } |
| | | |
| | | // // }, |
| | | // // }, |
| | | // // { |
| | | // // field: 'WaveNo', |
| | | // // title: '波次单号', |
| | | // // align: 'center', |
| | | // // width: 170 |
| | | // // }, |
| | | // { |
| | | // field: 'IsDespatch', |
| | | // title: '是否发运', |
| | | // align: 'center', |
| | | // // width: 95, |
| | | // templet: function (d) { |
| | | // switch (d.IsDespatch) { |
| | | // case "0": |
| | | // return "否"; |
| | | // case "1": |
| | | // return "是"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | |
| | | // }, |
| | | // },{ |
| | | // field: 'SupplierLot', |
| | | // title: '供货批次', |
| | | // align: 'center', |
| | | // // width: 100, |
| | | // hide:true |
| | | // },{ |
| | | // field: 'Origin', |
| | | // title: '来源', |
| | | // align: 'center', |
| | | // // width: 100 |
| | | // },{ |
| | | // field: 'CreateUserName', |
| | | // title: '创建人', |
| | | // align: 'center', |
| | | // // width: 120, |
| | | // },{ |
| | | // field: 'CreateTime', |
| | | // title: '创建时间', |
| | | // align: 'center', |
| | | // // width: 160, |
| | | // templet: function(d) { |
| | | // return formatDate(d.CreateTime); |
| | | // }, |
| | | // },{ |
| | | // field: 'UpdateUserName', |
| | | // title: '修改人', |
| | | // align: 'center', |
| | | // // width: 120, |
| | | // hide:true |
| | | // },{ |
| | | // field: 'UpdateTime', |
| | | // title: '修改时间', |
| | | // align: 'center', |
| | | // // width: 160, |
| | | // templet: function(d) { |
| | | // return formatDate(d.UpdateTime); |
| | | // }, |
| | | // hide:true |
| | | // },{ |
| | | // title: '操作', |
| | | // fixed: 'right', |
| | | // align: 'center', |
| | | // toolbar: '#table-content-list', |
| | | // // width: 240 |
| | | // }] |
| | | // ] |
| | | // }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region 自定义表头 |
| | | var colsJson |
| | | var param1={ |
| | |
| | | //渲染出库单明细 |
| | | //#region 自定义表头 |
| | | var DetailColsArr = [[ |
| | | {field: '',title: '序号',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true}, |
| | | {field: 'SONo',title: '出库单号',align: 'center',fixed: 'left',width:165 }, |
| | | {field: 'SkuNo',title: '物料编码',align: 'center', width: 130}, |
| | | {field: 'SkuName',title: '物料名称',align: 'center', width: 152}, |
| | | {field: 'Standard',title: '物料规格',align: 'center', width: 270}, |
| | | {field: 'LotNo',title: '批次号',align: 'center',width: 150}, |
| | | {field: 'Qty',title: '计划数量',align: 'center',width: 100}, |
| | | {field: 'AllotQty',title: '分配数量',align: 'center',width: 100}, |
| | | {field: 'FactQty',title: '下架数量',align: 'center', width: 100}, |
| | | {field: 'CompleteQty',title: '拣货数量',align: 'center', width: 100}, |
| | | {field: 'IsBale',title: '是否裹包',align: 'center',templet: '#templetIsBale',width: 90}, |
| | | {field: 'IsBelt',title: '是否打带',align: 'center',templet: '#templetIsBelt',width: 90}, |
| | | {field: 'LotText',title: '批次描述',align: 'center', width: 100}, |
| | | {field: 'PackagName',title: '包装名称',align: 'center', width: 120}, |
| | | {field: 'SupplierLot',title: '供货批次',align: 'center', width: 120}, |
| | | {field: 'Price',title: '单价', align: 'center', width: 80}, |
| | | {field: 'Money',title: '总金额', align: 'center', width: 90}, |
| | | {field: 'caozuo',title: '操作',fixed: 'right',width: 100,align: 'left',toolbar: '#table-content-list2', "disabled": true} |
| | | ]]; |
| | | {field: '',title: '序号',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true}, |
| | | {field: 'SONo',title: '出库单号',align: 'center',fixed: 'left',width:165 }, |
| | | {field: 'SkuNo',title: '物料编码',align: 'center', width: 130}, |
| | | {field: 'SkuName',title: '物料名称',align: 'center', width: 152}, |
| | | {field: 'Standard',title: '物料规格',align: 'center', width: 270}, |
| | | {field: 'LotNo',title: '进厂编号',align: 'center',width: 150}, |
| | | {field: 'Qty',title: '计划数量',align: 'center',width: 100}, |
| | | {field: 'AllotQty',title: '分配数量',align: 'center',width: 100}, |
| | | {field: 'FactQty',title: '下架数量',align: 'center', width: 100}, |
| | | {field: 'CompleteQty',title: '拣货数量',align: 'center', width: 100}, |
| | | {field: 'IsBale',title: '是否裹包',align: 'center',templet: '#templetIsBale',width: 90}, |
| | | {field: 'IsBelt',title: '是否打带',align: 'center',templet: '#templetIsBelt',width: 90}, |
| | | {field: 'LotText',title: '批次描述',align: 'center', width: 100}, |
| | | {field: 'PackagName',title: '包装名称',align: 'center', width: 120}, |
| | | {field: 'SupplierLot',title: '原厂批号',align: 'center', width: 120}, |
| | | {field: 'Price',title: '单价', align: 'center', width: 80}, |
| | | {field: 'Money',title: '总金额', align: 'center', width: 90}, |
| | | {field: 'caozuo',title: '操作',fixed: 'right',width: 100,align: 'left',toolbar: '#table-content-list2', "disabled": true} |
| | | ]]; |
| | | var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function refreshTablemx(soNo) { |
| | | //#region 原始非自定义列 |
| | | // var param = { |
| | | // SoNo: soNo, |
| | | // }; |
| | | // table.render({ |
| | | // elem: '#LAY-app-content-list2', |
| | | // url: IP + "/BllSo/GetExportNoticeDetailList", |
| | | // method: 'POST', |
| | | // height: h2, |
| | | // id: 'LAY-app-content-list2', |
| | | // where: param, |
| | | // contentType: 'application/json', |
| | | // headers:{ToKen:$.cookie('token')}, |
| | | // toolbar:'#toolbarDemo', |
| | | // defaultToolbar: ['print'], //'print', 'exports' |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // done: function(){ |
| | | // initMenu(); |
| | | // }, |
| | | // cols: [ |
| | | // [{ |
| | | // title: '序号', |
| | | // type: 'numbers', |
| | | // width: 65, |
| | | // fixed: 'left', |
| | | // }, { |
| | | // field: 'SONo', |
| | | // title: '出库单号', |
| | | // align: 'center', |
| | | // fixed: 'left', |
| | | // width: 165 |
| | | // }, { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // align: 'center', |
| | | // width: 130 |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // width: 152 |
| | | // }, { |
| | | // field: 'Standard', |
| | | // title: '物料规格', |
| | | // align: 'center', |
| | | // width: 270 |
| | | // }, { |
| | | // field: 'LotNo', |
| | | // title: '批次号', |
| | | // align: 'center', |
| | | // width: 150 |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '计划数量', |
| | | // align: 'center', |
| | | // width: 100 |
| | | // }, { |
| | | // field: 'AllotQty', |
| | | // title: '分配数量', |
| | | // align: 'center', |
| | | // width: 100 |
| | | // }, { |
| | | // field: 'FactQty', |
| | | // title: '下架数量', |
| | | // align: 'center', |
| | | // width: 100 |
| | | // }, { |
| | | // field: 'CompleteQty', |
| | | // title: '拣货数量', |
| | | // align: 'center', |
| | | // width: 100 |
| | | // }, { |
| | | // field: 'IsBale', |
| | | // title: '是否裹包', |
| | | // align: 'center', |
| | | // templet: function (d) { |
| | | // console.log(d); |
| | | // switch (d.IsBale) { |
| | | // case "0": |
| | | // return "不裹包"; |
| | | // case "1": |
| | | // return "裹包"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | |
| | | // }, |
| | | // width: 90, |
| | | // hide:true, |
| | | // }, { |
| | | // field: 'IsBelt', |
| | | // title: '是否打带', |
| | | // align: 'center', |
| | | // templet: function (d) { |
| | | // switch (d.IsBelt) { |
| | | // case "0": |
| | | // return "不打带"; |
| | | // case "1": |
| | | // return "打带"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | |
| | | // }, |
| | | // width: 90, |
| | | // hide:true, |
| | | // }, { |
| | | // field: 'LotText', |
| | | // title: '批次描述', |
| | | // align: 'center', |
| | | // width: 100 |
| | | // }, { |
| | | // field: 'PackagName', |
| | | // title: '包装名称', |
| | | // align: 'center', |
| | | // width: 120 |
| | | // }, { |
| | | // field: 'SupplierLot', |
| | | // title: '供货批次', |
| | | // align: 'center', |
| | | // width: 120 |
| | | // }, |
| | | // // { |
| | | // // field: 'IsWave', |
| | | // // title: '生成波次', |
| | | // // align: 'center', |
| | | // // width: 90, |
| | | // // templet: function (d) { |
| | | // // switch (d.IsWave) { |
| | | // // case "0": |
| | | // // return "否"; |
| | | // // case "1": |
| | | // // return "是"; |
| | | // // default: |
| | | // // return ""; |
| | | // // } |
| | | |
| | | // // }, |
| | | // // hide:true, |
| | | // // }, |
| | | // // { |
| | | // // field: 'WaveNo', |
| | | // // title: '波次单号', |
| | | // // align: 'center', |
| | | // // width: 170, |
| | | // // hide:true |
| | | // // }, |
| | | // { |
| | | // field: 'Price', |
| | | // title: '单价', |
| | | // align: 'center', |
| | | // width: 80, |
| | | // hide:true |
| | | // }, { |
| | | // field: 'Money', |
| | | // title: '总金额', |
| | | // align: 'center', |
| | | // width: 90, |
| | | // hide:true |
| | | // }, { |
| | | // title: '操作', |
| | | // fixed: 'right', |
| | | // width: 180, |
| | | // align: 'center', |
| | | // toolbar: '#table-content-list2' |
| | | // }] |
| | | // ] |
| | | // }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region 自定义表头 |
| | | var colsJson2 |
| | | var param1={ |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | {field: 'PalletNo', title: '托盘号', align: 'center'}, |
| | | {field: 'SkuNo', title: '物料编码', align: 'center'}, |
| | | {field: 'SkuName', title: '物料名称', align: 'center'}, |
| | | {field: 'LotNo', title: '批次号', align: 'center'}, |
| | | {field: 'LotNo', title: '进厂编号', align: 'center'}, |
| | | {field: 'Qty', title: '数量', align: 'center'}, |
| | | {field: 'LockQty', title: '锁定数量', align: 'center'}, |
| | | {field: 'FrozenQty', title: '冻结数量', align: 'center'}, |
| | |
| | | var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function refreshTable() { |
| | | //#region 原始非自定义列 |
| | | // var param = { |
| | | // SkuNo:$("#SkuNo").val(), //物料号 |
| | | // SkuName:$("#SkuName").val(), //物料名称 |
| | | // PalletNo:$("#PalletNo").val(), //托盘号 |
| | | // LotNo:$("#LotNo").val(), //批次号 |
| | | |
| | | // InspectMark:$("#InspectMark").val(), //检验标记 |
| | | // BitPalletMark:$("#BitPalletMark").val(), //零托标记 |
| | | // }; |
| | | // table.render({ |
| | | // elem: '#LAY-app-content-list', |
| | | // height: 'full-106', |
| | | // id: 'LAY-app-content-list', |
| | | // url: IP+"/BllSo/GetPalletNoOutList", |
| | | // method: 'post', |
| | | // where: param, |
| | | // contentType: 'application/json', |
| | | // headers:{ToKen:$.cookie('token')}, |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // even: true, |
| | | // cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // done: function(){ |
| | | // initMenu(); |
| | | // }, |
| | | // cols: |
| | | // [[ |
| | | // { |
| | | // title: '序号', type: 'numbers', fixed: 'left' |
| | | // }, |
| | | // { field: 'WareHouseNo', title: '所属仓库', align: 'center', }, |
| | | // { field: 'AreaNo', title: '所属区域', align: 'center', }, |
| | | // { field: 'LocatNo', title: '储位地址', align: 'center' }, |
| | | // { field: 'PalletNo', title: '托盘号', align: 'center', }, |
| | | // { field: 'SkuNo', title: '物料编码', align: 'center' }, |
| | | // { field: 'SkuName', title: '物料名称', align: 'center', }, |
| | | // { field: 'LotNo', title: '批次号', align: 'center', }, |
| | | // { field: 'Qty', title: '数量', align: 'center' }, |
| | | // { field: 'LockQty', title: '锁定数量', align: 'center', }, |
| | | // { field: 'FrozenQty', title: '冻结数量', align: 'center' }, |
| | | // { field: 'InspectMark', title: '抽检标记', align: 'center', |
| | | // templet: function (d) { |
| | | // switch (d.InspectMark) { |
| | | // case "0": |
| | | // return "否"; |
| | | // case "1": |
| | | // return "是"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | // }, |
| | | // }, |
| | | // { field: 'BitPalletMark', title: '零托标记', align: 'center', |
| | | // templet: function (d) { |
| | | // switch (d.BitPalletMark) { |
| | | // case "0": |
| | | // return "否"; |
| | | // case "1": |
| | | // return "是"; |
| | | // default: |
| | | // return ""; |
| | | // } |
| | | // }, |
| | | // }, |
| | | // { title: '操作', fixed: 'right', width: 100, align: 'center', toolbar: '#table-content-list'} |
| | | // ]] |
| | | // }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region 自定义表头 |
| | | var colsJson |
| | | var param1={ |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline "> |
| | |
| | | // field: 'Standard', title: '物料规格', align: 'center',width:130 |
| | | // }, |
| | | // { |
| | | // title: '批次号', field: 'LotNo', align: 'center', width:140 |
| | | // title: '进厂编号', field: 'LotNo', align: 'center', width:140 |
| | | // }, |
| | | // { |
| | | // title: '批次描述', field: 'LotText', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // title: '供货批次', field: 'SupplierLot', align: 'center', width:100 |
| | | // title: '原厂批号', field: 'SupplierLot', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'LocatNo', title: '储位地址', align: 'center',width:100 |
| | |
| | | {field: 'SkuName', title: '物料名称', align: 'center',width:100}, |
| | | {field: 'Qty', title: '库存数量', align: 'center',width:100}, |
| | | {field: 'Standard', title: '物料规格', align: 'center',width:130}, |
| | | {field: 'LotNo',title: '批次号', align: 'center', width:140}, |
| | | {field: 'LotNo',title: '进厂编号', align: 'center', width:140}, |
| | | {field: 'LotText',title: '批次描述', align: 'center', width:100}, |
| | | {field: 'SupplierLot',title: '供货批次', align: 'center', width:100}, |
| | | {field: 'SupplierLot',title: '原厂批号', align: 'center', width:100}, |
| | | {field: 'ProductionTime', title: '生产时间', align: 'center',width:150,templet: '#templetProductionTime'}, |
| | | {field: 'Status', title: '物料状态', align: 'center',width:100, templet: '#buttonTpl'}, |
| | | {field: 'InspectMark', title: '抽检标记', align: 'center',width:100, templet: '#InspectMarkStatus'}, |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | |
| | | // title: '序号', type: 'numbers', fixed: 'left' |
| | | // }, |
| | | // { |
| | | // field: 'LotNo', title: '批次号', align: 'center', |
| | | // field: 'LotNo', title: '进厂编号', align: 'center', |
| | | // }, |
| | | // { |
| | | // field: 'SkuNo', title: '物料编码', align: 'center' |
| | |
| | | //#region 自定义表头 |
| | | var TotalColsArr = [[ |
| | | {field: '',title: '序号',type:'numbers',fixed: 'left', "disabled": true}, |
| | | {field: 'LotNo', title: '批次号', align: 'center'}, |
| | | {field: 'LotNo', title: '进厂编号', align: 'center'}, |
| | | {field: 'SkuNo', title: '物料编码', align: 'center'}, |
| | | {field: 'SkuName', title: '物料名称', align: 'center'}, |
| | | {field: 'RQty', title: '入库数量', align: 'center'}, |
| | |
| | | var param = { |
| | | SkuNo:SkuNo, //物料号 |
| | | SkuName:SkuName, //物料名称 |
| | | LotNo:LotNo, //批次号 |
| | | LotNo:LotNo, //进厂编号 |
| | | StartTime:StartTime, //开始时间 |
| | | EndTime:EndTime, //结束时间 |
| | | //StartTime:StartTime?""=chudate:StartTime, //开始时间 |
| | |
| | | // field: 'SONo', title: '出库单号', align: 'center', width: 100 |
| | | // }, |
| | | // { |
| | | // field: 'LotNo', title: '批次号', align: 'center', width: 100 |
| | | // field: 'LotNo', title: '进厂编号', align: 'center', width: 100 |
| | | // }, |
| | | // { |
| | | // field: 'SupplierLot', title: '供货批次', align: 'center', width: 100 |
| | | // field: 'SupplierLot', title: '原厂批号', align: 'center', width: 100 |
| | | // }, |
| | | // { |
| | | // field: 'SkuNo', title: '物料编码', align: 'center', width: 100 |
| | |
| | | {field: '',title: '序号',type:'numbers',width: 70,fixed: 'left', "disabled": true}, |
| | | {field: 'ASNNo', title: '入库单号', align: 'center', width: 100}, |
| | | {field: 'SONo', title: '出库单号', align: 'center', width: 100}, |
| | | {field: 'LotNo', title: '批次号', align: 'center', width: 100}, |
| | | {field: 'SupplierLot', title: '供货批次', align: 'center', width: 100}, |
| | | {field: 'LotNo', title: '进厂编号', align: 'center', width: 100}, |
| | | {field: 'SupplierLot', title: '原厂批号', align: 'center', width: 100}, |
| | | {field: 'SkuNo', title: '物料编码', align: 'center', width: 100}, |
| | | {field: 'SkuName', title: '物料名称', align: 'center', width: 100}, |
| | | {field: 'PalletNo', title: '托盘号', align: 'center', width: 100}, |
| | |
| | | SkuName:SkuName, //物料名称 |
| | | OwnerNo:OwnerNo, //货主编码 |
| | | OwnerName:OwnerName, //货主名称 |
| | | LotNo:LotNo, //批次号 |
| | | LotNo:LotNo, //进厂编号 |
| | | }; |
| | | sendData(IP + "/Statistical/GetInventoryList", param, 'get', function (res) { |
| | | console.log(res) |
| | |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'LotNo', |
| | | // title: '批次号', |
| | | // title: '进厂编号', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Qty', |
| | |
| | | SkuName:SkuName, //物料名称 |
| | | OwnerNo:OwnerNo, //货主编码 |
| | | OwnerName:OwnerName, //货主名称 |
| | | LotNo:LotNo, //批次号 |
| | | LotNo:LotNo, //进厂编号 |
| | | LocatNo:LocatNo,//储位地址 |
| | | PalletNo:PalletNo, //托盘号 |
| | | Status:Status,//库存状态 |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zhijian"> |
| | |
| | | // field: 'Standard', title: '物料规格', align: 'center', |
| | | // }, |
| | | // { |
| | | // title: '批次', field: 'LotNo', align: 'center' |
| | | // title: '进厂编号', field: 'LotNo', align: 'center' |
| | | // }, |
| | | // { |
| | | // field: 'ResidueQty', title: '剩余数量', align: 'center', |
| | |
| | | {field: 'SkuName', title: '物料名称', align: 'center'}, |
| | | {field: 'Type', title: '物料类型', align: 'center', templet: '#SkuType'}, |
| | | {field: 'Standard', title: '物料规格', align: 'center'}, |
| | | {title: '批次', field: 'LotNo', align: 'center'}, |
| | | {title: '进厂编号', field: 'LotNo', align: 'center'}, |
| | | {field: 'ResidueQty', title: '剩余数量', align: 'center'}, |
| | | {field: 'Qty', title: '库存数量', align: 'center'}, |
| | | {field: 'LockQty', title: '锁定数量', align: 'center'}, |
| | |
| | | </ul> |
| | | </div> |
| | | |
| | | <!-- <ul> |
| | | <li id="option1">标签</li> |
| | | <li id="option2">数量</li> |
| | | </ul> --> |
| | | |
| | | <button id="option1" class="layout-btn" type="button">标签</button> |
| | | <button id="option2" class="layout-btn" type="button">数量</button> |
| | | <br /><br /> |
| | |
| | | <div id="content1"> |
| | | <div id="zongDiv" class="layout-bill-info" style="height: 285px;"> |
| | | <form class="layui-form" action=""> |
| | | <div id="" class="layui-form-item layout-dropdownlist"> |
| | | <!-- <div id="" class="layui-form-item layout-dropdownlist"> |
| | | <label class="layui-form-label" lang>入库单:</label> |
| | | <div class="layui-input-block" id="selectDiv"> |
| | | <select id="bar" lay-filter="getbar" lay-search> |
| | |
| | | </select> |
| | | <img src="/assets/down_arraw.png"> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> |
| | | <label class="layui-form-label">物料-批次:</label> |
| | | <div class="layui-input-block" id="goodDiv"> |
| | |
| | | <div id="content2"> |
| | | <div id="zongDiv" class="layout-bill-info" style="height: 255px;"> |
| | | <form class="layui-form" id="form2" action=""> |
| | | <div id="" class="layui-form-item layout-dropdownlist"> |
| | | <!-- <div id="" class="layui-form-item layout-dropdownlist"> |
| | | <label class="layui-form-label" lang>入库单:</label> |
| | | <div class="layui-input-block" id="selectDiv1"> |
| | | <select id="bar1" lay-filter="getbar1" lay-search> |
| | |
| | | </select> |
| | | <img src="/assets/down_arraw.png"> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> |
| | | <label class="layui-form-label">物料-批次:</label> |
| | | <div class="layui-input-block" id="goodDiv1"> |
| | |
| | | |
| | | /* 入库单据下拉框 */ |
| | | //点击入库单据下拉框事件 |
| | | $("#selectDiv").click(function () { |
| | | if (xianshiyemian == 0) { |
| | | var input = $('select[id="bar"]').next().find('.layui-select-title input') |
| | | var val = input.val() |
| | | //先更新一下入库单 |
| | | updateBillList(function (data) { |
| | | $('select[id="bar"]').next().addClass('layui-form-selected') |
| | | $('select[id="bar"]').next().find('.layui-select-title input').val(val) |
| | | }) |
| | | } |
| | | }) |
| | | //点击入库单据下拉框事件 |
| | | $("#selectDiv1").click(function () { |
| | | if (xianshiyemian == 1) { |
| | | var input = $('select[id="bar1"]').next().find('.layui-select-title input') |
| | | var val = input.val() |
| | | //先更新一下入库单 |
| | | updateBillList(function (data) { |
| | | $('select[id="bar1"]').next().addClass('layui-form-selected') |
| | | $('select[id="bar1"]').next().find('.layui-select-title input').val(val) |
| | | }) |
| | | } |
| | | }) |
| | | // $("#selectDiv").click(function () { |
| | | // if (xianshiyemian == 0) { |
| | | // var input = $('select[id="bar"]').next().find('.layui-select-title input') |
| | | // var val = input.val() |
| | | // //先更新一下入库单 |
| | | // updateBillList(function (data) { |
| | | // $('select[id="bar"]').next().addClass('layui-form-selected') |
| | | // $('select[id="bar"]').next().find('.layui-select-title input').val(val) |
| | | // }) |
| | | // } |
| | | // }) |
| | | // //点击入库单据下拉框事件 |
| | | // $("#selectDiv1").click(function () { |
| | | // if (xianshiyemian == 1) { |
| | | // var input = $('select[id="bar1"]').next().find('.layui-select-title input') |
| | | // var val = input.val() |
| | | // //先更新一下入库单 |
| | | // updateBillList(function (data) { |
| | | // $('select[id="bar1"]').next().addClass('layui-form-selected') |
| | | // $('select[id="bar1"]').next().find('.layui-select-title input').val(val) |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | /*————————————————————————————————————————————————————————————————————————————————————————————————*/ |
| | | |
| | | |
| | | /* 绑定入库单信息 */ |
| | | |
| | | function updateBillList(callback) { |
| | | if (xianshiyemian == 0) { |
| | | var input = $('select[id="bar"]').next().find('.layui-select-title input') |
| | | var val = input.val() |
| | | $("#bar").empty() |
| | | $("#bar").append('<option value =>' + '</option>'); |
| | | form.render('select'); |
| | | // function updateBillList(callback) { |
| | | // if (xianshiyemian == 0) { |
| | | // var input = $('select[id="bar"]').next().find('.layui-select-title input') |
| | | // var val = input.val() |
| | | // $("#bar").empty() |
| | | // $("#bar").append('<option value =>' + '</option>'); |
| | | // form.render('select'); |
| | | |
| | | var param = { |
| | | Type: "0" |
| | | }; |
| | | sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | // var param = { |
| | | // Type: "0" |
| | | // }; |
| | | // sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { |
| | | // if (res.code == 0) { //成功 |
| | | // for (var i = 0; i < res.data.length; i++) { |
| | | // $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); |
| | | // } |
| | | // form.render('select'); |
| | | |
| | | if (!val) { |
| | | $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') |
| | | } else { |
| | | var sel = 'dd[lay-value=' + val + ']'; |
| | | $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | } |
| | | // if (!val) { |
| | | // $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') |
| | | // } else { |
| | | // var sel = 'dd[lay-value=' + val + ']'; |
| | | // $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | // } |
| | | |
| | | callback(res.data) |
| | | } else { //不成功 |
| | | // layer.msg(res.msg, { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }, function() {}); |
| | | } |
| | | }); |
| | | } |
| | | else if (xianshiyemian == 1) { |
| | | var input = $('select[id="bar1"]').next().find('.layui-select-title input') |
| | | var val = input.val() |
| | | $("#bar1").empty() |
| | | $("#bar1").append('<option value =>' + '</option>'); |
| | | form.render('select'); |
| | | // callback(res.data) |
| | | // } else { //不成功 |
| | | // // layer.msg(res.msg, { |
| | | // // icon: 2, |
| | | // // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // // }, function() {}); |
| | | // } |
| | | // }); |
| | | // } |
| | | // else if (xianshiyemian == 1) { |
| | | // var input = $('select[id="bar1"]').next().find('.layui-select-title input') |
| | | // var val = input.val() |
| | | // $("#bar1").empty() |
| | | // $("#bar1").append('<option value =>' + '</option>'); |
| | | // form.render('select'); |
| | | |
| | | var param = { |
| | | Type: "1" |
| | | }; |
| | | sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | console.log(res.data); |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#bar1").append('<option value =' + res.data[i] + '>' + res.data[i] +'</option>'); |
| | | } |
| | | form.render('select'); |
| | | // var param = { |
| | | // Type: "1" |
| | | // }; |
| | | // sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { |
| | | // if (res.code == 0) { //成功 |
| | | // console.log(res.data); |
| | | // for (var i = 0; i < res.data.length; i++) { |
| | | // $("#bar1").append('<option value =' + res.data[i] + '>' + res.data[i] +'</option>'); |
| | | // } |
| | | // form.render('select'); |
| | | |
| | | if (!val) { |
| | | $('#bar1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') |
| | | } else { |
| | | var sel = 'dd[lay-value=' + val + ']'; |
| | | $('#bar1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | } |
| | | // if (!val) { |
| | | // $('#bar1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') |
| | | // } else { |
| | | // var sel = 'dd[lay-value=' + val + ']'; |
| | | // $('#bar1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | // } |
| | | |
| | | callback(res.data) |
| | | } else { //不成功 |
| | | // layer.msg(res.msg, { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }, function() {}); |
| | | } |
| | | }); |
| | | } |
| | | // callback(res.data) |
| | | // } else { //不成功 |
| | | // // layer.msg(res.msg, { |
| | | // // icon: 2, |
| | | // // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // // }, function() {}); |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | } |
| | | // } |
| | | |
| | | /*————————————————————————————————————————————————————————————————————————————————————————————————*/ |
| | | |
| | | //点击物料下拉框事件 |
| | | $("#goodDiv").click(function () { |
| | | if ($("#bar").val() == null || $("#bar").val() == "" || $("#bar").val() == undefined) { |
| | | layer.msg("请先选择入库单", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | var input = $('select[id="goodSelect"]').next().find('.layui-select-title input') |
| | | var val = input.val() |
| | | //先更新一下入库单 |
| | | updateGoodListNew(function (data) { |
| | | $('select[id="goodSelect"]').next().addClass('layui-form-selected') |
| | | $('select[id="goodSelect"]').next().find('.layui-select-title input').val(val) |
| | | }) |
| | | |
| | | }) |
| | | //点击物料下拉框事件-数量 |
| | | $("#goodDiv1").click(function () { |
| | | if ($("#bar1").val() == null || $("#bar1").val() == "" || $("#bar1").val() == undefined) { |
| | | layer.msg("请先选择入库单", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | var input = $('select[id="goodSelect1"]').next().find('.layui-select-title input') |
| | | var val = input.val() |
| | | //先更新一下入库单 |
| | | updateGoodListNew(function (data) { |
| | | $('select[id="goodSelect1"]').next().addClass('layui-form-selected') |
| | | $('select[id="goodSelect1"]').next().find('.layui-select-title input').val(val) |
| | | }) |
| | | |
| | | }) |
| | | //选中入库单事件 |
| | | form.on('select(getbar)', function (data) { |
| | |
| | | form.on('submit(formBind)', function (data) { |
| | | if (xianshiyemian == 0) { |
| | | console.log($("#goodSelect").val()); |
| | | if ($("#bar").val() == "") { |
| | | layer.msg('请选择入库单', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return; |
| | | } |
| | | // if ($("#bar").val() == "") { |
| | | // layer.msg('请选择入库单', { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }); |
| | | // return; |
| | | // } |
| | | if ($("#goodSelect").val() == "") { |
| | | layer.msg('请选择物料及明细', { |
| | | icon: 2, |
| | |
| | | return; |
| | | } |
| | | var param = { |
| | | AsnNo: $("#bar").val(), |
| | | AsnNo: $("#goodSelect").val(), |
| | | PalletNo: $("#STOCKCODE").val(), |
| | | AsnDetailId: parseInt($("#goodSelect").val()), |
| | | //AsnDetailId: parseInt($("#goodSelect").val()), |
| | | LotNo: $("#goodSelect").find("option:selected").text(), |
| | | BoxNo: $("#BOXCODE").val(), |
| | | IsContinue: isContinue, |
| | |
| | | }); |
| | | } |
| | | else if (xianshiyemian == 1) { |
| | | if ($("#bar1").val() == "") { |
| | | layer.msg('请选择入库单', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return; |
| | | } |
| | | // if ($("#bar1").val() == "") { |
| | | // layer.msg('请选择入库单', { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }); |
| | | // return; |
| | | // } |
| | | if ($("#goodSelect1").val() == "") { |
| | | layer.msg('请选择物料及明细', { |
| | | icon: 2, |
| | |
| | | return; |
| | | } |
| | | var param = { |
| | | AsnNo: $("#bar1").val(), //出库单据 |
| | | AsnNo: $("#goodSelect1").val(), //出库单据 |
| | | PalletNo: $("#STOCKCODE1").val(), //托盘条码 |
| | | AsnDetailId: parseInt($("#goodSelect1").val()), //入库单明细ID |
| | | //AsnDetailId: parseInt($("#goodSelect1").val()), //入库单明细ID |
| | | LotNo: $("#goodSelect1").find("option:selected").text(), //物料批次 |
| | | SkuQty: parseInt($("#SkuQty").val()), //物料数量 |
| | | Demo: $("#NoticeDemo").val(), //物料数量 |
| | |
| | | var asnDetails = ""; |
| | | |
| | | /* 绑定入库单物料及批次 */ |
| | | function updateGoodList(skuNo) { |
| | | function updateGoodListNew(callback) { |
| | | if (xianshiyemian == 0) { |
| | | console.log("aaaa"); |
| | | var input = $('select[id="goodSelect"]').next().find('.layui-select-title input') |
| | | var val = input.val() |
| | | |
| | |
| | | $("#goodSelect").append('<option value =>' + '</option>'); |
| | | |
| | | var param = { |
| | | AsnNo: $("#bar").val(), |
| | | Type: "0", |
| | | }; |
| | | synData(IP + "/PdaAsn/GetBindArrivalNoticeDetails", param, 'post', function (res) { |
| | | console.log("出库口:" + JSON.stringify(res)) |
| | | synData(IP + "/PdaAsn/GetArrivalNoticesInfo", param, 'post', function (res) { |
| | | |
| | | if (res.code == 0) { //成功 |
| | | asnDetails = res.data; |
| | | if (asnDetails.length <= 0) { |
| | | layer.msg('当前单据下不存在贴标物料', { |
| | | layer.msg('当前未查询到贴标物料信息', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return; |
| | | } |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | if (skuNo != '' && skuNo == res.data[i].SkuNo) { |
| | | if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | .SkuName + |
| | | '</option>'); |
| | | } else { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | |
| | | if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id+'-'+res.data[i] |
| | | .SkuName + '>' + res.data[i].Id+'-'+res.data[i].SkuName + |
| | | '</option>'); |
| | | } else { |
| | | if (i == 0) { |
| | | if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | .SkuName + |
| | | '</option>'); |
| | | } else { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | |
| | | } else { |
| | | if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] |
| | | .SkuName + |
| | | '</option>'); |
| | | } else { |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | } |
| | | $("#goodSelect").append('<option value =' + res.data[i].Id +'-'+ res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + '>' +res.data[i].Id+'-'+ res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | |
| | | } |
| | | form.render('select'); |
| | | |
| | | if (!val) { |
| | | |
| | | console.log(val +"+1"); |
| | | $('#goodSelect').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') |
| | | } else { |
| | | |
| | | console.log(val +"+1"); |
| | | var sel = 'dd[lay-value=' + val + ']'; |
| | | $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | } |
| | | callback(res.data); |
| | | } else { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }); |
| | | } |
| | |
| | | $("#goodSelect1").append('<option value =>' + '</option>'); |
| | | |
| | | var param = { |
| | | AsnNo: $("#bar1").val(), |
| | | Type: "1", |
| | | }; |
| | | synData(IP + "/PdaAsn/GetArrivalNoticeDetails", param, 'post', function (res) { |
| | | console.log("出库口:" + JSON.stringify(res)) |
| | | synData(IP + "/PdaAsn/GetArrivalNoticesInfo", param, 'post', function (res) { |
| | | |
| | | if (res.code == 0) { //成功 |
| | | asnDetails = res.data; |
| | | // console.log(asnDetails.length) |
| | |
| | | return; |
| | | } |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | if (skuNo != '' && skuNo == res.data[i].SkuNo) { |
| | | |
| | | if (i == 0) { |
| | | $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] |
| | | .SkuName); |
| | | } else { |
| | | $("#goodSelect1").append('<option value =' + res.data[i].Id + '>' + res.data[i] |
| | | .SkuName); |
| | | } |
| | | if (res.data[i].LotNo != null) { |
| | | $("#goodSelect1").append("-" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | |
| | | if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | $("#goodSelect1").append('<option value =' + res.data[i].Id+'-'+res.data[i] |
| | | .SkuName + '>' + res.data[i].Id+'-'+res.data[i].SkuName + |
| | | '</option>'); |
| | | } else { |
| | | if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] |
| | | .SkuName + |
| | | '</option>'); |
| | | } else { |
| | | $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | $("#goodSelect1").append('<option value =' + res.data[i].Id +'-'+ res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + '>' +res.data[i].Id+'-'+ res.data[i] |
| | | .SkuName + "-" + res.data[i].LotNo + |
| | | '</option>'); |
| | | } |
| | | |
| | | |
| | | } |
| | | form.render('select'); |
| | | |
| | | if (!val) { |
| | | $('#goodSelect1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') |
| | | } else { |
| | | var sel = 'dd[lay-value=' + val + ']'; |
| | | $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | } |
| | | callback(res.data); |
| | | } else { |
| | | |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | // /* 绑定入库单物料及批次 */ |
| | | // function updateGoodList(skuNo) { |
| | | // if (xianshiyemian == 0) { |
| | | // console.log("aaaa"); |
| | | // var input = $('select[id="goodSelect"]').next().find('.layui-select-title input') |
| | | // var val = input.val() |
| | | |
| | | // $("#goodSelect").empty() |
| | | // $("#goodSelect").append('<option value =>' + '</option>'); |
| | | |
| | | // var param = { |
| | | // AsnNo: $("#bar").val(), |
| | | // }; |
| | | // synData(IP + "/PdaAsn/GetBindArrivalNoticeDetails", param, 'post', function (res) { |
| | | // console.log("出库口:" + JSON.stringify(res)) |
| | | // if (res.code == 0) { //成功 |
| | | // asnDetails = res.data; |
| | | // if (asnDetails.length <= 0) { |
| | | // layer.msg('当前单据下不存在贴标物料', { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }); |
| | | // return; |
| | | // } |
| | | // for (var i = 0; i < res.data.length; i++) { |
| | | // if (skuNo != '' && skuNo == res.data[i].SkuNo) { |
| | | // if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | // .SkuName + |
| | | // '</option>'); |
| | | // } else { |
| | | // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | // .SkuName + "-" + res.data[i].LotNo + |
| | | // '</option>'); |
| | | // } |
| | | // } else { |
| | | // if (i == 0) { |
| | | // if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | // .SkuName + |
| | | // '</option>'); |
| | | // } else { |
| | | // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] |
| | | // .SkuName + "-" + res.data[i].LotNo + |
| | | // '</option>'); |
| | | // } |
| | | |
| | | // } else { |
| | | // if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] |
| | | // .SkuName + |
| | | // '</option>'); |
| | | // } else { |
| | | // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] |
| | | // .SkuName + "-" + res.data[i].LotNo + |
| | | // '</option>'); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // form.render('select'); |
| | | |
| | | // if (!val) { |
| | | // $('#goodSelect').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') |
| | | // } else { |
| | | // var sel = 'dd[lay-value=' + val + ']'; |
| | | // $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | // } |
| | | // } else { |
| | | // } |
| | | // }); |
| | | // } |
| | | // else if (xianshiyemian == 1) { |
| | | // console.log("bbbb"); |
| | | // var input = $('select[id="goodSelect1"]').next().find('.layui-select-title input') |
| | | // var val = input.val() |
| | | |
| | | // $("#goodSelect1").empty() |
| | | // $("#goodSelect1").append('<option value =>' + '</option>'); |
| | | |
| | | // var param = { |
| | | // AsnNo: $("#bar1").val(), |
| | | // }; |
| | | // synData(IP + "/PdaAsn/GetArrivalNoticeDetails", param, 'post', function (res) { |
| | | // console.log("出库口:" + JSON.stringify(res)) |
| | | // if (res.code == 0) { //成功 |
| | | // asnDetails = res.data; |
| | | // // console.log(asnDetails.length) |
| | | // if (asnDetails.length <= 0) { |
| | | // layer.msg('当前单据下不存在不贴标物料', { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }); |
| | | // return; |
| | | // } |
| | | // for (var i = 0; i < res.data.length; i++) { |
| | | // if (skuNo != '' && skuNo == res.data[i].SkuNo) { |
| | | |
| | | // if (i == 0) { |
| | | // $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] |
| | | // .SkuName); |
| | | // } else { |
| | | // $("#goodSelect1").append('<option value =' + res.data[i].Id + '>' + res.data[i] |
| | | // .SkuName); |
| | | // } |
| | | // if (res.data[i].LotNo != null) { |
| | | // $("#goodSelect1").append("-" + res.data[i].LotNo + |
| | | // '</option>'); |
| | | // } |
| | | // } else { |
| | | // if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { |
| | | // $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] |
| | | // .SkuName + |
| | | // '</option>'); |
| | | // } else { |
| | | // $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] |
| | | // .SkuName + "-" + res.data[i].LotNo + |
| | | // '</option>'); |
| | | // } |
| | | // } |
| | | |
| | | // } |
| | | // form.render('select'); |
| | | |
| | | // if (!val) { |
| | | // $('#goodSelect1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') |
| | | // } else { |
| | | // var sel = 'dd[lay-value=' + val + ']'; |
| | | // $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | // } |
| | | // } else { |
| | | |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | // } |
| | | |
| | | // 渲染箱码信息 |
| | | function refreshTable() { |
| | |
| | | |
| | | $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo + '</option>'); |
| | | |
| | | updateGoodList(res.data[0].SkuNo) |
| | | // updateGoodList(res.data[0].SkuNo) |
| | | setOrderGoods(); |
| | | } else { |
| | | if (asnDetails == '') { |
| | |
| | | } |
| | | if (model.Type != "7") |
| | | { |
| | | if (detailModel.LotNo.Length != 10) |
| | | if (!TypeLot.Contains(model.Type)) |
| | | { |
| | | strMessage = "-1:进厂编号位数长度有误;"; |
| | | continue; |
| | | if (detailModel.LotNo.Length != 10) |
| | | { |
| | | strMessage = "-1:进厂编号位数长度有误;"; |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | if (model.Type == "1" && string.IsNullOrWhiteSpace(detailModel.SupplierLot)) //采购到货单原厂批号(供货批次)不能为空 |
| | |
| | | { |
| | | private static readonly SqlSugarScope Db = DataContext.Db; |
| | | |
| | | #region 修改托盘绑定时入库单去除变为物料+数量 |
| | | |
| | | /// <summary> |
| | | /// 获取单据明细显示的物料 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public List<ArrivalNoticeDetailDto> GetArrivalNoticesInfo(ArrivalNoticeVm model) |
| | | { |
| | | try |
| | | { |
| | | //model.Type:单据类型 在这里代表前端页签类型:即标签页签:贴标物料; 数量页签:不贴表物料,原因:懒得加参数 |
| | | var data = Db.Queryable<BllArrivalNotice>().Where(m => m.IsDel == "0" && m.Status != "3" && m.Status != "4").Select(m => m.ASNNo).ToList(); |
| | | var list = new List<ArrivalNoticeDetailDto>(); |
| | | if (model.Type.Contains("0"))//0贴标 |
| | | { |
| | | list = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && data.Contains(m.ASNNo) && !string.IsNullOrWhiteSpace(m.PackagNo)).Select(m => new ArrivalNoticeDetailDto()).ToList(); |
| | | } |
| | | else if (model.Type.Contains("1"))//1不贴标 |
| | | { |
| | | list = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && data.Contains(m.ASNNo) && string.IsNullOrWhiteSpace(m.PackagNo)).Select(m=>new ArrivalNoticeDetailDto()).ToList(); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("页签类型参数错误"); |
| | | } |
| | | |
| | | List<ArrivalNoticeDetailDto> noticeList = new List<ArrivalNoticeDetailDto>(); |
| | | foreach (var item in list) |
| | | { |
| | | if (string.IsNullOrEmpty(item.LotNo)) |
| | | { |
| | | noticeList.Add(item); |
| | | } |
| | | else |
| | | { |
| | | string[] LotNoList = item.LotNo.Split(';'); |
| | | foreach (var item2 in LotNoList) |
| | | { |
| | | ArrivalNoticeDetailDto entry = new ArrivalNoticeDetailDto() |
| | | { |
| | | Id = item.Id, |
| | | ASNNo = item.ASNNo, |
| | | CompleteQty = item.CompleteQty, |
| | | CompleteTime = item.CompleteTime, |
| | | CreateTime = item.CreateTime, |
| | | Qty = item.Qty, |
| | | FactQty = item.FactQty, |
| | | LotNo = item2, |
| | | Money = item.Money, |
| | | PackagNo = item.PackagNo, |
| | | PackagName = item.PackagName, |
| | | Status = item.Status, |
| | | SkuNo = item.SkuNo, |
| | | SkuName = item.SkuName, |
| | | }; |
| | | |
| | | |
| | | noticeList.Add(entry); |
| | | } |
| | | } |
| | | } |
| | | //List<ArrivalNoticeDetailDto> list = new List<ArrivalNoticeDetailDto>(); |
| | | //foreach (var item in noticeList) |
| | | //{ |
| | | // string str = BySkuNoGetPackInfo(item.SkuNo); |
| | | // if (str == "存在") |
| | | // { |
| | | // list.Add(item); |
| | | // } |
| | | //} |
| | | |
| | | return noticeList; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | // 获取单据列表 |
| | | public List<string> GetArrivalNotices(ArrivalNoticeVm model) |
| | | { |
| | |
| | | //model.Type:单据类型 在这里代表前端页签类型:即标签页签:贴标物料; 数量页签:不贴表物料,原因:懒得加参数 |
| | | var data = Db.Queryable<BllArrivalNotice>().Where(m => m.IsDel == "0" && m.Status != "3" && m.Status != "4").Select(m=>m.ASNNo).ToList(); |
| | | var list = new List<string>(); |
| | | if (model.Type == "0")//0贴标 |
| | | if (model.Type.Contains("0"))//0贴标 |
| | | { |
| | | list = Db.Queryable<BllArrivalNoticeDetail>().Where(m =>m.IsDel == "0" && data.Contains(m.ASNNo) && !string.IsNullOrWhiteSpace(m.PackagNo)).Select(m => m.ASNNo).Distinct().ToList(); |
| | | } |
| | | else if(model.Type == "1")//1不贴标 |
| | | else if(model.Type.Contains("1"))//1不贴标 |
| | | { |
| | | list = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && data.Contains(m.ASNNo) && string.IsNullOrWhiteSpace(m.PackagNo)).Select(m=>m.ASNNo).Distinct().ToList(); |
| | | } |
| | |
| | | |
| | | if (string.IsNullOrEmpty(model.AsnNo)) |
| | | { |
| | | throw new Exception("-1:单据号不可为空!"); |
| | | throw new Exception("-1:物料明细不可为空!"); |
| | | } |
| | | if (model.AsnDetailId == null || model.AsnDetailId == 0) |
| | | { |
| | | throw new Exception("-1:物料不可为空!"); |
| | | } |
| | | //if (model.AsnDetailId == null || model.AsnDetailId == 0) |
| | | //{ |
| | | // throw new Exception("-1:物料明细不可为空!"); |
| | | //} |
| | | if (string.IsNullOrEmpty(model.PalletNo)) |
| | | { |
| | | throw new Exception("-1:托盘号不可为空!"); |
| | | } |
| | | var detailId = model.AsnNo.Split("-"); |
| | | model.AsnDetailId = int.Parse(detailId[0]); |
| | | // 验证入库单明细是否存在 |
| | | var detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == model.AsnDetailId); |
| | | if (detail == null) |
| | | { |
| | | throw new Exception("-1:当前物料未查询到单据,请核实!"); |
| | | } |
| | | model.AsnNo = detail.ASNNo; |
| | | //根据单据号获取入库单总单 |
| | | var notice = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.AsnNo); |
| | | var notice = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == detail.ASNNo); |
| | | if (notice.Status != "0" && notice.Status != "1" && notice.Status != "2") |
| | | { |
| | | throw new Exception("-1:该单据已关单!"); |
| | |
| | | else |
| | | { |
| | | //从物料名称-批次中取出批次 |
| | | int indexOfDash = model.LotNo.IndexOf("-"); |
| | | if (indexOfDash != -1) |
| | | var indexOfDash = model.LotNo.Split("-"); |
| | | var len = indexOfDash.Length; |
| | | if (len >= 1) |
| | | { |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 1); |
| | | model.LotNo =indexOfDash[len-1]; |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | throw new Exception("该托盘在库存已有信息,请核实!"); |
| | | } |
| | | // 验证入库单明细是否存在 |
| | | var detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == model.AsnDetailId && m.ASNNo == model.AsnNo && m.LotNo.Contains(model.LotNo)); |
| | | if (detail == null) |
| | | { |
| | | throw new Exception("-1:当前物料及批次与单据无关联,请核实!"); |
| | | } |
| | | |
| | | #region 包装 |
| | | var package = Db.Queryable<SysPackag>().Where(m => m.IsDel == "0"); |
| | | var sku = Db.Queryable<SysMaterials>().First(m => m.IsDel == "0" && m.SkuNo == detail.SkuNo); |
| | |
| | | { |
| | | public interface IPdaAsnServer |
| | | { |
| | | //获取单据明细显示的物料 |
| | | List<ArrivalNoticeDetailDto> GetArrivalNoticesInfo(ArrivalNoticeVm model); |
| | | |
| | | // 获取单据列表 |
| | | List<string> GetArrivalNotices(ArrivalNoticeVm model); |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region MyRegion |
| | | |
| | | /// <summary> |
| | | /// 获取单据明细显示的物料 |
| | | /// </summary> |
| | | /// <param name="model">Type:单据类型</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetArrivalNoticesInfo(ArrivalNoticeVm model) |
| | | { |
| | | try |
| | | { |
| | | var models = _PdaAsnSvc.GetArrivalNoticesInfo(model); |
| | | |
| | | return Ok(new { code = 0, msg = "入库单信息", data = models }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 公用方法 |
| | | /// <summary> |
| | | /// 获取单据列表 |