|  |  |  | 
|---|
|  |  |  | <input type="text" autocomplete="off" id="EndTime" class="layui-input" placeholder="结束时间"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <label class="layui-form-label" style="width: 60px;">所属仓库</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <select name="WareHouseNo" id="WareHouseNo" lay-filter="getWareHouseNo" lay-search> | 
|---|
|  |  |  | <option value=""></option> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <label class="layui-form-label" style="width: 60px;">所属区域</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <select name="AreaNo" id="AreaNo" lay-filter="getAreaNo" lay-search> | 
|---|
|  |  |  | <option value=""></option> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="layui-inline sousuo"> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit | 
|---|
|  |  |  | 
|---|
|  |  |  | <!-- #region 自定义表头 --> | 
|---|
|  |  |  | <script type="text/html" id="templetProductionTime"> | 
|---|
|  |  |  | {{# function GetBtn(d){ | 
|---|
|  |  |  | return formatDate(d.ProductionTime); | 
|---|
|  |  |  | return formatDate2(d.ProductionTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | {{ GetBtn(d) }} | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <script type="text/html" id="templetExpirationTime"> | 
|---|
|  |  |  | {{# function GetBtn(d){ | 
|---|
|  |  |  | return formatDate2(d.ExpirationTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | {{ GetBtn(d) }} | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script type="text/html" id="buttonTpl"> | 
|---|
|  |  |  | {{#  if(d.Status=='0'){ }} | 
|---|
|  |  |  | <button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">待分配</button> | 
|---|
|  |  |  | {{#  } else if(d.Status == '1') { }} | 
|---|
|  |  |  | <button class="layui-btn layui-btn-radius layui-btn-xs">部分分配</button> | 
|---|
|  |  |  | {{#  } else if(d.Status == '2') { }} | 
|---|
|  |  |  | <button class="layui-btn layui-btn-radius layui-btn-xs">已分配</button> | 
|---|
|  |  |  | {{#  } else if(d.Status == '3') { }} | 
|---|
|  |  |  | <button class="layui-btn layui-btn-radius layui-btn-xs">盘点锁定</button> | 
|---|
|  |  |  | {{#  } else if(d.Status == '4') { }} | 
|---|
|  |  |  | <button class="layui-btn layui-btn-radius layui-btn-xs">移库锁定</button> | 
|---|
|  |  |  | {{#  } else if(d.Status == '5') { }} | 
|---|
|  |  |  | <button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger">异常锁定</button> | 
|---|
|  |  |  | {{#  } }} | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <script type="text/html" id="BoxStatus"> | 
|---|
|  |  |  | {{#  if(d.Status=='0'){ }} | 
|---|
|  |  |  | <p>未组托</p> | 
|---|
|  |  |  | 
|---|
|  |  |  | //#region 自定义表头 | 
|---|
|  |  |  | var TotalColsArr = [[ | 
|---|
|  |  |  | { field: '', title: '序号', type: 'numbers', align: 'center', fixed: 'left', "disabled": true }, | 
|---|
|  |  |  | { field: 'WareHouseName', title: '所属仓库', align: 'center' , width: 120,}, | 
|---|
|  |  |  | { field: 'WareHouseName', title: '所属仓库', align: 'center', width: 120, }, | 
|---|
|  |  |  | { field: 'RoadwayName', title: '所属巷道', align: 'center', width: 120, }, | 
|---|
|  |  |  | { field: 'AreaName', title: '所属区域', align: 'center', width: 120, }, | 
|---|
|  |  |  | { field: 'LocatNo', title: '储位地址', align: 'center', width: 100, }, | 
|---|
|  |  |  | { field: 'PalletNo', title: '托盘号', align: 'center' , width: 100,}, | 
|---|
|  |  |  | { field: 'SkuNo', title: '物料编码', align: 'center' , width: 120,}, | 
|---|
|  |  |  | { field: 'SkuName', title: '物料名称', align: 'center', width: 120,}, | 
|---|
|  |  |  | { field: 'LotNo', title: '批次号', align: 'center' , width: 100,}, | 
|---|
|  |  |  | { field: 'PalletNo', title: '托盘号', align: 'center', width: 100, }, | 
|---|
|  |  |  | { field: 'SkuNo', title: '物料编码', align: 'center', width: 120, }, | 
|---|
|  |  |  | { field: 'SkuName', title: '物料名称', align: 'center', width: 120, }, | 
|---|
|  |  |  | { field: 'LotNo', title: '批次号', align: 'center', width: 100, }, | 
|---|
|  |  |  | //{ field: 'LotText', title: '批次描述', align: 'center' }, | 
|---|
|  |  |  | { field: 'SupplierLot', title: '供货批次', align: 'center' , width: 120,}, | 
|---|
|  |  |  | { field: 'Qty', title: '数量', align: 'center' ,width: 90,}, | 
|---|
|  |  |  | { field: 'LockQty', title: '锁定数量', align: 'center',width: 90, }, | 
|---|
|  |  |  | { field: 'FrozenQty', title: '冻结数量', align: 'center',width: 90, }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | { field: 'InspectStatus', templet: '#InspectStatus1', title: '质检状态', align: 'center' ,width: 100,}, | 
|---|
|  |  |  | { field: 'InspectMark', title: '抽检标记', align: 'center', templet: '#InspectMarkStatus' ,width: 100,}, | 
|---|
|  |  |  | { field: 'BitPalletMark', title: '零托标记', align: 'center', templet: '#BitPalletMarkStatus',width: 100,}, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 120, }, | 
|---|
|  |  |  | { field: 'Qty', title: '数量', align: 'center', width: 90, }, | 
|---|
|  |  |  | { field: 'LockQty', title: '锁定数量', align: 'center', width: 90, }, | 
|---|
|  |  |  | { field: 'FrozenQty', title: '冻结数量', align: 'center', width: 90, }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | { field: 'Status', title: '库存状态', align: 'center', templet: '#buttonTpl', width: 90, }, | 
|---|
|  |  |  | { field: 'InspectStatus', templet: '#InspectStatus1', title: '质检状态', align: 'center', width: 100, }, | 
|---|
|  |  |  | { field: 'InspectMark', title: '抽检标记', align: 'center', templet: '#InspectMarkStatus', width: 100, }, | 
|---|
|  |  |  | { field: 'BitPalletMark', title: '零托标记', align: 'center', templet: '#BitPalletMarkStatus', width: 100, }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | { field: 'ProductionTime', title: '生产日期', align: 'center', templet: '#templetProductionTime' }, | 
|---|
|  |  |  | { field: 'OwnerNo', title: '货主编码', align: 'center' , width: 100,}, | 
|---|
|  |  |  | { field: 'OwnerName', title: '货主名称', align: 'center' , width: 100,}, | 
|---|
|  |  |  | { field: 'SupplierNo', title: '供应商编码', align: 'center' , width: 100,}, | 
|---|
|  |  |  | { field: 'SupplierName', title: '供应商名称', align: 'center' , width: 100,}, | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | { field: 'OwnerNo', title: '货主编码', align: 'center', width: 100, }, | 
|---|
|  |  |  | { field: 'OwnerName', title: '货主名称', align: 'center', width: 100, }, | 
|---|
|  |  |  | { field: 'SupplierNo', title: '供应商编码', align: 'center', width: 100, }, | 
|---|
|  |  |  | { field: 'SupplierName', title: '供应商名称', align: 'center', width: 100, }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ]]; | 
|---|
|  |  |  | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 | 
|---|
|  |  |  | //#endregion | 
|---|
|  |  |  | //获取托盘明细 | 
|---|
|  |  |  | function refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, | 
|---|
|  |  |  | BitBoxMark, InspectStatus, OwnerNo, OwnerName, StartTime, EndTime) { | 
|---|
|  |  |  | BitBoxMark, InspectStatus, OwnerNo, OwnerName, StartTime, EndTime, WareHouseNo, AreaNo) { | 
|---|
|  |  |  | //#region 自定义表头 | 
|---|
|  |  |  | var colsJson | 
|---|
|  |  |  | var param1 = { | 
|---|
|  |  |  | 
|---|
|  |  |  | OwnerName: OwnerName, //货主名称 | 
|---|
|  |  |  | StartTime: StartTime, //开始时间 | 
|---|
|  |  |  | EndTime: EndTime, //结束时间 | 
|---|
|  |  |  | WareHouseNo: WareHouseNo, | 
|---|
|  |  |  | AreaNo: AreaNo, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | sendData(IP + "/Statistical/GetBindList", param, 'get', function (res) { | 
|---|
|  |  |  | console.log(res) | 
|---|
|  |  |  | 
|---|
|  |  |  | { field: 'Qty', title: '数量', width: 90, align: 'center' }, | 
|---|
|  |  |  | { field: 'FullQty', title: '整箱数量', width: 100, align: 'center' }, | 
|---|
|  |  |  | { field: 'ProductionTime', title: '生产日期', align: 'center', templet: '#templetProductionTime' }, | 
|---|
|  |  |  | { field: 'ExpirationTime', title: '有效期', align: 'center', templet: '#templetExpirationTime' }, | 
|---|
|  |  |  | { field: 'InspectMark', title: '抽检标记', align: 'center', templet: '#InspectMarkStatus' }, | 
|---|
|  |  |  | { field: 'BitBoxMark', templet: '#BitPalletMarkStatus1', title: '零箱标记', align: 'center' }, | 
|---|
|  |  |  | { field: 'InspectStatus', templet: '#InspectStatus1', title: '质检状态', align: 'center' }, | 
|---|
|  |  |  | 
|---|
|  |  |  | ]]; | 
|---|
|  |  |  | var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码 | 
|---|
|  |  |  | //#endregion | 
|---|
|  |  |  | function refreshTable2(Id, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus, StartTime, EndTime) { | 
|---|
|  |  |  | function refreshTable2(Id, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus, | 
|---|
|  |  |  | StartTime, EndTime, WareHouseNo, AreaNo) { | 
|---|
|  |  |  | //#region 自定义表头 | 
|---|
|  |  |  | var colsJson2 | 
|---|
|  |  |  | var param1 = { | 
|---|
|  |  |  | 
|---|
|  |  |  | InspectStatu: InspectStatus, | 
|---|
|  |  |  | StartTime: StartTime, | 
|---|
|  |  |  | EndTime: EndTime, | 
|---|
|  |  |  | WareHouseNo: WareHouseNo, | 
|---|
|  |  |  | AreaNo: AreaNo, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sendData(IP + "/Statistical/GetBoxInfo", param, 'get', function (res) { | 
|---|
|  |  |  | if (res.code == 0) //成功 | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var StartTime = $("#StartTime").val(); | 
|---|
|  |  |  | var EndTime = $("#EndTime").val(); | 
|---|
|  |  |  | var WareHouseNo = $("#WareHouseNo").val(); | 
|---|
|  |  |  | var AreaNo = $("#AreaNo").val(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (yemianid == 0) { | 
|---|
|  |  |  | console.log("总单"); | 
|---|
|  |  |  | refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark, InspectStatus, OwnerNo, OwnerName, StartTime, EndTime); | 
|---|
|  |  |  | refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark, | 
|---|
|  |  |  | InspectStatus, OwnerNo, OwnerName, StartTime, EndTime, WareHouseNo, AreaNo); | 
|---|
|  |  |  | } else if (yemianid == 1) { | 
|---|
|  |  |  | quanid = ''; | 
|---|
|  |  |  | console.log("明细"); | 
|---|
|  |  |  | refreshTable2(quanid, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus, StartTime, EndTime); | 
|---|
|  |  |  | refreshTable2(quanid, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, | 
|---|
|  |  |  | InspectStatus, StartTime, EndTime, WareHouseNo, AreaNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获取仓库下拉框信息 | 
|---|
|  |  |  | sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) { | 
|---|
|  |  |  | if (res.code == 0) { //成功 | 
|---|
|  |  |  | for (var i = 0; i < res.data.length; i++) { | 
|---|
|  |  |  | $("#WareHouseNo").append('<option value =' + res.data[i].WareHouseNo + '>' + res.data[i].WareHouseNo + '-' + | 
|---|
|  |  |  | res.data[i].WareHouseName + '</option>'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | form.render('select'); | 
|---|
|  |  |  | } else { //不成功 | 
|---|
|  |  |  | layer.msg(res.msg, { | 
|---|
|  |  |  | icon: 2, | 
|---|
|  |  |  | time: 2000 //2秒关闭(如果不配置,默认是3秒) | 
|---|
|  |  |  | }, function () { }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | getAR(""); | 
|---|
|  |  |  | form.on('select(getWareHouseNo)', function (data) { | 
|---|
|  |  |  | console.log(data); | 
|---|
|  |  |  | getAR(data.value); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | function getAR(val) { | 
|---|
|  |  |  | //获取 区域下拉框 | 
|---|
|  |  |  | sendData(IP + "/Sys/GetStorageAreaByHouseNo?wareHouseNo=" + val, {}, 'get', function (res) { | 
|---|
|  |  |  | $("#AreaNo").empty(); | 
|---|
|  |  |  | $("#AreaNo").append('<option value =""></option>'); | 
|---|
|  |  |  | if (res.code == 0) { //成功 | 
|---|
|  |  |  | for (var i = 0; i < res.data.length; i++) { | 
|---|
|  |  |  | $("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].AreaNo + '-' + | 
|---|
|  |  |  | res.data[i].AreaName + '</option>'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | form.render('select'); | 
|---|
|  |  |  | } else { //不成功 | 
|---|
|  |  |  | layer.msg('获取区域信息失败', { | 
|---|
|  |  |  | icon: 2, | 
|---|
|  |  |  | time: 2000 //2秒关闭(如果不配置,默认是3秒) | 
|---|
|  |  |  | }, function () { | 
|---|
|  |  |  | //回调 | 
|---|
|  |  |  | form.render('select'); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //#region 自定义表头 | 
|---|
|  |  |  | //自定义表头 | 
|---|
|  |  |  | active = { | 
|---|