add:退料管理
This commit is contained in:
@@ -81,4 +81,11 @@ public class GroupController {
|
|||||||
iMdPbGroupplateService.delete(ids);
|
iMdPbGroupplateService.delete(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/copySave")
|
||||||
|
@Log("查询供应商")
|
||||||
|
public ResponseEntity<Object> copySave(@RequestBody GroupPlate dto) {
|
||||||
|
iMdPbGroupplateService.create(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package org.nl.wms.pdm_manage.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.base.TableDataInfo;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.logging.annotation.Log;
|
||||||
|
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialDtlService;
|
||||||
|
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDtlDto;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 产线叫料明细 控制层
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Liuxy
|
||||||
|
* @since 2025-08-19
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/api/bomCallMaterialDtl")
|
||||||
|
@Slf4j
|
||||||
|
public class BomCallMaterialDtlController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPdmBomCallMaterialDtlService iPdmBomCallMaterialDtlService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("分页查询")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(iPdmBomCallMaterialDtlService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getDtl")
|
||||||
|
@Log("查询明细")
|
||||||
|
public ResponseEntity<Object> getDtl(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(iPdmBomCallMaterialDtlService.getDtl(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getWeigh")
|
||||||
|
@Log("获取称重信息")
|
||||||
|
public ResponseEntity<Object> getWeigh(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(iPdmBomCallMaterialDtlService.getWeigh(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/saveWeigh")
|
||||||
|
@Log("保存称重信息")
|
||||||
|
public ResponseEntity<Object> saveWeigh(@RequestBody PdmBomCallMaterialDtlDto dto) {
|
||||||
|
iPdmBomCallMaterialDtlService.saveWeigh(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirm")
|
||||||
|
@Log("退料确认")
|
||||||
|
public ResponseEntity<Object> confirm(@RequestBody PdmBomCallMaterialDtlDto dto) {
|
||||||
|
iPdmBomCallMaterialDtlService.confirm(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -20,11 +20,14 @@ import java.util.Map;
|
|||||||
@Getter
|
@Getter
|
||||||
public enum BomEnum {
|
public enum BomEnum {
|
||||||
|
|
||||||
// 叫料单状态
|
// 叫料单主表状态
|
||||||
CALL_BOM_STATUS(MapOf.of("生成", "1", "叫料中", "2", "叫料完成", "3"
|
CALL_BOM_STATUS(MapOf.of("生成", "1", "叫料中", "2", "叫料完成", "3"
|
||||||
, "退料中", "4", "完成", "5"
|
, "退料中", "4", "完成", "5"
|
||||||
)),
|
)),
|
||||||
|
|
||||||
|
// 叫料单明细状态
|
||||||
|
CALL_BOM_DTL_STATUS(MapOf.of("生成", "1", "完成", "2")),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private Map<String, String> code;
|
private Map<String, String> code;
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package org.nl.wms.pdm_manage.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
|
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDtlDto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 产线叫料单明细 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Liuxy
|
||||||
|
* @since 2025-08-19
|
||||||
|
*/
|
||||||
|
public interface IPdmBomCallMaterialDtlService extends IService<PdmBomCallMaterialDtl> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param whereJson : {查询参数}
|
||||||
|
* @param page : 分页对象
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
IPage<PdmBomCallMaterialDtlDto> queryAll(Map whereJson, PageQuery page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询明细
|
||||||
|
*
|
||||||
|
* @param whereJson {
|
||||||
|
* bom_id
|
||||||
|
* }
|
||||||
|
* @return List<PdmBomCallMaterialDtlDto>
|
||||||
|
*/
|
||||||
|
List<PdmBomCallMaterialDtlDto> getDtl(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取称重信息
|
||||||
|
*
|
||||||
|
* @param whereJson {
|
||||||
|
* vehicle_code: 载具编码
|
||||||
|
* }
|
||||||
|
* @return JSONObject {
|
||||||
|
* weigh_qty: 称重重量
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
JSONObject getWeigh(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存称重信息
|
||||||
|
*
|
||||||
|
* @param dto {
|
||||||
|
* 叫料明细
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void saveWeigh(PdmBomCallMaterialDtlDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料确认
|
||||||
|
*
|
||||||
|
* @param dto {
|
||||||
|
* 叫料明细
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void confirm(PdmBomCallMaterialDtlDto dto);
|
||||||
|
}
|
||||||
@@ -54,4 +54,10 @@ public interface IPdmBomCallMaterialService extends IService<PdmBomCallMaterial>
|
|||||||
* @return PdmBomCallMaterial 实体类
|
* @return PdmBomCallMaterial 实体类
|
||||||
*/
|
*/
|
||||||
PdmBomCallMaterial findByCode (String bom_code);
|
PdmBomCallMaterial findByCode (String bom_code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新叫料单状态
|
||||||
|
* @param bom_id 叫料单标识
|
||||||
|
*/
|
||||||
|
void updateStatus(String bom_id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class PdmBomCallMaterial implements Serializable {
|
|||||||
private BigDecimal real_qty;
|
private BigDecimal real_qty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实际用料总量
|
* 实际用料重量
|
||||||
*/
|
*/
|
||||||
private BigDecimal real_weigh_qty;
|
private BigDecimal real_weigh_qty;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package org.nl.wms.pdm_manage.service.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 产线叫料单明细
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Liuxy
|
||||||
|
* @since 2025-08-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("pdm_bom_callmaterialdtl")
|
||||||
|
public class PdmBomCallMaterialDtl implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标识
|
||||||
|
*/
|
||||||
|
@TableId(value = "bomdtl_id")
|
||||||
|
private String bomdtl_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单标识
|
||||||
|
*/
|
||||||
|
private String bom_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料标识
|
||||||
|
*/
|
||||||
|
private String material_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次
|
||||||
|
*/
|
||||||
|
private String pcsn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 载具编码
|
||||||
|
*/
|
||||||
|
private String vehicle_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库仓位
|
||||||
|
*/
|
||||||
|
private String struct_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态
|
||||||
|
*/
|
||||||
|
private String bom_status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库分配标识
|
||||||
|
*/
|
||||||
|
private String out_dis_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库数量
|
||||||
|
*/
|
||||||
|
private BigDecimal out_qty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 称重重量
|
||||||
|
*/
|
||||||
|
private BigDecimal weigh_qty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人标识
|
||||||
|
*/
|
||||||
|
private String create_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String create_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String create_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private String confirm_time;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package org.nl.wms.pdm_manage.service.dao.mapper;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
|
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDtlDto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 产线叫料单明细 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Liuxy
|
||||||
|
* @since 2025-08-19
|
||||||
|
*/
|
||||||
|
public interface PdmBomCallMaterialDtlMapper extends BaseMapper<PdmBomCallMaterialDtl> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页条件
|
||||||
|
* @param whereJson 查询条件
|
||||||
|
* @return IPage<PdmBomCallMaterialDtlDto>
|
||||||
|
*/
|
||||||
|
IPage<PdmBomCallMaterialDtlDto> queryAllByPage(Page<PdmBomCallMaterialDtlDto> page, @Param("param") Map whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询明细
|
||||||
|
*
|
||||||
|
* @param whereJson {
|
||||||
|
* bom_id
|
||||||
|
* }
|
||||||
|
* @return List<PdmBomCallMaterialDtlDto>
|
||||||
|
*/
|
||||||
|
List<PdmBomCallMaterialDtlDto> getDtl(@Param("param") JSONObject whereJson);
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.nl.wms.pdm_manage.service.dao.mapper.PdmBomCallMaterialDtlMapper">
|
||||||
|
|
||||||
|
<select id="queryAllByPage" resultType="org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDtlDto">
|
||||||
|
SELECT
|
||||||
|
dtl.*,
|
||||||
|
mst.bom_code,
|
||||||
|
mst.device_code,
|
||||||
|
mater.material_code,
|
||||||
|
mater.material_name,
|
||||||
|
mater.material_spec,
|
||||||
|
attr.sect_name,
|
||||||
|
attr.stor_name
|
||||||
|
FROM
|
||||||
|
pdm_bom_callmaterialdtl dtl
|
||||||
|
INNER JOIN pdm_bom_callmaterial mst ON mst.bom_id = dtl.bom_id
|
||||||
|
INNER JOIN md_me_materialbase mater ON mater.material_id = dtl.material_id
|
||||||
|
LEFT JOIN st_ivt_structattr attr ON attr.struct_code = dtl.struct_code
|
||||||
|
<where>
|
||||||
|
mst.bom_status IN ('3','4')
|
||||||
|
<if test="param.material_code != null and param.material_code != ''">
|
||||||
|
AND
|
||||||
|
(mater.material_code LIKE #{param.material_code} or
|
||||||
|
mater.material_name LIKE #{param.material_code} )
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="param.device_code != null and param.device_code != ''">
|
||||||
|
AND
|
||||||
|
mst.device_code LIKE #{param.device_code}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="param.bom_code != null and param.bom_code != ''">
|
||||||
|
AND
|
||||||
|
mst.bom_code LIKE #{param.bom_code}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="param.bom_status != null and param.bom_status != ''">
|
||||||
|
AND
|
||||||
|
dtl.bom_status = #{param.bom_status}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="param.pcsn != null and param.pcsn != ''">
|
||||||
|
AND
|
||||||
|
dtl.pcsn = #{param.pcsn}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="param.vehicle_code != null and param.vehicle_code != ''">
|
||||||
|
AND
|
||||||
|
dtl.vehicle_code = #{param.vehicle_code}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
ORDER BY dtl.create_time Desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDtl" resultType="org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDtlDto">
|
||||||
|
SELECT
|
||||||
|
dtl.*,
|
||||||
|
mst.bom_code,
|
||||||
|
mst.device_code,
|
||||||
|
mater.material_code,
|
||||||
|
mater.material_name,
|
||||||
|
mater.material_spec,
|
||||||
|
attr.sect_name,
|
||||||
|
attr.stor_name
|
||||||
|
FROM
|
||||||
|
pdm_bom_callmaterialdtl dtl
|
||||||
|
INNER JOIN pdm_bom_callmaterial mst ON mst.bom_id = dtl.bom_id
|
||||||
|
INNER JOIN md_me_materialbase mater ON mater.material_id = dtl.material_id
|
||||||
|
LEFT JOIN st_ivt_structattr attr ON attr.struct_code = dtl.struct_code
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
<if test="param.bom_id != null and param.bom_id != ''">
|
||||||
|
AND
|
||||||
|
dtl.bom_id = #{param.bom_id}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
ORDER BY dtl.create_time Desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package org.nl.wms.pdm_manage.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 产线叫料单明细dto
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Liuxy
|
||||||
|
* @since 2025-08-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PdmBomCallMaterialDtlDto extends PdmBomCallMaterialDtl {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料标规格
|
||||||
|
*/
|
||||||
|
private String material_spec;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料编码
|
||||||
|
*/
|
||||||
|
private String material_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料名称
|
||||||
|
*/
|
||||||
|
private String material_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单编码
|
||||||
|
*/
|
||||||
|
private String bom_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库区名称
|
||||||
|
*/
|
||||||
|
private String sect_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库名称
|
||||||
|
*/
|
||||||
|
private String stor_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机台编码
|
||||||
|
*/
|
||||||
|
private String device_code;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
package org.nl.wms.pdm_manage.service.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.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
|
||||||
|
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo;
|
||||||
|
import org.nl.wms.ext.service.WmsToAcsService;
|
||||||
|
import org.nl.wms.ext.service.util.AcsResponse;
|
||||||
|
import org.nl.wms.pdm_manage.enums.BomEnum;
|
||||||
|
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialDtlService;
|
||||||
|
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialService;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterial;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.mapper.PdmBomCallMaterialDtlMapper;
|
||||||
|
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDtlDto;
|
||||||
|
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||||
|
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||||
|
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 产线叫料单明细 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Liuxy
|
||||||
|
* @since 2025-08-19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PdmBomCallMaterialDtlServiceImpl extends ServiceImpl<PdmBomCallMaterialDtlMapper, PdmBomCallMaterialDtl> implements IPdmBomCallMaterialDtlService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 叫料工单服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private IPdmBomCallMaterialService iPdmBomCallMaterialService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点位信息服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private ISchBasePointService iSchBasePointService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 载具信息服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private IMdPbStoragevehicleinfoService iMdPbStoragevehicleinfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wms调用acs服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private WmsToAcsService wmsToAcsService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<PdmBomCallMaterialDtlDto> queryAll(Map whereJson, PageQuery page) {
|
||||||
|
return this.baseMapper.queryAllByPage(new Page<>(page.getPage() + 1, page.getSize()),
|
||||||
|
whereJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PdmBomCallMaterialDtlDto> getDtl(JSONObject whereJson) {
|
||||||
|
return this.baseMapper.getDtl(whereJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public JSONObject getWeigh(JSONObject whereJson) {
|
||||||
|
// 判断当前载具是否是称重位上的载具
|
||||||
|
SchBasePoint pointDao = iSchBasePointService.getById(IOSConstant.CZW_POINT);
|
||||||
|
if (!pointDao.getVehicle_code().equals(whereJson.getString("vehicle_code"))) {
|
||||||
|
throw new BadRequestException("当前称重位载具与退料载具不符,当前称重位载具为【" + pointDao.getVehicle_code() + "】");
|
||||||
|
}
|
||||||
|
// 获取载具信息
|
||||||
|
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(pointDao.getVehicle_code());
|
||||||
|
if (ObjectUtil.isEmpty(vehicleDao.getWeigth())) {
|
||||||
|
throw new BadRequestException("请维护当前载具重量【" + pointDao.getVehicle_code() + "】");
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO 调用ACS接口获取称重信息
|
||||||
|
AcsResponse weighAcs = wmsToAcsService.getWeighAcs(new JSONObject());
|
||||||
|
JSONObject jsonResult = weighAcs.getResultData();
|
||||||
|
|
||||||
|
// 称重重量
|
||||||
|
double weigh_qty = NumberUtil.round(jsonResult.getDoubleValue("weigh_qty"), 2).doubleValue();
|
||||||
|
// 扣除载具重量
|
||||||
|
double sub_qty = NumberUtil.sub(weigh_qty, vehicleDao.getWeigth().doubleValue());
|
||||||
|
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
result.put("weigh_qty", NumberUtil.round(sub_qty, 2));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void saveWeigh(PdmBomCallMaterialDtlDto dto) {
|
||||||
|
// 更新称重信息
|
||||||
|
PdmBomCallMaterialDtl bomdtlDao = this.getById(dto.getBomdtl_id());
|
||||||
|
bomdtlDao.setWeigh_qty(dto.getWeigh_qty());
|
||||||
|
this.updateById(bomdtlDao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void confirm(PdmBomCallMaterialDtlDto dto) {
|
||||||
|
// 更新明细状态完成
|
||||||
|
PdmBomCallMaterialDtl bomdtlDao = this.getById(dto.getBomdtl_id());
|
||||||
|
bomdtlDao.setBom_status(BomEnum.CALL_BOM_DTL_STATUS.code("完成"));
|
||||||
|
bomdtlDao.setConfirm_time(DateUtil.now());
|
||||||
|
this.updateById(bomdtlDao);
|
||||||
|
|
||||||
|
// 查询叫料工单
|
||||||
|
PdmBomCallMaterial bomDao = iPdmBomCallMaterialService.getById(dto.getBom_id());
|
||||||
|
|
||||||
|
// 增加叫料工单实际用料重量: 叫料单实际用料 + (叫料明细出库重量 - 叫料明细称重重量)
|
||||||
|
double qty = NumberUtil.sub(dto.getOut_qty(), dto.getWeigh_qty()).doubleValue();
|
||||||
|
double real_weigh_qty = NumberUtil.add(bomDao.getReal_weigh_qty(), qty).doubleValue();
|
||||||
|
|
||||||
|
bomDao.setReal_weigh_qty(NumberUtil.round(real_weigh_qty, 2));
|
||||||
|
iPdmBomCallMaterialService.updateById(bomDao);
|
||||||
|
|
||||||
|
// 更新叫料单状态
|
||||||
|
iPdmBomCallMaterialService.updateStatus(bomDao.getBom_id());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,14 +12,17 @@ import org.nl.common.utils.SecurityUtils;
|
|||||||
import org.nl.wms.basedata_manage.service.IMdPbMeasureunitService;
|
import org.nl.wms.basedata_manage.service.IMdPbMeasureunitService;
|
||||||
import org.nl.wms.basedata_manage.service.dao.MdPbMeasureunit;
|
import org.nl.wms.basedata_manage.service.dao.MdPbMeasureunit;
|
||||||
import org.nl.wms.pdm_manage.enums.BomEnum;
|
import org.nl.wms.pdm_manage.enums.BomEnum;
|
||||||
|
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialDtlService;
|
||||||
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialService;
|
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialService;
|
||||||
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterial;
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterial;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
import org.nl.wms.pdm_manage.service.dao.mapper.PdmBomCallMaterialMapper;
|
import org.nl.wms.pdm_manage.service.dao.mapper.PdmBomCallMaterialMapper;
|
||||||
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDto;
|
import org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@@ -40,6 +43,12 @@ public class PdmBomCallMaterialServiceImpl extends ServiceImpl<PdmBomCallMateria
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IMdPbMeasureunitService iMdPbMeasureunitService;
|
private IMdPbMeasureunitService iMdPbMeasureunitService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 叫料单明细服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private IPdmBomCallMaterialDtlService iPdmBomCallMaterialDtlService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<PdmBomCallMaterialDto> queryAll(Map whereJson, PageQuery page) {
|
public IPage<PdmBomCallMaterialDto> queryAll(Map whereJson, PageQuery page) {
|
||||||
return this.baseMapper.queryAllByPage(new Page<>(page.getPage() + 1, page.getSize()),
|
return this.baseMapper.queryAllByPage(new Page<>(page.getPage() + 1, page.getSize()),
|
||||||
@@ -78,7 +87,29 @@ public class PdmBomCallMaterialServiceImpl extends ServiceImpl<PdmBomCallMateria
|
|||||||
public PdmBomCallMaterial findByCode(String bom_code) {
|
public PdmBomCallMaterial findByCode(String bom_code) {
|
||||||
return this.baseMapper.selectOne(
|
return this.baseMapper.selectOne(
|
||||||
new QueryWrapper<PdmBomCallMaterial>().lambda()
|
new QueryWrapper<PdmBomCallMaterial>().lambda()
|
||||||
.eq(PdmBomCallMaterial::getBom_code, bom_code)
|
.eq(PdmBomCallMaterial::getBom_code, bom_code)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void updateStatus(String bom_id) {
|
||||||
|
PdmBomCallMaterial bomDao = this.getById(bom_id);
|
||||||
|
|
||||||
|
// 查询叫料单明细
|
||||||
|
List<PdmBomCallMaterialDtl> bomDtlList = iPdmBomCallMaterialDtlService.list(
|
||||||
|
new QueryWrapper<PdmBomCallMaterialDtl>().lambda()
|
||||||
|
.eq(PdmBomCallMaterialDtl::getBom_id, bom_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
// 全部为完成则更新叫料单状态为完成,否则为退料中
|
||||||
|
boolean is_confirm = bomDtlList.stream()
|
||||||
|
.allMatch(row -> row.getBom_status().equals(BomEnum.CALL_BOM_DTL_STATUS.code("完成")));
|
||||||
|
|
||||||
|
if (is_confirm) {
|
||||||
|
bomDao.setConfirm_time(DateUtil.now());
|
||||||
|
}
|
||||||
|
bomDao.setBom_status(is_confirm ? BomEnum.CALL_BOM_STATUS.code("完成") : BomEnum.CALL_BOM_STATUS.code("退料中"));
|
||||||
|
this.updateById(bomDao);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,16 @@ package org.nl.wms.sch_manage.service.util.tasks;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.IdUtil;
|
import org.nl.config.IdUtil;
|
||||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||||
|
import org.nl.wms.pdm_manage.enums.BomEnum;
|
||||||
|
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialDtlService;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
import org.nl.wms.sch_manage.enums.TaskEnum;
|
import org.nl.wms.sch_manage.enums.TaskEnum;
|
||||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
import org.nl.wms.sch_manage.enums.TaskStatus;
|
||||||
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||||
@@ -21,7 +25,9 @@ import org.nl.wms.sch_manage.service.util.TaskType;
|
|||||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||||
import org.nl.wms.warehouse_management.service.IOutBillService;
|
import org.nl.wms.warehouse_management.service.IOutBillService;
|
||||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
||||||
|
import org.nl.wms.warehouse_management.service.dao.IOStorInvDtl;
|
||||||
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
||||||
|
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDtlMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -58,12 +64,24 @@ public class ReceiveOutTask extends AbstractTask {
|
|||||||
@Resource
|
@Resource
|
||||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明细mapper
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private IOStorInvDtlMapper ioStorInvDtlMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点位服务
|
* 点位服务
|
||||||
*/
|
*/
|
||||||
@Resource
|
@Resource
|
||||||
private ISchBasePointService iSchBasePointService;
|
private ISchBasePointService iSchBasePointService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料单服务
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private IPdmBomCallMaterialDtlService iPdmBomCallMaterialDtlService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String create(JSONObject json) {
|
public String create(JSONObject json) {
|
||||||
SchBaseTask task = new SchBaseTask();
|
SchBaseTask task = new SchBaseTask();
|
||||||
@@ -152,10 +170,6 @@ public class ReceiveOutTask extends AbstractTask {
|
|||||||
this.cancelTask(taskObj);
|
this.cancelTask(taskObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void taskConfirm(String task_code) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void finishTask(SchBaseTask taskObj) {
|
public void finishTask(SchBaseTask taskObj) {
|
||||||
// 更新终点
|
// 更新终点
|
||||||
@@ -170,6 +184,7 @@ public class ReceiveOutTask extends AbstractTask {
|
|||||||
taskObj.setRemark("已完成");
|
taskObj.setRemark("已完成");
|
||||||
taskService.updateById(taskObj);
|
taskService.updateById(taskObj);
|
||||||
outBillService.taskFinish(taskObj);
|
outBillService.taskFinish(taskObj);
|
||||||
|
this.taskConfirm(taskObj.getTask_code());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -197,4 +212,30 @@ public class ReceiveOutTask extends AbstractTask {
|
|||||||
taskObj.setRemark("已取消");
|
taskObj.setRemark("已取消");
|
||||||
taskService.updateById(taskObj);
|
taskService.updateById(taskObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void taskConfirm(String task_code) {
|
||||||
|
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||||
|
IOStorInvDis disDao = ioStorInvDisMapper.selectOne(
|
||||||
|
new QueryWrapper<IOStorInvDis>().lambda()
|
||||||
|
.eq(IOStorInvDis::getTask_id, taskObj.getTask_id())
|
||||||
|
);
|
||||||
|
IOStorInvDtl stDtlDao = ioStorInvDtlMapper.selectById(disDao.getIostorinvdtl_id());
|
||||||
|
|
||||||
|
// 创建退料明细
|
||||||
|
PdmBomCallMaterialDtl materDtlDao = new PdmBomCallMaterialDtl();
|
||||||
|
materDtlDao.setBomdtl_id(IdUtil.getStringId());
|
||||||
|
materDtlDao.setBom_id(stDtlDao.getSource_billdtl_id());
|
||||||
|
materDtlDao.setMaterial_id(disDao.getMaterial_id());
|
||||||
|
materDtlDao.setPcsn(disDao.getPcsn());
|
||||||
|
materDtlDao.setVehicle_code(disDao.getStoragevehicle_code());
|
||||||
|
materDtlDao.setStruct_code(disDao.getStruct_code());
|
||||||
|
materDtlDao.setBom_status(BomEnum.CALL_BOM_DTL_STATUS.code("生成"));
|
||||||
|
materDtlDao.setOut_dis_id(disDao.getIostorinvdis_id());
|
||||||
|
materDtlDao.setOut_qty(disDao.getReal_qty());
|
||||||
|
materDtlDao.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
materDtlDao.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
materDtlDao.setCreate_time(DateUtil.now());
|
||||||
|
iPdmBomCallMaterialDtlService.save(materDtlDao);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,5 +80,4 @@ public interface IMdPbGroupplateService extends IService<GroupPlate> {
|
|||||||
* @param ids 标识集合
|
* @param ids 标识集合
|
||||||
*/
|
*/
|
||||||
void delete(Set<String> ids);
|
void delete(Set<String> ids);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||||
|
import org.nl.wms.warehouse_management.service.dto.GroupPlateDto;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
md_pb_groupplate late
|
md_pb_groupplate late
|
||||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = late.material_id
|
LEFT JOIN md_me_materialbase mater ON mater.material_id = late.material_id
|
||||||
<where>
|
<where>
|
||||||
late.status = '01'
|
late.status = '1'
|
||||||
<if test="param.storagevehicle_code != null and param.storagevehicle_code != ''">
|
<if test="param.storagevehicle_code != null and param.storagevehicle_code != ''">
|
||||||
AND
|
AND
|
||||||
late.storagevehicle_code = #{param.storagevehicle_code}
|
late.storagevehicle_code = #{param.storagevehicle_code}
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ public class GroupPlateDto extends GroupPlate{
|
|||||||
*/
|
*/
|
||||||
private String material_name;
|
private String material_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料批次
|
||||||
|
*/
|
||||||
|
private String material_spec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划数量
|
* 计划数量
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.common.utils.CodeUtil;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.IdUtil;
|
import org.nl.config.IdUtil;
|
||||||
import org.nl.wms.basedata_manage.service.IMdCsSupplierbaseService;
|
import org.nl.wms.basedata_manage.service.IMdCsSupplierbaseService;
|
||||||
@@ -24,6 +25,7 @@ import org.nl.wms.warehouse_management.enums.IOSEnum;
|
|||||||
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
||||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||||
import org.nl.wms.warehouse_management.service.dao.mapper.MdPbGroupplateMapper;
|
import org.nl.wms.warehouse_management.service.dao.mapper.MdPbGroupplateMapper;
|
||||||
|
import org.nl.wms.warehouse_management.service.dto.GroupPlateDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -76,6 +78,12 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void create(GroupPlate dto) {
|
public void create(GroupPlate dto) {
|
||||||
|
// 校验载具信息
|
||||||
|
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(dto.getStoragevehicle_code());
|
||||||
|
if (ObjectUtil.isEmpty(vehicleDao.getWeigth())) {
|
||||||
|
throw new BadRequestException("请先维护载具重量信息!");
|
||||||
|
}
|
||||||
|
|
||||||
// 校验此载具是否已经组盘
|
// 校验此载具是否已经组盘
|
||||||
List<GroupPlate> groupList = this.list(
|
List<GroupPlate> groupList = this.list(
|
||||||
new QueryWrapper<GroupPlate>().lambda()
|
new QueryWrapper<GroupPlate>().lambda()
|
||||||
@@ -88,6 +96,7 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dto.setGroup_id(IdUtil.getStringId());
|
dto.setGroup_id(IdUtil.getStringId());
|
||||||
|
dto.setPcsn(CodeUtil.getNewCode("GROUP_PCSN_CODE"));
|
||||||
// 计量单位默认重量KG
|
// 计量单位默认重量KG
|
||||||
MdPbMeasureunit unitDao = iMdPbMeasureunitService.getByCode("KG");
|
MdPbMeasureunit unitDao = iMdPbMeasureunitService.getByCode("KG");
|
||||||
dto.setQty_unit_id(unitDao.getMeasure_unit_id());
|
dto.setQty_unit_id(unitDao.getMeasure_unit_id());
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
ioStorInvDtl.put("remark", row.getString("remark"));
|
ioStorInvDtl.put("remark", row.getString("remark"));
|
||||||
ioStorInvDtl.put("assign_qty", "0");
|
ioStorInvDtl.put("assign_qty", "0");
|
||||||
ioStorInvDtl.put("unassign_qty", row.get("plan_qty"));
|
ioStorInvDtl.put("unassign_qty", row.get("plan_qty"));
|
||||||
|
ioStorInvDtl.put("source_billdtl_id", row.get("source_billdtl_id"));
|
||||||
ioStorInvDtl.put("source_bill_code", row.get("source_bill_code"));
|
ioStorInvDtl.put("source_bill_code", row.get("source_bill_code"));
|
||||||
|
|
||||||
ioStorInvDtlMapper.insert(ioStorInvDtl.toJavaObject(IOStorInvDtl.class));
|
ioStorInvDtlMapper.insert(ioStorInvDtl.toJavaObject(IOStorInvDtl.class));
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo;
|
|||||||
import org.nl.wms.basedata_manage.service.dao.Sectattr;
|
import org.nl.wms.basedata_manage.service.dao.Sectattr;
|
||||||
import org.nl.wms.ext.service.WmsToAcsService;
|
import org.nl.wms.ext.service.WmsToAcsService;
|
||||||
import org.nl.wms.ext.service.util.AcsResponse;
|
import org.nl.wms.ext.service.util.AcsResponse;
|
||||||
|
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialDtlService;
|
||||||
|
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterialDtl;
|
||||||
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||||
@@ -97,6 +99,12 @@ public class SelectOutServiceImpl extends ServiceImpl<IOStorInvDtlMapper, IOStor
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISectattrService iSectattrService;
|
private ISectattrService iSectattrService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 叫料明细服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private IPdmBomCallMaterialDtlService iPdmBomCallMaterialDtlService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<SelectOutDto> queryAll(Map whereJson, PageQuery page) {
|
public IPage<SelectOutDto> queryAll(Map whereJson, PageQuery page) {
|
||||||
return this.baseMapper.queryAllByPage(new Page<>(page.getPage() + 1, page.getSize()),
|
return this.baseMapper.queryAllByPage(new Page<>(page.getPage() + 1, page.getSize()),
|
||||||
@@ -116,7 +124,7 @@ public class SelectOutServiceImpl extends ServiceImpl<IOStorInvDtlMapper, IOStor
|
|||||||
throw new BadRequestException("当前称重位载具与拣选载具不符,当前称重位载具为【" + pointDao.getVehicle_code() + "】");
|
throw new BadRequestException("当前称重位载具与拣选载具不符,当前称重位载具为【" + pointDao.getVehicle_code() + "】");
|
||||||
}
|
}
|
||||||
// 获取载具信息
|
// 获取载具信息
|
||||||
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(whereJson.getString(pointDao.getVehicle_code()));
|
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(pointDao.getVehicle_code());
|
||||||
if (ObjectUtil.isEmpty(vehicleDao.getWeigth())) {
|
if (ObjectUtil.isEmpty(vehicleDao.getWeigth())) {
|
||||||
throw new BadRequestException("请维护当前载具重量【" + pointDao.getVehicle_code() + "】");
|
throw new BadRequestException("请维护当前载具重量【" + pointDao.getVehicle_code() + "】");
|
||||||
}
|
}
|
||||||
@@ -161,8 +169,8 @@ public class SelectOutServiceImpl extends ServiceImpl<IOStorInvDtlMapper, IOStor
|
|||||||
// 更新明细是否拣选为否
|
// 更新明细是否拣选为否
|
||||||
this.update(
|
this.update(
|
||||||
new UpdateWrapper<IOStorInvDtl>().lambda()
|
new UpdateWrapper<IOStorInvDtl>().lambda()
|
||||||
.set(IOStorInvDtl::getIs_check, IOSConstant.IS_DELETE_NO)
|
.set(IOStorInvDtl::getIs_check, IOSConstant.IS_DELETE_NO)
|
||||||
.eq(IOStorInvDtl::getIostorinvdtl_id, dto.getIostorinvdtl_id())
|
.eq(IOStorInvDtl::getIostorinvdtl_id, dto.getIostorinvdtl_id())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,6 +222,21 @@ public class SelectOutServiceImpl extends ServiceImpl<IOStorInvDtlMapper, IOStor
|
|||||||
jsonMst.put("tableData", tableData);
|
jsonMst.put("tableData", tableData);
|
||||||
String iostorinv_id = iRawAssistIStorService.insertDtl(jsonMst);
|
String iostorinv_id = iRawAssistIStorService.insertDtl(jsonMst);
|
||||||
|
|
||||||
|
// 更新原出库明细实际出库数量: 计划重量 - 称重重量
|
||||||
|
double real_qty = NumberUtil.sub(disDao.getPlan_qty(), dtlDao.getWeigh_qty()).doubleValue();
|
||||||
|
if (real_qty <= 0) {
|
||||||
|
throw new BadRequestException("实际出库重量不能为负数或为0!");
|
||||||
|
}
|
||||||
|
disDao.setReal_qty(NumberUtil.round(real_qty, 3));
|
||||||
|
ioStorInvDisMapper.updateById(disDao);
|
||||||
|
|
||||||
|
// 更新叫料明细实际出库重量
|
||||||
|
iPdmBomCallMaterialDtlService.update(
|
||||||
|
new UpdateWrapper<PdmBomCallMaterialDtl>().lambda()
|
||||||
|
.set(PdmBomCallMaterialDtl::getOut_qty, disDao.getReal_qty())
|
||||||
|
.eq(PdmBomCallMaterialDtl::getOut_dis_id, disDao.getIostorinvdis_id())
|
||||||
|
);
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("sect_id", disDao.getSect_id());
|
result.put("sect_id", disDao.getSect_id());
|
||||||
result.put("iostorinv_id", iostorinv_id);
|
result.put("iostorinv_id", iostorinv_id);
|
||||||
|
|||||||
289
wms/nladmin-ui/src/views/wms/basedata/group/AddDtl.vue
Normal file
289
wms/nladmin-ui/src/views/wms/basedata/group/AddDtl.vue
Normal file
@@ -0,0 +1,289 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="复制组盘"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:before-close="handleClose"
|
||||||
|
width="1100px"
|
||||||
|
destroy-on-close
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料编码" prop="material_code">
|
||||||
|
<el-input v-model="formMst.material_code" disabled style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料名称" prop="material_name">
|
||||||
|
<el-input v-model="formMst.material_name" disabled style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料规格" prop="material_spec">
|
||||||
|
<el-input v-model="formMst.material_spec" disabled style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||||
|
<el-input v-model="formMst.storagevehicle_code" style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="焊材批号" prop="pcsn">
|
||||||
|
<el-input v-model="formMst.pcsn" disabled placeholder="由系统自动生成" style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料重量" prop="qty">
|
||||||
|
<el-input-number v-model="formMst.qty" :precision="2" :controls="false" :min="1" style="width: 200px" />
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="供应商" prop="supp_code">
|
||||||
|
<el-select
|
||||||
|
v-model="formMst.supp_code"
|
||||||
|
disabled
|
||||||
|
size="mini"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in suppList"
|
||||||
|
:label="item.supp_name"
|
||||||
|
:value="item.supp_code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="有效日期" prop="quality_time">
|
||||||
|
<el-date-picker v-model="formMst.quality_time" type="date" disabled placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="生产日期" prop="produce_time">
|
||||||
|
<el-date-picker v-model="formMst.produce_time" type="date" disabled placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="烘干次数" prop="bake_num">
|
||||||
|
<el-input-number v-model="formMst.bake_num" :precision="0" disabled :controls="false" :min="0" :max="3" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="品质类型" prop="quality_type">
|
||||||
|
<el-select
|
||||||
|
v-model="formMst.quality_type"
|
||||||
|
disabled
|
||||||
|
size="mini"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.QUALITY_TYPE"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="料箱类型" prop="box_type">
|
||||||
|
<el-select
|
||||||
|
v-model="formMst.box_type"
|
||||||
|
disabled
|
||||||
|
size="mini"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.BOX_TYPE"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="执行标准" prop="execution_stand">
|
||||||
|
<el-input v-model="formMst.execution_stand" style="width: 380px;" disabled rows="2" type="textarea" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<label slot="label">备 注:</label>
|
||||||
|
<el-input v-model="formMst.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="18">
|
||||||
|
<el-col :span="18" style="border: 1px solid white">
|
||||||
|
<span />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<span>
|
||||||
|
<el-button icon="el-icon-check" size="mini" type="primary" @click="copySave">保存</el-button>
|
||||||
|
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="18">
|
||||||
|
<el-col :span="18" style="border: 10px solid white">
|
||||||
|
<span />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
import crudGroup from '@/views/wms/basedata/group/group'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WeighDialog',
|
||||||
|
mixins: [crud()],
|
||||||
|
dicts: ['BOX_TYPE', 'QUALITY_TYPE'],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
this.formMst = this.openParam
|
||||||
|
this.formMst.storagevehicle_code = ''
|
||||||
|
this.formMst.pcsn = null
|
||||||
|
this.formMst.qty = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formMst: {
|
||||||
|
group_id: null,
|
||||||
|
storagevehicle_code: null,
|
||||||
|
material_id: null,
|
||||||
|
pcsn: null,
|
||||||
|
qty_unit_id: null,
|
||||||
|
qty_unit_name: null,
|
||||||
|
qty: null,
|
||||||
|
remark: null,
|
||||||
|
status: null,
|
||||||
|
supp_code: null,
|
||||||
|
quality_time: null,
|
||||||
|
produce_time: new Date(),
|
||||||
|
execution_stand: null,
|
||||||
|
bake_num: null,
|
||||||
|
quality_type: '1',
|
||||||
|
box_type: null,
|
||||||
|
create_id: null,
|
||||||
|
create_name: null,
|
||||||
|
create_time: null,
|
||||||
|
material_spec: null,
|
||||||
|
material_name: null
|
||||||
|
},
|
||||||
|
suppList: [],
|
||||||
|
current: null,
|
||||||
|
dialogVisible: false,
|
||||||
|
rules: {
|
||||||
|
material_code: [
|
||||||
|
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
storagevehicle_code: [
|
||||||
|
{ required: true, message: '载具不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
supp_code: [
|
||||||
|
{ required: true, message: '供应商不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
quality_time: [
|
||||||
|
{ required: true, message: '有效日期不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
produce_time: [
|
||||||
|
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
box_type: [
|
||||||
|
{ required: true, message: '料箱类型不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(done) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$refs['form2'].resetFields()
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
crudGroup.querySupp({}).then(row => {
|
||||||
|
this.suppList = row
|
||||||
|
})
|
||||||
|
},
|
||||||
|
copySave() {
|
||||||
|
if (this.formMst.storagevehicle_code === '') {
|
||||||
|
this.crud.notify('载具不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
crudGroup.copySave(this.formMst).then(row => {
|
||||||
|
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.close()
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.crud-opts2 .crud-opts-right2 {
|
||||||
|
margin-left: auto;
|
||||||
|
padding: 4px 4px;
|
||||||
|
}
|
||||||
|
.input-with-select {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -48,4 +48,12 @@ export function querySupp(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, queryMater, checkVehicle, querySupp }
|
export function copySave(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/group/copySave',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, queryMater, checkVehicle, querySupp, copySave }
|
||||||
|
|||||||
@@ -58,7 +58,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
:disabled="crud.selections.length !== 1"
|
||||||
|
@click="openAddDtl"
|
||||||
|
>
|
||||||
|
复制新增
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="crud.cancelCU"
|
:before-close="crud.cancelCU"
|
||||||
@@ -96,7 +108,7 @@
|
|||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="焊材批号" prop="pcsn">
|
<el-form-item label="焊材批号" prop="pcsn">
|
||||||
<el-input v-model="form.pcsn" style="width: 200px;" />
|
<el-input v-model="form.pcsn" disabled placeholder="由系统自动生成" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -214,6 +226,7 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="storagevehicle_code" label="载具编码" :min-width="flexWidth('storagevehicle_code',crud.data,'载具编码')" />
|
<el-table-column prop="storagevehicle_code" label="载具编码" :min-width="flexWidth('storagevehicle_code',crud.data,'载具编码')" />
|
||||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
@@ -251,11 +264,13 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
|
<AddDtl :dialog-show.sync="openAddDtlDialog" :open-param="openParam" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudGroup from '@/views/wms/basedata/group/group'
|
import crudGroup from '@/views/wms/basedata/group/group'
|
||||||
|
import AddDtl from '@/views/wms/basedata/group/AddDtl'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
@@ -287,7 +302,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Group',
|
name: 'Group',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation, AddDtl },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['is_used', 'GROUP_STATUS', 'BOX_TYPE', 'QUALITY_TYPE'],
|
dicts: ['is_used', 'GROUP_STATUS', 'BOX_TYPE', 'QUALITY_TYPE'],
|
||||||
@@ -310,14 +325,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
permission: {},
|
permission: {},
|
||||||
|
openParam: {},
|
||||||
|
openAddDtlDialog: false,
|
||||||
suppList: [],
|
suppList: [],
|
||||||
rules: {
|
rules: {
|
||||||
material_code: [
|
material_code: [
|
||||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
pcsn: [
|
|
||||||
{ required: true, message: '批次不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
storagevehicle_code: [
|
storagevehicle_code: [
|
||||||
{ required: true, message: '载具不能为空', trigger: 'blur' }
|
{ required: true, message: '载具不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
@@ -372,6 +386,10 @@ export default {
|
|||||||
},
|
},
|
||||||
formattQuality(row) {
|
formattQuality(row) {
|
||||||
return this.dict.label.QUALITY_TYPE[row.quality_type]
|
return this.dict.label.QUALITY_TYPE[row.quality_type]
|
||||||
|
},
|
||||||
|
openAddDtl() {
|
||||||
|
this.openAddDtlDialog = true
|
||||||
|
this.openParam = this.$refs.table.selection[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
175
wms/nladmin-ui/src/views/wms/pdm/callmaterial/ViewDialog.vue
Normal file
175
wms/nladmin-ui/src/views/wms/pdm/callmaterial/ViewDialog.vue
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="叫料单详情"
|
||||||
|
append-to-body
|
||||||
|
fullscreen
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:before-close="handleClose"
|
||||||
|
width="1100px"
|
||||||
|
destroy-on-close
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<el-row :gutter="22">
|
||||||
|
<el-col :span="22" style="border: 1px solid white">
|
||||||
|
<span />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="18">
|
||||||
|
<el-col :span="18" style="border: 10px solid white">
|
||||||
|
<span />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料编码:">
|
||||||
|
<el-input v-model="formMst.material_code" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料名称:">
|
||||||
|
<el-input v-model="formMst.material_name" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="机台编码:">
|
||||||
|
<el-input v-model="formMst.device_code" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="计划叫料重量:">
|
||||||
|
<el-input v-model="formMst.call_qty" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际叫料重量:">
|
||||||
|
<el-input v-model="formMst.real_qty" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际用料重量:">
|
||||||
|
<el-input v-model="formMst.real_weigh_qty" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="crud-opts2">
|
||||||
|
<span class="role-span">叫料明细</span>
|
||||||
|
<span />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="400"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
:highlight-current-row="true"
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||||
|
<el-table-column prop="bom_status" label="状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||||
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
|
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
|
||||||
|
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||||
|
<el-table-column prop="vehicle_code" label="载具号" :min-width="flexWidth('vehicle_code',crud.data,'载具号')" />
|
||||||
|
<el-table-column prop="sect_name" label="出库库区" :min-width="flexWidth('sect_name',crud.data,'出库库区')" />
|
||||||
|
<el-table-column prop="out_qty" label="出库重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||||
|
<el-table-column prop="weigh_qty" label="称重重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||||
|
<el-table-column prop="device_code" label="机台编码" :min-width="flexWidth('device_code',crud.data,'机台编码')" />
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { crud } from '@crud/crud'
|
||||||
|
import crudCallMaterialDtl from '@/views/wms/pdm/callmaterialdtl/callmaterialdtl'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CallMaterViewDialog',
|
||||||
|
mixins: [crud()],
|
||||||
|
dicts: ['BOM_DTL_STATUS'],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
this.formMst = this.openParam
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formMst: {
|
||||||
|
},
|
||||||
|
current: null,
|
||||||
|
tableData: [],
|
||||||
|
dialogVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(done) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$refs['form2'].resetFields()
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
|
formattStatus(row) {
|
||||||
|
return this.dict.label.BOM_DTL_STATUS[row.bom_status]
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
crudCallMaterialDtl.getDtl(this.formMst).then(res => {
|
||||||
|
debugger
|
||||||
|
this.tableData = res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.crud-opts2 {
|
||||||
|
padding: 0 0;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.crud-opts2 .crud-opts-right2 {
|
||||||
|
margin-left: auto;
|
||||||
|
padding: 4px 4px;
|
||||||
|
}
|
||||||
|
.input-with-select {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -117,7 +117,11 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column prop="bom_code" label="工单单号" :min-width="flexWidth('bom_code',crud.data,'工单单号')" />
|
<el-table-column show-overflow-tooltip prop="bom_code" width="150" label="叫料单号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bom_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
@@ -149,11 +153,13 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
|
<ViewDialog :dialog-show.sync="ViewDialog" :open-param="openParam" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudCallMaterial from '@/views/wms/pdm/callmaterial/callmaterial'
|
import crudCallMaterial from '@/views/wms/pdm/callmaterial/callmaterial'
|
||||||
|
import ViewDialog from '@/views/wms/pdm/callmaterial/ViewDialog'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
@@ -179,7 +185,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'CallMaterial',
|
name: 'CallMaterial',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['BOM_STATUS'],
|
dicts: ['BOM_STATUS'],
|
||||||
@@ -201,6 +207,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
ViewDialog: false,
|
||||||
|
openParam: null,
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
material_code: [
|
material_code: [
|
||||||
@@ -236,6 +244,10 @@ export default {
|
|||||||
},
|
},
|
||||||
formattStatus(row) {
|
formattStatus(row) {
|
||||||
return this.dict.label.BOM_STATUS[row.bom_status]
|
return this.dict.label.BOM_STATUS[row.bom_status]
|
||||||
|
},
|
||||||
|
toView(index, row) {
|
||||||
|
this.openParam = row
|
||||||
|
this.ViewDialog = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
166
wms/nladmin-ui/src/views/wms/pdm/callmaterialdtl/WeighDialog.vue
Normal file
166
wms/nladmin-ui/src/views/wms/pdm/callmaterialdtl/WeighDialog.vue
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="称重信息"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:before-close="handleClose"
|
||||||
|
width="1100px"
|
||||||
|
destroy-on-close
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料编码:">
|
||||||
|
<el-input v-model="formMst.material_code" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料名称:">
|
||||||
|
<el-input v-model="formMst.material_name" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料规格:">
|
||||||
|
<el-input v-model="formMst.material_spec" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料批次:">
|
||||||
|
<el-input v-model="formMst.pcsn" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="载具编码:">
|
||||||
|
<el-input v-model="formMst.vehicle_code" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="出库库区:">
|
||||||
|
<el-input v-model="formMst.sect_name" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="出库重量:">
|
||||||
|
<el-input v-model="formMst.out_qty" disabled size="mini" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="称重重量:">
|
||||||
|
<el-input-number v-model="formMst.weigh_qty" :precision="2" :controls="false" :min="0" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="18">
|
||||||
|
<el-col :span="18" style="border: 1px solid white">
|
||||||
|
<span />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<span>
|
||||||
|
<el-button icon="el-icon-check" size="mini" type="success" @click="getWeigh">称重</el-button>
|
||||||
|
<el-button icon="el-icon-check" size="mini" type="primary" @click="saveWeigh">保存</el-button>
|
||||||
|
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="18">
|
||||||
|
<el-col :span="18" style="border: 10px solid white">
|
||||||
|
<span />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
import crudCallMaterialDtl from '@/views/wms/pdm/callmaterialdtl/callmaterialdtl'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WeighDialog',
|
||||||
|
mixins: [crud()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParamWeigh: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
this.formMst = this.openParamWeigh
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formMst: {
|
||||||
|
},
|
||||||
|
current: null,
|
||||||
|
dialogVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(done) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.formMst.weigh_qty = 0
|
||||||
|
this.$refs['form2'].resetFields()
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
|
getWeigh() {
|
||||||
|
this.formMst.weigh_qty = '20'
|
||||||
|
/* crudCallMaterialDtl.getWeigh(this.formMst).then(res => {
|
||||||
|
this.formMst.weigh_qty = res.weigh_qty
|
||||||
|
})*/
|
||||||
|
},
|
||||||
|
saveWeigh() {
|
||||||
|
// 校验称重信息不能为0或者空
|
||||||
|
if (this.formMst.weigh_qty === 0) {
|
||||||
|
this.crud.notify('称重重量不能为0!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
crudCallMaterialDtl.saveWeigh(this.formMst).then(res => {
|
||||||
|
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.close()
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.crud-opts2 {
|
||||||
|
padding: 0 0;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.crud-opts2 .crud-opts-right2 {
|
||||||
|
margin-left: auto;
|
||||||
|
padding: 4px 4px;
|
||||||
|
}
|
||||||
|
.input-with-select {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bomCallMaterialDtl',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bomCallMaterialDtl/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bomCallMaterialDtl',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDtl(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bomCallMaterialDtl/getDtl',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getWeigh(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bomCallMaterialDtl/getWeigh',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveWeigh(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bomCallMaterialDtl/saveWeigh',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function confirm(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bomCallMaterialDtl/confirm',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, getDtl, getWeigh, saveWeigh, confirm }
|
||||||
229
wms/nladmin-ui/src/views/wms/pdm/callmaterialdtl/index.vue
Normal file
229
wms/nladmin-ui/src/views/wms/pdm/callmaterialdtl/index.vue
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="工单编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.bom_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="工单编码"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.material_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="物料编码"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="机台编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.device_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="机台编码"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料批次">
|
||||||
|
<el-input
|
||||||
|
v-model="query.pcsn"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="物料批次"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="载具编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.vehicle_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="载具编码"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工单状态">
|
||||||
|
<el-select
|
||||||
|
v-model="query.bom_status"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="全部"
|
||||||
|
class="filter-item"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.BOM_DTL_STATUS"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<rrOperation />
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
:disabled="crud.selections.length !== 1"
|
||||||
|
@click="openWeigh"
|
||||||
|
>
|
||||||
|
退料称重
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
:disabled="crud.selections.length !== 1"
|
||||||
|
@click="confirm"
|
||||||
|
>
|
||||||
|
退料确认
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
:data="crud.data"
|
||||||
|
size="mini"
|
||||||
|
style="width: 100%;"
|
||||||
|
@selection-change="crud.selectionChangeHandler"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="bom_code" label="叫料单号" :min-width="flexWidth('bom_code',crud.data,'叫料单号')" />
|
||||||
|
<el-table-column prop="bom_status" label="状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||||
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
|
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
|
||||||
|
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||||
|
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
||||||
|
<el-table-column prop="sect_name" label="出库库区" :min-width="flexWidth('sect_name',crud.data,'出库库区')" />
|
||||||
|
<el-table-column prop="out_qty" label="出库重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||||
|
<el-table-column prop="weigh_qty" label="称重重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||||
|
<el-table-column prop="device_code" label="机台编码" :min-width="flexWidth('device_code',crud.data,'机台编码')" />
|
||||||
|
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'叫料人')" />
|
||||||
|
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'叫料时间')" />
|
||||||
|
<el-table-column prop="confirm_time" label="结束时间" :min-width="flexWidth('confirm_time',crud.data,'结束时间')" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
<WeighDialog :dialog-show.sync="openWeighDialog" :open-param-weigh="openParamWeigh" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudCallMaterialDtl from '@/views/wms/pdm/callmaterialdtl/callmaterialdtl'
|
||||||
|
import WeighDialog from '@/views/wms/pdm/callmaterialdtl/WeighDialog'
|
||||||
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
|
||||||
|
const defaultForm = {
|
||||||
|
bomdtl_id: null,
|
||||||
|
bom_id: null,
|
||||||
|
material_id: null,
|
||||||
|
pcsn: null,
|
||||||
|
vehicle_code: null,
|
||||||
|
struct_code: null,
|
||||||
|
bom_status: null,
|
||||||
|
out_dis_id: null,
|
||||||
|
out_qty: null,
|
||||||
|
weigh_qty: null,
|
||||||
|
create_id: null,
|
||||||
|
create_name: null,
|
||||||
|
create_time: null,
|
||||||
|
confirm_time: null
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'CallMaterialDtl',
|
||||||
|
components: { pagination, crudOperation, rrOperation, udOperation, WeighDialog },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
// 数据字典
|
||||||
|
dicts: ['BOM_DTL_STATUS'],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '产线叫料',
|
||||||
|
url: 'api/bomCallMaterialDtl',
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: false,
|
||||||
|
del: false,
|
||||||
|
download: false,
|
||||||
|
reset: true
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
'bom_status': '1'
|
||||||
|
},
|
||||||
|
idField: 'bomdtl_id',
|
||||||
|
sort: 'bomdtl_id,desc',
|
||||||
|
crudMethod: { ...crudCallMaterialDtl }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
permission: {},
|
||||||
|
openParamWeigh: null,
|
||||||
|
openWeighDialog: false,
|
||||||
|
rules: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
formattStatus(row) {
|
||||||
|
return this.dict.label.BOM_DTL_STATUS[row.bom_status]
|
||||||
|
},
|
||||||
|
openWeigh() {
|
||||||
|
this.openParamWeigh = this.$refs.table.selection[0]
|
||||||
|
this.openWeighDialog = true
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
// 校验称重信息不能为0或者空
|
||||||
|
const data = this.$refs.table.selection[0]
|
||||||
|
if (data.weigh_qty === 0) {
|
||||||
|
this.crud.notify('称重重量不能为0!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (data.bom_status === '2') {
|
||||||
|
this.crud.notify('当前明细已确认!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
|
}
|
||||||
|
crudCallMaterialDtl.confirm(data).then(res => {
|
||||||
|
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -371,6 +371,7 @@ export default {
|
|||||||
// 添加plan_qty
|
// 添加plan_qty
|
||||||
item.plan_qty = item.call_qty
|
item.plan_qty = item.call_qty
|
||||||
item.source_bill_code = item.bom_code
|
item.source_bill_code = item.bom_code
|
||||||
|
item.source_billdtl_id = item.bom_id
|
||||||
if (this.form.tableData.length !== 0) {
|
if (this.form.tableData.length !== 0) {
|
||||||
this.flagnow = false
|
this.flagnow = false
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||||
|
|||||||
@@ -204,8 +204,8 @@ export default {
|
|||||||
this.crud.notify('拣选批次不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('拣选批次不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.formMst.weigh_qty = '87'
|
this.formMst.weigh_qty = '51'
|
||||||
this.formMst.select_qty = '1'
|
this.formMst.select_qty = '30'
|
||||||
/* crudSectout.getWeigh(this.current).then(res => {
|
/* crudSectout.getWeigh(this.current).then(res => {
|
||||||
this.formMst.weigh_qty = res.weigh_qty
|
this.formMst.weigh_qty = res.weigh_qty
|
||||||
this.formMst.select_qty = res.select_qty
|
this.formMst.select_qty = res.select_qty
|
||||||
|
|||||||
Reference in New Issue
Block a user