| | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.param.FullStoreParam; |
| | | import com.zy.asrs.service.MatStoreService; |
| | | import com.zy.asrs.service.WorkService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.ints.service.WaitMatinService; |
| | |
| | | private WaitMatinService waitMatinService; |
| | | @Autowired |
| | | private WorkService workService; |
| | | @Autowired |
| | | private MatStoreService matStoreService; |
| | | |
| | | @RequestMapping("/mat/store/start") |
| | | @ManagerAuth(memo = "全板入库(通知档)") |
| | | public R matStoreStart(@RequestBody FullStoreParam fullStoreParam) { |
| | | return R.ok("入库启动成功").add(workService.startupFullPutStore(fullStoreParam,getUserId())); |
| | | // return R.ok("入库启动成功").add(workService.startupFullPutStore(fullStoreParam,getUserId())); |
| | | return R.ok("入库启动成功").add(matStoreService.startupFullStore(fullStoreParam,getUserId())); |
| | | } |
| | | } |
| | |
| | | */ |
| | | public class MatCodeCountDto { |
| | | |
| | | private String billNo; |
| | | |
| | | private String seqNo; |
| | | |
| | | private String matNo; |
| | | |
| | | private Double count; |
| | |
| | | this.count = count; |
| | | } |
| | | |
| | | public MatCodeCountDto(String billNo, String seqNo, String matNo, Double count) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | this.billNo = billNo; |
| | | this.seqNo = seqNo; |
| | | } |
| | | |
| | | public String getBillNo() { return billNo; } |
| | | |
| | | public void setBillNo(String billNo) { this.billNo = billNo; } |
| | | |
| | | public String getSeqNo() { return seqNo; } |
| | | |
| | | public void setSeqNo(String seqNo) { this.seqNo = seqNo; } |
| | | |
| | | public String getMatNo() { |
| | | return matNo; |
| | | } |
| | |
| | | |
| | | public static class MatCodeStore { |
| | | |
| | | //单据编号 |
| | | private String billNo; |
| | | |
| | | //序号 |
| | | private String seqNo; |
| | | |
| | | // 产品编号 |
| | | private String matNo; |
| | | |
| | | // 产品数量 |
| | | private Double count; |
| | | |
| | | public String getBillNo() { return billNo; } |
| | | |
| | | public void setBillNo(String billNo) { this.billNo = billNo; } |
| | | |
| | | public String getSeqNo() { return seqNo; } |
| | | |
| | | public void setSeqNo(String seqNo) { this.seqNo = seqNo; } |
| | | |
| | | public String getMatNo() { |
| | | return matNo; |
| | | } |
| | |
| | | import com.zy.asrs.utils.VersionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.Date; |
| | |
| | | * Created by vincent on 2020/7/4 |
| | | */ |
| | | @Service |
| | | @Transactional |
| | | public class WorkMastHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, int times) { |
| | | if (sourceStaNo == 3) { |
| | | whsType = 1; |
| | | } else if (sourceStaNo == 7) { |
| | | whsType = 2; |
| | | } else if (sourceStaNo == 19) { |
| | | whsType = 3; |
| | | } else { |
| | | throw new CoolException("无效入库站"); |
| | | } |
| | | // if (sourceStaNo == 3) { |
| | | // whsType = 1; |
| | | // } else if (sourceStaNo == 7) { |
| | | // whsType = 2; |
| | | // } else if (sourceStaNo == 19) { |
| | | // whsType = 3; |
| | | // } else { |
| | | // throw new CoolException("无效入库站"); |
| | | // } |
| | | StartupDto startupDto = new StartupDto(); |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | | if (Cools.isEmpty(rowLastno)) { |
| | |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'unit', align: 'center',title: '单位'} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80} |
| | | ,{field: 'size', align: 'center',title: '尺寸'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | // ,{field: 'bname', align: 'center',title: '库位名称'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ] |
| | | |
| | |
| | | var cols = [ |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | ,{field: 'billNo', title:'单据编号', align: 'center'} |
| | | ,{field: 'seqNo', title:'序号', align: 'center'} |
| | | ,{field: 'seqNo', title:'序号', align: 'center', width:80} |
| | | ,{field: 'qty', title:'通知入库量', align: 'center'} |
| | | ,{field: 'inQty', title:'已入库量', align: 'center'} |
| | | ]; |
| | |
| | | |
| | | // 页面修改 |
| | | table.on('edit(chooseData)', function (obj) { |
| | | updateMatCodeData(obj.data.matNo, Number(obj.value)); |
| | | updateMatCodeData(obj.data.billNo,obj.data.seqNo,obj.data.matNo, Number(obj.value),Number(obj.data.qty),Number(obj.data.inQty)); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | |
| | | layer.msg("数量不能为零"); |
| | | return; |
| | | } |
| | | if (matCodeData[i].count > (matCodeData[i].qty - matCodeData[i].inQty)){ |
| | | layer.msg("入库数量不能超过可入库量"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(matCodeData) |
| | | $.ajax({ |
| | | url: baseUrl+"/full/store/put/start", |
| | | url: baseUrl+"/mat/store/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | devpNo: Number($('#putSiteSelect').val()), |
| | |
| | | } |
| | | } |
| | | |
| | | function updateMatCodeData(matNo, count) { |
| | | function updateMatCodeData(billNo, seqNo, matNo, count, qty, inQty) { |
| | | if (isNaN(count)) { |
| | | layer.msg("请输入数字"); |
| | | } else { |
| | | if(count > (qty-inQty) ){ |
| | | layer.msg("入库数量不能超过可入库量"); |
| | | } |
| | | if (count > 0) { |
| | | for (var i=0;i<matCodeData.length;i++){ |
| | | if (matCodeData[i]["matNo"] === matNo){ |
| | | // if (matCodeData[i]["matNo"] === matNo){ |
| | | if (matCodeData[i]["billNo"] === billNo && matCodeData[i]["seqNo"] === seqNo){ |
| | | matCodeData[i]["count"] = count; |
| | | } |
| | | } |
| | |
| | | for (var i=0;i<data.length;i++){ |
| | | let pass = false; |
| | | for (var j=0;j<matCodeData.length;j++){ |
| | | if (data[i].matNo === matCodeData[j].matNo) { |
| | | // if (data[i].matNo === matCodeData[j].matNo) { |
| | | if (data[i].billNo === matCodeData[j].billNo && data[i].seqNo === matCodeData[j].seqNo) { |
| | | pass = true; |
| | | break; |
| | | } |
| | |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间', width: 160} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | cols.push( |
| | | {field: 'billNo', align: 'center',title: '单据编号'} |
| | | ,{field: 'seqNo', align: 'center',title: '序号', width:80} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true}) |
| | | return cols; |
| | | } |
| | |
| | | |
| | | #btn-comb { |
| | | margin-left: 60px; |
| | | display: none; |
| | | /*display: none;*/ |
| | | } |
| | | </style> |
| | | </head> |
| | |
| | | |
| | | <!-- 行 --> |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="memo">备注</a> |
| | | <!-- <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="memo">备注</a>--> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">移除</a> |
| | | </script> |
| | | |
| | |
| | | function getCol() { |
| | | var cols = [ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{type: 'qty', title: '通知入库量', fixed: 'left'} |
| | | ,{type: 'inQty', title: '已入库量', fixed: 'left'} |
| | | ,{field: 'qty', title: '通知入库量', fixed: 'left', width:100} |
| | | ,{field: 'inQty', title: '已入库量', fixed: 'left', width:90} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push( |
| | | {field: 'modiUser$', align: 'center',title: '修改人员', hide: true}, |
| | | {field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | cols.push({field: 'billNo', title:'单据编号', align: 'center'} |
| | | ,{field: 'seqNo', title:'序号', align: 'center', width:80} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | ) |
| | | return cols; |
| | | } |
| | |
| | | statusCode: 200 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | console.log(res); |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({field: 'billNo', title:'单据编号', align: 'center'} |
| | | ,{field: 'seqNo', title:'序号', align: 'center', width:80}); |
| | | return cols; |
| | | } |
| | | layui.use(['table','laydate', 'form'], function() { |