| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | return R.ok().add(locDtos); |
| | | } |
| | | |
| | | @PostMapping("/out/pakout/auth") |
| | | public R pakout(@RequestBody List<LocDto> locDtos) { |
| | | if (Cools.isEmpty(locDtos)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | System.out.println(JSON.toJSONString(locDtos)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.core.common.Cools; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | private boolean lack = false; |
| | | |
| | | private List<Integer> staNos; |
| | | |
| | | private Integer staNo; |
| | | |
| | | public LocDto() { |
| | | } |
| | |
| | | return this.matnr + "(" + this.maktx + ")"; |
| | | } |
| | | |
| | | public void setStaNos(List<Integer> staNos) { |
| | | this.staNos = staNos; |
| | | if (!Cools.isEmpty(staNos)) { |
| | | this.staNo = staNos.get(0); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | IO_WORK("ioWork", "layui-icon-flag"), |
| | | WORK_FLOW("workFlow", "layui-icon-form"), |
| | | BASE("base", "layui-icon-file"), |
| | | ORDER("erp", "layui-icon-senior") |
| | | ; |
| | | |
| | | |
| | |
| | | }); |
| | | |
| | | function pakoutPreview(ids) { |
| | | var loadIndex = layer.load(2); |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout/preview/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | var tableCache; |
| | | if (res.code === 200){ |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: false |
| | | ,closeBtn: false |
| | | ,offset: '100px' |
| | | // ,area: ['1000px', '700px'] |
| | | ,area: '1200px' |
| | | ,shade: 0.5 |
| | | ,shadeClose: true |
| | | ,btn: ['立即生成', '稍后处理'] |
| | | ,btn: ['立即出库', '稍后处理'] |
| | | ,btnAlign: 'c' |
| | | ,moveType: 1 //拖拽模式,0或者1 |
| | | ,content: $('#pakoutPreviewBox').html() |
| | | ,success: function(layero, index){ |
| | | console.log(res.data) |
| | | table.render({ |
| | | elem: '#stoPreTab', |
| | | data: res.data, |
| | |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', align: 'center', width: 350}, |
| | | {field: 'batch', title: '批号', merge: ['title'], align: 'center'}, |
| | | // {field: 'anfme', title: '总数量', merge: ['title'], align: 'center', style: 'font-weight: bold', width: 90}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNo', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | // {field: 'remQty', title: '余量', align: 'center', width: 80}, |
| | | // {field: 'total', title: '总量', align: 'center', width: 90}, |
| | | ]], |
| | | done: function (res) { |
| | | tableMerge.render(this); |
| | | $('.layui-table-body.layui-table-main').css("overflow", "auto"); |
| | | |
| | | tableCache = tableData = table.cache.stoPreTab; |
| | | } |
| | | }); |
| | | |
| | | form.on('select(tbBasicTbStaNos)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableCache[index]; |
| | | data['staNo'] = Number(obj.elem.value); |
| | | return false; |
| | | }); |
| | | } |
| | | ,yes: function(index, layero){ |
| | | //按钮【马上拣货】的回调 |
| | | stockOut(data.orderNo); |
| | | //按钮【立即出库】的回调 |
| | | pakout(tableCache); |
| | | } |
| | | ,btn2: function(index, layero){ |
| | | //按钮【稍后处理】的回调 |
| | | layer.close(index) |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }); |
| | | form.on('select(tbBasicTbStaNos)', function (data) { |
| | | alert("ajax请求:" + JSON.stringify(data)) |
| | | return false; |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | |
| | | }) |
| | | } |
| | | |
| | | function pakout(tableCache) { |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify(tableCache), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}) |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | /* 显示表单弹窗 */ |
| | | function showEditModel(mData) { |