rev:烘干出库流程修改
This commit is contained in:
@@ -88,4 +88,11 @@ public class GroupController {
|
|||||||
iMdPbGroupplateService.create(dto);
|
iMdPbGroupplateService.create(dto);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/printDelete")
|
||||||
|
@Log("打印物料标签后删除")
|
||||||
|
public ResponseEntity<Object> printDelete(@RequestBody GroupPlate dto) {
|
||||||
|
iMdPbGroupplateService.printDelete(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ public class PdmBomCallMaterial implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String material_id;
|
private String material_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型
|
||||||
|
* 1-生产领料,2-烘干领料
|
||||||
|
*/
|
||||||
|
private String bom_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 叫料单号
|
* 叫料单号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
dtl.*,
|
dtl.*,
|
||||||
mst.bom_code,
|
mst.bom_code,
|
||||||
|
mst.bom_type,
|
||||||
mst.device_code,
|
mst.device_code,
|
||||||
mater.material_code,
|
mater.material_code,
|
||||||
mater.material_name,
|
mater.material_name,
|
||||||
@@ -35,6 +36,11 @@
|
|||||||
mst.bom_code LIKE #{param.bom_code}
|
mst.bom_code LIKE #{param.bom_code}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="param.bom_type != null and param.bom_type != ''">
|
||||||
|
AND
|
||||||
|
mst.bom_type = #{param.bom_type}
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="param.bom_status != null and param.bom_status != ''">
|
<if test="param.bom_status != null and param.bom_status != ''">
|
||||||
AND
|
AND
|
||||||
dtl.bom_status = #{param.bom_status}
|
dtl.bom_status = #{param.bom_status}
|
||||||
|
|||||||
@@ -34,6 +34,11 @@
|
|||||||
bom.bom_status = #{param.bom_status}
|
bom.bom_status = #{param.bom_status}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="param.bom_type != null and param.bom_type != ''">
|
||||||
|
AND
|
||||||
|
bom.bom_type = #{param.bom_type}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
ORDER BY bom.create_time Desc
|
ORDER BY bom.create_time Desc
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ public class PdmBomCallMaterialDtlDto extends PdmBomCallMaterialDtl {
|
|||||||
*/
|
*/
|
||||||
private String bom_code;
|
private String bom_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型
|
||||||
|
*/
|
||||||
|
private String bom_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库区名称
|
* 库区名称
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.nl.wms.pdm_manage.service.impl;
|
package org.nl.wms.pdm_manage.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -18,6 +18,7 @@ import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialService;
|
|||||||
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterial;
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterial;
|
||||||
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
import org.nl.wms.pdm_manage.service.dao.mapper.PdmBomCallMaterialMapper;
|
import org.nl.wms.pdm_manage.service.dao.mapper.PdmBomCallMaterialMapper;
|
||||||
|
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDtlDto;
|
||||||
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDto;
|
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -26,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -125,16 +127,16 @@ public class PdmBomCallMaterialServiceImpl extends ServiceImpl<PdmBomCallMateria
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void confirm(PdmBomCallMaterial dao) {
|
public void confirm(PdmBomCallMaterial dao) {
|
||||||
// 更新主表为完成
|
List<PdmBomCallMaterialDtlDto> dtlDtoList = iPdmBomCallMaterialDtlService.list(
|
||||||
dao.setBom_status(BomEnum.CALL_BOM_STATUS.code("完成"));
|
new QueryWrapper<PdmBomCallMaterialDtl>().lambda()
|
||||||
dao.setReal_weigh_qty(dao.getReal_qty());
|
.eq(PdmBomCallMaterialDtl::getBom_id, dao.getBom_id())
|
||||||
this.updateById(dao);
|
.ne(PdmBomCallMaterialDtl::getBom_status, BomEnum.CALL_BOM_DTL_STATUS.code("完成"))
|
||||||
|
).stream()
|
||||||
|
.map(row -> JSONObject.parseObject(JSONObject.toJSONString(row), PdmBomCallMaterialDtlDto.class))
|
||||||
|
.collect(Collectors.toList());
|
||||||
// 更新明细为完成
|
// 更新明细为完成
|
||||||
iPdmBomCallMaterialDtlService.update(
|
for (PdmBomCallMaterialDtlDto dtlDto : dtlDtoList) {
|
||||||
new UpdateWrapper<PdmBomCallMaterialDtl>().lambda()
|
iPdmBomCallMaterialDtlService.confirm(dtlDto);
|
||||||
.set(PdmBomCallMaterialDtl::getBom_status, BomEnum.CALL_BOM_DTL_STATUS.code("完成"))
|
}
|
||||||
.eq(PdmBomCallMaterialDtl::getBom_id, dao.getBom_id())
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,16 @@ package org.nl.wms.sch_manage.service.util.tasks;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.IdUtil;
|
import org.nl.config.IdUtil;
|
||||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||||
|
import org.nl.wms.pdm_manage.enums.BomEnum;
|
||||||
|
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialDtlService;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
import org.nl.wms.sch_manage.enums.TaskEnum;
|
import org.nl.wms.sch_manage.enums.TaskEnum;
|
||||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
import org.nl.wms.sch_manage.enums.TaskStatus;
|
||||||
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||||
@@ -23,7 +27,9 @@ import org.nl.wms.warehouse_management.enums.IOSConstant;
|
|||||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||||
import org.nl.wms.warehouse_management.service.IOutBillService;
|
import org.nl.wms.warehouse_management.service.IOutBillService;
|
||||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
||||||
|
import org.nl.wms.warehouse_management.service.dao.IOStorInvDtl;
|
||||||
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
||||||
|
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDtlMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -66,6 +72,18 @@ public class HotOutTask extends AbstractTask {
|
|||||||
@Resource
|
@Resource
|
||||||
private ISchBasePointService iSchBasePointService;
|
private ISchBasePointService iSchBasePointService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明细mapper
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private IOStorInvDtlMapper ioStorInvDtlMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料单服务
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private IPdmBomCallMaterialDtlService iPdmBomCallMaterialDtlService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String create(JSONObject json) {
|
public String create(JSONObject json) {
|
||||||
SchBaseTask task = new SchBaseTask();
|
SchBaseTask task = new SchBaseTask();
|
||||||
@@ -211,6 +229,28 @@ public class HotOutTask extends AbstractTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void taskConfirm(String task_code) {
|
public void taskConfirm(String task_code) {
|
||||||
|
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||||
|
IOStorInvDis disDao = ioStorInvDisMapper.selectOne(
|
||||||
|
new QueryWrapper<IOStorInvDis>().lambda()
|
||||||
|
.eq(IOStorInvDis::getTask_id, taskObj.getTask_id())
|
||||||
|
);
|
||||||
|
IOStorInvDtl stDtlDao = ioStorInvDtlMapper.selectById(disDao.getIostorinvdtl_id());
|
||||||
|
|
||||||
|
// 创建退料明细
|
||||||
|
PdmBomCallMaterialDtl materDtlDao = new PdmBomCallMaterialDtl();
|
||||||
|
materDtlDao.setBomdtl_id(IdUtil.getStringId());
|
||||||
|
materDtlDao.setBom_id(stDtlDao.getSource_billdtl_id());
|
||||||
|
materDtlDao.setMaterial_id(disDao.getMaterial_id());
|
||||||
|
materDtlDao.setPcsn(disDao.getPcsn());
|
||||||
|
materDtlDao.setVehicle_code(disDao.getStoragevehicle_code());
|
||||||
|
materDtlDao.setStruct_code(disDao.getStruct_code());
|
||||||
|
materDtlDao.setBom_status(BomEnum.CALL_BOM_DTL_STATUS.code("生成"));
|
||||||
|
materDtlDao.setOut_dis_id(disDao.getIostorinvdis_id());
|
||||||
|
materDtlDao.setOut_qty(disDao.getReal_qty());
|
||||||
|
materDtlDao.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
materDtlDao.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
materDtlDao.setCreate_time(DateUtil.now());
|
||||||
|
iPdmBomCallMaterialDtlService.save(materDtlDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -80,4 +80,10 @@ public interface IMdPbGroupplateService extends IService<GroupPlate> {
|
|||||||
* @param ids 标识集合
|
* @param ids 标识集合
|
||||||
*/
|
*/
|
||||||
void delete(Set<String> ids);
|
void delete(Set<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印物料标签后删除
|
||||||
|
* @param dto 实体类
|
||||||
|
*/
|
||||||
|
void printDelete(GroupPlate dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,4 +119,14 @@ public class GroupPlate implements Serializable {
|
|||||||
* 组盘时间
|
* 组盘时间
|
||||||
*/
|
*/
|
||||||
private String create_time;
|
private String create_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库业务类型
|
||||||
|
*/
|
||||||
|
private String out_type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印标签后是否删除
|
||||||
|
*/
|
||||||
|
private String is_need_delete;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -151,4 +152,12 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
|||||||
public void delete(Set<String> ids) {
|
public void delete(Set<String> ids) {
|
||||||
this.baseMapper.deleteBatchIds(ids);
|
this.baseMapper.deleteBatchIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void printDelete(GroupPlate dto) {
|
||||||
|
Set<String> set = new HashSet<>();
|
||||||
|
set.add(dto.getGroup_id());
|
||||||
|
delete(set);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import org.nl.common.exception.BadRequestException;
|
|||||||
import org.nl.common.utils.CodeUtil;
|
import org.nl.common.utils.CodeUtil;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.IdUtil;
|
import org.nl.config.IdUtil;
|
||||||
import org.nl.config.SpringContextHolder;
|
|
||||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||||
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
|
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
|
||||||
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleextService;
|
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleextService;
|
||||||
@@ -33,7 +32,6 @@ import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialService;
|
|||||||
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterial;
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterial;
|
||||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
import org.nl.wms.sch_manage.enums.TaskStatus;
|
||||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
|
||||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||||
import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
|
import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
|
||||||
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
||||||
@@ -462,12 +460,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||||
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
||||||
play_qty = NumberUtil.add(play_qty,unassign_qty);
|
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||||
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
||||||
play_qty = NumberUtil.add(play_qty,unassign_qty);
|
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||||
}
|
}
|
||||||
unassign_qty = 0;
|
unassign_qty = 0;
|
||||||
}
|
}
|
||||||
@@ -703,12 +701,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||||
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
||||||
play_qty = NumberUtil.add(play_qty,unassign_qty);
|
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||||
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
||||||
play_qty = NumberUtil.add(play_qty,unassign_qty);
|
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||||
}
|
}
|
||||||
unassign_qty = 0;
|
unassign_qty = 0;
|
||||||
}
|
}
|
||||||
@@ -936,12 +934,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||||
ioStorInvDis.setCheck_qty(ivt.getBigDecimal("canuse_qty"));
|
ioStorInvDis.setCheck_qty(ivt.getBigDecimal("canuse_qty"));
|
||||||
play_qty = NumberUtil.add(play_qty,unassign_qty);
|
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||||
ioStorInvDis.setCheck_qty(ivt.getBigDecimal("canuse_qty"));
|
ioStorInvDis.setCheck_qty(ivt.getBigDecimal("canuse_qty"));
|
||||||
play_qty = NumberUtil.add(play_qty,unassign_qty);
|
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||||
}
|
}
|
||||||
unassign_qty = 0;
|
unassign_qty = 0;
|
||||||
}
|
}
|
||||||
@@ -1139,7 +1137,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
|
|
||||||
for (IOStorInvDis ioStorInvDis : ioStorInvDisList) {
|
for (IOStorInvDis ioStorInvDis : ioStorInvDisList) {
|
||||||
// 创建任务
|
// 创建任务
|
||||||
iOutBillService.createTask(ioStorInvDis,point_code,ioStorInv);
|
iOutBillService.createTask(ioStorInvDis, point_code, ioStorInv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1205,7 +1203,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
.eq(Structattr::getPlacement_type, IOSEnum.PLACEMENT_TYPE.code("浅货位"))
|
.eq(Structattr::getPlacement_type, IOSEnum.PLACEMENT_TYPE.code("浅货位"))
|
||||||
);
|
);
|
||||||
if (ObjectUtil.isEmpty(shallowAttr)) {
|
if (ObjectUtil.isEmpty(shallowAttr)) {
|
||||||
throw new BadRequestException("仓位【"+ioStorInvDis.getStruct_code()+"】对应的浅货位不存在,请检查数据!");
|
throw new BadRequestException("仓位【" + ioStorInvDis.getStruct_code() + "】对应的浅货位不存在,请检查数据!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断浅货位是否有货
|
// 判断浅货位是否有货
|
||||||
@@ -1224,14 +1222,14 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
// 更新起点锁类型
|
// 更新起点锁类型
|
||||||
iStructattrService.update(
|
iStructattrService.update(
|
||||||
new UpdateWrapper<Structattr>().lambda()
|
new UpdateWrapper<Structattr>().lambda()
|
||||||
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("移出锁"))
|
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("移出锁"))
|
||||||
.eq(Structattr::getStruct_code, jsonMoveTask.getString("point_code1"))
|
.eq(Structattr::getStruct_code, jsonMoveTask.getString("point_code1"))
|
||||||
);
|
);
|
||||||
// 更新终点锁类型
|
// 更新终点锁类型
|
||||||
iStructattrService.update(
|
iStructattrService.update(
|
||||||
new UpdateWrapper<Structattr>().lambda()
|
new UpdateWrapper<Structattr>().lambda()
|
||||||
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("移入锁"))
|
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("移入锁"))
|
||||||
.eq(Structattr::getStruct_code, jsonMoveTask.getString("point_code2"))
|
.eq(Structattr::getStruct_code, jsonMoveTask.getString("point_code2"))
|
||||||
);
|
);
|
||||||
// 更新分配明细新仓位
|
// 更新分配明细新仓位
|
||||||
ioStorInvDis.setStruct_id(shallowAttr.getStruct_id());
|
ioStorInvDis.setStruct_id(shallowAttr.getStruct_id());
|
||||||
@@ -1246,7 +1244,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
// 相同单据出库任务:直接生成出库任务
|
// 相同单据出库任务:直接生成出库任务
|
||||||
return ioStorInvDis.getStruct_code();
|
return ioStorInvDis.getStruct_code();
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("当前仓位【"+shallowAttr.getStruct_code()+"】被其他出库单据锁定或人工锁定,无法下发移库任务!");
|
throw new BadRequestException("当前仓位【" + shallowAttr.getStruct_code() + "】被其他出库单据锁定或人工锁定,无法下发移库任务!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1255,7 +1253,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
// 直接生成出库任务
|
// 直接生成出库任务
|
||||||
return ioStorInvDis.getStruct_code();
|
return ioStorInvDis.getStruct_code();
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("当前仓位【"+shallowAttr.getStruct_code()+"】有其他入库任务或人工锁定,无法下发出库任务,请等待任务完成或人工解锁!");
|
throw new BadRequestException("当前仓位【" + shallowAttr.getStruct_code() + "】有其他入库任务或人工锁定,无法下发出库任务,请等待任务完成或人工解锁!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1289,12 +1287,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
|
|
||||||
// 判断此单据下的所有任务有没有完成的
|
// 判断此单据下的所有任务有没有完成的
|
||||||
boolean is_finish = iSchBaseTaskService.list(
|
boolean is_finish = iSchBaseTaskService.list(
|
||||||
new QueryWrapper<SchBaseTask>().lambda()
|
new QueryWrapper<SchBaseTask>().lambda()
|
||||||
.in(SchBaseTask::getTask_id, storInvDisList.stream()
|
.in(SchBaseTask::getTask_id, storInvDisList.stream()
|
||||||
.map(IOStorInvDis::getTask_id)
|
.map(IOStorInvDis::getTask_id)
|
||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList())
|
||||||
)
|
)
|
||||||
).stream()
|
).stream()
|
||||||
.allMatch(row -> row.getTask_status().equals(TaskStatus.FINISHED.getCode()));
|
.allMatch(row -> row.getTask_status().equals(TaskStatus.FINISHED.getCode()));
|
||||||
if (!is_finish) {
|
if (!is_finish) {
|
||||||
throw new BadRequestException("当前有未完成的任务不能强制确认!");
|
throw new BadRequestException("当前有未完成的任务不能强制确认!");
|
||||||
@@ -1344,18 +1342,6 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
//添加需要更新的明细标识
|
//添加需要更新的明细标识
|
||||||
dtlSet.add(ioStorInvDis.getIostorinvdtl_id());
|
dtlSet.add(ioStorInvDis.getIostorinvdtl_id());
|
||||||
|
|
||||||
//查询明细信息
|
|
||||||
IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(ioStorInvDis.getIostorinvdtl_id());
|
|
||||||
|
|
||||||
// 更新组盘信息为出库
|
|
||||||
/* groupPlateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<>(GroupPlate.class)
|
|
||||||
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
|
|
||||||
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
|
||||||
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
|
|
||||||
.eq(GroupPlate::getMaterial_id, ioStorInvDis.getMaterial_id())
|
|
||||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
|
||||||
);*/
|
|
||||||
|
|
||||||
GroupPlate groupPlate = groupPlateMapper.selectOne(
|
GroupPlate groupPlate = groupPlateMapper.selectOne(
|
||||||
new QueryWrapper<GroupPlate>().lambda()
|
new QueryWrapper<GroupPlate>().lambda()
|
||||||
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
||||||
@@ -1369,6 +1355,10 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
groupPlate.setQty(BigDecimal.valueOf(sub_qty));
|
groupPlate.setQty(BigDecimal.valueOf(sub_qty));
|
||||||
}
|
}
|
||||||
groupPlate.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("出库"));
|
groupPlate.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("出库"));
|
||||||
|
groupPlate.setOut_type(ioStorInv.getBill_type());
|
||||||
|
if (ioStorInvDis.getIs_check().equals(IOSConstant.ZERO)) {
|
||||||
|
groupPlate.setIs_need_delete(IOSConstant.ONE);
|
||||||
|
}
|
||||||
groupPlateMapper.updateById(groupPlate);
|
groupPlateMapper.updateById(groupPlate);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1411,6 +1401,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
if (ObjectUtil.isEmpty(ioStorInvDis)) {
|
if (ObjectUtil.isEmpty(ioStorInvDis)) {
|
||||||
throw new BadRequestException("未找到任务对应的分配明细");
|
throw new BadRequestException("未找到任务对应的分配明细");
|
||||||
}
|
}
|
||||||
|
//查询主表信息
|
||||||
|
IOStorInv ioStorInv = ioStorInvMapper.selectById(ioStorInvDis.getIostorinv_id());
|
||||||
|
|
||||||
//查询明细信息
|
//查询明细信息
|
||||||
IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(ioStorInvDis.getIostorinvdtl_id());
|
IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(ioStorInvDis.getIostorinvdtl_id());
|
||||||
@@ -1446,14 +1438,6 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
updateIvtList.add(jsonIvt);
|
updateIvtList.add(jsonIvt);
|
||||||
iMdPbStoragevehicleextService.updateIvt(updateIvtList);
|
iMdPbStoragevehicleextService.updateIvt(updateIvtList);
|
||||||
|
|
||||||
// 更新组盘信息为出库
|
|
||||||
/* groupPlateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<>(GroupPlate.class)
|
|
||||||
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
|
|
||||||
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
|
||||||
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
|
|
||||||
.eq(GroupPlate::getMaterial_id, ioStorInvDis.getMaterial_id())
|
|
||||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
|
||||||
);*/
|
|
||||||
GroupPlate groupPlate = groupPlateMapper.selectOne(
|
GroupPlate groupPlate = groupPlateMapper.selectOne(
|
||||||
new QueryWrapper<GroupPlate>().lambda()
|
new QueryWrapper<GroupPlate>().lambda()
|
||||||
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
||||||
@@ -1467,6 +1451,10 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
groupPlate.setQty(BigDecimal.valueOf(sub_qty));
|
groupPlate.setQty(BigDecimal.valueOf(sub_qty));
|
||||||
}
|
}
|
||||||
groupPlate.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("出库"));
|
groupPlate.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("出库"));
|
||||||
|
groupPlate.setOut_type(ioStorInv.getBill_type());
|
||||||
|
if (ioStorInvDis.getIs_check().equals(IOSConstant.ZERO)) {
|
||||||
|
groupPlate.setIs_need_delete(IOSConstant.ONE);
|
||||||
|
}
|
||||||
groupPlateMapper.updateById(groupPlate);
|
groupPlateMapper.updateById(groupPlate);
|
||||||
|
|
||||||
// 查询该明细下是否还有未完成的分配明细
|
// 查询该明细下是否还有未完成的分配明细
|
||||||
@@ -1523,13 +1511,13 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
*/
|
*/
|
||||||
private void updateBomStatus(IOStorInv ios, String bom_status) {
|
private void updateBomStatus(IOStorInv ios, String bom_status) {
|
||||||
List<String> sourceList = ioStorInvDtlMapper.selectList(
|
List<String> sourceList = ioStorInvDtlMapper.selectList(
|
||||||
new QueryWrapper<IOStorInvDtl>().lambda()
|
new QueryWrapper<IOStorInvDtl>().lambda()
|
||||||
.eq(IOStorInvDtl::getIostorinv_id, ios.getIostorinv_id())
|
.eq(IOStorInvDtl::getIostorinv_id, ios.getIostorinv_id())
|
||||||
.in(bom_status.equals(IOSConstant.TWO), IOStorInvDtl::getBill_status, IOSEnum.BILL_STATUS.code("分配中")
|
.in(bom_status.equals(IOSConstant.TWO), IOStorInvDtl::getBill_status, IOSEnum.BILL_STATUS.code("分配中")
|
||||||
, IOSEnum.BILL_STATUS.code("分配完")
|
, IOSEnum.BILL_STATUS.code("分配完")
|
||||||
)
|
)
|
||||||
.in(bom_status.equals(IOSConstant.IS_DELETE_YES), IOStorInvDtl::getBill_status, IOSEnum.BILL_STATUS.code("生成"))
|
.in(bom_status.equals(IOSConstant.IS_DELETE_YES), IOStorInvDtl::getBill_status, IOSEnum.BILL_STATUS.code("生成"))
|
||||||
).stream().map(IOStorInvDtl::getSource_bill_code)
|
).stream().map(IOStorInvDtl::getSource_bill_code)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(sourceList)) {
|
if (ObjectUtil.isEmpty(sourceList)) {
|
||||||
|
|||||||
@@ -56,4 +56,12 @@ export function copySave(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, queryMater, checkVehicle, querySupp, copySave }
|
export function printDelete(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/group/printDelete',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, queryMater, checkVehicle, querySupp, copySave, printDelete }
|
||||||
|
|||||||
@@ -399,6 +399,10 @@ export default {
|
|||||||
},
|
},
|
||||||
printTable() {
|
printTable() {
|
||||||
let row = this.$refs.table.selection[0]
|
let row = this.$refs.table.selection[0]
|
||||||
|
var bake_num = row.bake_num
|
||||||
|
if (row.out_type === '1004') {
|
||||||
|
bake_num += 1
|
||||||
|
}
|
||||||
const LODOP = getLodop()
|
const LODOP = getLodop()
|
||||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||||
@@ -419,13 +423,21 @@ export default {
|
|||||||
LODOP.ADD_PRINT_TEXT('52mm', '48mm', '80mm', '15mm', '生产日期:' + row.produce_time + '')
|
LODOP.ADD_PRINT_TEXT('52mm', '48mm', '80mm', '15mm', '生产日期:' + row.produce_time + '')
|
||||||
LODOP.ADD_PRINT_TEXT('61mm', '48mm', '80mm', '15mm', '供应商名称:' + row.supp_name + '')
|
LODOP.ADD_PRINT_TEXT('61mm', '48mm', '80mm', '15mm', '供应商名称:' + row.supp_name + '')
|
||||||
|
|
||||||
LODOP.ADD_PRINT_TEXT('43mm', '5mm', '80mm', '15mm', '烘干次数:' + row.bake_num + '')
|
LODOP.ADD_PRINT_TEXT('43mm', '5mm', '80mm', '15mm', '烘干次数:' + bake_num + '')
|
||||||
LODOP.ADD_PRINT_TEXT('52mm', '5mm', '80mm', '15mm', '供应商编码:' + row.supp_code + '')
|
LODOP.ADD_PRINT_TEXT('52mm', '5mm', '80mm', '15mm', '供应商编码:' + row.supp_code + '')
|
||||||
LODOP.ADD_PRINT_TEXT('61mm', '5mm', '80mm', '15mm', '批号:' + row.pcsn + '')
|
LODOP.ADD_PRINT_TEXT('61mm', '5mm', '80mm', '15mm', '批号:' + row.pcsn + '')
|
||||||
LODOP.ADD_PRINT_TEXT('69mm', '5mm', '80mm', '15mm', '执行标准:' + row.execution_stand + '')
|
LODOP.ADD_PRINT_TEXT('69mm', '5mm', '80mm', '15mm', '执行标准:' + row.execution_stand + '')
|
||||||
|
|
||||||
// LODOP.PRINT()// 打印
|
// LODOP.PRINT()// 打印
|
||||||
LODOP.PREVIEW()// 预览
|
LODOP.PREVIEW()// 预览
|
||||||
|
|
||||||
|
// 调用删除
|
||||||
|
if (row.out_type === '1004' && row.is_need_delete === '1') {
|
||||||
|
crudGroup.printDelete(row).then(res => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,23 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="工单类型">
|
||||||
|
<el-select
|
||||||
|
v-model="query.bom_type"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="全部"
|
||||||
|
class="filter-item"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.BOM_TYPE"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -127,7 +144,27 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="叫料重量" prop="call_qty">
|
<el-form-item label="叫料重量" prop="call_qty">
|
||||||
<el-input-number v-model="form.call_qty" :precision="2" :controls="false" :min="1" style="width: 200px" />
|
<el-input-number v-model="form.call_qty" :precision="2" :controls="false" :min="1" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="工单类型" prop="bom_type">
|
||||||
|
<el-select
|
||||||
|
v-model="form.bom_type"
|
||||||
|
size="mini"
|
||||||
|
placeholder="全部"
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.BOM_TYPE"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -152,6 +189,7 @@
|
|||||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bom_code }}</el-link>
|
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bom_code }}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="bom_type" label="工单类型" :formatter="formattType" :min-width="flexWidth('bom_type',crud.data,'工单类型')" />
|
||||||
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
@@ -222,7 +260,7 @@ export default {
|
|||||||
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog },
|
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['BOM_STATUS'],
|
dicts: ['BOM_STATUS', 'BOM_TYPE'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '产线叫料',
|
title: '产线叫料',
|
||||||
@@ -251,6 +289,9 @@ export default {
|
|||||||
device_code: [
|
device_code: [
|
||||||
{ required: true, message: '设备编码不能为空', trigger: 'blur' }
|
{ required: true, message: '设备编码不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
|
bom_type: [
|
||||||
|
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
call_qty: [
|
call_qty: [
|
||||||
{ required: true, message: '叫料重量不能为空', trigger: 'blur' }
|
{ required: true, message: '叫料重量不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
@@ -279,6 +320,9 @@ export default {
|
|||||||
formattStatus(row) {
|
formattStatus(row) {
|
||||||
return this.dict.label.BOM_STATUS[row.bom_status]
|
return this.dict.label.BOM_STATUS[row.bom_status]
|
||||||
},
|
},
|
||||||
|
formattType(row) {
|
||||||
|
return this.dict.label.BOM_TYPE[row.bom_type]
|
||||||
|
},
|
||||||
toView(index, row) {
|
toView(index, row) {
|
||||||
this.openParam = row
|
this.openParam = row
|
||||||
this.ViewDialog = true
|
this.ViewDialog = true
|
||||||
|
|||||||
@@ -122,7 +122,8 @@
|
|||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="bom_code" label="叫料单号" :min-width="flexWidth('bom_code',crud.data,'叫料单号')" />
|
<el-table-column prop="bom_code" label="工单单号" :min-width="flexWidth('bom_code',crud.data,'叫料单号')" />
|
||||||
|
<el-table-column prop="bom_type" label="工单类型" :formatter="formattType" :min-width="flexWidth('bom_type',crud.data,'工单类型')" />
|
||||||
<el-table-column prop="bom_status" label="状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
<el-table-column prop="bom_status" label="状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
@@ -174,7 +175,7 @@ export default {
|
|||||||
components: { pagination, crudOperation, rrOperation, udOperation, WeighDialog },
|
components: { pagination, crudOperation, rrOperation, udOperation, WeighDialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['BOM_DTL_STATUS'],
|
dicts: ['BOM_DTL_STATUS', 'BOM_TYPE'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '产线叫料',
|
title: '产线叫料',
|
||||||
@@ -212,6 +213,9 @@ export default {
|
|||||||
formattStatus(row) {
|
formattStatus(row) {
|
||||||
return this.dict.label.BOM_DTL_STATUS[row.bom_status]
|
return this.dict.label.BOM_DTL_STATUS[row.bom_status]
|
||||||
},
|
},
|
||||||
|
formattType(row) {
|
||||||
|
return this.dict.label.BOM_TYPE[row.bom_type]
|
||||||
|
},
|
||||||
openWeigh() {
|
openWeigh() {
|
||||||
this.openParamWeigh = this.$refs.table.selection[0]
|
this.openParamWeigh = this.$refs.table.selection[0]
|
||||||
this.openWeighDialog = true
|
this.openWeighDialog = true
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="queryDtlIos()"
|
@click="queryDtlIos()"
|
||||||
>
|
>
|
||||||
添加叫料单据
|
添加生产工单
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
||||||
<AddDtlIos :dialog-show.sync="dtlIosShow" @tableChanged="tableChanged2" />
|
<AddDtlIos :dialog-show.sync="dtlIosShow" :bom-type="bom_type" @tableChanged="tableChanged2" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -228,6 +228,7 @@ export default {
|
|||||||
storlist: [],
|
storlist: [],
|
||||||
invtypelist: [],
|
invtypelist: [],
|
||||||
storId: null,
|
storId: null,
|
||||||
|
bom_type: null,
|
||||||
rules: {
|
rules: {
|
||||||
stor_id: [
|
stor_id: [
|
||||||
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
||||||
@@ -331,6 +332,11 @@ export default {
|
|||||||
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.form.bill_type === '1001') {
|
||||||
|
this.bom_type = '1'
|
||||||
|
} else if (this.form.bill_type === '1004') {
|
||||||
|
this.bom_type = '2'
|
||||||
|
}
|
||||||
this.dtlIosShow = true
|
this.dtlIosShow = true
|
||||||
},
|
},
|
||||||
tableChanged(rows) {
|
tableChanged(rows) {
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="bom_code" label="工单单号" :min-width="flexWidth('bom_code',crud.data,'工单单号')" />
|
<el-table-column prop="bom_code" label="工单单号" :min-width="flexWidth('bom_code',crud.data,'工单单号')" />
|
||||||
|
<el-table-column prop="bom_type" label="工单类型" :formatter="formattType" :min-width="flexWidth('bom_type',crud.data,'工单类型')" />
|
||||||
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
@@ -101,11 +102,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header()],
|
mixins: [presenter(), header()],
|
||||||
dicts: ['BOM_STATUS'],
|
dicts: ['BOM_STATUS', 'BOM_TYPE'],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
bomType: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -125,9 +130,16 @@ export default {
|
|||||||
formattStatus(row) {
|
formattStatus(row) {
|
||||||
return this.dict.label.BOM_STATUS[row.bom_status]
|
return this.dict.label.BOM_STATUS[row.bom_status]
|
||||||
},
|
},
|
||||||
|
formattType(row) {
|
||||||
|
return this.dict.label.BOM_TYPE[row.bom_type]
|
||||||
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
},
|
},
|
||||||
|
open() {
|
||||||
|
this.query.bom_type = this.bomType
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.rows = this.$refs.table.selection
|
this.rows = this.$refs.table.selection
|
||||||
if (this.rows.length <= 0) {
|
if (this.rows.length <= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user