| | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickoutDetl#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl/pickoutDetl.html', N'pickoutDetl管理', null, '2', null, '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'order/orderResult.html', N'播种资料', 30450, '2', '8', '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#view', N'查询', '30570', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#btn-add', N'新增', '30570', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#btn-edit', N'编辑', '30570', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#btn-delete', N'删除', '30570', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#btn-export', N'导出', '30570', '3', '4', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'orderResult#view', N'查询', '30589', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'orderResult#btn-add', N'新增', '30589', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'orderResult#btn-edit', N'编辑', '30589', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'orderResult#btn-delete', N'删除', '30589', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'orderResult#btn-export', N'导出', '30589', '3', '4', '1'); |
| | |
| | | return R.ok("已生成波次"); |
| | | } |
| | | |
| | | /** |
| | | * 通过批号订单中包含的出库单 |
| | | */ |
| | | |
| | | @RequestMapping("/order/orderByWave/auth") |
| | | @ManagerAuth |
| | | public R getOrderDetailByWave(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param, |
| | | String research){ |
| | | EntityWrapper<Wave> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | hostEq(wrapper); |
| | | wrapper.orderBy("create_time",false); |
| | | List<Wave> waves = waveService.selectList(wrapper); |
| | | if (Cools.isEmpty(waves)) { |
| | | throw new CoolException("找不到该波次"); |
| | | } |
| | | HashSet<String> allOrders = new HashSet<>(); |
| | | for (Wave wave : waves) { |
| | | List<WaveDetl> waveDetls = waveDetlService.selectList(new EntityWrapper<WaveDetl>() |
| | | .eq("wave_id", wave.getId())); |
| | | for (WaveDetl waveDetl : waveDetls) { |
| | | String[] split = waveDetl.getOrderNos().split(","); |
| | | for (String s : split) { |
| | | allOrders.add(s); |
| | | } |
| | | } |
| | | } |
| | | ArrayList<String> allOrdersList = new ArrayList<>(allOrders); |
| | | EntityWrapper<OrderDetl> orderDetailWrapper = new EntityWrapper<>(); |
| | | for (int i = 0; i < allOrdersList.size(); i++) { |
| | | String s = allOrdersList.get(i); |
| | | if (i == 0){ |
| | | orderDetailWrapper |
| | | .eq("order_no",s); |
| | | }else { |
| | | orderDetailWrapper |
| | | .or() |
| | | .eq("order_no",s); |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(research)) { |
| | | orderDetailWrapper.eq("order_no",research); |
| | | } |
| | | Page<OrderDetl> orderDetlPage = orderDetlService.selectPage(new Page<>(curr, limit),orderDetailWrapper); |
| | | return R.ok(orderDetlPage); |
| | | } |
| | | } |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'util', 'admin', 'tableMerge'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | var tableMerge = layui.tableMerge; |
| | | var util = layui.util; |
| | | |
| | | /****************************************** 左边表 *************************************************/ |
| | | |
| | | /* 渲染表格 */ |
| | | var insTb = table.render({ |
| | | elem: '#docTypeTable', |
| | | url: baseUrl + '/wave/list/auth', |
| | | height: 'full-100', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | where:{ |
| | | status:1 |
| | | }, |
| | | defaultToolbar: [], |
| | | cols: [[ |
| | | {field: 'waveNo', title: '波次号'}, |
| | | {field: 'status$', title: '工作状态', width:100} |
| | | |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); |
| | | } |
| | | }); |
| | | |
| | | |
| | | /* 表格搜索 */ |
| | | form.on('submit(docTypeTableSearch)', function (data) { |
| | | insTb.reload({ |
| | | where: { |
| | | wave_no: data.field.wave_no, |
| | | status:1} |
| | | }); |
| | | return false; |
| | | }); |
| | | |
| | | /* 表格头工具栏点击事件 */ |
| | | table.on('toolbar(docTypeTable)', function (obj) { |
| | | if (obj.event === 'add') { // 添加 |
| | | showEditModel(); |
| | | } else if (obj.event === 'edit') { // 修改 |
| | | if (selObj == null) { |
| | | return; |
| | | } |
| | | showEditModel(selObj.data); |
| | | } else if (obj.event === 'del') { // 删除 |
| | | if (selObj == null) { |
| | | return; |
| | | } |
| | | doDel(selObj); |
| | | } |
| | | }); |
| | | |
| | | /* 监听行单击事件 */ |
| | | var selObj; |
| | | table.on('row(docTypeTable)', function (obj) { |
| | | console.log(obj); |
| | | selObj = obj; |
| | | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); |
| | | insTb2.reload({where: {wave_no: obj.data.waveNo}, page: {curr: 1}}); |
| | | }); |
| | | |
| | | /* 显示表单弹窗 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | title: (mData ? '修改' : '添加') + '单据类型', |
| | | content: $('#docTypeEditDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | // 回显表单数据 |
| | | form.val('docTypeEditForm', mData); |
| | | if(mData){ |
| | | // $('#docId').addClass("layui-input").attr("disabled",true); |
| | | $('input[name="docId"]').addClass("layui-input").attr("disabled",true); |
| | | } |
| | | // 表单提交事件 |
| | | form.on('submit(docTypeEditSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/docType/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | selObj = null; |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | insTb.reload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function doDel(obj) { |
| | | layer.confirm('确定要删除此单据类型吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/docType/delete/one/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(obj.data)}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | selObj = null; |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | insTb.reload(); |
| | | $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | |
| | | /****************************************** 右边表 *************************************************/ |
| | | |
| | | /* 渲染表格2 */ |
| | | var insTb2 = table.render({ |
| | | elem: '#orderTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/order/orderByWave/auth', |
| | | page: true, |
| | | // size: 'lg', |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | height: 'full-100', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号'} |
| | | ,{field: 'matnr', align: 'center',title: '物料ID'} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称'} |
| | | ,{field: 'anfme', align: 'center',title: '应出库量', minWidth: 100} |
| | | ,{field: 'outQty', align: 'center',title: '已出库量', minWidth: 100} |
| | | |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | /* 表格2搜索 */ |
| | | form.on('submit(orderTbSearch)', function (data) { |
| | | console.log(data); |
| | | insTb2.reload({ |
| | | where: { |
| | | research: data.field.order_no |
| | | }, |
| | | page: {curr: 1} |
| | | }); |
| | | return false; |
| | | }); |
| | | /* 表格2重置 */ |
| | | form.on('submit(orderTbReset)', function (data) { |
| | | $("#orderNo").val(""); |
| | | insTb2.reload({where: null,page: {curr: 1}}); |
| | | return false; |
| | | }); |
| | | |
| | | /* 表格2头工具栏点击事件 */ |
| | | table.on('toolbar(orderTable)', function (obj) { |
| | | if (obj.event === 'add') { // 添加 |
| | | right(); |
| | | } else if (obj.event === 'del') { // 删除 |
| | | var checkRows = table.checkStatus('orderTable'); |
| | | if (checkRows.data.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | var ids = checkRows.data.map(function (d) { |
| | | return d.id; |
| | | }); |
| | | doDelOrder({ids: ids}); |
| | | }else if (obj.event === 'wave'){ |
| | | var checkRows = table.checkStatus('orderTable'); |
| | | if (checkRows.data.length === 0) { |
| | | layer.msg('请选择要生成波次的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | doWaveOrder(checkRows); |
| | | } |
| | | }); |
| | | |
| | | /* 表格2工具条点击事件 */ |
| | | table.on('tool(orderTable)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 拣货 |
| | | case 'stockOut': |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/work/stock/out/preview", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify({ |
| | | orderNo: data.orderNo |
| | | }), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: false |
| | | ,closeBtn: false |
| | | ,offset: '100px' |
| | | ,area: '1000px' |
| | | ,shade: 0.5 |
| | | ,shadeClose: true |
| | | ,btn: ['立即生成', '稍后处理'] |
| | | ,btnAlign: 'c' |
| | | ,moveType: 1 //拖拽模式,0或者1 |
| | | ,content: $('#stoukOutPreview') |
| | | ,success: function(layero, index){ |
| | | table.render({ |
| | | elem: '#stoPreTab', |
| | | data: res.data, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | height: 432, |
| | | cols: [[ |
| | | {field: 'title', title: '商品', merge: true, align: 'center'}, |
| | | {field: 'anfme', title: '总数量', merge: ['title'], align: 'center', style: 'font-weight: bold', width: 90}, |
| | | {field: 'type', title: '仓库', merge: true, align: 'center', templet: '#typeTpl', width: 90}, |
| | | {field: 'locNo', title: '货位', align: 'center'}, |
| | | {field: 'prior$', title: '推荐货位', align: 'center', width: 100}, |
| | | {field: 'reduce', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | // {field: 'remQty', title: '余量', align: 'center', width: 80}, |
| | | {field: 'total', title: '总量', align: 'center', width: 90}, |
| | | ]], |
| | | done: function () { |
| | | tableMerge.render(this); |
| | | $('.layui-table-body.layui-table-main').css("overflow", "auto") |
| | | } |
| | | }); |
| | | |
| | | } |
| | | ,yes: function(index, layero){ |
| | | //按钮【马上拣货】的回调 |
| | | stockOut(data.orderNo); |
| | | } |
| | | ,btn2: function(index, layero){ |
| | | //按钮【稍后处理】的回调 |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | break; |
| | | // 打印 |
| | | case 'print': |
| | | layer.confirm('开始打印' +data.orderNo + ' 拣货单?', {shadeClose: true}, function(){ |
| | | layer.closeAll(); |
| | | printPakouts(data.orderNo); |
| | | }) |
| | | break; |
| | | // 删除 |
| | | case 'del': |
| | | var ids = [obj.id]; |
| | | doDelOrder({ids: ids}); |
| | | break; |
| | | // 明细 |
| | | case 'look': |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | | var offset = $a.offset(); |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '700px', |
| | | offset: [offset.top + 'px', (offset.left - 530 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | | fixed: false, |
| | | content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>', |
| | | success: function (layero) { |
| | | table.render({ |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/orderDetl/list/auth', |
| | | where: { |
| | | order_id: data.id |
| | | }, |
| | | limit: 5, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码'}, |
| | | {field: 'maktx', title: '商品名称', width: 200}, |
| | | {field: 'anfme', title: '数量', width: 70}, |
| | | { |
| | | field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | | return util.toDateString(d.createTime); |
| | | }, width: 180 |
| | | } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function () { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |
| | | }); |
| | | } |
| | | }); |
| | | break; |
| | | |
| | | } |
| | | }); |
| | | |
| | | /* 删除订单 */ |
| | | function doDelOrder(obj) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/orders/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: obj.ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }); |
| | | } |
| | | /* 生成波次 */ |
| | | function doWaveOrder(obj) { |
| | | console.log(obj.data); |
| | | layer.confirm('确定要生成波次?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/orders/wave/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(obj.data), |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }); |
| | | } |
| | | |
| | | // 生成拣货单 |
| | | function stockOut(orderNo) { |
| | | $.ajax({ |
| | | url: baseUrl+"/work/stock/out/create", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType:'application/json;charset=UTF-8', |
| | | data: JSON.stringify({ |
| | | orderNo: orderNo |
| | | }), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | // 成功 |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.confirm(res.msg, { |
| | | shadeClose: true |
| | | , btn: ['打印拣货单'] |
| | | }, function() { |
| | | layer.closeAll(); |
| | | printPakouts(orderNo); |
| | | } |
| | | ) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | // }); |
| | | } |
| | | |
| | | // 打印拣货单 |
| | | function printPakouts(orderNo) { |
| | | $.ajax({ |
| | | url: baseUrl+"/work/stock/out/print", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | orderNo: orderNo |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | res.data["barcodeUrl"]=baseUrl+"/order/code/auth?type=1¶m="+res.data.docNum; |
| | | var tpl = $('#pakoutPrintTpl').html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | var box = $("#pakoutPrintBox"); |
| | | box.html(html);box.show(); |
| | | box.print({ |
| | | mediaPrint:true, |
| | | deferred: $.Deferred().done(function () { |
| | | layer.confirm('[重要] 打印是否成功?', {btn: ['Yes', 'No']}, function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/pakout/print/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | docNumber: orderNo |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | $(".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}) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | }) |
| | | }); |
| | | box.hide(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }); |
| | | |
| | | function right(){ |
| | | top.popupRight = top.layui.admin.popupRight({ |
| | | id: 'LAY_adminPopupLayerTest' |
| | | , area: '890px' |
| | | , type: 2 |
| | | , shade: [0.5,'#000'] |
| | | , content:'order/matQuery.html' |
| | | , success: function(){ |
| | | // $('#'+ this.id).html('<div style="padding: 20px;">放入内容</div>'); |
| | | //admin.view(this.id).render('system/xxx') |
| | | } |
| | | , end: function () { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | } |
| | | }); |
| | | } |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <style> |
| | | body { |
| | | color: #595959; |
| | | background-color: #f5f7f9; |
| | | } |
| | | |
| | | /* 左表 */ |
| | | #docTypeTable + .layui-table-view .layui-table-tool-temp { |
| | | padding-right: 0; |
| | | } |
| | | |
| | | #docTypeTable + .layui-table-view .layui-table-body tbody > tr td { |
| | | cursor: pointer; |
| | | } |
| | | |
| | | #docTypeTable + .layui-table-view .layui-table-body tbody > tr.layui-table-click { |
| | | background-color: #fff3e0; |
| | | } |
| | | |
| | | #docTypeTable + .layui-table-view .layui-table-body tbody > tr.layui-table-click td:last-child > div:before { |
| | | position: absolute; |
| | | right: 6px; |
| | | content: "\e602"; |
| | | font-size: 12px; |
| | | font-style: normal; |
| | | font-family: layui-icon,serif !important; |
| | | -webkit-font-smoothing: antialiased; |
| | | -moz-osx-font-smoothing: grayscale; |
| | | } |
| | | |
| | | #left-table .layui-table-grid-down { |
| | | display: none; |
| | | } |
| | | |
| | | |
| | | .layui-form.layui-border-box.layui-table-view { |
| | | border-width: 1px; |
| | | } |
| | | #left-table .layui-table thead th { |
| | | /* font-weight: bold; */ |
| | | text-align: left; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <!-- 正文开始 --> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md3" id="left-table"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 表格工具栏1 --> |
| | | <form class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline" style="max-width: 140px;"> |
| | | <input name="wave_no" class="layui-input" placeholder="输入波次号"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn" lay-filter="docTypeTableSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <!-- 数据表格1 --> |
| | | <table id="docTypeTable" lay-filter="docTypeTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md9"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 表格工具栏2 --> |
| | | <form class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">订单编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="order_no" class="layui-input" id="orderNo" placeholder="输入订单编号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="orderTbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="orderTbReset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <!-- 数据表格2 --> |
| | | <table id="orderTable" lay-filter="orderTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="docTypeTpl"> |
| | | <span name="docType" class="layui-badge layui-badge-gray">{{d.docType$}}</span> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | {{#if (d.settle == 1){ }} |
| | | <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="stockOut" style="font-size: 16px">拣货单</a> |
| | | {{# } }} |
| | | {{#if (d.settle == 2 || d.settle == 4){ }} |
| | | <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="print" style="font-size: 16px">打印</a> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="settleTpl"> |
| | | <span name="settle" |
| | | {{# if( d.settle === 1){ }} |
| | | class="layui-badge layui-badge-blue" |
| | | {{# } else if(d.settle === 2){ }} |
| | | class="layui-badge layui-badge-red" |
| | | {{# } else if(d.settle === 3){ }} |
| | | class="layui-badge layui-badge-gray" |
| | | {{# } else if(d.settle === 4){ }} |
| | | class="layui-badge layui-badge-green" |
| | | {{# } else if(d.settle === 11){ }} |
| | | class="layui-badge layui-badge-green" |
| | | {{# } else if(d.settle === 12){ }} |
| | | class="layui-badge layui-badge-blue" |
| | | {{# } else { }} |
| | | class="layui-badge layui-badge-gray" |
| | | {{# } }} |
| | | >{{d.settle$}}</span> |
| | | </script> |
| | | |
| | | <script type="text/html" id="typeTpl"> |
| | | <span name="type" |
| | | {{# if( d.type === 1){ }} |
| | | class="layui-badge layui-badge-blue" ><span style="display: none">{{d.number}}</span>平仓</span> |
| | | {{# } else if(d.type === 2){ }} |
| | | class="layui-badge layui-badge-green" ><span style="display: none">{{d.number}}</span>立库</span> |
| | | {{# } else if(d.type === 0){ }} |
| | | class="layui-badge layui-badge-red" ><span style="display: none">{{d.number}}</span>缺货</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="tbLook"> |
| | | <span class="layui-text"> |
| | | <a href="javascript:;" lay-event="look"> |
| | | <i class="layui-icon" style="font-size: 12px;"></i> 查看明细 |
| | | </a> |
| | | </span> |
| | | </script> |
| | | |
| | | <!-- 打印容器 --> |
| | | <div id="pakoutPrintBox" style="display: none"></div> |
| | | <!-- 出库预览容器 --> |
| | | <div id="stoukOutPreview" style="display: none"> |
| | | <div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;"> |
| | | <span style="font-size: large; font-weight: bold">拣货单预览</span> |
| | | </div> |
| | | <table id="stoPreTab" lay-filter="stoPreTab"></table> |
| | | </div> |
| | | |
| | | <!-- 单据类型表单 --> |
| | | <script type="text/html" id="docTypeEditDialog"> |
| | | <form id="docTypeEditForm" lay-filter="docTypeEditForm" class="layui-form model-form"> |
| | | <input name="dictId" type="hidden"/> |
| | | <input name="docClass" value="2" type="hidden"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">类型编码:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="docId" placeholder="请输入类型编码" class="layui-input" |
| | | lay-verType="tips" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">类型名称:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="docName" placeholder="请输入类型名称" class="layui-input" |
| | | lay-verType="tips" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注:</label> |
| | | <div class="layui-input-block"> |
| | | <textarea name="memo" placeholder="请输入备注" class="layui-textarea"></textarea> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="docTypeEditSubmit" lay-submit>保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | |
| | | <!-- 订单表头操作 --> |
| | | <script type="text/html" id="orderToolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm layui-btn-normal" id="btn-add" lay-event="add"><i class="layui-icon"></i>新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="del"><i class="layui-icon"></i>删除</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn" id="btn-wave" lay-event="wave"><i class="layui-icon"></i>生成波次计划</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/jquery/jQuery.print.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/order/orderResult.js" charset="utf-8"></script> |
| | | |
| | | </body> |
| | | <script type="text/template" id="pakoutPrintTpl"> |
| | | <!-- 头 --> |
| | | <div id="print-header" style="margin: 20px 0"> |
| | | <div style="text-align: center"> |
| | | <div style="text-align: center;margin-bottom: 10px"> |
| | | <span style="font-family: 宋体"> 拣货单 </span> |
| | | </div> |
| | | |
| | | <img class="template-code template-qrcode" src="{{data.barcodeUrl}}" style="width: 80%"> |
| | | <p style="letter-spacing: 2px;margin-top: 5px">{{data.docNum}}</p> |
| | | </div> |
| | | <div style="font-size: xx-small; text-align: left; margin-top: 10px"> |
| | | <span style="font-family: 宋体">客户:{{data.cstmrName}}</span> |
| | | </div> |
| | | <div style="margin-top: 10px"> |
| | | <div style="float: left;width: 50%; text-align: left"> |
| | | <span style="font-size: xx-small;font-family: 宋体">拣货数量:{{data.total}}</span> |
| | | </div> |
| | | <div style="float: left; width: 50%; text-align: right"> |
| | | <span style="font-size: xx-small;font-family: 宋体">拣货人:{{data.workerName}}</span> |
| | | </div> |
| | | <div style="clear:both;"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 主体 --> |
| | | <div style="margin-top: 10px"> |
| | | {{#each data.list}} |
| | | <div class="pakout-item" style="padding: 10px 5px 10px 5px;border-top: 1px solid #525252"> |
| | | <div class="item-header" style="margin-top: 10px;font-family: 宋体; font-size: x-small"> |
| | | {{maktx}} |
| | | </div> |
| | | <div class="item-content" style="margin: 10px 0 "> |
| | | <div style="float: left;font-family: 宋体; font-size: xx-small">{{anfme}}{{unit}}</div> |
| | | <div style="float: right;font-family: 宋体; font-size: xx-small">货位:{{locNo}}</div> |
| | | <div style="clear: both;"></div> |
| | | </div> |
| | | </div> |
| | | {{/each}} |
| | | </div> |
| | | </script> |
| | | </html> |
| | | |