| | |
| | | var pageCurr; |
| | | var tableData; |
| | | var admin; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo', align: 'center',title: '库位号'}, |
| | | {field: 'matnr', align: 'center',title: '物料号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '物料号', sort:true} |
| | | {field: 'matnr', align: 'center',title: '存货编码', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '存货名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '序列码', width: 300, sort:true} |
| | | ,{field: 'batch', align: 'center',title: '序列码', width: 300} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | ,{field: 'suppCode', align: 'center',title: '料箱码'} |
| | | ,{field: 'threeCode', align: 'center',title: '销售订单号'} |
| | | ,{field: 'deadTime', align: 'center',title: '销售订单行号'} |
| | | ,{field: 'specs', align: 'center',title: '规格型号', hide: false} |
| | | ,{field: 'model', align: 'center',title: '通用型号', hide: false} |
| | | |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'units', align: 'center',title: '包数', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '物料状态', hide: true} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '单据时间', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '存货分类编码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '存货分类名称', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '计量单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '进项税', hide: true} |
| | | ,{field: 'units', align: 'center',title: '销项税', hide: true} |
| | | ,{field: 'dsDate', align: 'center',title: '启用日期', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '建档人', hide: true} |
| | | ,{field: 'dInvCreateDatetime', align: 'center',title: '建档日期', hide: true} |
| | | |
| | | // ,{field: 'specs', align: 'center',title: '规格'} |
| | | // ,{field: 'model', align: 'center',title: '通用型号', hide: true} |
| | | // ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | // ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | // ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | // ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | // ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | // ,{field: 'units', align: 'center',title: '包数', hide: true} |
| | | // ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | // ,{field: 'origin', align: 'center',title: '物料状态', hide: true} |
| | | // ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | // ,{field: 'manuDate', align: 'center',title: '单据时间', hide: true} |
| | | // ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | // ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | // ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | // ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | // ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | // ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | // ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | // ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | // ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | // ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | // ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | // ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | // ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | // ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | |
| | | ]; |
| | | |
| | |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate','admin','form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | |
| | | }); |
| | | }); |
| | | |
| | | // 导入销售单 |
| | | $("#compareToEss").click(function () { |
| | | $("#importExcel").trigger("click"); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | | function upload(obj){ |
| | | if(!obj.files) { |
| | | return; |
| | | } |
| | | var file = obj.files[0]; |
| | | admin.confirm('确认导入 [' + file.name +'] 文件吗?', function (index) { |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | var url = baseUrl + "/agv/locDetl/compare/auth"; |
| | | var form = new FormData(); |
| | | form.append("file", file); |
| | | let xhr = new XMLHttpRequest(); |
| | | xhr.open("post", url, true); |
| | | xhr.setRequestHeader('token', localStorage.getItem('token')); |
| | | xhr.onload = uploadComplete; |
| | | xhr.onerror = uploadFailed; |
| | | xhr.onloadend = function () { |
| | | layer.closeAll('loading'); |
| | | }; |
| | | // xhr.upload.onprogress = progressFunction; |
| | | xhr.upload.onloadstart = function(){ |
| | | ot = new Date().getTime(); |
| | | oloaded = 0; |
| | | }; |
| | | xhr.send(form); |
| | | }, function(index){ |
| | | }); |
| | | } |
| | | function uploadComplete(evt) { |
| | | let res = JSON.parse(evt.target.responseText); |
| | | if(res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | insTb.reload({page: {curr: 1}}); |
| | | } else { |
| | | alert(res.msg); |
| | | // layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | function uploadFailed(evt) { |
| | | let res = JSON.parse(evt.target.responseText); |
| | | alert(res.msg); |
| | | // layer.msg(res.msg, {icon: 2}); |
| | | } |