| | |
| | | </style> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | | document.addEventListener("DOMContentLoaded", function() { |
| | | document.addEventListener("DOMContentLoaded", function () { |
| | | //获取table默认显示数 |
| | | pageCntFirst(); |
| | | //判断是否开启table列表列宽调整功能。 |
| | | GetIsSetColW(); |
| | | }); |
| | | </script> |
| | | </script> |
| | | |
| | | </head> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <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"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="layui-inline"> |
| | | <!-- 类型 --> |
| | | <label class="layui-form-label" style="width: 60px;">物料类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">原料</option> |
| | | <option value="1">包材</option> |
| | | <option value="2">成品</option> |
| | | <option value="3">耗材</option> |
| | | <option value="4">中间品</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">货主编码</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="OwnerNo" name="OwnerNo" placeholder="货主编码" autocomplete="off" |
| | |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <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"> |
| | | <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 mingxi"> |
| | |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">质检状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">待质检</option><!-- 待检验 --> |
| | | <option value="1">检验合格</option><!-- 合格品 --> |
| | | <option value="2">不合格</option><!-- 不合格 --> |
| | | <option value="3">放置期</option><!-- 不合格 --> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline "> |
| | | <label class="layui-form-label" style="width: 60px;">库存状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline " style="display: none;"> |
| | | <label class="layui-form-label" style="width: 60px;">抽检托</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="IsSamolingTray" id="IsSamolingTray" lay-filter="IsSamolingTray" |
| | | lay-search> |
| | | <option value=""></option> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> --> |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">质检状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">待质检</option><!-- 待检验 --> |
| | | <option value="1">检验合格</option><!-- 合格品 --> |
| | | <option value="2">不合格</option><!-- 不合格 --> |
| | | <option value="3">放置期</option><!-- 不合格 --> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">开始时间</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" autocomplete="off" id="StartTime" class="layui-input" |
| | | placeholder="开始时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">结束时间</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" autocomplete="off" id="EndTime" class="layui-input" |
| | | placeholder="结束时间"> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <div class="layui-inline sousuo"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="daochu"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>导出 |
| | | <i class="layui-icon layui-icon-edit layuiadmin-button-btn"></i>导出 |
| | | </button> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <table id="LAY-app-content-list2" lay-filter="LAY-app-content-list2"></table> |
| | | <!-- #region 自定义表头 --> |
| | | <div class="headerSetIcon"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols2"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" |
| | | data-type="customCols2"> |
| | | <i class="layui-icon"></i> |
| | | </button> |
| | | </div> |
| | | <!-- #endregion --> |
| | | |
| | | <!-- #region 自定义表头 --> |
| | | <!-- #region 自定义表头 --> |
| | | <script type="text/html" id="templetCompleteTime"> |
| | | {{# function GetBtn(d){ |
| | | return formatDate(d.CompleteTime); |
| | |
| | | {{# } else { }} |
| | | <button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">异常</button> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="SkuType"> |
| | | {{# if(d.Type=='0'){ }} |
| | | <p>原料</p> |
| | | {{# } else if(d.Type=='1') { }} |
| | | <p>包材</p> |
| | | {{# } else if(d.Type=='2') { }} |
| | | <p>成品</p> |
| | | {{# } else if(d.Type=='3') { }} |
| | | <p>耗材</p> |
| | | {{# } else if(d.Type=='4') { }} |
| | | <p>中间品</p> |
| | | {{# } }} |
| | | </script> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | var $ = layui.$; |
| | | var yemianid = 0; |
| | | refreshTable("", "","","",""); |
| | | refreshTable("", "", "", "", ""); |
| | | |
| | | // 表单需要的变量 |
| | | var infoOptions; |
| | | //#region 原始非自定义列 |
| | | //infoOptions = { |
| | | // elem: '#LAY-app-content-list', |
| | | // height: 'full-206', |
| | | // id: 'LAY-app-content-list', |
| | | // totalRow: true |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // even: true, |
| | | // cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // cols: |
| | | // [[ |
| | | // { |
| | | // title: '序号', |
| | | // type: 'numbers', |
| | | // fixed: 'left' |
| | | // }, |
| | | // { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // align: 'center', |
| | | // totalRowText: "合计:", |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Standard', |
| | | // title: '物料规格', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '库存数量', |
| | | // align: 'center', |
| | | // totalRow: true, |
| | | // }, { |
| | | // field: 'LockQty', |
| | | // title: '锁定数量', |
| | | // align: 'center', |
| | | // totalRow: true, |
| | | // }, { |
| | | // field: 'FrozenQty', |
| | | // title: '冻结数量', |
| | | // align: 'center', |
| | | // totalRow: true, |
| | | // } |
| | | // ]] |
| | | //}; |
| | | //#endregion |
| | | |
| | | //#region 自定义表头 |
| | | var TotalColsArr = [[ |
| | | {field: '',title: '序号',type:'numbers',align: 'center',fixed: 'left', "disabled": true}, |
| | | {field: 'SkuNo',title: '物料编码',align: 'center',totalRowText: "合计:", "disabled": true}, |
| | | {field: 'SkuName',title: '物料名称',align: 'center', "disabled": true}, |
| | | {field: 'Standard',title: '物料规格',align: 'center', "disabled": true}, |
| | | {field: 'LotNo',title: '进厂编号',align: 'center', "disabled": true}, |
| | | {field: 'LotText',title: '批次描述',align: 'center'}, |
| | | {field: 'OwnerNo',title: '货主编码',align: 'center'}, |
| | | {field: 'OwnerName',title: '货主名称',align: 'center'}, |
| | | {field: 'Qty',title: '库存数量',align: 'center',totalRow: true}, |
| | | {field: 'LockQty',title: '锁定数量',align: 'center',totalRow: true}, |
| | | {field: 'FrozenQty',title: '冻结数量',align: 'center',totalRow: true} |
| | | ]]; |
| | | var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | { field: '', title: '序号', type: 'numbers', align: 'center', fixed: 'left', "disabled": true }, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', totalRowText: "合计:", "disabled": true }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center', "disabled": true }, |
| | | { field: 'Standard', title: '物料规格', align: 'center', "disabled": true }, |
| | | { field: 'LotNo', title: '进厂编号', align: 'center', "disabled": true }, |
| | | { field: 'LotText', title: '批次描述', align: 'center' }, |
| | | { field: 'OwnerNo', title: '货主编码', align: 'center' }, |
| | | { field: 'OwnerName', title: '货主名称', align: 'center' }, |
| | | { field: 'Qty', title: '库存数量', align: 'center', totalRow: true }, |
| | | { field: 'LockQty', title: '锁定数量', align: 'center', totalRow: true }, |
| | | { field: 'FrozenQty', title: '冻结数量', align: 'center', totalRow: true } |
| | | ]]; |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | //获取总量信息 |
| | | function refreshTable(SkuNo,SkuName,OwnerNo,OwnerName,LotNo) { |
| | | function refreshTable(SkuNo, SkuName, OwnerNo, OwnerName, LotNo) { |
| | | //#region 自定义表头 |
| | | var colsJson |
| | | var param1={ |
| | | Href:'Statistical/GetInventoryList' |
| | | var param1 = { |
| | | Href: 'Statistical/GetInventoryList' |
| | | }; |
| | | sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) { |
| | | if (res.code == 0){ |
| | | if(res.data=='' || res.data==undefined || res.data==null){ |
| | | colsJson=TotalColsArr |
| | | }else{ |
| | | colsJson= eval(res.data); |
| | | sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { |
| | | if (res.code == 0) { |
| | | if (res.data == '' || res.data == undefined || res.data == null) { |
| | | colsJson = TotalColsArr |
| | | } else { |
| | | colsJson = eval(res.data); |
| | | } |
| | | }else{ |
| | | colsJson=TotalColsArr |
| | | } else { |
| | | colsJson = TotalColsArr |
| | | } |
| | | infoOptions = { |
| | | elem: '#LAY-app-content-list', |
| | |
| | | limits: pageLimits, |
| | | even: true, |
| | | cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | done: function(){ |
| | | done: function () { |
| | | //自定义列宽 |
| | | SetTableColW('LAY-app-content-list','Statistical/GetInventoryList',TotalColsSysArr); |
| | | }, |
| | | cols:colsJson |
| | | SetTableColW('LAY-app-content-list', 'Statistical/GetInventoryList', TotalColsSysArr); |
| | | }, |
| | | cols: colsJson |
| | | }; |
| | | var param = { |
| | | SkuNo:SkuNo, //物料号 |
| | | SkuName:SkuName, //物料名称 |
| | | OwnerNo:OwnerNo, //货主编码 |
| | | OwnerName:OwnerName, //货主名称 |
| | | LotNo:LotNo, //进厂编号 |
| | | SkuNo: SkuNo, //物料号 |
| | | SkuName: SkuName, //物料名称 |
| | | OwnerNo: OwnerNo, //货主编码 |
| | | OwnerName: OwnerName, //货主名称 |
| | | LotNo: LotNo, //进厂编号 |
| | | }; |
| | | sendData(IP + "/Statistical/GetInventoryList", param, 'get', function (res) { |
| | | console.log(res) |
| | |
| | | }); |
| | | }); |
| | | //#endregion |
| | | } |
| | | } |
| | | |
| | | // 表单需要的变量 |
| | | var infoOptions2; |
| | | //#region 原始非自定义列 |
| | | //infoOptions2 = { |
| | | // elem: '#LAY-app-content-list2', |
| | | // height: 'full-206', |
| | | // id: 'LAY-app-content-list2', |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // even: true, |
| | | // cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // cols: |
| | | // [[ |
| | | // { |
| | | // field: 'PalletNo', |
| | | // title: '托盘号', |
| | | // align: 'center', |
| | | // width: 110, |
| | | // }, { |
| | | // field: 'LocatNo', |
| | | // title: '储位地址', |
| | | // align: 'center', |
| | | // width: 100, |
| | | // }, { |
| | | // field: 'RoadwayName', |
| | | // title: '所属巷道', |
| | | // width: 90, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'WareHouseName', |
| | | // title: '所属仓库', |
| | | // width: 90, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // width: 100, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Standard', |
| | | // title: '物料规格', |
| | | // width: 130, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'LotNo', |
| | | // title: '进厂编号', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '库存数量', |
| | | // width: 110, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'LockQty', |
| | | // title: '锁定数量', |
| | | // width: 110, |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // field: 'Status', |
| | | // templet: '#buttonTpl', |
| | | // title: '库存状态', |
| | | // width: 90, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'InspectStatus', |
| | | // templet: '#buttonTp2', |
| | | // title: '质检状态', |
| | | // width: 90, |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // field: 'CompleteTime', |
| | | // title: '入库时间', |
| | | // align: 'center', |
| | | // width: 150, |
| | | // templet: function (d) { |
| | | // return formatDate(d.CompleteTime); |
| | | // }, |
| | | // }, |
| | | // ]] |
| | | //}; |
| | | //#endregion |
| | | |
| | | //获取明细信息 |
| | | //#region 自定义表头 |
| | | var DetailColsArr = [[ |
| | | {field: 'PalletNo',title: '托盘号',align: 'center',width: 110,}, |
| | | {field: 'LocatNo',title: '储位地址',align: 'center',width: 100,}, |
| | | {field: 'WareHouseName',title: '所属仓库',width: 90,align: 'center'}, |
| | | {field: 'RoadwayName',title: '所属巷道',width: 90,align: 'center'}, |
| | | {field: 'AreaName',title: '所属区域',width: 90,align: 'center'}, |
| | | {field: 'SkuNo',title: '物料编码',width: 100,align: 'center'}, |
| | | {field: 'SkuName',title: '物料名称',align: 'center'}, |
| | | {field: 'Standard',title: '物料规格',width: 130,align: 'center'}, |
| | | {field: 'LotNo',title: '进厂编号',align: 'center'}, |
| | | {field: 'OwnerNo',title: '货主编码',align: 'center'}, |
| | | {field: 'OwnerName',title: '货主名称',align: 'center'}, |
| | | {field: 'SupplierNo',title: '生产商编码',align: 'center'}, |
| | | {field: 'SupplierName',title: '生产商名称',align: 'center'}, |
| | | {field: 'Qty',title: '库存数量',width: 110,align: 'center'}, |
| | | {field: 'LockQty',title: '锁定数量',width: 110,align: 'center'}, |
| | | {field: 'Status',templet: '#buttonTpl',title: '库存状态',width: 90,align: 'center'}, |
| | | {field: 'InspectStatus',templet: '#buttonTp2',title: '质检状态',width: 90,align: 'center'}, |
| | | {field: 'CompleteTime',title: '入库时间',align: 'center',width: 150,templet: '#templetCompleteTime'}, |
| | | ]]; |
| | | var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码 |
| | | { field: 'PalletNo', title: '托盘号', align: 'center', width: 110, }, |
| | | { field: 'LocatNo', title: '储位地址', align: 'center', width: 100, }, |
| | | { field: 'WareHouseName', title: '所属仓库', width: 90, align: 'center' }, |
| | | { field: 'RoadwayName', title: '所属巷道', width: 90, align: 'center' }, |
| | | { field: 'AreaName', title: '所属区域', width: 90, align: 'center' }, |
| | | { field: 'SkuNo', title: '物料编码', width: 100, align: 'center' }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center' }, |
| | | { field: 'Standard', title: '物料规格', width: 130, align: 'center' }, |
| | | { field: 'Type', title: '物料类型', width: 130, align: 'center', templet: '#SkuType' }, |
| | | { field: 'LotNo', title: '进厂编号', align: 'center' }, |
| | | { field: 'OwnerNo', title: '货主编码', align: 'center' }, |
| | | { field: 'OwnerName', title: '货主名称', align: 'center' }, |
| | | { field: 'SupplierNo', title: '生产商编码', align: 'center' }, |
| | | { field: 'SupplierName', title: '生产商名称', align: 'center' }, |
| | | { field: 'Qty', title: '库存数量', width: 110, align: 'center' }, |
| | | { field: 'LockQty', title: '锁定数量', width: 110, align: 'center' }, |
| | | { field: 'Status', templet: '#buttonTpl', title: '库存状态', width: 90, align: 'center' }, |
| | | { field: 'InspectStatus', templet: '#buttonTp2', title: '质检状态', width: 90, align: 'center' }, |
| | | { field: 'CompleteTime', title: '入库时间', align: 'center', width: 150, templet: '#templetCompleteTime' }, |
| | | ]]; |
| | | var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function refreshTable2(SkuNo,SkuName,OwnerNo,OwnerName,LotNo,LocatNo,PalletNo,Status,InspectStatus) { |
| | | function refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo, Type) { |
| | | //#region 自定义表头 |
| | | var colsJson2 |
| | | var param1={ |
| | | Href:'Statistical/GetInventoryList1' |
| | | var param1 = { |
| | | Href: 'Statistical/GetInventoryList1' |
| | | }; |
| | | sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) { |
| | | if (res.code == 0){ |
| | | if(res.data=='' || res.data==undefined || res.data==null){ |
| | | colsJson2=DetailColsArr |
| | | }else{ |
| | | colsJson2= eval(res.data); |
| | | sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { |
| | | if (res.code == 0) { |
| | | if (res.data == '' || res.data == undefined || res.data == null) { |
| | | colsJson2 = DetailColsArr |
| | | } else { |
| | | colsJson2 = eval(res.data); |
| | | } |
| | | }else{ |
| | | colsJson2=DetailColsArr |
| | | } else { |
| | | colsJson2 = DetailColsArr |
| | | } |
| | | infoOptions2 = { |
| | | elem: '#LAY-app-content-list2', |
| | |
| | | limits: pageLimits, |
| | | even: true, |
| | | cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | done: function(){ |
| | | done: function () { |
| | | //自定义列宽 |
| | | SetTableColW('LAY-app-content-list2','Statistical/GetInventoryList1',DetailColsSysArr); |
| | | }, |
| | | cols:colsJson2 |
| | | SetTableColW('LAY-app-content-list2', 'Statistical/GetInventoryList1', DetailColsSysArr); |
| | | }, |
| | | cols: colsJson2 |
| | | }; |
| | | var param = { |
| | | SkuNo:SkuNo, //物料号 |
| | | SkuName:SkuName, //物料名称 |
| | | OwnerNo:OwnerNo, //货主编码 |
| | | OwnerName:OwnerName, //货主名称 |
| | | LotNo:LotNo, //进厂编号 |
| | | LocatNo:LocatNo,//储位地址 |
| | | PalletNo:PalletNo, //托盘号 |
| | | Status:Status,//库存状态 |
| | | InspectStatus:InspectStatus //质检状态 |
| | | SkuNo: SkuNo, //物料号 |
| | | SkuName: SkuName, //物料名称 |
| | | OwnerNo: OwnerNo, //货主编码 |
| | | OwnerName: OwnerName, //货主名称 |
| | | LotNo: LotNo, //进厂编号 |
| | | LocatNo: LocatNo,//储位地址 |
| | | PalletNo: PalletNo, //托盘号 |
| | | Status: Status,//库存状态 |
| | | InspectStatus: InspectStatus, //质检状态 |
| | | HouseNo: HouseNo, |
| | | AreaNo: AreaNo, // 所属区域 |
| | | Type: Type, |
| | | }; |
| | | sendData(IP + "/Statistical/GetInventoryList1", param, 'get', function (res) { |
| | | if (res.code == 0) //成功 |
| | |
| | | }); |
| | | //#endregion |
| | | } |
| | | |
| | | //var url = IP + "/Statistical/GetInventoryList1"; |
| | | |
| | | //接受全局变量 |
| | | let quanSkuNo = ''; |
| | | let quanLotNo=''; |
| | | let quanLotNo = ''; |
| | | //监听搜索 |
| | | form.on('submit(LAY-app-contlist-search)', function (data) { |
| | | var SkuNo = $("#SkuNo").val(); |
| | |
| | | var OwnerName = $("#OwnerName").val(); |
| | | var Status = $("#Status").val(); |
| | | var InspectStatus = $("#InspectStatus").val(); |
| | | var HouseNo = $("#WareHouseNo").val(); // 所属仓库 |
| | | var AreaNo = $("#AreaNo").val(); // 所属区域 |
| | | var Type = $("#Type").val(); // 物料类型 |
| | | |
| | | if (yemianid == 0) { |
| | | console.log("总单"); |
| | | refreshTable(SkuNo, SkuName,OwnerNo,OwnerName,LotNo); |
| | | refreshTable(SkuNo, SkuName, OwnerNo, OwnerName, LotNo); |
| | | } else if (yemianid == 1) { |
| | | quanSkuNo = ''; |
| | | quanLotNo=''; |
| | | quanLotNo = ''; |
| | | console.log("明细"); |
| | | refreshTable2(SkuNo,SkuName,OwnerNo,OwnerName,LotNo,LocatNo,PalletNo,Status,InspectStatus); |
| | | console.log(HouseNo); |
| | | refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo, Type); |
| | | } |
| | | |
| | | }); |
| | |
| | | $('.layui-tab-content .layui-tab-item').eq(1).attr('class', 'layui-tab-item layui-show') |
| | | console.log(obj); |
| | | quanSkuNo = obj.data.SkuNo; |
| | | quanLotNo=obj.data.lotNo; |
| | | refreshTable2(obj.data.SkuNo,"","","",obj.data.LotNo); |
| | | quanLotNo = obj.data.lotNo; |
| | | refreshTable2(obj.data.SkuNo, "", "", "", obj.data.LotNo); |
| | | yemianid = 1; |
| | | }); |
| | | |
| | |
| | | var OwnerName = $("#OwnerName").val(); |
| | | var Status = $("#Status").val(); |
| | | var InspectStatus = $("#InspectStatus").val(); |
| | | var HouseNo = $("#WareHouseNo").val(); // 所属仓库 |
| | | var AreaNo = $("#AreaNo").val(); // 所属区域 |
| | | var Type = $("#Type").val(); // 物料类型 |
| | | console.log(data.index); |
| | | yemianid = data.index |
| | | if (yemianid == 0) { |
| | | console.log("总单"); |
| | | refreshTable(SkuNo, SkuName,OwnerNo,OwnerName,LotNo); |
| | | refreshTable(SkuNo, SkuName, OwnerNo, OwnerName, LotNo); |
| | | } else if (yemianid == 1) { |
| | | console.log("明细"); |
| | | refreshTable2(SkuNo,SkuName,OwnerNo,OwnerName,LotNo,LocatNo,PalletNo,Status,InspectStatus); |
| | | refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo, Type); |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | |
| | | }); |
| | | //#region 自定义表头 |
| | | //自定义表头 |
| | | //#region 自定义表头 |
| | | active = { |
| | | customCols: function(){ |
| | | customCols: function () { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '自定义列', |
| | | content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetInventoryList&ColsSysArr='+TotalColsSysArr, |
| | | content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetInventoryList&ColsSysArr=' + TotalColsSysArr, |
| | | maxmin: false, |
| | | resize: false, |
| | | area: ['970px', '650px'] |
| | | }); |
| | | }, |
| | | customCols2: function(){ |
| | | customCols2: function () { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '自定义列', |
| | | content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetInventoryList1&ColsSysArr='+DetailColsSysArr, |
| | | content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetInventoryList1&ColsSysArr=' + DetailColsSysArr, |
| | | maxmin: false, |
| | | resize: false, |
| | | area: ['970px', '650px'] |
| | |
| | | } |
| | | |
| | | }; |
| | | $('.layui-btn').on('click', function() { |
| | | $('.layui-btn').on('click', function () { |
| | | var type = $(this).data('type'); |
| | | active[type] ? active[type].call(this) : ''; |
| | | }); |
| | | //#endregion |
| | | |
| | | // 初始绑定所属仓库 |
| | | 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 |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | |
| | | getAR(""); |
| | | form.on('select(getWareHouseNo)', function (data) { |
| | | console.log(data); |
| | | getAR(data.value); |
| | | }); |
| | | function getAR(val) { |
| | | //获取 巷道下拉框 |
| | | sendData(IP + "/Sys/GetStorageRoadwayByHouseNo?wareHouseNo=" + val, {}, 'get', function (res) { |
| | | $("#RoadwayNo").empty(); |
| | | $("#RoadwayNo").append('<option value =""></option>'); |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#RoadwayNo").append('<option value =' + res.data[i].RoadwayNo + '>' + res.data[i].RoadwayNo + '-' + |
| | | res.data[i].RoadwayName + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg('获取巷道信息失败', { |
| | | icon: 2, |
| | | time: 2000 |
| | | }, function () { |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | }); |
| | | //获取 区域下拉框 |
| | | 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 |
| | | }, function () { |
| | | |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | |
| | | }); |
| | | </script> |
| | | </body> |