Merge remote-tracking branch 'origin/ghtzwcsOld' into ghtzwcsOld
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | |
| | | import com.zy.asrs.domain.vo.CrnStateTableVo; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.mapper.BasCrnErrorMapper; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.BasCrnpService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.service.impl.MainServiceImpl; |
| | | import com.zy.asrs.utils.CommandUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.asrs.utils.VersionUtils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.core.CrnThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.properties.SystemProperties; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.hibernate.validator.internal.engine.messageinterpolation.parser.ELState; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private String movePath; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | |
| | | command.setDestinationPosX(param.getBay()); // 目标库位列 |
| | | command.setDestinationPosY(param.getLev()); // 目标库位层 |
| | | command.setCommand((short)1); |
| | | String locNo =String.format("%2d",param.getRow()) + String.format("%3d",param.getBay()) + String.format("%2d",param.getLev()); |
| | | String startlocNo =String.format("%2d",param.getSourceRow()) + String.format("%3d",param.getSourceBay()) + String.format("%2d",param.getSourceLev()); |
| | | boolean wmsLocStatus = toWmsLocStatus(1, startlocNo, locNo, param.getBarcode(), param.getBarcodeType(), param.getEmptyContainer()); |
| | | if (!wmsLocStatus){ |
| | | return R.error("库位更新失败"); |
| | | } |
| | | return crnControl(command)?R.ok():R.error(); |
| | | } |
| | | |
| | |
| | | command.setDestinationPosZ(param.getRow()); // 目标库位排 |
| | | command.setDestinationPosX(param.getBay()); // 目标库位列 |
| | | command.setDestinationPosY(param.getLev()); // 目标库位层 |
| | | String locNo =String.format("%2d",param.getRow()) + String.format("%3d",param.getBay()) + String.format("%2d",param.getLev()); |
| | | String startlocNo =String.format("%2d",param.getSourceRow()) + String.format("%3d",param.getSourceBay()) + String.format("%2d",param.getSourceLev()); |
| | | boolean wmsLocStatus = toWmsLocStatus(2, startlocNo, locNo, param.getBarcode(), param.getBarcodeType(), param.getEmptyContainer()); |
| | | if (!wmsLocStatus){ |
| | | return R.error("库位更新失败"); |
| | | } |
| | | return crnControl(command)?R.ok():R.error(); |
| | | } |
| | | |
| | |
| | | LocMast loc = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", command.getDestinationPosX()) |
| | | .eq("bay1", command.getDestinationPosY()).eq("lev1", command.getDestinationPosZ())); |
| | | VersionUtils.locMoveCheckLocType(sourceLoc, loc); |
| | | String locNo =String.format("%2d",param.getRow()) + String.format("%3d",param.getBay()) + String.format("%2d",param.getLev()); |
| | | String startlocNo =String.format("%2d",param.getSourceRow()) + String.format("%3d",param.getSourceBay()) + String.format("%2d",param.getSourceLev()); |
| | | boolean wmsLocStatus = toWmsLocStatus(3, startlocNo, locNo, param.getBarcode(), param.getBarcodeType(), param.getEmptyContainer()); |
| | | if (!wmsLocStatus){ |
| | | return R.error("库位更新失败"); |
| | | } |
| | | return crnControl(command)?R.ok():R.error(); |
| | | } |
| | | |
| | |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | public boolean toWmsLocStatus(Integer type,String startlocNo,String locNo,String barcode,String barcodeType,String emptyContainer){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("x-api-key","7a15b5db-29b6-552c-8cff-0cfec3756da2"); |
| | | WmsLocStatus param = new WmsLocStatus(); |
| | | param.setWarehouseId("1688469798893297665"); |
| | | param.setLocationCode(Utils.getWmsLocNo(locNo)); |
| | | if (emptyContainer.equals("1")){ |
| | | param.setEmptyContainer("Y"); |
| | | }else { |
| | | param.setEmptyContainer("N"); |
| | | } |
| | | param.setStatus("QY"); |
| | | param.setContainerCode(barcode); |
| | | param.setContainerTypeCode(barcodeType); |
| | | |
| | | String response = null; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setHeaders(map) |
| | | .setUri(wmsUrl) |
| | | .setPath("wcsManager/wcsInterface/locationUpdate") |
| | | .setJson(JSON.toJSONString(param)) |
| | | .build() |
| | | .doPost(); |
| | | }catch (Exception e){ |
| | | log.error("库位更新失败"); |
| | | } |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)){ |
| | | LocMast originLoc = locMastService.selectByLocNo(startlocNo); |
| | | LocMast locMast = locMastService.selectByLocNo(locNo); |
| | | if (type == 1){ |
| | | locMast.setBarcode(barcode); |
| | | locMast.setLocSts("Z"); |
| | | locMastService.updateById(locMast); |
| | | }else if (type == 2){ |
| | | originLoc.setLocSts("K"); |
| | | originLoc.setBarcode(""); |
| | | locMastService.updateById(originLoc); |
| | | }else if (type == 3){ |
| | | originLoc.setLocSts("K"); |
| | | originLoc.setBarcode(""); |
| | | locMast.setBarcode(barcode); |
| | | locMast.setLocSts("Z"); |
| | | locMastService.updateById(originLoc); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | |
| | | apiLogService.save("Wms变更货位状态" |
| | | ,wmsUrl+"wcsManager/wcsInterface/inboundTaskApply" |
| | | ,null |
| | | ,"127.0.0.1" |
| | | ,JSON.toJSONString(param) |
| | | ,response |
| | | ,true |
| | | ); |
| | | return true; |
| | | } |
| | | return false; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | return R.error("容器编码或容器类型有误"); |
| | | } |
| | | } |
| | | if (locMast.getLocSts().equals("O")){ |
| | | if (locMast.getLocSts().equals("K")){ |
| | | locMast.setBarcode(null); |
| | | } |
| | | locMast.setModiUser(getUserId()); |
| | |
| | | Date now = new Date(); |
| | | LocMast locMast = new LocMast(); |
| | | locMast.setLocNo(locNo); |
| | | locMast.setLocSts("O"); |
| | | locMast.setLocSts("K"); |
| | | locMast.setRow1(r); // 排 |
| | | locMast.setBay1(b); // 列 |
| | | locMast.setLev1(l); // 层 |
| | |
| | | jsonObject.put("value", 10);//将禁用库位进行设置 |
| | | } |
| | | jsonObject.put("locNo", locMast.getLocNo());//设置库位号 |
| | | jsonObject.put("locNo$", locMast.getLocNo$());//设置库位号 |
| | | jsonObject.put("locSts", locMast.getLocSts());//库位状态 |
| | | jsonObject.put("barcode", Optional.ofNullable(locMast.getBarcode()).orElse("无"));//托盘号 |
| | | |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.SaasLog; |
| | | import com.zy.asrs.service.SaasLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class SaasLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SaasLogService saasLogService; |
| | | |
| | | @RequestMapping(value = "/saasLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(saasLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/saasLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@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){ |
| | | EntityWrapper<SaasLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(saasLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/saasLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(SaasLog saasLog) { |
| | | saasLogService.insert(saasLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/saasLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(SaasLog saasLog){ |
| | | if (Cools.isEmpty(saasLog) || null==saasLog.getId()){ |
| | | return R.error(); |
| | | } |
| | | saasLogService.updateById(saasLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/saasLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | saasLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/saasLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<SaasLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("saasLog")); |
| | | convert(map, wrapper); |
| | | List<SaasLog> list = saasLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/saasLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<SaasLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<SaasLog> page = saasLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (SaasLog saasLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", saasLog.getId()); |
| | | map.put("value", saasLog.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/saasLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<SaasLog> wrapper = new EntityWrapper<SaasLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != saasLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(SaasLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setLocType1(devp.getDevNo()==102 ? "高" : "低"); |
| | | vo.setBarcode(staProtocol.getBarcode()); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.utils.SaasUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.net.InetAddress; |
| | | import java.net.UnknownHostException; |
| | | import java.util.*; |
| | | |
| | | import static com.zy.asrs.entity.param.TaskStatusFeedbackParam.getTaskType; |
| | | |
| | | @RestController |
| | | @Slf4j |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrk/updatePoint/auth") |
| | | @ManagerAuth |
| | | public R updatePoint(TaskWrk taskWrk){ |
| | | public R updatePoint(TaskWrk taskWrk) throws UnknownHostException { |
| | | if (Cools.isEmpty(taskWrk) || null == taskWrk.getTaskNo()) { |
| | | return R.error(); |
| | | } |
| | |
| | | if (taskWrk1 == null) { |
| | | return R.error(); |
| | | } |
| | | InetAddress localHost = InetAddress.getLocalHost(); |
| | | String ipAddress = localHost.getHostAddress(); |
| | | |
| | | SaasUtils.insertLog(1,taskWrk1.getStartPoint()+"-"+taskWrk1.getTargetPoint(),taskWrk.getStartPoint()+"-"+taskWrk.getTargetPoint(), ipAddress,getUser().getUsername()); |
| | | |
| | | |
| | | taskWrk1.setStartPoint(taskWrk.getStartPoint()); |
| | | taskWrk1.setTargetPoint(taskWrk.getTargetPoint()); |
| | | if (taskWrk1.getIoType() == 1){ |
| | | taskWrk1.setOriginTargetPoint(Utils.getWmsLocNo(taskWrk.getTargetPoint())); |
| | | } else if (taskWrk1.getIoType() == 2) { |
| | | taskWrk1.setOriginStartPoint(Utils.getWmsLocNo(taskWrk.getStartPoint())); |
| | | } else if (taskWrk1.getIoType() == 3) { |
| | | taskWrk1.setOriginTargetPoint(Utils.getWmsLocNo(taskWrk.getTargetPoint())); |
| | | taskWrk1.setOriginStartPoint(Utils.getWmsLocNo(taskWrk.getStartPoint())); |
| | | } |
| | | taskWrk1.setModiTime(new Date()); |
| | | taskWrk1.setModiUser(getUserId()); |
| | | |
| | | taskWrkService.updateById(taskWrk1); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (taskWrk == null) { |
| | | return R.error(); |
| | | } |
| | | if (taskWrk.getStatus().equals(TaskStatusType.CANCEL.id)) { |
| | | return R.error(taskWrk.getTaskNo() + "已被取消"); |
| | | String wmsCancelledtask = toWmsCancelledtask(taskWrk); |
| | | JSONObject jsonObject = JSON.parseObject(wmsCancelledtask); |
| | | if (Cools.isEmpty(jsonObject)){ |
| | | return R.error("超时或未知错误"); |
| | | } |
| | | Date now = new Date(); |
| | | taskWrk.setStatus(TaskStatusType.CANCEL.id); |
| | | taskWrk.setModiTime(now);//操作时间 |
| | | try{ |
| | | taskWrk.setModiUser(getUserId());//操作员 |
| | | }catch (Exception e){ |
| | | taskWrk.setModiUser(9999L);//操作员 |
| | | if (jsonObject.getInteger("code").equals(200)){ |
| | | if (!taskWrkService.delete(new EntityWrapper<TaskWrk>().eq("task_no",taskNo))){ |
| | | return R.error("删除任务失败"); |
| | | } |
| | | }else if (jsonObject.getInteger("code").equals(500)){ |
| | | return R.error(jsonObject.get("msg").toString()); |
| | | }else { |
| | | return R.error("超时或未知错误"); |
| | | } |
| | | taskWrk.setCompleteTime(now);//完结时间 |
| | | taskWrkService.updateById(taskWrk); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | public String toWmsCancelledtask(TaskWrk taskWrk){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("x-api-key","7a15b5db-29b6-552c-8cff-0cfec3756da2"); |
| | | TaskOverToWms taskOverToWms = new TaskOverToWms(); |
| | | taskOverToWms.setFeedbackFrom("WCS"); //来源 |
| | | taskOverToWms.setWarehouseId("1688469798893297665"); //仓库标识 |
| | | taskOverToWms.setTaskNo(taskWrk.getTaskNo()); //任务号 |
| | | taskOverToWms.setTaskType(getTaskType(taskWrk.getIoType())); // 任务类型 |
| | | taskOverToWms.setContainerCode(taskWrk.getBarcode()); // 容器编码 |
| | | if (taskWrk.getIoType() ==1 ){ |
| | | taskOverToWms.setEquipmentCode(String.valueOf(taskWrk.getCrnNo())); //设备编码 |
| | | taskOverToWms.setTargetLocationCode(taskWrk.getOriginTargetPoint()); //目标库位 |
| | | }else if (taskWrk.getIoType() ==2){ |
| | | Map<Integer,String> map1 = new HashMap<>(); |
| | | map1.put(102,"J-1101"); |
| | | map1.put(106,"J-1103"); |
| | | map1.put(110,"J-1105"); |
| | | map1.put(114,"J-1107"); |
| | | map1.put(118,"J-1109"); |
| | | map1.put(122,"J-1111"); |
| | | taskOverToWms.setEquipmentCode(map1.get(taskWrk.getTargetPoint())); //设备编码 |
| | | taskOverToWms.setSourceLocationCode(taskWrk.getOriginStartPoint()); //源库位 |
| | | } |
| | | |
| | | taskOverToWms.setTaskStatus("cancelled"); //任务状态 |
| | | String response = null; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setHeaders(map) |
| | | .setUri(wmsUrl) |
| | | .setPath("wcsManager/wcsInterface/taskStatusFeedback") |
| | | .setJson(JSON.toJSONString(taskOverToWms)) |
| | | .build() |
| | | .doPost(); |
| | | }catch (Exception e){ |
| | | log.error("wms连接失败"); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | |
| | | @PostMapping(value = "/taskWrk/updateCommandStep") |
| | | @ManagerAuth(memo = "更新步序") |
| | |
| | | taskWrkService.updateById(taskWrk); |
| | | return R.ok(); |
| | | } |
| | | @PostMapping(value = "/taskWrk/upIoPri") |
| | | public R upIoPri(@RequestParam String taskNo){ |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(taskNo); |
| | | if (taskWrk.getIoPri() > 300){ |
| | | return R.error("优先级已最高"); |
| | | } |
| | | Map<Integer,Integer> map = new HashMap<>(); |
| | | map.put(100,200);map.put(200,300);map.put(300,400); |
| | | Integer pri = map.get(taskWrk.getIoPri()); |
| | | taskWrk.setIoPri(pri); |
| | | if (!taskWrkService.updateById(taskWrk)){ |
| | | return R.error("增加优先级失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | @PostMapping(value = "/taskWrk/downIoPri") |
| | | public R downIoPri(@RequestParam String taskNo){ |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(taskNo); |
| | | if (taskWrk.getIoPri() <200){ |
| | | return R.error("优先级已最低"); |
| | | } |
| | | Map<Integer,Integer> map = new HashMap<>(); |
| | | map.put(200,100);map.put(300,200);map.put(400,300); |
| | | Integer pri = map.get(taskWrk.getIoPri()); |
| | | taskWrk.setIoPri(pri); |
| | | if (!taskWrkService.updateById(taskWrk)){ |
| | | return R.error("降低优先级失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static String getTaskType(Integer paramIoType){ |
| | | switch (paramIoType){ |
| | |
| | | |
| | | // 目标库位-层 |
| | | private Short lev; |
| | | //条码 |
| | | private String barcode; |
| | | //条码类型 |
| | | private String barcodeType; |
| | | private String emptyContainer; |
| | | |
| | | } |
| | |
| | | //高低库位 |
| | | private String locType1 = "-"; |
| | | private String car = "-"; |
| | | private String barcode = "-"; |
| | | } |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasLocStsService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @TableField(exist = false) |
| | | private String emptyContainer; |
| | | |
| | | public String getLocNo$(){ |
| | | if (Cools.isEmpty(this.locNo)){ |
| | | return ""; |
| | | } |
| | | return Utils.getWmsLocNo(this.locNo); |
| | | } |
| | | |
| | | public String getEmptyContainer$(){ |
| | | if (Cools.isEmpty(this.emptyContainer)){ |
| | | return ""; |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("sys_saas_log") |
| | | public class SaasLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @ApiModelProperty(value= "id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * {0:入库,1:出库,2:移转,3:手动调整} |
| | | */ |
| | | @ApiModelProperty(value= "{0:入库,1:出库,2:移转,3:手动调整}") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("origin_data") |
| | | private String originData; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String data; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("io_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String ip; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("create_by_name") |
| | | private String createByName; |
| | | |
| | | public SaasLog() {} |
| | | |
| | | public SaasLog(Integer type,String originData,String data,Date ioTime,Long createBy,String ip,String createByName) { |
| | | this.type = type; |
| | | this.originData = originData; |
| | | this.data = data; |
| | | this.ioTime = ioTime; |
| | | this.createBy = createBy; |
| | | this.ip = ip; |
| | | this.createByName = createByName; |
| | | } |
| | | |
| | | // SaasLog saasLog = new SaasLog( |
| | | // null, // {0:入库,1:出库,2:移转,3:手动调整} |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null // |
| | | // ); |
| | | |
| | | public String getType$(){ |
| | | |
| | | switch (type){ |
| | | case 1: return "修改库位"; |
| | | case 2: return ""; |
| | | default: |
| | | return "未知"; |
| | | } |
| | | |
| | | } |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | public String getIoPri$(){ |
| | | if (null == this.ioPri){ return null; } |
| | | switch (this.ioPri){ |
| | | case 100: |
| | | return "低"; |
| | | case 200: |
| | | return "中"; |
| | | case 300: |
| | | return "高"; |
| | | case 400: |
| | | return "紧急"; |
| | | default: |
| | | return String.valueOf(this.ioPri); |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | |
| | | this.bgc = "#00B271"; |
| | | this.color = "#fff"; |
| | | break; |
| | | case "F": |
| | | case "Z": |
| | | this.bgc = "#479AC7"; |
| | | this.color = "#fff"; |
| | | break; |
| | | case "O": |
| | | case "K": |
| | | this.bgc = "#B45B3E"; |
| | | this.color = "#fff"; |
| | | break; |
| | |
| | | this.bgc = "#F0DAD2"; |
| | | this.color = "#000"; |
| | | break; |
| | | case "X": |
| | | case "J": |
| | | this.bgc = "#bac296"; |
| | | this.color = "#fff"; |
| | | break; |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.SaasLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface SaasLogMapper extends BaseMapper<SaasLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.SaasLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface SaasLogService extends IService<SaasLog> { |
| | | |
| | | } |
| | |
| | | param.setWarehouseId("1688469798893297665"); |
| | | param.setLocationCode(Utils.getWmsLocNo(locMast.getLocNo())); |
| | | param.setEmptyContainer(locMast.getEmptyContainer$()); |
| | | if (locMast.getLocSts().equals("Z")){ |
| | | if (locMast.getLocSts().equals("J")){ |
| | | param.setStatus("JY"); |
| | | }else { |
| | | param.setStatus("QY"); |
| | | } |
| | | if (Cools.isEmpty(locMast.getBarcode()) || locMast.getLocSts().equals("O")){ |
| | | if (Cools.isEmpty(locMast.getBarcode()) || locMast.getLocSts().equals("K")){ |
| | | param.setContainerCode(""); |
| | | param.setContainerTypeCode(""); |
| | | }else { |
| | |
| | | .build() |
| | | .doPost(); |
| | | }catch (Exception e){ |
| | | log.error("堆垛机任务完成,请求wms任务完成接口失败"); |
| | | log.error("库位更新失败"); |
| | | } |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | |
| | |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | staProtocol.setBarcode(barcode); |
| | | if(!Cools.isEmpty(barcode)) { |
| | | StaDescService staDescService = SpringUtils.getBean(StaDescService.class); |
| | | |
| | |
| | | |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast.setLocSts("F");//F.在库 |
| | | locMast.setLocSts("Z");//F.在库 |
| | | locMast.setBarcode(taskWrk.getBarcode());//托盘码 |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(9999L); |
| | |
| | | |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast.setLocSts("O");//O.空库位 |
| | | locMast.setLocSts("K");//O.空库位 |
| | | locMast.setBarcode("");//托盘码 |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(9999L); |
| | |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.entity.StaDesc; |
| | | import com.zy.asrs.entity.TaskWrk; |
| | | import com.zy.asrs.entity.ToWmsDTO; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.TaskOverParam; |
| | | import com.zy.asrs.entity.param.WMSAndAGVInterfaceParam; |
| | | import com.zy.asrs.entity.param.taskCreateParam; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.OpenService; |
| | | import com.zy.asrs.service.StaDescService; |
| | | import com.zy.asrs.service.TaskWrkService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.core.DevpThread; |
| | |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | |
| | | @Autowired |
| | | private BasCrnpService basCrnpService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | |
| | | |
| | | |
| | | @Value("${wms.url}") |
| | |
| | | |
| | | @Override |
| | | public R taskCreate(taskCreateParam param) { |
| | | //禁用堆垛机后不可下发任务 |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", param.getCrn())); |
| | | if ((param.getIoType() == 3 || param.getIoType() == 1 ) && basCrnp.getInEnable().equals("N")){ |
| | | throw new CoolException("生成任务失败,堆垛机不可用"); |
| | | } else if (param.getIoType() == 2 && basCrnp.getOutEnable().equals("N")) { |
| | | throw new CoolException("生成任务失败,堆垛机不可用"); |
| | | } |
| | | //禁用库位后不可下发出库任务 |
| | | if (param.getIoType() == 2){ |
| | | String wcsLocNo = Utils.getWcsLocNo(param.getStartPoint()); |
| | | LocMast locMast = locMastService.selectByLocNo(wcsLocNo); |
| | | if (locMast.getLocSts().equals("J")){ |
| | | throw new CoolException("生成出库任务失败,库位被禁用"); |
| | | } |
| | | } |
| | | |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(param.getTaskNo()); |
| | | if (taskWrk != null) { |
| | | throw new CoolException(param.getTaskNo() + "任务已存在,请勿重复提交"); |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.SaasLogMapper; |
| | | import com.zy.asrs.entity.SaasLog; |
| | | import com.zy.asrs.service.SaasLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saasLogService") |
| | | public class SaasLogServiceImpl extends ServiceImpl<SaasLogMapper, SaasLog> implements SaasLogService { |
| | | |
| | | } |
| | |
| | | Date now = new Date(); |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast.setLocSts("O");//O.空库位 |
| | | locMast.setLocSts("K");//O.空库位 |
| | | locMast.setBarcode("");//托盘码 |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(9999L); |
| | |
| | | |
| | | //更新库位状态 |
| | | LocMast locMast2 = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast2.setLocSts("F");//F.在库 |
| | | locMast2.setLocSts("Z");//F.在库 |
| | | locMast2.setBarcode(taskWrk.getBarcode());//托盘码 |
| | | locMast2.setModiTime(now); |
| | | locMast2.setModiUser(9999L); |
New file |
| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.SaasLog; |
| | | import com.zy.asrs.service.SaasLogService; |
| | | |
| | | import java.util.Date; |
| | | |
| | | public class SaasUtils { |
| | | public static void insertLog(Integer type, String locNo, String matnr,String ip,String user){ |
| | | SaasLogService bean = SpringUtils.getBean(SaasLogService.class); |
| | | SaasLog saasLog = new SaasLog(); |
| | | saasLog.setType(type); |
| | | saasLog.setOriginData(locNo); |
| | | saasLog.setData(matnr); |
| | | saasLog.setIoTime(new Date()); |
| | | saasLog.setIp(ip); |
| | | saasLog.setCreateBy(1L); |
| | | saasLog.setCreateByName(user); |
| | | bean.insert(saasLog); |
| | | } |
| | | } |
| | |
| | | generator.url="127.0.0.1:1433;databasename=ghtzasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="man_api_log"; |
| | | generator.table="sys_saas_log"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.js = false; |
| | | generator.html = false; |
| | |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo); |
| | | // 检测目标库位是否为空库位 |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { |
| | | if (shallowLoc != null && shallowLoc.getLocSts().equals("K")) { |
| | | if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { |
| | | if (VersionUtils.locMoveCheckLocType(shallowLoc, locTypeDto)) { |
| | | locMast = shallowLoc; |
| | |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo()); |
| | | // 检测目标库位是否为空库位 |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { |
| | | if (shallowLoc != null && shallowLoc.getLocSts().equals("K")) { |
| | | if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { |
| | | locMast = shallowLoc; |
| | | crnNo = locMast.getCrnNo(); |
| | |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { |
| | | if (!deepLoc.getLocSts().equals("Z") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | if (!shallowLoc.getLocSts().equals("K")) { |
| | | locMast = null; |
| | | } |
| | | } |
| | |
| | | //指令ID |
| | | private Integer commandId; |
| | | |
| | | //条码 |
| | | private String barcode = null; |
| | | |
| | | // 外形检测 ------------------------------------------------------------------------ |
| | | |
| | | // 前超限 |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.SaasLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.SaasLog"> |
| | | <id column="id" property="id" /> |
| | | <result column="type" property="type" /> |
| | | <result column="origin_data" property="originData" /> |
| | | <result column="data" property="data" /> |
| | | <result column="io_time" property="ioTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="ip" property="ip" /> |
| | | <result column="create_by_name" property="createByName" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | /* 右 */ |
| | | .crn-state { |
| | | height: 100%; |
| | | width: 79%; |
| | | width: 100%; |
| | | overflow: auto; |
| | | float: left; |
| | | } |
| | |
| | | .crn-msg { |
| | | /*overflow: auto;*/ |
| | | margin-top: 10px; |
| | | height: 250px; |
| | | height: 350px; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | box-shadow: 0 0 3px rgba(0,0,0,.3); |
| | |
| | | /* -------------------- 第四模块 -------------------- */ |
| | | .crn-output-board { |
| | | margin-top: 10px; |
| | | height: 350px; |
| | | height: 200px; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | box-shadow: 0 0 3px rgba(0,0,0,.3); |
| | |
| | | } |
| | | .head-left { |
| | | height: 100%; |
| | | width: 20%; |
| | | width: 50%; |
| | | display: inline-block; |
| | | } |
| | | .head-right { |
| | |
| | | .layui-table-cell { |
| | | height: auto ; |
| | | white-space: normal; |
| | | } |
| | | .barcode1{ |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | left: 220px; |
| | | top: 250px; |
| | | } |
| | | .barcode2{ |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | left: 220px; |
| | | top: 340px; |
| | | } |
| | | .barcode3{ |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | left: 220px; |
| | | top: 430px; |
| | | } |
| | | .barcode4{ |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | left: 220px; |
| | | top: 545px; |
| | | } |
| | | .barcode5{ |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | left: 220px; |
| | | top: 660px; |
| | | } |
| | | .barcode6{ |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | left: 220px; |
| | | top: 770px; |
| | | } |
| | | .barcode7{ |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | left: 1450px; |
| | | top: 685px; |
| | | } |
| | | .barcode8{ |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | left: 1450px; |
| | | top: 570px; |
| | | } |
| | |
| | | {type: 'checkbox', fixed: 'left'} |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'locNo', align: 'center',title: '库位号',sort:true} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号',sort:true} |
| | | ,{field: 'locSts$', align: 'center',title: '库位状态',width:200} |
| | | // ,{field: 'whsType$', align: 'center',title: '库位类型'} |
| | | // ,{field: 'pltType', align: 'center',title: ''} |
| | | // ,{field: 'ctnType', align: 'center',title: ''} |
| | | // ,{field: 'locSts', align: 'center',title: ''} |
| | | // ,{field: 'sheetNo', align: 'center',title: ''} |
| | | // ,{field: 'crnNo', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'crnNo', align: 'center',title: '巷道'} |
| | | ,{field: 'barcode', align: 'center',title: '托盘码'} |
| | | ,{field: 'row1', align: 'center',title: '排', sort:true} |
| | | ,{field: 'bay1', align: 'center',title: '列', sort:true} |
| | | ,{field: 'lev1', align: 'center',title: '层', sort:true} |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/wms/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#saasLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/saasLog/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | // toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: 'id', hide:true} |
| | | ,{field: 'type$', align: 'center',title: '操作类型'} |
| | | ,{field: 'originData', align: 'center',title: '源数据'} |
| | | ,{field: 'data', align: 'center',title: '修改数据'} |
| | | ,{field: 'ip', align: 'center',title: 'ip地址'} |
| | | ,{field: 'createByName', align: 'center',title: '操作人'} |
| | | ,{field: 'ioTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'createBy', align: 'center',title: '', hide:true} |
| | | |
| | | |
| | | ]], |
| | | 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(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(saasLog)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(saasLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'saasLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/saasLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(saasLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/saasLog/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/saasLog/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['ioTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | {type: 'checkbox'} |
| | | // ,{field: 'hostName', align: 'center',title: '授权商户', templet: '#hostTpl', width: 140} |
| | | // ,{field: 'nickname', align: 'center',title: '用户名'} |
| | | ,{field: 'username', align: 'center',title: '登录账户'} |
| | | ,{field: 'mobile', align: 'center',title: '手机号'} |
| | | ,{field: 'username', align: 'center',title: '用户名'} |
| | | ,{field: 'mobile', align: 'center',title: '账号'} |
| | | // ,{field: 'deptName', align: 'center',title: '所属部门'} |
| | | ,{field: 'roleName', align: 'center',title: '角色'} |
| | | ,{field: 'email', align: 'center',title: '邮箱'} |
| | |
| | | <el-button type="primary" @click="resetParam">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table ref="singleTable" :data="tableData" style="width: 100%;" :row-class-name="tableRowClassName"> |
| | | <el-table border ref="singleTable" :data="tableData" style="width: 100%;" :row-class-name="tableRowClassName"> |
| | | <el-table-column label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}"> |
| | |
| | | <el-button type="primary" @click="resetParam">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table ref="singleTable" :data="tableData" style="width: 100%;" :row-class-name="tableRowClassName"> |
| | | <el-table border ref="singleTable" :data="tableData" style="width: 100%;" :row-class-name="tableRowClassName"> |
| | | <el-table-column property="id" label="#ID"> |
| | | </el-table-column> |
| | | <el-table-column property="wrkNo" label="工作号"> |
| | |
| | | <body> |
| | | <div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;"> |
| | | <div style="width: 100%;"> |
| | | <el-table ref="singleTable" :data="tableData" highlight-current-row @row-click="handleRowClick" |
| | | <el-table border ref="singleTable" :data="tableData" highlight-current-row @row-click="handleRowClick" |
| | | max-height="350" style="width: 100%"> |
| | | <el-table-column property="crnNo" label="堆垛机"> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | <div> |
| | | <el-form :model="formParam" label-position="top" :inline="true" class="demo-form-inline"> |
| | | <el-form-item label="源站/源库位"> |
| | | <el-input v-model="formParam.sourceStaNo" placeholder="源站/源库位"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="排"> |
| | | <!-- <el-form-item label="源站/源库位">--> |
| | | <!-- <el-input v-model="formParam.sourceStaNo" placeholder="源站/源库位"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="源排"> |
| | | <el-input v-model="formParam.sourceRow" placeholder="排"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="列"> |
| | | <el-form-item label="源列"> |
| | | <el-input v-model="formParam.sourceBay" placeholder="列"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="层"> |
| | | <el-form-item label="源层"> |
| | | <el-input v-model="formParam.sourceLev" placeholder="层"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :model="formParam" label-position="top" :inline="true" class="demo-form-inline"> |
| | | <el-form-item label="目标站/目标库位"> |
| | | <el-input v-model="formParam.staNo" placeholder="目标站/目标库位"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="排"> |
| | | <!-- <el-form-item label="目标站/目标库位">--> |
| | | <!-- <el-input v-model="formParam.staNo" placeholder="目标站/目标库位"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="目标排"> |
| | | <el-input v-model="formParam.row" placeholder="排"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="列"> |
| | | <el-form-item label="目标列"> |
| | | <el-input v-model="formParam.bay" placeholder="列"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="层"> |
| | | <el-form-item label="目标层"> |
| | | <el-input v-model="formParam.lev" placeholder="层"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :model="formParam" label-position="top" :inline="true" class="demo-form-inline"> |
| | | <el-form-item label="托盘码"> |
| | | <el-input v-model="formParam.barcode" placeholder="条码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="托盘类型"> |
| | | <el-input v-model="formParam.barcodeType" placeholder="类型"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="空托盘"> |
| | | <el-select v-model="formParam.emptyContainer" placeholder="是否为空托盘"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <el-form label-position="top" :inline="true" class="demo-form-inline"> |
| | | <el-form-item label=""> |
| | |
| | | staNo: null, |
| | | row: 1, |
| | | bay: 0, |
| | | lev: 1 |
| | | lev: 1, |
| | | barcode:null, |
| | | barcodeType:null, |
| | | emptyContainer:null |
| | | }, |
| | | enableIn: false, |
| | | enableOut: false |
| | | enableOut: false, |
| | | options:[ |
| | | { |
| | | value:'1', |
| | | label:'是' |
| | | }, |
| | | { |
| | | value:'0', |
| | | label:'否' |
| | | } |
| | | ] |
| | | }, |
| | | created() { |
| | | this.init() |
| | |
| | | <body> |
| | | <div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;"> |
| | | <div style="width: 100%;"> |
| | | <el-table ref="singleTable" :data="tableData" highlight-current-row @row-click="handleRowClick" |
| | | <el-table border ref="singleTable" :data="tableData" highlight-current-row @row-click="handleRowClick" |
| | | max-height="450" style="width: 100%"> |
| | | <el-table-column property="devNo" label="站号"> |
| | | </el-table-column> |
| | |
| | | </el-table-column> |
| | | <el-table-column property="pakMk" label="入库标记"> |
| | | </el-table-column> |
| | | <el-table-column property="barcode" label="条码"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | |
| | | |
| | | <!--库位--> |
| | | <div v-else-if="map[index][idx].value == 0" @contextmenu.prevent="rightEvent(index,idx,$event)"> |
| | | <div v-if="map[index][idx].locSts == 'O'" :class="{'pointBoxSearch':map[index][idx].searchStatus}" class="pointBox pointBoxBlue">{{ map[index][idx].locSts }}</div> |
| | | <div v-else-if="map[index][idx].locSts == 'F'" @click.left="selectLoc(index,idx)" :class="{'pointBoxSelected':map[index][idx].locOutSelected,'pointBoxSearch':map[index][idx].searchStatus}" class="pointBox pointBoxRed">{{ map[index][idx].locSts }}</div> |
| | | <div v-if="map[index][idx].locSts == 'K'" :class="{'pointBoxSearch':map[index][idx].searchStatus}" class="pointBox pointBoxBlue">{{ map[index][idx].locSts }}</div> |
| | | <div v-else-if="map[index][idx].locSts == 'Z'" @click.left="selectLoc(index,idx)" :class="{'pointBoxSelected':map[index][idx].locOutSelected,'pointBoxSearch':map[index][idx].searchStatus}" class="pointBox pointBoxRed">{{ map[index][idx].locSts }}</div> |
| | | <div v-else-if="map[index][idx].locSts == 'D'" :class="{'pointBoxSearch':map[index][idx].searchStatus}" class="pointBox pointBoxEmpty">{{ map[index][idx].locSts }}</div> |
| | | <div v-else-if="map[index][idx].locSts == 'P'" :class="{'pointBoxSearch':map[index][idx].searchStatus}" class="pointBox pointBoxOut">{{ map[index][idx].locSts }}</div> |
| | | <div v-else-if="map[index][idx].locSts == 'R'" :class="{'pointBoxSearch':map[index][idx].searchStatus}" class="pointBox pointBoxOutYy">{{ map[index][idx].locSts }}</div> |
| | |
| | | 库位号: {{ map[mapI][mapJ].locNo }} |
| | | </div> |
| | | <div style="margin-top: 10px;"> |
| | | 库位号: {{ map[mapI][mapJ].locNo$}} |
| | | </div> |
| | | <div style="margin-top: 10px;"> |
| | | 库位状态: {{ getLocSts(map[mapI][mapJ].locSts) }} |
| | | </div> |
| | | <div style="margin-top: 10px;"> |
| | |
| | | <h6>AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM</h6> |
| | | </div> |
| | | </div> |
| | | <div class="barcode1"> |
| | | <span style="color: red" id="code1">1</span> |
| | | </div> |
| | | <div class="barcode2"> |
| | | <span style="color: red" id="code2">2</span> |
| | | </div> |
| | | <div class="barcode3"> |
| | | <span style="color: red" id="code3">3</span> |
| | | </div> |
| | | <div class="barcode4"> |
| | | <span style="color: red" id="code4">4</span> |
| | | </div> |
| | | <div class="barcode5"> |
| | | <span style="color: red" id="code5">5</span> |
| | | </div> |
| | | <div class="barcode6"> |
| | | <span style="color: red" id="code6">6</span> |
| | | </div> |
| | | <div class="barcode7"> |
| | | <span style="color: red" id="code7">7</span> |
| | | </div> |
| | | <div class="barcode8"> |
| | | <span style="color: red" id="code8">8</span> |
| | | </div> |
| | | |
| | | <!-- 货架 + 堆垛机 + 入库站点 --> |
| | | <div class="main-part"> |
| | | |
| | | </div> |
| | | |
| | | |
| | | <!-- <!–设备列表–>--> |
| | | <!-- <div class="device-info">--> |
| | |
| | | <!-- </div>--> |
| | | |
| | | <div id="body"> |
| | | |
| | | <!-- 总开关 --> |
| | | <div class="system-state"> |
| | | <div class="body-head">总开关</div> |
| | |
| | | if (res.code === 200) { |
| | | var barcodes = res.data; |
| | | for (var i = 0; i < barcodes.length; i++) { |
| | | $("#code-decoder-data-" + barcodes[i].barcodeId).html(barcodes[i].codeValue); |
| | | $("#code" + barcodes[i].barcodeId).html(barcodes[i].codeValue); |
| | | } |
| | | } else if (res.code === 403) { |
| | | parent.location.href = baseUrl + "/login"; |
| | |
| | | <!-- 执行命令 --> |
| | | |
| | | <!-- 执行命令 --> |
| | | <div class="command-log" style="overflow: auto;"> |
| | | <h3>执行中的命令</h3> |
| | | <div class="crn-command-item"> |
| | | <label>1#</label> |
| | | <!-- <button id="demoBtn-1" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>--> |
| | | <!-- <span> </span>--> |
| | | <input id="crn1" disabled="disabled"> |
| | | </div> |
| | | <div class="crn-command-item"> |
| | | <label>2#</label> |
| | | <!-- <button id="demoBtn-2" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>--> |
| | | <!-- <span> </span>--> |
| | | <input id="crn2" disabled="disabled"> |
| | | </div> |
| | | <div class="crn-command-item"> |
| | | <label>3#</label> |
| | | <!-- <button id="demoBtn-3" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>--> |
| | | <!-- <span> </span>--> |
| | | <input id="crn3" disabled="disabled"> |
| | | </div> |
| | | <div class="crn-command-item"> |
| | | <label>4#</label> |
| | | <!-- <button id="demoBtn-4" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>--> |
| | | <!-- <span> </span>--> |
| | | <input id="crn4" disabled="disabled"> |
| | | </div> |
| | | <div class="crn-command-item"> |
| | | <label>5#</label> |
| | | <!-- <button id="demoBtn-5" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>--> |
| | | <!-- <span> </span>--> |
| | | <input id="crn5" disabled="disabled"> |
| | | </div> |
| | | <div class="crn-command-item"> |
| | | <label>6#</label> |
| | | <!-- <button id="demoBtn-6" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>--> |
| | | <!-- <span> </span>--> |
| | | <input id="crn6" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="command-log" style="overflow: auto;">--> |
| | | <!-- <h3>执行中的命令</h3>--> |
| | | <!-- <div class="crn-command-item">--> |
| | | <!-- <label>1#</label>--> |
| | | <!--<!– <button id="demoBtn-1" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>–>--> |
| | | <!-- <!– <span> </span>–>--> |
| | | <!-- <input id="crn1" disabled="disabled">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="crn-command-item">--> |
| | | <!-- <label>2#</label>--> |
| | | <!--<!– <button id="demoBtn-2" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>–>--> |
| | | <!-- <!– <span> </span>–>--> |
| | | <!-- <input id="crn2" disabled="disabled">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="crn-command-item">--> |
| | | <!-- <label>3#</label>--> |
| | | <!--<!– <button id="demoBtn-3" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>–>--> |
| | | <!-- <!– <span> </span>–>--> |
| | | <!-- <input id="crn3" disabled="disabled">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="crn-command-item">--> |
| | | <!-- <label>4#</label>--> |
| | | <!--<!– <button id="demoBtn-4" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>–>--> |
| | | <!-- <!– <span> </span>–>--> |
| | | <!-- <input id="crn4" disabled="disabled">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="crn-command-item">--> |
| | | <!-- <label>5#</label>--> |
| | | <!--<!– <button id="demoBtn-5" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>–>--> |
| | | <!-- <!– <span> </span>–>--> |
| | | <!-- <input id="crn5" disabled="disabled">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="crn-command-item">--> |
| | | <!-- <label>6#</label>--> |
| | | <!--<!– <button id="demoBtn-6" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>–>--> |
| | | <!-- <!– <span> </span>–>--> |
| | | <!-- <input id="crn6" disabled="disabled">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- 堆垛机状态位信息 --> |
| | | <div class="crn-state"> |
| | | <table id="crn-state-table"> |
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/wms/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/wms/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/wms/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">库位号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="loc_no" placeholder="请输入库位号" autocomplete="off"> |
| | | </div> |
| | | <label class="layui-form-label">物料号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="请输入物料号" autocomplete="off"> |
| | | </div> |
| | | <label class="layui-form-label">操作人:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="create_by_name" placeholder="请输入操作人" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="saasLog" lay-filter="saasLog"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/wms/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/wms/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/wms/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/wms/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/wms/js/saasLog/saasLog.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">id: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="id" placeholder="请输入id" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">{0:入库,1:出库}: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="type" placeholder="请输入{0:入库,1:出库}"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="locNo" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="matnr" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ioTime" id="ioTime$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createBy" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <div style="width: 100%;"> |
| | | <el-card class="box-card"> |
| | | <el-form :inline="true" :model="tableSearchParam" class="demo-form-inline"> |
| | | <el-form-item label=""> |
| | | <el-form-item style="width: 100px;" label=""> |
| | | <el-input v-model="tableSearchParam.task_no" placeholder="任务号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-select v-model="tableSearchParam.status" placeholder="任务状态"> |
| | | <el-form-item style="width: 100px;" label=""> |
| | | <el-select v-model="tableSearchParam.status" placeholder="状态"> |
| | | <el-option label="接收" value="1"></el-option> |
| | | <el-option label="派发" value="2"></el-option> |
| | | <el-option label="完结" value="3"></el-option> |
| | | <el-option label="取消" value="4"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-form-item style="width: 100px;" label=""> |
| | | <el-input v-model="tableSearchParam.wrk_no" placeholder="工作号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-input v-model="tableSearchParam.barcode" placeholder="托盘码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-date-picker |
| | |
| | | <el-button type="primary" @click="resetParam">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table ref="singleTable" :data="tableData" style="width: 100%;"> |
| | | <el-table-column label="操作" width="100"> |
| | | <el-table border ref="singleTable" :data="tableData" style="width: 100%;"> |
| | | |
| | | <el-table-column sortable align="center" property="taskNo" label="任务号" width="90"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="status$" label="任务状态" width="110"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="wrkNo" label="工作号" width="90"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="createTime$" label="任务时间" width="170"> |
| | | </el-table-column> |
| | | <!-- <el-table-column sortable align="center" property="durationTime" label="持续时长">--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column sortable align="center" property="ioType$" label="任务类型"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="startPoint" label="起点位置"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="targetPoint" label="终点位置"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="wrkSts$" label="工作状态"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="barcode" label="托盘码"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="crnNo" label="堆垛机号"> |
| | | </el-table-column> |
| | | <el-table-column sortable align="center" property="ioPri$" label="优先级"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}"> |
| | | <el-button icon="el-icon-more" size="mini" type="primary"></el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item command="showCommand">查看指令</el-dropdown-item> |
| | | <el-dropdown-item command="upIoPri">增加优先级</el-dropdown-item> |
| | | <el-dropdown-item command="downIoPri">降低优先级</el-dropdown-item> |
| | | <el-dropdown-item command="changeCommand">修改</el-dropdown-item> |
| | | <el-dropdown-item command="assign">派发</el-dropdown-item> |
| | | <el-dropdown-item command="complete">完结</el-dropdown-item> |
| | |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column property="taskNo" label="任务号"> |
| | | </el-table-column> |
| | | <el-table-column property="status$" label="任务状态"> |
| | | </el-table-column> |
| | | <el-table-column property="wrkNo" label="工作号"> |
| | | </el-table-column> |
| | | <el-table-column property="createTime$" label="任务时间"> |
| | | </el-table-column> |
| | | <el-table-column property="durationTime" label="持续时长"> |
| | | </el-table-column> |
| | | <el-table-column property="ioType$" label="任务类型"> |
| | | </el-table-column> |
| | | <el-table-column property="startPoint" label="起点位置"> |
| | | </el-table-column> |
| | | <el-table-column property="targetPoint" label="终点位置"> |
| | | </el-table-column> |
| | | <el-table-column property="wrkSts$" label="工作状态"> |
| | | </el-table-column> |
| | | <el-table-column property="barcode" label="托盘码"> |
| | | </el-table-column> |
| | | <el-table-column property="crnNo" label="堆垛机号"> |
| | | </el-table-column> |
| | | <el-table-column property="ioPri" label="优先级"> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | |
| | | status: null, |
| | | wrk_no: null, |
| | | datetime: null, |
| | | barcode:null |
| | | }, |
| | | taskWrkFormVisible: false, |
| | | taskWrkForm: {}, |
| | |
| | | //查看指令 |
| | | this.showCommand(row) |
| | | break; |
| | | case "upIoPri": |
| | | //查看指令 |
| | | this.upIoPri(row) |
| | | break; |
| | | case "downIoPri": |
| | | //查看指令 |
| | | this.downIoPri(row) |
| | | break; |
| | | case "changeCommand": |
| | | //修改指令 |
| | | this.changeCommand(row); |
| | |
| | | success: function(layero, index) {} |
| | | }); |
| | | }, |
| | | upIoPri(row) { |
| | | let that = this |
| | | $.ajax({ |
| | | url: baseUrl + "/taskWrk/upIoPri", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: { |
| | | taskNo: row.taskNo |
| | | }, |
| | | method: 'POST', |
| | | success: function(res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: "增加成功", |
| | | type: 'success' |
| | | }); |
| | | that.getTableData() |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | downIoPri(row) { |
| | | let that = this |
| | | $.ajax({ |
| | | url: baseUrl + "/taskWrk/downIoPri", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: { |
| | | taskNo: row.taskNo |
| | | }, |
| | | method: 'POST', |
| | | success: function(res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: "降低成功", |
| | | type: 'success' |
| | | }); |
| | | that.getTableData() |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | changeCommand(row) { |
| | | //修改指令 |
| | | this.taskWrkFormVisible = true |
| | |
| | | <el-button type="primary" @click="resetParam">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table ref="singleTable" :data="tableData" style="width: 100%;"> |
| | | <el-table border ref="singleTable" :data="tableData" style="width: 100%;"> |
| | | <el-table-column label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">手机号:</label> |
| | | <label class="layui-form-label">账号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="mobile" class="layui-input" placeholder="输入手机号"/> |
| | | </div> |
| | |
| | | |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">登录账户</label> |
| | | <label class="layui-form-label layui-form-required">用户名</label> |
| | | <div class="layui-input-block"> |
| | | <input name="username" placeholder="请输入登录账户" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | |
| | | |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">手机号</label> |
| | | <label class="layui-form-label layui-form-required">账号</label> |
| | | <div class="layui-input-block"> |
| | | <input name="mobile" placeholder="请输入手机号" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |