rev:库存更新,入库确认
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package org.nl.wms.masterdata_manage.service.material.dao;
|
package org.nl.wms.masterdata_manage.service.material.dao;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -26,6 +28,7 @@ public class MdMeMaterialbase implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 物料标识
|
* 物料标识
|
||||||
*/
|
*/
|
||||||
|
@TableId
|
||||||
private String material_id;
|
private String material_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,8 +3,11 @@ package org.nl.wms.masterdata_manage.service.vehicle.dao;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -15,6 +18,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
* @since 2023-05-10
|
* @since 2023-05-10
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Builder
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@TableName("md_pb_bucketrecord")
|
@TableName("md_pb_bucketrecord")
|
||||||
public class MdPbBucketrecord implements Serializable {
|
public class MdPbBucketrecord implements Serializable {
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ import org.nl.common.utils.IdUtil;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
|
||||||
|
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbBucketrecord;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleext;
|
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleext;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
|
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
|
||||||
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtBsrealstorattrService;
|
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtBsrealstorattrService;
|
||||||
@@ -34,8 +36,6 @@ import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
|||||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||||
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
||||||
import org.nl.wms.storage_manage.IOSEnum;
|
import org.nl.wms.storage_manage.IOSEnum;
|
||||||
import org.nl.wms.storage_manage.basedata.service.record.dto.StIvtStructivtflowDto;
|
|
||||||
import org.nl.wms.storage_manage.basedata.service.record.service.IStIvtStructivtflowService;
|
|
||||||
import org.nl.wms.storage_manage.productmanage.service.iostorInv.IStIvtIostorinvCpService;
|
import org.nl.wms.storage_manage.productmanage.service.iostorInv.IStIvtIostorinvCpService;
|
||||||
import org.nl.wms.storage_manage.productmanage.service.iostorInv.IStIvtIostorinvdisCpService;
|
import org.nl.wms.storage_manage.productmanage.service.iostorInv.IStIvtIostorinvdisCpService;
|
||||||
import org.nl.wms.storage_manage.productmanage.service.iostorInv.IStIvtIostorinvdisdtlCpService;
|
import org.nl.wms.storage_manage.productmanage.service.iostorInv.IStIvtIostorinvdisdtlCpService;
|
||||||
@@ -46,6 +46,8 @@ import org.nl.wms.storage_manage.productmanage.service.iostorInv.dao.StIvtIostor
|
|||||||
import org.nl.wms.storage_manage.productmanage.service.iostorInv.dao.StIvtIostorinvdtlCp;
|
import org.nl.wms.storage_manage.productmanage.service.iostorInv.dao.StIvtIostorinvdtlCp;
|
||||||
import org.nl.wms.storage_manage.productmanage.service.iostorInv.dao.mapper.StIvtIostorinvCpMapper;
|
import org.nl.wms.storage_manage.productmanage.service.iostorInv.dao.mapper.StIvtIostorinvCpMapper;
|
||||||
import org.nl.wms.storage_manage.productmanage.service.iostorInv.dto.IostorInvQuery;
|
import org.nl.wms.storage_manage.productmanage.service.iostorInv.dto.IostorInvQuery;
|
||||||
|
import org.nl.wms.storage_manage.productmanage.service.structIvt.IStIvtStructivtCpService;
|
||||||
|
import org.nl.wms.storage_manage.productmanage.util.ChangeIvtUtil;
|
||||||
import org.nl.wms.storage_manage.productmanage.util.DivRuleCpService;
|
import org.nl.wms.storage_manage.productmanage.util.DivRuleCpService;
|
||||||
import org.nl.wms.storage_manage.productmanage.util.RuleUtil;
|
import org.nl.wms.storage_manage.productmanage.util.RuleUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -94,20 +96,23 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
@Autowired
|
@Autowired
|
||||||
protected IStIvtStructattrService iStIvtStructattrService; // 仓位属性服务
|
protected IStIvtStructattrService iStIvtStructattrService; // 仓位属性服务
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IStIvtStructivtflowService structivtflowService; // 仓位变动记录服务
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISchBaseTaskService iSchBaseTaskService; // 任务表服务
|
private ISchBaseTaskService iSchBaseTaskService; // 任务表服务
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISchBasePointService iSchBasePointService; // 点位服务
|
private ISchBasePointService iSchBasePointService; // 点位服务
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IStIvtStructivtCpService iStIvtStructivtCpService; // 库存服务
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected IMdPbBucketrecordService iMdPbBucketrecordService; // 包装箱记录表服务
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object pageQuery(IostorInvQuery query, PageQuery page) {
|
public Object pageQuery(IostorInvQuery query, PageQuery page) {
|
||||||
// 查询条件
|
// 查询条件
|
||||||
query.setIo_type(IOSEnum.IO_TYPE.code("入库"));
|
query.setIo_type(IOSEnum.IO_TYPE.code("入库"));
|
||||||
page.setSort("bill_code,ASC");
|
page.setSort("bill_code,DESC");
|
||||||
|
|
||||||
// 分页查询
|
// 分页查询
|
||||||
Page<StIvtIostorinvCp> pageQuery = this.page(page.build(), query.build());
|
Page<StIvtIostorinvCp> pageQuery = this.page(page.build(), query.build());
|
||||||
@@ -231,7 +236,7 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
.map(StIvtIostorinvdisdtlCp::getReal_qty)
|
.map(StIvtIostorinvdisdtlCp::getReal_qty)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
// 插入分配明细
|
// 插入分配
|
||||||
StIvtIostorinvdisCp disDao = new StIvtIostorinvdisCp()
|
StIvtIostorinvdisCp disDao = new StIvtIostorinvdisCp()
|
||||||
.setIostorinvdis_id(IdUtil.getStringId())
|
.setIostorinvdis_id(IdUtil.getStringId())
|
||||||
.setIostorinv_id(param.getString("iostorinv_id"))
|
.setIostorinv_id(param.getString("iostorinv_id"))
|
||||||
@@ -383,7 +388,10 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
attrDao.setInv_code(mstDao.getBill_code());
|
attrDao.setInv_code(mstDao.getBill_code());
|
||||||
iStIvtStructattrService.updateById(attrDao);
|
iStIvtStructattrService.updateById(attrDao);
|
||||||
|
|
||||||
// TODO 更新库存、物流等
|
// 4.更新库存
|
||||||
|
disDao.setStruct_id(attrDao.getStruct_id());
|
||||||
|
iStIvtStructivtCpService.UpdateIvt(ivtDataParam(disDao,ChangeIvtUtil.ADDWAREHOUSING_QTY));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -439,6 +447,9 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
.eq(StIvtStructattr::getStruct_code, disDao.getStruct_code())
|
.eq(StIvtStructattr::getStruct_code, disDao.getStruct_code())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 更新库存
|
||||||
|
iStIvtStructivtCpService.UpdateIvt(ivtDataParam(disDao,ChangeIvtUtil.SUBWAREHOUSING_QTY));
|
||||||
|
|
||||||
// 4.更新分配
|
// 4.更新分配
|
||||||
iostorinvdisCpService.updateById(
|
iostorinvdisCpService.updateById(
|
||||||
disDao.setStruct_name("").setStruct_code("")
|
disDao.setStruct_name("").setStruct_code("")
|
||||||
@@ -535,43 +546,49 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
.eq(StIvtIostorinvdtlCp::getIostorinv_id, whereJson.getString("iostorinv_id"))
|
.eq(StIvtIostorinvdtlCp::getIostorinv_id, whereJson.getString("iostorinv_id"))
|
||||||
);
|
);
|
||||||
|
|
||||||
// 3.更新任务为完成、更新库存
|
// 4.更新箱记录表状态为入库
|
||||||
|
List<StIvtIostorinvdisdtlCp> disDtlList = iStIvtIostorinvdisdtlCpService.list(
|
||||||
|
new QueryWrapper<StIvtIostorinvdisdtlCp>().lambda()
|
||||||
|
.eq(StIvtIostorinvdisdtlCp::getIostorinv_id, whereJson.getString("iostorinv_id"))
|
||||||
|
);
|
||||||
|
|
||||||
|
for (StIvtIostorinvdisdtlCp disDtlDao : disDtlList) {
|
||||||
|
// 更新箱记录表
|
||||||
|
iMdPbBucketrecordService.update(
|
||||||
|
MdPbBucketrecord.builder()
|
||||||
|
.status("03") // TODO 暂时写死
|
||||||
|
.instor_optid(Long.getLong(SecurityUtils.getCurrentUserId()))
|
||||||
|
.instor_optname(SecurityUtils.getCurrentNickName())
|
||||||
|
.instor_time(DateUtil.now())
|
||||||
|
.build(),
|
||||||
|
new QueryWrapper<MdPbBucketrecord>().lambda()
|
||||||
|
.eq(MdPbBucketrecord::getBucketunique, disDtlDao.getBucketunique())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5.更新任务为完成、更新库存、解锁点位
|
||||||
List<StIvtIostorinvdisCp> disDaoList = iostorinvdisCpService.list(
|
List<StIvtIostorinvdisCp> disDaoList = iostorinvdisCpService.list(
|
||||||
new QueryWrapper<StIvtIostorinvdisCp>().lambda()
|
new QueryWrapper<StIvtIostorinvdisCp>().lambda()
|
||||||
.eq(StIvtIostorinvdisCp::getIostorinv_id, whereJson.getString("iostorinv_id"))
|
.eq(StIvtIostorinvdisCp::getIostorinv_id, whereJson.getString("iostorinv_id"))
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, List<StIvtIostorinvdisCp>> collect = disDaoList.stream()
|
for (StIvtIostorinvdisCp dao : disDaoList) {
|
||||||
.collect(Collectors.groupingBy(StIvtIostorinvdisCp::getTask_id));
|
|
||||||
|
|
||||||
for (String task_id : collect.keySet()) {
|
|
||||||
// 1)更新任务为完成
|
// 1)更新任务为完成
|
||||||
SchBaseTask taskDao = iSchBaseTaskService.getById(task_id);
|
SchBaseTask taskDao = iSchBaseTaskService.getById(dao.getTask_id());
|
||||||
// 已完成则不更新
|
|
||||||
if (StrUtil.equals(taskDao.getTask_id(), TaskStatusEnum.FINISHED.getCode())) continue;
|
|
||||||
|
|
||||||
taskDao.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
if (ObjectUtil.isNotEmpty(taskDao)) {
|
||||||
iSchBaseTaskService.updateById(taskDao);
|
// 更新有任务分配
|
||||||
|
if (!StrUtil.equals(taskDao.getTask_id(), TaskStatusEnum.FINISHED.getCode())) {
|
||||||
|
taskDao.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||||
|
iSchBaseTaskService.updateById(taskDao);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 2)更新库存
|
// 2)更新库存
|
||||||
List<StIvtIostorinvdisCp> disList = collect.get(task_id);
|
iStIvtStructivtCpService.UpdateIvt(ivtDataParam(dao,ChangeIvtUtil.SUBWAREHOUSING_ADDIVT_QTY));
|
||||||
for (StIvtIostorinvdisCp dao : disList) {
|
|
||||||
// 根据托盘对应货位更新
|
// 3)解锁终点
|
||||||
structivtflowService.recordStructivtFlow(
|
unLockNext(dao.getStruct_id(),dao.getStoragevehicle_code());
|
||||||
StIvtStructivtflowDto.builder()
|
|
||||||
.bill_code(mstDao.getBill_code())
|
|
||||||
.change_type_scode(CHANGE_BILL_TYPE_ENUM.IOSTORINV_IN_SEND)
|
|
||||||
.bill_table("st_ivt_iostorinv_cp")
|
|
||||||
.material_id(dao.getMaterial_id())
|
|
||||||
.pcsn(dao.getPcsn())
|
|
||||||
.struct_code(dao.getStruct_code())
|
|
||||||
.result_qty(dao.getReal_qty())
|
|
||||||
.change_qty(dao.getReal_qty())
|
|
||||||
.task_id(dao.getTask_id())
|
|
||||||
.storagevehicle_code(dao.getStoragevehicle_code())
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -721,4 +738,34 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
this.updateById(mstDao);
|
this.updateById(mstDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JSONObject ivtDataParam(StIvtIostorinvdisCp disDao,String type) {
|
||||||
|
JSONObject ivtParam = new JSONObject();
|
||||||
|
ivtParam.put("struct_id", disDao.getStruct_id());
|
||||||
|
ivtParam.put("material_id", disDao.getMaterial_id());
|
||||||
|
ivtParam.put("pcsn", disDao.getPcsn());
|
||||||
|
ivtParam.put("quality_scode", disDao.getQuality_scode());
|
||||||
|
ivtParam.put("ivt_level", disDao.getIvt_level());
|
||||||
|
ivtParam.put("change_qty", disDao.getReal_qty());
|
||||||
|
ivtParam.put("change_type", type);
|
||||||
|
|
||||||
|
return ivtParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
解锁终点
|
||||||
|
*/
|
||||||
|
public void unLockNext(String struct_id, String storagevehicle_code) {
|
||||||
|
|
||||||
|
StIvtStructattr attrDao = iStIvtStructattrService.getById(struct_id);
|
||||||
|
if (ObjectUtil.isEmpty(attrDao)) throw new BadRequestException("仓位不存在!");
|
||||||
|
|
||||||
|
attrDao.setInv_code("");
|
||||||
|
attrDao.setInv_type("");
|
||||||
|
attrDao.setInv_id("");
|
||||||
|
attrDao.setStoragevehicle_code(storagevehicle_code);
|
||||||
|
attrDao.setLock_type("1");
|
||||||
|
iStIvtStructattrService.updateById(attrDao);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.wms.masterdata_manage.service.material.IMdMeMaterialbaseService;
|
||||||
|
import org.nl.wms.masterdata_manage.service.material.dao.MdMeMaterialbase;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
|
||||||
@@ -44,6 +46,10 @@ public class StIvtIostorinvdisdtlCpServiceImpl extends ServiceImpl<StIvtIostorin
|
|||||||
@Autowired
|
@Autowired
|
||||||
protected IMdPbBucketrecordService iMdPbBucketrecordService; // 包装箱记录表服务
|
protected IMdPbBucketrecordService iMdPbBucketrecordService; // 包装箱记录表服务
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected IMdMeMaterialbaseService iMdMeMaterialbaseService; // 物料服务
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void batchInsert(Collection<StIvtIostorinvdisdtlCp> list) {
|
public void batchInsert(Collection<StIvtIostorinvdisdtlCp> list) {
|
||||||
if (!CollectionUtils.isEmpty(list)){
|
if (!CollectionUtils.isEmpty(list)){
|
||||||
@@ -67,13 +73,18 @@ public class StIvtIostorinvdisdtlCpServiceImpl extends ServiceImpl<StIvtIostorin
|
|||||||
.eq("storagevehicle_code", item.getString("storagevehicle_code"))
|
.eq("storagevehicle_code", item.getString("storagevehicle_code"))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
MdMeMaterialbase mataDao = iMdMeMaterialbaseService.getOne(
|
||||||
|
new QueryWrapper<MdMeMaterialbase>().lambda()
|
||||||
|
.eq(MdMeMaterialbase::getMaterial_code, item.getString("material_code"))
|
||||||
|
);
|
||||||
|
|
||||||
StIvtIostorinvdisdtlCp disDtlDao = new StIvtIostorinvdisdtlCp()
|
StIvtIostorinvdisdtlCp disDtlDao = new StIvtIostorinvdisdtlCp()
|
||||||
.setIostorinv_id(json.getString("iostorinv_id"))
|
.setIostorinv_id(json.getString("iostorinv_id"))
|
||||||
.setIostorinvdtl_id(json.getString("iostorinvdtl_id"))
|
.setIostorinvdtl_id(json.getString("iostorinvdtl_id"))
|
||||||
.setIostorinvdis_id(json.getString("iostorinvdis_id"))
|
.setIostorinvdis_id(json.getString("iostorinvdis_id"))
|
||||||
.setIostorinvdisdtl_id(IdUtil.getStringId())
|
.setIostorinvdisdtl_id(IdUtil.getStringId())
|
||||||
.setSeq_no(new BigDecimal(1))
|
.setSeq_no(new BigDecimal(1))
|
||||||
.setMaterial_id(item.getString("material_id"))
|
.setMaterial_id(mataDao.getMaterial_id())
|
||||||
.setPcsn(item.getString("pcsn"))
|
.setPcsn(item.getString("pcsn"))
|
||||||
.setQuality_scode("00") // TODO 暂时写
|
.setQuality_scode("00") // TODO 暂时写
|
||||||
.setIvt_level("01") // TODO 暂时写
|
.setIvt_level("01") // TODO 暂时写
|
||||||
@@ -88,16 +99,17 @@ public class StIvtIostorinvdisdtlCpServiceImpl extends ServiceImpl<StIvtIostorin
|
|||||||
result.add(disDtlDao);
|
result.add(disDtlDao);
|
||||||
|
|
||||||
// 更新箱记录表
|
// 更新箱记录表
|
||||||
MdPbBucketrecord recodDao = new MdPbBucketrecord();
|
|
||||||
recodDao.setStoragevehicle_id(Long.getLong(vehicleDao.getStoragevehicle_id()));
|
|
||||||
recodDao.setStatus("02"); // TODO 暂时写死
|
|
||||||
recodDao.setStoragevehicle_code(vehicleDao.getStoragevehicle_code());
|
|
||||||
recodDao.setMakeup_optid(Long.getLong(SecurityUtils.getCurrentUserId()));
|
|
||||||
recodDao.setMakeup_optname(SecurityUtils.getCurrentNickName());
|
|
||||||
recodDao.setMakeup_time(DateUtil.now());
|
|
||||||
|
|
||||||
iMdPbBucketrecordService.update(
|
iMdPbBucketrecordService.update(
|
||||||
recodDao,new QueryWrapper<MdPbBucketrecord>().eq("bucketunique", item.getString("bucketunique"))
|
MdPbBucketrecord.builder()
|
||||||
|
.storagevehicle_id(Long.getLong(vehicleDao.getStoragevehicle_id()))
|
||||||
|
.status("02") // TODO 暂时写死
|
||||||
|
.storagevehicle_code(vehicleDao.getStoragevehicle_code())
|
||||||
|
.makeup_optid(Long.getLong(SecurityUtils.getCurrentUserId()))
|
||||||
|
.makeup_optname(SecurityUtils.getCurrentNickName())
|
||||||
|
.makeup_time(DateUtil.now())
|
||||||
|
.build(),
|
||||||
|
new QueryWrapper<MdPbBucketrecord>()
|
||||||
|
.eq("bucketunique", item.getString("bucketunique"))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.storage_manage.productmanage.service.iostorInv.impl;
|
package org.nl.wms.storage_manage.productmanage.service.iostorInv.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -65,7 +66,9 @@ public class StIvtIostorinvdtlCpServiceImpl extends ServiceImpl<StIvtIostorinvdt
|
|||||||
row.setIostorinv_id(iostorinvCp_id);
|
row.setIostorinv_id(iostorinvCp_id);
|
||||||
row.setIostorinvdtl_id(org.nl.common.utils.IdUtil.getStringId());
|
row.setIostorinvdtl_id(org.nl.common.utils.IdUtil.getStringId());
|
||||||
row.setSeq_no(i+1);
|
row.setSeq_no(i+1);
|
||||||
|
row.setPcsn(DateUtil.today());
|
||||||
row.setIs_active(true);
|
row.setIs_active(true);
|
||||||
|
row.setIvt_level("01"); // TODO 暂时写死
|
||||||
row.setBill_status(IOSEnum.BILL_STATUS.code("生成"));
|
row.setBill_status(IOSEnum.BILL_STATUS.code("生成"));
|
||||||
row.setReal_qty(row.getPlan_qty());
|
row.setReal_qty(row.getPlan_qty());
|
||||||
row.setUnassign_qty(row.getPlan_qty());
|
row.setUnassign_qty(row.getPlan_qty());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.storage_manage.productmanage.service.structIvt;
|
package org.nl.wms.storage_manage.productmanage.service.structIvt;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.nl.wms.storage_manage.productmanage.service.structIvt.dao.StIvtStructivtCp;
|
import org.nl.wms.storage_manage.productmanage.service.structIvt.dao.StIvtStructivtCp;
|
||||||
|
|
||||||
@@ -13,4 +14,19 @@ import org.nl.wms.storage_manage.productmanage.service.structIvt.dao.StIvtStruct
|
|||||||
*/
|
*/
|
||||||
public interface IStIvtStructivtCpService extends IService<StIvtStructivtCp> {
|
public interface IStIvtStructivtCpService extends IService<StIvtStructivtCp> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成品库存更新
|
||||||
|
* @param json
|
||||||
|
* {
|
||||||
|
* struct_id:仓位标识
|
||||||
|
* material_id:物料标识
|
||||||
|
* pcsn:批次
|
||||||
|
* quality_scode:品质类型
|
||||||
|
* ivt_level:库存等级
|
||||||
|
* change_qty:变动数量
|
||||||
|
* change_type:变动类型
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void UpdateIvt(JSONObject json);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.storage_manage.productmanage.service.structIvt.dao;
|
package org.nl.wms.storage_manage.productmanage.service.structIvt.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@@ -25,6 +26,7 @@ public class StIvtStructivtCp implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 库存记录标识
|
* 库存记录标识
|
||||||
*/
|
*/
|
||||||
|
@TableId
|
||||||
private String stockrecord_id;
|
private String stockrecord_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,10 +1,26 @@
|
|||||||
package org.nl.wms.storage_manage.productmanage.service.structIvt.impl;
|
package org.nl.wms.storage_manage.productmanage.service.structIvt.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.nl.common.utils.IdUtil;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.wms.masterdata_manage.service.material.IMdMeMaterialbaseService;
|
||||||
|
import org.nl.wms.masterdata_manage.service.material.dao.MdMeMaterialbase;
|
||||||
|
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtStructattrService;
|
||||||
|
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtStructattr;
|
||||||
import org.nl.wms.storage_manage.productmanage.service.structIvt.IStIvtStructivtCpService;
|
import org.nl.wms.storage_manage.productmanage.service.structIvt.IStIvtStructivtCpService;
|
||||||
import org.nl.wms.storage_manage.productmanage.service.structIvt.dao.StIvtStructivtCp;
|
import org.nl.wms.storage_manage.productmanage.service.structIvt.dao.StIvtStructivtCp;
|
||||||
import org.nl.wms.storage_manage.productmanage.service.structIvt.dao.mapper.StIvtStructivtCpMapper;
|
import org.nl.wms.storage_manage.productmanage.service.structIvt.dao.mapper.StIvtStructivtCpMapper;
|
||||||
|
import org.nl.wms.storage_manage.productmanage.util.ChangeIvtUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -17,4 +33,173 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class StIvtStructivtCpServiceImpl extends ServiceImpl<StIvtStructivtCpMapper, StIvtStructivtCp> implements IStIvtStructivtCpService {
|
public class StIvtStructivtCpServiceImpl extends ServiceImpl<StIvtStructivtCpMapper, StIvtStructivtCp> implements IStIvtStructivtCpService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected IStIvtStructattrService iStIvtStructattrService; // 仓位属性服务
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected IMdMeMaterialbaseService iMdMeMaterialbaseService; // 物料服务
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void UpdateIvt(JSONObject json) {
|
||||||
|
// 校验数据
|
||||||
|
checkParam(json);
|
||||||
|
|
||||||
|
String change_type = json.getString("change_type"); // 变动类型
|
||||||
|
|
||||||
|
switch (change_type) {
|
||||||
|
case ChangeIvtUtil.ADDWAREHOUSING_QTY:
|
||||||
|
// 加待入
|
||||||
|
addWrehousingQty(json);
|
||||||
|
break;
|
||||||
|
case ChangeIvtUtil.SUBWAREHOUSING_QTY:
|
||||||
|
// 减待入
|
||||||
|
subWrehousingQty(json);
|
||||||
|
break;
|
||||||
|
case ChangeIvtUtil.SUBWAREHOUSING_ADDIVT_QTY:
|
||||||
|
// 减待入、加库存、加可用
|
||||||
|
subWrehousingAddQty(json);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new BadRequestException("变动类型异常!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
加待入
|
||||||
|
*/
|
||||||
|
private void addWrehousingQty(JSONObject json) {
|
||||||
|
|
||||||
|
// 查询是否有库存
|
||||||
|
StIvtStructivtCp ivtDao = this.getOne(
|
||||||
|
new QueryWrapper<StIvtStructivtCp>().lambda()
|
||||||
|
.eq(StIvtStructivtCp::getStruct_id, json.getString("struct_id"))
|
||||||
|
.eq(StIvtStructivtCp::getMaterial_id, json.getString("material_id"))
|
||||||
|
.eq(StIvtStructivtCp::getPcsn, json.getString("pcsn"))
|
||||||
|
);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(ivtDao)) {
|
||||||
|
// 为空插入
|
||||||
|
StIvtStructattr attrDao = iStIvtStructattrService.getById(json.getString("struct_id"));
|
||||||
|
|
||||||
|
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(json.getString("material_id"));
|
||||||
|
|
||||||
|
StIvtStructivtCp dao = new StIvtStructivtCp();
|
||||||
|
dao.setStockrecord_id(org.nl.common.utils.IdUtil.getStringId());
|
||||||
|
dao.setStruct_id(attrDao.getStruct_id());
|
||||||
|
dao.setStruct_code(attrDao.getStruct_code());
|
||||||
|
dao.setStruct_name(attrDao.getStruct_name());
|
||||||
|
dao.setMaterial_id(materDao.getMaterial_id());
|
||||||
|
dao.setQuality_scode(json.getString("quality_scode"));
|
||||||
|
dao.setIvt_level(json.getString("ivt_level"));
|
||||||
|
dao.setIs_active(true);
|
||||||
|
dao.setPcsn(json.getString("pcsn"));
|
||||||
|
dao.setCanuse_qty(BigDecimal.valueOf(0));
|
||||||
|
dao.setFrozen_qty(BigDecimal.valueOf(0));
|
||||||
|
dao.setIvt_qty(BigDecimal.valueOf(0));
|
||||||
|
dao.setWarehousing_qty(json.getBigDecimal("change_qty"));
|
||||||
|
dao.setQty_unit_id(materDao.getBase_unit_id());
|
||||||
|
this.save(dao);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// 更新待入数
|
||||||
|
ivtDao.setWarehousing_qty(NumberUtil.add(ivtDao.getWarehousing_qty(),json.getDoubleValue("change_qty")));
|
||||||
|
this.updateById(ivtDao);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
减待入
|
||||||
|
*/
|
||||||
|
private void subWrehousingQty(JSONObject json) {
|
||||||
|
|
||||||
|
// 查询是否有库存
|
||||||
|
StIvtStructivtCp ivtDao = this.getOne(
|
||||||
|
new QueryWrapper<StIvtStructivtCp>().lambda()
|
||||||
|
.eq(StIvtStructivtCp::getStruct_id, json.getString("struct_id"))
|
||||||
|
.eq(StIvtStructivtCp::getMaterial_id, json.getString("material_id"))
|
||||||
|
.eq(StIvtStructivtCp::getPcsn, json.getString("pcsn"))
|
||||||
|
);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(ivtDao)) {
|
||||||
|
// 为空报错
|
||||||
|
throw new BadRequestException("库存不存在,请检查!");
|
||||||
|
} else {
|
||||||
|
// 判断库存是否异常
|
||||||
|
double change_qty = NumberUtil.sub(ivtDao.getWarehousing_qty(), json.getDoubleValue("change_qty")).doubleValue();
|
||||||
|
|
||||||
|
if (change_qty < 0) {
|
||||||
|
throw new BadRequestException("库存异常,请检查!");
|
||||||
|
} else if (change_qty == 0 && ivtDao.getCanuse_qty().doubleValue() == 0 &&
|
||||||
|
ivtDao.getFrozen_qty().doubleValue() == 0 && ivtDao.getIvt_qty().doubleValue() == 0) {
|
||||||
|
// 待入数、库存数、冻结数、可用数都为0时删除库存记录
|
||||||
|
this.removeById(ivtDao.getStockrecord_id());
|
||||||
|
} else {
|
||||||
|
ivtDao.setWarehousing_qty(BigDecimal.valueOf(change_qty));
|
||||||
|
this.updateById(ivtDao);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
减待入、加库存、加可用
|
||||||
|
*/
|
||||||
|
private void subWrehousingAddQty(JSONObject json) {
|
||||||
|
// 查询是否有库存
|
||||||
|
StIvtStructivtCp ivtDao = this.getOne(
|
||||||
|
new QueryWrapper<StIvtStructivtCp>().lambda()
|
||||||
|
.eq(StIvtStructivtCp::getStruct_id, json.getString("struct_id"))
|
||||||
|
.eq(StIvtStructivtCp::getMaterial_id, json.getString("material_id"))
|
||||||
|
.eq(StIvtStructivtCp::getPcsn, json.getString("pcsn"))
|
||||||
|
);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(ivtDao)) {
|
||||||
|
throw new BadRequestException("库存不存在,请检查!");
|
||||||
|
} else {
|
||||||
|
double change_qty = NumberUtil.sub(ivtDao.getWarehousing_qty(), json.getDoubleValue("change_qty")).doubleValue();
|
||||||
|
|
||||||
|
// 判断待入数是否为负数
|
||||||
|
if (change_qty < 0) throw new BadRequestException("库存异常,请检查!");
|
||||||
|
// 减去待入
|
||||||
|
ivtDao.setWarehousing_qty(BigDecimal.valueOf(change_qty));
|
||||||
|
// 加库存
|
||||||
|
BigDecimal ivt_qty = NumberUtil.add(ivtDao.getIvt_qty(), json.getDoubleValue("change_qty"));
|
||||||
|
// 加可用
|
||||||
|
BigDecimal canuse_qty = NumberUtil.add(ivtDao.getCanuse_qty(), json.getDoubleValue("change_qty"));
|
||||||
|
|
||||||
|
ivtDao.setCanuse_qty(canuse_qty);
|
||||||
|
ivtDao.setIvt_qty(ivt_qty);
|
||||||
|
ivtDao.setInstorage_time(DateUtil.now());
|
||||||
|
this.updateById(ivtDao);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
校验数据
|
||||||
|
*/
|
||||||
|
private void checkParam(JSONObject json) {
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(json.getString("struct_id")))
|
||||||
|
throw new BadRequestException("更新库存失败:仓位不能为空!");
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(json.getString("material_id")))
|
||||||
|
throw new BadRequestException("更新库存失败:物料不能为空!");
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(json.getString("pcsn")))
|
||||||
|
throw new BadRequestException("更新库存失败:批次不能为空!");
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(json.getString("quality_scode")))
|
||||||
|
throw new BadRequestException("更新库存失败:品质类型不能为空!");
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(json.getString("ivt_level")))
|
||||||
|
throw new BadRequestException("更新库存失败:库存等级不能为空!");
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(json.getString("change_qty")))
|
||||||
|
throw new BadRequestException("更新库存失败:变动数量不能为空!");
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(json.getString("change_type")))
|
||||||
|
throw new BadRequestException("更新库存失败:变动类型不能为空!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package org.nl.wms.storage_manage.productmanage.util;
|
||||||
|
|
||||||
|
public class ChangeIvtUtil {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 加待入
|
||||||
|
*/
|
||||||
|
public static final String ADDWAREHOUSING_QTY = "1";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 减待入
|
||||||
|
*/
|
||||||
|
public static final String SUBWAREHOUSING_QTY = "2";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 减待入、加库存、加可用
|
||||||
|
*/
|
||||||
|
public static final String SUBWAREHOUSING_ADDIVT_QTY = "3";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -47,10 +47,10 @@
|
|||||||
@select-all="onSelectAll"
|
@select-all="onSelectAll"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="point_code" label="点位编码" />
|
<el-table-column prop="struct_code" label="仓位编码" />
|
||||||
<el-table-column prop="point_name" label="点位名称" />
|
<el-table-column prop="struct_name" label="仓位名称" />
|
||||||
<el-table-column prop="region_name" label="区域名称" />
|
<el-table-column prop="sect_code" label="库区编码" />
|
||||||
<el-table-column prop="product_area" label="生产车间" />
|
<el-table-column prop="sect_name" label="库区名称" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
@@ -66,20 +66,20 @@
|
|||||||
import CRUD, { header, presenter } from '@crud/crud'
|
import CRUD, { header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudRegion from '@/views/wms/scheduler_manage/region/region'
|
import crudStructattr from '@/api/wms/basedata/st/structattr'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StructDialog',
|
name: 'StructDialog',
|
||||||
components: { rrOperation, pagination },
|
components: { rrOperation, pagination },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '点位',
|
title: '仓位',
|
||||||
optShow: {},
|
optShow: {},
|
||||||
url: 'api/region/getPointQuery',
|
url: 'api/structattr',
|
||||||
idField: 'region_code',
|
idField: 'struct_code',
|
||||||
sort: 'region_code,desc',
|
sort: 'struct_code,ASC',
|
||||||
query: { search: '', is_lock: '1', lock_type: '', sect_id: '', stor_id: '' },
|
query: { search: '', is_lock: '1', lock_type: '', sect_id: '', stor_id: '' },
|
||||||
crudMethod: { ...crudRegion }
|
crudMethod: { ...crudStructattr }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header()],
|
mixins: [presenter(), header()],
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export default {
|
|||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '用户',
|
title: '用户',
|
||||||
url: '/api/in/rawAssist/getBillDtl',
|
url: '/api/mdPbBucketrecord',
|
||||||
crudMethod: {},
|
crudMethod: {},
|
||||||
optShow: {
|
optShow: {
|
||||||
reset: true
|
reset: true
|
||||||
|
|||||||
@@ -208,6 +208,18 @@
|
|||||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||||
|
<el-table-column align="center" label="操作" width="170" fixed="right">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
class="filter-item"
|
||||||
|
size="mini"
|
||||||
|
:disabled="disabledIos(scope.row)"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click.native.prevent="deleteRow(scope.$index, form.tableMater)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@@ -285,6 +297,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
disabledIos(row) {
|
||||||
|
debugger
|
||||||
|
if (row.iostorinvdis_id === undefined) {
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
open() {
|
open() {
|
||||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.content
|
||||||
@@ -381,6 +401,9 @@ export default {
|
|||||||
this.form.tableMater.splice(-1, 0, item)
|
this.form.tableMater.splice(-1, 0, item)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
deleteRow(index, rows) {
|
||||||
|
rows.splice(index, 1)
|
||||||
|
},
|
||||||
tableRowClassName({ row, rowIndex }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
row.index = rowIndex
|
row.index = rowIndex
|
||||||
},
|
},
|
||||||
@@ -441,9 +464,14 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
crudProductIn.confirmvehicle(this.form).then(res => {
|
crudProductIn.confirmvehicle(this.form).then(res => {
|
||||||
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
|
||||||
this.form.vehicle_code = ''
|
this.form.vehicle_code = ''
|
||||||
this.form.bucketunique = ''
|
this.form.bucketunique = ''
|
||||||
|
this.openParam = res
|
||||||
|
this.form.tableMater = []
|
||||||
|
this.dis_row = null
|
||||||
|
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -235,13 +235,13 @@ export default {
|
|||||||
this.currentDis = current
|
this.currentDis = current
|
||||||
},
|
},
|
||||||
queryTableDtl() {
|
queryTableDtl() {
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||||
this.tableDtl = res
|
this.tableDtl = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
queryTableDdis() {
|
queryTableDdis() {
|
||||||
if (this.currentdtl !== null) {
|
if (this.currentdtl !== null) {
|
||||||
crudProductIn.getDisTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
crudProductIn.getIosInvDis({ "iostorinvdtl_id": this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||||
this.tabledis = res
|
this.tabledis = res
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.tabledis = []
|
this.tabledis = []
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
>
|
>
|
||||||
分配
|
分配
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="success"
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
@click="divOpen"
|
@click="divOpen"
|
||||||
>
|
>
|
||||||
作业任务
|
作业任务
|
||||||
</el-button>
|
</el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
|||||||
Reference in New Issue
Block a user