New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.ConfigType; |
| | | import com.zy.asrs.service.ConfigTypeService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class ConfigTypeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ConfigTypeService configTypeService; |
| | | |
| | | @RequestMapping(value = "/cinfigType/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(configTypeService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/cinfigType/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){ |
| | | excludeTrash(param); |
| | | EntityWrapper<ConfigType> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | |
| | | return R.ok(configTypeService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/configType/add/auth") |
| | | @ManagerAuth |
| | | public R list(ConfigType configType){ |
| | | if (Cools.isEmpty(configType)){ |
| | | return R.error(); |
| | | } |
| | | configType.setCreateTime(new Date()); |
| | | configTypeService.insert(configType); |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.model.WrkDto; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return mobileService.manDetlOriginOut(json,getUser()); |
| | | } |
| | | |
| | | @RequestMapping("/plaDetl/packin/v1") |
| | | // @ManagerAuth(memo="pla入库") |
| | | public R plaPackIn(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | String packageNo = json.get("packageNo").toString(); |
| | | if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | | mobileService.plaPakin(locNo,batch,packageNo); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/plaDetl/packout/v1") |
| | | // @ManagerAuth(memo="pla出库") |
| | | public R plaPackOut(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | String packageNo = json.get("packageNo").toString(); |
| | | String orderNo = json.get("orderNo").toString(); |
| | | String orderDetlId = json.get("orderDetlId").toString(); |
| | | String wrkNo = json.get("wrkNo").toString(); |
| | | Double anfme = Double.parseDouble(json.get("anfme").toString()); |
| | | |
| | | if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | | |
| | | mobileService.plaPakout(locNo,batch,packageNo,orderNo,orderDetlId,wrkNo,anfme); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.*; |
| | | import com.core.exception.CoolException; |
| | | import com.sun.org.apache.xpath.internal.operations.Or; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.OrderDomainParam; |
| | | import com.zy.asrs.entity.result.OrderDetlVo; |
| | |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (OrderDetl orderDetl : param.getOrderDetlList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | if (DetlDto.has(list, dto)) { |
| | | //if (DetlDto.has(list, dto)) { |
| | | if(false){ |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | |
| | | import com.zy.common.model.TaskDto; |
| | | 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.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private ManPakOutService manPakOutService; |
| | | @Autowired |
| | | private ManLocDetlService manLocDetlService; |
| | | @Autowired |
| | | private PlaService plaService; |
| | | @Autowired |
| | | private PlaQtyService plaQtyService; |
| | | |
| | | |
| | | @PostMapping("/out/pakout/orderDetlIds/auth") |
| | |
| | | } |
| | | } |
| | | |
| | | List<PlaQty> plaQties = new ArrayList<>(); |
| | | |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | plaService.queryStock(orderDetl,plaQties); |
| | | } |
| | | |
| | | return R.ok(plaQties); |
| | | |
| | | /* |
| | | Set<String> exist = new HashSet<>(); |
| | | |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | |
| | | locDtos.add(locDto); |
| | | } |
| | | } |
| | | return R.ok().add(locDtos); |
| | | return R.ok().add(locDtos); */ |
| | | } |
| | | |
| | | @PostMapping("/out/pakout/auth") |
| | | @ManagerAuth(memo = "订单出库") |
| | | public synchronized R pakout(@RequestBody List<LocDto> locDtos) throws InterruptedException { |
| | | |
| | | int[][] is=new int[locDtos.size()][2]; |
| | | for (int i=0;i<locDtos.size();i++){ |
| | | LocDto locDto=locDtos.get(locDtos.size()-1-i); |
| | |
| | | |
| | | @PostMapping("/out/pakout2/auth") |
| | | @ManagerAuth(memo = "生成拣货单") |
| | | public synchronized R pakout2(@RequestBody List<LocDto> locDtos) throws InterruptedException { |
| | | int[][] is = new int[locDtos.size()][2]; |
| | | @Transactional |
| | | public synchronized R pakout2(@RequestBody List<PlaQty> plaQties) throws InterruptedException { |
| | | |
| | | for (PlaQty plaQty : plaQties){ |
| | | if(Cools.isEmpty(plaQty.getLocNo())){ |
| | | continue; |
| | | } |
| | | plaQtyService.insert(plaQty); |
| | | addPakOUT(plaQty); |
| | | |
| | | Pla pla = plaService.selectByBatchAndPackageNo(plaQty.getBatch(), plaQty.getPackageNo()); |
| | | pla.setQtyAnfme(pla.getQtyAnfme() + plaQty.getQtyAnfme()); |
| | | plaService.updateById(pla); |
| | | |
| | | OrderDetl orderDetl = orderDetlService.selectById(plaQty.getOrderDetlId()); |
| | | orderDetl.setWorkQty(orderDetl.getWorkQty() + plaQty.getQtyAnfme()); |
| | | orderDetlService.updateById(orderDetl); |
| | | orderService.updateSettle(plaQty.getOrderId(),2L,null); |
| | | } |
| | | |
| | | return R.ok(); |
| | | |
| | | /* int[][] is = new int[locDtos.size()][2]; |
| | | List<String> matnrs=new ArrayList<>(); |
| | | for (int i = 0; i < locDtos.size(); i++) { |
| | | LocDto locDto = locDtos.get(locDtos.size() - 1 - i); |
| | |
| | | addPakOUT(locDto,uuid).equals(R.ok()); |
| | | } |
| | | } |
| | | return R.ok(); */ |
| | | } |
| | | |
| | | private R addPakOUT(PlaQty plaQty){ |
| | | ManPakOut manPakOut=new ManPakOut(); |
| | | manPakOut.setWrkNo(plaQty.getOrderNo()+"-"+System.currentTimeMillis()); |
| | | manPakOut.setWrkSts((long)1); |
| | | manPakOut.setAnfme(plaQty.getQtyAnfme()); |
| | | manPakOut.setLocNo(plaQty.getLocNo()); |
| | | manPakOut.setBatch(plaQty.getBatch()); |
| | | manPakOut.setBarcode(plaQty.getPackageNo()); |
| | | manPakOut.setUuid(String.valueOf(System.currentTimeMillis())); |
| | | manPakOut.setCreateTime(new Date()); |
| | | manPakOut.setUpdateTime(new Date()); |
| | | manPakOut.setCount(0.0); |
| | | manPakOut.setDocNum(plaQty.getOrderNo()); |
| | | manPakOut.setNodeId(plaQty.getOrderDetlId()); |
| | | manPakOutService.insert(manPakOut); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | 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()); |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("asr_config_type") |
| | | public class ConfigType { |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | private String type; |
| | | private String value; |
| | | private Date createTime; |
| | | } |
| | |
| | | @TableField("uuid") |
| | | private String uuid; |
| | | |
| | | //最大熔指 |
| | | private double fingerMeltingMin; |
| | | //最小熔指 |
| | | private double fingerMeltingMax; |
| | | //最大熔点 |
| | | private double fusingPointMin; |
| | | //最小熔点 |
| | | private double fusingPointMax; |
| | | //最大黄度 |
| | | private double yellownessMin; |
| | | //最大黄度 |
| | | private double yellownessMax; |
| | | //最小不透明度 |
| | | private double opacityMin; |
| | | //最大不透明度 |
| | | private double opacityMax; |
| | | |
| | | public String getOwner$(){ |
| | | LocOwnerService service = SpringUtils.getBean(LocOwnerService.class); |
| | | LocOwner locOwner = service.selectById(this.owner); |
| | |
| | | private String brand; |
| | | |
| | | //重量 |
| | | private double weight; |
| | | private Double weight; |
| | | |
| | | //车间 |
| | | private String workshop; |
| | |
| | | private String filmWrap; |
| | | |
| | | //熔指 |
| | | private double fingerMelting; |
| | | private Double fingerMelting; |
| | | |
| | | //熔点 |
| | | private double fusingPoint; |
| | | private Double fusingPoint; |
| | | |
| | | //挥发份1 |
| | | private double vadf1; |
| | | private Double vadf1; |
| | | |
| | | //挥发份2 |
| | | private double vadf2; |
| | | private Double vadf2; |
| | | |
| | | //黄度 |
| | | private double yellowness; |
| | | private Double yellowness; |
| | | |
| | | //不透明度 |
| | | private double opacity; |
| | | private Double opacity; |
| | | |
| | | //水分 |
| | | private double water; |
| | | private Double water; |
| | | |
| | | //L值 |
| | | private double l; |
| | | private Double l; |
| | | |
| | | //a值 |
| | | private double a; |
| | | private Double a; |
| | | |
| | | //b值 |
| | | private double b; |
| | | private Double b; |
| | | |
| | | //填充 |
| | | private double fillIn; |
| | | private Double fillIn; |
| | | |
| | | //质量状态 |
| | | private String massState; |
| | |
| | | private String locNo; |
| | | |
| | | //剩余重量 |
| | | private String weightAnfme; |
| | | private Double weightAnfme = 0.0; |
| | | //剩余重量 |
| | | private Double qtyAnfme = 0.0; |
| | | |
| | | //状态 |
| | | private String status; |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("asr_pla_qty") |
| | | public class PlaQty { |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | //批号 |
| | | private String batch; |
| | | |
| | | //包装号 |
| | | private String packageNo; |
| | | |
| | | //单据明细id |
| | | private Long orderDetlId; |
| | | |
| | | //单据id |
| | | private Long orderId; |
| | | |
| | | //单据编号 |
| | | private String orderNo; |
| | | |
| | | //该明细对于该批次的pla作业数量 |
| | | private Double qtyAnfme; |
| | | |
| | | //库位号 |
| | | private String locNo; |
| | | |
| | | //创建时间 |
| | | private Date createTime; |
| | | |
| | | public PlaQty(String batch, String packageNo, Long orderDetlId, Long orderId, String orderNo, Double qtyAnfme, String locNo, Date createTime) { |
| | | this.batch = batch; |
| | | this.packageNo = packageNo; |
| | | this.orderDetlId = orderDetlId; |
| | | this.orderNo = orderNo; |
| | | this.qtyAnfme = qtyAnfme; |
| | | this.locNo = locNo; |
| | | this.createTime = createTime; |
| | | this.orderId = orderId; |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.ConfigType; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ConfigTypeMapper extends BaseMapper<ConfigType> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.PlaQty; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface PlaQtyMapper extends BaseMapper<PlaQty> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.ConfigType; |
| | | |
| | | public interface ConfigTypeService extends IService<ConfigType> { |
| | | |
| | | } |
| | |
| | | R manDetlOrigInNo(JSONObject json, User user); |
| | | |
| | | R manDetlOriginOut(JSONObject json, User user); |
| | | |
| | | void plaPakin(String locNo, String batch, String packageNo); |
| | | |
| | | void plaPakout(String locNo, String batch, String packageNo, String orderNo, String orderDetlId, String wrkNo,Double anfme); |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.PlaQty; |
| | | |
| | | public interface PlaQtyService extends IService<PlaQty> { |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.Pla; |
| | | import com.zy.asrs.entity.PlaQty; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface PlaService extends IService<Pla> { |
| | | |
| | | Pla selectByBatchAndPackageNo(String batch, String packageNo); |
| | | |
| | | void queryStock(OrderDetl orderDetl, List<PlaQty> plaQties); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.ConfigType; |
| | | import com.zy.asrs.mapper.ConfigTypeMapper; |
| | | import com.zy.asrs.service.ConfigTypeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class ConfigTypeServiceImpl extends ServiceImpl<ConfigTypeMapper, ConfigType> implements ConfigTypeService { |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.*; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.sun.org.apache.xpath.internal.operations.Or; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustNewParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.OffSaleParam; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.asrs.utils.SaasUtils; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.model.MesCombParam; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.system.entity.User; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 移动端服务核心类 |
| | |
| | | |
| | | @Autowired |
| | | private LocOwnerService locOwnerService; |
| | | @Autowired |
| | | private PlaService plaService; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public void plaPakin(String locNo, String batch, String packageNo) { |
| | | Pla pla = plaService.selectByBatchAndPackageNo(batch, packageNo); |
| | | if("已入库".equals(pla.getStatus())){ |
| | | throw new CoolException("该物料已入库"); |
| | | } |
| | | pla.setStatus("已入库"); |
| | | pla.setModifyTime(new Date()); |
| | | plaService.updateById(pla); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void plaPakout(String locNo, String batch, String packageNo, String orderNo, String orderDetlId, String wrkNo, Double anfme) { |
| | | Pla pla = plaService.selectByBatchAndPackageNo(batch, packageNo); |
| | | //Order order = orderService.selectByNo(orderNo); |
| | | OrderDetl orderDetl = orderDetlService.selectById(orderDetlId); |
| | | ManPakOut manPakOut = manPakOutService.selectById(wrkNo); |
| | | |
| | | //更新拣货单信息 |
| | | if(manPakOut.getCount() + anfme > manPakOut.getAnfme()){ |
| | | throw new CoolException("拣货重量大于拣货单所需拣货重量,请重新分配拣货重量"); |
| | | } |
| | | manPakOut.setCount(manPakOut.getCount() + anfme); |
| | | if (manPakOut.getAnfme().equals(manPakOut.getCount())){ |
| | | manPakOut.setStatus(1); |
| | | manPakOutService.updateById(manPakOut); |
| | | } |
| | | |
| | | //更新单据明细 |
| | | orderDetl.setQty(orderDetl.getQty() + anfme); |
| | | orderDetlService.updateById(orderDetl); |
| | | |
| | | //更新单据信息 |
| | | orderService.checkComplete(orderNo); |
| | | |
| | | //更新pla明细 |
| | | pla.setWeightAnfme(pla.getWeightAnfme() - anfme); |
| | | if(pla.getWeightAnfme() <= 0){ |
| | | pla.setStatus("全部出库"); |
| | | }else { |
| | | pla.setStatus("部分出库"); |
| | | } |
| | | plaService.updateById(pla); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | @Override |
| | | public Page<OrderDetl> getPakoutPage(Page<OrderDetl> page) { |
| | | List<OrderDetl> pakoutPage = baseMapper.getPakoutPage(page.getCondition()); |
| | | System.out.println(pakoutPage); |
| | | page.setRecords(baseMapper.getPakoutPage(page.getCondition())); |
| | | page.setTotal(baseMapper.getPakoutPageCount(page.getCondition())); |
| | | return page; |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.PlaQty; |
| | | import com.zy.asrs.mapper.PlaQtyMapper; |
| | | import com.zy.asrs.service.PlaQtyService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("plaQtyService") |
| | | public class PlaQtyServiceImpl extends ServiceImpl<PlaQtyMapper, PlaQty> implements PlaQtyService { |
| | | |
| | | } |
| | |
| | | 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.OrderDetl; |
| | | import com.zy.asrs.entity.Pla; |
| | | import com.zy.asrs.entity.PlaQty; |
| | | import com.zy.asrs.mapper.PlaMapper; |
| | | import com.zy.asrs.service.PlaQtyService; |
| | | import com.zy.asrs.service.PlaService; |
| | | 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; |
| | | |
| | | @Service("plaService") |
| | | public class PlaServiceImpl extends ServiceImpl<PlaMapper, Pla> implements PlaService { |
| | | @Autowired |
| | | private PlaQtyService plaQtyService; |
| | | |
| | | public Pla selectByBatchAndPackageNo(String batch, String packageNo) { |
| | | return this.selectOne(new EntityWrapper<Pla>().eq("batch",batch).eq("package_no",packageNo)); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void queryStock(OrderDetl orderDetl, List<PlaQty> plaQties) { |
| | | |
| | | //筛选条件 批号、包好、熔点、熔指、黄度、不透明度 |
| | | Wrapper<Pla> wrapper = new EntityWrapper<Pla>(); |
| | | if(!Cools.isEmpty(orderDetl.getBatch())){ |
| | | wrapper.eq("batch",orderDetl.getBatch()); |
| | | } |
| | | if(!Cools.isEmpty(orderDetl.getBrand())){ |
| | | wrapper.eq("package_no",orderDetl.getBrand()); |
| | | } |
| | | wrapper.eq("status","已入库"); |
| | | wrapper.ge("finger_melting", orderDetl.getFingerMeltingMin()).le("finger_melting", orderDetl.getFingerMeltingMax()); |
| | | wrapper.ge("fusing_point", orderDetl.getFusingPointMin()).le("fusing_point", orderDetl.getFusingPointMax()); |
| | | wrapper.ge("yellowness", orderDetl.getYellownessMin()).le("yellowness", orderDetl.getYellownessMax()); |
| | | wrapper.ge("opacity", orderDetl.getOpacityMin()).le("opacity", orderDetl.getOpacityMax()); |
| | | wrapper.orderBy("pakin_time"); |
| | | |
| | | List<Pla> plas = this.selectList(wrapper); |
| | | //总共的出库的数量(总计出库数量-作业数量) |
| | | if(Cools.isEmpty(orderDetl.getWorkQty())){ |
| | | orderDetl.setWorkQty(0.0); |
| | | } |
| | | Double anfme = orderDetl.getAnfme() - orderDetl.getWorkQty(); |
| | | |
| | | for (Pla pla : plas){ |
| | | //库存数量(剩余重量-库存作业数量) |
| | | Double weightAnfme = pla.getWeightAnfme() - pla.getQtyAnfme(); |
| | | if(weightAnfme <= 0){ |
| | | continue; |
| | | } |
| | | //需要减去此次出库预览其他订单需出库的数量 |
| | | for (PlaQty plaQty : plaQties){ |
| | | if(Cools.eq(plaQty.getBatch(),pla.getBatch()) && Cools.eq(plaQty.getPackageNo(),pla.getPackageNo())){ |
| | | weightAnfme -= plaQty.getQtyAnfme(); |
| | | } |
| | | } |
| | | |
| | | if(weightAnfme > anfme){ |
| | | //如果该批次包号剩余重量大于订单明细数量,则返回plaQties |
| | | PlaQty plaQty = new PlaQty(pla.getBatch(),pla.getPackageNo(),orderDetl.getId(),orderDetl.getOrderId(),orderDetl.getOrderNo(),anfme,pla.getLocNo(),new Date()); |
| | | anfme = 0.0; |
| | | plaQties.add(plaQty); |
| | | break; |
| | | }else { |
| | | PlaQty plaQty = new PlaQty(pla.getBatch(),pla.getPackageNo(),orderDetl.getId(),orderDetl.getOrderId(),orderDetl.getOrderNo(),weightAnfme,pla.getLocNo(),new Date()); |
| | | anfme -= weightAnfme; |
| | | plaQties.add(plaQty); |
| | | } |
| | | } |
| | | |
| | | if(anfme > 0){ |
| | | PlaQty plaQty = new PlaQty(orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getId(),orderDetl.getOrderId(),orderDetl.getOrderNo(),anfme,null,new Date()); |
| | | plaQties.add(plaQty); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | <result column="owner" property="owner" /> |
| | | <result column="payment" property="payment" /> |
| | | <result column="uuid" property="uuid" /> |
| | | <result column="finger_melting_min" property="fingerMeltingMin" /> |
| | | <result column="finger_melting_max" property="fingerMeltingMax" /> |
| | | <result column="fusing_point_min" property="fusingPointMin" /> |
| | | <result column="fusing_point_max" property="fusingPointMax" /> |
| | | <result column="yellowness_min" property="yellownessMin" /> |
| | | <result column="yellowness_max" property="yellownessMax" /> |
| | | <result column="opacity_min" property="opacityMin" /> |
| | | <result column="opacity_max" property="opacityMax" /> |
| | | |
| | | </resultMap> |
| | | |
New file |
| | |
| | | var pageCurr; |
| | | var roleId; |
| | | var powerTreeData; |
| | | |
| | | 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: '#configType', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/cinfigType/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'type', align: 'center',title: '类型'} |
| | | ,{field: 'value', align: 'center',title: '值'} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | 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(role)', 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(configType)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: ['800px', top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'configTypeAdd.html', |
| | | success: function(layero, index){ |
| | | 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; |
| | | var ids=[]; |
| | | data.map(function (track) { |
| | | ids.push(track.id); |
| | | }); |
| | | if (ids.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(ids.length===1?'此':ids.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/role/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | 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 = { |
| | | 'role': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/role/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) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(role)', 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: 'role_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,#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'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'role_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | 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'); |
| | | } |
| | | }); |
| | | break; |
| | | case 'leader': |
| | | var param = top.reObject(data).leader; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailHeight, top.detailWidth], |
| | | shadeClose: false, |
| | | content: '../role/role_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: baseUrl+"/role/"+ 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,#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'); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = "/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'power': |
| | | roleId = data.id; |
| | | layer.open({ |
| | | type: 2, |
| | | title: data.name + ' 权限分配', |
| | | maxmin: true, |
| | | area: [top.detailWidth/2, '85%'], |
| | | shadeClose: false, |
| | | content: 'role_power_detail.html', |
| | | success: function(layero, index){ |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | type: $('#type').val(), |
| | | value: $('#value').val(), |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/configType/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | tableReload(true); |
| | | $("#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('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(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 + "']"); |
| | | 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.9); |
| | | } |
| | | layer.style(index, { |
| | | top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | $(".layui-layer-shade").remove(); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | |
| | | {field: 'batch', title: '批号'}, |
| | | // {field: 'matnr', title: '商品编码', width: 160}, |
| | | // {field: 'maktx', title: '商品名称', width: 160}, |
| | | // |
| | | // {field: 'batch', title: '批号'}, |
| | | {field: 'batch', title: '批次'}, |
| | | {field: 'brand', title: '牌号'}, |
| | | {field: 'fingerMeltingMin', title: '最小熔指'}, |
| | | {field: 'fingerMeltingMax', title: '最大熔指'}, |
| | | {field: 'fusingPointMin', title: '最小熔点'}, |
| | | {field: 'fusingPointMax', title: '最大熔点'}, |
| | | {field: 'yellownessMin', title: '最小黄度'}, |
| | | {field: 'yellownessMax', title: '最大黄度'}, |
| | | {field: 'opacityMin', title: '最小不透明度'}, |
| | | {field: 'opacityMax', title: '最大不透明度'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'workQty', title: '作业数量'}, |
| | | {field: 'qty', title: '完成数量', style: 'font-weight: bold'}, |
| | | // {field: 'unit', title: '单位'}, |
| | | // { |
| | | // field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | | // return util.toDateString(d.createTime); |
| | | // }, width: 180 |
| | | // }, |
| | | // {field: 'inQty', title: '已入库量'}, |
| | | // {field: 'color', title: '颜色'}, |
| | | // {field: 'specs', title: '规格'}, |
| | | |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | let nList = admin.util.deepClone(xxDataList); |
| | | console.log(nList); |
| | | for (let xi = 0; xi < nList.length; xi++) { |
| | | if(!nList[xi].anfme){ |
| | | layer.msg('明细数量不合法', {icon: 2}); |
| | | return false; |
| | | } |
| | | if (nList[xi].anfme <= 0){ |
| | | layer.msg('明细数量不合法', {icon: 2}); |
| | | return false; |
| | | } |
| | | if (nList[xi].batch == null || nList[xi].batch == ""){ |
| | | layer.msg('批次不合法', {icon: 2}); |
| | | return false; |
| | | } |
| | | // if (nList[xi].batch == null || nList[xi].batch == ""){ |
| | | // layer.msg('批次不合法', {icon: 2}); |
| | | // return false; |
| | | // } |
| | | if (nList[xi].anfme < nList[xi].workQty){ |
| | | layer.msg('数量不能小于已作业数量', {icon: 2}); |
| | | return false; |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 200}, |
| | | {field: 'specs', title: '规格'}, |
| | | // {field: 'matnr', title: '商品编码', width: 160}, |
| | | // {field: 'maktx', title: '商品名称', width: 200}, |
| | | // {field: 'specs', title: '规格'}, |
| | | {field: 'batch', title: '批次', edit: true}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'brand', title: '牌号', edit: true}, |
| | | {field: 'fingerMeltingMin', title: '最小熔指', edit: true}, |
| | | {field: 'fingerMeltingMax', title: '最大熔指', edit: true}, |
| | | {field: 'fusingPointMin', title: '最小熔点', edit: true}, |
| | | {field: 'fusingPointMax', title: '最大熔点', edit: true}, |
| | | {field: 'yellownessMin', title: '最小黄度', edit: true}, |
| | | {field: 'yellownessMax', title: '最大黄度', edit: true}, |
| | | {field: 'opacityMin', title: '最小不透明度', edit: true}, |
| | | {field: 'opacityMax', title: '最大不透明度', edit: true}, |
| | | |
| | | {field: 'anfme', title: '重量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | |
| | | // {field: 'payment', title: '货物状态',align: 'center', templet: '#payment'}, |
| | | {field: 'qty', title: '作业数量', minWidth: 100, width: 100}, |
| | | {field: 'qty', 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'} |
| | |
| | | |
| | | // 显示添加明细表单弹窗 |
| | | function showEditModel2(exp) { |
| | | xxDataList.push({}); |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | return; |
| | | admin.open({ |
| | | type: 1, |
| | | offset: '150px', |
| | |
| | | height: 'full-120', |
| | | where: {order_id: 9999999999}, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{type: 'numbers', title: '#'} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160} |
| | | ,{field: 'matnr', align: 'center',title: '商品编码', width: 160} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} |
| | | {type: 'checkbox'}, |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl'}, |
| | | {field: 'fingerMeltingMin', title: '最小熔指'}, |
| | | {field: 'fingerMeltingMax', title: '最大熔指'}, |
| | | {field: 'fusingPointMin', title: '最小熔点'}, |
| | | {field: 'fusingPointMax', title: '最大熔点'}, |
| | | {field: 'yellownessMin', title: '最小黄度'}, |
| | | {field: 'yellownessMax', title: '最大黄度'}, |
| | | {field: 'opacityMin', title: '最小不透明度'}, |
| | | {field: 'opacityMax', title: '最大不透明度'}, |
| | | // ,{field: 'matnr', align: 'center',title: '商品编码', width: 160} |
| | | // ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} |
| | | ,{field: 'anfme', align: 'center',title: '总数量', style: 'font-weight: bold'} |
| | | ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '商品条码', hide: true} |
| | | // ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | // ,{field: 'barcode', align: 'center',title: '商品条码', hide: true} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160} |
| | | ]], |
| | | request: { |
| | |
| | | cols: [[ |
| | | // {type: 'checkbox', merge: ['orderNo']}, |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'hostId', title: 'id', align: 'center'}, |
| | | {field: 'batch', title: '批号', merge: true, align: 'center'}, |
| | | {field: 'packageNo', title: '包号', align: 'center'}, |
| | | {field: 'orderDetlId', title: 'id', align: 'center',hide:true}, |
| | | {field: 'qtyAnfme', title: '出库数量', align: 'center'}, |
| | | {field: 'locNo', title: '库位号', align: 'center',templet: '#locNoTpl'}, |
| | | // { title: '剩余需求量', align: 'center' , width: 120, toolbar: '#checkNeedQty'}, |
| | | // {field: 'anfme', title: '实际数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | { title: '出库数量', align: 'center',field: 'anfme', width: 90, style: 'font-weight: bold; color: red'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | // { title: '出库数量', align: 'center',field: 'anfme', width: 90, style: 'font-weight: bold; color: red'}, |
| | | // {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | // {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | // {type: 'checkbox', merge: ['locNo']}, |
| | | ]], |
| | | done: function (res) { |
| | |
| | | ,{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: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'barcode', align: 'center',title: '包号'} |
| | | // ,{field: 'matnr', align: 'center',title: '物料号'} |
| | | // ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'count', align: 'center',title: '完成数'} |
| | |
| | | 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].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"); |
| | | json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2¶m=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+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].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"); |
| | | json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2¶m=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+json.data[i].wrkNo+";"); |
| | | } |
| | | } |
| | | var tpl = templateDom.html(); |
| | |
| | | ,{field: 'yellowness', align: 'center',title: '黄度', hide:true} |
| | | ,{field: 'opacity', align: 'center',title: '不透明度(0-100%)', hide:true} |
| | | ,{field: 'water', align: 'center',title: '水分(ppm)', hide:true} |
| | | ,{field: 'l', align: 'center',title: 'l值', edit: true} |
| | | ,{field: 'a', align: 'center',title: 'a值', edit: true} |
| | | ,{field: 'b', align: 'center',title: 'b值', edit: true} |
| | | ,{field: 'fillIn', align: 'center',title: '填充(%)', edit: true} |
| | | ,{field: 'massState', align: 'center',title: '质量状态', hide:true} |
| | | ,{field: 'problem', align: 'center',title: '质量问题', hide:true} |
| | | ,{field: 'stash', align: 'center',title: '仓库', edit:true} |
| | |
| | | let dataOld = []; |
| | | for(var i=0; i<data.length; i++){ |
| | | if(data[i].LAY_CHECKED){ |
| | | if(!data[i].batch){ |
| | | if(!data[i].batch || !data[i].packageNo || !data[i].brand || !data[i].weight || !data[i].workshop || !data[i].line || !data[i].packageType || !data[i].zpalletType){ |
| | | layer.msg("有未填写字段"); |
| | | return; |
| | | } |
| | |
| | | dataOld.push(data[i]); |
| | | } |
| | | } |
| | | if(!dataSave || dataSave.length < 1){ |
| | | layer.msg("未勾选提交项,无法提交"); |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/pla/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | ,{field: 'yellowness', align: 'center',title: '黄度', edit: true} |
| | | ,{field: 'opacity', align: 'center',title: '不透明度(0-100%)', edit: true} |
| | | ,{field: 'water', align: 'center',title: '水分(ppm)', edit: true} |
| | | ,{field: 'l', align: 'center',title: 'l值', edit: true} |
| | | ,{field: 'a', align: 'center',title: 'a值', edit: true} |
| | | ,{field: 'b', align: 'center',title: 'b值', edit: true} |
| | | ,{field: 'fillIn', align: 'center',title: '填充(%)', edit: true} |
| | | ,{field: 'massState', align: 'center',title: '质量状态', edit: true} |
| | | ,{field: 'problem', align: 'center',title: '质量问题', edit: true} |
| | | ]; |
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/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline" > |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input class="layui-input" type="text" name="type" placeholder="类型" autocomplete="off"> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="roleQueryByleader" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="roleQueryByleaderSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <table class="layui-hide" id="configType" lay-filter="configType"></table> |
| | | <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" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="power">删除</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/configType/configType.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | </body> |
| | | </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/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <div class="layui-inline" style="width:45%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>类 型:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="type" class="layui-input" type="text" lay-verify="required" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:45%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>值:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="value" class="layui-input" type="text" lay-verify="required" > |
| | | </div> |
| | | </div> |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">保存</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <!-- <div id="prompt">--> |
| | | <!-- 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span>--> |
| | | <!-- </div>--> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <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/configType/configType.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| | |
| | | <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> |
| | | <label class="layui-form-label">批号 - 多选</label> |
| | | <div class="layui-input-block"> |
| | | <div id="mat" name="mat"> |
| | | </div> |
| | |
| | | |
| | | <script type="text/html" id="locNoTpl"> |
| | | <span name="locNo" |
| | | {{# if( d.lack === false){ }} |
| | | {{# if( d.locNo){ }} |
| | | class="layui-badge layui-badge-green" >{{d.locNo}}</span> |
| | | {{# } else { }} |
| | | class="layui-badge layui-badge-red" >库存不足</span> |
| | |
| | | <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}} |
| | | <!-- {{this.matnr}} -->{{this.batch}} |
| | | </td> |
| | | <td align="left" scope="col" colspan="1" rowspan="4"> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="100px"> |
| | |
| | | </tr> |
| | | <tr style="height: 25px;font-size: 15px;"> |
| | | <td align="left" scope="col" colspan="1" style="width: 100px;"> |
| | | 商品名: |
| | | <!-- 商品名:-->包号 |
| | | </td> |
| | | <td> |
| | | {{this.maktx}} |
| | | <!-- {{this.maktx}}--> {{this.barcode}} |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 25px; font-size: 15px;"> |
| | |
| | | transition: 0.4s; |
| | | cursor: pointer; |
| | | } |
| | | .function-btn1 { |
| | | font-size: 16px; |
| | | padding: 1px 1px 1px 1px; |
| | | width: 150px; |
| | | height: 40px; |
| | | border-color: #2b425b; |
| | | border-radius: 4px; |
| | | border-width: 1px; |
| | | background: none; |
| | | border-style: solid; |
| | | transition: 0.4s; |
| | | cursor: pointer; |
| | | } |
| | | .function-btn:hover { |
| | | background-color: #2b425b; |
| | | color: #fff; |
| | | } |
| | | .function-btn1:hover { |
| | | background-color: #2b425b; |
| | | color: #fff; |
| | | } |
| | |
| | | <!-- 功能区 --> |
| | | <div class="function-area"> |
| | | <button id="rework" style="alignment: right" class="function-btn">重做</button> |
| | | <button id="updateZpallet" style="alignment: right" class="function-btn1">换包装/托盘/缠膜</button> | |
| | | <button id="sellout" style="alignment: right" class="function-btn">卖出</button> |
| | | <button id="pickup" style="alignment: right" class="function-btn">取货</button> | |
| | | <button id="returned" style="alignment: right" class="function-btn">退回</button> |
| | | </div> |
| | | |
| | | <!-- 行 --> |