fix
This commit is contained in:
@@ -68,8 +68,9 @@ public class PdaServiceImpl implements PdaService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PdaResponseVo task(JSONObject param) {
|
public PdaResponseVo task(JSONObject param) {
|
||||||
param.put("request_medthod_code", "PONITTask");
|
param.put("request_medthod_code", "POINTTask");
|
||||||
param.put("request_medthod_name", "点对点任务");
|
param.put("request_medthod_name", "点对点任务");
|
||||||
|
param.put("device_code",param.getString("start_point"));
|
||||||
acsToWmsService.acsApply(param);
|
acsToWmsService.acsApply(param);
|
||||||
return PdaResponseVo.pdaResultOk("任务生成成功");
|
return PdaResponseVo.pdaResultOk("任务生成成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package org.nl.wms.sch.material.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.base.TableDataInfo;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.logging.annotation.Log;
|
||||||
|
import org.nl.wms.sch.material.service.IMaterialService;
|
||||||
|
import org.nl.wms.sch.material.service.dao.Material;
|
||||||
|
import org.nl.wms.sch.material.service.dto.MaterialQuery;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2023-05-16
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "组盘信息管理管理")
|
||||||
|
@RequestMapping("/api/material")
|
||||||
|
public class MaterialController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMaterialService materialService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询组盘信息管理")
|
||||||
|
@ApiOperation("查询组盘信息管理")
|
||||||
|
//@SaCheckPermission("@el.check('material:list')")
|
||||||
|
public ResponseEntity<Object> query(MaterialQuery whereJson, PageQuery page){
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(materialService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增组盘信息管理")
|
||||||
|
@ApiOperation("新增组盘信息管理")
|
||||||
|
//@SaCheckPermission("@el.check('material:add')")
|
||||||
|
public ResponseEntity<Object> create(@Validated @RequestBody Material entity){
|
||||||
|
materialService.create(entity);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Log("删除组盘信息管理")
|
||||||
|
@ApiOperation("删除组盘信息管理")
|
||||||
|
//@SaCheckPermission("@el.check('material:del')")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||||
|
materialService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package org.nl.wms.sch.material.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.wms.sch.material.service.dao.Material;
|
||||||
|
import org.nl.wms.sch.material.service.dto.MaterialQuery;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
|
public interface IMaterialService extends IService<Material> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
* @return IPage<Material>
|
||||||
|
*/
|
||||||
|
IPage<Material> queryAll(MaterialQuery whereJson, PageQuery pageable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
* @param entity /
|
||||||
|
*/
|
||||||
|
void create(Material entity);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(Set<String> ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package org.nl.wms.sch.material.service.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("sch_base_material")
|
||||||
|
public class Material implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ApiModelProperty(value = "入库单号")
|
||||||
|
private String simtOrderNo;
|
||||||
|
@ApiModelProperty(value = "场地")
|
||||||
|
private String locationCode;
|
||||||
|
@ApiModelProperty(value = "入库类型")
|
||||||
|
private String simtType;
|
||||||
|
@ApiModelProperty(value = "到货单号")
|
||||||
|
private String deliveryNo;
|
||||||
|
@ApiModelProperty(value = "扫描库位")
|
||||||
|
private String whlCode;
|
||||||
|
@ApiModelProperty(value = "托盘号")
|
||||||
|
private String palletSN;
|
||||||
|
@ApiModelProperty(value = "物料条码号")
|
||||||
|
private String lotSN;
|
||||||
|
@ApiModelProperty(value = "物料编码")
|
||||||
|
private String productName;
|
||||||
|
@ApiModelProperty(value = "物料名称")
|
||||||
|
private String productDescription;
|
||||||
|
@ApiModelProperty(value = "供应商编码")
|
||||||
|
private String supplierCode;
|
||||||
|
@ApiModelProperty(value = "供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty(value = "规格")
|
||||||
|
private String specification;
|
||||||
|
@ApiModelProperty(value = "批次号")
|
||||||
|
private String batch;
|
||||||
|
@ApiModelProperty(value = "数量")
|
||||||
|
private String qty;
|
||||||
|
@ApiModelProperty(value = "来料长度")
|
||||||
|
private String incomingLength;
|
||||||
|
@ApiModelProperty(value = "来料重量")
|
||||||
|
private String incomingWeight;
|
||||||
|
@ApiModelProperty(value = "来料缺陷长度")
|
||||||
|
private String incomingchipping;
|
||||||
|
@ApiModelProperty(value = "绑定状态")
|
||||||
|
private String group_bind_material_status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package org.nl.wms.sch.material.service.dao.mapper;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
|
||||||
|
import org.nl.wms.sch.group.service.dto.SchBaseVehiclematerialgroupQuery;
|
||||||
|
import org.nl.wms.sch.material.service.dao.Material;
|
||||||
|
import org.nl.wms.sch.material.service.dto.MaterialQuery;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2023-05-16
|
||||||
|
**/
|
||||||
|
public interface MaterialMapper extends BaseMapper<Material> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.nl.wms.sch.material.service.dao.mapper.MaterialMapper">
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package org.nl.wms.sch.material.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MaterialDto implements Serializable {
|
||||||
|
/** 入库单号 */
|
||||||
|
private String simtOrderNo;
|
||||||
|
/** 场地 */
|
||||||
|
private String locationCode;
|
||||||
|
/** 入库类型 */
|
||||||
|
private String simtType;
|
||||||
|
/** 到货单号 */
|
||||||
|
private String deliveryNo;
|
||||||
|
/** 扫描库位 */
|
||||||
|
private String whlCode;
|
||||||
|
/** 托盘号 */
|
||||||
|
private String palletSN;
|
||||||
|
/** 物料条码号 */
|
||||||
|
private String lotSN;
|
||||||
|
/** 物料编码 */
|
||||||
|
private String productName;
|
||||||
|
/** 物料名称 */
|
||||||
|
private String productDescription;
|
||||||
|
/** 供应商编码 */
|
||||||
|
private String supplierCode;
|
||||||
|
/** 供应商名称 */
|
||||||
|
private String supplierName;
|
||||||
|
/** 规格 */
|
||||||
|
private String specification;
|
||||||
|
/** 批次号 */
|
||||||
|
private String batch;
|
||||||
|
/** 数量 */
|
||||||
|
private String qty;
|
||||||
|
/** 来料长度 */
|
||||||
|
private String incomingLength;
|
||||||
|
/** 来料重量 */
|
||||||
|
private String incomingWeight;
|
||||||
|
/** 来料缺陷长度 */
|
||||||
|
private String incomingchipping;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package org.nl.wms.sch.material.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MaterialQuery implements Serializable {
|
||||||
|
//托盘号
|
||||||
|
private String palletSN;
|
||||||
|
//物料条码号
|
||||||
|
private String lotSN;
|
||||||
|
//物料名称
|
||||||
|
private String productName;
|
||||||
|
//供应商编码
|
||||||
|
private String productDescription;
|
||||||
|
//供应商名称
|
||||||
|
private String supplierCode;
|
||||||
|
//绑定状态
|
||||||
|
private String group_bind_material_status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package org.nl.wms.sch.material.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.wms.sch.material.service.IMaterialService;
|
||||||
|
import org.nl.wms.sch.material.service.dao.Material;
|
||||||
|
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper;
|
||||||
|
import org.nl.wms.sch.material.service.dto.MaterialQuery;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> implements IMaterialService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MaterialMapper materialMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<Material> queryAll(MaterialQuery whereJson, PageQuery page){
|
||||||
|
IPage<Material> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||||
|
LambdaQueryWrapper<Material> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getPalletSN()),Material::getPalletSN,whereJson.getPalletSN());
|
||||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getLotSN()),Material::getLotSN,whereJson.getLotSN());
|
||||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getProductName()),Material::getProductName,whereJson.getProductName());
|
||||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getSupplierCode()),Material::getSupplierCode,whereJson.getSupplierCode());
|
||||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getProductDescription()),Material::getProductDescription,whereJson.getProductDescription());
|
||||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getGroup_bind_material_status()),Material::getGroup_bind_material_status,whereJson.getGroup_bind_material_status());
|
||||||
|
pages = materialMapper.selectPage(pages, wrapper);
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(Material entity) {
|
||||||
|
materialMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteAll(Set<String> ids) {
|
||||||
|
// 真删除
|
||||||
|
materialMapper.deleteBatchIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -58,6 +58,9 @@ public class SchBasePoint implements Serializable {
|
|||||||
@ApiModelProperty(value = "载具编码")
|
@ApiModelProperty(value = "载具编码")
|
||||||
private String vehicle_code;
|
private String vehicle_code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "载具编码2")
|
||||||
|
private String vehicle_code2;
|
||||||
|
|
||||||
@ApiModelProperty(value = "载具数量")
|
@ApiModelProperty(value = "载具数量")
|
||||||
private Integer vehicle_qty;
|
private Integer vehicle_qty;
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ public class SchBaseTask implements Serializable {
|
|||||||
@ApiModelProperty(value = "载具编码")
|
@ApiModelProperty(value = "载具编码")
|
||||||
private String vehicle_code;
|
private String vehicle_code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "载具编码2")
|
||||||
|
private String vehicle_code2;
|
||||||
|
|
||||||
@ApiModelProperty(value = "处理状态")
|
@ApiModelProperty(value = "处理状态")
|
||||||
private String handle_status;
|
private String handle_status;
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ public class POINTTask extends AbstractTask {
|
|||||||
|
|
||||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||||
task.setRemark("");
|
task.setRemark("");
|
||||||
|
SchBasePoint schBasePoint= pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||||
|
.eq(SchBasePoint::getPoint_code, task.getPoint_code1()));
|
||||||
|
task.setVehicle_code(schBasePoint.getVehicle_code());
|
||||||
|
task.setVehicle_code2(schBasePoint.getVehicle_code2());
|
||||||
taskService.update(task);
|
taskService.update(task);
|
||||||
|
|
||||||
//发起任务时先把点位占用,防止发起重复任务
|
//发起任务时先把点位占用,防止发起重复任务
|
||||||
@@ -119,8 +123,8 @@ public class POINTTask extends AbstractTask {
|
|||||||
taskObj.setRemark("执行中");
|
taskObj.setRemark("执行中");
|
||||||
}
|
}
|
||||||
if (status.equals(TaskStatus.FINISHED)) { // 完成
|
if (status.equals(TaskStatus.FINISHED)) { // 完成
|
||||||
List<String> vehicleCodeList = Arrays.stream(startPointObj.getVehicle_code().split(",")).collect(Collectors.toList());
|
String vehicleCode=taskObj.getVehicle_code();
|
||||||
String vehicleCode=vehicleCodeList.get(vehicleCodeList.size()-1);
|
String vehicleCode2= taskObj.getVehicle_code2();
|
||||||
SchBaseVehiclematerialgroup one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
|
SchBaseVehiclematerialgroup one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
|
||||||
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
|
||||||
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
|
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
|
||||||
@@ -138,25 +142,37 @@ public class POINTTask extends AbstractTask {
|
|||||||
one.setUpdate_time(DateUtil.now());
|
one.setUpdate_time(DateUtil.now());
|
||||||
vehiclematerialgroupService.updateById(one);
|
vehiclematerialgroupService.updateById(one);
|
||||||
}
|
}
|
||||||
|
one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
|
||||||
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode2)
|
||||||
|
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
|
||||||
|
GroupBindMaterialStatusEnum.UNBOUND.getValue()));
|
||||||
|
if (ObjectUtil.isNotEmpty(one)) {
|
||||||
|
// throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
|
||||||
|
// }
|
||||||
|
one.setTask_code(taskObj.getTask_code());
|
||||||
|
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
|
||||||
|
one.setPoint_name(endPointObj.getPoint_name());
|
||||||
|
one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code());
|
||||||
|
one.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
|
||||||
|
one.setUpdate_id(GeneralDefinition.ACS_ID);
|
||||||
|
one.setUpdate_name(GeneralDefinition.ACS_NAME);
|
||||||
|
one.setUpdate_time(DateUtil.now());
|
||||||
|
vehiclematerialgroupService.updateById(one);
|
||||||
|
}
|
||||||
|
// 终点解锁
|
||||||
|
endPointObj.setIng_task_code("");
|
||||||
|
endPointObj.setVehicle_code(taskObj.getVehicle_code());
|
||||||
|
endPointObj.setVehicle_code2(taskObj.getVehicle_code2());
|
||||||
|
endPointObj.setVehicle_qty(1);
|
||||||
|
pointService.update(endPointObj);
|
||||||
// 起点清空
|
// 起点清空
|
||||||
if (vehicleCodeList.size()==1) {
|
startPointObj.setVehicle_code("");
|
||||||
startPointObj.setVehicle_code("");
|
startPointObj.setVehicle_code2("");
|
||||||
}else{
|
startPointObj.setVehicle_qty(0);
|
||||||
StringBuilder vehicle_code=new StringBuilder();
|
|
||||||
for(int i=0;i<=vehicleCodeList.size()-2;i++){
|
|
||||||
vehicle_code.append(vehicleCodeList.get(i)).append(',');
|
|
||||||
}
|
|
||||||
startPointObj.setVehicle_code(vehicle_code.toString());
|
|
||||||
}
|
|
||||||
if (!startPointObj.getPoint_code().startsWith("ZJBDJW")) {
|
|
||||||
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() - 1);
|
|
||||||
}
|
|
||||||
startPointObj.setIng_task_code("");
|
startPointObj.setIng_task_code("");
|
||||||
startPointObj.setUpdate_time(DateUtil.now());
|
startPointObj.setUpdate_time(DateUtil.now());
|
||||||
pointService.updateById(startPointObj);
|
pointService.updateById(startPointObj);
|
||||||
//包片上料完毕后,整排打上记号只允许包片上料
|
// 任务完成
|
||||||
pointMapper.updatePointType(endPointObj.getPoint_code().substring(0,endPointObj.getPoint_code().length()-2),"1");
|
|
||||||
// 任务完成
|
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
taskObj.setGroup_id(one.getGroup_id());
|
taskObj.setGroup_id(one.getGroup_id());
|
||||||
taskObj.setRemark("任务完成");
|
taskObj.setRemark("任务完成");
|
||||||
@@ -170,9 +186,6 @@ public class POINTTask extends AbstractTask {
|
|||||||
// 起点解锁
|
// 起点解锁
|
||||||
if (ObjectUtil.isNotEmpty(startPointObj)) {
|
if (ObjectUtil.isNotEmpty(startPointObj)) {
|
||||||
startPointObj.setIng_task_code("");
|
startPointObj.setIng_task_code("");
|
||||||
if (startPointObj.getPoint_code().startsWith("ZJBDJW")) {
|
|
||||||
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1);
|
|
||||||
}
|
|
||||||
pointService.update(endPointObj);
|
pointService.update(endPointObj);
|
||||||
}
|
}
|
||||||
taskObj.setRemark("任务取消");
|
taskObj.setRemark("任务取消");
|
||||||
|
|||||||
@@ -85,9 +85,13 @@ public class YCLCKTask extends AbstractTask {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 设置起点并修改创建成功状态
|
// 设置起点并修改创建成功状态
|
||||||
task.setPoint_code1(point.getPoint_code());
|
task.setPoint_code2(point.getPoint_code());
|
||||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||||
task.setRemark("");
|
task.setRemark("");
|
||||||
|
SchBasePoint schBasePoint= pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||||
|
.eq(SchBasePoint::getPoint_code, task.getPoint_code1()));
|
||||||
|
task.setVehicle_code(schBasePoint.getVehicle_code());
|
||||||
|
task.setVehicle_code2(schBasePoint.getVehicle_code2());
|
||||||
taskService.update(task);
|
taskService.update(task);
|
||||||
|
|
||||||
//发起任务时先把点位占用,防止发起重复任务
|
//发起任务时先把点位占用,防止发起重复任务
|
||||||
@@ -109,14 +113,13 @@ public class YCLCKTask extends AbstractTask {
|
|||||||
*/
|
*/
|
||||||
private SchBasePoint findNextPoint(SchBaseTask task) {
|
private SchBasePoint findNextPoint(SchBaseTask task) {
|
||||||
String regionCode = "HW";
|
String regionCode = "HW";
|
||||||
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"1");
|
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"0");
|
||||||
for(int i=schBasePointList.size()-1;i>=0;i--){
|
for (SchBasePoint schBasePoint : schBasePointList) {
|
||||||
SchBasePoint schBasePoint=schBasePointList.get(i);
|
|
||||||
//已锁定直接返回
|
//已锁定直接返回
|
||||||
if(task.getTask_code().equals(schBasePoint.getIng_task_code())){
|
if(task.getTask_code().equals(schBasePoint.getIng_task_code())){
|
||||||
return schBasePoint;
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
if ("2".equals(schBasePoint.getPoint_status())
|
if (schBasePoint.getIs_used()
|
||||||
&& schBasePoint.getVehicle_qty() ==0) {
|
&& schBasePoint.getVehicle_qty() ==0) {
|
||||||
log.info("原材料出库任务找到当前符合条件的缓存区位置{}",schBasePoint.getPoint_code());
|
log.info("原材料出库任务找到当前符合条件的缓存区位置{}",schBasePoint.getPoint_code());
|
||||||
return schBasePoint;
|
return schBasePoint;
|
||||||
@@ -149,8 +152,8 @@ public class YCLCKTask extends AbstractTask {
|
|||||||
taskObj.setRemark("执行中");
|
taskObj.setRemark("执行中");
|
||||||
}
|
}
|
||||||
if (status.equals(TaskStatus.FINISHED)) { // 完成
|
if (status.equals(TaskStatus.FINISHED)) { // 完成
|
||||||
List<String> vehicleCodeList = Arrays.stream(startPointObj.getVehicle_code().split(",")).collect(Collectors.toList());
|
String vehicleCode=taskObj.getVehicle_code();
|
||||||
String vehicleCode=vehicleCodeList.get(vehicleCodeList.size()-1);
|
String vehicleCode2= taskObj.getVehicle_code2();
|
||||||
SchBaseVehiclematerialgroup one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
|
SchBaseVehiclematerialgroup one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
|
||||||
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
|
||||||
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
|
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
|
||||||
@@ -162,30 +165,42 @@ public class YCLCKTask extends AbstractTask {
|
|||||||
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
|
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
|
||||||
one.setPoint_name(endPointObj.getPoint_name());
|
one.setPoint_name(endPointObj.getPoint_name());
|
||||||
one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code());
|
one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code());
|
||||||
one.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
|
one.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue());
|
||||||
one.setUpdate_id(GeneralDefinition.ACS_ID);
|
one.setUpdate_id(GeneralDefinition.ACS_ID);
|
||||||
one.setUpdate_name(GeneralDefinition.ACS_NAME);
|
one.setUpdate_name(GeneralDefinition.ACS_NAME);
|
||||||
one.setUpdate_time(DateUtil.now());
|
one.setUpdate_time(DateUtil.now());
|
||||||
vehiclematerialgroupService.updateById(one);
|
vehiclematerialgroupService.updateById(one);
|
||||||
}
|
}
|
||||||
|
one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
|
||||||
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode2)
|
||||||
|
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
|
||||||
|
GroupBindMaterialStatusEnum.BOUND.getValue()));
|
||||||
|
if (ObjectUtil.isNotEmpty(one)) {
|
||||||
|
// throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
|
||||||
|
// }
|
||||||
|
one.setTask_code(taskObj.getTask_code());
|
||||||
|
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
|
||||||
|
one.setPoint_name(endPointObj.getPoint_name());
|
||||||
|
one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code());
|
||||||
|
one.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue());
|
||||||
|
one.setUpdate_id(GeneralDefinition.ACS_ID);
|
||||||
|
one.setUpdate_name(GeneralDefinition.ACS_NAME);
|
||||||
|
one.setUpdate_time(DateUtil.now());
|
||||||
|
vehiclematerialgroupService.updateById(one);
|
||||||
|
}
|
||||||
|
// 终点解锁
|
||||||
|
endPointObj.setIng_task_code("");
|
||||||
|
endPointObj.setVehicle_code(taskObj.getVehicle_code());
|
||||||
|
endPointObj.setVehicle_code2(taskObj.getVehicle_code2());
|
||||||
|
endPointObj.setVehicle_qty(1);
|
||||||
|
endPointObj.setUpdate_time(DateUtil.now());
|
||||||
|
pointService.update(endPointObj);
|
||||||
// 起点清空
|
// 起点清空
|
||||||
if (vehicleCodeList.size()==1) {
|
startPointObj.setVehicle_code("");
|
||||||
startPointObj.setVehicle_code("");
|
startPointObj.setVehicle_code2("");
|
||||||
}else{
|
|
||||||
StringBuilder vehicle_code=new StringBuilder();
|
|
||||||
for(int i=0;i<=vehicleCodeList.size()-2;i++){
|
|
||||||
vehicle_code.append(vehicleCodeList.get(i)).append(',');
|
|
||||||
}
|
|
||||||
startPointObj.setVehicle_code(vehicle_code.toString());
|
|
||||||
}
|
|
||||||
if (!startPointObj.getPoint_code().startsWith("ZJBDJW")) {
|
|
||||||
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() - 1);
|
|
||||||
}
|
|
||||||
startPointObj.setIng_task_code("");
|
startPointObj.setIng_task_code("");
|
||||||
startPointObj.setUpdate_time(DateUtil.now());
|
startPointObj.setUpdate_time(DateUtil.now());
|
||||||
pointService.updateById(startPointObj);
|
pointService.updateById(startPointObj);
|
||||||
//包片上料完毕后,整排打上记号只允许包片上料
|
|
||||||
pointMapper.updatePointType(endPointObj.getPoint_code().substring(0,endPointObj.getPoint_code().length()-2),"1");
|
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
taskObj.setGroup_id(one.getGroup_id());
|
taskObj.setGroup_id(one.getGroup_id());
|
||||||
@@ -205,10 +220,7 @@ public class YCLCKTask extends AbstractTask {
|
|||||||
// 起点解锁
|
// 起点解锁
|
||||||
if (ObjectUtil.isNotEmpty(startPointObj)) {
|
if (ObjectUtil.isNotEmpty(startPointObj)) {
|
||||||
startPointObj.setIng_task_code("");
|
startPointObj.setIng_task_code("");
|
||||||
if (startPointObj.getPoint_code().startsWith("ZJBDJW")) {
|
pointService.update(startPointObj);
|
||||||
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1);
|
|
||||||
}
|
|
||||||
pointService.update(endPointObj);
|
|
||||||
}
|
}
|
||||||
taskObj.setRemark("任务取消");
|
taskObj.setRemark("任务取消");
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ public class YCLRKTask extends AbstractTask {
|
|||||||
task.setPoint_code2(point.getPoint_code());
|
task.setPoint_code2(point.getPoint_code());
|
||||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||||
task.setVehicle_code(jsonObject.getString("mother_tray"));
|
task.setVehicle_code(jsonObject.getString("mother_tray"));
|
||||||
|
task.setVehicle_code2(jsonObject.getString("sub_tray"));
|
||||||
task.setRemark("");
|
task.setRemark("");
|
||||||
taskService.update(task);
|
taskService.update(task);
|
||||||
|
|
||||||
@@ -117,7 +118,7 @@ public class YCLRKTask extends AbstractTask {
|
|||||||
String regionCode = "YL";
|
String regionCode = "YL";
|
||||||
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "0");
|
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "0");
|
||||||
for (SchBasePoint schBasePoint : schBasePointList) {
|
for (SchBasePoint schBasePoint : schBasePointList) {
|
||||||
if ("0".equals(schBasePoint.getPoint_status())
|
if (schBasePoint.getIs_used()
|
||||||
&& schBasePoint.getVehicle_qty() ==0) {
|
&& schBasePoint.getVehicle_qty() ==0) {
|
||||||
log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code());
|
log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code());
|
||||||
return schBasePoint;
|
return schBasePoint;
|
||||||
@@ -141,10 +142,6 @@ public class YCLRKTask extends AbstractTask {
|
|||||||
JSONObject extGroupData = ObjectUtil.isNotEmpty(taskObj.getExt_group_data())
|
JSONObject extGroupData = ObjectUtil.isNotEmpty(taskObj.getExt_group_data())
|
||||||
? JSONObject.parseObject(taskObj.getExt_group_data())
|
? JSONObject.parseObject(taskObj.getExt_group_data())
|
||||||
: null;
|
: null;
|
||||||
// 载具编码:没有就创建一个
|
|
||||||
String vehicle_code = ObjectUtil.isNotEmpty(taskObj.getVehicle_code())
|
|
||||||
? taskObj.getVehicle_code()
|
|
||||||
: IdUtil.getSnowflake(1, 1).nextIdStr();
|
|
||||||
PdmBdWorkorder workorderCode = null;
|
PdmBdWorkorder workorderCode = null;
|
||||||
if (extGroupData != null) {
|
if (extGroupData != null) {
|
||||||
workorderCode = ObjectUtil.isNotEmpty(extGroupData.getString("workorder_code"))
|
workorderCode = ObjectUtil.isNotEmpty(extGroupData.getString("workorder_code"))
|
||||||
@@ -168,39 +165,19 @@ public class YCLRKTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
// 终点解锁
|
// 终点解锁
|
||||||
endPointObj.setIng_task_code("");
|
endPointObj.setIng_task_code("");
|
||||||
endPointObj.setVehicle_code(ObjectUtil.isEmpty(endPointObj.getVehicle_code()) ? vehicle_code + "," : endPointObj.getVehicle_code() + vehicle_code + ",");
|
endPointObj.setVehicle_code(taskObj.getVehicle_code());
|
||||||
|
endPointObj.setVehicle_code2(taskObj.getVehicle_code2());
|
||||||
endPointObj.setVehicle_qty(1);
|
endPointObj.setVehicle_qty(1);
|
||||||
pointService.update(endPointObj);
|
pointService.update(endPointObj);
|
||||||
// 要把数据存到组盘表 -> 改造公共方法,返回id
|
// 要把数据存到组盘表 -> 改造公共方法,返回id
|
||||||
//todo 组盘表需要关联外部mes晶棒数据,一对多
|
//组盘表需要关联外部mes晶棒数据,一对多
|
||||||
SchBaseVehiclematerialgroup groupEntity = new SchBaseVehiclematerialgroup();
|
SchBaseVehiclematerialgroup groupEntity = getSchBaseVehiclematerialgroup(taskObj, extGroupData, workorderCode, startPoint, startPointObj);
|
||||||
|
groupEntity.setVehicle_code(taskObj.getVehicle_code());
|
||||||
|
groupEntity.setVehicle_type("0");
|
||||||
|
vehiclematerialgroupService.save(groupEntity);
|
||||||
groupEntity.setGroup_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
groupEntity.setGroup_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
groupEntity.setCreate_id("2");
|
groupEntity.setVehicle_code(taskObj.getVehicle_code2());
|
||||||
groupEntity.setCreate_name("ACS");
|
groupEntity.setVehicle_type("1");
|
||||||
groupEntity.setCreate_time(DateUtil.now());
|
|
||||||
groupEntity.setMaterial_id(ObjectUtil.isNotEmpty(workorderCode)
|
|
||||||
? workorderCode.getMaterial_id()
|
|
||||||
: "");
|
|
||||||
groupEntity.setStanding_time(ObjectUtil.isNotEmpty(workorderCode)
|
|
||||||
? workorderCode.getStanding_time()
|
|
||||||
: 0);
|
|
||||||
groupEntity.setMaterial_weight(ObjectUtil.isNotEmpty(extGroupData)
|
|
||||||
? extGroupData.getBigDecimal("material_qty")
|
|
||||||
: BigDecimal.valueOf(0));
|
|
||||||
groupEntity.setWorkorder_code(ObjectUtil.isNotEmpty(workorderCode)
|
|
||||||
? workorderCode.getWorkorder_code()
|
|
||||||
: "");
|
|
||||||
groupEntity.setVehicle_code(vehicle_code);
|
|
||||||
groupEntity.setVehicle_type(taskObj.getVehicle_type());
|
|
||||||
groupEntity.setPoint_code(startPoint);
|
|
||||||
groupEntity.setPoint_name(startPointObj.getPoint_name());
|
|
||||||
groupEntity.setPcsn(DateUtil.format(DateUtil.date(), "yyyyMMdd"));
|
|
||||||
groupEntity.setInstorage_time(DateUtil.now());
|
|
||||||
groupEntity.setTask_code(taskObj.getTask_code());
|
|
||||||
groupEntity.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue()); // 绑定
|
|
||||||
groupEntity.setGroup_status(GroupStatusEnum.IN_STORAGE.getType()); // 暂时不维护。
|
|
||||||
groupEntity.setIs_delete(false);
|
|
||||||
groupEntity.setMove_way(startPoint);
|
|
||||||
vehiclematerialgroupService.save(groupEntity);
|
vehiclematerialgroupService.save(groupEntity);
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
@@ -225,6 +202,36 @@ public class YCLRKTask extends AbstractTask {
|
|||||||
taskService.update(taskObj);
|
taskService.update(taskObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static SchBaseVehiclematerialgroup getSchBaseVehiclematerialgroup(SchBaseTask taskObj, JSONObject extGroupData, PdmBdWorkorder workorderCode, String startPoint, SchBasePoint startPointObj) {
|
||||||
|
SchBaseVehiclematerialgroup groupEntity = new SchBaseVehiclematerialgroup();
|
||||||
|
groupEntity.setGroup_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
groupEntity.setCreate_id("2");
|
||||||
|
groupEntity.setCreate_name("ACS");
|
||||||
|
groupEntity.setCreate_time(DateUtil.now());
|
||||||
|
groupEntity.setMaterial_id(ObjectUtil.isNotEmpty(workorderCode)
|
||||||
|
? workorderCode.getMaterial_id()
|
||||||
|
: "");
|
||||||
|
groupEntity.setStanding_time(ObjectUtil.isNotEmpty(workorderCode)
|
||||||
|
? workorderCode.getStanding_time()
|
||||||
|
: 0);
|
||||||
|
groupEntity.setMaterial_weight(ObjectUtil.isNotEmpty(extGroupData)
|
||||||
|
? extGroupData.getBigDecimal("material_qty")
|
||||||
|
: BigDecimal.valueOf(0));
|
||||||
|
groupEntity.setWorkorder_code(ObjectUtil.isNotEmpty(workorderCode)
|
||||||
|
? workorderCode.getWorkorder_code()
|
||||||
|
: "");
|
||||||
|
groupEntity.setPoint_code(startPoint);
|
||||||
|
groupEntity.setPoint_name(startPointObj.getPoint_name());
|
||||||
|
groupEntity.setPcsn(DateUtil.format(DateUtil.date(), "yyyyMMdd"));
|
||||||
|
groupEntity.setInstorage_time(DateUtil.now());
|
||||||
|
groupEntity.setTask_code(taskObj.getTask_code());
|
||||||
|
groupEntity.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue()); // 绑定
|
||||||
|
groupEntity.setGroup_status(GroupStatusEnum.IN_STORAGE.getType()); // 暂时不维护。
|
||||||
|
groupEntity.setIs_delete(false);
|
||||||
|
groupEntity.setMove_way(startPoint);
|
||||||
|
return groupEntity;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void forceFinish(String task_code) {
|
public void forceFinish(String task_code) {
|
||||||
this.updateStatus(task_code, TaskStatus.FINISHED);
|
this.updateStatus(task_code, TaskStatus.FINISHED);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
FROM
|
FROM
|
||||||
`sch_base_point` p
|
`sch_base_point` p
|
||||||
WHERE p.region_code like CONCAT('%', #{regionCode}, '%')
|
WHERE p.region_code like CONCAT('%', #{regionCode}, '%')
|
||||||
and p.point_status = #{point_status} and p.is_used = 1
|
and p.is_used = #{point_status} and p.is_used = 1
|
||||||
ORDER BY region_code
|
ORDER BY region_code
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -77,8 +77,14 @@
|
|||||||
<!--<el-form-item label="子载具编码">
|
<!--<el-form-item label="子载具编码">
|
||||||
<el-input v-model="form.child_vehicle_code" style="width: 240px;" />
|
<el-input v-model="form.child_vehicle_code" style="width: 240px;" />
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
<el-form-item v-if="false" label="来源载具">
|
<!-- <el-form-item v-if="false" label="来源载具">
|
||||||
<el-input v-model="form.source_vehicle_code" style="width: 240px;" />
|
<el-input v-model="form.source_vehicle_code" style="width: 240px;" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="托盘类型">
|
||||||
|
<el-radio-group v-model="form.vehicle_type" style="width: 240px">
|
||||||
|
<el-radio label="1">子托盘</el-radio>
|
||||||
|
<el-radio label="0">母托盘</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="入库时间">
|
<el-form-item label="入库时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -219,7 +225,12 @@
|
|||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
||||||
<!-- <el-table-column prop="child_vehicle_code" label="子载具编码" :min-width="flexWidth('child_vehicle_code',crud.data,'子载具编码')"/>-->
|
<!-- <el-table-column prop="child_vehicle_code" label="子载具编码" :min-width="flexWidth('child_vehicle_code',crud.data,'子载具编码')"/>-->
|
||||||
<el-table-column prop="source_vehicle_code" label="来源载具" :min-width="flexWidth('source_vehicle_code',crud.data,'来源载具')" />
|
<!-- <el-table-column prop="source_vehicle_code" label="来源载具" :min-width="flexWidth('source_vehicle_code',crud.data,'来源载具')" /> -->
|
||||||
|
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="region_name" label="所属区域" :min-width="flexWidth('region_name',crud.data,'所属区域')" />
|
<el-table-column prop="region_name" label="所属区域" :min-width="flexWidth('region_name',crud.data,'所属区域')" />
|
||||||
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" />
|
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" />
|
||||||
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
|
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
|
||||||
@@ -294,6 +305,7 @@ import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
|||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
group_id: null,
|
group_id: null,
|
||||||
vehicle_code: null,
|
vehicle_code: null,
|
||||||
|
vehicle_type: null,
|
||||||
material_id: null,
|
material_id: null,
|
||||||
child_vehicle_code: null,
|
child_vehicle_code: null,
|
||||||
source_vehicle_code: null,
|
source_vehicle_code: null,
|
||||||
@@ -325,7 +337,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'VehicleMaterialGroup',
|
name: 'VehicleMaterialGroup',
|
||||||
dicts: ['group_status', 'group_bind_material_status'],
|
dicts: ['group_status', 'group_bind_material_status', 'vehicle_type'],
|
||||||
components: { WorkOrderDialog, MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
components: { WorkOrderDialog, MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
|
|||||||
166
lms/nladmin-ui/src/views/wms/sch/material/MaterialDialog.vue
Normal file
166
lms/nladmin-ui/src/views/wms/sch/material/MaterialDialog.vue
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="物料选择"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
width="1000px"
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="物料名称">
|
||||||
|
<el-input
|
||||||
|
v-model="query.blurry"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="物料名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用">
|
||||||
|
<el-switch
|
||||||
|
v-model="query.is_used"
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
:data="crud.data"
|
||||||
|
style="width: 100%;"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
:cell-style="{'text-align':'center'}"
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||||
|
@select="handleSelectionChange"
|
||||||
|
@select-all="onSelectAll"
|
||||||
|
@current-change="clickChange"
|
||||||
|
>
|
||||||
|
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||||
|
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="material_code" label="物料编码" width="160" />
|
||||||
|
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="material_spec" label="物料规格" width="140" />
|
||||||
|
<!-- <el-table-column prop="class_name" label="物料分类" width="140" />-->
|
||||||
|
<el-table-column prop="standing_time" label="静置时间(分钟)" width="130px" />
|
||||||
|
<el-table-column prop="update_name" label="修改人" />
|
||||||
|
<el-table-column prop="update_time" label="修改时间" width="135" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submit">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { header, presenter } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'MaterialDialog',
|
||||||
|
components: { rrOperation, pagination },
|
||||||
|
dicts: ['is_used'],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '生产任务',
|
||||||
|
url: 'api/mdBaseMaterial',
|
||||||
|
optShow: {},
|
||||||
|
query: {
|
||||||
|
is_used: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
isSingle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
tableRadio: null,
|
||||||
|
tableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickChange(item) {
|
||||||
|
this.tableRadio = item
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleSelectionChange(val, row) {
|
||||||
|
if (val.length > 1) {
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
this.$refs.table.toggleRowSelection(val.pop())
|
||||||
|
} else {
|
||||||
|
this.checkrow = row
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSelectAll() {
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.crud.resetQuery(false)
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
// 处理单选
|
||||||
|
if (this.isSingle && this.tableRadio) {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.tableRadio)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.rows = this.$refs.table.selection
|
||||||
|
if (this.rows.length <= 0) {
|
||||||
|
this.$message('请先勾选物料')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.crud.resetQuery(false)
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.rows)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep .el-dialog__body {
|
||||||
|
padding-top: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
153
lms/nladmin-ui/src/views/wms/sch/material/WorkOrderDialog.vue
Normal file
153
lms/nladmin-ui/src/views/wms/sch/material/WorkOrderDialog.vue
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="工单选择"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
width="1000px"
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="工单编号">
|
||||||
|
<el-input
|
||||||
|
v-model="query.workorder_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="工单编号"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
:data="crud.data"
|
||||||
|
style="width: 100%;"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
:cell-style="{'text-align':'center'}"
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||||
|
@select="handleSelectionChange"
|
||||||
|
@select-all="onSelectAll"
|
||||||
|
@current-change="clickChange"
|
||||||
|
>
|
||||||
|
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||||
|
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="workorder_code" label="工单编号" width="120px" />
|
||||||
|
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
||||||
|
<el-table-column prop="workshop_code" label="所属车间" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="update_name" label="修改人" />
|
||||||
|
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submit">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { header, presenter } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WorkOrderDialog',
|
||||||
|
components: { rrOperation, pagination },
|
||||||
|
dicts: ['is_used', 'vehicle_type'],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({ title: '生产工单', url: 'api/pdmBdWorkorder', optShow: {}})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
isSingle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
tableRadio: null,
|
||||||
|
tableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickChange(item) {
|
||||||
|
this.tableRadio = item
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleSelectionChange(val, row) {
|
||||||
|
if (val.length > 1) {
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
this.$refs.table.toggleRowSelection(val.pop())
|
||||||
|
} else {
|
||||||
|
this.checkrow = row
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSelectAll() {
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.crud.resetQuery(false)
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
// 处理单选
|
||||||
|
if (this.isSingle && this.tableRadio) {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.tableRadio)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.rows = this.$refs.table.selection
|
||||||
|
if (this.rows.length <= 0) {
|
||||||
|
this.$message('请先勾选物料')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.crud.resetQuery(false)
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.rows)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep .el-dialog__body {
|
||||||
|
padding-top: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
409
lms/nladmin-ui/src/views/wms/sch/material/index.vue
Normal file
409
lms/nladmin-ui/src/views/wms/sch/material/index.vue
Normal file
@@ -0,0 +1,409 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="90px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="托盘号">
|
||||||
|
<el-input
|
||||||
|
v-model="query.palletSN"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="托盘号"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料条码号">
|
||||||
|
<el-input
|
||||||
|
v-model="query.lotSN"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="物料条码号"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称">
|
||||||
|
<el-input
|
||||||
|
v-model="query.productName"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="物料名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="供应商编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.productDescription"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="供应商编码"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="供应商名称">
|
||||||
|
<el-input
|
||||||
|
v-model="query.supplierCode"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="供应商名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="绑定状态">
|
||||||
|
<el-select
|
||||||
|
v-model="query.group_bind_material_status"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="绑定状态"
|
||||||
|
class="filter-item"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.group_bind_material_status"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
|
||||||
|
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="115px" label-suffix=":">
|
||||||
|
<el-form-item label="载具编码">
|
||||||
|
<el-input v-model="form.vehicle_code" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<!--<el-form-item label="子载具编码">
|
||||||
|
<el-input v-model="form.child_vehicle_code" style="width: 240px;" />
|
||||||
|
</el-form-item>-->
|
||||||
|
<!-- <el-form-item v-if="false" label="来源载具">
|
||||||
|
<el-input v-model="form.source_vehicle_code" style="width: 240px;" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="托盘类型">
|
||||||
|
<el-radio-group v-model="form.vehicle_type" style="width: 240px">
|
||||||
|
<el-radio label="1">子托盘</el-radio>
|
||||||
|
<el-radio label="0">母托盘</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入库时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.instorage_time"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 240px;"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位编码">
|
||||||
|
<el-select
|
||||||
|
v-model="form.point_code"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 240px;"
|
||||||
|
@change="setPointName"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in pointList"
|
||||||
|
:key="item.point_code"
|
||||||
|
:label="item.point_code"
|
||||||
|
:value="item.point_code"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ item.point_name }}</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.point_code }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-input v-model="form.point_code" style="width: 240px;" />-->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位名称">
|
||||||
|
<el-input v-model="form.point_name" style="width: 240px;" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否满托">
|
||||||
|
<el-radio-group v-model="form.is_full" style="width: 240px">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批次">
|
||||||
|
<el-input v-model="form.pcsn" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="静置时间(分钟)">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="form.standing_time"
|
||||||
|
:min="1"
|
||||||
|
:max="999"
|
||||||
|
style="width: 240px;"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="form.material_qty"
|
||||||
|
:min="0"
|
||||||
|
style="width: 240px;"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料重量">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="form.material_weight"
|
||||||
|
:min="0"
|
||||||
|
style="width: 240px;"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工单编码">
|
||||||
|
<el-input v-model="form.workorder_code" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料来源">
|
||||||
|
<el-radio-group v-model="choose" size="mini" style="width: 240px;">
|
||||||
|
<el-radio-button label="物料" />
|
||||||
|
<el-radio-button label="工单" />
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="物料名称">
|
||||||
|
<el-input v-model="form.material_id" suffix-icon="el-icon-date" clearable style="width: 370px;" @focus="getMaterial" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称">
|
||||||
|
<el-input v-model="form.material_name" clearable style="width: 240px;" @clear="clearMaterial" @focus="getMaterial" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料编码">
|
||||||
|
<el-input v-model="form.material_code" disabled style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料规格">
|
||||||
|
<el-input v-model="form.material_spec" disabled style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="组盘次数">
|
||||||
|
<el-input v-model="form.group_number" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务编码">
|
||||||
|
<el-input v-model="form.task_code" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<!--<el-form-item label="车间编码">
|
||||||
|
<el-input v-model="form.workshop_code" style="width: 240px;" />
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="组盘状态">
|
||||||
|
<el-select
|
||||||
|
v-model="form.group_status"
|
||||||
|
size="mini"
|
||||||
|
placeholder="点位状态"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 240px;"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.group_status"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!--<el-form-item label="是否首个流程任务">
|
||||||
|
<el-input v-model="form.is_first_flow_task" style="width: 240px;" />
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="流程编码">
|
||||||
|
<el-input v-model="form.flow_code" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="流程顺序">
|
||||||
|
<el-input v-model="form.flow_num" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上一任务">
|
||||||
|
<el-input v-model="form.before_task_code" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下一任务">
|
||||||
|
<el-input v-model="form.next_task_code" style="width: 240px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<label slot="label">备 注:</label>
|
||||||
|
<el-input v-model.trim="form.remark" style="width: 480px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="simtOrderNo" label="入库单号" :min-width="flexWidth('simtOrderNo',crud.data,'入库单号')" />
|
||||||
|
<el-table-column prop="locationCode" label="场地" :min-width="flexWidth('locationCode',crud.data,'场地')" />
|
||||||
|
<el-table-column prop="simtType" label="入库类型" :min-width="flexWidth('simtType',crud.data,'入库类型')" />
|
||||||
|
<el-table-column prop="deliveryNo" label="到货单号" :min-width="flexWidth('deliveryNo',crud.data,'到货单号')" />
|
||||||
|
<el-table-column prop="whlCode" label="扫描库位" :min-width="flexWidth('whlCode',crud.data,'扫描库位')" />
|
||||||
|
<el-table-column prop="palletSN" label="托盘号" :min-width="flexWidth('palletSN',crud.data,'托盘号')" />
|
||||||
|
<el-table-column prop="lotSN" label="物料条码号" :min-width="flexWidth('lotSN',crud.data,'物料条码号')" />
|
||||||
|
<el-table-column prop="productName" label="物料编码" :min-width="flexWidth('productName',crud.data,'物料编码')" />
|
||||||
|
<el-table-column prop="productDescription" label="物料名称" :min-width="flexWidth('productDescription',crud.data,'物料名称')" />
|
||||||
|
<el-table-column prop="supplierCode" label="供应商编码" :min-width="flexWidth('supplierCode',crud.data,'供应商编码')" />
|
||||||
|
<el-table-column prop="supplierName" label="供应商名称" :min-width="flexWidth('supplierName',crud.data,'供应商名称')" />
|
||||||
|
<el-table-column prop="specification" label="规格" :min-width="flexWidth('specification',crud.data,'规格')" />
|
||||||
|
<el-table-column prop="batch" label="批次号" :min-width="flexWidth('batch',crud.data,'批次号')" />
|
||||||
|
<el-table-column prop="qty" label="数量" :min-width="flexWidth('qty',crud.data,'数量')" />
|
||||||
|
<el-table-column prop="incomingLength" label="来料长度" :min-width="flexWidth('incomingLength',crud.data,'来料长度')" />
|
||||||
|
<el-table-column prop="incomingWeight" label="来料重量" :min-width="flexWidth('incomingWeight',crud.data,'来料重量')" />
|
||||||
|
<el-table-column prop="incomingchipping" label="来料缺陷长度" :min-width="flexWidth('incomingchipping',crud.data,'来料缺陷长度')" />
|
||||||
|
<el-table-column prop="group_bind_material_status" label="绑定状态" :min-width="flexWidth('group_bind_material_status',crud.data,'入库时间')">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.group_bind_material_status[scope.row.group_bind_material_status] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
<MaterialDialog :dialog-show.sync="materialDialog" @tableChanged="tableChanged" />
|
||||||
|
<WorkOrderDialog :dialog-show.sync="workOrderDialog" @tableChanged="tableChanged" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudMaterial from './material'
|
||||||
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||||||
|
import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue'
|
||||||
|
import WorkOrderDialog from '@/views/wms/sch/group/WorkOrderDialog.vue'
|
||||||
|
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||||
|
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
||||||
|
|
||||||
|
const defaultForm = {
|
||||||
|
group_id: null,
|
||||||
|
vehicle_code: null,
|
||||||
|
vehicle_type: null,
|
||||||
|
material_id: null,
|
||||||
|
child_vehicle_code: null,
|
||||||
|
source_vehicle_code: null,
|
||||||
|
point_code: null,
|
||||||
|
point_name: null,
|
||||||
|
is_full: true,
|
||||||
|
pcsn: null,
|
||||||
|
instorage_time: null,
|
||||||
|
standing_time: null,
|
||||||
|
material_qty: null,
|
||||||
|
material_weight: null,
|
||||||
|
workorder_code: null,
|
||||||
|
group_number: null,
|
||||||
|
task_code: null,
|
||||||
|
ext_data: null,
|
||||||
|
workshop_code: null,
|
||||||
|
group_status: null,
|
||||||
|
table_name: null,
|
||||||
|
table_fk: null,
|
||||||
|
table_fk_id: null,
|
||||||
|
buss_move_id: null,
|
||||||
|
is_first_flow_task: true,
|
||||||
|
flow_code: null,
|
||||||
|
flow_num: null,
|
||||||
|
before_task_code: null,
|
||||||
|
next_task_code: null,
|
||||||
|
remark: null,
|
||||||
|
is_delete: false
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'VehicleMaterialGroup',
|
||||||
|
dicts: ['group_status', 'group_bind_material_status','vehicle_type'],
|
||||||
|
components: { WorkOrderDialog, MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '组盘信息管理',
|
||||||
|
url: 'api/material',
|
||||||
|
idField: 'group_id',
|
||||||
|
sort: 'vehicle_code,desc',
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: false,
|
||||||
|
del: true,
|
||||||
|
download: false,
|
||||||
|
reset: true
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
group_bind_material_status: '2'
|
||||||
|
},
|
||||||
|
crudMethod: { ...crudMaterial }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
permission: {
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
},
|
||||||
|
workShopList: [],
|
||||||
|
pointList: [],
|
||||||
|
regionList: [],
|
||||||
|
choose: '物料',
|
||||||
|
materialDialog: false,
|
||||||
|
workOrderDialog: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getWorkShopList()
|
||||||
|
this.getPointList()
|
||||||
|
this.getRegionList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
getWorkShopList() { // 获取车间列表
|
||||||
|
crudMdBaseWorkShop.getWorkShopList().then(res => {
|
||||||
|
this.workShopList = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getRegionList() {
|
||||||
|
crudSchBaseRegion.getRegionList().then(res => {
|
||||||
|
this.regionList = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getMaterial() {
|
||||||
|
if (this.choose === '物料') {
|
||||||
|
this.materialDialog = true
|
||||||
|
} else {
|
||||||
|
this.workOrderDialog = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getPointList() { // 获取点位列表
|
||||||
|
crudSchBasePoint.getPointList().then(res => {
|
||||||
|
this.pointList = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableChanged(row) {
|
||||||
|
this.form.material_name = row.material_name
|
||||||
|
this.form.material_id = row.material_id
|
||||||
|
this.form.material_spec = row.material_spec
|
||||||
|
this.form.material_code = row.material_code
|
||||||
|
if (this.choose === '工单') {
|
||||||
|
this.form.workorder_code = row.workorder_code
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clearMaterial() {
|
||||||
|
this.form.material_name = null
|
||||||
|
this.form.material_id = null
|
||||||
|
this.form.material_spec = null
|
||||||
|
this.form.material_code = null
|
||||||
|
},
|
||||||
|
setPointName(data) {
|
||||||
|
var point = this.pointList.find(item => item.point_code === data)
|
||||||
|
this.form.point_name = point.point_name
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
35
lms/nladmin-ui/src/views/wms/sch/material/material.js
Normal file
35
lms/nladmin-ui/src/views/wms/sch/material/material.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/material',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/material/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/material',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getGroup(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/material/getGroup',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, getGroup }
|
||||||
@@ -214,6 +214,9 @@
|
|||||||
<el-form-item v-if="form.point_status !== '1'" label="载具编码" prop="vehicle_code">
|
<el-form-item v-if="form.point_status !== '1'" label="载具编码" prop="vehicle_code">
|
||||||
<el-input v-model="form.vehicle_code" clearable style="width: 370px;" />
|
<el-input v-model="form.vehicle_code" clearable style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.point_status !== '1'" label="子载具编码" prop="vehicle_code2">
|
||||||
|
<el-input v-model="form.vehicle_code2" clearable style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
<!-- <el-form-item label="可放载具类型" prop="can_vehicle_types">
|
<!-- <el-form-item label="可放载具类型" prop="can_vehicle_types">
|
||||||
<el-select v-model="form.can_vehicle_types" multiple placeholder="请选择" clearable style="width: 370px;">
|
<el-select v-model="form.can_vehicle_types" multiple placeholder="请选择" clearable style="width: 370px;">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -259,8 +262,9 @@
|
|||||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column prop="vehicle_type" label="物料类型" :min-width="flexWidth('vehicle_type',crud.data,'物料类型')" />
|
<!-- <el-table-column prop="vehicle_type" label="物料类型" :min-width="flexWidth('vehicle_type',crud.data,'物料类型')" /> -->
|
||||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
||||||
|
<el-table-column prop="vehicle_code2" label="子载具编码" :min-width="flexWidth('vehicle_code2',crud.data,'子载具编码')" />
|
||||||
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
|
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
|
||||||
<el-table-column label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')">
|
<el-table-column label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|||||||
Reference in New Issue
Block a user