| | |
| | | var layDate = layui.laydate; |
| | | var laytpl = layui.laytpl; |
| | | |
| | | // // 渲染搜索模板 |
| | | // $.ajax({ |
| | | // url: baseUrl+"/docType/page/auth", |
| | | // headers: {'token': localStorage.getItem('token')}, |
| | | // data: { |
| | | // limit: 9999 |
| | | // }, |
| | | // method: 'POST', |
| | | // success: function (res) { |
| | | // if (res.code === 200){ |
| | | // let template = Handlebars.compile($('#docTypeTpl').html()); |
| | | // $('#docType-query').html(template(res.data)); |
| | | // layui.form.render('select'); |
| | | // } else if (res.code === 403){ |
| | | // top.location.href = baseUrl+"/"; |
| | | // } else { |
| | | // layer.msg(res.msg, {icon: 2}) |
| | | // } |
| | | // } |
| | | // }) |
| | | // 渲染搜索模板 |
| | | $.ajax({ |
| | | url: baseUrl+"/docType/page/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | limit: 9999 |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | let template = Handlebars.compile($('#docTypeTpl').html()); |
| | | $('#docType-query').html(template(res.data)); |
| | | layui.form.render('select'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | let docName = getQueryVariable('docName') |
| | | let where = {}; |
| | |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl',sort:true}, |
| | | {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | |
| | | showWrkTrace(data.id); |
| | | } else if (layEvent === 'del') { |
| | | doDel(data.id); |
| | | } else if (layEvent === 'dy') { |
| | | doDy(data.id); |
| | | } else if (layEvent === 'complete') { |
| | | doModify(data.id, 4); |
| | | } else if (layEvent === 'cancel') { |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'matnr', title: '品号', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'batch', title: '序列码'}, |
| | | {field: 'anfme', title: '数量'}, |
| | |
| | | // }, |
| | | // {field: 'inQty', title: '已入库量'}, |
| | | // {field: 'color', title: '颜色'}, |
| | | {field: 'origin', title: '仓库号'} |
| | | {field: 'threeCode', title: '仓库号'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 200}, |
| | | {field: 'matnr', title: '品号', width: 160}, |
| | | {field: 'maktx', title: '名称', width: 200}, |
| | | {field: 'batch', title: '序列码', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | |
| | | }); |
| | | } |
| | | |
| | | // 打印 |
| | | function doDy(orderId) { |
| | | layer.confirm('确定要打印吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/dy", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: orderId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | if (insTbCount === 0) { |
| | | insTb.reload({page: {curr: 1}}); |
| | | } else { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | layer.msg(res.msg, {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 修改订单状态 |
| | | function doModify(orderId, settle) { |