rev:质检模块和原材料入库优化
This commit is contained in:
@@ -4,22 +4,17 @@
|
|||||||
|
|
||||||
<select id="getMstDetail" resultType="java.util.Map">
|
<select id="getMstDetail" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
po.ask_time,
|
po.*,
|
||||||
po.po_code,
|
|
||||||
mb.material_code,
|
mb.material_code,
|
||||||
mb.material_name,
|
mb.material_name,
|
||||||
class.class_name,
|
class.class_name,
|
||||||
po.total_qty,
|
po.total_qty - po.instor_qty AS need_qty
|
||||||
po.total_qty - po.instor_qty AS need_qty,
|
|
||||||
po.qty_unit_name,
|
|
||||||
po.qty_unit_id,
|
|
||||||
po.material_id
|
|
||||||
FROM
|
FROM
|
||||||
pcs_if_purchaseorder po
|
pcs_if_purchaseorder po
|
||||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = po.material_id
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = po.material_id
|
||||||
LEFT JOIN md_pb_classstandard class ON class.class_id = mb.material_type_id
|
LEFT JOIN md_pb_classstandard class ON class.class_id = mb.material_type_id
|
||||||
<where>
|
<where>
|
||||||
po.status = '30'
|
po.status IN ('30','40')
|
||||||
<if test="query.start_time != null">
|
<if test="query.start_time != null">
|
||||||
and po.ask_time >= #{query.start_time}
|
and po.ask_time >= #{query.start_time}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public class PcsIfPurchaseorderServiceImpl extends ServiceImpl<PcsIfPurchaseorde
|
|||||||
}
|
}
|
||||||
|
|
||||||
BigDecimal new_instor_qty = NumberUtil.add(instor_qty, purchaseorder.getInstor_qty(), 3);
|
BigDecimal new_instor_qty = NumberUtil.add(instor_qty, purchaseorder.getInstor_qty(), 3);
|
||||||
|
purchaseorder.setQty(new_instor_qty);
|
||||||
if (purchaseorder.getTotal_qty().compareTo(new_instor_qty) <= 0) {
|
if (purchaseorder.getTotal_qty().compareTo(new_instor_qty) <= 0) {
|
||||||
purchaseorder.setSTATUS(PCSEnum.BILL_STATUS.code("完成"));
|
purchaseorder.setSTATUS(PCSEnum.BILL_STATUS.code("完成"));
|
||||||
purchaseorder.setConfirm_id(SecurityUtils.getCurrentUserId());
|
purchaseorder.setConfirm_id(SecurityUtils.getCurrentUserId());
|
||||||
|
|||||||
@@ -1,9 +1,23 @@
|
|||||||
package org.nl.wms.quality_manage.controller.report;
|
package org.nl.wms.quality_manage.controller.report;
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nl.common.anno.Log;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.wms.quality_manage.service.TCEnum;
|
||||||
|
import org.nl.wms.quality_manage.service.report.IQlTestInspectionsheetdtlService;
|
||||||
|
import org.nl.wms.quality_manage.service.report.IQlTestInspectionsheetmstService;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetdtl;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dto.SheetQuery;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -14,8 +28,73 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
* @since 2023-05-06
|
* @since 2023-05-06
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/qlTestInspectionsheetmst")
|
@RequestMapping("/api/physicalMst")
|
||||||
public class QlTestInspectionsheetmstController {
|
public class QlTestInspectionsheetmstController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IQlTestInspectionsheetmstService inspectionsheetmstService;
|
||||||
|
@Autowired
|
||||||
|
private IQlTestInspectionsheetdtlService inspectionsheetdtlService;
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增质检单")
|
||||||
|
@ApiOperation("新增质检单")
|
||||||
|
public ResponseEntity<Object> create(@RequestBody JSONObject whereJson) {
|
||||||
|
inspectionsheetmstService.create(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/update")
|
||||||
|
@Log("修改质检单")
|
||||||
|
@ApiOperation("修改质检单")
|
||||||
|
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
|
||||||
|
inspectionsheetmstService.update(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@Log("删除质检单")
|
||||||
|
@ApiOperation("删除质检单")
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||||
|
for (Long id : ids) {
|
||||||
|
inspectionsheetmstService.removeById(id);
|
||||||
|
inspectionsheetdtlService.remove(new QueryWrapper<QlTestInspectionsheetdtl>().lambda().eq(QlTestInspectionsheetdtl::getInspection_id, id));
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询质检单")
|
||||||
|
@ApiOperation("查询质检单")
|
||||||
|
public ResponseEntity<Object> query(SheetQuery query, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(inspectionsheetmstService.pageQuery(query, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getResult")
|
||||||
|
@Log("查询质检单明细")
|
||||||
|
@ApiOperation("查询质检单明细")
|
||||||
|
public ResponseEntity<Object> getResult(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(inspectionsheetmstService.getResult(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/saveResult")
|
||||||
|
@Log("保存质检单明细")
|
||||||
|
@ApiOperation("保存质检单明细")
|
||||||
|
public ResponseEntity<Object> saveResult(@RequestBody JSONObject whereJson) {
|
||||||
|
inspectionsheetmstService.saveResult(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirm")
|
||||||
|
@Log("确认质检单")
|
||||||
|
@ApiOperation("确认质检单")
|
||||||
|
public ResponseEntity<Object> confirm(@RequestBody QlTestInspectionsheetmst mst) {
|
||||||
|
mst.setBill_status(TCEnum.BILL_STATUS.code("完成"));
|
||||||
|
mst.setConfirm_optid(SecurityUtils.getCurrentUserId());
|
||||||
|
mst.setConfirm_optname(SecurityUtils.getCurrentNickName());
|
||||||
|
mst.setConfirm_time(DateUtil.now());
|
||||||
|
inspectionsheetmstService.updateById(mst);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package org.nl.wms.quality_manage.service;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.nl.common.utils.MapOf;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author ZZQ
|
||||||
|
* @Date 2023/5/4 20:11
|
||||||
|
*/
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Getter
|
||||||
|
public enum TCEnum {
|
||||||
|
//出入库类型
|
||||||
|
RESULT_TYPE(MapOf.of("合格", "1", "不合格", "2","紧急放行","3")),
|
||||||
|
//生成方式
|
||||||
|
CREATE_MODE(MapOf.of("PC生成", "1", "终端生成", "2","外部借口产生","3")),
|
||||||
|
//是否
|
||||||
|
GRADE_TYPE(MapOf.of("一级", "1", "二级", "2", "三级", "3")),
|
||||||
|
//单据状态
|
||||||
|
BILL_STATUS(MapOf.of("生成", "10", "提交", "20", "检测中", "30", "确认", "50", "完成", "99")),
|
||||||
|
;
|
||||||
|
private Map<String, String> code;
|
||||||
|
|
||||||
|
public String code(String desc) {
|
||||||
|
String code = this.getCode().get(desc);
|
||||||
|
if (StringUtils.isNotEmpty(code)) {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
throw new BadRequestException(this.name() + "对应类型" + desc + "未定义");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String check(String code) {
|
||||||
|
for (Map.Entry<String, String> entry : this.getCode().entrySet()) {
|
||||||
|
if (entry.getValue().equals("code")) {
|
||||||
|
return entry.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new BadRequestException(this.name() + "对应类型" + code + "未定义");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
LEFT JOIN ql_test_inspectionschememst mst ON mst.inspection_scheme_code = stand.inspection_scheme_code
|
LEFT JOIN ql_test_inspectionschememst mst ON mst.inspection_scheme_code = stand.inspection_scheme_code
|
||||||
LEFT JOIN ql_test_inspectionitempoint point ON point.inspection_item_id = stand.inspection_item_id
|
LEFT JOIN ql_test_inspectionitempoint point ON point.inspection_item_id = stand.inspection_item_id
|
||||||
<where>
|
<where>
|
||||||
<if test="form.material != null">
|
<if test="form.material_id != null">
|
||||||
AND stand.material_id = #{form.material_id}
|
AND stand.material_id = #{form.material_id}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
package org.nl.wms.quality_manage.service.report;
|
package org.nl.wms.quality_manage.service.report;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetdtl;
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetdtl;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +18,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface IQlTestInspectionsheetdtlService extends IService<QlTestInspectionsheetdtl> {
|
public interface IQlTestInspectionsheetdtlService extends IService<QlTestInspectionsheetdtl> {
|
||||||
|
|
||||||
|
int create(QlTestInspectionsheetmst mst);
|
||||||
|
|
||||||
|
List<Map> getResult(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
package org.nl.wms.quality_manage.service.report;
|
package org.nl.wms.quality_manage.service.report;
|
||||||
|
|
||||||
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dto.SheetQuery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +20,13 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface IQlTestInspectionsheetmstService extends IService<QlTestInspectionsheetmst> {
|
public interface IQlTestInspectionsheetmstService extends IService<QlTestInspectionsheetmst> {
|
||||||
|
|
||||||
|
void create(JSONObject jo);
|
||||||
|
|
||||||
|
void update(JSONObject jo);
|
||||||
|
|
||||||
|
Object pageQuery(SheetQuery query, PageQuery page);
|
||||||
|
|
||||||
|
JSONObject getResult(JSONObject whereJson);
|
||||||
|
void saveResult(JSONObject whereJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package org.nl.wms.quality_manage.service.report.dao;
|
package org.nl.wms.quality_manage.service.report.dao;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -21,15 +23,17 @@ public class QlTestInspectionsheetdtl implements Serializable {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检单明细标识
|
* 质检单明细标识
|
||||||
*/
|
*/
|
||||||
private Long inspectiondtl_id;
|
@TableId
|
||||||
|
private String inspectiondtl_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检单标识
|
* 质检单标识
|
||||||
*/
|
*/
|
||||||
private Long inspection_id;
|
private String inspection_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 明细序号
|
* 明细序号
|
||||||
@@ -39,7 +43,7 @@ public class QlTestInspectionsheetdtl implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 项点标识
|
* 项点标识
|
||||||
*/
|
*/
|
||||||
private Long inspection_item_id;
|
private String inspection_item_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项点值
|
* 项点值
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package org.nl.wms.quality_manage.service.report.dao;
|
package org.nl.wms.quality_manage.service.report.dao;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -20,12 +22,13 @@ import lombok.EqualsAndHashCode;
|
|||||||
@TableName("ql_test_inspectionsheetmst")
|
@TableName("ql_test_inspectionsheetmst")
|
||||||
public class QlTestInspectionsheetmst implements Serializable {
|
public class QlTestInspectionsheetmst implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final Long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检单标识
|
* 质检单标识
|
||||||
*/
|
*/
|
||||||
private Long inspection_id;
|
@TableId
|
||||||
|
private String inspection_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检单编号
|
* 质检单编号
|
||||||
@@ -45,7 +48,7 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 物料标识
|
* 物料标识
|
||||||
*/
|
*/
|
||||||
private Long material_id;
|
private String material_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次
|
* 批次
|
||||||
@@ -60,7 +63,7 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 数量计量单位标识
|
* 数量计量单位标识
|
||||||
*/
|
*/
|
||||||
private Long qty_unit_id;
|
private String qty_unit_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数量计量单位名称
|
* 数量计量单位名称
|
||||||
@@ -80,7 +83,7 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 来源单据标识
|
* 来源单据标识
|
||||||
*/
|
*/
|
||||||
private Long source_bill_id;
|
private String source_bill_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 来源单据类型
|
* 来源单据类型
|
||||||
@@ -105,7 +108,7 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 基础单据标识
|
* 基础单据标识
|
||||||
*/
|
*/
|
||||||
private Long base_bill_id;
|
private String base_bill_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础单据类型
|
* 基础单据类型
|
||||||
@@ -140,7 +143,7 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
private Long create_id;
|
private String create_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人姓名
|
* 创建人姓名
|
||||||
@@ -155,7 +158,7 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 修改人
|
* 修改人
|
||||||
*/
|
*/
|
||||||
private Long update_optid;
|
private String update_optid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改人姓名
|
* 修改人姓名
|
||||||
@@ -170,7 +173,7 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 确认人
|
* 确认人
|
||||||
*/
|
*/
|
||||||
private Long confirm_optid;
|
private String confirm_optid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认人姓名
|
* 确认人姓名
|
||||||
@@ -185,17 +188,17 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
private Long sysdeptid;
|
private String sysdeptid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公司ID
|
* 公司ID
|
||||||
*/
|
*/
|
||||||
private Long syscompanyid;
|
private String syscompanyid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否删除
|
* 是否删除
|
||||||
*/
|
*/
|
||||||
private String is_delete;
|
private Boolean is_delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
@@ -205,7 +208,7 @@ public class QlTestInspectionsheetmst implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 车间标识
|
* 车间标识
|
||||||
*/
|
*/
|
||||||
private Long workshop_id;
|
private String workshop_id;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ package org.nl.wms.quality_manage.service.report.dao.mapper;
|
|||||||
|
|
||||||
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetdtl;
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetdtl;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface QlTestInspectionsheetdtlMapper extends BaseMapper<QlTestInspectionsheetdtl> {
|
public interface QlTestInspectionsheetdtlMapper extends BaseMapper<QlTestInspectionsheetdtl> {
|
||||||
|
|
||||||
|
List<Map> getResult(@Param("id") String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,4 +2,21 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.nl.wms.quality_manage.service.report.dao.mapper.QlTestInspectionsheetdtlMapper">
|
<mapper namespace="org.nl.wms.quality_manage.service.report.dao.mapper.QlTestInspectionsheetdtlMapper">
|
||||||
|
|
||||||
|
<select id="getResult" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
dtl.* ,
|
||||||
|
item.inspection_type,
|
||||||
|
item.inspection_item_type,
|
||||||
|
item.inspection_item_code,
|
||||||
|
item.inspection_item_name,
|
||||||
|
stand.up_limit,
|
||||||
|
stand.down_limit
|
||||||
|
FROM
|
||||||
|
ql_test_inspectionsheetdtl dtl
|
||||||
|
LEFT JOIN ql_test_inspectionsheetmst mst ON mst.inspection_id = dtl.inspection_id
|
||||||
|
LEFT JOIN ql_test_inspectionschemedtlproductstandard stand ON stand.material_id = mst.material_id AND dtl.inspection_item_id = stand.inspection_item_id
|
||||||
|
LEFT JOIN ql_test_inspectionitempoint item ON item.inspection_item_id = stand.inspection_item_id
|
||||||
|
WHERE
|
||||||
|
dtl.inspection_id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
package org.nl.wms.quality_manage.service.report.dao.mapper;
|
package org.nl.wms.quality_manage.service.report.dao.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.nl.wms.quality_manage.service.inspection.dto.StandardQuery;
|
||||||
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dto.SheetQuery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +19,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface QlTestInspectionsheetmstMapper extends BaseMapper<QlTestInspectionsheetmst> {
|
public interface QlTestInspectionsheetmstMapper extends BaseMapper<QlTestInspectionsheetmst> {
|
||||||
|
|
||||||
|
List<Map> pageQuery(@Param("query") SheetQuery query);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,4 +2,28 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.nl.wms.quality_manage.service.report.dao.mapper.QlTestInspectionsheetmstMapper">
|
<mapper namespace="org.nl.wms.quality_manage.service.report.dao.mapper.QlTestInspectionsheetmstMapper">
|
||||||
|
|
||||||
|
<select id="pageQuery" resultType="java.util.Map">
|
||||||
|
select
|
||||||
|
mst.*,
|
||||||
|
mb.material_code,
|
||||||
|
mb.material_name
|
||||||
|
from
|
||||||
|
ql_test_inspectionsheetmst mst
|
||||||
|
left join md_me_materialbase mb ON mb.material_id = mst.material_id
|
||||||
|
<where>
|
||||||
|
<if test="query.bill_code != null and query.bill_code != ''">
|
||||||
|
and mst.inspection_code like '%${query.bill_code}%'
|
||||||
|
</if>
|
||||||
|
<if test="query.source_bill_code != null and query.source_bill_code != ''">
|
||||||
|
and mst.source_bill_code like '%${query.source_bill_code}%'
|
||||||
|
</if>
|
||||||
|
<if test="query.material_search != null and query.material_search != ''">
|
||||||
|
and (mb.material_code like '%${query.material_search}%' OR mb.material_name like
|
||||||
|
'%${query.material_search}%')
|
||||||
|
</if>
|
||||||
|
<if test="query.bill_status != null and query.bill_status != ''">
|
||||||
|
and mst.bill_status = #{query.bill_status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.nl.wms.quality_manage.service.report.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.nl.common.domain.query.BaseQuery;
|
||||||
|
import org.nl.common.domain.query.QParam;
|
||||||
|
import org.nl.common.enums.QueryTEnum;
|
||||||
|
import org.nl.wms.quality_manage.service.inspection.dao.QlTestInspectionschememst;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author ZZQ
|
||||||
|
* @Date 2023/5/4 19:49
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SheetQuery extends BaseQuery<QlTestInspectionsheetmst> {
|
||||||
|
|
||||||
|
private String bill_code;
|
||||||
|
|
||||||
|
private String source_bill_code;
|
||||||
|
|
||||||
|
private String material_search;
|
||||||
|
|
||||||
|
private String bill_status;
|
||||||
|
|
||||||
|
private String workshop_id;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,20 +1 @@
|
|||||||
package org.nl.wms.quality_manage.service.report.impl;
|
package org.nl.wms.quality_manage.service.report.impl;
|
||||||
|
|
||||||
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetdtl;
|
|
||||||
import org.nl.wms.quality_manage.service.report.dao.mapper.QlTestInspectionsheetdtlMapper;
|
|
||||||
import org.nl.wms.quality_manage.service.report.IQlTestInspectionsheetdtlService;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 质检单明细表 服务实现类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author generator
|
|
||||||
* @since 2023-05-06
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class QlTestInspectionsheetdtlServiceImpl extends ServiceImpl<QlTestInspectionsheetdtlMapper, QlTestInspectionsheetdtl> implements IQlTestInspectionsheetdtlService {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,38 @@
|
|||||||
package org.nl.wms.quality_manage.service.report.impl;
|
package org.nl.wms.quality_manage.service.report.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import io.jsonwebtoken.lang.Assert;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.nl.common.TableDataInfo;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.utils.IdUtil;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.wms.masterdata_manage.service.material.IMdMeMaterialbaseService;
|
||||||
|
import org.nl.wms.masterdata_manage.service.material.dao.MdMeMaterialbase;
|
||||||
|
import org.nl.wms.quality_manage.service.TCEnum;
|
||||||
|
import org.nl.wms.quality_manage.service.inspection.dao.QlTestInspectionschememst;
|
||||||
|
import org.nl.wms.quality_manage.service.report.IQlTestInspectionsheetdtlService;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetdtl;
|
||||||
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
import org.nl.wms.quality_manage.service.report.dao.QlTestInspectionsheetmst;
|
||||||
import org.nl.wms.quality_manage.service.report.dao.mapper.QlTestInspectionsheetmstMapper;
|
import org.nl.wms.quality_manage.service.report.dao.mapper.QlTestInspectionsheetmstMapper;
|
||||||
import org.nl.wms.quality_manage.service.report.IQlTestInspectionsheetmstService;
|
import org.nl.wms.quality_manage.service.report.IQlTestInspectionsheetmstService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.nl.wms.quality_manage.service.report.dto.SheetQuery;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 质检单主表 服务实现类
|
* 质检单主表 服务实现类
|
||||||
@@ -17,4 +44,92 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class QlTestInspectionsheetmstServiceImpl extends ServiceImpl<QlTestInspectionsheetmstMapper, QlTestInspectionsheetmst> implements IQlTestInspectionsheetmstService {
|
public class QlTestInspectionsheetmstServiceImpl extends ServiceImpl<QlTestInspectionsheetmstMapper, QlTestInspectionsheetmst> implements IQlTestInspectionsheetmstService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IQlTestInspectionsheetdtlService inspectionsheetdtlService;
|
||||||
|
@Autowired
|
||||||
|
private IMdMeMaterialbaseService meMaterialbaseService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(JSONObject jo) {
|
||||||
|
// 调用主表 插入/更新方法
|
||||||
|
QlTestInspectionsheetmst mst = packageMstForm(new QlTestInspectionsheetmst(), jo);
|
||||||
|
this.save(mst);
|
||||||
|
|
||||||
|
//调用明细表 插入方法
|
||||||
|
inspectionsheetdtlService.create(mst);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(JSONObject form) {
|
||||||
|
Assert.notNull(form.get("inspection_id"), "请求参数不能为空");
|
||||||
|
QlTestInspectionsheetmst mst = form.toJavaObject(QlTestInspectionsheetmst.class);
|
||||||
|
mst.setUpdate_optid(SecurityUtils.getCurrentUserId());
|
||||||
|
mst.setUpdate_optname(SecurityUtils.getCurrentNickName());
|
||||||
|
mst.setUpdate_time(DateUtil.now());
|
||||||
|
this.updateById(mst);
|
||||||
|
|
||||||
|
//调用明细表 插入方法
|
||||||
|
inspectionsheetdtlService.create(mst);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object pageQuery(SheetQuery query, PageQuery pageQuery) {
|
||||||
|
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||||
|
TableDataInfo build = TableDataInfo.build(this.baseMapper.pageQuery(query));
|
||||||
|
build.setTotalElements(page.getTotal());
|
||||||
|
return build;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private QlTestInspectionsheetmst packageMstForm(QlTestInspectionsheetmst mst, JSONObject whereJson) {
|
||||||
|
mst.setInspection_id(IdUtil.getStringId());
|
||||||
|
mst.setInspection_code(CodeUtil.getNewCode("QL_TEST_SHEET_CODE"));
|
||||||
|
mst.setInspection_type(whereJson.getString("inspection_type"));
|
||||||
|
mst.setBiz_date(DateUtil.today());
|
||||||
|
mst.setMaterial_id(whereJson.getString("material_id"));
|
||||||
|
mst.setPcsn(DateUtil.today());
|
||||||
|
mst.setQty_unit_id(whereJson.getString("qty_unit_id"));
|
||||||
|
mst.setQty_unit_name(whereJson.getString("qty_unit_name"));
|
||||||
|
mst.setSource_bill_id(whereJson.getString("source_bill_id"));
|
||||||
|
mst.setSource_bill_code(whereJson.getString("source_bill_code"));
|
||||||
|
mst.setBill_status(TCEnum.BILL_STATUS.code("生成"));
|
||||||
|
mst.setRemark(whereJson.getString("remark"));
|
||||||
|
mst.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
mst.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
mst.setCreate_time(DateUtil.now());
|
||||||
|
mst.setIs_delete(false);
|
||||||
|
mst.setSysdeptid("111");
|
||||||
|
mst.setSyscompanyid("111");
|
||||||
|
return mst;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveResult(JSONObject whereJson) {
|
||||||
|
QlTestInspectionsheetmst mst = whereJson.toJavaObject(QlTestInspectionsheetmst.class);
|
||||||
|
mst.setUpdate_optid(SecurityUtils.getCurrentUserId());
|
||||||
|
mst.setUpdate_optname(SecurityUtils.getCurrentNickName());
|
||||||
|
mst.setUpdate_time(DateUtil.now());
|
||||||
|
mst.setBill_status(TCEnum.BILL_STATUS.code("确认"));
|
||||||
|
this.updateById(mst);
|
||||||
|
JSONArray rows = whereJson.getJSONArray("tableData");
|
||||||
|
for (int i = 0; i <rows.size(); i++) {
|
||||||
|
JSONObject row = rows.getJSONObject(i);
|
||||||
|
QlTestInspectionsheetdtl dtl = row.toJavaObject(QlTestInspectionsheetdtl.class);
|
||||||
|
inspectionsheetdtlService.updateById(dtl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getResult(JSONObject whereJson) {
|
||||||
|
String inspection_id = whereJson.getString("inspection_id");
|
||||||
|
QlTestInspectionsheetmst mst = this.getOne(new QueryWrapper<QlTestInspectionsheetmst>().eq("inspection_id", inspection_id));
|
||||||
|
MdMeMaterialbase mater_jo = meMaterialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_id", mst.getMaterial_id()));
|
||||||
|
JSONObject jo = JSONObject.parseObject(JSONObject.toJSONString(mst));
|
||||||
|
jo.put("material_id", mater_jo.getMaterial_id());
|
||||||
|
jo.put("material_code", mater_jo.getMaterial_code());
|
||||||
|
jo.put("material_name", mater_jo.getMaterial_name());
|
||||||
|
List<Map> result = inspectionsheetdtlService.getResult(whereJson);
|
||||||
|
jo.put("tableData", result);
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public enum IOSEnum {
|
|||||||
//托盘超限类型
|
//托盘超限类型
|
||||||
VEHICLE_OVER_TYPE(MapOf.of("标准", "00", "横向超", "01","纵向超","02")),
|
VEHICLE_OVER_TYPE(MapOf.of("标准", "00", "横向超", "01","纵向超","02")),
|
||||||
//单据类型
|
//单据类型
|
||||||
BILL_TYPE(MapOf.of("生产入库", "11", "手工入库", "12", "原料入库", "13"
|
BILL_TYPE(MapOf.of("采购入库", "11", "还回入库", "12", "手工入库", "13"
|
||||||
, "领料出库", "21", "销售出库", "22", "手工出库", "23")),
|
, "领料出库", "21", "销售出库", "22", "手工出库", "23")),
|
||||||
//单据状态
|
//单据状态
|
||||||
BILL_STATUS(MapOf.of("生成", "10", "分配中", "20", "分配完", "30", "完成", "99")),
|
BILL_STATUS(MapOf.of("生成", "10", "分配中", "20", "分配完", "30", "完成", "99")),
|
||||||
|
|||||||
@@ -56,5 +56,12 @@ public class StIvtStructivtYlController {
|
|||||||
public ResponseEntity<Object> getSemiProductIvt(StructIvtYLQuery query) {
|
public ResponseEntity<Object> getSemiProductIvt(StructIvtYLQuery query) {
|
||||||
return new ResponseEntity<>(structivtYlService.getSemiProductIvt(query), HttpStatus.OK);
|
return new ResponseEntity<>(structivtYlService.getSemiProductIvt(query), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getAllRawIvt")
|
||||||
|
@Log("查询原料库存")
|
||||||
|
@ApiOperation("查询原料库存")
|
||||||
|
public ResponseEntity<Object> getAllRawIvt(StructIvtYLQuery query, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(structivtYlService.getAllRawIvt(query, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public interface IStIvtStructivtYlService extends IService<StIvtStructivtYl> {
|
|||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
Object getRawIvt(StructIvtYLQuery query, PageQuery page);
|
Object getRawIvt(StructIvtYLQuery query, PageQuery page);
|
||||||
|
Object getAllRawIvt(StructIvtYLQuery query, PageQuery page);
|
||||||
|
|
||||||
List<Map> getStructIvt(StructIvtYLQuery query);
|
List<Map> getStructIvt(StructIvtYLQuery query);
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ public interface StIvtStructivtYlMapper extends BaseMapper<StIvtStructivtYl> {
|
|||||||
|
|
||||||
List<Map> getRawIvt(@Param("query") StructIvtYLQuery query, @Param("pageQuery") PageQuery pageQuery);
|
List<Map> getRawIvt(@Param("query") StructIvtYLQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||||
|
|
||||||
|
List<Map> getAllRawIvt(@Param("query") StructIvtYLQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||||
|
|
||||||
List<Map> getProductIvt(@Param("query") StructIvtYLQuery query, @Param("pageQuery") PageQuery pageQuery);
|
List<Map> getProductIvt(@Param("query") StructIvtYLQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||||
|
|
||||||
List<Map> getSemiProductIvt(@Param("query") StructIvtYLQuery query);
|
List<Map> getSemiProductIvt(@Param("query") StructIvtYLQuery query);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
AND
|
AND
|
||||||
sa.lock_type = '0'
|
sa.lock_type = '0'
|
||||||
<if test="query.material_search != null and query.material_search != ''">
|
<if test="query.material_search != null and query.material_search != ''">
|
||||||
and (mb.material_code = #{query.material_search} OR mb.material_name = #{query.material_search})
|
and (mb.material_code like '%${query.material_search}%' OR mb.material_name like '%${query.material_search}%')
|
||||||
</if>
|
</if>
|
||||||
<if test="query.sect_id != null and query.sect_id != ''">
|
<if test="query.sect_id != null and query.sect_id != ''">
|
||||||
and sa.sect_id = #{query.sect_id}
|
and sa.sect_id = #{query.sect_id}
|
||||||
@@ -37,6 +37,39 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getAllRawIvt" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
ivt.*,
|
||||||
|
mu.unit_name AS qty_unit_name,
|
||||||
|
mb.material_code,
|
||||||
|
mb.material_name,
|
||||||
|
sa.sect_id,
|
||||||
|
sa.sect_code,
|
||||||
|
sa.sect_name,
|
||||||
|
sa.struct_id,
|
||||||
|
sa.struct_code,
|
||||||
|
sa.struct_name,
|
||||||
|
sa.stor_name,
|
||||||
|
class.class_name
|
||||||
|
FROM
|
||||||
|
st_ivt_structivt_yl ivt
|
||||||
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt.material_id
|
||||||
|
LEFT JOIN st_ivt_structattr sa ON sa.struct_id = ivt.struct_id
|
||||||
|
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = ivt.qty_unit_id
|
||||||
|
LEFT JOIN md_pb_classstandard class ON class.class_id = mb.material_type_id
|
||||||
|
<where>
|
||||||
|
<if test="query.material_search != null and query.material_search != ''">
|
||||||
|
and (mb.material_code like '%${query.material_search}%' OR mb.material_name like '%${query.material_search}%')
|
||||||
|
</if>
|
||||||
|
<if test="query.struct_search != null and query.struct_search != ''">
|
||||||
|
and (sa.struct_code like '%${query.struct_search}%' OR sa.struct_name like '%${query.struct_search}%')
|
||||||
|
</if>
|
||||||
|
<if test="query.struct_id != null and query.struct_id != ''">
|
||||||
|
and sa.stor_id = #{query.stor_id}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getProductIvt" resultType="java.util.Map">
|
<select id="getProductIvt" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
ivt.*,
|
ivt.*,
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ public class StructIvtYLQuery extends BaseQuery<StIvtStructivtYl> {
|
|||||||
|
|
||||||
private String material_search;
|
private String material_search;
|
||||||
|
|
||||||
|
private String stor_id;
|
||||||
|
|
||||||
|
private String struct_search;
|
||||||
|
|
||||||
private Boolean is_delete = false;
|
private Boolean is_delete = false;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ public class StIvtStructivtYlServiceImpl extends ServiceImpl<StIvtStructivtYlMap
|
|||||||
build.setTotalElements(page.getTotal());
|
build.setTotalElements(page.getTotal());
|
||||||
return build;
|
return build;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public Object getAllRawIvt(StructIvtYLQuery query, PageQuery pageQuery) {
|
||||||
|
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||||
|
List<Map> mst_detail = this.baseMapper.getAllRawIvt(query, pageQuery);
|
||||||
|
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||||
|
build.setTotalElements(page.getTotal());
|
||||||
|
return build;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map> getStructIvt(StructIvtYLQuery query) {
|
public List<Map> getStructIvt(StructIvtYLQuery query) {
|
||||||
|
|||||||
@@ -24,9 +24,10 @@ spring:
|
|||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_xc}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_xc}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:zjhl_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
# password: ${DB_PWD:123456}
|
|
||||||
password: ${DB_PWD:Root.123456}
|
password: ${DB_PWD:Root.123456}
|
||||||
|
# password: ${DB_PWD:root}
|
||||||
|
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ spring:
|
|||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
profiles:
|
profiles:
|
||||||
active: prod
|
active: dev
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
|
|
||||||
<!--开发环境:打印控制台-->
|
<!--开发环境:打印控制台-->
|
||||||
<springProfile name="dev">
|
<springProfile name="dev">
|
||||||
<root level="info">
|
<root level="debug">
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
<appender-ref ref="esLogAppender"/>
|
<appender-ref ref="esLogAppender"/>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
@@ -39,5 +39,4 @@ export function getDtl(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default { add, edit, del, saveData, getDtl }
|
export default { add, edit, del, saveData, getDtl }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
>
|
>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="18" style="border: 1px solid white">
|
<el-col :span="18" style="border: 1px solid white">
|
||||||
<span />
|
<span/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<span>
|
<span>
|
||||||
@@ -44,9 +44,9 @@
|
|||||||
label-position="right"
|
label-position="right"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="物料编码">
|
<el-form-item label="质检单号">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form1.material_code"
|
v-model="form1.inspection_code"
|
||||||
disabled
|
disabled
|
||||||
size="mini"
|
size="mini"
|
||||||
style="width: 210px"
|
style="width: 210px"
|
||||||
@@ -62,43 +62,41 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="批号">
|
<el-form-item label="采购订单">
|
||||||
<label slot="label">批 号:</label>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form1.pcsn"
|
v-model="form1.source_bill_code"
|
||||||
disabled
|
disabled
|
||||||
size="mini"
|
size="mini"
|
||||||
style="width: 210px"
|
style="width: 210px"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="样品编号">
|
<el-form-item label="重量">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form1.sample_code"
|
v-model="form1.qty"
|
||||||
|
disabled
|
||||||
size="mini"
|
size="mini"
|
||||||
style="width: 210px"
|
style="width: 210px"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
:disabled="form1.bill_status === '99'"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
<el-form-item label="烧结炉号">
|
<label slot="label">结 果:</label>
|
||||||
<el-input
|
<el-select
|
||||||
v-model="form1.other_device_no"
|
v-model="form1.result"
|
||||||
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
style="width: 210px"
|
style="width: 210px"
|
||||||
|
placeholder="结果"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
:disabled="form1.bill_status === '99'"
|
:disabled="form1.bill_status === '99'"
|
||||||
/>
|
>
|
||||||
</el-form-item>
|
<el-option
|
||||||
<el-form-item label="烧结温度">
|
v-for="item in dict.qc_result"
|
||||||
<el-input
|
:label="item.label"
|
||||||
v-model="form1.other_device_wd"
|
:value="item.value"
|
||||||
size="mini"
|
/>
|
||||||
style="width: 210px"
|
</el-select>
|
||||||
class="filter-item"
|
|
||||||
:disabled="form1.bill_status === '99'"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<label slot="label">等 级:</label>
|
<label slot="label">等 级:</label>
|
||||||
@@ -112,88 +110,17 @@
|
|||||||
:disabled="form1.bill_status === '99'"
|
:disabled="form1.bill_status === '99'"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.ST_IVT_LEVEL"
|
v-for="item in dict.qc_grade"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item label="备注">
|
||||||
<label slot="label">重 损:</label>
|
|
||||||
<el-input
|
|
||||||
v-model="form1.weightlost"
|
|
||||||
size="mini"
|
|
||||||
style="width: 210px"
|
|
||||||
class="filter-item"
|
|
||||||
:disabled="form1.bill_status === '99'"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item>
|
|
||||||
<label slot="label">结 论:</label>
|
|
||||||
<el-select
|
|
||||||
v-model="form1.result"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
style="width: 210px"
|
|
||||||
placeholder="结论"
|
|
||||||
class="filter-item"
|
|
||||||
:disabled="form1.bill_status === '99'"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.QC_RESULT_LHZJD"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="form1.result==='07'" label="改料编码">
|
|
||||||
<el-input
|
|
||||||
v-model="form1.change_material_code"
|
|
||||||
prefix-icon="el-icon-search"
|
|
||||||
placeholder="请选择物料"
|
|
||||||
size="mini"
|
|
||||||
style="width: 210px"
|
|
||||||
class="filter-item"
|
|
||||||
clearable
|
|
||||||
@clear="cleanMater"
|
|
||||||
@focus="materShow=true"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="form1.result==='07'" label="改料名称">
|
|
||||||
<el-input
|
|
||||||
v-model="form1.change_material_name"
|
|
||||||
disabled
|
|
||||||
size="mini"
|
|
||||||
style="width: 210px"
|
|
||||||
class="filter-item"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item v-if="form1.result==='07'" label="改用批号">
|
|
||||||
<el-input
|
|
||||||
v-model="form1.change_pcsn"
|
|
||||||
disabled
|
|
||||||
size="mini"
|
|
||||||
style="width: 210px"
|
|
||||||
class="filter-item"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="金相备注">
|
|
||||||
<el-input
|
|
||||||
v-model="form1.metallography_remark"
|
|
||||||
:disabled="form1.bill_status === '99'"
|
|
||||||
style="width: 380px;"
|
|
||||||
rows="2"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="检验备注">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form1.remark"
|
v-model="form1.remark"
|
||||||
:disabled="form1.bill_status === '99'"
|
:disabled="form1.bill_status === '99'"
|
||||||
|
placeholder="合格白色,超出标准范围红色"
|
||||||
style="width: 380px;"
|
style="width: 380px;"
|
||||||
rows="2"
|
rows="2"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@@ -253,26 +180,6 @@
|
|||||||
width="100"
|
width="100"
|
||||||
:formatter="crud.formatQlNum4"
|
:formatter="crud.formatQlNum4"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
prop="down_limit_value"
|
|
||||||
label="下限临界值(≤)"
|
|
||||||
width="100"
|
|
||||||
:formatter="crud.formatQlNum4"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
prop="up_limit_value"
|
|
||||||
label="上限临界值(≥)"
|
|
||||||
width="100"
|
|
||||||
:formatter="crud.formatQlNum4"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
v-if="false"
|
|
||||||
prop="is_ok"
|
|
||||||
label="是否合格"
|
|
||||||
width="155"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="value"
|
prop="value"
|
||||||
width="155px"
|
width="155px"
|
||||||
@@ -304,34 +211,22 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
prop="item_remark"
|
|
||||||
label="项点备注"
|
|
||||||
width="160"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
v-if="false"
|
|
||||||
prop="form_remark"
|
|
||||||
label="表单备注"
|
|
||||||
width="160"
|
|
||||||
/>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code="'05'" @tableChanged2="tableChanged2" />
|
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code="'05'" @tableChanged2="tableChanged2"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CRUD, { crud } from '@crud/crud'
|
import CRUD, {crud} from '@crud/crud'
|
||||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
import crudPhysicalMst from '@/views/wms/ql_manage/physicalMst'
|
import crudPhysicalMst from '@/views/wms/ql_manage/physicalMst/physicalMst'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Dialog1',
|
name: 'Dialog1',
|
||||||
dicts: ['QL_TEST_POINTTYPE', 'QC_RESULT_LHZJD', 'ST_IVT_LEVEL'],
|
dicts: ['QL_TEST_POINTTYPE', 'qc_grade', 'qc_result'],
|
||||||
components: { MaterDtl },
|
components: {MaterDtl},
|
||||||
mixins: [crud()],
|
mixins: [crud()],
|
||||||
props: {
|
props: {
|
||||||
visiable1: {
|
visiable1: {
|
||||||
@@ -381,19 +276,20 @@ export default {
|
|||||||
}
|
}
|
||||||
crudPhysicalMst.getResult(param).then(res => {
|
crudPhysicalMst.getResult(param).then(res => {
|
||||||
this.form1 = res
|
this.form1 = res
|
||||||
if (res.grade === '') {
|
const rows = this.form1.tableData
|
||||||
this.form1.grade = '01'
|
for (let i = 0; i < rows.length; i++) {
|
||||||
|
const row = rows[i]
|
||||||
|
this.$set(row, 'value', row.value)
|
||||||
|
}
|
||||||
|
if (res.grade === '' || !res.grade) {
|
||||||
|
this.form1.grade = '1'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
hand() {
|
cellStyle({row, column, rowIndex, columnIndex}) {
|
||||||
|
|
||||||
},
|
|
||||||
cellStyle({ row, column, rowIndex, columnIndex }) {
|
|
||||||
// https://blog.csdn.net/qq_41648113/article/details/109337781
|
// https://blog.csdn.net/qq_41648113/article/details/109337781
|
||||||
// https://blog.csdn.net/Akatsuki233/article/details/100311040
|
// https://blog.csdn.net/Akatsuki233/article/details/100311040
|
||||||
// https://blog.csdn.net/qq_45414633/article/details/107795124
|
// https://blog.csdn.net/qq_45414633/article/details/107795124
|
||||||
|
|
||||||
const inspection_type = row.inspection_type
|
const inspection_type = row.inspection_type
|
||||||
const is_limit_remark = row.is_limit_remark
|
const is_limit_remark = row.is_limit_remark
|
||||||
const value = parseFloat(row.value)
|
const value = parseFloat(row.value)
|
||||||
@@ -434,18 +330,18 @@ export default {
|
|||||||
computerResult() {
|
computerResult() {
|
||||||
const rows = this.form1.tableData
|
const rows = this.form1.tableData
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
if (rows[i].up_limit !== '') {
|
if (!rows[i].up_limit && rows[i].inspection_type === '02') {
|
||||||
if (rows[i].value === undefined) {
|
if (rows[i].value === undefined) {
|
||||||
this.crud.notify('有标准项点未输入完', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('有标准项点未输入完', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.form1.result = '01'
|
this.$set(this.form1, 'result', '1')
|
||||||
var remark = ''
|
var remark = ''
|
||||||
for (var row of rows) {
|
for (var row of rows) {
|
||||||
if (row.is_ok === '0') {
|
if (row.is_ok === '0') {
|
||||||
this.form1.result = '02'
|
this.$set(this.form1, 'result', '2')
|
||||||
} else {
|
} else {
|
||||||
if (row.is_limit_remark === '1' && row.form_remark) {
|
if (row.is_limit_remark === '1' && row.form_remark) {
|
||||||
remark += row.form_remark.replace('\n', '') + ','
|
remark += row.form_remark.replace('\n', '') + ','
|
||||||
@@ -453,24 +349,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.form1.remark = remark
|
|
||||||
this.$set(this.form1, 'remark', remark)
|
this.$set(this.form1, 'remark', remark)
|
||||||
|
if (this.form1.result === '1') return this.crud.notify('计算结果为合格', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
if (this.form1.metallography_remark !== '') {
|
if (this.form1.result === '2') return this.crud.notify('计算结果为不合格', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
this.form1.result = ''
|
|
||||||
return this.crud.notify('金相异常,需人工判定', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form1.result === '01') return this.crud.notify('计算结果为合格', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
if (this.form1.result === '02') return this.crud.notify('计算结果为不合格', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
},
|
},
|
||||||
format_inspection_item_type(row, column) {
|
format_inspection_item_type(row, column) {
|
||||||
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
|
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
|
||||||
},
|
},
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
debugger
|
||||||
const msg = '是否继续!'
|
const msg = '是否继续!'
|
||||||
|
|
||||||
const data = this.form1.tableData
|
const data = this.form1.tableData
|
||||||
var flag = 0
|
var flag = 0
|
||||||
for (var row of data) {
|
for (var row of data) {
|
||||||
|
|||||||
@@ -11,35 +11,6 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="质检单号">
|
|
||||||
<el-input
|
|
||||||
v-model="query.inspection_code"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入质检单号"
|
|
||||||
style="width: 210px;"
|
|
||||||
class="filter-item"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="单据类型">
|
|
||||||
<el-select
|
|
||||||
v-model="query.inspection_type"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
style="width: 210px;"
|
|
||||||
@change="hand"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.QC_INV_TYPE_LHD"
|
|
||||||
: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"
|
||||||
@@ -51,10 +22,32 @@
|
|||||||
@change="crud.toQuery"
|
@change="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="质检单号">
|
||||||
|
<el-input
|
||||||
|
v-model="query.bill_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入质检单号"
|
||||||
|
style="width: 210px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="源单号">
|
||||||
|
<el-input
|
||||||
|
v-model="query.source_bill_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入质检单号"
|
||||||
|
style="width: 210px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="物料">
|
<el-form-item label="物料">
|
||||||
<label slot="label">物 料:</label>
|
<label slot="label">物 料:</label>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.material_code"
|
v-model="query.material_search"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="请输入物料编码或名称"
|
placeholder="请输入物料编码或名称"
|
||||||
@@ -63,20 +56,6 @@
|
|||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="批号">
|
|
||||||
<label slot="label">批 号:</label>
|
|
||||||
<el-input
|
|
||||||
v-model="query.pcsn"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入物料批号"
|
|
||||||
style="width: 210px;"
|
|
||||||
class="filter-item"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="单据状态">
|
<el-form-item label="单据状态">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.bill_status"
|
v-model="query.bill_status"
|
||||||
@@ -88,29 +67,18 @@
|
|||||||
@change="hand"
|
@change="hand"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusList"
|
v-for="item in dict.QC_BILL_STATUS"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation/>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission">
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
:disabled="crud.selections.length !== 1"
|
|
||||||
@click="copyAdd(crud.selections[0])"
|
|
||||||
>
|
|
||||||
复制新增
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -122,6 +90,17 @@
|
|||||||
>
|
>
|
||||||
结果录入
|
结果录入
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="info"
|
||||||
|
icon="el-icon-position"
|
||||||
|
:disabled="crud.selections.length !== 1"
|
||||||
|
size="mini"
|
||||||
|
@click="confirm"
|
||||||
|
>
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@@ -129,21 +108,13 @@
|
|||||||
:before-close="crud.cancelCU"
|
:before-close="crud.cancelCU"
|
||||||
:visible.sync="crud.status.cu > 0"
|
:visible.sync="crud.status.cu > 0"
|
||||||
:title="crud.status.title"
|
:title="crud.status.title"
|
||||||
width="500px"
|
width="600px"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||||
<el-input v-if="false" v-model="form.material_id" />
|
<el-input v-if="false" v-model="form.material_id"/>
|
||||||
|
|
||||||
<el-form-item label="质检单号" prop="inspection_code">
|
<el-form-item label="质检单号" prop="inspection_code">
|
||||||
<el-input v-model.trim="form.inspection_code" placeholder="系统生成" disabled style="width: 370px;" />
|
<el-input v-model.trim="form.inspection_code" placeholder="系统生成" disabled style="width: 370px;"/>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料" prop="material_name">
|
|
||||||
<el-input v-model.trim="form.material_name" disabled class="input-with-select">
|
|
||||||
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="批号" prop="pcsn">
|
|
||||||
<el-input v-model.trim="form.pcsn" style="width: 370px;" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单据类型" prop="inspection_type">
|
<el-form-item label="单据类型" prop="inspection_type">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -152,21 +123,27 @@
|
|||||||
placeholder="单据类型"
|
placeholder="单据类型"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
style="width: 370px;"
|
style="width: 370px;"
|
||||||
:disabled="true"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.QC_INV_TYPE_LHD"
|
v-for="item in dict.QC_INSPECTION_SCHEME_TYPE"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.inspection_type==='30'" label="关联单号" prop="inspection_id_gu">
|
<el-form-item label="源单号" prop="source_bill_code">
|
||||||
<el-input v-model.trim="form.inspection_id_gu" clearable style="width: 370px;" @focus="RelevancyShow=true" />
|
<el-input v-model.trim="form.source_bill_code" disabled class="input-with-select" style="width: 370px;">
|
||||||
|
<el-button slot="append" icon="el-icon-search" @click="querySale"/>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料" prop="material_name">
|
||||||
|
<el-input v-model.trim="form.material_name" style="width: 370px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量(KG)" prop="qty">
|
||||||
|
<el-input v-model.trim="form.qty" style="width: 370px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model.trim="form.remark" style="width: 370px;" rows="2" type="textarea" />
|
<el-input v-model.trim="form.remark" style="width: 370px;" rows="2" type="textarea"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@@ -183,25 +160,19 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55"/>
|
||||||
<el-table-column v-if="false" prop="inspection_id" label="理化质检单标识" />
|
<el-table-column prop="inspection_code" label="质检单号" width="135"/>
|
||||||
<el-table-column prop="inspection_code" label="质检单号" width="135" />
|
<el-table-column prop="material_code" label="物料编码" min-width="120" show-overflow-tooltip/>
|
||||||
<el-table-column min-width="100" show-overflow-tooltip prop="inspection_type" label="单据类型" :formatter="format_inspection_type" />
|
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip/>
|
||||||
<el-table-column prop="bill_status" label="单据状态" :formatter="formatStatus" />
|
<el-table-column prop="qty" label="数量" min-width="100" show-overflow-tooltip/>
|
||||||
<el-table-column v-if="false" prop="biz_date" label="业务日期" />
|
<el-table-column prop="bill_status" label="单据状态" :formatter="formatStatus"/>
|
||||||
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
<el-table-column prop="result" label="结果" :formatter="format_result"/>
|
||||||
<el-table-column prop="material_code" label="物料编码" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="remark" show-overflow-tooltip label="备注"/>
|
||||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip />
|
<el-table-column prop="source_bill_code" show-overflow-tooltip label="源单号"/>
|
||||||
<el-table-column prop="pcsn" label="批号" min-width="100" show-overflow-tooltip />
|
<el-table-column prop="create_name" label="创建人"/>
|
||||||
<el-table-column prop="is_effective" label="是否有效" :formatter="format_is_active" />
|
<el-table-column prop="create_time" label="创建时间" width="135"/>
|
||||||
<el-table-column prop="result" label="结果" :formatter="format_result" />
|
<el-table-column prop="confirm_optname" label="确认人" min-width="100"/>
|
||||||
<el-table-column prop="remark" show-overflow-tooltip label="备注" />
|
<el-table-column prop="confirm_time" label="确认时间" width="135"/>
|
||||||
<el-table-column prop="input_optname" label="创建人" />
|
|
||||||
<el-table-column prop="input_time" label="创建时间" width="135" />
|
|
||||||
<el-table-column prop="check_optname" label="检验人" />
|
|
||||||
<el-table-column prop="check_time" label="检验时间" width="135" />
|
|
||||||
<el-table-column prop="confirm_optname" label="结论判定人" min-width="100" />
|
|
||||||
<el-table-column prop="confirm_time" label="结论判定时间" width="135" />
|
|
||||||
<el-table-column label="操作" width="120px" align="center" fixed="right">
|
<el-table-column label="操作" width="120px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
@@ -214,27 +185,25 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @tableChanged2="tableChanged2" />
|
<BillDtl :dialog-show.sync="materShow" @setMaterValue="tableChanged2"/>
|
||||||
<Dialog1 :visiable1.sync="visiable1" :inspection-id="inspection_id" />
|
<Dialog1 :visiable1.sync="visiable1" :inspection-id="inspection_id"/>
|
||||||
<RelevancyDialog :dialog-show.sync="RelevancyShow" @RelevancyChanged="RelevancyChanged" />
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudPhysicalMst from '@/views/wms/ql_manage/physicalMst/physicalMst'
|
import crudPhysicalMst from '@/views/wms/ql_manage/physicalMst/physicalMst'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, {crud, form, 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 MaterDtl from '@/views/wms/pub/MaterDialog'
|
import BillDtl from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDtl'
|
||||||
import Dialog1 from './Dialog1'
|
import Dialog1 from './Dialog1'
|
||||||
import DateRangePicker from '@/components/DateRangePicker'
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
import RelevancyDialog from '@/views/wms/ql_manage/physicalMst/RelevancyDialog'
|
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
inspection_id: null,
|
inspection_id: null,
|
||||||
@@ -242,12 +211,16 @@ const defaultForm = {
|
|||||||
inspection_type: null,
|
inspection_type: null,
|
||||||
inspection_id_gu: null,
|
inspection_id_gu: null,
|
||||||
material_id: null,
|
material_id: null,
|
||||||
pcsn: null
|
material_code: null,
|
||||||
|
material_name: null,
|
||||||
|
source_bill_code: null,
|
||||||
|
qty: 0,
|
||||||
|
source_bill_id: null
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'PhysicalMst',
|
name: 'QualityTest',
|
||||||
dicts: ['QC_INV_TYPE_LHD', 'IS_OR_NOT', 'QC_RESULT_LHZJD'],
|
dicts: [ 'qc_result', 'QC_INSPECTION_SCHEME_TYPE', 'QC_BILL_STATUS'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, DateRangePicker, Dialog1, RelevancyDialog },
|
components: {pagination, crudOperation, rrOperation, udOperation, BillDtl, DateRangePicker, Dialog1 },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -262,7 +235,7 @@ export default {
|
|||||||
download: false,
|
download: false,
|
||||||
reset: true
|
reset: true
|
||||||
},
|
},
|
||||||
crudMethod: { ...crudPhysicalMst }
|
crudMethod: {...crudPhysicalMst}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -272,34 +245,24 @@ export default {
|
|||||||
materialType: [],
|
materialType: [],
|
||||||
visiable1: false,
|
visiable1: false,
|
||||||
inspection_id: null,
|
inspection_id: null,
|
||||||
statusList: [],
|
|
||||||
permission: {
|
permission: {
|
||||||
add: ['admin', 'user:add'],
|
add: ['admin', 'user:add'],
|
||||||
edit: ['admin', 'user:edit'],
|
edit: ['admin', 'user:edit'],
|
||||||
del: ['admin', 'user:del']
|
del: ['admin', 'user:del']
|
||||||
},
|
},
|
||||||
RelevancyShow: false,
|
|
||||||
rules: {
|
rules: {
|
||||||
inspection_type: [
|
inspection_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'}
|
||||||
],
|
],
|
||||||
pcsn: [
|
pcsn: [
|
||||||
{ required: true, message: '批号不能为空', trigger: 'blur' }
|
{required: true, message: '批号不能为空', trigger: 'blur'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
crudPhysicalMst.getStatus().then(res => {
|
|
||||||
this.statusList = res
|
|
||||||
})
|
|
||||||
crudPhysicalMst.getMaterialType().then(res => {
|
|
||||||
this.materialType = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
@@ -317,7 +280,7 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
queryMater() {
|
querySale() {
|
||||||
this.materShow = true
|
this.materShow = true
|
||||||
},
|
},
|
||||||
resultEnter(data) {
|
resultEnter(data) {
|
||||||
@@ -327,45 +290,21 @@ export default {
|
|||||||
hand(value) {
|
hand(value) {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
format_inspection_type(row, column) {
|
|
||||||
return this.dict.label.QC_INV_TYPE_LHD[row.inspection_type]
|
|
||||||
},
|
|
||||||
formatStatus(row, column) {
|
formatStatus(row, column) {
|
||||||
for (const item of this.statusList) {
|
return this.dict.label.QC_BILL_STATUS[row.bill_status]
|
||||||
if (item.value === row.bill_status) {
|
|
||||||
return item.label
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
format_is_active(row, column) {
|
|
||||||
return this.dict.label.IS_OR_NOT[row.is_effective]
|
|
||||||
},
|
},
|
||||||
format_result(row, column) {
|
format_result(row, column) {
|
||||||
return this.dict.label.QC_RESULT_LHZJD[row.result]
|
return this.dict.label.qc_result[row.result]
|
||||||
},
|
},
|
||||||
tableChanged2(row) {
|
tableChanged2(rows) {
|
||||||
|
const row = rows[0]
|
||||||
|
debugger
|
||||||
// 新增一行物料时,给行进行赋值
|
// 新增一行物料时,给行进行赋值
|
||||||
this.form.material_id = row.material_id
|
this.form.material_id = row.material_id
|
||||||
this.form.material_code = row.material_code
|
this.form.material_code = row.material_code
|
||||||
this.form.material_name = row.material_name
|
this.form.material_name = row.material_name
|
||||||
const data = {
|
this.form.source_bill_id = row.id
|
||||||
'materOpt_code': '01',
|
this.form.source_bill_code = row.po_code
|
||||||
'material_id': row.material_id
|
|
||||||
}
|
|
||||||
crudPhysicalMst.isMaterType(data).then(res => {
|
|
||||||
const param = res.param
|
|
||||||
if (param === '10') {
|
|
||||||
this.form.inspection_type = '10'
|
|
||||||
} else if (param === '20') {
|
|
||||||
this.form.inspection_type = '20'
|
|
||||||
} else if (param === '30') {
|
|
||||||
this.form.inspection_type = '30'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
RelevancyChanged(rows) {
|
|
||||||
const row = rows[0]
|
|
||||||
this.form.inspection_id_gu = row.inspection_id
|
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
const _selectData = this.$refs.table.selection
|
const _selectData = this.$refs.table.selection
|
||||||
|
|||||||
@@ -10,16 +10,16 @@ export function add(data) {
|
|||||||
|
|
||||||
export function del(ids) {
|
export function del(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/physicalMst/',
|
url: 'api/physicalMst/delete',
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
data: ids
|
data: ids
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function edit(data) {
|
export function edit(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/physicalMst',
|
url: 'api/physicalMst/update',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ export function saveResult(data) {
|
|||||||
export function confirm(data) {
|
export function confirm(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/physicalMst/confirm',
|
url: 'api/physicalMst/confirm',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -96,4 +96,4 @@ export function getStatus(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getResult, saveResult, confirm, setValid, copyAdd, isMaterType, getStatus, getMaterialType }
|
export default { add, edit, del, getResult, saveResult, confirm, setValid, copyAdd, getStatus }
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.ST_INV_IN_TYPE"
|
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -281,7 +281,7 @@ export default {
|
|||||||
name: 'AddDialog',
|
name: 'AddDialog',
|
||||||
components: { MaterDtl, BillDtl },
|
components: { MaterDtl, BillDtl },
|
||||||
mixins: [crud(), form(defaultForm)],
|
mixins: [crud(), form(defaultForm)],
|
||||||
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
@change="crud.toQuery"
|
@change="crud.toQuery"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.ST_INV_IN_TYPE"
|
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -237,7 +237,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE', 'product_area', 'ST_INV_CREATE'],
|
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
@@ -310,7 +310,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
bill_typeFormat(row, column) {
|
bill_typeFormat(row, column) {
|
||||||
return this.dict.label.ST_INV_IN_TYPE[row.bill_type]
|
return this.dict.label.ST_INV_RAW_IN_TYPE[row.bill_type]
|
||||||
},
|
},
|
||||||
toView(row) {
|
toView(row) {
|
||||||
this.mstrow = row
|
this.mstrow = row
|
||||||
|
|||||||
@@ -0,0 +1,148 @@
|
|||||||
|
<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-select
|
||||||
|
v-model="query.stor_id"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="所属仓库"
|
||||||
|
class="filter-item"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in storlist"
|
||||||
|
:key="item.stor_id"
|
||||||
|
:label="item.stor_name"
|
||||||
|
:value="item.stor_id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="入库日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.createTime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="仓位编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.struct_search"
|
||||||
|
size="mini"
|
||||||
|
clearable
|
||||||
|
placeholder="仓位编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="物料编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.material_search"
|
||||||
|
size="mini"
|
||||||
|
clearable
|
||||||
|
placeholder="物料编码、名称、规格"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
size="mini"
|
||||||
|
:data="crud.data"
|
||||||
|
highlight-current-row
|
||||||
|
style="width: 100%;"
|
||||||
|
@selection-change="crud.selectionChangeHandler"
|
||||||
|
>
|
||||||
|
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库名称" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="sect_name" label="库区名称" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" />
|
||||||
|
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||||
|
<el-table-column show-overflow-tooltip min-width="120" prop="material_name" label="物料名称" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可用数量" :formatter="crud.formatNum3" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="ivt_qty" label="库存数量" :formatter="crud.formatNum3" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="warehousing_qty" label="待入数量" :formatter="crud.formatNum3" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||||
|
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
||||||
|
import ProductIvt from '@/views/wms/storage_manage/product/productIvt/productivt'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'RawProductIvt',
|
||||||
|
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '原材料库存',
|
||||||
|
optShow: { add: false, reset: true },
|
||||||
|
idField: 'stockrecord_id',
|
||||||
|
url: '/api/stIvtStructivtYl/getAllRawIvt',
|
||||||
|
crudMethod: { ...ProductIvt }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header(), crud()],
|
||||||
|
// 数据字典
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
|
permission: {},
|
||||||
|
storlist: [],
|
||||||
|
storId: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted: function() {
|
||||||
|
const that = this
|
||||||
|
window.onresize = function temp() {
|
||||||
|
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
crudStorattr.getStor({ 'stor_type': '3' }).then(res => {
|
||||||
|
this.storlist = res.content
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep .el-dialog__body {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/stIvtStructivtCp',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: '/api/stIvtStructivtCp/delete',
|
||||||
|
method: 'post',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/stIvtStructivtCp/update',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
add,
|
||||||
|
edit,
|
||||||
|
del
|
||||||
|
}
|
||||||
@@ -59,10 +59,11 @@
|
|||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="业务类型"
|
placeholder="业务类型"
|
||||||
|
@change="billTypeChange"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.ST_INV_OUT_TYPE"
|
v-for="item in dict.ST_INV_RAW_OUT_TYPE"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -158,6 +159,7 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
|
:disabled="bill_btn"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="insertBill()"
|
@click="insertBill()"
|
||||||
>
|
>
|
||||||
@@ -168,6 +170,7 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
|
:disabled="mater_btn"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="insertEvent()"
|
@click="insertEvent()"
|
||||||
>
|
>
|
||||||
@@ -265,14 +268,14 @@ const defaultForm = {
|
|||||||
remark: '',
|
remark: '',
|
||||||
biz_date: new Date(),
|
biz_date: new Date(),
|
||||||
create_mode: '',
|
create_mode: '',
|
||||||
tableData: []
|
tableData: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDialog',
|
name: 'AddDialog',
|
||||||
components: { StructIvt, MaterDtl, BillDtl },
|
components: { StructIvt, MaterDtl, BillDtl },
|
||||||
mixins: [crud(), form(defaultForm)],
|
mixins: [crud(), form(defaultForm)],
|
||||||
dicts: ['IO_BILL_STATUS', 'ST_INV_OUT_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_OUT_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -287,6 +290,8 @@ export default {
|
|||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
materShow: false,
|
materShow: false,
|
||||||
billShow: false,
|
billShow: false,
|
||||||
|
bill_btn:true,
|
||||||
|
mater_btn:true,
|
||||||
struct_id: '',
|
struct_id: '',
|
||||||
sect_id: '',
|
sect_id: '',
|
||||||
opendtlParam: null,
|
opendtlParam: null,
|
||||||
@@ -359,6 +364,18 @@ export default {
|
|||||||
row.struct_id = this.struct_id
|
row.struct_id = this.struct_id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
billTypeChange(value){
|
||||||
|
if (value === '21'){
|
||||||
|
this.bill_btn = false
|
||||||
|
this.mater_btn = true
|
||||||
|
}else if (value === '23'){
|
||||||
|
this.bill_btn = true
|
||||||
|
this.mater_btn = false
|
||||||
|
}else {
|
||||||
|
this.bill_btn = true
|
||||||
|
this.mater_btn = true
|
||||||
|
}
|
||||||
|
},
|
||||||
storChange(value) {
|
storChange(value) {
|
||||||
crudStructattr.getSectCascader({ 'stor_id': value }).then(res => {
|
crudStructattr.getSectCascader({ 'stor_id': value }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.content
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
@change="crud.toQuery"
|
@change="crud.toQuery"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.ST_INV_OUT_TYPE"
|
v-for="item in dict.ST_INV_RAW_OUT_TYPE"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -237,7 +237,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['IO_BILL_STATUS', 'ST_INV_OUT_TYPE', 'product_area', 'ST_INV_CREATE'],
|
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_OUT_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
@@ -305,7 +305,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
bill_typeFormat(row, column) {
|
bill_typeFormat(row, column) {
|
||||||
return this.dict.label.ST_INV_OUT_TYPE[row.bill_type]
|
return this.dict.label.ST_INV_RAW_OUT_TYPE[row.bill_type]
|
||||||
},
|
},
|
||||||
toView(row) {
|
toView(row) {
|
||||||
this.mstrow = row
|
this.mstrow = row
|
||||||
|
|||||||
Reference in New Issue
Block a user