| | |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(agvLockMastService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | 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()); |
| | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvBasDevp; |
| | | import com.zy.asrs.entity.param.LocDetlAdjustParam; |
| | | import com.zy.asrs.service.AgvWorkService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | workService.createWaitPainWrkMastStart(agvBasDevpList, getUserId()); |
| | | //return R.ok("任务号:" + startupDto.getWorkNo() + ";目标库位:" + startupDto.getLocNo()); |
| | | return R.ok("生成入库工作档成功"); |
| | | } |
| | | |
| | | @RequestMapping("/locDdetl/adjust/start") |
| | | @ManagerAuth(memo = "库存调整") |
| | | public R locDetlAdjustStart(@RequestBody LocDetlAdjustParam param) { |
| | | workService.adjustLocDetl(param, getUserId()); |
| | | return R.ok("库存调整成功"); |
| | | } |
| | | } |
| | |
| | | param.remove("update_time"); |
| | | } |
| | | } |
| | | |
| | | Page<ManLocDetl> page = manLocDetlService.getPage(toPage(curr, limit, param, ManLocDetl.class)); |
| | | return R.ok(page); |
| | | } |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.ManLocDetlTemp; |
| | | import com.zy.asrs.entity.param.LocDetlAdjustParam; |
| | | import com.zy.asrs.service.ManLocDetlTempService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/temp") |
| | | public class ManLocDetlTempController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ManLocDetlTempService manLocDetlTempService; |
| | | |
| | | @RequestMapping(value = "/manLocDetl/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<ManLocDetlTemp> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | |
| | | Page<ManLocDetlTemp> page = manLocDetlTempService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/manLocDetl/list") |
| | | public R outList(@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){ |
| | | |
| | | //Page<ManLocDetlTemp> manLocDetlPage = toPage(curr, limit, param, ManLocDetlTemp.class); |
| | | //Page<ManLocDetlTemp> outPage = manLocDetlTempService.getOutPage(manLocDetlPage); |
| | | // Page<ManLocDetl> page = manLocDetlService.getPage(manLocDetlPage); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/manLocDetl/adjust/start") |
| | | @ManagerAuth(memo = "库存调整") |
| | | public R locDetlAdjustStart(@RequestBody LocDetlAdjustParam param) { |
| | | //manLocDetlTempService.adjustLocDetl(param, getUserId(),getUser()); |
| | | return R.ok("库存调整成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manLocDetl/asrsAndSaas/list") |
| | | @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(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | |
| | | // Page<ManLocDetl> manLocDetlPage = toPage(curr, limit, param, ManLocDetl.class); |
| | | // Page<ManLocDetl> all = manLocDetlService.selectAllPage(manLocDetlPage); |
| | | // return R.ok().add(all); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manLocDetlTemp/export/auth") |
| | | @ManagerAuth(memo = "库位明细导出") |
| | | public synchronized R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<ManLocDetlTemp> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("locDetl")); |
| | | String row = ""; |
| | | if (map.get("row") != null) { |
| | | String chooseRow = (String) map.get("row"); |
| | | if (chooseRow.length() == 1) { |
| | | row = "0" + chooseRow; |
| | | map.remove("row"); |
| | | }else { |
| | | row = chooseRow; |
| | | map.remove("row"); |
| | | } |
| | | } |
| | | convert(map, wrapper); |
| | | if (!row.equals("")){ |
| | | wrapper.and() |
| | | .where("loc_no like '" +row +"%'"); |
| | | } |
| | | List<ManLocDetlTemp> list = manLocDetlTempService.selectList(wrapper); |
| | | list.forEach(m -> { |
| | | m.setMatnr(m.getMatnr() + " "); |
| | | }); |
| | | |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | |
| | | 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 { |
| | | if (entry.getKey().equals("locNo")) { |
| | | wrapper.eq("loc_no", String.valueOf(entry.getValue())); |
| | | } else { |
| | | wrapper.like(entry.getKey(), String.valueOf(entry.getValue())); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.*; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.OrderDomainParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.AdminInterceptor; |
| | | import com.zy.common.utils.BarcodeUtils; |
| | | import com.zy.common.utils.QrCode; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class ManPakOutController extends BaseController { |
| | | @Autowired |
| | | private ManPakOutService manPakOutService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private ManLocDetlService manLocDetlService; |
| | | @Autowired |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | |
| | | @RequestMapping(value = "/ManPakOut/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<ManPakOut> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("create_time",false); |
| | | } |
| | | return R.ok(manPakOutService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/ManPakOut/detailed/auth") |
| | | //@ManagerAuth |
| | | public R detailed(@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<ManPakOut> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("create_time",true); |
| | | } |
| | | wrapper.isNotNull("name"); |
| | | |
| | | Page<ManPakOut> manPakOutPage = manPakOutService.selectPage(new Page<>(curr, limit), wrapper); |
| | | manPakOutPage.getRecords().forEach(manPakOut -> { |
| | | if(manPakOut.getStatus() == 1){ |
| | | |
| | | } |
| | | }); |
| | | return R.ok(manPakOutPage); |
| | | } |
| | | |
| | | 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 = "/ManPakOut/add/auth") |
| | | @ManagerAuth(memo = "生成拣货单") |
| | | @Transactional |
| | | public R manPakOutAdd(@RequestBody OrderDomainParam param){ |
| | | if (Cools.isEmpty(param)){ |
| | | return R.error("数据异常"); |
| | | } |
| | | if (!Cools.isEmpty(param.getOrderNo())){ |
| | | Order order = orderService.selectOne(new EntityWrapper<Order>() |
| | | .eq("order_no", param.getOrderNo()) |
| | | ); |
| | | if (Cools.isEmpty(order)){ |
| | | return R.error("单据不存在"); |
| | | } |
| | | List<OrderDetl> orderDetls =orderDetlService.selectList(new EntityWrapper<OrderDetl>() |
| | | .eq("order_no", param.getOrderNo()) |
| | | ); |
| | | if (Cools.isEmpty(orderDetls)){ |
| | | return R.error("单据明细为空"); |
| | | } |
| | | for (OrderDetl orderDetl : orderDetls){ |
| | | List<ManLocDetl> manLocDetls=null; |
| | | try{ |
| | | if (Cools.isEmpty(orderDetl.getBatch())){ |
| | | manLocDetls = manLocDetlService.selectList(new EntityWrapper<ManLocDetl>() |
| | | .eq("matnr",orderDetl.getMatnr()) |
| | | ); |
| | | }else { |
| | | manLocDetls = manLocDetlService.selectList(new EntityWrapper<ManLocDetl>() |
| | | .eq("matnr",orderDetl.getMatnr()) |
| | | .eq("batch",orderDetl.getBatch()) |
| | | ); |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("添加拣货单失败"); |
| | | } |
| | | |
| | | if (!Cools.isEmpty(manLocDetls)){ |
| | | for (ManLocDetl manLocDetl:manLocDetls){ |
| | | Double statusAnfme = 0.0; |
| | | if (Cools.isEmpty(manLocDetl.getStatus())){ |
| | | manLocDetl.setStatus(1); |
| | | } |
| | | try{ |
| | | if (manLocDetl.getStatus$().equals("禁用")){ |
| | | if (Cools.isEmpty(manLocDetl.getBatch())){ |
| | | List<ManPakOut> manPakOuts = manPakOutService.selectList(new EntityWrapper<ManPakOut>() |
| | | .eq("loc_no", manLocDetl.getLocNo()) |
| | | .eq("matnr", manLocDetl.getMatnr()) |
| | | .eq("status",0) |
| | | ); |
| | | if (!Cools.isEmpty(manPakOuts)){ |
| | | for (ManPakOut manPakOut:manPakOuts){ |
| | | statusAnfme=statusAnfme+manPakOut.getAnfme(); |
| | | } |
| | | } |
| | | }else { |
| | | List<ManPakOut> manPakOuts = manPakOutService.selectList(new EntityWrapper<ManPakOut>() |
| | | .eq("loc_no", manLocDetl.getLocNo()) |
| | | .eq("matnr", manLocDetl.getMatnr()) |
| | | .eq("batch",manLocDetl.getBatch()) |
| | | .eq("status",0) |
| | | ); |
| | | if (!Cools.isEmpty(manPakOuts)){ |
| | | for (ManPakOut manPakOut:manPakOuts){ |
| | | statusAnfme=statusAnfme+manPakOut.getAnfme(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("查询库存禁用数量失败"); |
| | | } |
| | | Wrapper<ManLocDetl> wrapper = new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", manLocDetl.getLocNo()) |
| | | .eq("matnr", manLocDetl.getMatnr()); |
| | | if (orderDetl.getAnfme() > manLocDetl.getAnfme()-statusAnfme){ |
| | | if (addPakOUT(manLocDetl,param.getOrderNo()).equals(R.ok())){ |
| | | manLocDetl.setStatus(0); |
| | | try{ |
| | | if (Cools.isEmpty(manLocDetl.getBatch())){ |
| | | manLocDetlService.update(manLocDetl,wrapper.eq("modi_time",manLocDetl.getModiTime())); |
| | | }else { |
| | | manLocDetlService.update(manLocDetl,wrapper.eq("batch",manLocDetl.getBatch())); |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("更新库存失败"); |
| | | } |
| | | orderDetl.setAnfme(orderDetl.getAnfme()-manLocDetl.getAnfme()); |
| | | }else { |
| | | return R.error("添加拣货单失败"); |
| | | } |
| | | }else if (orderDetl.getAnfme()-manLocDetl.getAnfme()-statusAnfme==0){ |
| | | if (addPakOUT(manLocDetl,param.getOrderNo()).equals(R.ok())){ |
| | | manLocDetl.setStatus(0); |
| | | try{ |
| | | if (Cools.isEmpty(manLocDetl.getBatch())){ |
| | | manLocDetlService.update(manLocDetl,wrapper.eq("modi_time",manLocDetl.getModiTime())); |
| | | }else { |
| | | manLocDetlService.update(manLocDetl,wrapper.eq("batch",manLocDetl.getBatch())); |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("更新库存失败"); |
| | | } |
| | | orderDetl.setAnfme(orderDetl.getAnfme()-manLocDetl.getAnfme()); |
| | | }else { |
| | | return R.error("添加拣货单失败"); |
| | | } |
| | | }else if (orderDetl.getAnfme()<manLocDetl.getAnfme()-statusAnfme){ |
| | | Double a=manLocDetl.getAnfme(); |
| | | manLocDetl.setAnfme(orderDetl.getAnfme()); |
| | | if (addPakOUT(manLocDetl,param.getOrderNo()).equals(R.ok())){ |
| | | orderDetl.setAnfme(orderDetl.getAnfme()-manLocDetl.getAnfme()); |
| | | manLocDetl.setStatus(0); |
| | | manLocDetl.setAnfme(a); |
| | | try{ |
| | | if (Cools.isEmpty(manLocDetl.getBatch())){ |
| | | manLocDetlService.update(manLocDetl,wrapper.eq("modi_time",manLocDetl.getModiTime())); |
| | | }else { |
| | | manLocDetlService.update(manLocDetl,wrapper.eq("batch",manLocDetl.getBatch())); |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("更新库存失败"); |
| | | } |
| | | |
| | | }else { |
| | | return R.error("添加拣货单失败"); |
| | | } |
| | | }else { |
| | | return R.error("系统出错,请联系管理员"); |
| | | } |
| | | if (orderDetl.getAnfme()==0){ |
| | | break; |
| | | } |
| | | } |
| | | if (orderDetl.getAnfme()!=0){ |
| | | ManLocDetl manLocDetl=new ManLocDetl(); |
| | | manLocDetl.setAnfme(0.0); |
| | | manLocDetl.setMatnr(orderDetl.getMatnr()); |
| | | manLocDetl.setMaktx(orderDetl.getMaktx()); |
| | | manLocDetl.setMemo(orderDetl.getMemo()+"库存不足"); |
| | | if (addPakOUT(manLocDetl,param.getOrderNo()).equals(R.ok())){ |
| | | continue; |
| | | }else { |
| | | return R.error("添加拣货单失败"); |
| | | } |
| | | } |
| | | }else { |
| | | ManLocDetl manLocDetl=new ManLocDetl(); |
| | | manLocDetl.setAnfme(0.0); |
| | | manLocDetl.setMatnr(orderDetl.getMatnr()); |
| | | manLocDetl.setMaktx(orderDetl.getMaktx()); |
| | | manLocDetl.setMemo(orderDetl.getMemo()+"无库存"); |
| | | if (addPakOUT(manLocDetl,param.getOrderNo()).equals(R.ok())){ |
| | | continue; |
| | | }else { |
| | | return R.error("添加拣货单失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | orderService.updateSettle(order.getId(),(long)2,null); |
| | | }else { |
| | | return R.error("单据编号异常"); |
| | | } |
| | | return R.ok("拣货单添加成功"); |
| | | } |
| | | private R addPakOUT(ManLocDetl manLocDetl,String OrderNo){ |
| | | ManPakOut manPakOut=new ManPakOut(); |
| | | manPakOut.setWrkNo(OrderNo+"-"+System.currentTimeMillis()); |
| | | manPakOut.setWrkSts((long)1); |
| | | manPakOut.setAnfme(manLocDetl.getAnfme()); |
| | | manPakOut.setLocNo(manLocDetl.getLocNo()); |
| | | manPakOut.setNodeId(manLocDetl.getNodeId()); |
| | | manPakOut.setMatnr(manLocDetl.getMatnr()); |
| | | manPakOut.setMaktx(manLocDetl.getMaktx()); |
| | | manPakOut.setSpecs(manLocDetl.getSpecs()); |
| | | manPakOut.setUnit(manLocDetl.getUnit()); |
| | | manPakOut.setBarcode(manLocDetl.getBarcode()); |
| | | manPakOut.setDocNum(OrderNo); |
| | | manPakOut.setStatus(0); |
| | | manPakOut.setCreateTime(new Date()); |
| | | if (!Cools.isEmpty(manLocDetl.getBatch())){ |
| | | manPakOut.setBatch(manLocDetl.getBatch()); |
| | | manPakOut.setUpdateTime(new Date()); |
| | | }else { |
| | | manPakOut.setUpdateTime(manLocDetl.getModiTime());//用于识别货物 |
| | | } |
| | | |
| | | manPakOut.setMemo(manLocDetl.getMemo()); |
| | | if (Cools.isEmpty(manPakOutService.selectOne(new EntityWrapper<ManPakOut>().eq("doc_num",OrderNo)))){ |
| | | manPakOut.setName(manLocDetl.getMaktx()); |
| | | } |
| | | try{ |
| | | if (!manPakOutService.insert(manPakOut)){ |
| | | return R.error("添加拣货明细失败,请联系管理员"); |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("添加拣货明细失败,请联系管理员"); |
| | | } |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | @RequestMapping("/manPakOut/finish") |
| | | public R finish(@RequestBody ManPakOut manPakOut){ |
| | | Wrapper<ManLocDetl> wrapper = new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", manPakOut.getLocNo()) |
| | | .eq("matnr", manPakOut.getMatnr()); |
| | | try{ |
| | | if (Cools.isEmpty(manPakOut.getBatch())){ |
| | | List<ManLocDetl> manLocDetls = manLocDetlService.selectList(wrapper); |
| | | Double anfme=manPakOut.getAnfme(); |
| | | for (ManLocDetl manLocDetl:manLocDetls){ |
| | | if (anfme<manLocDetl.getAnfme()){ |
| | | manLocDetl.setAnfme(manLocDetl.getAnfme()-anfme); |
| | | manLocDetlService.update(manLocDetl,wrapper.eq("batch",manLocDetl.getBatch())); |
| | | anfme=0.0; |
| | | }else if (anfme>=manLocDetl.getAnfme()){ |
| | | manLocDetlService.delete(wrapper.eq("batch",manLocDetl.getBatch())); |
| | | anfme=anfme-manLocDetl.getAnfme(); |
| | | } |
| | | if (anfme==0.0){ |
| | | break; |
| | | } |
| | | } |
| | | }else { |
| | | ManLocDetl manLocDetl = manLocDetlService.selectOne(wrapper.eq("batch", manPakOut.getBatch())); |
| | | if (manPakOut.getAnfme()<manLocDetl.getAnfme()){ |
| | | manLocDetl.setAnfme(manLocDetl.getAnfme()-manPakOut.getAnfme()); |
| | | manLocDetlService.update(manLocDetl,wrapper.eq("batch",manLocDetl.getBatch())); |
| | | }else if (manPakOut.getAnfme()-manLocDetl.getAnfme()==0){ |
| | | manLocDetlService.delete(wrapper.eq("batch",manLocDetl.getBatch())); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("更新库存数量失败"); |
| | | } |
| | | |
| | | |
| | | ManPakOut out = Cools.isEmpty(manPakOut.getBatch())? manPakOutService.selectOne(new EntityWrapper<ManPakOut>() |
| | | .eq("wrk_no", manPakOut.getWrkNo()) |
| | | .eq("matnr", manPakOut.getMatnr())) |
| | | :manPakOutService.selectOne(new EntityWrapper<ManPakOut>() |
| | | .eq("wrk_no", manPakOut.getWrkNo()) |
| | | .eq("matnr", manPakOut.getMatnr()) |
| | | .eq("batch",manPakOut.getBatch())); |
| | | out.setWrkSts(manPakOut.getWrkSts()); |
| | | out.setZpallet(manPakOut.getZpallet()); |
| | | out.setAnfme(manPakOut.getAnfme()); |
| | | out.setNodeId(manPakOut.getNodeId()); |
| | | out.setLocNo(manPakOut.getLocNo()); |
| | | out.setMatnr(manPakOut.getMatnr()); |
| | | out.setMaktx(manPakOut.getMaktx()); |
| | | out.setBatch(manPakOut.getBatch()); |
| | | out.setStatus(manPakOut.getStatus()); |
| | | boolean update =Cools.isEmpty(manPakOut.getBatch())? manPakOutService.update(out, new EntityWrapper<ManPakOut>() |
| | | .eq("wrk_no", manPakOut.getWrkNo()) |
| | | .eq("matnr", manPakOut.getMatnr())) |
| | | :manPakOutService.update(out, new EntityWrapper<ManPakOut>() |
| | | .eq("wrk_no", manPakOut.getWrkNo()) |
| | | .eq("matnr", manPakOut.getMatnr()) |
| | | .eq("batch",manPakOut.getBatch())); |
| | | try { |
| | | Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no", manPakOut.getDocNum())); |
| | | List<ManPakOut> pakOuts = manPakOutService.selectList(new EntityWrapper<ManPakOut>().eq("doc_num", order.getOrderNo())); |
| | | if (Cools.isEmpty(pakOuts)){ |
| | | return R.error("查询拣货单明细失败"); |
| | | }else { |
| | | Long settle = order.getSettle(); |
| | | for (ManPakOut pakOut:pakOuts){ |
| | | if (pakOut.getStatus()==0 || pakOut.getStatus()==8){ |
| | | order.setSettle(settle); |
| | | break; |
| | | }else { |
| | | order.setSettle(4L); |
| | | } |
| | | } |
| | | } |
| | | orderService.updateSettle(order.getId(),order.getSettle(),(long)9527); |
| | | }catch (Exception e){ |
| | | return R.error("更新订单状态失败"); |
| | | } |
| | | return update? R.ok("更新成功") : R.error("更新失败"); |
| | | } |
| | | |
| | | @RequestMapping("/manPakOut/notIssued") |
| | | public R notIssued(){ |
| | | List<Order> orders = orderService.selectList(new EntityWrapper<Order>().eq("settle", 1L).or().eq("settle", 2L)); |
| | | List<Order> orders1=new ArrayList<Order>(); |
| | | try { |
| | | for (Order order:orders){ |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (docType.getPakout()==1){ |
| | | orders1.add(order); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("获取订单状态失败"); |
| | | } |
| | | return R.ok(orders1); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | ManPakOutService bean = SpringUtils.getBean(ManPakOutService.class); |
| | | ManPakOut out = bean.selectOne(null); |
| | | System.out.println("JSON.toJSONString(out) = " + JSON.toJSONString(out)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/ManPakOut/print/auth") |
| | | @ManagerAuth(memo = "订单编码打印") |
| | | public R manPakOutPrint(@RequestParam(value = "param[]") String[] param) { |
| | | if(Cools.isEmpty(param)) { |
| | | return R.parse(CodeRes.EMPTY); |
| | | } |
| | | List<ManPakOut> res = new ArrayList<>(); |
| | | for (String orderNo : param){ |
| | | res = manPakOutService.selectList(new EntityWrapper<ManPakOut>().eq("doc_num", orderNo)); |
| | | } |
| | | return R.ok().add(res); |
| | | } |
| | | @RequestMapping(value = "/ManPakOut/code/auth") |
| | | // @ManagerAuth(memo = "物料编码条形码获取(type:1(条形码);2(二维码)") |
| | | public R manPakOutCodeBarcode(@RequestParam(defaultValue = "2") Integer type |
| | | , @RequestParam String param |
| | | , HttpServletResponse response) throws Exception { |
| | | AdminInterceptor.cors(response); |
| | | if (Cools.isEmpty(param)){ |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| | | BufferedImage img; |
| | | if (type == 1) { |
| | | img = BarcodeUtils.encode(param); |
| | | } else { |
| | | img = QrCode.createImg(param); |
| | | } |
| | | if (!ImageIO.write(img, "jpg", response.getOutputStream())) { |
| | | throw new IOException("Could not write an image of format jpg"); |
| | | } |
| | | response.getOutputStream().flush(); |
| | | response.getOutputStream().close(); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.NodePakoutParam; |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.WrkDto; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.User; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @Autowired |
| | | private PackService packService; |
| | | @Autowired |
| | | private ManLocDetlService manLocDetlService; |
| | | private ManLocDetlTempService manLocDetlTempService; |
| | | @Autowired |
| | | private MatService matService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | // 组托 ---------------------------------------------------------------------------------------------------- |
| | | |
| | |
| | | combMat.setAnfme(orderDetl.getAnfme()-orderDetl.getQty()); |
| | | combMat.setMaktx(orderDetl.getMaktx()); |
| | | combMat.setSpecs(orderDetl.getSpecs()); |
| | | combMat.setCsocode(orderDetl.getColor()); |
| | | combMat.setIsoseq(orderDetl.getOrigin()); |
| | | combMat.setCsocode(orderDetl.getThreeCode()); |
| | | combMat.setIsoseq(orderDetl.getDeadTime()); |
| | | combMats.add(combMat); |
| | | } |
| | | combParam.setCombMats(combMats); |
| | |
| | | */ |
| | | @RequestMapping("/node/recommend/loc") |
| | | @ManagerAuth(memo = "库位推荐") |
| | | public R recommendNodeLoc(){ |
| | | public R recommendNodeLoc(@RequestBody HashMap<String,String> param){ |
| | | |
| | | String zpallet = param.get("zpallet"); |
| | | |
| | | return R.ok(); |
| | | return R.ok("DT-C-010202").add(waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet",zpallet))); |
| | | } |
| | | |
| | | |
| | | /* |
| | | 平库 订单上架 |
| | | */ |
| | | @RequestMapping("/node/puttway") |
| | | @ManagerAuth(memo = "订单上架") |
| | | //@ManagerAuth(memo = "订单上架") |
| | | public R putway(@RequestBody HashMap<String,String> params){ |
| | | String zpallet = params.get("zpallet"); |
| | | String locNo = params.get("locNo"); |
| | | |
| | | mobileService.nodePutway(zpallet,locNo,getUser()); |
| | | mobileService.nodePutway(zpallet,locNo,new User()); |
| | | |
| | | return R.ok("订单上架成功"); |
| | | } |
| | | |
| | | /* |
| | | 平库 订单下架 |
| | | */ |
| | | @RequestMapping("/node/pakout") |
| | | public R nodePakout(@RequestBody NodePakoutParam param){ |
| | | |
| | | |
| | | return R.ok(); |
| | | mobileService.nodePakout(param,new User()); |
| | | |
| | | return R.ok("订单下架成功"); |
| | | } |
| | | |
| | | /* |
| | | 平库临时上架 |
| | | */ |
| | | @RequestMapping("/node/putway1") |
| | | public R putway1(@RequestBody CombParam combParam){ |
| | | Date now = new Date(); |
| | | List<CombParam.CombMat> combMats = combParam.getCombMats(); |
| | | combMats.forEach(combMat -> { |
| | | if(Cools.isEmpty(combMat.getBatch())){ |
| | | combMat.setBatch("-1"); |
| | | } |
| | | ManLocDetlTemp manLocDetlTemp = manLocDetlTempService.selectOne(new EntityWrapper<ManLocDetlTemp>() |
| | | .eq("matnr", combMat.getMatnr()) |
| | | .eq("batch",combMat.getBatch())); |
| | | if(Cools.isEmpty(manLocDetlTemp)){ |
| | | manLocDetlTemp = new ManLocDetlTemp(); |
| | | Mat mat = matService.selectByMatnr(combMat.getMatnr()); |
| | | BeanUtils.copyProperties(mat,manLocDetlTemp); |
| | | manLocDetlTemp.setLocNo("A-010101"); |
| | | manLocDetlTemp.setAnfme(combMat.getAnfme()); |
| | | manLocDetlTemp.setBatch(combMat.getBatch()); |
| | | manLocDetlTemp.setCreateTime(now); |
| | | manLocDetlTemp.setModiTime(now); |
| | | manLocDetlTempService.insert(manLocDetlTemp); |
| | | }else { |
| | | manLocDetlTemp.setAnfme(manLocDetlTemp.getAnfme()+combMat.getAnfme()); |
| | | manLocDetlTempService.update(manLocDetlTemp,new EntityWrapper<ManLocDetlTemp>() |
| | | .eq("matnr", combMat.getMatnr()) |
| | | .eq("batch",combMat.getBatch())); |
| | | } |
| | | |
| | | }); |
| | | |
| | | return R.ok("上架成功"); |
| | | } |
| | | |
| | | |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private AgvBasDevpService agvBasDevpService; |
| | | @Autowired |
| | | private AgvWorkService agvWorkService; |
| | | @Autowired |
| | | private ManLocDetlService manLocDetlService; |
| | | @Autowired |
| | | private ManPakOutService manPakOutService; |
| | | |
| | | @Autowired |
| | | private AgvLocDetlService agvLocDetlService; |
| | |
| | | double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty()).orElse(0.0D); |
| | | if (issued <= 0.0D) { continue; } |
| | | |
| | | //从平库寻找 |
| | | issued = manLocDetlService.queryStockAndSetLocDto(orderDetl.getMatnr(),orderDetl.getBatch(),orderDetl.getOrderNo(),locDtoList,issued,orderDetl.getThreeCode(),orderDetl.getDeadTime()); |
| | | |
| | | //先找AGV的库存,如果返回的issued大于0,则去四项库找 |
| | | issued = agvLocDetlService.queryStockAndSetLocDto(orderDetl.getMatnr(),orderDetl.getBatch(),orderDetl.getOrderNo(),locDtoList,issued,orderDetl.getThreeCode(),orderDetl.getDeadTime()); |
| | | |
| | |
| | | } |
| | | return R.ok().add(locDtoList); |
| | | |
| | | /* |
| | | if (Cools.isEmpty(ids)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | List<OrderDetl> orderDetls = orderDetlService.selectBatchIds(ids); |
| | | List<LocDto> locDtos = new ArrayList<>(); |
| | | |
| | | Set<String> exist = new HashSet<>(); |
| | | |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty()).orElse(0.0D); |
| | | if (issued <= 0.0D) { continue; } |
| | | List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist); |
| | | for (LocDetl locDetl : locDetls) { |
| | | if (issued > 0) { |
| | | // LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | // issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | locDetl.getAnfme()); |
| | | // int ioType = (issued >= locDetl.getAnfme() && locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("loc_no", locDto.getLocNo())) == 1) ? 101 : 103; |
| | | int ioType = 101; |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), ioType); |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | exist.add(locDetl.getLocNo()); |
| | | // 剩余待出数量递减 |
| | | issued = issued - locDetl.getAnfme(); |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued); |
| | | locDto.setLack(Boolean.TRUE); |
| | | locDtos.add(locDto); |
| | | } |
| | | } |
| | | return R.ok().add(locDtos); */ |
| | | } |
| | | |
| | | @PostMapping("/out/pakout/auth") |
| | |
| | | if (locDto.isLack()) { continue; } |
| | | //AGV库 |
| | | if(!Cools.isEmpty(locDto.getAgvStaNos())){ |
| | | //平库 |
| | | if("无需站点".equals(locDto.getAgvStaNo())){ |
| | | generateManPakout(locDto); |
| | | } |
| | | generateTaskDtoForAgv(locDto,agvTaskDtos); |
| | | |
| | | //四项库 |
| | |
| | | } |
| | | |
| | | /* |
| | | 生成平库拣货单 |
| | | */ |
| | | private void generateManPakout(LocDto locDto){ |
| | | ManLocDetl manLocDetl = manLocDetlService.selectItem(locDto.getLocNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (!Cools.isEmpty(manLocDetl) && !(locDto.getAnfme()>manLocDetl.getAnfme())) { |
| | | manLocDetl.setStatus(0); |
| | | manLocDetlService.update(manLocDetl, new EntityWrapper<ManLocDetl>().eq("loc_no", manLocDetl.getLocNo()).eq("matnr",manLocDetl.getMatnr())); |
| | | if (addPakOUT(locDto).equals(R.ok())) { |
| | | Order order = orderService.selectByNo(locDto.getOrderNo()); |
| | | if (Cools.isEmpty(order)){ |
| | | throw new CoolException("查询订单失败,请联系管理员"+locDto.getOrderNo()); |
| | | } |
| | | if (order.getSettle()==1){ |
| | | if (!orderService.updateSettle(order.getId(),2L,null)){ |
| | | throw new CoolException("修改订单状态失败,请联系管理员"+locDto.getOrderNo()); |
| | | } |
| | | } |
| | | OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("order_no", locDto.getOrderNo()).eq("matnr", locDto.getMatnr())); |
| | | if (Cools.isEmpty(orderDetl)){ |
| | | throw new CoolException("查询订单明细失败,请联系管理员"+locDto.getOrderNo()+locDto.getMatnr()); |
| | | } |
| | | orderDetl.setQty(orderDetl.getQty() + locDto.getAnfme()); |
| | | if (!orderDetlService.update(orderDetl,new EntityWrapper<OrderDetl>().eq("order_no", locDto.getOrderNo()).eq("matnr", locDto.getMatnr()))){ |
| | | throw new CoolException("修改订单明细失败,请联系管理员"+locDto.getOrderNo()+locDto.getMatnr()); |
| | | } |
| | | } |
| | | }else { |
| | | throw new CoolException("库存不足"); |
| | | } |
| | | } |
| | | |
| | | private R addPakOUT(LocDto locDto){ |
| | | ManPakOut manPakOut=new ManPakOut(); |
| | | manPakOut.setWrkNo(locDto.getOrderNo()+"-"+System.currentTimeMillis()); |
| | | manPakOut.setWrkSts((long)1); |
| | | manPakOut.setAnfme(locDto.getAnfme()); |
| | | manPakOut.setLocNo(locDto.getLocNo()); |
| | | manPakOut.setMatnr(locDto.getMatnr()); |
| | | manPakOut.setMaktx(locDto.getMaktx()); |
| | | manPakOut.setDocNum(locDto.getOrderNo()); |
| | | manPakOut.setCount(0.0); |
| | | manPakOut.setStatus(0); |
| | | manPakOut.setCreateTime(new Date()); |
| | | manPakOut.setBatch(locDto.getBatch()); |
| | | manPakOut.setUpdateTime(new Date()); |
| | | manPakOut.setUuid(UUID.randomUUID().toString()); |
| | | |
| | | manPakOut.setContainerCode(locDto.getContainerCode()); |
| | | manPakOut.setCsocode(locDto.getCsocode()); |
| | | manPakOut.setIsoseq(locDto.getIsoseq()); |
| | | |
| | | ManPakOut manPakOutExist = manPakOutService.selectOne(new EntityWrapper<ManPakOut>().eq("doc_num", locDto.getOrderNo())); |
| | | if (Cools.isEmpty(manPakOutExist)){ |
| | | manPakOut.setName(locDto.getMaktx()); |
| | | }else{ |
| | | manPakOut.setUuid(manPakOutExist.getUuid()); |
| | | } |
| | | try{ |
| | | if (!manPakOutService.insert(manPakOut)){ |
| | | return R.error("添加拣货明细失败,请联系管理员"); |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("添加拣货明细失败,请联系管理员"); |
| | | } |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | /* |
| | | 订单预校验 ===>> 1.订单状态; 2.订单带出数量 |
| | | */ |
| | | private List<OrderDto> orderPreVerification(List<LocDto> locDtos){ |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.Host; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.HostService; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_loc_detl_temp") |
| | | public class ManLocDetlTemp implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 所属项目 |
| | | */ |
| | | @ApiModelProperty(value= "所属项目") |
| | | @TableField("host_id") |
| | | private Long hostId; |
| | | |
| | | /** |
| | | * 货位编号 |
| | | */ |
| | | @ApiModelProperty(value= "货位编号") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 所属货位 |
| | | */ |
| | | @ApiModelProperty(value= "所属货位") |
| | | @TableField("node_id") |
| | | private Long nodeId; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘码") |
| | | private String zpallet; |
| | | |
| | | /** |
| | | * 库存余量 |
| | | */ |
| | | @ApiModelProperty(value= "库存余量") |
| | | @ExcelProperty(value = "库存总量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | @TableId(value = "matnr", type = IdType.INPUT) |
| | | @ExcelProperty(value = "商品编号") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @ApiModelProperty(value= "商品名称") |
| | | @ExcelProperty(value = "商品名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value= "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | @ExcelProperty(value = "规格") |
| | | private String specs; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | | @TableId(value = "batch", type = IdType.INPUT) |
| | | private String batch; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | @ExcelProperty(value = "单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * SKC |
| | | */ |
| | | @ApiModelProperty(value= "SKC") |
| | | @ExcelProperty(value = "SKC") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 单据类型 |
| | | */ |
| | | @ApiModelProperty(value= "单据类型") |
| | | @TableField("doc_id") |
| | | private Long docId; |
| | | |
| | | /** |
| | | * 单据编号 |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("doc_num") |
| | | private String docNum; |
| | | |
| | | /** |
| | | * 客户名称 |
| | | */ |
| | | @ApiModelProperty(value= "客户名称") |
| | | @TableField("cust_name") |
| | | private String custName; |
| | | |
| | | /** |
| | | * 品项数 |
| | | */ |
| | | @ApiModelProperty(value= "品项数") |
| | | @TableField("item_num") |
| | | private Integer itemNum; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Integer count; |
| | | |
| | | |
| | | /** |
| | | * 单价 |
| | | */ |
| | | @ApiModelProperty(value= "单价") |
| | | private Double price; |
| | | |
| | | /** |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | private Double weight; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 拥有者 |
| | | */ |
| | | @ApiModelProperty(value= "拥有者 1: 杰克 ") |
| | | private Integer owner; |
| | | |
| | | /** |
| | | * 货物形态:0:代采、1:仓储 |
| | | */ |
| | | @ApiModelProperty(value= "货物形态:0:代采、1:仓储") |
| | | private Integer payment; |
| | | |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("real_anfme") |
| | | private Date realAnfme; |
| | | |
| | | @ApiModelProperty(value= "订单号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | @TableField("container_code") |
| | | private String containerCode; |
| | | |
| | | private String csocode; |
| | | |
| | | private String isoseq; |
| | | |
| | | // LocDetl locDetl = new LocDetl( |
| | | // null, // 货位编号[非空] |
| | | // null, // 所属货位 |
| | | // null, // 托盘码 |
| | | // null, // 库存余量[非空] |
| | | // null, // 商品编号[非空] |
| | | // null, // 商品名称 |
| | | // null, // 名称 |
| | | // null, // 规格 |
| | | // null, // 型号 |
| | | // null, // 批号 |
| | | // null, // 单位 |
| | | // null, // SKC |
| | | // null, // 单据类型 |
| | | // null, // 单据编号 |
| | | // null, // 客户名称 |
| | | // null, // 品项数 |
| | | // null, // 数量 |
| | | // null, // 重量 |
| | | // null, // 状态 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | // public String getOwner$(){ |
| | | // LocOwnerService service = SpringUtils.getBean(LocOwnerService.class); |
| | | // LocOwner locOwner = service.selectById(this.owner); |
| | | // if (!Cools.isEmpty(locOwner)){ |
| | | // return String.valueOf(locOwner.getOwner()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | |
| | | public String getPayment$(){ |
| | | if (null == this.payment){ return null; } |
| | | switch (this.payment){ |
| | | case 1: |
| | | return "仓储"; |
| | | case 0: |
| | | return "代采"; |
| | | default: |
| | | return String.valueOf(this.payment); |
| | | } |
| | | } |
| | | |
| | | public String getHostId$(){ |
| | | HostService service = SpringUtils.getBean(HostService.class); |
| | | Host host = service.selectById(this.hostId); |
| | | if (!Cools.isEmpty(host)){ |
| | | return String.valueOf(host.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public Long getNodeId() { |
| | | return nodeId; |
| | | } |
| | | |
| | | // public String getNodeId$(){ |
| | | // NodeService service = SpringUtils.getBean(NodeService.class); |
| | | // Node node = service.selectById(this.nodeId); |
| | | // if (!Cools.isEmpty(node)){ |
| | | // return String.valueOf(node.getName()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_pakout") |
| | | public class ManPakOut { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @TableId(value = "wrk_no", type = IdType.INPUT) |
| | | @TableField("wrk_no") |
| | | private String wrkNo; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 托盘号 |
| | | */ |
| | | @ApiModelProperty(value= "托盘号") |
| | | private String zpallet; |
| | | |
| | | /** |
| | | * 出库数量 |
| | | */ |
| | | @ApiModelProperty(value= "出库数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 关联货位 |
| | | */ |
| | | @ApiModelProperty(value= "关联货位") |
| | | @TableField("node_id") |
| | | private Long nodeId; |
| | | |
| | | /** |
| | | * 货位 |
| | | */ |
| | | @ApiModelProperty(value= "货位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 商品编码 |
| | | */ |
| | | @ApiModelProperty(value= "商品编码") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @ApiModelProperty(value= "商品名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value= "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | private String specs; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 货物条码 |
| | | */ |
| | | @ApiModelProperty(value= "货物条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 单据类型 |
| | | */ |
| | | @ApiModelProperty(value= "单据类型") |
| | | @TableField("doc_id") |
| | | private Long docId; |
| | | |
| | | /** |
| | | * 单据编号 |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("doc_num") |
| | | private String docNum; |
| | | |
| | | /** |
| | | * 客户名称 |
| | | */ |
| | | @ApiModelProperty(value= "客户名称") |
| | | @TableField("cust_name") |
| | | private String custName; |
| | | |
| | | /** |
| | | * 品项数 |
| | | */ |
| | | @ApiModelProperty(value= "品项数") |
| | | @TableField("item_num") |
| | | private Integer itemNum; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double count; |
| | | |
| | | /** |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | private Double weight; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 拥有者 |
| | | */ |
| | | @ApiModelProperty(value= "拥有者 1: 杰克 ") |
| | | private Integer owner; |
| | | |
| | | /** |
| | | * 货物形态:0:代采、1:仓储 |
| | | */ |
| | | @ApiModelProperty(value= "货物形态:0:代采、1:仓储") |
| | | private Integer payment; |
| | | |
| | | /** |
| | | * uuid时间戳 |
| | | */ |
| | | @ApiModelProperty(value= "uuid") |
| | | @TableId(value = "uuid", type = IdType.ID_WORKER_STR) |
| | | @TableField("uuid") |
| | | private String uuid; |
| | | |
| | | //料箱码 |
| | | private String containerCode; |
| | | //销售订单号 |
| | | private String csocode; |
| | | //销售订单行号 |
| | | private String isoseq; |
| | | |
| | | // public String getOwner$(){ |
| | | // LocOwnerService service = SpringUtils.getBean(LocOwnerService.class); |
| | | // LocOwner locOwner = service.selectById(this.owner); |
| | | // if (!Cools.isEmpty(locOwner)){ |
| | | // return String.valueOf(locOwner.getOwner()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | |
| | | public String getPayment$(){ |
| | | if (null == this.payment){ return null; } |
| | | switch (this.payment){ |
| | | case 1: |
| | | return "已出库"; |
| | | case 0: |
| | | return "未出库"; |
| | | case 8: |
| | | return "未完全出库"; |
| | | case 9: |
| | | return "全部完成出库"; |
| | | default: |
| | | return String.valueOf(this.payment); |
| | | } |
| | | // switch (this.payment){ |
| | | // case 1: |
| | | // return "仓储"; |
| | | // case 0: |
| | | // return "代采"; |
| | | // default: |
| | | // return String.valueOf(this.payment); |
| | | // } |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "已出库"; |
| | | case 0: |
| | | return "未出库"; |
| | | case 8: |
| | | return "未完全出库"; |
| | | case 9: |
| | | return "全部完成出库"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class NodePakoutParam { |
| | | private String orderNo; |
| | | private String containerCode; |
| | | private Double anfme; |
| | | private String locNo; |
| | | private String matnr; |
| | | //销售订单号 |
| | | private String csocode; |
| | | //销售订单行号 |
| | | private String isoseq; |
| | | private String wrkNo; |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.ManLocDetlTemp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ManLocDetlTempMapper extends BaseMapper<ManLocDetlTemp> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.ManPakOut; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ManPakOutMapper extends BaseMapper<ManPakOut> { |
| | | |
| | | @Update("UPDATE man_pakout SET payment = ${status} WHERE doc_num = '${orderNo}' AND name IS NOT NULL") |
| | | void updateAllStatus(@Param("orderNo")String orderNo, @Param("status")int status); |
| | | |
| | | @Select("SELECT * FROM man_pakout WHERE doc_num = '${orderNo}' AND name IS NOT NULL") |
| | | ManPakOut selectByOrderWithName(@Param("orderNo")String orderNo); |
| | | |
| | | } |
| | |
| | | |
| | | List<AgvLocDetl> searchByLike(String orderNo, String matnr, String maktx, String specs, String locNo); |
| | | |
| | | /** |
| | | * 修改库存明细数量,如果数量为0,则删除记录 |
| | | */ |
| | | boolean updateAnfme(Double anfme, String locNo, String matnr, String batch); |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.AgvBasDevp; |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | | import com.zy.asrs.entity.param.LocDetlAdjustParam; |
| | | import com.zy.asrs.entity.param.StockOutParam; |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.model.TaskDto; |
| | |
| | | |
| | | void emptyPlateOut(EmptyPlateOutParam param, Long userId); |
| | | |
| | | /** |
| | | * 库存明细调整 |
| | | */ |
| | | void adjustLocDetl(LocDetlAdjustParam param, Long userId); |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.ManLocDetl; |
| | | import com.zy.asrs.entity.param.LocDetlAdjustParam; |
| | | import com.zy.asrs.entity.result.StockVo; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.system.entity.User; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | int increase(Double anfme,String locNo, String matnr,String batch,Double weight); |
| | | |
| | | double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.ManLocDetlTemp; |
| | | |
| | | public interface ManLocDetlTempService extends IService<ManLocDetlTemp> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.ManPakOut; |
| | | |
| | | public interface ManPakOutService extends IService<ManPakOut> { |
| | | void updateAllStatus(String orderNo,int status); |
| | | |
| | | ManPakOut selectByOrderWithName(String orderNo); |
| | | |
| | | } |
| | |
| | | |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.NodePakoutParam; |
| | | import com.zy.system.entity.User; |
| | | |
| | | public interface MobileService { |
| | |
| | | void packComb(CombParam param, Long userId); |
| | | |
| | | void nodePutway(String zpallet, String locNo, User user); |
| | | |
| | | void nodePakout(NodePakoutParam param, User user); |
| | | } |
| | |
| | | wapperSetCondition(wrapper,"three_code",csocode); |
| | | wapperSetCondition(wrapper,"dead_time",isoseq); |
| | | |
| | | // if(Cools.isEmpty(batch)){ |
| | | // wrapper.isNull("batch"); |
| | | // }else { |
| | | // wrapper.eq("batch",batch); |
| | | // } |
| | | // if(!Cools.isEmpty(csocode)){ |
| | | // wrapper.eq("three_code",csocode); |
| | | // } |
| | | // if(Cools.isEmpty(isoseq)){ |
| | | // wrapper.eq("dead_time",isoseq); |
| | | // } |
| | | List<AgvLocDetl> agvLocDetls = this.selectList(wrapper); |
| | | |
| | | for (AgvLocDetl agvLocDetl: agvLocDetls) { |
| | |
| | | //int ioType = anfme > issued ? 101 : 103; |
| | | anfme = anfme > issued ? issued : anfme; |
| | | LocDto locDto = new LocDto(agvLocDetl.getLocNo(), agvLocDetl.getMatnr(), agvLocDetl.getMaktx(), agvLocDetl.getBatch(), orderNo, anfme); |
| | | |
| | | locDto.setCsocode(csocode); |
| | | locDto.setIsoseq(isoseq); |
| | | locDto.setContainerCode(agvLocDetl.getZpallet()); |
| | | //当前库位所处楼层 |
| | | int floor = Integer.parseInt(agvLocDetl.getLocNo().split("@")[1]); |
| | | locDto.setAgvStaNos(queryAgvStaNosByFloor(floor)); |
| | |
| | | return this.selectList(wrapper); |
| | | } |
| | | |
| | | public boolean updateAnfme(Double anfme, String locNo, String matnr, String batch) { |
| | | if (anfme <= 0) { |
| | | return this.delete(new EntityWrapper<AgvLocDetl>().eq("matnr", matnr).eq("loc_no", locNo)); |
| | | } else { |
| | | AgvLocDetl agvLocDetl = this.selectOne(new EntityWrapper<AgvLocDetl>().eq("loc_no", locNo).eq("matnr", matnr)); |
| | | agvLocDetl.setAnfme(anfme); |
| | | return this.update(agvLocDetl,new EntityWrapper<AgvLocDetl>().eq("loc_no", locNo).eq("matnr", matnr)); |
| | | //return baseMapper.updateAnfme(anfme, locNo, matnr, batch) > 0; |
| | | } |
| | | } |
| | | |
| | | private List<String> queryAgvStaNosByFloor(int floor){ |
| | | List<String> agvStaNos = new ArrayList<>(); |
| | | if(floor == 1){ |
| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | | import com.zy.asrs.entity.param.LocDetlAdjustParam; |
| | | import com.zy.asrs.entity.param.StockOutParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.LocDto; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/6/11 |
| | |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private AdjDetlService adjDetlService; |
| | | |
| | | |
| | | /* |
| | |
| | | }); |
| | | } |
| | | |
| | | @Transactional |
| | | public void adjustLocDetl(LocDetlAdjustParam param, Long userId) { |
| | | param.integrate(); |
| | | AgvLocMast locMast = agvLocMastService.selectById(param.getLocNo()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("库位不存在"); |
| | | } |
| | | if (!(locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O"))) { |
| | | throw new CoolException("当前库位不可调整!库位状态:" + locMast.getLocSts$()); |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | List<AgvLocDetl> locDetls = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("loc_no", param.getLocNo())); |
| | | |
| | | List<LocDetlAdjustParam.LocDetlAdjust> list = param.getList(); |
| | | |
| | | // 修改数量 |
| | | Iterator<AgvLocDetl> iterator = locDetls.iterator(); |
| | | while (iterator.hasNext()) { |
| | | AgvLocDetl locDetl = iterator.next(); |
| | | |
| | | Iterator<LocDetlAdjustParam.LocDetlAdjust> iterator1 = list.iterator(); |
| | | while (iterator1.hasNext()) { |
| | | LocDetlAdjustParam.LocDetlAdjust adjust = iterator1.next(); |
| | | if (adjust.getCount() == 0) { continue; } |
| | | if (locDetl.getMatnr().equals(adjust.getMatnr()) && Cools.eq(locDetl.getBatch(), adjust.getBatch())) { |
| | | if (!locDetl.getAnfme().equals(adjust.getCount())) { |
| | | // todo 盘点记录 |
| | | // 修改库存 |
| | | if (!agvLocDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch())) { |
| | | throw new CoolException(locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码修改数量失败"); |
| | | } |
| | | // 保存调整记录 |
| | | AdjDetl adjDetl = new AdjDetl(); |
| | | adjDetl.setLocNo(locDetl.getLocNo()); |
| | | adjDetl.setMatnr(locDetl.getMatnr()); |
| | | adjDetl.setBatch(locDetl.getBatch()); |
| | | adjDetl.setOriQty(locDetl.getAnfme()); |
| | | adjDetl.setAdjQty(adjust.getCount()); |
| | | adjDetl.setModiTime(now); |
| | | adjDetl.setModiUser(userId); |
| | | adjDetl.setAppeTime(now); |
| | | adjDetl.setAppeUser(userId); |
| | | |
| | | UUID uuid = UUID.randomUUID(); |
| | | adjDetl.setOrderNo(uuid.toString()); |
| | | adjDetl.setCsocode(locDetl.getThreeCode()); |
| | | adjDetl.setIsoseq(locDetl.getDeadTime()); |
| | | |
| | | adjDetlService.save(adjDetl, userId); |
| | | } |
| | | iterator.remove(); |
| | | iterator1.remove(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 删除库存 |
| | | for (AgvLocDetl locDetl : locDetls) { |
| | | // todo 盘点记录 |
| | | if (!agvLocDetlService.updateAnfme(-1.0D, locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch())) { |
| | | throw new CoolException("删除" + locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码库存明细失败"); |
| | | } |
| | | // 保存调整记录 |
| | | AdjDetl adjDetl = new AdjDetl(); |
| | | adjDetl.setLocNo(locDetl.getLocNo()); |
| | | adjDetl.setMatnr(locDetl.getMatnr()); |
| | | adjDetl.setBatch(locDetl.getBatch()); |
| | | adjDetl.setOriQty(locDetl.getAnfme()); |
| | | adjDetl.setAdjQty(0.0D); |
| | | adjDetl.setModiTime(now); |
| | | adjDetl.setModiUser(userId); |
| | | adjDetl.setAppeTime(now); |
| | | adjDetl.setAppeUser(userId); |
| | | |
| | | adjDetlService.save(adjDetl, userId); |
| | | } |
| | | |
| | | // 添加库存 |
| | | for (LocDetlAdjustParam.LocDetlAdjust adjust : list) { |
| | | if (adjust.getCount() == 0.0D) { continue; } |
| | | Mat mat = matService.selectByMatnr(adjust.getMatnr()); |
| | | AgvLocDetl locDetl = new AgvLocDetl(); |
| | | locDetl.sync(mat); |
| | | locDetl.setBatch(adjust.getBatch()); |
| | | locDetl.setLocNo(locMast.getLocNo()); |
| | | locDetl.setAnfme(adjust.getCount()); // 数量 |
| | | locDetl.setModiUser(userId); // 操作人员信息 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeUser(userId); |
| | | locDetl.setAppeTime(now); |
| | | locDetl.setThreeCode(adjust.getThreeCode()); |
| | | locDetl.setDeadTime(adjust.getDeadTime()); |
| | | if (!agvLocDetlService.insert(locDetl)) { |
| | | throw new CoolException("添加" + locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码库存明细失败"); |
| | | } |
| | | // 保存调整记录 |
| | | AdjDetl adjDetl = new AdjDetl(); |
| | | adjDetl.setLocNo(locMast.getLocNo()); |
| | | adjDetl.setMatnr(adjust.getMatnr()); |
| | | adjDetl.setBatch(adjust.getBatch()); |
| | | adjDetl.setOriQty(0.0D); |
| | | adjDetl.setAdjQty(adjust.getCount()); |
| | | adjDetl.setModiTime(now); |
| | | adjDetl.setModiUser(userId); |
| | | adjDetl.setAppeTime(now); |
| | | adjDetl.setAppeUser(userId); |
| | | |
| | | UUID uuid = UUID.randomUUID(); |
| | | adjDetl.setOrderNo(uuid.toString()); |
| | | adjDetl.setCsocode(locDetl.getThreeCode()); |
| | | adjDetl.setIsoseq(locDetl.getDeadTime()); |
| | | |
| | | adjDetlService.save(adjDetl, userId); |
| | | } |
| | | // 修改库位状态 |
| | | int count = agvLocDetlService.selectCount(new EntityWrapper<AgvLocDetl>().eq("loc_no", locMast.getLocNo())); |
| | | if (locMast.getLocSts().equals("F")) { |
| | | if (count == 0) { |
| | | locMast.setLocSts("D"); |
| | | } |
| | | } |
| | | if (locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O")) { |
| | | if (count > 0) { |
| | | locMast.setLocSts("F"); |
| | | } |
| | | } |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(new Date()); |
| | | if (!agvLocMastService.updateById(locMast)) { |
| | | throw new CoolException("更新库位状态失败"); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | 更新目标库位信息 |
| | | */ |
| | |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderNo, anfme); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), ioType); |
| | | locDto.setStaNos(staNos); |
| | | locDto.setCsocode(csocode); |
| | | locDto.setIsoseq(isoseq); |
| | | locDto.setContainerCode(locDetl.getSuppCode()); |
| | | locDtoList.add(locDto); |
| | | // 剩余待出数量递减 |
| | | issued = issued - locDetl.getAnfme(); |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.ManLocDetlTemp; |
| | | import com.zy.asrs.mapper.ManLocDetlTempMapper; |
| | | import com.zy.asrs.service.ManLocDetlTempService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("manLocDetlTempService") |
| | | public class ManLocDetTemplServiceImpl extends ServiceImpl<ManLocDetlTempMapper, ManLocDetlTemp> implements ManLocDetlTempService { |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.ManLocDetl; |
| | | import com.zy.asrs.entity.Mat; |
| | |
| | | import com.zy.asrs.service.NodeService; |
| | | import com.zy.asrs.service.WaitPakinService; |
| | | import com.zy.asrs.utils.SaasUtils; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.system.entity.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.*; |
| | | |
| | | @Service("manLocDetlService") |
| | | public class ManLocDetlServiceImpl extends ServiceImpl<ManLocDetlMapper, ManLocDetl> implements ManLocDetlService { |
| | |
| | | return baseMapper.increase(anfme,locNo,matnr,batch,weight); |
| | | } |
| | | |
| | | public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq) { |
| | | Wrapper<ManLocDetl> wrapper = new EntityWrapper<ManLocDetl>().eq("matnr", matnr).orderBy("modi_time"); |
| | | wrapper.eq("status",1); |
| | | wapperSetCondition(wrapper,"batch",batch); |
| | | wapperSetCondition(wrapper,"csocode",csocode); |
| | | wapperSetCondition(wrapper,"isoseq",isoseq); |
| | | |
| | | List<ManLocDetl> manLocDetls = this.selectList(wrapper); |
| | | for (ManLocDetl manLocDetl : manLocDetls){ |
| | | if(issued > 0) { |
| | | double anfme = manLocDetl.getAnfme(); |
| | | anfme = anfme > issued ? issued : anfme; |
| | | LocDto locDto = new LocDto(manLocDetl.getLocNo(), manLocDetl.getMatnr(), manLocDetl.getMaktx(), manLocDetl.getBatch(), orderNo, anfme); |
| | | locDto.setCsocode(csocode); |
| | | locDto.setIsoseq(isoseq); |
| | | locDto.setContainerCode(manLocDetl.getContainerCode()); |
| | | List<String> stationList = new ArrayList<>(); |
| | | stationList.add("无需站点"); |
| | | locDto.setAgvStaNos(stationList); |
| | | |
| | | locDtoList.add(locDto); |
| | | issued -= anfme; |
| | | } |
| | | } |
| | | |
| | | return issued; |
| | | } |
| | | |
| | | private void wapperSetCondition(Wrapper wrapper,String column, String condition){ |
| | | if(Cools.isEmpty(condition)){ |
| | | wrapper.isNull(column); |
| | | }else { |
| | | wrapper.eq(column,condition); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.ManPakOut; |
| | | import com.zy.asrs.mapper.ManPakOutMapper; |
| | | import com.zy.asrs.service.ManPakOutService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("manPakOutService") |
| | | public class ManPakOutServiceImpl extends ServiceImpl<ManPakOutMapper, ManPakOut> implements ManPakOutService { |
| | | |
| | | |
| | | public void updateAllStatus(String orderNo, int status) { |
| | | this.baseMapper.updateAllStatus(orderNo,status); |
| | | } |
| | | |
| | | @Override |
| | | public ManPakOut selectByOrderWithName(String orderNo) { |
| | | return this.baseMapper.selectByOrderWithName(orderNo); |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.*; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.NodePakoutParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.asrs.utils.SaasUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.DetlDto; |
| | |
| | | private ManLocDetlService manLocDetlService; |
| | | @Autowired |
| | | private WaitPakinLogService waitPakinLogService; |
| | | @Autowired |
| | | private NodeService nodeService; |
| | | @Autowired |
| | | private ManPakOutService manPakOutService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | |
| | | //增加平库库存 |
| | | List<WaitPakin> waitPakinList = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", zpallet)); |
| | | waitPakinList.forEach(waitPakin -> { |
| | | |
| | | if(Cools.isEmpty(waitPakinList)){ |
| | | throw new CoolException("该托盘码未组托"); |
| | | } |
| | | |
| | | waitPakinList.forEach(waitPakin -> { |
| | | //料想码 |
| | | String containerCode = waitPakin.getSuppCode(); |
| | | //如果当前料想码已存在,则修改该料想的物料数量 |
| | | ManLocDetl manLocDetl = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>().eq("container_code", containerCode)); |
| | | if(Cools.isEmpty(manLocDetl)){ |
| | | saveManlocDetl(manLocDetl,waitPakin,now,locNo); |
| | | saveManlocDetl(waitPakin,now,locNo); |
| | | }else{ |
| | | if(Cools.eq(manLocDetl.getMatnr(),waitPakin.getMatnr()) |
| | | && Cools.eq(manLocDetl.getCsocode(),waitPakin.getThreeCode()) |
| | |
| | | .eq("loc_no",manLocDetl.getLocNo()) |
| | | .eq("container_code",manLocDetl.getContainerCode())); |
| | | }else{ |
| | | saveManlocDetl(manLocDetl,waitPakin,now,locNo); |
| | | saveManlocDetl(waitPakin,now,locNo); |
| | | } |
| | | } |
| | | //生成平库入出库日志 |
| | |
| | | //删除入库通知档 |
| | | waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet", zpallet)); |
| | | |
| | | orderService.checkComplete(waitPakinList.get(0).getOrderNo()); |
| | | |
| | | |
| | | } |
| | | |
| | | private void saveManlocDetl(ManLocDetl manLocDetl, WaitPakin waitPakin, Date now, String locNo){ |
| | | manLocDetl = new ManLocDetl(); |
| | | @Transactional |
| | | public void nodePakout(NodePakoutParam param, User user) { |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("name", param.getLocNo())); |
| | | Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no", param.getOrderNo())); |
| | | if (Cools.isEmpty(node, order)) { |
| | | throw new CoolException("参数为空"); |
| | | } |
| | | //查询当前物料的订单详情 |
| | | Wrapper<OrderDetl> orderDetlWrapper = new EntityWrapper<OrderDetl>().eq("order_no", param.getOrderNo()).eq(false, "status", 1); |
| | | Utils.wapperSetCondition(orderDetlWrapper,"three_code",param.getCsocode()); |
| | | Utils.wapperSetCondition(orderDetlWrapper,"dead_time",param.getIsoseq()); |
| | | Utils.wapperSetCondition(orderDetlWrapper,"matnr",param.getMatnr()); |
| | | |
| | | //Utils.confirmOnlyMat(orderDetlWrapper,param.getMatnr(),param.getCsocode(),param.getIsoseq()); |
| | | OrderDetl orderDetl = orderDetlService.selectOne(orderDetlWrapper); |
| | | //查询当前拣货单信息 |
| | | Wrapper<ManPakOut> manPakOutWrapper = new EntityWrapper<ManPakOut>().eq("wrk_no", param.getWrkNo()); |
| | | ManPakOut manPakOut = manPakOutService.selectOne(manPakOutWrapper); |
| | | if(Cools.isEmpty(manPakOut) || manPakOut.getStatus() == 1){ |
| | | throw new CoolException("当前拣货码已经完成拣货"); |
| | | } |
| | | //查询库存信息 |
| | | Wrapper<ManLocDetl> manLocDetlWrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", param.getLocNo()); |
| | | Utils.confirmOnlyMat(manLocDetlWrapper,param.getMatnr(),param.getCsocode(),param.getIsoseq()); |
| | | ManLocDetl manLocDetl = manLocDetlService.selectOne(manLocDetlWrapper); |
| | | |
| | | //根据实际出库数量扣减库存 |
| | | if(Double.doubleToLongBits(param.getAnfme()) != Double.doubleToLongBits(manPakOut.getAnfme())){ |
| | | if(param.getAnfme() > manLocDetl.getAnfme() || (param.getAnfme() - manPakOut.getAnfme()) > (orderDetl.getAnfme() - orderDetl.getQty())){ |
| | | throw new CoolException("出库数量不得大于订单数量或者库存数量"); |
| | | } |
| | | //根据实际出库数量回写拣货单 |
| | | manPakOut.setCount(param.getAnfme()); |
| | | if(manPakOut.getCount() < manPakOut.getAnfme()){ |
| | | manPakOut.setStatus(8); |
| | | } |
| | | //根据实际出库数量回写订单详情 |
| | | orderDetl.setQty(orderDetl.getQty() - (param.getAnfme()-manPakOut.getAnfme())); |
| | | orderDetlService.update(orderDetl,orderDetlWrapper); |
| | | |
| | | }else { |
| | | manPakOut.setCount(param.getAnfme()); |
| | | manPakOut.setStatus(1); |
| | | } |
| | | |
| | | manPakOutService.update(manPakOut,manPakOutWrapper); |
| | | //检查该订单下的拣货单是否已经全部出库 |
| | | int status = checkManPakoutByOrder(param.getOrderNo()); |
| | | manPakOutService.updateAllStatus(param.getOrderNo(),status); |
| | | |
| | | |
| | | //修改库存 |
| | | manLocDetl.setAnfme(manLocDetl.getAnfme()-manPakOut.getCount()); |
| | | if (manLocDetl.getAnfme() == 0 ){ |
| | | manLocDetlService.delete(manLocDetlWrapper); |
| | | }else{ |
| | | manLocDetl.setStatus(1); |
| | | manLocDetlService.update(manLocDetl,manLocDetlWrapper); |
| | | } |
| | | SaasUtils.insertLog(1,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme(),user.getUsername()); |
| | | manLocDetl.setStatus(1); |
| | | manLocDetlService.update(manLocDetl,manLocDetlWrapper); |
| | | |
| | | //检测订单是否完成 |
| | | orderService.checkComplete(param.getOrderNo()); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | private void saveManlocDetl(WaitPakin waitPakin, Date now, String locNo){ |
| | | |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>() |
| | | .eq("name", locNo)); |
| | | |
| | | ManLocDetl manLocDetl = new ManLocDetl(); |
| | | BeanUtils.copyProperties(waitPakin,manLocDetl); |
| | | manLocDetl.setNodeId(node.getId()); |
| | | manLocDetl.setContainerCode(waitPakin.getSuppCode()); |
| | | manLocDetl.setCsocode(waitPakin.getThreeCode()); |
| | | manLocDetl.setIsoseq(waitPakin.getDeadTime()); |
| | | manLocDetl.setCreateTime(now); |
| | | manLocDetl.setModiTime(now); |
| | | manLocDetl.setLocNo(locNo); |
| | | manLocDetl.setStatus(1); |
| | | manLocDetlService.insert(manLocDetl); |
| | | } |
| | | |
| | | private int checkManPakoutByOrder(String orderNo){ |
| | | int status = 0; |
| | | List<ManPakOut> manPakOutList = manPakOutService.selectList(new EntityWrapper<ManPakOut>().eq("doc_num", orderNo)); |
| | | |
| | | for(int i=0; i<manPakOutList.size(); i++){ |
| | | if(i == 0){ |
| | | status = manPakOutList.get(i).getStatus(); |
| | | }else { |
| | | if(manPakOutList.get(i).getStatus() != status){ |
| | | status = 8; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return status; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | ManPakOut m = new ManPakOut(); |
| | | m.setAnfme(1.0); |
| | | NodePakoutParam n = new NodePakoutParam(); |
| | | n.setAnfme(1.0); |
| | | |
| | | double a = 1.0; |
| | | double b = 1.0; |
| | | System.out.println(m.getAnfme() == n.getAnfme()); |
| | | System.out.println(a == b); |
| | | System.out.println(Double.doubleToLongBits(m.getAnfme()) == Double.doubleToLongBits(n.getAnfme())); |
| | | } |
| | | |
| | | } |
| | |
| | | //od.setAnfme(toString(odParam.get("iQuantity"))); |
| | | //行号 |
| | | //od.setBrand(odParam.get("irowno").toString()); |
| | | od.setBrand(toString(odParam.get("irowno"))); |
| | | //od.setBrand(toString(odParam.get("irowno"))); |
| | | od.setManu(toString(odParam.get("irowno"))); |
| | | //销售订单号 |
| | | //od.setColor(odParam.get("csocode").toString()); |
| | | od.setColor(toString(odParam.get("csocode"))); |
| | | //od.setColor(toString(odParam.get("csocode"))); |
| | | od.setThreeCode(toString(odParam.get("csocode"))); |
| | | //销售订单行号 |
| | | //od.setOrigin(odParam.get("isoseq").toString()); |
| | | od.setOrigin(toString(odParam.get("isoseq"))); |
| | | //od.setOrigin(toString(odParam.get("isoseq"))); |
| | | od.setDeadTime(toString(odParam.get("isoseq"))); |
| | | |
| | | od.setStatus(1); |
| | | od.setQty(0.0D); |
| | |
| | | private ErpService erpService; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private ManPakOutService manPakOutService; |
| | | |
| | | @Value("${u8.url}") |
| | | private String url; |
| | |
| | | } |
| | | } |
| | | // 如果 作业数量等于单据总数量 && 工作明细档中无该单据的数据 && AGV工作明细档中无该单据的数据 |
| | | if (complete |
| | | && wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().like("order_no", orderNo)) < 1 |
| | | && agvWrkDetlService.selectCount(new EntityWrapper<AgvWrkDetl>().like("order_no",orderNo)) < 1) { |
| | | boolean wrkDeltExist = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo)) < 1; |
| | | boolean agvWrkDetlExist = agvWrkDetlService.selectCount(new EntityWrapper<AgvWrkDetl>().eq("order_no",orderNo)) < 1; |
| | | boolean waitPakinExist = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("order_no",orderNo)) < 1; |
| | | |
| | | ManPakOut manPakOut = manPakOutService.selectByOrderWithName(orderNo); |
| | | |
| | | boolean manPakoutExist = Cools.isEmpty(manPakOut) || manPakOut.getPayment() == 1; |
| | | if (complete && wrkDeltExist && agvWrkDetlExist && waitPakinExist && manPakoutExist) { |
| | | |
| | | // 出库订单重新整理明细 |
| | | // DocType docType = docTypeService.selectById(order.getDocType()); |
| | | // if (null != docType && docType.getPakout() == 1) { |
| | |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | if (!this.updateSettle(order.getId(), 4L, null)) { |
| | | throw new CoolException("修改订单【orderNo = " + order.getOrderNo() + "】状态为已完成失败"); |
| | | } |
| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.zy.common.properties.SlaveProperties; |
| | |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | public static void wapperSetCondition(Wrapper wrapper, String column, String condition){ |
| | | if(Cools.isEmpty(condition)){ |
| | | wrapper.isNull(column); |
| | | }else { |
| | | wrapper.eq(column,condition); |
| | | } |
| | | } |
| | | |
| | | public static void confirmOnlyMat(Wrapper wrapper, String matnr, String csocode, String isoseq){ |
| | | wapperSetCondition(wrapper,"matnr",matnr); |
| | | wapperSetCondition(wrapper,"csocode",csocode); |
| | | wapperSetCondition(wrapper,"isoseq",isoseq); |
| | | } |
| | | |
| | | } |
| | |
| | | //销售订单行号 |
| | | private String isoseq; |
| | | |
| | | //料想码 |
| | | //料箱码 |
| | | private String containerCode; |
| | | |
| | | public LocDto() { |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://192.168.4.15:1433;databasename=tzskasrs |
| | | #url: jdbc:sqlserver://localhost:1433;databasename=tzskasrs |
| | | #url: jdbc:sqlserver://192.168.4.15:1433;databasename=tzskasrs |
| | | url: jdbc:sqlserver://localhost:1433;databasename=tzskasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| | |
| | | <result column="payment" property="payment" /> |
| | | <result column="real_anfme" property="realAnfme" /> |
| | | <result column="order_no" property="orderNo" /> |
| | | <result column="container_code" property="containerCode" /> |
| | | </resultMap> |
| | | |
| | | <sql id="locDetlCondition"> |
| | |
| | | var cols = [ |
| | | {fixed: 'left', field: 'count', title: '实际数量', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'batch', align: 'center',title: '序列码(编辑)', edit: true, style: 'font-weight:bold'} |
| | | ,{field: 'batch', align: 'center',title: '序列码', edit: true, style: 'font-weight:bold'} |
| | | ,{field: 'threeCode', align: 'center',title: '销售订单号', edit: true, style: 'font-weight:bold'} |
| | | ,{field: 'deadTime', align: 'center',title: '销售订单行号', edit: true, style: 'font-weight:bold'} |
| | | ,{field: 'suppCode', align: 'center',title: '料箱码', edit: false, style: 'font-weight:bold'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "zpallet"); |
| | | arrRemove(detlCols, "field", "anfme"); |
| | | arrRemove(detlCols, "field", "batch"); |
| | | arrRemove(detlCols, "field", "threeCode"); |
| | | arrRemove(detlCols, "field", "deadTime"); |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | | return cols; |
| | |
| | | } |
| | | layer.confirm('确定调整'+currLocNo+'库位的明细吗?', {shadeClose: true}, function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/locDdetl/adjust/start", |
| | | url: baseUrl+"/agv/locDdetl/adjust/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | locNo: currLocNo, |
| | |
| | | }); |
| | | |
| | | function init(locNo) { |
| | | http.post(baseUrl + "/locDetl/list/auth", {locNo: locNo,limit: 1000}, function (res) { |
| | | http.post(baseUrl + "/agv/locDetl/list/auth", {locNo: locNo,limit: 1000}, function (res) { |
| | | matCodeData = []; |
| | | matCodeData = res.data.records; |
| | | for (var i = 0; i<matCodeData.length; i++) { |
| | |
| | | // 库位提示框 |
| | | function locTips(retrieve, locNo) { |
| | | if (retrieve) { |
| | | http.post(baseUrl+"/locMast/"+locNo+"/auth", null, function (res) { |
| | | http.post(baseUrl+"/agv/locMast/"+locNo+"/auth", null, function (res) { |
| | | let data = res.data; |
| | | if (data != null) { |
| | | $(".retrieve").show(); |
| | |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo', align: 'center',title: '库位号'} |
| | | ,{field: 'suppCode', align: 'center',title: '料想码', sort:true} |
| | | ,{field: 'containerCode', align: 'center',title: '料想码', sort:true} |
| | | ,{field: 'matnr', align: 'center',title: '存货编码', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '存货名称', sort:true} |
| | | ,{field: 'docNum', align: 'center',title: '单据编号', hide: true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'threeCode', align: 'center',title: '销售订单号'} |
| | | ,{field: 'dead_time', align: 'center',title: '销售订单行号'} |
| | | ,{field: 'csocode', align: 'center',title: '销售订单号'} |
| | | ,{field: 'isoseq', align: 'center',title: '销售订单行号'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘码', hide: false} |
| | | ,{field: 'specs', align: 'center',title: '规格型号', hide: false} |
| | | ,{field: 'model', align: 'center',title: '通用型号', hide: false} |
| | | ,{field: 'brand', align: 'center',title: '存货分类编码', hide: true} |
| | |
| | | ,{field: 'supp', align: 'center',title: '建档人', hide: true} |
| | | ,{field: 'dInvCreateDatetime', align: 'center',title: '建档日期', hide: true} |
| | | |
| | | // ,{field: 'specs', align: 'center',title: '规格'} |
| | | // ,{field: 'weight', align: 'center',title: '库位总重量', hide: false} |
| | | // |
| | | // ,{field: 'batch', align: 'center',title: '批号', width: 300, sort:true, hide: true} |
| | | // ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | // ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | // ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | // ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | // ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | // ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | // ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | // ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | // ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | // ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | // ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | // ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | // ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | // ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | // ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | // ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | // ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | // ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | // ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | // ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | // ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | // ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | // ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | // ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | // ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | // ,{field: 'owner$', align: 'center',title: '货主', hide: false} |
| | | // ,{field: 'status$', align: 'center',title: '明细锁', hide: false} |
| | | // ,{field: 'payment$', align: 'center',title: '货物形态', hide: false} |
| | | |
| | | ]; |
| | | |
New file |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo', align: 'center',title: '库位号'} |
| | | //,{field: 'containerCode', align: 'center',title: '料箱码', sort:true} |
| | | ,{field: 'matnr', align: 'center',title: '存货编码', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '存货名称', sort:true} |
| | | //,{field: 'docNum', align: 'center',title: '单据编号', hide: true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'csocode', align: 'center',title: '销售订单号'} |
| | | // ,{field: 'isoseq', align: 'center',title: '销售订单行号'} |
| | | //,{field: 'zpallet', align: 'center',title: '托盘码', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '车次', hide: false} |
| | | ,{field: 'specs', align: 'center',title: '规格型号', hide: false} |
| | | ,{field: 'model', align: 'center',title: '通用型号', hide: false} |
| | | ,{field: 'brand', align: 'center',title: '存货分类编码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '存货分类名称', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '计量单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '进项税', hide: true} |
| | | ,{field: 'units', align: 'center',title: '销项税', hide: true} |
| | | ,{field: 'dsDate', align: 'center',title: '启用日期', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '建档人', hide: true} |
| | | ,{field: 'dInvCreateDatetime', align: 'center',title: '建档日期', hide: true} |
| | | ]; |
| | | |
| | | // cols.push.apply(cols, detlCols); |
| | | cols.push({field: 'modiUser$', align: 'center',title: '修改人员',hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | ) |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#locDetl', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/temp/manLocDetl/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | console.log(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(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locDetl)', 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 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(locDetl)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'locDetl_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | } |
| | | }); |
| | | break; |
| | | case 'refreshData': |
| | | tableIns.reload({ |
| | | page: { |
| | | curr: pageCurr |
| | | } |
| | | }); |
| | | limit(); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.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 = { |
| | | 'locDetl': exportData, |
| | | 'fields': fields |
| | | }; |
| | | var loadIndex = layer.msg('正在导出...', {icon: 16, shade: 0.01, time: false}); |
| | | $.ajax({ |
| | | url: baseUrl+"/temp/manLocDetlTemp/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.close(loadIndex); |
| | | 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) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(locDetl)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'locDetl_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'locDetl_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('#locNo,#matnr', index), true); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | break; |
| | | case 'locNo': |
| | | var param = top.reObject(data).locNo; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '库位号详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: '../locMast/locMast_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: baseUrl+"/locMast/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = "/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'modiUser': |
| | | var param = top.reObject(data).modiUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改人员详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: baseUrl+"/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = "/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'appeUser': |
| | | var param = top.reObject(data).appeUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '创建者详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: baseUrl+"/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = "/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | locNo: $('#locNo').val(), |
| | | matnr: $('#matnr').val(), |
| | | lgnum: $('#lgnum').val(), |
| | | tbnum: $('#tbnum').val(), |
| | | tbpos: $('#tbpos').val(), |
| | | zmatid: $('#zmatid').val(), |
| | | maktx: $('#maktx').val(), |
| | | werks: $('#werks').val(), |
| | | anfme: $('#anfme').val(), |
| | | altme: $('#altme').val(), |
| | | zpallet: $('#zpallet').val(), |
| | | bname: $('#bname').val(), |
| | | memo: $('#memo').val(), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(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; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | // {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格型号'}, |
| | | {field: 'unit', title: '计量单位'}, |
| | | {field: 'brand', title: '行号'}, |
| | | {field: 'color', title: '销售订单号'}, |
| | | {field: 'origin', title: '销售订单行号'}, |
| | | {field: 'manu', title: '行号'}, |
| | | {field: 'threeCode', title: '销售订单号'}, |
| | | {field: 'deadTime', title: '销售订单行号'}, |
| | | {field: 'itemNum', title: '行唯一标识'} |
| | | ]], |
| | | request: { |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '物料号', width: 160}, |
| | | {field: 'maktx', title: '物料名称', width: 200}, |
| | | {field: 'matnr', title: '存货编码', width: 160}, |
| | | {field: 'maktx', title: '存货名称', width: 200}, |
| | | {field: 'batch', title: '序列码', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'threeCode', title: '销售订单号(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'deadTime', title: '销售订单行号(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | // {field: 'inQty', title: '已入库量', minWidth: 100, width: 100}, |
| | | // {field: 'unit', title: '单位', width: 80}, |
| | | {field: 'memo', title: '备注' , edit: true}, |
| | |
| | | // ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'} |
| | | ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} |
| | | ,{field: 'color', align: 'center',title: '销售订单号'} |
| | | ,{field: 'origin', align: 'center',title: '销售订单行号'} |
| | | // ,{field: 'name', align: 'center',title: '名称'} |
| | | // ,{field: 'model', align: 'center',title: '通用型号'} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | |
| | | ,{field: 'batch', align: 'center',title: '序列码', edit: true, style: 'font-weight:bold'} |
| | | ,{field: 'threeCode', align: 'center',title: '销售订单号', edit: true, style: 'font-weight:bold'} |
| | | ,{field: 'deadTime', align: 'center',title: '销售订单行号', edit: true, style: 'font-weight:bold'} |
| | | ,{field: 'suppCode', align: 'center',title: '料箱码', edit: false, style: 'font-weight:bold'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "zpallet"); |
| | | arrRemove(detlCols, "field", "anfme"); |
| | | arrRemove(detlCols, "field", "batch"); |
| | | arrRemove(detlCols, "field", "threeCode"); |
| | | arrRemove(detlCols, "field", "dead_time"); |
| | | arrRemove(detlCols, "field", "deadTime"); |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | | return cols; |
New file |
| | |
| | | var pageCurr; |
| | | var printMatCodeNos = []; |
| | | var ordernoo = "123"; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin', 'layer'], 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+'/ManPakOut/detailed/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | // toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | // {type: 'checkbox'} |
| | | {type: 'numbers'} |
| | | ,{field: 'wrkNo', align: 'center',title: 'id', hide:true} |
| | | ,{field: 'docNum',title: '拣货单号' } |
| | | ,{align: 'center', title: '二维码', toolbar: '#operate', width: 200 , hide:true} |
| | | ,{align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160} |
| | | ,{field: 'payment$', align: 'center',title: '状态'} |
| | | // ,{field: 'owner$', align: 'center',title: '货主'} |
| | | // ,{field: 'payment$', align: 'center',title: '货物形态'} |
| | | // ,{field: 'custName', align: 'center',title: '客户名称', width: 160} |
| | | ,{field: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{align: 'center', title: '操作', toolbar: '#operate'} |
| | | |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | console.log(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(); |
| | | |
| | | var index = -1; |
| | | $("[data-field='status$']").children().each(function () { |
| | | index++; |
| | | if ($(this).text() === '未出库') { |
| | | $('tr').eq(index).css("color", 'red'); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | 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('tool(saasLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case "btnPrint": |
| | | btnPrint(data.wrkNo, data.docNum, 4); |
| | | break; |
| | | case "wrkTrace": |
| | | btnPrint(data.wrkNo, data.docNum, 4); |
| | | break; |
| | | case "btnPrint2": |
| | | btnPrint2(data.wrkNo, data.docNum, 4); |
| | | break; |
| | | case "look": |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | | var offset = $a.offset(); |
| | | var top = offset.top; |
| | | var left = offset.left; |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '1200px', |
| | | offset: [top + 'px', (left - 450 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | | fixed: false, |
| | | content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>', |
| | | success: function (layero) { |
| | | table.render({ |
| | | id:'lookSSXMTable', |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/ManPakOut/list/auth', |
| | | where: { |
| | | doc_num: data.docNum, |
| | | uuid: data.uuid |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'} |
| | | ,{field: 'id', align: 'center',title: 'id', hide:true} |
| | | ,{field: 'docNum', align: 'center',title: '拣货单号'} |
| | | //,{field: 'uuid', align: 'center',title: 'uuid'} |
| | | ,{field: 'locNo', align: 'center',title: '库位'} |
| | | ,{field: 'matnr', align: 'center',title: '存货编码'} |
| | | ,{field: 'maktx', align: 'center',title: '存货名称'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'containerCode', align: 'center',title: '料箱码'} |
| | | ,{field: 'csocode', align: 'center',title: '销售订单号'} |
| | | ,{field: 'isoseq', align: 'center',title: '销售订单行号'} |
| | | //,{field: 'owner$', align: 'center',title: '货主'} |
| | | //,{field: 'payment$', align: 'center',title: '货物形态'} |
| | | //,{field: 'owner', align: 'center',title: '货主', hide:true} |
| | | //,{field: 'payment', align: 'center',title: '货物形态', hide:true} |
| | | ,{field: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'count', align: 'center',title: '完成数'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'memo', 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) { |
| | | |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | |
| | | var index = 1; |
| | | $("[data-field='status$']").children().each(function () { |
| | | index++; |
| | | if ($(this).text() === '未出库') { |
| | | $('tr').eq(index).css("color", 'red'); |
| | | } |
| | | }); |
| | | |
| | | |
| | | }, |
| | | size: '' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 搜索 |
| | | 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(); |
| | | |
| | | // 打印 |
| | | function btnPrint(orderId, orderNo, settle) { |
| | | printMatCodeNos.push(orderNo) |
| | | var templateNo = 3; |
| | | $.ajax({ |
| | | url: baseUrl+"/pakOut/print/auth", |
| | | // url: baseUrl+"/pakOut/show", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: printMatCodeNos}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | for (let i=0;i<res.data.length;i++){ |
| | | var templateDom = $("#templatePreview"+templateNo); |
| | | var className = templateDom.attr("class"); |
| | | if (className === 'template-barcode') { |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=1¶m="+res.data[i].docNum; |
| | | } else { |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=2¶m="+res.data[i].docNum; |
| | | } |
| | | } |
| | | |
| | | |
| | | var tpl = templateDom.html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | var box = $("#box"); |
| | | box.html(html); |
| | | box.show(); |
| | | var imgUrl; |
| | | // console.log(res.data[0]); |
| | | for (let i=0;i<res.data.length;i++){ |
| | | if (res.data[i].docNum === orderNo){ |
| | | imgUrl = res.data[i]["barcodeUrl"]; |
| | | } |
| | | |
| | | } |
| | | |
| | | var img = '<img className="template-code template-qrcode" src='+imgUrl+' height="80%">' |
| | | layer.open({ |
| | | type: 1, |
| | | title: "拣货单", |
| | | area: '150px', |
| | | content: img |
| | | }) |
| | | |
| | | // box.print({mediaPrint:true}); |
| | | // box.hide(); |
| | | |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function btnPrint2(orderId, orderNo, settle) { |
| | | console.log(orderId); |
| | | console.log(orderNo); |
| | | console.log(settle); |
| | | printMatCodeNos.push(orderNo); |
| | | var templateNo = 4; |
| | | $.ajax({ |
| | | url: baseUrl + "/ManPakOut/print/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: printMatCodeNos}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | layer.closeAll(); |
| | | var json = res; |
| | | |
| | | json.docNum = orderNo; |
| | | console.log("json"+json); |
| | | let sum = 0; |
| | | |
| | | for (let i = 0; i < res.data.length; i++){ |
| | | sum += res.data[i].anfme; |
| | | console.log("sum:"+res.data.anfme); |
| | | |
| | | } |
| | | json.anfmeSum = sum; |
| | | var barcodeUrl = baseUrl + "/ManPakOut/code/auth?type=1¶m=" + res.data[0].docNum; |
| | | console.log("barcodeUrl:"+barcodeUrl); |
| | | json.barcodeUrl = barcodeUrl; |
| | | for (let i = 0; i < json.data.length; i++) { |
| | | var templateDom = $("#templatePreview" + templateNo); |
| | | var className = templateDom.attr("class"); |
| | | |
| | | if (className === 'template-barcode') { |
| | | json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2¶m=" + (json.data[i].docNum+";" |
| | | +json.data[i].matnr+";" |
| | | +json.data[i].maktx+";" |
| | | +json.data[i].anfme+";" |
| | | +json.data[i].locNo+";" |
| | | +json.data[i].containerCode+";" |
| | | +json.data[i].csocode+";" |
| | | +json.data[i].isoseq+";" |
| | | +json.data[i].wrkNo+";"); |
| | | } else { |
| | | json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2¶m=" + (json.data[i].docNum+";" |
| | | +json.data[i].matnr+";" |
| | | +json.data[i].maktx+";" |
| | | +json.data[i].anfme+";" |
| | | +json.data[i].locNo+";" |
| | | +json.data[i].containerCode+";" |
| | | +json.data[i].csocode+";" |
| | | +json.data[i].isoseq+";" |
| | | +json.data[i].wrkNo+";"); |
| | | } |
| | | } |
| | | var tpl = templateDom.html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(json); |
| | | var box = $("#box"); |
| | | box.html(html); |
| | | box.show(); |
| | | box.print({mediaPrint: true}); |
| | | box.hide(); |
| | | } else if (json.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(json.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(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} |
| | | }); |
| | | } |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['layer','table','laydate', 'form', 'admin', 'xmSelect'], 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 xmSelect = layui.xmSelect; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#saasLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/order/picking/head/page/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | // toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号'}, |
| | | {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate', width: 380} |
| | | ]], |
| | | 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('tool(saasLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case "edit": |
| | | console.log("修改"); |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | console.log("删除"); |
| | | doDel(data.id); |
| | | break; |
| | | case "complete": |
| | | console.log("完结"); |
| | | break; |
| | | case "btnPrint": |
| | | console.log("打印"); |
| | | break; |
| | | case "manPrint": |
| | | addPakOut(data.orderNo); |
| | | break; |
| | | case "look": |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | | var offset = $a.offset(); |
| | | var top = offset.top; |
| | | var left = offset.left; |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '820px', |
| | | offset: [top + 'px', (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 |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'batch', title: '批号'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | // {field: 'workQty', title: '作业数量'}, |
| | | {field: 'qty', title: '完成数量', style: 'font-weight: bold'}, |
| | | {field: 'specs', title: '规格'} |
| | | ]], |
| | | 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; |
| | | } |
| | | }); |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 添加 |
| | | $("#orderAddBtn").click(function () { |
| | | showEditModel(); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['ioTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | // 生成拣货单 |
| | | function addPakOut(expTpe) { |
| | | $.ajax({ |
| | | url: baseUrl+"/ManPakOut/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | docType: Number(20), |
| | | orderNo: expTpe, |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.msg("生成拣货单:ok"); |
| | | } else if (res.code === 403){ |
| | | layer.msg("生成拣货单:403"); |
| | | }else { |
| | | layer.msg("生成拣货单:???"); |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | // 删除单据 |
| | | function doDel(orderId) { |
| | | console.log(orderId) |
| | | layer.confirm('确定要删除吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: orderId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | 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(expTpe) { |
| | | admin.open({ |
| | | type: 1, |
| | | title: (expTpe ? '修改' : '添加') + '单据', |
| | | content: $('#editDialog').html(), |
| | | area: '1300px', |
| | | success: function (layero, dIndex) { |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | var isExpAdd = !expTpe; |
| | | // 回显数据 |
| | | form.val('editForm', expTpe); |
| | | if (expTpe) { |
| | | $('#orderNo').attr("disabled", "disabled"); |
| | | } |
| | | // 表单提交事件 |
| | | form.on('submit(orderEditSubmit)', function (data) { |
| | | // 组装数据 |
| | | if (xxDataList.length <= 0) { |
| | | layer.tips('请添加单据明细', '#matAddBtnComment', {tips: [1, '#ff4c4c']}); |
| | | return false; |
| | | } |
| | | let nList = admin.util.deepClone(xxDataList); |
| | | for (let xi = 0; xi < nList.length; xi++) { |
| | | if (nList[xi].anfme <= 0){ |
| | | layer.msg('明细修改数量不合法', {icon: 2}); |
| | | return false; |
| | | } |
| | | if (nList[xi].anfme < nList[xi].workQty){ |
| | | layer.msg('数量不能小于已作业数量', {icon: 2}); |
| | | return false; |
| | | } |
| | | } |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/form/" + (isExpAdd?"add":"modify") + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | orderId: Number(data.field.id), |
| | | docType: Number(20), |
| | | orderNo: data.field.orderNo, |
| | | orderDetlList: nList |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | $(".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}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | // 明细表格 |
| | | var xxDataList = []; |
| | | var tbOptions = { |
| | | elem: '#formSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | data: xxDataList, |
| | | page: true, |
| | | height: '350px;', |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 200}, |
| | | {field: 'batch', title: '批号', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'workQty', title: '作业数量', minWidth: 100, width: 100}, |
| | | {field: 'owner$', title: '货主', minWidth: 100, width: 100}, |
| | | {field: 'payment$', title: '货物形态', minWidth: 100, width: 100}, |
| | | // {field: 'unit', title: '单位', width: 80}, |
| | | {field: 'memo', title: '备注' , edit: true}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | | ]], |
| | | done: function (res) { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |
| | | }; |
| | | if (!isExpAdd) { |
| | | $.ajax({ |
| | | url: baseUrl+"/order/detl/all/auth?orderId=" + expTpe.id, |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | xxDataList = res.data; |
| | | tbOptions.data = xxDataList; |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | var insTbSSXM = table.render(tbOptions); |
| | | // 工具条点击事件 |
| | | table.on('tool(formSSXMTable)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'edit') { |
| | | showEditModel2(data); |
| | | } else if (layEvent === 'del') { |
| | | if(data.workQty > 0){ |
| | | layer.msg("已存在作业数量,不能删除", {icon: 2}); |
| | | return; |
| | | } |
| | | layer.confirm('确定要删除吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | for (var j = 0; j < xxDataList.length; j++) { |
| | | if (xxDataList[j].matnr === data.matnr && xxDataList[j].batch === data.batch) { |
| | | xxDataList.splice(j, 1); |
| | | break; |
| | | } |
| | | } |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | }); |
| | | } |
| | | }); |
| | | // 明细数据修改 |
| | | table.on('edit(formSSXMTable)', function (obj) { |
| | | let index = obj.tr.attr("data-index"); |
| | | let data = xxDataList[index]; |
| | | if (obj.field === 'anfme'){ |
| | | let vle = Number(obj.value); |
| | | if (isNaN(vle)) { |
| | | layer.msg("请输入数字", {icon: 2}); |
| | | return false; |
| | | } else { |
| | | if (vle <= 0) { |
| | | layer.msg("数量必须大于零", {icon: 2}); |
| | | // data[obj.field] = 0; |
| | | // insTbSSXM.reload({data: xxDataList}); |
| | | return false; |
| | | } |
| | | if(obj.value < data.workQty){ |
| | | layer.msg("输入数量不能小于作业中数量", {icon: 2}); |
| | | // data[obj.field] = 0; |
| | | // insTbSSXM.reload({data: xxDataList}); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | data[obj.field] = obj.value; |
| | | insTbSSXM.reload({data: xxDataList}); |
| | | }); |
| | | |
| | | $('#matAddBtnComment').click(function () { |
| | | showEditModel2(); |
| | | }); |
| | | |
| | | // 显示添加明细表单弹窗 |
| | | function showEditModel2(exp) { |
| | | admin.open({ |
| | | type: 1, |
| | | offset: '150px', |
| | | area: '680px', |
| | | title: (exp ? '修改' : '添加') + '明细', |
| | | content: $('#matEditDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | // 回显数据 |
| | | form.val('matEditForm', exp); |
| | | // 表单提交事件 |
| | | form.on('submit(matEditSubmit)', function (data) { |
| | | let selectList = matXmSelect.getValue(); |
| | | for (let i = 0; i<selectList.length; i++) { |
| | | let item = selectList[i]; |
| | | // 查询物料详情 |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/covert/"+item.value+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | xxDataList.push(res.data); |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | layer.close(dIndex); |
| | | return false; |
| | | }); |
| | | // 渲染物料选择 |
| | | var matXmSelect = xmSelect.render({ |
| | | el: '#mat', |
| | | style: { |
| | | width: '340px', |
| | | }, |
| | | autoRow: true, |
| | | toolbar: { show: true }, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | remoteMethod: function(val, cb, show){ |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/all/get/kv", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | condition: val |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | cb(res.data) |
| | | } else { |
| | | cb([]); |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(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} |
| | | }); |
| | | } |
| | | |
| | | |
| | |
| | | <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/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/pakStore/pakStore.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvPakStore/pakStore.js" charset="utf-8"></script> |
| | | |
| | | <script type="text/template" id="putSiteSelectTemplate"> |
| | | {{#each data}} |
| | |
| | | <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/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/pakStore/stockAdjust.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvPakStore/stockAdjust.js" charset="utf-8"></script> |
| | | |
| | | </body> |
| | | </html> |
| | |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <!-- 左 --> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md3"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 树工具栏 --> |
| | | <div class="layui-form toolbar" id="organizationTreeBar"> |
| | | <div class="layui-inline" style="max-width: 200px;"> |
| | | <input id="condition" onkeyup="findData(this)" type="text" class="layui-input" placeholder="请输入关键字" autocomplete="off"> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn layui-btn-sm" id="treeReset" style="padding: 0 10px;"> |
| | | <i class="layui-icon layui-icon-close"></i> |
| | | </button> |
| | | </div> |
| | | <!-- 右 --> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 表格工具栏2 --> |
| | | <div id="search-box" class="layui-form toolbar" style="padding-top: 5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">货位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="loc_no" style="width: 120px" class="layui-input" placeholder="输入货位"/> |
| | | </div> |
| | | <!-- 树 --> |
| | | <div class="layui-form toolbar" id="organizationTree"></div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">商品编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="matnr" style="width: 120px" class="layui-input" placeholder="输入商品编号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">商品名称:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="maktx" style="width: 120px" class="layui-input" placeholder="输入商品名称"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">托盘码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="zpallet" style="width: 120px" class="layui-input" placeholder="输入托盘码"/> |
| | | </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> |
| | | <!-- 右 --> |
| | | <div class="layui-col-md9"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 表格工具栏2 --> |
| | | <div id="search-box" class="layui-form toolbar" style="padding-top: 5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">货位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="loc_no" style="width: 120px" class="layui-input" placeholder="输入货位"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">商品编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="matnr" style="width: 120px" class="layui-input" placeholder="输入商品编号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">商品名称:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="maktx" style="width: 120px" class="layui-input" placeholder="输入商品名称"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">托盘码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="zpallet" style="width: 120px" class="layui-input" placeholder="输入托盘码"/> |
| | | </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> |
| | | <table class="layui-hide" id="locDetl" lay-filter="locDetl"></table> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="locDetl" lay-filter="locDetl"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
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"> |
| | | <link rel="stylesheet" href="../../static/css/tree.css" media="all"> |
| | | <style> |
| | | body { |
| | | color: #595959; |
| | | background-color: #f5f7f9; |
| | | } |
| | | .layui-fluid { |
| | | padding: 15px; |
| | | } |
| | | .layui-form.layui-border-box.layui-table-view { |
| | | /*margin: 15px 0 35px 0;*/ |
| | | width: 100%; |
| | | border-width: 1px; |
| | | } |
| | | .layui-form.layui-border-box.layui-table-view { |
| | | height: calc(100vh - 160px); |
| | | } |
| | | .layui-form.layui-border-box.layui-table-view { |
| | | margin: 0; |
| | | } |
| | | #search-box { |
| | | padding: 30px 30px 10px 0px; |
| | | margin-left: 0px; |
| | | } |
| | | .layui-form.layui-border-box.layui-table-view { |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 右 --> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 表格工具栏2 --> |
| | | <div id="search-box" class="layui-form toolbar" style="padding-top: 5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">存货编码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="matnr" style="width: 120px" class="layui-input" placeholder="输入存货编码"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">存货名称:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="maktx" style="width: 120px" class="layui-input" placeholder="输入存货名称"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">车次:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="batch" style="width: 120px" class="layui-input" placeholder="输入车次号"/> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </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> |
| | | <table class="layui-hide" id="locDetl" lay-filter="locDetl"></table> |
| | | </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;margin-right: -10px">导出</button> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="locNoTpl"> |
| | | <span name="locNo" class="layui-badge layui-badge-gray">{{d.locNo}}</span> |
| | | </script> |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a> |
| | | <!-- <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a>--> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.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/manLocDetl/manLocDetlTemp.js" charset="utf-8"></script> |
| | | <!--<script type="text/javascript" src="../../static/js/tagTree.js" charset="utf-8"></script>--> |
| | | <script type="text/javascript" src="../../static/js/nodeTree.js" charset="utf-8"></script> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | |
| | | </div> |
| | | |
| | | <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="maktx" placeholder="请输入商品名称" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | <input name="maktx" 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"> |
| | | <input name="storeMaxDate" placeholder="库龄上限(天)" type="number" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">存货分类编码</label> |
| | | <div class="layui-input-block"> |
| | | <input name="brand" placeholder="请输入存货分类编码" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">计量单位</label> |
| | | <div class="layui-input-block"> |
| | | <input name="unit" placeholder="请输入计量单位" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">进项税</label> |
| | | <div class="layui-input-block"> |
| | | <input name="price" placeholder="请输入进项税" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | |
| | | |
| | | <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 id="matnr" name="matnr" placeholder="请输入商品编号" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | <input id="matnr" name="matnr" placeholder="请输入存货编码" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">规格</label> |
| | | <label class="layui-form-label">规格型号</label> |
| | | <div class="layui-input-block"> |
| | | <input name="specs" placeholder="请输入规格" class="layui-input"> |
| | | <input name="specs" placeholder="请输入规格型号" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <input name="storeMin" placeholder="库存下限" type="number" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">通用型号</label> |
| | | <div class="layui-input-block"> |
| | | <input name="model" placeholder="请输入备注" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">存货分类名称</label> |
| | | <div class="layui-input-block"> |
| | | <input name="color" placeholder="请输入备注" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">销项税</label> |
| | | <div class="layui-input-block"> |
| | | <input name="units" placeholder="请输入销项税" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">建档人</label> |
| | | <div class="layui-input-block"> |
| | | <input name="supp" placeholder="请输入建档人" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注</label> |
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> |
| | | .contain td { |
| | | border: 1px solid #000; |
| | | /*font-family: 黑体;*/ |
| | | /*font-weight: bold;*/ |
| | | /*color: #000000;*/ |
| | | } |
| | | </style> |
| | | </head> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/jquery/jQuery.print.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/picking/picking.js" charset="utf-8"></script> |
| | | <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="doc_num" 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> |
| | | |
| | | |
| | | </body> |
| | | <!-- 表格操作列 --> |
| | | <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> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="operate"> |
| | | {{# if (d.settle == 0 || d.settle == 1) { }} |
| | | <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-delete" lay-event="del">删除</a> |
| | | {{# } }} |
| | | {{# if ((d.settle == 0 || d.settle == 1) && (d.docType == 21 || d.docType == 11 || d.docType == 12)) { }} |
| | | {{# } }} |
| | | {{# if (d.settle == 2) { }} |
| | | <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="complete">完结</a> |
| | | {{# } }} |
| | | <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="btnPrint2">打印</a> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="btnPrint"><img src="../../static/image/nav/fn_3.png" alt="二维码"></a> |
| | | --> |
| | | </script> |
| | | |
| | | <script type="text/html" id="orderNoTpl"> |
| | | {{d.docNum}} |
| | | <!-- {{# if(d.settle > 1 && d.settle !== 3){ }}--> |
| | | |
| | | <!-- {{# } }}--> |
| | | <i class="layui-icon layui-icon-about wrk-trace" lay-tips="查看二维码" lay-direction="2" lay-offset="-10px,0px" lay-event="wrkTrace"></i> |
| | | </script> |
| | | <!-- 打印操作弹窗 --> |
| | | <div id="printDataDiv" style="display: none;padding: 20px"> |
| | | <div class="layui-form" style="text-align: center"> |
| | | <hr> |
| | | <!--单选框--> |
| | | <div class="layui-form-item" style="display: inline-block; margin-bottom: 10px"> |
| | | <input type="radio" name="selectTemplate" value="3" title="模板三" lay-filter="selectTemplateRadio" checked=""> |
| | | </div> |
| | | <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;text-align: left;"> |
| | | <legend>打印预览</legend> |
| | | <div id="template-container" style="margin: 20px;text-align: center"> |
| | | <!-- 预览图 3 --> |
| | | <div id="template-preview-3" class="template-preview" style="display: inline-block"> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | </div> |
| | | <div id="box" style="display: block"></div> |
| | | |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <option value="">选择类型</option> |
| | | {{#each records}} |
| | | <option value="{{docId}}">{{docName}}</option> |
| | | {{/each}} |
| | | </script> |
| | | <!-- 初始化打印模板的条形码 --> |
| | | <script type="text/javascript"> |
| | | $('.template-qrcode').attr("src", baseUrl+"/ManPakOut/code/auth?type=2¶m=123"); |
| | | </script> |
| | | <!-- 模板引擎 --> |
| | | <!-- 模板3 --> |
| | | <script type="text/template" id="templatePreview3" class="template-qrcode"> |
| | | {{#each data}} |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <thead></thead> |
| | | <tbody> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" height="80%"> |
| | | <!-- <img class="template-code template-qrcode" src="{{res.data}}" height="80%">--> |
| | | </tbody> |
| | | </table> |
| | | {{/each}} |
| | | </script> |
| | | |
| | | <div id="qrcode" style="display: none;padding: 20px"> |
| | | {{#each result}} |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <thead></thead> |
| | | <tbody> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" height="80%"> |
| | | <!-- <img class="template-code template-qrcode" src="{{res.data}}" height="80%">--> |
| | | </tbody> |
| | | </table> |
| | | {{/each}} |
| | | </div> |
| | | |
| | | |
| | | <!-- 模板引擎 --> |
| | | <!-- 模板4 --> |
| | | <script type="text/template" id="templatePreview4" class="template-qrcode"> |
| | | |
| | | <div style="width: 100%;border-bottom: #0C0C0C solid 2px;margin-bottom: 20px;"> |
| | | <div style="height: 60px;text-align: center;line-height: 60px;font-size: 30px;">拣货单</div> |
| | | <div style="height: 90px;text-align: center;line-height: 90px;"> |
| | | <img class="template-code template-qrcode" src="{{barcodeUrl}}" width="300"> |
| | | </div> |
| | | <div style="height: 50px;text-align: center;font-size: 25px;">{{docNum}}</div> |
| | | <div style="height: 40px;text-align: left;line-height: 40px;font-size: 20px;">出库单号:{{docNum}}</div> |
| | | <div style="height: 40px;text-align: left;line-height: 40px;font-size: 20px;">总数量:{{anfmeSum}}</div> |
| | | </div> |
| | | {{#each data}} |
| | | <table width="100%" style="border:0;border-bottom:#0C0C0C solid 2px; margin-bottom:20px;padding:0;overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 25px;font-size: 15px;"> |
| | | <td align="left" scope="col" colspan="1" style="width: 100px;"> |
| | | 料号: |
| | | </td> |
| | | <td> |
| | | {{this.matnr}} |
| | | </td> |
| | | <td align="left" scope="col" colspan="1" rowspan="4"> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="100px"> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 25px;font-size: 15px;"> |
| | | <td align="left" scope="col" colspan="1" style="width: 100px;"> |
| | | 商品名: |
| | | </td> |
| | | <td> |
| | | {{this.maktx}} |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 25px; font-size: 15px;"> |
| | | <td align="left" scope="col" colspan="1" style="width: 100px;"> |
| | | 拣货数量: |
| | | </td> |
| | | <td> |
| | | {{this.anfme}} |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 30px; font-size: 15px;"> |
| | | <td align="left" scope="col" colspan="1" style="width: 100px;"> |
| | | 库位: |
| | | </td> |
| | | <td align="left" scope="col" colspan="1"> |
| | | {{this.locNo}} |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 30px; font-size: 15px;"> |
| | | <td align="left" scope="col" colspan="1" style="width: 100px;"> |
| | | 料箱码: |
| | | </td> |
| | | <td align="left" scope="col" colspan="1"> |
| | | {{this.containerCode}} |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 30px; font-size: 15px;"> |
| | | <td align="left" scope="col" colspan="1" style="width: 100px;"> |
| | | 销售订单号: |
| | | </td> |
| | | <td align="left" scope="col" colspan="1"> |
| | | {{this.csocode}} |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 30px; font-size: 15px;"> |
| | | <td align="left" scope="col" colspan="1" style="width: 100px;"> |
| | | 销售订单行号: |
| | | </td> |
| | | <td align="left" scope="col" colspan="1"> |
| | | {{this.isoseq}} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | {{/each}} |
| | | </script> |
| | | |
| | | |
| | | </html> |
| | | |
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"> |
| | | <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
| | | <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
| | | <!-- <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>--> |
| | | <!-- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>--> |
| | | <style> |
| | | .wrk-trace { |
| | | color: green; |
| | | cursor: pointer; |
| | | margin-left: 6px; |
| | | font-size: 18px; |
| | | } |
| | | </style> |
| | | </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="order_no" 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> |
| | | <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><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/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/jquery/jQuery.print.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/echarts/echarts.min.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/picking/pickingOrder.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表格操作列 --> |
| | | <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> |
| | | |
| | | <script type="text/html" id="settleTpl"> |
| | | <span name="settle" |
| | | {{# if( d.settle === 1){ }} |
| | | class="layui-badge layui-badge-red" |
| | | {{# }else if(d.settle === 2){ }} |
| | | class="layui-badge layui-badge-green" |
| | | {{# }else if(d.settle === 3){ }} |
| | | class="layui-badge layui-badge-gray" |
| | | {{# }else if(d.settle === 4){ }} |
| | | class="layui-badge layui-badge-blue" |
| | | {{# }else if(d.settle === 5){ }} |
| | | class="layui-badge layui-badge-gray" |
| | | {{# }else if(d.settle === 6){ }} |
| | | class="layui-badge layui-badge-gray" |
| | | {{# } }} |
| | | >{{d.settle$}}</span> |
| | | </script> |
| | | |
| | | |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="editForm" lay-filter="editForm" class="layui-form model-form"> |
| | | <input name="id" type="hidden"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单据类型:</label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="docType" style="display: none" value="平库拣货单"> |
| | | <input id="docType$" name="docType$" value="平库拣货单" class="layui-input cool-auto-complete-div" onclick="autoShow(20)" placeholder="平库拣货单" onfocus=this.blur() lay-verType="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单据编号:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="orderNo" name="orderNo" placeholder="输入单据编号" type="text" class="layui-input" maxlength="20" lay-verType="tips" /> |
| | | <!-- lay-verify="required"--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="position: relative;"> |
| | | <label class="layui-form-label">单据明细:</label> |
| | | <div class="layui-input-block"> |
| | | <table id="formSSXMTable" lay-filter="formSSXMTable"></table> |
| | | </div> |
| | | <button class="layui-btn layui-btn-sm icon-btn" id="matAddBtnComment" |
| | | style="position: absolute; left: 20px;top: 60px;padding: 0 5px;" type="button"> |
| | | <i class="layui-icon"></i>添加明细 |
| | | </button> |
| | | </div> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | <button class="layui-btn" lay-filter="orderEditSubmit" lay-submit>保存</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="operate"> |
| | | {{# if (d.settle == 0 || d.settle == 1) { }} |
| | | <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-delete" lay-event="del">删除</a> |
| | | <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="manPrint">生成拣货单</a> |
| | | {{# } }} |
| | | {{# if (d.settle == 2) { }} |
| | | <!-- <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="complete">完结</a>--> |
| | | {{# } }} |
| | | <!-- <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="btnPrint">打印</a>--> |
| | | |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="matEditDialog"> |
| | | <form id="matEditForm" lay-filter="matEditForm" class="layui-form model-form"> |
| | | <input name="experimentId" type="hidden"/> |
| | | <div class="layui-form-item" style="float: left"> |
| | | <label class="layui-form-label">物料 - 多选</label> |
| | | <div class="layui-input-block"> |
| | | <div id="mat" name="mat"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item text-right" style="display: inline-block; margin-left: 35px"> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | <button class="layui-btn" lay-filter="matEditSubmit" lay-submit>保存</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |