| | |
| | | |
| | | // 渲染表格 |
| | | var insTb = table.render({ |
| | | elem: '#waitMatin', |
| | | url: baseUrl+'/waitMatin/head/page/auth', |
| | | elem: '#order', |
| | | url: baseUrl+'/order/head/page/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'billNo', title: '单据编号', sort: true}, |
| | | {field: 'billType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {field: 'orderNo', title: '单据编号', sort: true}, |
| | | {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'appeTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate', minWidth: 130, width: 130} |
| | | ]], |
| | | request: { |
| | |
| | | }); |
| | | |
| | | // 搜索 |
| | | form.on('submit(waitMatinSearch)', function (data) { |
| | | form.on('submit(tbSearch)', function (data) { |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 添加 |
| | | $("#waitMatinAddBtn").click(function () { |
| | | $("#orderAddBtn").click(function () { |
| | | showEditModel(); |
| | | }); |
| | | |
| | | // 工具条点击事件 |
| | | table.on('tool(waitMatin)', function (obj) { |
| | | table.on('tool(order)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'edit') { |
| | |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '800px', |
| | | area: '700px', |
| | | offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | |
| | | table.render({ |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/waitMatin/list/auth', |
| | | url: baseUrl+'/orderDetl/list/auth', |
| | | where: { |
| | | bill_no: data.billNo |
| | | order_id: data.id |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matNo', title: '物料编码'}, |
| | | {field: 'matName', title: '物料名称', width: 160}, |
| | | {field: 'qty', title: '数量'}, |
| | | { |
| | | field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | | return util.toDateString(d.createTime); |
| | | }, width: 180 |
| | | }, |
| | | {field: 'inQty', title: '已入库量'}, |
| | | {field: 'color', title: '颜色'}, |
| | | {field: 'matnr', title: '商品编码'}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'batch', title: '批号'}, |
| | | {field: 'count', title: '数量'}, |
| | | // { |
| | | // field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | | // return util.toDateString(d.createTime); |
| | | // }, width: 180 |
| | | // }, |
| | | // {field: 'inQty', title: '已入库量'}, |
| | | // {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格'} |
| | | ]], |
| | | request: { |