| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.LocRuleService; |
| | | import com.zy.asrs.service.NodeService; |
| | | import com.zy.asrs.utils.LocRuleExcelListener; |
| | | import com.zy.common.entity.LocRuleExcel; |
| | | 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.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | |
| | | private LocRuleService locRuleService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private NodeService nodeService; |
| | | |
| | | @RequestMapping(value = "/locRule/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | locRule.setUpdateBy(getUserId()); |
| | | locRule.setUpdateTime(now); |
| | | Integer locType2 = 1;//单品区域 |
| | | if (locRule.getMixed() == 1) { |
| | | //混载 |
| | | locRule.setMatnr("00000000"); |
| | | locType2 = 2;//混放区域 |
| | | } |
| | | // if (locRule.getMixed() == 1) { |
| | | // //混载 |
| | | // //locRule.setMatnr("00000000"); |
| | | // locType2 = 2;//混放区域 |
| | | // } |
| | | locRuleService.insert(locRule); |
| | | locMastService.updateLocType2ByRBL(locType2, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | return R.ok(); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /*************************************** 数据相关 ***********************************************/ |
| | | |
| | | /** |
| | | * excel导入模板下载 |
| | | */ |
| | | @RequestMapping(value = "/locCodeRule/excel/import/mould") |
| | | public void matExcelImportMould(HttpServletResponse response) throws IOException { |
| | | List<LocRuleExcel> excels = new ArrayList<>(); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = URLEncoder.encode("库位编码规则Excel导入模板", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(), LocRuleExcel.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .sheet("sheet1") |
| | | .doWrite(excels); |
| | | } |
| | | |
| | | // excel导入 |
| | | @PostMapping(value = "/locCodeRule/excel/import/auth") |
| | | @ManagerAuth(memo = "库位编码规则数据导入") |
| | | @Transactional |
| | | public R matExcelImport(MultipartFile file) throws IOException { |
| | | LocRuleExcelListener listener = new LocRuleExcelListener(); |
| | | EasyExcel.read(file.getInputStream(), LocRuleExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功同步"+listener.getTotal()+"条商品数据"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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.ModifyPakoutParam; |
| | | import com.zy.asrs.entity.param.NodePakoutParam; |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.service.*; |
| | |
| | | private MatService matService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private LocRuleService locRuleService; |
| | | @Autowired |
| | | private NodeService nodeService; |
| | | |
| | | // 组托 ---------------------------------------------------------------------------------------------------- |
| | | |
| | |
| | | public R recommendNodeLoc(@RequestBody HashMap<String,String> param){ |
| | | |
| | | String zpallet = param.get("zpallet"); |
| | | List<WaitPakin> waitPakinList = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", zpallet)); |
| | | for (WaitPakin waitPakin : waitPakinList){ |
| | | List<LocRule> locRules = locRuleService.find(waitPakin.getMatnr()); |
| | | if(!Cools.isEmpty(locRules)){ |
| | | if(!Cools.isEmpty(findNodeLoc(locRules))){ |
| | | return R.ok(findNodeLoc(locRules)).add(waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet",zpallet))); |
| | | } |
| | | } |
| | | |
| | | return R.ok("DT-C-010202").add(waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet",zpallet))); |
| | | if(!Cools.isEmpty(waitPakin.getBrand())){ |
| | | List<LocRule> locCodeRules = locRuleService.find(waitPakin.getBrand().substring(0, 4)); |
| | | if(!Cools.isEmpty(locRules)){ |
| | | if(!Cools.isEmpty(findNodeLoc(locRules))){ |
| | | return R.ok(findNodeLoc(locRules)).add(waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet",zpallet))); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return R.ok("").add(waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet",zpallet))); |
| | | } |
| | | |
| | | |
| | |
| | | return R.ok().add(waitPakins); |
| | | } |
| | | |
| | | @RequestMapping("/wrkdetl/auth") |
| | | @ManagerAuth(memo = "拣料信息") |
| | | public R checkWrkDetl(@RequestBody String barcode){ |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); |
| | | if(Cools.isEmpty(wrkMast)){ |
| | | return R.error("该托盘没有工作档"); |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | return R.ok().add(wrkDetls); |
| | | } |
| | | |
| | | @RequestMapping("/modify/wrkdetl/auth") |
| | | @ManagerAuth(memo = "修改拣料信息") |
| | | public R modifyWrkDetl(@RequestBody ModifyPakoutParam param){ |
| | | |
| | | String barcode = param.getBarcode(); |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | |
| | | Double allPakoutAnfme = 0.0; |
| | | Double allModifyPakoutAnfme = 0.0; |
| | | for (WrkDetl wrkDetl : wrkDetls){ |
| | | allPakoutAnfme += wrkDetl.getAnfme(); |
| | | } |
| | | for (ModifyPakoutParam.CA ca : param.getParams()){ |
| | | allModifyPakoutAnfme += ca.getAnfme(); |
| | | } |
| | | |
| | | if(!allPakoutAnfme.equals(allModifyPakoutAnfme)){ |
| | | return R.error("修改后拣料的数量与原数量不符合,请重新核对拣料数量"); |
| | | } |
| | | |
| | | mobileService.modifyWrkDetl(wrkDetls,param.getParams(),getUserId()); |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | private String findNodeLoc(List<LocRule> locRules){ |
| | | for (LocRule locRule : locRules) { |
| | | if (Cools.isEmpty(locRule.getOther())) { |
| | | continue; |
| | | } |
| | | EntityWrapper<Node> wrapper = new EntityWrapper<>(); |
| | | wrapper.between("row1", locRule.getRowBeg(), locRule.getRowEnd()) |
| | | .between("bay1", locRule.getBayBeg(), locRule.getBayEnd()) |
| | | .between("lev1", locRule.getLevBeg(), locRule.getLevEnd()) |
| | | .eq("parent_name", locRule.getOther()) |
| | | .eq("status", "1"); |
| | | |
| | | Node node = nodeService.selectOne(wrapper); |
| | | if (Cools.isEmpty(node)) { |
| | | continue; |
| | | } |
| | | return node.getName(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | 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.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("asr_loc_rule") |
| | |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | @ApiModelProperty(value= "物料号") |
| | | @ExcelProperty(value = "物料编码前4位") |
| | | private String matnr; |
| | | |
| | | /** |
| | |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | | @ExcelProperty(value = "批号") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 其他 |
| | | */ |
| | | @ApiModelProperty(value= "其他") |
| | | @ExcelProperty(value = "库区") |
| | | private String other; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "开始排") |
| | | @TableField("row_beg") |
| | | @ExcelProperty(value = "开始排") |
| | | private Integer rowBeg; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "结束排") |
| | | @TableField("row_end") |
| | | @ExcelProperty(value = "结束排") |
| | | private Integer rowEnd; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "开始列") |
| | | @TableField("bay_beg") |
| | | @ExcelProperty(value = "开始列") |
| | | private Integer bayBeg; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "结束列") |
| | | @TableField("bay_end") |
| | | @ExcelProperty(value = "结束列") |
| | | private Integer bayEnd; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "开始层") |
| | | @TableField("lev_beg") |
| | | @ExcelProperty(value = "开始层") |
| | | private Integer levBeg; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "结束层") |
| | | @TableField("lev_end") |
| | | @ExcelProperty(value = "结束层") |
| | | private Integer levEnd; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | @ExcelProperty(value = "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ModifyPakoutParam { |
| | | //托盘码 |
| | | String barcode; |
| | | //料箱取出的数量 |
| | | List<CA> params; |
| | | |
| | | @Data |
| | | public class CA{ |
| | | String containerCode; |
| | | double anfme; |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | Set<String> selectLocNo(String matnr, String batch, String csocode, String isocode); |
| | | |
| | | LocDetl selectByContainerCode(String containerCode); |
| | | |
| | | } |
| | |
| | | |
| | | List<LocRule> find(String matnr); |
| | | |
| | | List<LocRule> findCode(String matnr, String other); |
| | | |
| | | //找混载库位规则 |
| | | List<LocRule> findMixed(); |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.ModifyPakoutParam; |
| | | import com.zy.asrs.entity.param.NodePakoutParam; |
| | | import com.zy.system.entity.User; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface MobileService { |
| | | |
| | |
| | | void nodePutway(String zpallet, String locNo, User user); |
| | | |
| | | void nodePakout(NodePakoutParam param, User user); |
| | | |
| | | void modifyWrkDetl(List<WrkDetl> wrkDetls, List<ModifyPakoutParam.CA> params, Long userId); |
| | | } |
| | |
| | | void locMove(String sourceLocNo, String targetLocNo, Long userId,User user); |
| | | |
| | | Page<Node> getPage(Page<Node> page); |
| | | |
| | | Node selectByParentName(String parentName); |
| | | } |
| | |
| | | agvTaskParam.setTaskPriority(agvWrkMast.getIoPri().intValue()); |
| | | |
| | | //AgvTaskkDescribeParam |
| | | if(agvWrkMast.getSourceLocNo().contains("C")){ |
| | | if(agvWrkMast.getSourceLocNo().contains("CS") || agvWrkMast.getSourceLocNo().contains("SK")){ |
| | | agvTaskkDescribeParam.setFromLocationCode(agvWrkMast.getSourceLocNo()); |
| | | } |
| | | agvTaskkDescribeParam.setToLocationCode(agvWrkMast.getLocNo()); |
| | |
| | | |
| | | } |
| | | |
| | | public LocDetl selectByContainerCode(String containerCode) { |
| | | return this.selectOne(new EntityWrapper<LocDetl>().eq("supp_code",containerCode)); |
| | | } |
| | | |
| | | @Override |
| | | public int updateStockFreeze(String matnr, String locNo, Integer stockFreeze) { |
| | | return this.baseMapper.updateStockFreeze(matnr, locNo, stockFreeze); |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.mapper.LocRuleMapper; |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.LocRuleService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("locRuleService") |
| | |
| | | return this.baseMapper.selectByMatnr(matnr); |
| | | } |
| | | |
| | | @Override |
| | | public List<LocRule> findCode(String matnr,String other) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (Cools.isEmpty(mat)) { |
| | | return null; |
| | | } |
| | | if(Cools.isEmpty(mat.getBrand())){ |
| | | return null; |
| | | } |
| | | |
| | | Wrapper<LocRule> wrapper = new EntityWrapper<LocRule>() |
| | | .eq("matnr",mat.getBrand().substring(0,4)) |
| | | .eq("mixed",0) |
| | | .eq("status",1); |
| | | |
| | | Utils.wapperSetCondition(wrapper,"other",other); |
| | | |
| | | return this.selectList(wrapper); |
| | | |
| | | } |
| | | |
| | | //找混载库位规则 |
| | | @Override |
| | | public List<LocRule> findMixed() { |
| | |
| | | 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.entity.param.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | |
| | | private NodeService nodeService; |
| | | @Autowired |
| | | private ManPakOutService manPakOutService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | SaasUtils.insertLog(0,locNo,waitPakin.getMatnr(), waitPakin.getAnfme(),user.getUsername()); |
| | | |
| | | }); |
| | | Node node = nodeService.selectByUuid(locNo); |
| | | node.setStatus(0); |
| | | nodeService.updateById(node); |
| | | |
| | | //生成入库通知历史档 |
| | | waitPakinLogService.save(zpallet); |
| | | //删除入库通知档 |
| | |
| | | //修改库存 |
| | | manLocDetl.setAnfme(manLocDetl.getAnfme()-manPakOut.getCount()); |
| | | if (manLocDetl.getAnfme() == 0 ){ |
| | | checkNodeStatus(manLocDetl.getLocNo()); |
| | | manLocDetlService.delete(manLocDetlWrapper); |
| | | }else{ |
| | | manLocDetl.setStatus(1); |
| | |
| | | //检测订单是否完成 |
| | | orderService.checkComplete(param.getOrderNo()); |
| | | |
| | | } |
| | | |
| | | @Transactional |
| | | public void modifyWrkDetl(List<WrkDetl> wrkDetls, List<ModifyPakoutParam.CA> params, Long userId) { |
| | | |
| | | wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("wrk_no",wrkDetls.get(0).getWrkNo())); |
| | | |
| | | params.forEach(param ->{ |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | LocDetl locDetl = locDetlService.selectByContainerCode(param.getContainerCode()); |
| | | BeanUtils.copyProperties(locDetl,wrkDetl); |
| | | wrkDetl.setWrkNo(wrkDetls.get(0).getWrkNo()); |
| | | if(wrkDetl.getAnfme() < param.getAnfme()){ |
| | | throw new CoolException("料箱"+param.getContainerCode()+"的物料数量小于拣料数量,请重新核对"); |
| | | } |
| | | wrkDetl.setAnfme(param.getAnfme()); |
| | | wrkDetl.setModiTime(new Date()); |
| | | wrkDetl.setAppeTime(new Date()); |
| | | wrkDetl.setModiUser(userId); |
| | | wrkDetlService.insert(wrkDetl); |
| | | |
| | | }); |
| | | } |
| | | |
| | | private void saveManlocDetl(WaitPakin waitPakin, Date now, String locNo){ |
| | |
| | | |
| | | 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())); |
| | | private void checkNodeStatus(String locNo){ |
| | | ManLocDetl manLocDetl = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>().eq("loc_no", locNo)); |
| | | //如果库存信息中没有改库位,则修改库位状态为1 |
| | | if(Cools.isEmpty(manLocDetl)){ |
| | | Node node = nodeService.selectByUuid(locNo); |
| | | node.setStatus(1); |
| | | nodeService.updateById(node); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | page.setTotal(baseMapper.listByPageCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public Node selectByParentName(String parentName) { |
| | | return this.selectOne(new EntityWrapper<Node>().eq("parent_name",parentName)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.zy.asrs.service.LocRuleService; |
| | | import com.zy.common.entity.LocRuleExcel; |
| | | |
| | | import java.util.Date; |
| | | |
| | | public class LocRuleExcelListener extends AnalysisEventListener<LocRuleExcel> { |
| | | private int total = 0; |
| | | @Override |
| | | public void invoke(LocRuleExcel excel, AnalysisContext ctx) { |
| | | LocRuleService locRuleService = SpringUtils.getBean(LocRuleService.class); |
| | | Date now = new Date(); |
| | | LocRule locRule = new LocRule(); |
| | | locRule = excel; |
| | | //BeanUtils.copyProperties(excel,locRule); |
| | | locRule.setCreateTime(now); |
| | | locRule.setUpdateTime(now); |
| | | locRule.setCstmr("1"); |
| | | locRule.setStatus(1); |
| | | locRuleService.insert(locRule); |
| | | total++; |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | |
| | | } |
| | | |
| | | public int getTotal() { |
| | | return total; |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.common.entity; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.zy.asrs.entity.LocRule; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class LocRuleExcel extends LocRule { |
| | | } |
| | |
| | | private AgvLocMastService agvLocMastService; |
| | | @Autowired |
| | | private MatService matService; |
| | | @Autowired |
| | | private LocRuleService locRuleService; |
| | | |
| | | public int getWorkNo(Integer wrkMk) { |
| | | AgvWrkLastno wrkLastno = agvWrkLastnoService.selectById(wrkMk); |
| | |
| | | //库位规则 |
| | | if(!Cools.isEmpty(agvWaitPakinList)){ |
| | | locMast = getLocByLocRule(agvWaitPakinList.get(0),floor); |
| | | if(!Cools.isEmpty(locMast)){ |
| | | return locMast; |
| | | } |
| | | } |
| | | |
| | | //库位编码规则 |
| | | if(!Cools.isEmpty(agvWaitPakinList)){ |
| | | locMast = getLocByLocCodeRule(agvWaitPakinList.get(0),floor); |
| | | if(!Cools.isEmpty(locMast)){ |
| | | return locMast; |
| | | } |
| | |
| | | } |
| | | |
| | | /* |
| | | 库位规则查找 |
| | | */ |
| | | private AgvLocMast getLocByLocCodeRule(AgvWaitPakin agvWaitPakin, int floor) { |
| | | if(Cools.isEmpty(agvWaitPakin.getBrand())){ |
| | | return null; |
| | | } |
| | | |
| | | //库区 |
| | | String other = "agv-" + floor; |
| | | List<LocRule> locRules = locRuleService.findCode(agvWaitPakin.getMatnr(), other); |
| | | if(Cools.isEmpty(locRules)){ |
| | | return null; |
| | | } |
| | | |
| | | for (LocRule agvLocRule : locRules) { |
| | | EntityWrapper<AgvLocMast> wrapper = new EntityWrapper<>(); |
| | | wrapper.between("row1",agvLocRule.getRowBeg(),agvLocRule.getRowEnd()) |
| | | .between("bay1",agvLocRule.getBayBeg(),agvLocRule.getBayEnd()) |
| | | .between("lev1",agvLocRule.getLevBeg(),agvLocRule.getLevEnd()) |
| | | .eq("floor",floor) |
| | | .eq("loc_sts","O"); |
| | | AgvLocMast agvLocMast = agvLocMastService.selectOne(wrapper); |
| | | if(!Cools.isEmpty(agvLocMast)){ |
| | | return agvLocMast; |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /* |
| | | 靠近摆放规则 |
| | | */ |
| | | private AgvLocMast getLocByProximityRule(){ |
| | |
| | | return getLocNoStep6(staDescId, sourceStaNo, locMast);//返回dto |
| | | } |
| | | |
| | | //存货分类编码规则 |
| | | locMast = getLocNoCodeStepRule(matNos, locTypeDto); |
| | | if (locMast != null) { |
| | | //找到库位,返回dto |
| | | return getLocNoStep6(staDescId, sourceStaNo, locMast);//返回dto |
| | | } |
| | | |
| | | // 靠近摆放规则 --- 相同订单号, 同天同规格物料 |
| | | locMast = getLocNoStep3(staDescId, matNos, locTypeDto); |
| | | if (locMast != null) { |
| | |
| | | return locMast; |
| | | } |
| | | |
| | | /** |
| | | * 库位编码规则 |
| | | */ |
| | | private LocMast getLocNoCodeStepRule(List<String> matNos, LocTypeDto locTypeDto) { |
| | | LocMast locMast = null; |
| | | |
| | | //库位编码规则只能在相同编码货物中生效 |
| | | String matnr = ""; |
| | | for(String matNo : matNos){ |
| | | if("".equals(matnr)){ |
| | | matnr = matNo.substring(0, 4); |
| | | } |
| | | if(!matnr.equals(matNo.substring(0, 4))){ |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | // 库区锁定 |
| | | List<LocRule> locRules = locRuleService.findCode(Cools.isEmpty(matNos) ? null : matNos.get(0),null); |
| | | if (locRules == null || locRules.isEmpty()) { |
| | | return null;//没有库位规则,跳出当前任务 |
| | | } |
| | | |
| | | for (LocRule locRule : locRules) { |
| | | if (locRule == null) { |
| | | continue; |
| | | } |
| | | |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast2(locTypeDto.getLocType1(), locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | for (LocMast locMast0 : locMasts) { |
| | | //预留空库位 |
| | | if (locMastService.checkEmptyCount(locMast0, 10)) { |
| | | return locMast0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // if (locRules.get(0).getKeepGo() == 0) { |
| | | // //找不到空库位,且禁止继续寻找其他非混载区域库位 |
| | | // //找不到库位,抛出异常 |
| | | // throw new CoolException("规则区域没有空库位"); |
| | | // } |
| | | |
| | | return locMast; |
| | | } |
| | | |
| | | // 靠近摆放规则 --- 相同订单号, 同天同规格物料 |
| | | private LocMast getLocNoStep3(Integer staDescId, List<String> matNos, LocTypeDto locTypeDto) { |
| | | LocMast locMast = null; |
| | |
| | | private AgvWorkService agvWorkService; |
| | | @Autowired |
| | | private AgvBasDevpService agvBasDevpService; |
| | | @Autowired |
| | | private AgvWrkMastService agvWrkMastService; |
| | | // @Autowired |
| | | // private ErpService erpService; |
| | | |
| | |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.getByDevNo(param.getDevNo()); |
| | | |
| | | if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){ |
| | | //去找agv工作档任务 |
| | | throw new CoolException("当前站点不存在或者站点不为空"); |
| | | } |
| | | //去找agv工作档任务 |
| | | if(!Cools.isEmpty(agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>() |
| | | .eq("barcode",containerCode)))){ |
| | | throw new CoolException("该料箱正在入库中"); |
| | | } |
| | | //绑定站点 |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",containerCode); |
| | | |
New file |
| | |
| | | var pageCurr; |
| | | var admin; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | | dropdown: 'dropdown/dropdown', |
| | | }).use(['table','laydate', 'form', 'admin', 'dropdown', 'element'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#locRule', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/locRule/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | where:{cstmr : 1}, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编号'} |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: true} |
| | | ,{field: 'model', align: 'center',title: '通用型号', hide: true} |
| | | ,{field: 'cstmr', align: 'center',title: '客户', hide: true} |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'other', align: 'center',title: '库区'} |
| | | ,{field: 'rowBeg', align: 'center',title: '开始排'} |
| | | ,{field: 'rowEnd', align: 'center',title: '结束排'} |
| | | ,{field: 'bayBeg', align: 'center',title: '开始列'} |
| | | ,{field: 'bayEnd', align: 'center',title: '结束列'} |
| | | ,{field: 'levBeg', align: 'center',title: '开始层'} |
| | | ,{field: 'levEnd', align: 'center',title: '结束层'} |
| | | ,{field: 'limit', align: 'center',title: '上限', hide: true} |
| | | ,{field: 'status$', align: 'center',title: '状态', hide: true} |
| | | ,{field: 'createBy$', align: 'center',title: '添加人员', hide: true} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间', hide: true} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间', hide: true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{field: 'mixed$', align: 'center',title: '混载'} |
| | | // ,{field: 'keepGo$', align: 'center',title: '继续搜索'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | 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(locRule)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(locRule)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'locRule': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/locRule/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(locRule)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '1000px', |
| | | title: (mData ? '修改' : '添加') + '库区规则', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | data.field.cstmr = 1; |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/locRule/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/locRule/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // excel导入模板下载 |
| | | function excelMouldDownload(){ |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | location.href = baseUrl + "/locCodeRule/excel/import/mould"; |
| | | layer.closeAll('loading'); |
| | | } |
| | | |
| | | // excel导入 |
| | | function importExcel() { |
| | | $("#importExcel").trigger("click"); |
| | | } |
| | | function upload(obj){ |
| | | if(!obj.files) { |
| | | return; |
| | | } |
| | | var file = obj.files[0]; |
| | | admin.confirm('确认同步 [' + file.name +'] 文件吗?', function (index) { |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | var url = baseUrl + "/locCodeRule/excel/import/auth"; |
| | | var form = new FormData(); |
| | | form.append("file", file); |
| | | xhr = new XMLHttpRequest(); |
| | | xhr.open("post", url, true); //post方式,url为服务器请求地址,true 该参数规定请求是否异步处理。 |
| | | xhr.setRequestHeader('token', localStorage.getItem('token')); |
| | | xhr.onload = uploadComplete; //请求完成 |
| | | xhr.onerror = uploadFailed; //请求失败 |
| | | xhr.onloadend = function () { // // 上传完成重置文件流 |
| | | layer.closeAll('loading'); |
| | | $("#importExcel").val(""); |
| | | }; |
| | | // xhr.upload.onprogress = progressFunction;//【上传进度调用方法实现】 |
| | | xhr.upload.onloadstart = function(){//上传开始执行方法 |
| | | ot = new Date().getTime(); //设置上传开始时间 |
| | | oloaded = 0;//设置上传开始时,以上传的文件大小为0 |
| | | }; |
| | | xhr.send(form); |
| | | }, function(index){ |
| | | $("#importExcel").val(""); |
| | | }); |
| | | } |
| | | function uploadComplete(evt) { |
| | | var res = JSON.parse(evt.target.responseText); |
| | | if(res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | loadTree(""); |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | function uploadFailed(evt) { |
| | | var res = JSON.parse(evt.target.responseText); |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | // 关闭动作 |
| | | $(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} |
| | | }); |
| | | } |
| | |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | where:{cstmr : 0}, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | |
| | | ,{field: 'model', align: 'center',title: '通用型号', hide: true} |
| | | ,{field: 'cstmr', align: 'center',title: '客户', hide: true} |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'other', align: 'center',title: '其他', hide: true} |
| | | ,{field: 'other', align: 'center',title: '库区'} |
| | | ,{field: 'rowBeg', align: 'center',title: '开始排'} |
| | | ,{field: 'rowEnd', align: 'center',title: '结束排'} |
| | | ,{field: 'bayBeg', align: 'center',title: '开始列'} |
| | |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | data.field.cstmr = 0; |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/locRule/"+(mData?'update':'add')+"/auth", |
| | |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | |
| | | <div class="dropdown-menu" style="float: right"> |
| | | <button class="layui-btn layui-btn-primary layui-border-black icon-btn layui-btn-sm"> 数据同步 <i class="layui-icon layui-icon-drop"></i></button> |
| | | <ul class="dropdown-menu-nav dark"> |
| | | <div class="dropdown-anchor"></div> |
| | | <li class="title">1st menu</li> |
| | | <li><a onclick="excelMouldDownload()" style="font-size: 12px"><i class="layui-icon layui-icon-template-1"></i>模板下载</a></li> |
| | | <li><a onclick="importExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-upload"></i>导入 Excel</a></li> |
| | | <li style="display: none"><input id="importExcel" type="file" onchange="upload(this)" ></li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </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/locRule/locRule.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locRule/locCodeRule.js" charset="utf-8"></script> |
| | | |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库区: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="batch" placeholder="请输入库区"> |
| | | <div class="layui-input-block" title="agv-1代表1楼agv库区,agv-3代表3楼agv库区"> |
| | | <input class="layui-input" name="other" placeholder="请输入平库或者agv库区,不填则默认为四项库库位规则"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">其他: </label>--> |
| | |
| | | <!-- <input class="layui-input" name="limit" placeholder="请输入上限">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">混载: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="mixed"> |
| | | <option value="1" selected>是</option> |
| | | <option value="0">否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">混载: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <select name="mixed">--> |
| | | <!-- <option value="1" >是</option>--> |
| | | <!-- <option value="0" selected>否</option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-form-item"> |
| | | <label class="layui-form-label">混载未找到库位继续搜索: </label> |
| | | <div class="layui-input-block"> |
| | |
| | | <input class="layui-input" name="batch" placeholder="请输入批号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库区: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="other" placeholder="请输入库区,不填则默认为四项库库位规则"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">其他: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | |
| | | <label class="layui-form-label">混载: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="mixed"> |
| | | <option value="1" selected>是</option> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | <option value="0" selected>否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <!-- 预览图 4 --> |
| | | <div id="template-preview-4" class="template-preview" style="display: none"> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <tr style="height: 37px"> |
| | | <td align="center" scope="col" >商品</td> |
| | | <td align="center" scope="col" style="">xxxxxx-xx/xx</td> |
| | | <td align="center" scope="col" colspan="2"> |
| | | <td align="center" scope="col" colspan="2" rowspan="2"> |
| | | <img class="template-code template-qrcode" src="" width="80%"> |
| | | <div style="letter-spacing: 1px;margin-top: 1px; text-align: center"><span>xxxxxx</span></div> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 37px"> |
| | | <td align="center" scope="col" >数量</td> |
| | | <td align="center" scope="col" style=""></td> |
| | | </tr> |
| | | <tr style="height: 74px"> |
| | | <td align="center" >规格</td> |
| | |
| | | <script type="text/template" id="templatePreview4" class="template-qrcode"> |
| | | {{#each data}} |
| | | <table class="contain" width="400px" style="overflow: hidden;font-size: xx-small;table-layout: fixed; color:#000;"> |
| | | <tr style="height: 74px;font-size: 18px; font-weight: 400" > |
| | | <tr style="height: 50px;font-size: 18px; font-weight: 400" > |
| | | <td width="50px" align="center" scope="col" colspan="1">商品</td> |
| | | <td width="170px" align="center" scope="col" colspan="1">{{this.maktx}}</td> |
| | | <td align="center" scope="col" colspan="2" > |
| | | <td align="center" scope="col" colspan="2" rowspan="2"> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="80%"> |
| | | <div style="letter-spacing: 1px;margin-top: 1px; text-align: center; font-weight: 400"> |
| | | <span>{{this.matnr}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 24px;font-size: 18px; font-weight: 400" > |
| | | <td width="50px" align="center" scope="col" colspan="1">数量</td> |
| | | <td width="170px" align="center" scope="col" colspan="1"></td> |
| | | </tr> |
| | | <tr style="height: 50px; font-size: 18px;font-weight: 400"> |
| | | <td width="50px" align="center" colspan="1">规格</td> |
| | | <td align="center" colspan="3" style=" |
| | |
| | | <input class="layui-input" name="batch" placeholder="请输入批号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库区: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="parentName" placeholder="请输入库区"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">其他: </label>--> |
| | | <!-- <div class="layui-input-block">--> |