| | |
| | | |
| | | /* 表格2头工具栏点击事件 */ |
| | | table.on('toolbar(orderDetlTable)', function (obj) { |
| | | |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | if (obj.event === 'pakoutPreview') { // 添加 |
| | | if (checkStatus.length === 0) { |
| | |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | pakoutPreviewDialog(res.data) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function pakoutPreviewDialog(data) { |
| | | var tableCache; |
| | | layer.open({ |
| | | type: 1 |
| | |
| | | ,success: function(layero, index){ |
| | | stoPreTabIdx = table.render({ |
| | | elem: '#stoPreTab', |
| | | data: res.data, |
| | | data: data, |
| | | height: 520, |
| | | page: false, |
| | | limit: Number.MAX_VALUE, |
| | |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function pakout(tableCache, layerIndex) { |
| | |
| | | |
| | | window.pakoutPreview = pakoutPreview; |
| | | |
| | | // ---------------------------------------------------------------------------------------------------------------------------------- |
| | | |
| | | // 合并出库 |
| | | form.on('submit(mergeOut)', function (data) { |
| | | let checkStatus = layui.table.checkStatus('originTable').data; |
| | |
| | | , moveType: 1 //拖拽模式,0或者1 |
| | | , content: $('#mergeDialog').html() |
| | | , success: function (layero, index) { |
| | | console.log(res.data); |
| | | orderMergeTabIdx = table.render({ |
| | | elem: '#orderMergeTab', |
| | | data: res.data, |
| | |
| | | } |
| | | , yes: function (index, layero) { |
| | | //按钮【确定】的回调 |
| | | let checkStatus = layui.table.checkStatus('orderMergeTab').data; |
| | | if (checkStatus.length < 1) { |
| | | layer.msg("请至少选择一条数据", {icon: 7}); |
| | | return false; |
| | | } |
| | | console.log(checkStatus); |
| | | console.log(checkStatus.map(function (d) { |
| | | return d.matnr; |
| | | })); |
| | | |
| | | // pakoutPreviewDialog(data) |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //按钮【取消】的回调 |