add:新增半成品虚拟入库
This commit is contained in:
@@ -22,7 +22,7 @@ public enum IOSEnum {
|
|||||||
//仓库编码
|
//仓库编码
|
||||||
STOR_CODE(MapOf.of("原材料仓", "1528627964823080960", "半成品仓库", "15286279952695336962","成品库", "1528627995269533696","海柔半成品","15286279952695336963")),
|
STOR_CODE(MapOf.of("原材料仓", "1528627964823080960", "半成品仓库", "15286279952695336962","成品库", "1528627995269533696","海柔半成品","15286279952695336963")),
|
||||||
//库区编码
|
//库区编码
|
||||||
SECT_CODE(MapOf.of("成品库区", "1528631043496742912", "半成品库区", "1528631044482404352")),
|
SECT_CODE(MapOf.of("成品库区", "1528631043496742912", "半成品库区", "1528631044482404352","半成品虚拟库区","1707219721935523840")),
|
||||||
//托盘超限类型
|
//托盘超限类型
|
||||||
VEHICLE_OVER_TYPE(MapOf.of("标准", "00", "横向超", "01","纵向超","02")),
|
VEHICLE_OVER_TYPE(MapOf.of("标准", "00", "横向超", "01","纵向超","02")),
|
||||||
//单据类型
|
//单据类型
|
||||||
|
|||||||
@@ -67,6 +67,13 @@ public class StIvtIostorinvBcpController {
|
|||||||
return new ResponseEntity<>(stIvtIostorinvBcpService.queryDtl(query,page), HttpStatus.OK);
|
return new ResponseEntity<>(stIvtIostorinvBcpService.queryDtl(query,page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getVirtual")
|
||||||
|
@Log("查询入库单据")
|
||||||
|
//("查询入库单据")
|
||||||
|
public ResponseEntity<Object> getVirtual(BcpIostorInvQuery query, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(stIvtIostorinvBcpService.getVirtual(query,page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Log("新增入库单")
|
@Log("新增入库单")
|
||||||
//("新增入库单")
|
//("新增入库单")
|
||||||
@@ -125,6 +132,12 @@ public class StIvtIostorinvBcpController {
|
|||||||
return new ResponseEntity<>(stIvtIostorinvBcpService.getIoDtl(whereJson.toJavaObject(BcpIostorInvQuery.class)), HttpStatus.OK);
|
return new ResponseEntity<>(stIvtIostorinvBcpService.getIoDtl(whereJson.toJavaObject(BcpIostorInvQuery.class)), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getIODtlVirtual")
|
||||||
|
@Log("查询入库分配明细")
|
||||||
|
//("查询入库分配明细")
|
||||||
|
public ResponseEntity<Object> getIODtlVirtual(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(stIvtIostorinvBcpService.getIODtlVirtual(whereJson.toJavaObject(BcpIostorInvQuery.class)), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/confirm")
|
@PostMapping("/confirm")
|
||||||
@Log("完成单据")
|
@Log("完成单据")
|
||||||
@@ -134,6 +147,14 @@ public class StIvtIostorinvBcpController {
|
|||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirmVirtual")
|
||||||
|
@Log("完成单据")
|
||||||
|
//("完成单据")
|
||||||
|
public ResponseEntity<Object> confirmVirtual(@RequestBody JSONObject whereJson) {
|
||||||
|
stIvtIostorinvBcpService.confirmVirtual(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/confirmTask")
|
@PostMapping("/confirmTask")
|
||||||
@Log("下发任务")
|
@Log("下发任务")
|
||||||
//("下发任务")
|
//("下发任务")
|
||||||
|
|||||||
@@ -63,4 +63,11 @@ public interface IStIvtIostorinvBcpService extends IService<StIvtIostorinvBcp> {
|
|||||||
List<Map> getPdaAll(JSONObject form);
|
List<Map> getPdaAll(JSONObject form);
|
||||||
|
|
||||||
void download(BcpIostorInvQuery query, PageQuery page, HttpServletResponse response) throws IOException;
|
void download(BcpIostorInvQuery query, PageQuery page, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
|
Object getVirtual(BcpIostorInvQuery query, PageQuery page);
|
||||||
|
|
||||||
|
List<Map> getIODtlVirtual(BcpIostorInvQuery query);
|
||||||
|
|
||||||
|
String confirmVirtual(JSONObject form);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,4 +23,7 @@ public interface StIvtIostorinvBcpMapper extends BaseMapper<StIvtIostorinvBcp> {
|
|||||||
List<Map> getIostorinv(@Param("query") BcpIostorInvQuery query);
|
List<Map> getIostorinv(@Param("query") BcpIostorInvQuery query);
|
||||||
|
|
||||||
List<Map> getPdaAll(JSONObject form);
|
List<Map> getPdaAll(JSONObject form);
|
||||||
|
|
||||||
|
List<Map> getIODtlVirtual(@Param("query") BcpIostorInvQuery query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,51 @@
|
|||||||
LEFT JOIN sch_base_task task ON task.task_id = dtl.task_id
|
LEFT JOIN sch_base_task task ON task.task_id = dtl.task_id
|
||||||
<where>
|
<where>
|
||||||
dtl.is_delete = false
|
dtl.is_delete = false
|
||||||
|
and dtl.point_code != '0'
|
||||||
|
<if test="query.stor_id != null and query.stor_id != ''">
|
||||||
|
and dtl.stor_id = #{query.stor_id}
|
||||||
|
</if>
|
||||||
|
<if test="query.iostorinv_id != null and query.iostorinv_id != ''">
|
||||||
|
and dtl.iostorinv_id = #{query.iostorinv_id}
|
||||||
|
</if>
|
||||||
|
<if test="query.bill_code != null and query.bill_code != ''">
|
||||||
|
and dtl.bill_code like #{query.bill_code}
|
||||||
|
</if>
|
||||||
|
<if test="query.bill_type != null and query.bill_type != ''">
|
||||||
|
and dtl.bill_type like #{query.bill_type}
|
||||||
|
</if>
|
||||||
|
<if test="query.bill_status != null and query.bill_status != ''">
|
||||||
|
and dtl.bill_status = #{query.bill_status}
|
||||||
|
</if>
|
||||||
|
<if test="query.io_type != null and query.io_type != ''">
|
||||||
|
and dtl.io_type = #{query.io_type}
|
||||||
|
</if>
|
||||||
|
<if test="query.start_time != null and query.start_time != ''">
|
||||||
|
and dtl.create_time >= #{query.start_time}
|
||||||
|
</if>
|
||||||
|
<if test="query.end_time != null and query.end_time != ''">
|
||||||
|
and #{query.end_time} >= dtl.create_time
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by dtl.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getIODtlVirtual" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
dtl.*,
|
||||||
|
mater.material_code,
|
||||||
|
mater.material_name,
|
||||||
|
mater.material_spec,
|
||||||
|
task.task_code,
|
||||||
|
task.task_status,
|
||||||
|
ROUND(dtl.plan_qty / dtl.unit_weight,3 ) AS qty
|
||||||
|
FROM
|
||||||
|
st_ivt_iostorinv_bcp dtl
|
||||||
|
LEFT JOIN md_me_materialbase mater ON mater.material_id = dtl.material_id
|
||||||
|
LEFT JOIN sch_base_task task ON task.task_id = dtl.task_id
|
||||||
|
<where>
|
||||||
|
dtl.is_delete = false
|
||||||
|
and dtl.point_code = '0'
|
||||||
<if test="query.stor_id != null and query.stor_id != ''">
|
<if test="query.stor_id != null and query.stor_id != ''">
|
||||||
and dtl.stor_id = #{query.stor_id}
|
and dtl.stor_id = #{query.stor_id}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -155,10 +155,14 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
this.save(mst);
|
this.save(mst);
|
||||||
|
|
||||||
//锁定起点
|
//锁定起点
|
||||||
structattrService.update(new UpdateWrapper<StIvtStructattr>().lambda()
|
StIvtStructattr attrDao = structattrService.getById(mst.getStruct_id());
|
||||||
.eq(StIvtStructattr::getStruct_code, mst.getStruct_code())
|
|
||||||
.set(StIvtStructattr::getInv_code,mst.getBill_code())
|
if (!attrDao.getSect_id().equals(IOSEnum.SECT_CODE.code("半成品虚拟库区"))) {
|
||||||
.set(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("出库锁")));
|
structattrService.update(new UpdateWrapper<StIvtStructattr>().lambda()
|
||||||
|
.eq(StIvtStructattr::getStruct_code, mst.getStruct_code())
|
||||||
|
.set(StIvtStructattr::getInv_code,mst.getBill_code())
|
||||||
|
.set(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("出库锁")));
|
||||||
|
}
|
||||||
|
|
||||||
// 判断是否自动下发
|
// 判断是否自动下发
|
||||||
if (ObjectUtil.isNotEmpty(form.getString("auto_send"))) {
|
if (ObjectUtil.isNotEmpty(form.getString("auto_send"))) {
|
||||||
@@ -202,19 +206,62 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
mst.setUpdate_name(SecurityUtils.getCurrentNickName());
|
mst.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
this.updateById(mst);
|
this.updateById(mst);
|
||||||
|
|
||||||
StIvtStructivtBcp ivtDao = structivtBcpService.getById(mst.getStruct_id());
|
// 判断库区是否是虚拟区
|
||||||
//删除库存
|
if (mst.getSect_id().equals(IOSEnum.SECT_CODE.code("半成品虚拟库区"))) {
|
||||||
structivtBcpService.remove(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id", mst.getStruct_id()));
|
StIvtStructivtBcp ivtDao = structivtBcpService.getOne(
|
||||||
|
new QueryWrapper<StIvtStructivtBcp>().lambda()
|
||||||
|
.eq(StIvtStructivtBcp::getStruct_id, mst.getStruct_id())
|
||||||
|
.eq(StIvtStructivtBcp::getMaterial_id, mst.getMaterial_id())
|
||||||
|
);
|
||||||
|
|
||||||
// 插入库存变动记录
|
BigDecimal subQty = NumberUtil.sub(ivtDao.getCanuse_qty(), mst.getPlan_qty());
|
||||||
JSONObject param = JSONObject.parseObject(JSON.toJSONString(ivtDao));
|
|
||||||
param.put("change_type", ChangeIvtUtil.SUBFROZEN_SUBIVT_QTY);
|
if (subQty.doubleValue() > 0) {
|
||||||
param.put("change_qty", ivtDao.getCanuse_qty());
|
// 更新库存
|
||||||
param.put("result_qty", 0);
|
structivtBcpService.update(
|
||||||
param.put("bill_code",mst.getBill_code());
|
new UpdateWrapper<StIvtStructivtBcp>().lambda()
|
||||||
param.put("inv_id",mst.getIostorinv_id());
|
.eq(StIvtStructivtBcp::getMaterial_id, mst.getMaterial_id())
|
||||||
param.put("bill_type_scode",mst.getBill_type());
|
.eq(StIvtStructivtBcp::getStruct_id, mst.getStruct_id())
|
||||||
iStIvtStructivtflowService.insetIvtChange(param);
|
.set(StIvtStructivtBcp::getCanuse_qty, subQty)
|
||||||
|
);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// 删除库存
|
||||||
|
structivtBcpService.remove(
|
||||||
|
new QueryWrapper<StIvtStructivtBcp>().lambda()
|
||||||
|
.eq(StIvtStructivtBcp::getStruct_id, mst.getStruct_id())
|
||||||
|
.eq(StIvtStructivtBcp::getMaterial_id, mst.getMaterial_id())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 插入库存变动记录
|
||||||
|
JSONObject param = JSONObject.parseObject(JSON.toJSONString(ivtDao));
|
||||||
|
param.put("change_type", ChangeIvtUtil.SUBFROZEN_SUBIVT_QTY);
|
||||||
|
param.put("change_qty", mst.getPlan_qty());
|
||||||
|
param.put("result_qty", subQty.doubleValue() > 0 ? subQty : 0);
|
||||||
|
param.put("bill_code",mst.getBill_code());
|
||||||
|
param.put("inv_id",mst.getIostorinv_id());
|
||||||
|
param.put("bill_type_scode",mst.getBill_type());
|
||||||
|
iStIvtStructivtflowService.insetIvtChange(param);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
StIvtStructivtBcp ivtDao = structivtBcpService.getOne(
|
||||||
|
new QueryWrapper<StIvtStructivtBcp>().lambda()
|
||||||
|
.eq(StIvtStructivtBcp::getStruct_id, mst.getStruct_id())
|
||||||
|
.eq(StIvtStructivtBcp::getMaterial_id, mst.getMaterial_id())
|
||||||
|
);
|
||||||
|
//删除库存
|
||||||
|
structivtBcpService.remove(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id", mst.getStruct_id()));
|
||||||
|
|
||||||
|
// 插入库存变动记录
|
||||||
|
JSONObject param = JSONObject.parseObject(JSON.toJSONString(ivtDao));
|
||||||
|
param.put("change_type", ChangeIvtUtil.SUBFROZEN_SUBIVT_QTY);
|
||||||
|
param.put("change_qty", ivtDao.getCanuse_qty());
|
||||||
|
param.put("result_qty", 0);
|
||||||
|
param.put("bill_code",mst.getBill_code());
|
||||||
|
param.put("inv_id",mst.getIostorinv_id());
|
||||||
|
param.put("bill_type_scode",mst.getBill_type());
|
||||||
|
iStIvtStructivtflowService.insetIvtChange(param);
|
||||||
|
|
||||||
/*structivtflowService.recordStructivtFlow(
|
/*structivtflowService.recordStructivtFlow(
|
||||||
StIvtStructivtflowDto.builder()
|
StIvtStructivtflowDto.builder()
|
||||||
@@ -226,29 +273,29 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
.build()
|
.build()
|
||||||
);*/
|
);*/
|
||||||
|
|
||||||
//维护载具
|
//维护载具
|
||||||
structattrService.update(new UpdateWrapper<StIvtStructattr>().lambda()
|
structattrService.update(new UpdateWrapper<StIvtStructattr>().lambda()
|
||||||
.eq(StIvtStructattr::getStruct_code, mst.getStruct_code())
|
.eq(StIvtStructattr::getStruct_code, mst.getStruct_code())
|
||||||
.set(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
|
.set(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||||
.set(StIvtStructattr::getInv_code,"")
|
.set(StIvtStructattr::getInv_code,"")
|
||||||
.set(StIvtStructattr::getStoragevehicle_code, ""));
|
.set(StIvtStructattr::getStoragevehicle_code, ""));
|
||||||
|
|
||||||
// 更新任务为完成
|
// 更新任务为完成
|
||||||
iSchBaseTaskService.update(
|
iSchBaseTaskService.update(
|
||||||
new UpdateWrapper<SchBaseTask>().lambda()
|
new UpdateWrapper<SchBaseTask>().lambda()
|
||||||
.set(SchBaseTask::getTask_status, TaskStatusEnum.FINISHED.getCode())
|
.set(SchBaseTask::getTask_status, TaskStatusEnum.FINISHED.getCode())
|
||||||
.eq(SchBaseTask::getTask_id, mst.getTask_id())
|
.eq(SchBaseTask::getTask_id, mst.getTask_id())
|
||||||
);
|
);
|
||||||
|
|
||||||
// 更新载具扩展属性 - 释放载具对应物料关系 清空数量
|
|
||||||
iMdPbStoragevehicleextService.update(
|
|
||||||
new MdPbStoragevehicleext()
|
|
||||||
.setMaterial_id("")
|
|
||||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
|
||||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
|
||||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code,mst.getStoragevehicle_code())
|
|
||||||
);
|
|
||||||
|
|
||||||
|
// 更新载具扩展属性 - 释放载具对应物料关系 清空数量
|
||||||
|
iMdPbStoragevehicleextService.update(
|
||||||
|
new MdPbStoragevehicleext()
|
||||||
|
.setMaterial_id("")
|
||||||
|
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||||
|
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||||
|
.eq(MdPbStoragevehicleext::getStoragevehicle_code,mst.getStoragevehicle_code())
|
||||||
|
);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -461,6 +508,10 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
StIvtIostorinvBcp mst = this.getById(form.getString("iostorinv_id"));
|
StIvtIostorinvBcp mst = this.getById(form.getString("iostorinv_id"));
|
||||||
checkParam(mst);
|
checkParam(mst);
|
||||||
|
|
||||||
|
if (mst.getSect_id().equals(IOSEnum.SECT_CODE.code("半成品虚拟库区"))) {
|
||||||
|
throw new BadRequestException("此货位是虚拟货位,请强制完成单据!");
|
||||||
|
}
|
||||||
|
|
||||||
PointEvent event = PointEvent.builder()
|
PointEvent event = PointEvent.builder()
|
||||||
.type(AcsTaskEnum.TASK_STRUCT_OUT)
|
.type(AcsTaskEnum.TASK_STRUCT_OUT)
|
||||||
.acs_task_type("7")
|
.acs_task_type("7")
|
||||||
|
|||||||
@@ -144,6 +144,19 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
|||||||
mst.setStor_code(stor.getStor_code());
|
mst.setStor_code(stor.getStor_code());
|
||||||
mst.setStor_name(stor.getStor_name());
|
mst.setStor_name(stor.getStor_name());
|
||||||
}
|
}
|
||||||
|
仓位数据:
|
||||||
|
{
|
||||||
|
StIvtStructattr attrDao = structattrService.getById(JSONObject.parseObject(JSON.toJSONString(item)).getString("struct_id"));
|
||||||
|
if (ObjectUtil.isNotEmpty(attrDao)) {
|
||||||
|
mst.setStruct_id(attrDao.getStruct_id());
|
||||||
|
mst.setStruct_code(attrDao.getStruct_code());
|
||||||
|
mst.setStruct_name(attrDao.getStruct_name());
|
||||||
|
mst.setSect_id(attrDao.getSect_id());
|
||||||
|
mst.setSect_name(attrDao.getSect_name());
|
||||||
|
mst.setSect_code(attrDao.getSect_code());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
packageRow(mst, JSONObject.parseObject(JSON.toJSONString(item)));
|
packageRow(mst, JSONObject.parseObject(JSON.toJSONString(item)));
|
||||||
mst.setCreate_id(SecurityUtils.getCurrentUserId());
|
mst.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
mst.setCreate_name(SecurityUtils.getCurrentNickName());
|
mst.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
@@ -174,27 +187,30 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
|||||||
mst.setBase_bill_code(row.getString("base_bill_code"));
|
mst.setBase_bill_code(row.getString("base_bill_code"));
|
||||||
mst.setQty_unit_name(row.getString("base_unit_name"));
|
mst.setQty_unit_name(row.getString("base_unit_name"));
|
||||||
mst.setUnit_weight(row.getBigDecimal("unit_weight"));
|
mst.setUnit_weight(row.getBigDecimal("unit_weight"));
|
||||||
|
|
||||||
// 载具信息
|
// 载具信息
|
||||||
{
|
{
|
||||||
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getOne(
|
if (!mst.getPoint_code().equals("0")) {
|
||||||
new QueryWrapper<MdPbStoragevehicleinfo>().lambda()
|
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getOne(
|
||||||
.eq(MdPbStoragevehicleinfo::getStoragevehicle_code, row.getString("storagevehicle_code"))
|
new QueryWrapper<MdPbStoragevehicleinfo>().lambda()
|
||||||
);
|
.eq(MdPbStoragevehicleinfo::getStoragevehicle_code, row.getString("storagevehicle_code"))
|
||||||
|
);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(vehicleDao)) throw new BadRequestException("载具不存在!");
|
if (ObjectUtil.isEmpty(vehicleDao)) throw new BadRequestException("载具不存在!");
|
||||||
|
|
||||||
mst.setStoragevehicle_code(vehicleDao.getStoragevehicle_code());
|
mst.setStoragevehicle_code(vehicleDao.getStoragevehicle_code());
|
||||||
mst.setStoragevehicle_id(vehicleDao.getStoragevehicle_id());
|
mst.setStoragevehicle_id(vehicleDao.getStoragevehicle_id());
|
||||||
|
|
||||||
// 更新载具对应物料关系、数量
|
// 更新载具对应物料关系、数量
|
||||||
MdPbStoragevehicleext vehicleExtDao = iMdPbStoragevehicleextService.getOne(
|
MdPbStoragevehicleext vehicleExtDao = iMdPbStoragevehicleextService.getOne(
|
||||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code, row.getString("storagevehicle_code"))
|
.eq(MdPbStoragevehicleext::getStoragevehicle_code, row.getString("storagevehicle_code"))
|
||||||
);
|
);
|
||||||
if (ObjectUtil.isNotEmpty(vehicleExtDao)) {
|
if (ObjectUtil.isNotEmpty(vehicleExtDao)) {
|
||||||
vehicleExtDao.setWeight(mst.getPlan_qty());
|
vehicleExtDao.setWeight(mst.getPlan_qty());
|
||||||
vehicleExtDao.setMaterial_id(mst.getMaterial_id());
|
vehicleExtDao.setMaterial_id(mst.getMaterial_id());
|
||||||
iMdPbStoragevehicleextService.updateById(vehicleExtDao);
|
iMdPbStoragevehicleextService.updateById(vehicleExtDao);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -464,6 +480,93 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
|||||||
FileUtil.downloadExcel(list, response);
|
FileUtil.downloadExcel(list, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getVirtual(BcpIostorInvQuery query, PageQuery pageQuery) {
|
||||||
|
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||||
|
TableDataInfo build = TableDataInfo.build(this.getIODtlVirtual(query));
|
||||||
|
build.setTotalElements(page.getTotal());
|
||||||
|
return build;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map> getIODtlVirtual(BcpIostorInvQuery query) {
|
||||||
|
return this.baseMapper.getIODtlVirtual(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public String confirmVirtual(JSONObject form) {
|
||||||
|
Assert.notNull(new Object[]{form, form.get("iostorinv_id")}, "请求参数不能为空");
|
||||||
|
StIvtIostorinvBcp mst = this.getById(form.getString("iostorinv_id"));
|
||||||
|
if (StringUtils.isEmpty(mst.getStruct_code())) {
|
||||||
|
throw new BadRequestException("当前入库单还未分配仓位!");
|
||||||
|
}
|
||||||
|
|
||||||
|
mst.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
|
||||||
|
mst.setUpdate_time(DateUtil.now());
|
||||||
|
mst.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
mst.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
this.updateById(mst);
|
||||||
|
|
||||||
|
// 查看此仓位此物料的库存是否存在
|
||||||
|
StIvtStructivtBcp ivtDaoNow = structivtBcpService.getOne(
|
||||||
|
new QueryWrapper<StIvtStructivtBcp>().lambda()
|
||||||
|
.eq(StIvtStructivtBcp::getMaterial_id, mst.getMaterial_id())
|
||||||
|
.eq(StIvtStructivtBcp::getStruct_id, mst.getStruct_id())
|
||||||
|
);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(ivtDaoNow)) {
|
||||||
|
//新增库存
|
||||||
|
StIvtStructivtBcp ivtDao = StIvtStructivtBcp.builder()
|
||||||
|
.struct_id(mst.getStruct_id())
|
||||||
|
.struct_code(mst.getStruct_code())
|
||||||
|
.struct_name(mst.getStruct_name())
|
||||||
|
.material_id(mst.getMaterial_id())
|
||||||
|
.quality_scode(mst.getQuality_scode())
|
||||||
|
.pcsn(mst.getPcsn())
|
||||||
|
.ivt_level(mst.getIvt_level())
|
||||||
|
.is_active(mst.getIs_active())
|
||||||
|
.qty_unit_id("2")
|
||||||
|
.instorage_time(DateUtil.now())
|
||||||
|
.stor_id(mst.getStor_id())
|
||||||
|
.canuse_qty(mst.getPlan_qty())
|
||||||
|
.workshop_id(mst.getWorkshop_id())
|
||||||
|
.unit_weight(mst.getUnit_weight())
|
||||||
|
.bill_type(mst.getBill_type())
|
||||||
|
.build();
|
||||||
|
structivtBcpService.save(ivtDao);
|
||||||
|
|
||||||
|
// 插入库存变动记录
|
||||||
|
JSONObject param = JSONObject.parseObject(JSON.toJSONString(ivtDao));
|
||||||
|
param.put("change_type", ChangeIvtUtil.SUBWAREHOUSING_ADDIVT_QTY);
|
||||||
|
param.put("change_qty", ivtDao.getCanuse_qty());
|
||||||
|
param.put("result_qty", ivtDao.getCanuse_qty());
|
||||||
|
param.put("bill_code",mst.getBill_code());
|
||||||
|
param.put("inv_id",mst.getIostorinv_id());
|
||||||
|
param.put("bill_type_scode",IOSEnum.IO_TYPE.code("入库"));
|
||||||
|
iStIvtStructivtflowService.insetIvtChange(param);
|
||||||
|
} else {
|
||||||
|
// 增加库存
|
||||||
|
structivtBcpService.update(
|
||||||
|
new UpdateWrapper<StIvtStructivtBcp>().lambda()
|
||||||
|
.eq(StIvtStructivtBcp::getMaterial_id, mst.getMaterial_id())
|
||||||
|
.eq(StIvtStructivtBcp::getStruct_id, mst.getStruct_id())
|
||||||
|
.set(StIvtStructivtBcp::getCanuse_qty, NumberUtil.add(ivtDaoNow.getCanuse_qty(),mst.getPlan_qty()))
|
||||||
|
);
|
||||||
|
|
||||||
|
// 插入库存变动记录
|
||||||
|
JSONObject param = JSONObject.parseObject(JSON.toJSONString(ivtDaoNow));
|
||||||
|
param.put("change_type", ChangeIvtUtil.SUBWAREHOUSING_ADDIVT_QTY);
|
||||||
|
param.put("change_qty", mst.getPlan_qty());
|
||||||
|
param.put("result_qty", ivtDaoNow.getCanuse_qty());
|
||||||
|
param.put("bill_code",mst.getBill_code());
|
||||||
|
param.put("inv_id",mst.getIostorinv_id());
|
||||||
|
param.put("bill_type_scode",IOSEnum.IO_TYPE.code("入库"));
|
||||||
|
iStIvtStructivtflowService.insetIvtChange(param);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private void delTask(String task_id) {
|
private void delTask(String task_id) {
|
||||||
|
|
||||||
StIvtIostorinvBcp mstDao = this.getOne(
|
StIvtIostorinvBcp mstDao = this.getOne(
|
||||||
|
|||||||
@@ -211,7 +211,13 @@ public class StIvtMoreorlessmstBcpServiceImpl extends ServiceImpl<StIvtMoreorles
|
|||||||
.eq(StIvtStructattr::getStruct_id, ivt.getStruct_id())
|
.eq(StIvtStructattr::getStruct_id, ivt.getStruct_id())
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
iStIvtStructivtBcpService.updateById(ivt);
|
// iStIvtStructivtBcpService.updateById(ivt);
|
||||||
|
iStIvtStructivtBcpService.update(
|
||||||
|
new UpdateWrapper<StIvtStructivtBcp>().lambda()
|
||||||
|
.eq(StIvtStructivtBcp::getStruct_id, ivt.getStruct_id())
|
||||||
|
.eq(StIvtStructivtBcp::getMaterial_id, ivt.getMaterial_id())
|
||||||
|
.set(StIvtStructivtBcp::getCanuse_qty, NumberUtil.sub(canuse_qty, mol_qty))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -274,7 +280,13 @@ public class StIvtMoreorlessmstBcpServiceImpl extends ServiceImpl<StIvtMoreorles
|
|||||||
iMdPbStoragevehicleextService.updateById(vehicleDao);
|
iMdPbStoragevehicleextService.updateById(vehicleDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
iStIvtStructivtBcpService.updateById(ivt);
|
// iStIvtStructivtBcpService.updateById(ivt);
|
||||||
|
iStIvtStructivtBcpService.update(
|
||||||
|
new UpdateWrapper<StIvtStructivtBcp>().lambda()
|
||||||
|
.eq(StIvtStructivtBcp::getStruct_id, ivt.getStruct_id())
|
||||||
|
.eq(StIvtStructivtBcp::getMaterial_id, ivt.getMaterial_id())
|
||||||
|
.set(StIvtStructivtBcp::getCanuse_qty, NumberUtil.add(canuse_qty, mol_qty))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//更新明细状态
|
//更新明细状态
|
||||||
|
|||||||
@@ -382,7 +382,13 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
|||||||
}
|
}
|
||||||
in_ivt.setCanuse_qty(NumberUtil.add(in_ivt.getCanuse_qty(), dtl.getFact_qty()));
|
in_ivt.setCanuse_qty(NumberUtil.add(in_ivt.getCanuse_qty(), dtl.getFact_qty()));
|
||||||
structivtBcpService.remove(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id", turnout_struct_id));
|
structivtBcpService.remove(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id", turnout_struct_id));
|
||||||
structivtBcpService.updateById(in_ivt);
|
// structivtBcpService.updateById(in_ivt);
|
||||||
|
|
||||||
|
structivtBcpService.update(
|
||||||
|
new UpdateWrapper<StIvtStructivtBcp>().lambda()
|
||||||
|
.eq(StIvtStructivtBcp::getStruct_id, in_ivt.getStruct_id())
|
||||||
|
.set(StIvtStructivtBcp::getCanuse_qty, NumberUtil.add(in_ivt.getCanuse_qty(), dtl.getFact_qty()))
|
||||||
|
);
|
||||||
|
|
||||||
dtl.setWork_status(SHUTEnum.WORK_STATUS.code("完成"));
|
dtl.setWork_status(SHUTEnum.WORK_STATUS.code("完成"));
|
||||||
shutframedtlBcpService.updateById(dtl);
|
shutframedtlBcpService.updateById(dtl);
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ export function getIODtl(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getIODtlVirtual(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/in/semiproductIn/getIODtlVirtual',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function insertDtl(data) {
|
export function insertDtl(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/in/semiproductIn/insertDtl',
|
url: '/api/in/semiproductIn/insertDtl',
|
||||||
@@ -136,6 +144,14 @@ export function confirm(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function confirmVirtual(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/in/semiproductIn/confirmVirtual',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function delDis(data) {
|
export function delDis(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/in/semiproductIn/delDis',
|
url: '/api/in/semiproductIn/delDis',
|
||||||
@@ -187,6 +203,8 @@ export default {
|
|||||||
updateTask,
|
updateTask,
|
||||||
confirmTask,
|
confirmTask,
|
||||||
confirm,
|
confirm,
|
||||||
|
confirmVirtual,
|
||||||
queryStor,
|
queryStor,
|
||||||
getDisTask
|
getDisTask,
|
||||||
|
getIODtlVirtual
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
<!--suppress ALL -->
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="crud.status.title"
|
:title="crud.status.title"
|
||||||
@@ -12,65 +11,25 @@
|
|||||||
>
|
>
|
||||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||||
<el-col :span="20" style="border: 1px solid white">
|
<el-col :span="20" style="border: 1px solid white">
|
||||||
<span />
|
<span/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<span>
|
<span>
|
||||||
<el-button
|
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary"
|
||||||
icon="el-icon-check"
|
@click="crud.submitCU">保存</el-button>
|
||||||
size="mini"
|
|
||||||
:loading="crud.cu === 2"
|
|
||||||
type="primary"
|
|
||||||
@click="crud.submitCU"
|
|
||||||
>保存</el-button>
|
|
||||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form
|
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
|
||||||
ref="form"
|
:model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
|
||||||
:inline="true"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
size="mini"
|
|
||||||
label-width="85px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<el-form-item label="单据号" prop="bill_code">
|
<el-form-item label="单据号" prop="bill_code">
|
||||||
<label slot="label">单 据 号:</label>
|
<label slot="label">单 据 号2:</label>
|
||||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="业务日期" prop="biz_date">
|
<el-form-item label="仓库" prop="product_code">
|
||||||
<el-date-picker
|
<label slot="label">所属仓库:</label>
|
||||||
v-model="form.biz_date"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
style="width: 210px"
|
|
||||||
align="center"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
:disabled="crud.status.view > 0"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="业务类型" prop="bill_type">
|
|
||||||
<el-select
|
|
||||||
v-model="form.bill_type"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="业务类型"
|
|
||||||
class="filter-item"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="仓库" prop="stor_id">
|
|
||||||
<label slot="label">仓库</label>
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.stor_id"
|
v-model="form.stor_id"
|
||||||
clearable
|
clearable
|
||||||
@@ -87,23 +46,6 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="车间" prop="workshop_id">
|
|
||||||
<label slot="label">车间</label>
|
|
||||||
<el-select
|
|
||||||
v-model="form.workshop_id"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="全部"
|
|
||||||
class="filter-item"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.product_area"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="仓位" prop="struct_id">
|
<el-form-item label="仓位" prop="struct_id">
|
||||||
<label slot="label">仓位:</label>
|
<label slot="label">仓位:</label>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@@ -115,6 +57,23 @@
|
|||||||
@change="sectQueryChange"
|
@change="sectQueryChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="业务类型" prop="bill_type">
|
||||||
|
<el-select
|
||||||
|
v-model="form.bill_type"
|
||||||
|
clearable
|
||||||
|
placeholder="业务类型"
|
||||||
|
style="width: 210px"
|
||||||
|
class="filter-item"
|
||||||
|
:disabled="crud.status.view > 0"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.ST_INV_BCP_IN_TYPE"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="单据状态" prop="bill_status">
|
<el-form-item label="单据状态" prop="bill_status">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.bill_status"
|
v-model="form.bill_status"
|
||||||
@@ -134,46 +93,34 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="明细数" prop="detail_count">
|
<el-form-item label="明细数" prop="detail_count">
|
||||||
<label slot="label">明 细 数:</label>
|
<label slot="label">明 细 数:</label>
|
||||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总重量" prop="total_qty">
|
<el-form-item label="总重量" prop="total_qty">
|
||||||
<label slot="label">总 重 量:</label>
|
<label slot="label">总 数 量:</label>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model.number="form.total_qty"
|
v-model="form.total_qty"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:precision="3"
|
|
||||||
:min="0"
|
:min="0"
|
||||||
disabled
|
disabled
|
||||||
style="width: 210px"
|
style="width: 210px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="业务日期" prop="biz_date">
|
||||||
|
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"
|
||||||
|
value-format="yyyy-MM-dd" :disabled="crud.status.view > 0"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<label slot="label">备 注:</label>
|
<label slot="label">备 注:</label>
|
||||||
<el-input
|
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea"
|
||||||
v-model="form.remark"
|
:disabled="crud.status.view > 0"/>
|
||||||
style="width: 380px;"
|
|
||||||
rows="2"
|
|
||||||
type="textarea"
|
|
||||||
:disabled="crud.status.view > 0"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
<div v-show="crud.status.add === 1" class="crud-opts2" style="margin-bottom: 5px;">
|
||||||
<span class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left" />
|
<slot name="left"/>
|
||||||
<el-button
|
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="insertBill()"
|
|
||||||
>
|
|
||||||
添加单据物料
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -195,14 +142,26 @@
|
|||||||
border
|
border
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||||
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码"/>
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称"/>
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="入库重量">
|
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格"/>
|
||||||
|
<!-- <el-table-column show-overflow-tooltip prop="base_bill_code" label="订单号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="form.tableData[scope.$index].base_bill_code"
|
||||||
|
clearable
|
||||||
|
:controls="false"
|
||||||
|
controls-position="right"
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
<el-table-column show-overflow-tooltip prop="plan_qty" label="重量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model.number="form.tableData[scope.$index].plan_qty"
|
v-model="form.tableData[scope.$index].plan_qty"
|
||||||
size="small"
|
size="small"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@@ -212,20 +171,19 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
|
<el-table-column show-overflow-tooltip prop="unit_weight" label="单重">
|
||||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input-number
|
||||||
v-model="form.tableData[scope.$index].remark"
|
v-model="form.tableData[scope.$index].unit_weight"
|
||||||
size="small"
|
size="small"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
precision="3"
|
||||||
|
:min="0"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型" />
|
<el-table-column v-if="crud.status.add === 1" align="center" label="操作" width="170" fixed="right">
|
||||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" />
|
|
||||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
@@ -240,38 +198,29 @@
|
|||||||
|
|
||||||
<MaterDtl
|
<MaterDtl
|
||||||
:dialog-show.sync="materShow"
|
:dialog-show.sync="materShow"
|
||||||
:is-single="false"
|
:is-single="true"
|
||||||
|
:mater-opt-code="materType"
|
||||||
@setMaterValue="tableChanged"
|
@setMaterValue="tableChanged"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<BillDtl
|
|
||||||
:dialog-show.sync="billShow"
|
|
||||||
:is-single="false"
|
|
||||||
@setMaterValue="tableChanged2"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CRUD, { crud, form } from '@crud/crud'
|
import CRUD, { crud, form } from '@crud/crud'
|
||||||
|
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
||||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
import BillDtl from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDtl'
|
|
||||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
|
||||||
import crudStructattr from '@/api/wms/basedata/st/structattr'
|
import crudStructattr from '@/api/wms/basedata/st/structattr'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
bill_code: '',
|
bill_code: '',
|
||||||
product_code: '',
|
product_code: 'A1',
|
||||||
bill_status: '10',
|
bill_status: '10',
|
||||||
total_qty: 0,
|
total_qty: '0',
|
||||||
detail_count: '0',
|
detail_count: '0',
|
||||||
stor_id: '',
|
|
||||||
struct_id: '',
|
|
||||||
bill_type: '',
|
bill_type: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
workshop_id: '',
|
|
||||||
biz_date: new Date(),
|
biz_date: new Date(),
|
||||||
create_mode: '',
|
create_mode: '',
|
||||||
tableData: []
|
tableData: []
|
||||||
@@ -279,34 +228,42 @@ const defaultForm = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDialog',
|
name: 'AddDialog',
|
||||||
components: { MaterDtl, BillDtl },
|
components: {MaterDtl},
|
||||||
mixins: [crud(), form(defaultForm)],
|
mixins: [crud(), form(defaultForm)],
|
||||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
dicts: ['IO_BILL_STATUS', 'ST_QUALITY_SCODE', 'ST_INV_BCP_IN_TYPE', 'product_area'],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({title: '入库新增', crudMethod: {...crudsemiproductIn}})
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
materShow: false,
|
materShow: false,
|
||||||
billShow: false,
|
sects: [],
|
||||||
|
dtlShow: false,
|
||||||
|
opendtlParam: null,
|
||||||
|
materType: '01',
|
||||||
struct_id: '',
|
struct_id: '',
|
||||||
sect_id: '',
|
sect_id: '',
|
||||||
opendtlParam: null,
|
|
||||||
storlist: [],
|
storlist: [],
|
||||||
sects: [],
|
billtypelist: [],
|
||||||
rules: {
|
rules: {
|
||||||
product_code: [
|
product_code: [
|
||||||
{ required: true, message: '生产车间不能为空', trigger: 'blur' }
|
{required: true, message: '生产车间不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
bill_type: [
|
bill_type: [
|
||||||
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
|
{required: true, message: '业务类型不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
biz_date: [
|
biz_date: [
|
||||||
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
{required: true, message: '业务日期不能为空', trigger: 'blur'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -320,16 +277,24 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
crudStorattr.getStor({ 'stor_type': '3' }).then(res => {
|
crudStorattr.getStor({'stor_type': '2'}).then(res => {
|
||||||
this.storlist = res.content
|
this.storlist = res.content
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$emit('AddChanged')
|
this.$emit('AddChanged')
|
||||||
},
|
},
|
||||||
|
[CRUD.HOOK.beforeToEdit]() {
|
||||||
|
this.struct_id = this.crud.form.struct_id
|
||||||
|
this.sect_id = this.crud.form.sect_id
|
||||||
|
crudStructattr.getSectCascader({ 'stor_id': this.crud.form.stor_id }).then(res => {
|
||||||
|
this.sects = res.content
|
||||||
|
this.form.struct_id = this.struct_id
|
||||||
|
})
|
||||||
|
},
|
||||||
[CRUD.HOOK.afterToEdit]() {
|
[CRUD.HOOK.afterToEdit]() {
|
||||||
// 获取入库单明细
|
// 获取入库单明细
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
crudsemiproductIn.getIODtlVirtual({'iostorinv_id': this.form.iostorinv_id}).then(res => {
|
||||||
this.form.tableData = res
|
this.form.tableData = res
|
||||||
// 将明细变成不可编辑
|
// 将明细变成不可编辑
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||||
@@ -338,16 +303,8 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.beforeToEdit]() {
|
|
||||||
this.struct_id = this.crud.form.struct_id
|
|
||||||
this.sect_id = this.crud.form.sect_id
|
|
||||||
crudStructattr.getSectCascader({ 'stor_id': this.crud.form.stor_id }).then(res => {
|
|
||||||
this.sects = res.content
|
|
||||||
this.form.struct_id = this.search(this.sects, this.struct_id)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
[CRUD.HOOK.afterToView]() {
|
[CRUD.HOOK.afterToView]() {
|
||||||
crudProductIn.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
crudsemiproductIn.getIODtlVirtual({'iostorinv_id': this.form.iostorinv_id}).then(res => {
|
||||||
this.form.tableData = res
|
this.form.tableData = res
|
||||||
// 将明细变成不可编辑
|
// 将明细变成不可编辑
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||||
@@ -364,58 +321,32 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.form.stor_id) {
|
|
||||||
this.crud.notify('仓库不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.struct_id) {
|
|
||||||
this.crud.notify('仓位不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||||
const row = this.form.tableData[i]
|
const row = this.form.tableData[i]
|
||||||
|
// if (!row.base_bill_code) {
|
||||||
|
// this.crud.notify('订单号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
if (!row.plan_qty) {
|
if (!row.plan_qty) {
|
||||||
this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('重量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!this.form.stor_id) {
|
||||||
|
this.crud.notify('所属仓库不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!row.unit_weight) {
|
||||||
|
this.crud.notify('单重不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!this.struct_id) {
|
||||||
|
this.crud.notify('仓位不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
|
||||||
const row = this.form.tableData[i]
|
|
||||||
row.sect_id = this.sect_id
|
row.sect_id = this.sect_id
|
||||||
row.struct_id = this.struct_id
|
row.struct_id = this.struct_id
|
||||||
}
|
}
|
||||||
},
|
this.form.point_code = '0'
|
||||||
storChange(value) {
|
|
||||||
crudStructattr.getSectCascader({ 'stor_id': value }).then(res => {
|
|
||||||
this.sects = res.content
|
|
||||||
})
|
|
||||||
},
|
|
||||||
search(object, value) {
|
|
||||||
for (var key in object) {
|
|
||||||
if (object[key].value == value) return [object[key].value]
|
|
||||||
if (object[key].children && Object.keys(object[key].children).length > 0) {
|
|
||||||
var temp = this.search(object[key].children, value)
|
|
||||||
if (temp) return [object[key].value, temp].flat()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sectQueryChange(val) {
|
|
||||||
this.sectProp = val
|
|
||||||
if (val.length === 1) {
|
|
||||||
this.sect_id = val[0]
|
|
||||||
this.struct_id = ''
|
|
||||||
}
|
|
||||||
if (val.length === 0) {
|
|
||||||
this.sect_id = ''
|
|
||||||
this.struct_id = ''
|
|
||||||
}
|
|
||||||
if (val.length === 2) {
|
|
||||||
this.sect_id = val[0]
|
|
||||||
this.struct_id = val[1]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deleteRow(index, rows) {
|
deleteRow(index, rows) {
|
||||||
const material_code = rows[index].material_code
|
const material_code = rows[index].material_code
|
||||||
@@ -432,9 +363,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tableChanged(rows) {
|
storChange(value) {
|
||||||
|
crudStructattr.getSectCascader({ 'stor_id': value }).then(res => {
|
||||||
|
this.sects = res.content
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableChanged(item) {
|
||||||
// 对新增的行进行校验不能存在相同物料批次
|
// 对新增的行进行校验不能存在相同物料批次
|
||||||
rows.forEach((item) => {
|
|
||||||
let same_mater = true
|
let same_mater = true
|
||||||
this.form.tableData.forEach((row) => {
|
this.form.tableData.forEach((row) => {
|
||||||
if (row.material_code === item.material_code) {
|
if (row.material_code === item.material_code) {
|
||||||
@@ -443,51 +378,47 @@ export default {
|
|||||||
})
|
})
|
||||||
if (same_mater) {
|
if (same_mater) {
|
||||||
item.quality_scode = '01'
|
item.quality_scode = '01'
|
||||||
|
item.unit_weight = item.net_weight
|
||||||
item.ivt_level = '01'
|
item.ivt_level = '01'
|
||||||
item.is_active = '1'
|
item.is_active = '1'
|
||||||
item.plan_qty = 1
|
item.plan_qty = '1'
|
||||||
item.qty_unit_id = item.base_unit_id
|
|
||||||
item.qty_unit_name = item.base_unit_name
|
|
||||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||||
this.form.tableData.splice(-1, 0, item)
|
this.form.tableData.splice(-1, 0, item)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
this.form.detail_count = this.form.tableData.length
|
|
||||||
},
|
|
||||||
tableChanged2(rows) {
|
|
||||||
|
|
||||||
// 对新增的行进行校验不能存在相同物料批次
|
|
||||||
rows.forEach((item) => {
|
|
||||||
let same_mater = true
|
|
||||||
this.form.tableData.forEach((row) => {
|
|
||||||
if (row.material_code === item.material_code && row.po_code === item.po.code) {
|
|
||||||
same_mater = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (same_mater) {
|
|
||||||
item.quality_scode = '01'
|
|
||||||
item.ivt_level = '01'
|
|
||||||
item.is_active = '1'
|
|
||||||
item.plan_qty = parseFloat(item.need_qty)
|
|
||||||
item.source_bill_code = item.po_code
|
|
||||||
item.source_bill_type_name = '原料需求'
|
|
||||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
|
||||||
this.form.tableData.splice(-1, 0, item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.form.detail_count = this.form.tableData.length
|
this.form.detail_count = this.form.tableData.length
|
||||||
},
|
},
|
||||||
insertEvent(row) {
|
insertEvent(row) {
|
||||||
this.materShow = true
|
this.materShow = true
|
||||||
},
|
},
|
||||||
insertBill(row) {
|
|
||||||
this.billShow = true
|
|
||||||
},
|
|
||||||
changeQty() {
|
changeQty() {
|
||||||
this.form.total_qty = 0
|
this.form.total_qty = 0
|
||||||
this.form.tableData.forEach((item) => {
|
this.form.tableData.forEach((item) => {
|
||||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
sectQueryChange(val) {
|
||||||
|
this.sectProp = val
|
||||||
|
if (val.length === 1) {
|
||||||
|
this.sect_id = val[0]
|
||||||
|
this.struct_id = ''
|
||||||
|
}
|
||||||
|
if (val.length === 0) {
|
||||||
|
this.sect_id = ''
|
||||||
|
this.struct_id = ''
|
||||||
|
}
|
||||||
|
if (val.length === 2) {
|
||||||
|
this.sect_id = val[0]
|
||||||
|
this.struct_id = val[1]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
search(object, value) {
|
||||||
|
for (var key in object) {
|
||||||
|
if (object[key].value === value) return [object[key].value]
|
||||||
|
if (object[key].children && Object.keys(object[key].children).length > 0) {
|
||||||
|
var temp = this.search(object[key].children, value)
|
||||||
|
if (temp) return [object[key].value, temp].flat()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,142 +0,0 @@
|
|||||||
<!--suppress ALL -->
|
|
||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
title="原料需求"
|
|
||||||
append-to-body
|
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
destroy-on-close
|
|
||||||
width="1200px"
|
|
||||||
@close="close"
|
|
||||||
@open="open"
|
|
||||||
>
|
|
||||||
<div class="head-container">
|
|
||||||
<div v-if="crud.props.searchToggle">
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form
|
|
||||||
:inline="true"
|
|
||||||
class="demo-form-inline"
|
|
||||||
label-position="right"
|
|
||||||
label-width="80px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<el-form-item label="日期">
|
|
||||||
<date-range-picker v-model="query.createTime" align="center" class="date-item" value-format="yyyy-MM-dd" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据号">
|
|
||||||
<el-input
|
|
||||||
v-model="query.bill_code"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="单据号"
|
|
||||||
style="width: 200px;"
|
|
||||||
class="filter-item"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料">
|
|
||||||
<el-input
|
|
||||||
v-model="query.material_search"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="物料"
|
|
||||||
style="width: 230px;"
|
|
||||||
class="filter-item"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<rrOperation />
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
||||||
<crudOperation />
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table
|
|
||||||
ref="multipleTable"
|
|
||||||
v-loading="crud.loading"
|
|
||||||
:data="crud.data"
|
|
||||||
style="width: 100%;"
|
|
||||||
@selection-change="crud.selectionChangeHandler"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" />
|
|
||||||
<el-table-column show-overflow-tooltip width="150" prop="ask_time" label="日期" />
|
|
||||||
<el-table-column show-overflow-tooltip width="150" prop="po_code" label="单据号" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" width="250" label="物料编号" />
|
|
||||||
<el-table-column show-overflow-tooltip width="100" prop="material_name" label="物料名称" />
|
|
||||||
<el-table-column show-overflow-tooltip width="150" prop="class_name" label="物料类别" />
|
|
||||||
<el-table-column show-overflow-tooltip width="150" prop="qty" label="重量" />
|
|
||||||
<el-table-column show-overflow-tooltip width="170" prop="need_qty" label="待入重量" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
<pagination />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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, { crud, header, presenter } from '@crud/crud'
|
|
||||||
import rrOperation from '@crud/RR.operation'
|
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
|
||||||
import pagination from '@crud/Pagination'
|
|
||||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
|
||||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
|
||||||
|
|
||||||
const start = new Date()
|
|
||||||
export default {
|
|
||||||
name: 'AddDtl',
|
|
||||||
components: { crudOperation, rrOperation, pagination, DateRangePicker },
|
|
||||||
cruds() {
|
|
||||||
return CRUD({
|
|
||||||
title: '采购订单',
|
|
||||||
url: '/api/pcsIfPurchaseorder/forRawIn',
|
|
||||||
crudMethod: {},
|
|
||||||
optShow: {
|
|
||||||
reset: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
mixins: [presenter(), header(), crud()],
|
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogVisible: false,
|
|
||||||
rows: [],
|
|
||||||
tableData: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dialogShow: {
|
|
||||||
handler(newValue, oldValue) {
|
|
||||||
this.dialogVisible = newValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.$emit('update:dialogShow', false)
|
|
||||||
},
|
|
||||||
submit() {
|
|
||||||
|
|
||||||
this.$emit('update:dialogShow', false)
|
|
||||||
this.rows = this.$refs.multipleTable.selection
|
|
||||||
this.$emit('setMaterValue', this.rows)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
<!--suppress ALL -->
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
append-to-body
|
append-to-body
|
||||||
@@ -9,22 +8,18 @@
|
|||||||
@close="close"
|
@close="close"
|
||||||
@open="open"
|
@open="open"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
|
||||||
ref="form"
|
|
||||||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
|
||||||
:inline="true"
|
|
||||||
:model="form"
|
|
||||||
size="mini"
|
|
||||||
label-width="85px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<el-form-item label="单据号" prop="bill_code">
|
<el-form-item label="单据号" prop="bill_code">
|
||||||
<label slot="label">单 据 号:</label>
|
<label slot="label">单 据 号:</label>
|
||||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="所属仓库" prop="stor_name">
|
||||||
|
<label slot="label">所属仓库:</label>
|
||||||
|
<el-input v-model="form.stor_name" disabled clearable style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="生产车间">
|
<el-form-item label="生产车间">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.product_code"
|
v-model="form.workshop_id"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="全部"
|
placeholder="全部"
|
||||||
@@ -52,7 +47,7 @@
|
|||||||
@change="crud.toQuery"
|
@change="crud.toQuery"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
v-for="item in dict.ST_INV_BCP_IN_TYPE"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -77,8 +72,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="明细数" prop="detail_count">
|
<el-form-item label="明细数" prop="detail_count">
|
||||||
<label slot="label">明 细 数:</label>
|
<label slot="label">总 数 量:</label>
|
||||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
<el-input v-model="form.plan_qty" size="mini" disabled style="width: 210px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总重量" prop="total_qty">
|
<el-form-item label="总重量" prop="total_qty">
|
||||||
<label slot="label">总 重 量:</label>
|
<label slot="label">总 重 量:</label>
|
||||||
@@ -92,15 +87,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="业务日期" prop="biz_date">
|
<el-form-item label="业务日期" prop="biz_date">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="true" />
|
||||||
v-model="form.biz_date"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
style="width: 210px"
|
|
||||||
align="center"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
:disabled="true"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<label slot="label">备 注:</label>
|
<label slot="label">备 注:</label>
|
||||||
@@ -108,12 +95,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="crud-opts2">
|
<div class="crud-opts2">
|
||||||
<span class="role-span2">入库明细</span>
|
<span class="role-span2">入库作业明细</span>
|
||||||
</div>
|
</div>
|
||||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
|
||||||
:data="tableDtl"
|
:data="tableDtl"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
max-height="300"
|
max-height="300"
|
||||||
@@ -121,15 +107,17 @@
|
|||||||
border
|
border
|
||||||
:highlight-current-row="true"
|
:highlight-current-row="true"
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
@current-change="handleDtlCurrentChange"
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||||
<el-table-column prop="pcsn" label="订单号" width="150" align="center" />
|
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
<el-table-column prop="pcsn" label="批次" width="150" align="center" />
|
||||||
|
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
<el-table-column prop="unit_weight" label="单重" align="center" />
|
||||||
|
<el-table-column prop="struct_code" label="目的位置" align="center" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -138,13 +126,13 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { crud } from '@crud/crud'
|
import { crud } from '@crud/crud'
|
||||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ViewDialog',
|
name: 'ViewDialog',
|
||||||
components: {},
|
components: { },
|
||||||
mixins: [crud()],
|
mixins: [crud()],
|
||||||
dicts: ['ST_INV_RAW_IN_TYPE', 'product_area', 'IO_BILL_STATUS'],
|
dicts: ['ST_INV_BCP_IN_TYPE', 'product_area', 'IO_BILL_STATUS', 'task_status'],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -187,8 +175,7 @@ export default {
|
|||||||
this.currentDis = {}
|
this.currentDis = {}
|
||||||
this.currentdtl = null
|
this.currentdtl = null
|
||||||
this.tableDtl = []
|
this.tableDtl = []
|
||||||
this.tabledis = []
|
this.$emit('TaskChanged')
|
||||||
this.$emit('AddChanged')
|
|
||||||
},
|
},
|
||||||
stateFormat(row, column) {
|
stateFormat(row, column) {
|
||||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||||
@@ -223,18 +210,12 @@ export default {
|
|||||||
this.currentDis = current
|
this.currentDis = current
|
||||||
},
|
},
|
||||||
queryTableDtl() {
|
queryTableDtl() {
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
crudsemiproductIn.getIODtlVirtual({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||||
this.tableDtl = res
|
this.tableDtl = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
queryTableDdis() {
|
formatStatus(row) {
|
||||||
if (this.currentdtl !== null) {
|
return this.dict.label.task_status[row.task_status]
|
||||||
crudProductIn.getDisTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
|
||||||
this.tabledis = res
|
|
||||||
}).catch(() => {
|
|
||||||
this.tabledis = []
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -250,14 +231,13 @@ export default {
|
|||||||
|
|
||||||
.crud-opts2 .el-dialog__title2 {
|
.crud-opts2 .el-dialog__title2 {
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
font-size: 20px;
|
font-size:20px;
|
||||||
color: #303133;
|
color:#303133;
|
||||||
}
|
}
|
||||||
|
|
||||||
.crud-opts2 .role-span2 {
|
.crud-opts2 .role-span2 {
|
||||||
padding: 0px 0px 20px 0px;
|
padding: 0px 0px 20px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.crud-opts2 {
|
.crud-opts2 {
|
||||||
padding: 10px 0px 0px 50px;
|
padding: 10px 0px 0px 50px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
<!--suppress ALL -->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
@@ -12,13 +11,12 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
|
<el-form-item label="所属仓库">
|
||||||
<el-form-item label="仓库">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.stor_id"
|
v-model="query.stor_id"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="仓库"
|
placeholder="单据状态"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@change="crud.toQuery"
|
@change="crud.toQuery"
|
||||||
>
|
>
|
||||||
@@ -50,31 +48,11 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="生成方式">
|
|
||||||
<el-select
|
|
||||||
v-model="query.create_mode"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
size="mini"
|
|
||||||
placeholder="生成方式"
|
|
||||||
class="filter-item"
|
|
||||||
@change="crud.toQuery"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.ST_INV_CREATE"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="单据日期">
|
<el-form-item label="单据日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.createTime"
|
v-model="query.createTime"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
align="center"
|
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
@@ -105,7 +83,7 @@
|
|||||||
v-model="query.bill_code"
|
v-model="query.bill_code"
|
||||||
size="mini"
|
size="mini"
|
||||||
clearable
|
clearable
|
||||||
placeholder="入库单号"
|
placeholder="单据号"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -139,7 +117,7 @@
|
|||||||
type="warning"
|
type="warning"
|
||||||
icon="el-icon-check"
|
icon="el-icon-check"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="confirm_flag"
|
:disabled="dis_flag"
|
||||||
@click="confirm"
|
@click="confirm"
|
||||||
>
|
>
|
||||||
强制确认
|
强制确认
|
||||||
@@ -159,36 +137,28 @@
|
|||||||
@select-all="onSelectAll"
|
@select-all="onSelectAll"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
|
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="stor_name" label="生产车间" width="130" show-overflow-tooltip />
|
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
|
||||||
<el-table-column
|
<el-table-column prop="workshop_id" label="生产车间" width="130" show-overflow-tooltip />
|
||||||
show-overflow-tooltip
|
<el-table-column prop="stor_name" label="仓库" width="130" show-overflow-tooltip />
|
||||||
prop="bill_type"
|
<el-table-column prop="sect_name" label="库区" width="130" show-overflow-tooltip />
|
||||||
min-width="120"
|
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" label="业务类型" :formatter="bill_typeFormat" />
|
||||||
label="业务类型"
|
<!-- <el-table-column show-overflow-tooltip prop="base_bill_code" min-width="120" label="关联单据号" />-->
|
||||||
:formatter="bill_typeFormat"
|
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||||
/>
|
<el-table-column show-overflow-tooltip min-width="120" prop="material_spec" label="物料规格" />
|
||||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
<el-table-column show-overflow-tooltip min-width="120" prop="plan_qty" label="总重量(g)" />
|
||||||
<el-table-column label="明细数量" align="center" prop="detail_count" />
|
<el-table-column show-overflow-tooltip min-width="120" prop="qty" label="总数量(个)" />
|
||||||
<el-table-column label="总重量" align="center" prop="total_qty">
|
<el-table-column show-overflow-tooltip min-width="120" prop="unit_weight" label="单重" />
|
||||||
<template slot-scope="scope">
|
<el-table-column show-overflow-tooltip min-width="120" prop="struct_code" label="分配货位" />
|
||||||
{{ fun(scope.row.total_qty) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="制单人" align="center" prop="create_name" />
|
<el-table-column label="创建人" align="center" prop="create_name" />
|
||||||
<el-table-column label="制单时间" align="center" prop="create_time" width="150" />
|
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
|
||||||
<el-table-column label="修改人" align="center" prop="update_name" />
|
<el-table-column label="修改人" align="center" prop="update_name" />
|
||||||
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
|
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
|
||||||
<el-table-column label="分配人" align="center" prop="dis_name" width="140px" />
|
|
||||||
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />
|
|
||||||
<el-table-column label="确认人" align="center" prop="confirm_name" width="150" />
|
|
||||||
<el-table-column label="确认时间" align="center" prop="confirm_time" width="150" />
|
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
@@ -205,43 +175,47 @@
|
|||||||
</div>
|
</div>
|
||||||
<AddDialog @AddChanged="querytable" />
|
<AddDialog @AddChanged="querytable" />
|
||||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||||
|
<DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import rawProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
||||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
|
||||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
import AddDialog from '@/views/wms/storage_manage/semiproduct/semivproductIn/AddDialog'
|
||||||
import AddDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDialog'
|
import ViewDialog from '@/views/wms/storage_manage/semiproduct/semivproductIn/ViewDialog'
|
||||||
import ViewDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/ViewDialog'
|
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||||
|
import { download } from '@/api/data'
|
||||||
|
import { downloadFile } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RawProductIn',
|
name: 'SemiproductIn',
|
||||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
|
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '',
|
title: '',
|
||||||
|
query: {
|
||||||
|
'io_type': '0'
|
||||||
|
},
|
||||||
optShow: { add: true, reset: true },
|
optShow: { add: true, reset: true },
|
||||||
idField: 'iostorinv_id',
|
idField: 'iostorinv_id',
|
||||||
url: '/api/stIvtIostorinvYl',
|
url: '/api/in/semiproductIn/getVirtual',
|
||||||
sort: ['bill_code'],
|
crudMethod: { ...crudsemiproductIn }
|
||||||
crudMethod: { ...rawProductIn }
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['IO_BILL_STATUS', 'ST_INV_BCP_IN_TYPE', 'product_area', 'ST_INV_CREATE'],
|
dicts: ['IO_BILL_STATUS', 'product_area', 'ST_INV_BCP_IN_TYPE', 'ST_INV_CREATE'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
permission: {},
|
permission: {},
|
||||||
|
product_code: 'A1',
|
||||||
dis_flag: true,
|
dis_flag: true,
|
||||||
confirm_flag: true,
|
confirm_flag: true,
|
||||||
disShow: false,
|
disShow: false,
|
||||||
@@ -251,6 +225,8 @@ export default {
|
|||||||
openParam: [],
|
openParam: [],
|
||||||
currentRow: null,
|
currentRow: null,
|
||||||
storlist: [],
|
storlist: [],
|
||||||
|
loadingAutodiv: false,
|
||||||
|
downloading: false,
|
||||||
storId: null
|
storId: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -266,7 +242,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
crudStorattr.getStor({ 'stor_type': '3' }).then(res => {
|
crudStorattr.getStor({ 'stor_type': '2' }).then(res => {
|
||||||
this.storlist = res.content
|
this.storlist = res.content
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -295,11 +271,16 @@ export default {
|
|||||||
buttonChange(currentRow) {
|
buttonChange(currentRow) {
|
||||||
if (currentRow !== null) {
|
if (currentRow !== null) {
|
||||||
this.currentRow = currentRow
|
this.currentRow = currentRow
|
||||||
if (currentRow.bill_status === '10') {
|
if (currentRow.bill_status === '10' || currentRow.bill_status === '20') {
|
||||||
this.confirm_flag = false
|
this.confirm_flag = false
|
||||||
} else {
|
} else {
|
||||||
this.confirm_flag = true
|
this.confirm_flag = true
|
||||||
}
|
}
|
||||||
|
if (currentRow.bill_status !== '99') {
|
||||||
|
this.dis_flag = false
|
||||||
|
} else {
|
||||||
|
this.dis_flag = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCurrentChange(currentRow) {
|
handleCurrentChange(currentRow) {
|
||||||
@@ -316,22 +297,49 @@ export default {
|
|||||||
this.mstrow = row
|
this.mstrow = row
|
||||||
this.viewShow = true
|
this.viewShow = true
|
||||||
},
|
},
|
||||||
|
toEdtl(row) {
|
||||||
|
this.editShow = true
|
||||||
|
this.mstrow = row
|
||||||
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
if (!this.currentRow) {
|
if (!this.currentRow) {
|
||||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
crudProductIn.confirm(this.currentRow).then(res => {
|
crudsemiproductIn.confirmVirtual(this.currentRow).then(res => {
|
||||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
confirmTask() {
|
||||||
|
if (!this.currentRow) {
|
||||||
|
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loadingAutodiv = true
|
||||||
|
crudsemiproductIn.confirmTask(this.currentRow).then(res => {
|
||||||
|
this.crud.notify('单据下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
}).finally(() => {
|
||||||
|
this.loadingAutodiv = false
|
||||||
|
})
|
||||||
|
},
|
||||||
stateFormat(row, column) {
|
stateFormat(row, column) {
|
||||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||||
},
|
},
|
||||||
querytable() {
|
querytable() {
|
||||||
this.onSelectAll()
|
this.onSelectAll()
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
downloadButton() {
|
||||||
|
this.downloading = true
|
||||||
|
download('/api/in/semiproductIn/download', this.query).then(result => {
|
||||||
|
|
||||||
|
downloadFile(result, '半成品入库单', 'xlsx')
|
||||||
|
this.downloading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.downloading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export function add(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function del(ids) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/delete',
|
|
||||||
method: 'post',
|
|
||||||
data: ids
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function edit(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/update',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function confirm(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/confirm',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getIODtl(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/getIODtl',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
add,
|
|
||||||
edit,
|
|
||||||
del,
|
|
||||||
confirm,
|
|
||||||
getIODtl
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user