原材料检验
This commit is contained in:
parent
c6adab5443
commit
3dcf935e1c
@ -18,7 +18,6 @@ public class RawMaterialInspSaveReqVO {
|
|||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "检验单号,YL+年月日+两位流水号", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "检验单号,YL+年月日+两位流水号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotEmpty(message = "检验单号,YL+年月日+两位流水号不能为空")
|
|
||||||
private String checkCode;
|
private String checkCode;
|
||||||
|
|
||||||
@Schema(description = "供应商id", example = "15219")
|
@Schema(description = "供应商id", example = "15219")
|
||||||
@ -28,7 +27,6 @@ public class RawMaterialInspSaveReqVO {
|
|||||||
private String supplierSimName;
|
private String supplierSimName;
|
||||||
|
|
||||||
@Schema(description = "物料id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9776")
|
@Schema(description = "物料id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9776")
|
||||||
@NotNull(message = "物料id不能为空")
|
|
||||||
private Integer materialId;
|
private Integer materialId;
|
||||||
|
|
||||||
@Schema(description = "物料编码")
|
@Schema(description = "物料编码")
|
||||||
@ -53,7 +51,6 @@ public class RawMaterialInspSaveReqVO {
|
|||||||
private BigDecimal sampleQty;
|
private BigDecimal sampleQty;
|
||||||
|
|
||||||
@Schema(description = "检验日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "检验日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "检验日期不能为空")
|
|
||||||
private LocalDate checkDate;
|
private LocalDate checkDate;
|
||||||
|
|
||||||
@Schema(description = "检验结果(0 合格 1 不合格 2让步接收)")
|
@Schema(description = "检验结果(0 合格 1 不合格 2让步接收)")
|
||||||
|
|||||||
@ -87,4 +87,6 @@ public class InspPlanItemDO extends BaseDOWithoutLogic {
|
|||||||
private Integer tolNum;
|
private Integer tolNum;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String checkMethod;
|
private String checkMethod;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String formCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsp;
|
package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsp;
|
||||||
|
|
||||||
|
import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDOWithoutLogic;
|
||||||
import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsptotal.RawMaterialInspTotalDO;
|
import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsptotal.RawMaterialInspTotalDO;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -25,13 +26,13 @@ import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class RawMaterialInspDO extends BaseDO {
|
public class RawMaterialInspDO extends BaseDOWithoutLogic {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
@TableId(type = IdType.INPUT)
|
@TableId
|
||||||
private String id;
|
private Integer id;
|
||||||
/**
|
/**
|
||||||
* 检验单号,YL+年月日+两位流水号
|
* 检验单号,YL+年月日+两位流水号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinspdetail;
|
package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinspdetail;
|
||||||
|
|
||||||
|
import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDOWithoutLogic;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -20,7 +21,7 @@ import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class RawMaterialInspDetailDO extends BaseDO {
|
public class RawMaterialInspDetailDO extends BaseDOWithoutLogic {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsptotal;
|
package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsptotal;
|
||||||
|
|
||||||
|
import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDOWithoutLogic;
|
||||||
import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinspdetail.RawMaterialInspDetailDO;
|
import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinspdetail.RawMaterialInspDetailDO;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -21,7 +22,7 @@ import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class RawMaterialInspTotalDO extends BaseDO {
|
public class RawMaterialInspTotalDO extends BaseDOWithoutLogic {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
|
|||||||
@ -67,6 +67,7 @@ public interface InspPlanItemMapper extends BaseMapperX<InspPlanItemDO> {
|
|||||||
.select("p.test_Num as tolNum")
|
.select("p.test_Num as tolNum")
|
||||||
.select("c.item_value_type as itemValueType","c.item_content as itemContent")
|
.select("c.item_value_type as itemValueType","c.item_content as itemContent")
|
||||||
.select("c.test_num as testNum","c.float_num as floatNum","c.check_method as checkMethod")
|
.select("c.test_num as testNum","c.float_num as floatNum","c.check_method as checkMethod")
|
||||||
|
.select("p.form_code as formCode")
|
||||||
.leftJoin(CheckItemDO.class,"c",CheckItemDO::getId,InspPlanItemDO::getItemId)
|
.leftJoin(CheckItemDO.class,"c",CheckItemDO::getId,InspPlanItemDO::getItemId)
|
||||||
.leftJoin(InspPlanDO.class,"p",InspPlanDO::getId,InspPlanItemDO::getSchemeId)
|
.leftJoin(InspPlanDO.class,"p",InspPlanDO::getId,InspPlanItemDO::getSchemeId)
|
||||||
.leftJoin(MaterialDO.class,"m",MaterialDO::getSchemeId,InspPlanDO::getId)
|
.leftJoin(MaterialDO.class,"m",MaterialDO::getSchemeId,InspPlanDO::getId)
|
||||||
|
|||||||
@ -49,7 +49,7 @@ public interface RawMaterialInspTotalMapper extends BaseMapperX<RawMaterialInspT
|
|||||||
.orderByDesc(RawMaterialInspTotalDO::getId));
|
.orderByDesc(RawMaterialInspTotalDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<RawMaterialInspTotalDO> selectByRawMatInspId(String id){
|
default List<RawMaterialInspTotalDO> selectByRawMatInspId(Integer id){
|
||||||
MPJLambdaWrapperX<RawMaterialInspTotalDO> query = new MPJLambdaWrapperX<>();
|
MPJLambdaWrapperX<RawMaterialInspTotalDO> query = new MPJLambdaWrapperX<>();
|
||||||
query.selectAll(RawMaterialInspTotalDO.class)
|
query.selectAll(RawMaterialInspTotalDO.class)
|
||||||
.select("c.item_value_type as itemValueType","c.item_content as itemContent")
|
.select("c.item_value_type as itemValueType","c.item_content as itemContent")
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.ningxia.yunxi.chemmes.module.biz.service.rawmaterialinsp;
|
package com.ningxia.yunxi.chemmes.module.biz.service.rawmaterialinsp;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.ningxia.yunxi.chemmes.module.biz.controller.admin.rawmaterialinsp.vo.RawMaterialInspPageReqVO;
|
import com.ningxia.yunxi.chemmes.module.biz.controller.admin.rawmaterialinsp.vo.RawMaterialInspPageReqVO;
|
||||||
import com.ningxia.yunxi.chemmes.module.biz.controller.admin.rawmaterialinsp.vo.RawMaterialInspSaveReqVO;
|
import com.ningxia.yunxi.chemmes.module.biz.controller.admin.rawmaterialinsp.vo.RawMaterialInspSaveReqVO;
|
||||||
import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsp.RawMaterialInspDO;
|
import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsp.RawMaterialInspDO;
|
||||||
@ -8,10 +9,14 @@ import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsptotal.
|
|||||||
import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinsp.RawMaterialInspMapper;
|
import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinsp.RawMaterialInspMapper;
|
||||||
import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinspdetail.RawMaterialInspDetailMapper;
|
import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinspdetail.RawMaterialInspDetailMapper;
|
||||||
import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinsptotal.RawMaterialInspTotalMapper;
|
import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinsptotal.RawMaterialInspTotalMapper;
|
||||||
|
import com.ningxia.yunxi.chemmes.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
|
import com.ningxia.yunxi.chemmes.module.system.dal.mysql.user.AdminUserMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import static com.ningxia.yunxi.chemmes.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||||
import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*;
|
import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@ -39,6 +44,8 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
private RawMaterialInspTotalMapper rawMaterialInspTotalMapper;
|
private RawMaterialInspTotalMapper rawMaterialInspTotalMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private RawMaterialInspDetailMapper rawMaterialInspDetailMapper;
|
private RawMaterialInspDetailMapper rawMaterialInspDetailMapper;
|
||||||
|
@Resource
|
||||||
|
private AdminUserMapper adminUserMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -46,12 +53,16 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
public String createRawMaterialInsp(RawMaterialInspSaveReqVO createReqVO) {
|
public String createRawMaterialInsp(RawMaterialInspSaveReqVO createReqVO) {
|
||||||
// 生成检验单号
|
// 生成检验单号
|
||||||
String checkCode = generateCheckCode();
|
String checkCode = generateCheckCode();
|
||||||
|
// 设置检验人信息为当前登录用户
|
||||||
|
Long userId = getLoginUserId();
|
||||||
|
AdminUserDO adminUserDO = adminUserMapper.selectById(userId);
|
||||||
|
createReqVO.setCheckUserId(Integer.parseInt(String.valueOf(userId)));
|
||||||
|
createReqVO.setCheckUserName(adminUserDO.getNickname());
|
||||||
// 1. 插入主表 tqm_raw_material_insp
|
// 1. 插入主表 tqm_raw_material_insp
|
||||||
RawMaterialInspDO rawMaterialInsp = BeanUtils.toBean(createReqVO, RawMaterialInspDO.class);
|
RawMaterialInspDO rawMaterialInsp = BeanUtils.toBean(createReqVO, RawMaterialInspDO.class);
|
||||||
rawMaterialInsp.setCheckCode(checkCode);
|
rawMaterialInsp.setCheckCode(checkCode);
|
||||||
rawMaterialInspMapper.insert(rawMaterialInsp);
|
rawMaterialInspMapper.insert(rawMaterialInsp);
|
||||||
String rawMatInspId = rawMaterialInsp.getId();
|
Integer rawMatInspId = rawMaterialInsp.getId();
|
||||||
|
|
||||||
// 2. 循环插入汇总表 tqm_raw_material_insp_total(顺序号由后台生成)
|
// 2. 循环插入汇总表 tqm_raw_material_insp_total(顺序号由后台生成)
|
||||||
List<RawMaterialInspTotalDO> totalList = createReqVO.getRawMaterialInspTotalList();
|
List<RawMaterialInspTotalDO> totalList = createReqVO.getRawMaterialInspTotalList();
|
||||||
@ -61,7 +72,7 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
totalSeq++;
|
totalSeq++;
|
||||||
// 插入汇总表
|
// 插入汇总表
|
||||||
RawMaterialInspTotalDO total = RawMaterialInspTotalDO.builder()
|
RawMaterialInspTotalDO total = RawMaterialInspTotalDO.builder()
|
||||||
.rawMatInspId(rawMatInspId)
|
.rawMatInspId(String.valueOf(rawMatInspId))
|
||||||
.checkCode(checkCode)
|
.checkCode(checkCode)
|
||||||
.itemId(totalDO.getItemId())
|
.itemId(totalDO.getItemId())
|
||||||
.itemName(totalDO.getItemName())
|
.itemName(totalDO.getItemName())
|
||||||
@ -74,6 +85,7 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
.seqNo(totalSeq)
|
.seqNo(totalSeq)
|
||||||
.inspPlanId(totalDO.getInspPlanId())
|
.inspPlanId(totalDO.getInspPlanId())
|
||||||
.inspPlanItemId(totalDO.getInspPlanItemId())
|
.inspPlanItemId(totalDO.getInspPlanItemId())
|
||||||
|
.remark(totalDO.getRemark())
|
||||||
.build();
|
.build();
|
||||||
rawMaterialInspTotalMapper.insert(total);
|
rawMaterialInspTotalMapper.insert(total);
|
||||||
Integer totalId = total.getId();
|
Integer totalId = total.getId();
|
||||||
@ -83,15 +95,19 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
if (detailList != null && !detailList.isEmpty()) {
|
if (detailList != null && !detailList.isEmpty()) {
|
||||||
int detailSeq = 0;
|
int detailSeq = 0;
|
||||||
for (RawMaterialInspDetailDO detailDO : detailList) {
|
for (RawMaterialInspDetailDO detailDO : detailList) {
|
||||||
|
// 只有实测值有数据才插入
|
||||||
|
if (StrUtil.isEmpty(detailDO.getActValue())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
detailSeq++;
|
detailSeq++;
|
||||||
RawMaterialInspDetailDO detail = RawMaterialInspDetailDO.builder()
|
RawMaterialInspDetailDO detail = RawMaterialInspDetailDO.builder()
|
||||||
.rawMatInspId(Integer.parseInt(rawMatInspId))
|
.rawMatInspId(rawMatInspId)
|
||||||
.matInspTotalId(totalId)
|
.matInspTotalId(totalId)
|
||||||
.checkCode(checkCode)
|
.checkCode(checkCode)
|
||||||
.actValue(detailDO.getActValue())
|
.actValue(detailDO.getActValue())
|
||||||
.seqNo(detailSeq)
|
.seqNo(detailSeq)
|
||||||
.inspPlanId(detailDO.getInspPlanId())
|
.inspPlanId(totalDO.getInspPlanId())
|
||||||
.inspPlanItemId(detailDO.getInspPlanItemId())
|
.inspPlanItemId(totalDO.getInspPlanItemId())
|
||||||
.build();
|
.build();
|
||||||
rawMaterialInspDetailMapper.insert(detail);
|
rawMaterialInspDetailMapper.insert(detail);
|
||||||
}
|
}
|
||||||
@ -131,7 +147,11 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
validateRawMaterialInspExists(updateReqVO.getId());
|
validateRawMaterialInspExists(updateReqVO.getId());
|
||||||
String rawMatInspId = updateReqVO.getId();
|
String rawMatInspId = updateReqVO.getId();
|
||||||
String checkCode = updateReqVO.getCheckCode();
|
String checkCode = updateReqVO.getCheckCode();
|
||||||
|
// 设置检验人信息为当前登录用户
|
||||||
|
Long userId = getLoginUserId();
|
||||||
|
AdminUserDO adminUserDO = adminUserMapper.selectById(userId);
|
||||||
|
updateReqVO.setCheckUserId(Integer.parseInt(String.valueOf(userId)));
|
||||||
|
updateReqVO.setCheckUserName(adminUserDO.getNickname());
|
||||||
// 1. 更新主表 tqm_raw_material_insp
|
// 1. 更新主表 tqm_raw_material_insp
|
||||||
RawMaterialInspDO updateObj = BeanUtils.toBean(updateReqVO, RawMaterialInspDO.class);
|
RawMaterialInspDO updateObj = BeanUtils.toBean(updateReqVO, RawMaterialInspDO.class);
|
||||||
rawMaterialInspMapper.updateById(updateObj);
|
rawMaterialInspMapper.updateById(updateObj);
|
||||||
@ -160,6 +180,7 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
.seqNo(totalSeq)
|
.seqNo(totalSeq)
|
||||||
.inspPlanId(totalDO.getInspPlanId())
|
.inspPlanId(totalDO.getInspPlanId())
|
||||||
.inspPlanItemId(totalDO.getInspPlanItemId())
|
.inspPlanItemId(totalDO.getInspPlanItemId())
|
||||||
|
.remark(totalDO.getRemark())
|
||||||
.build();
|
.build();
|
||||||
rawMaterialInspTotalMapper.insert(total);
|
rawMaterialInspTotalMapper.insert(total);
|
||||||
Integer totalId = total.getId();
|
Integer totalId = total.getId();
|
||||||
@ -169,6 +190,10 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
if (detailList != null && !detailList.isEmpty()) {
|
if (detailList != null && !detailList.isEmpty()) {
|
||||||
int detailSeq = 0;
|
int detailSeq = 0;
|
||||||
for (RawMaterialInspDetailDO detailDO : detailList) {
|
for (RawMaterialInspDetailDO detailDO : detailList) {
|
||||||
|
// 只有实测值有数据才插入
|
||||||
|
if (StrUtil.isEmpty(detailDO.getActValue())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
detailSeq++;
|
detailSeq++;
|
||||||
RawMaterialInspDetailDO detail = RawMaterialInspDetailDO.builder()
|
RawMaterialInspDetailDO detail = RawMaterialInspDetailDO.builder()
|
||||||
.rawMatInspId(Integer.parseInt(rawMatInspId))
|
.rawMatInspId(Integer.parseInt(rawMatInspId))
|
||||||
@ -176,8 +201,8 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
.checkCode(checkCode)
|
.checkCode(checkCode)
|
||||||
.actValue(detailDO.getActValue())
|
.actValue(detailDO.getActValue())
|
||||||
.seqNo(detailSeq)
|
.seqNo(detailSeq)
|
||||||
.inspPlanId(detailDO.getInspPlanId())
|
.inspPlanId(totalDO.getInspPlanId())
|
||||||
.inspPlanItemId(detailDO.getInspPlanItemId())
|
.inspPlanItemId(totalDO.getInspPlanItemId())
|
||||||
.build();
|
.build();
|
||||||
rawMaterialInspDetailMapper.insert(detail);
|
rawMaterialInspDetailMapper.insert(detail);
|
||||||
}
|
}
|
||||||
@ -189,14 +214,24 @@ public class RawMaterialInspServiceImpl implements RawMaterialInspService {
|
|||||||
@Override
|
@Override
|
||||||
public void deleteRawMaterialInsp(String id) {
|
public void deleteRawMaterialInsp(String id) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateRawMaterialInspExists(id);
|
RawMaterialInspDO rawMaterialInsp = rawMaterialInspMapper.selectById(id);
|
||||||
// 删除
|
if (rawMaterialInsp == null) {
|
||||||
|
throw exception("该检验单不存在,请刷新界面!");
|
||||||
|
}
|
||||||
|
// 校验状态
|
||||||
|
if ("2".equals(rawMaterialInsp.getCheckStatus())) {
|
||||||
|
throw exception("该检验单已确认不允许删除,请刷新界面!");
|
||||||
|
}
|
||||||
|
// 删除子表数据
|
||||||
|
rawMaterialInspDetailMapper.deleteByRawMatInspId(id);
|
||||||
|
rawMaterialInspTotalMapper.deleteByRawMatInspId(id);
|
||||||
|
// 删除主表
|
||||||
rawMaterialInspMapper.deleteById(id);
|
rawMaterialInspMapper.deleteById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateRawMaterialInspExists(String id) {
|
private void validateRawMaterialInspExists(String id) {
|
||||||
if (rawMaterialInspMapper.selectById(id) == null) {
|
if (rawMaterialInspMapper.selectById(id) == null) {
|
||||||
throw exception("数据不存在");
|
throw exception("该检验单不存在,请刷新界面!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,28 +7,15 @@ export {}
|
|||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
__init__: typeof import('./../../tests/pages/__init__.py')['default']
|
|
||||||
'__init__.cpython314': typeof import('./../../tests/pages/__pycache__/__init__.cpython-314.pyc')['default']
|
|
||||||
'.gitignore': typeof import('./../../.pytest_cache/.gitignore')['default']
|
|
||||||
AddForm: typeof import('./../../screenshots/add-form.png')['default']
|
|
||||||
AddFormFilled: typeof import('./../../screenshots/add-form-filled.png')['default']
|
|
||||||
AfterSave: typeof import('./../../screenshots/after-save.png')['default']
|
|
||||||
AppLinkInput: typeof import('./../components/AppLinkInput/index.vue')['default']
|
AppLinkInput: typeof import('./../components/AppLinkInput/index.vue')['default']
|
||||||
AppLinkSelectDialog: typeof import('./../components/AppLinkInput/AppLinkSelectDialog.vue')['default']
|
AppLinkSelectDialog: typeof import('./../components/AppLinkInput/AppLinkSelectDialog.vue')['default']
|
||||||
Backtop: typeof import('./../components/Backtop/src/Backtop.vue')['default']
|
Backtop: typeof import('./../components/Backtop/src/Backtop.vue')['default']
|
||||||
Base: typeof import('./../../tests/pages/base.py')['default']
|
|
||||||
'Base.cpython314': typeof import('./../../tests/pages/__pycache__/base.cpython-314.pyc')['default']
|
|
||||||
CACHEDIR: typeof import('./../../.pytest_cache/CACHEDIR.TAG')['default']
|
|
||||||
CardTitle: typeof import('./../components/Card/src/CardTitle.vue')['default']
|
CardTitle: typeof import('./../components/Card/src/CardTitle.vue')['default']
|
||||||
ColorInput: typeof import('./../components/ColorInput/index.vue')['default']
|
ColorInput: typeof import('./../components/ColorInput/index.vue')['default']
|
||||||
ComponentContainer: typeof import('./../components/DiyEditor/components/ComponentContainer.vue')['default']
|
ComponentContainer: typeof import('./../components/DiyEditor/components/ComponentContainer.vue')['default']
|
||||||
ComponentContainerProperty: typeof import('./../components/DiyEditor/components/ComponentContainerProperty.vue')['default']
|
ComponentContainerProperty: typeof import('./../components/DiyEditor/components/ComponentContainerProperty.vue')['default']
|
||||||
ComponentLibrary: typeof import('./../components/DiyEditor/components/ComponentLibrary.vue')['default']
|
ComponentLibrary: typeof import('./../components/DiyEditor/components/ComponentLibrary.vue')['default']
|
||||||
Config: typeof import('./../../tests/config.json')['default']
|
|
||||||
ConfigGlobal: typeof import('./../components/ConfigGlobal/src/ConfigGlobal.vue')['default']
|
ConfigGlobal: typeof import('./../components/ConfigGlobal/src/ConfigGlobal.vue')['default']
|
||||||
Conftest: typeof import('./../../tests/conftest.py')['default']
|
|
||||||
'Conftest.cpython314Pytest9.0.3': typeof import('./../../tests/__pycache__/conftest.cpython-314-pytest-9.0.3.pyc')['default']
|
|
||||||
'Conftest.cpython314Pytest9.0.3.pyc': typeof import('./../../tests/__pycache__/conftest.cpython-314-pytest-9.0.3.pyc.38960')['default']
|
|
||||||
ContentDetailWrap: typeof import('./../components/ContentDetailWrap/src/ContentDetailWrap.vue')['default']
|
ContentDetailWrap: typeof import('./../components/ContentDetailWrap/src/ContentDetailWrap.vue')['default']
|
||||||
ContentWrap: typeof import('./../components/ContentWrap/src/ContentWrap.vue')['default']
|
ContentWrap: typeof import('./../components/ContentWrap/src/ContentWrap.vue')['default']
|
||||||
CopperModal: typeof import('./../components/Cropper/src/CopperModal.vue')['default']
|
CopperModal: typeof import('./../components/Cropper/src/CopperModal.vue')['default']
|
||||||
@ -45,13 +32,27 @@ declare module 'vue' {
|
|||||||
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
|
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
|
||||||
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
|
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
|
||||||
ElAlert: typeof import('element-plus/es')['ElAlert']
|
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||||
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
|
ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer']
|
||||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||||
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
|
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||||
ElCard: typeof import('element-plus/es')['ElCard']
|
ElCard: typeof import('element-plus/es')['ElCard']
|
||||||
|
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
||||||
|
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
||||||
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
|
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||||
|
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||||
|
ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition']
|
||||||
|
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||||
|
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
|
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||||
|
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||||
@ -67,35 +68,47 @@ declare module 'vue' {
|
|||||||
ElementTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/ElementTask.vue')['default']
|
ElementTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/ElementTask.vue')['default']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
|
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
|
ElImage: typeof import('element-plus/es')['ElImage']
|
||||||
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
ElLink: typeof import('element-plus/es')['ElLink']
|
ElLink: typeof import('element-plus/es')['ElLink']
|
||||||
|
ElMain: typeof import('element-plus/es')['ElMain']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
|
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
|
ElRate: typeof import('element-plus/es')['ElRate']
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
||||||
|
ElSlider: typeof import('element-plus/es')['ElSlider']
|
||||||
|
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
|
ElTableV2: typeof import('element-plus/es')['ElTableV2']
|
||||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
|
ElText: typeof import('element-plus/es')['ElText']
|
||||||
|
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||||
|
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||||
|
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
|
||||||
|
ElTimeSelect: typeof import('element-plus/es')['ElTimeSelect']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
|
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
||||||
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
Error: typeof import('./../components/Error/src/Error.vue')['default']
|
Error: typeof import('./../components/Error/src/Error.vue')['default']
|
||||||
ErrorScreenshot: typeof import('./../../error-screenshot.png')['default']
|
|
||||||
FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default']
|
FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default']
|
||||||
Form: typeof import('./../components/Form/src/Form.vue')['default']
|
Form: typeof import('./../components/Form/src/Form.vue')['default']
|
||||||
Form_components: typeof import('./../../tests/components/form_components.py')['default']
|
|
||||||
'Form_components.cpython314': typeof import('./../../tests/components/__pycache__/form_components.cpython-314.pyc')['default']
|
|
||||||
Highlight: typeof import('./../components/Highlight/src/Highlight.vue')['default']
|
Highlight: typeof import('./../components/Highlight/src/Highlight.vue')['default']
|
||||||
Icon: typeof import('./../components/Icon/src/Icon.vue')['default']
|
Icon: typeof import('./../components/Icon/src/Icon.vue')['default']
|
||||||
IconSelect: typeof import('./../components/Icon/src/IconSelect.vue')['default']
|
IconSelect: typeof import('./../components/Icon/src/IconSelect.vue')['default']
|
||||||
@ -104,36 +117,17 @@ declare module 'vue' {
|
|||||||
Infotip: typeof import('./../components/Infotip/src/Infotip.vue')['default']
|
Infotip: typeof import('./../components/Infotip/src/Infotip.vue')['default']
|
||||||
InputPassword: typeof import('./../components/InputPassword/src/InputPassword.vue')['default']
|
InputPassword: typeof import('./../components/InputPassword/src/InputPassword.vue')['default']
|
||||||
InputWithColor: typeof import('./../components/InputWithColor/index.vue')['default']
|
InputWithColor: typeof import('./../components/InputWithColor/index.vue')['default']
|
||||||
Lastfailed: typeof import('./../../.pytest_cache/v/cache/lastfailed')['default']
|
|
||||||
Login_page: typeof import('./../../tests/pages/login_page.py')['default']
|
|
||||||
'Login_page.cpython314': typeof import('./../../tests/pages/__pycache__/login_page.cpython-314.pyc')['default']
|
|
||||||
'Login_page.cpython314.pyc': typeof import('./../../tests/pages/__pycache__/login_page.cpython-314.pyc.2012673802768')['default']
|
|
||||||
LoginPage: typeof import('./../../login-page.png')['default']
|
|
||||||
MagicCubeEditor: typeof import('./../components/MagicCubeEditor/index.vue')['default']
|
MagicCubeEditor: typeof import('./../components/MagicCubeEditor/index.vue')['default']
|
||||||
MoneyInput: typeof import('./../views/biz/components/MoneyInput.vue')['default']
|
|
||||||
Nodeids: typeof import('./../../.pytest_cache/v/cache/nodeids')['default']
|
|
||||||
Order_test_data: typeof import('./../../tests/data/order_test_data.json')['default']
|
|
||||||
Pagination: typeof import('./../components/Pagination/index.vue')['default']
|
Pagination: typeof import('./../components/Pagination/index.vue')['default']
|
||||||
PlaywrightTest: typeof import('./../../tests/playwright-test.py')['default']
|
|
||||||
ProcessDesigner: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue')['default']
|
ProcessDesigner: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue')['default']
|
||||||
ProcessPalette: typeof import('./../components/bpmnProcessDesigner/package/palette/ProcessPalette.vue')['default']
|
ProcessPalette: typeof import('./../components/bpmnProcessDesigner/package/palette/ProcessPalette.vue')['default']
|
||||||
ProcessViewer: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessViewer.vue')['default']
|
ProcessViewer: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessViewer.vue')['default']
|
||||||
PropertiesPanel: typeof import('./../components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue')['default']
|
PropertiesPanel: typeof import('./../components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue')['default']
|
||||||
Prostorage: typeof import('./../api/biz/prostorage/index.ts')['default']
|
|
||||||
ProStorageInventorySelectDialog: typeof import('./../views/biz/prostorageinventory/ProStorageInventorySelectDialog.vue')['default']
|
|
||||||
Prostoragelog: typeof import('./../api/biz/prostoragelog/index.ts')['default']
|
|
||||||
Prostoragemat: typeof import('./../api/biz/prostoragemat/index.ts')['default']
|
|
||||||
Pytest: typeof import('./../../pytest.ini')['default']
|
|
||||||
Qrcode: typeof import('./../components/Qrcode/src/Qrcode.vue')['default']
|
Qrcode: typeof import('./../components/Qrcode/src/Qrcode.vue')['default']
|
||||||
README: typeof import('./../../.pytest_cache/README.md')['default']
|
|
||||||
ReceiveTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue')['default']
|
ReceiveTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue')['default']
|
||||||
RequirementsTest: typeof import('./../../requirements-test.txt')['default']
|
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterSearch: typeof import('./../components/RouterSearch/index.vue')['default']
|
RouterSearch: typeof import('./../components/RouterSearch/index.vue')['default']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
Sale_order_page: typeof import('./../../tests/pages/sale_order_page.py')['default']
|
|
||||||
'Sale_order_page.cpython314': typeof import('./../../tests/pages/__pycache__/sale_order_page.cpython-314.pyc')['default']
|
|
||||||
'Sale_order_page.cpython314.pyc': typeof import('./../../tests/pages/__pycache__/sale_order_page.cpython-314.pyc.1680447423472')['default']
|
|
||||||
ScriptTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue')['default']
|
ScriptTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue')['default']
|
||||||
Search: typeof import('./../components/Search/src/Search.vue')['default']
|
Search: typeof import('./../components/Search/src/Search.vue')['default']
|
||||||
ShortcutDateRangePicker: typeof import('./../components/ShortcutDateRangePicker/index.vue')['default']
|
ShortcutDateRangePicker: typeof import('./../components/ShortcutDateRangePicker/index.vue')['default']
|
||||||
@ -141,48 +135,6 @@ declare module 'vue' {
|
|||||||
Sticky: typeof import('./../components/Sticky/src/Sticky.vue')['default']
|
Sticky: typeof import('./../components/Sticky/src/Sticky.vue')['default']
|
||||||
SummaryCard: typeof import('./../components/SummaryCard/index.vue')['default']
|
SummaryCard: typeof import('./../components/SummaryCard/index.vue')['default']
|
||||||
Table: typeof import('./../components/Table/src/Table.vue')['default']
|
Table: typeof import('./../components/Table/src/Table.vue')['default']
|
||||||
Test_sale_order: typeof import('./../../tests/test_sale_order.py')['default']
|
|
||||||
'Test_sale_order.cpython314Pytest9.0.3': typeof import('./../../tests/__pycache__/test_sale_order.cpython-314-pytest-9.0.3.pyc')['default']
|
|
||||||
'Test_sale_order.cpython314Pytest9.0.3.pyc': typeof import('./../../tests/__pycache__/test_sale_order.cpython-314-pytest-9.0.3.pyc.16136')['default']
|
|
||||||
TestAfterLogin: typeof import('./../../test-after-login.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_basic_150308': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_basic_150308.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_basic_150541': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_basic_150541.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_cancel_150346': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_cancel_150346.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_cancel_150618': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_cancel_150618.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_cancel_151150': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_cancel_151150.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_cancel_151240': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_cancel_151240.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_dialog_opens_151141': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_dialog_opens_151141.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_dialog_opens_151231': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_dialog_opens_151231.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_partial_fill_154225': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_partial_fill_154225.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_partial_fill_154326': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_partial_fill_154326.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_151545': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_151545.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_152057': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_152057.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_152324': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_152324.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_152412': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_152412.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153127': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153127.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153158': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153158.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153341': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153341.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153433': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153433.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153706': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153706.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153802': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_success_153802.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_validation_154052': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_validation_154052.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_validation_154215': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_validation_154215.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_validation_154314': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_validation_154314.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_with_all_fields_150342': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_with_all_fields_150342.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_with_all_fields_150615': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderCRUD_test_add_order_with_all_fields_150615.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderDataDriven_test_add_order_parametrized[test_case0]_150350': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderDataDriven_test_add_order_parametrized[test_case0]_150350.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderDataDriven_test_add_order_parametrized[test_case0]_150622': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderDataDriven_test_add_order_parametrized[test_case0]_150622.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderDataDriven_test_add_order_parametrized[test_case1]_150353': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderDataDriven_test_add_order_parametrized[test_case1]_150353.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderDataDriven_test_add_order_parametrized[test_case1]_150625': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderDataDriven_test_add_order_parametrized[test_case1]_150625.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderLogin_test_login_success_145839': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderLogin_test_login_success_145839.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderLogin_test_login_success_145911': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderLogin_test_login_success_145911.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderSearch_test_reset_search_150305': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderSearch_test_reset_search_150305.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderSearch_test_reset_search_150538': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderSearch_test_reset_search_150538.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderSearch_test_search_by_date_range_150232': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderSearch_test_search_by_date_range_150232.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderSearch_test_search_by_date_range_150505': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderSearch_test_search_by_date_range_150505.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderSearch_test_search_by_order_no_150159': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderSearch_test_search_by_order_no_150159.png')['default']
|
|
||||||
'Tests_test_sale_order.py_TestSaleOrderSearch_test_search_by_order_no_150432': typeof import('./../../tests/screenshots/tests_test_sale_order.py_TestSaleOrderSearch_test_search_by_order_no_150432.png')['default']
|
|
||||||
TestScreenshot: typeof import('./../../test-screenshot.png')['default']
|
|
||||||
Tooltip: typeof import('./../components/Tooltip/src/Tooltip.vue')['default']
|
Tooltip: typeof import('./../components/Tooltip/src/Tooltip.vue')['default']
|
||||||
UploadFile: typeof import('./../components/UploadFile/src/UploadFile.vue')['default']
|
UploadFile: typeof import('./../components/UploadFile/src/UploadFile.vue')['default']
|
||||||
UploadFileBatch: typeof import('./../components/UploadFile/src/UploadFileBatch.vue')['default']
|
UploadFileBatch: typeof import('./../components/UploadFile/src/UploadFileBatch.vue')['default']
|
||||||
@ -194,7 +146,6 @@ declare module 'vue' {
|
|||||||
VerifyPoints: typeof import('./../components/Verifition/src/Verify/VerifyPoints.vue')['default']
|
VerifyPoints: typeof import('./../components/Verifition/src/Verify/VerifyPoints.vue')['default']
|
||||||
VerifySlide: typeof import('./../components/Verifition/src/Verify/VerifySlide.vue')['default']
|
VerifySlide: typeof import('./../components/Verifition/src/Verify/VerifySlide.vue')['default']
|
||||||
VerticalButtonGroup: typeof import('./../components/VerticalButtonGroup/index.vue')['default']
|
VerticalButtonGroup: typeof import('./../components/VerticalButtonGroup/index.vue')['default']
|
||||||
'Workspace.xml': typeof import('./../../.idea/workspace.xml.tmp')['default']
|
|
||||||
XButton: typeof import('./../components/XButton/src/XButton.vue')['default']
|
XButton: typeof import('./../components/XButton/src/XButton.vue')['default']
|
||||||
XTextButton: typeof import('./../components/XButton/src/XTextButton.vue')['default']
|
XTextButton: typeof import('./../components/XButton/src/XTextButton.vue')['default']
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ export {}
|
|||||||
declare global {
|
declare global {
|
||||||
const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE']
|
const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE']
|
||||||
const EffectScope: typeof import('vue')['EffectScope']
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
|
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
||||||
|
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
|
||||||
const computed: typeof import('vue')['computed']
|
const computed: typeof import('vue')['computed']
|
||||||
const createApp: typeof import('vue')['createApp']
|
const createApp: typeof import('vue')['createApp']
|
||||||
const customRef: typeof import('vue')['customRef']
|
const customRef: typeof import('vue')['customRef']
|
||||||
|
|||||||
@ -251,6 +251,13 @@ export enum DICT_TYPE {
|
|||||||
KEEP_TYPE='keep_type', // 保管类型
|
KEEP_TYPE='keep_type', // 保管类型
|
||||||
KEEP_MARK='keep_mark', // 保管标识
|
KEEP_MARK='keep_mark', // 保管标识
|
||||||
PLAN_STATUS='plan_status', // 计划状态
|
PLAN_STATUS='plan_status', // 计划状态
|
||||||
|
CHECK_STATUS='check_status', // 原材料单据状态
|
||||||
|
CHECK_RESULT='check_result', // 原材料检验结果
|
||||||
|
BILL_TYPE='bill_type', // 采购订单单据类型
|
||||||
|
STOCK_OUT_TYPE='stock_out_type', // 出库类型
|
||||||
|
STOCK_OUT_STATUS='stock_out_status', // 出库状态
|
||||||
|
DELIVERY_METHOD='delivery_method', // 配送方式
|
||||||
|
BILL_STATUS='bill_status', // 单据状态
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -101,6 +101,7 @@ const emit = defineEmits(['confirm'])
|
|||||||
// 打开弹窗,支持传入已选中的物料进行回显
|
// 打开弹窗,支持传入已选中的物料进行回显
|
||||||
const open = (selected?: MaterialApi.MaterialVO) => {
|
const open = (selected?: MaterialApi.MaterialVO) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
console.log(selected)
|
||||||
selectedRow.value = selected || null
|
selectedRow.value = selected || null
|
||||||
// 清空所有查询条件
|
// 清空所有查询条件
|
||||||
queryParams.matCode = undefined
|
queryParams.matCode = undefined
|
||||||
|
|||||||
@ -233,7 +233,7 @@
|
|||||||
<div style="display: flex; justify-content: center; gap: 16px; margin-top: 24px;">
|
<div style="display: flex; justify-content: center; gap: 16px; margin-top: 24px;">
|
||||||
<el-button type="primary" @click="handleSave" :loading="formLoading">保存</el-button>
|
<el-button type="primary" @click="handleSave" :loading="formLoading">保存</el-button>
|
||||||
<el-button type="primary" @click="handleIssue" :loading="formLoading">下发</el-button>
|
<el-button type="primary" @click="handleIssue" :loading="formLoading">下发</el-button>
|
||||||
<el-button @click="router.push({ name: 'Plan', query: { refresh: '1' } })">取消</el-button>
|
<el-button @click="goBack()">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@ -252,6 +252,7 @@ import {DICT_TYPE, getStrDictOptions} from '@/utils/dict'
|
|||||||
import MaterialSelectDialog from './MaterialSelectDialog.vue'
|
import MaterialSelectDialog from './MaterialSelectDialog.vue'
|
||||||
import ProLineSelectDialog from './ProLineSelectDialog.vue'
|
import ProLineSelectDialog from './ProLineSelectDialog.vue'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
|
import {useTagsViewStore} from "@/store/modules/tagsView";
|
||||||
|
|
||||||
|
|
||||||
const {t} = useI18n()
|
const {t} = useI18n()
|
||||||
@ -305,8 +306,8 @@ const openMaterialDialog = () => {
|
|||||||
if (formData.value.materialId) {
|
if (formData.value.materialId) {
|
||||||
materialDialogRef.value?.open({
|
materialDialogRef.value?.open({
|
||||||
id: formData.value.materialId,
|
id: formData.value.materialId,
|
||||||
materialCode: formData.value.matCode,
|
matCode: formData.value.materialCode,
|
||||||
materialName: formData.value.matName,
|
matName: formData.value.materialName,
|
||||||
spec: formData.value.spec,
|
spec: formData.value.spec,
|
||||||
unit: formData.value.unit
|
unit: formData.value.unit
|
||||||
})
|
})
|
||||||
@ -478,7 +479,7 @@ const doSave = async (successMsg: string) => {
|
|||||||
}
|
}
|
||||||
message.success(successMsg)
|
message.success(successMsg)
|
||||||
// 返回列表页
|
// 返回列表页
|
||||||
router.push({ name: 'Plan', query: { refresh: '1' } })
|
await goBack()
|
||||||
} catch {
|
} catch {
|
||||||
// validate 校验失败时会 reject,Element Plus 会自动显示红色提示,
|
// validate 校验失败时会 reject,Element Plus 会自动显示红色提示,
|
||||||
// API 异常已被 catch 捕获,此处无需额外处理
|
// API 异常已被 catch 捕获,此处无需额外处理
|
||||||
@ -486,7 +487,15 @@ const doSave = async (successMsg: string) => {
|
|||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 返回上一级(列表页),兼容动态路由未加载的情况
|
||||||
|
const goBack = async () => {
|
||||||
|
// 关闭当前页面页签,然后返回生产计划管理页面
|
||||||
|
const currentRoute = router.currentRoute.value
|
||||||
|
const tagsViewStore = useTagsViewStore()
|
||||||
|
tagsViewStore.delView(currentRoute)
|
||||||
|
sessionStorage.setItem('NEED_REFRESH_LIST', 'true')
|
||||||
|
router.replace({ name: 'Plan' })
|
||||||
|
}
|
||||||
// 重置表单
|
// 重置表单
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
|
|||||||
@ -108,7 +108,11 @@
|
|||||||
label="产品名称" align="center" prop="materialName" fixed="left"
|
label="产品名称" align="center" prop="materialName" fixed="left"
|
||||||
width="180px"/>
|
width="180px"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="spec" width="150px"/>
|
<el-table-column label="规格型号" align="center" prop="spec" width="150px"/>
|
||||||
<el-table-column label="单位" align="center" prop="unit" width="100px"/>
|
<el-table-column label="单位" align="center" prop="unit" width="100px">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.MAT_UNIT" :value="scope.row.unit"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="计划数量" align="center" prop="planQty" width="100px"/>
|
<el-table-column label="计划数量" align="center" prop="planQty" width="100px"/>
|
||||||
<el-table-column label="完成数量" align="center" prop="completeQty" width="100px"/>
|
<el-table-column label="完成数量" align="center" prop="completeQty" width="100px"/>
|
||||||
<el-table-column label="入库数量" align="center" prop="storeInQty" width="100px"/>
|
<el-table-column label="入库数量" align="center" prop="storeInQty" width="100px"/>
|
||||||
@ -199,9 +203,9 @@
|
|||||||
:formatter="dateFormatter2"/>
|
:formatter="dateFormatter2"/>
|
||||||
<el-table-column prop="proEndDate" label="完工日期" align="center"
|
<el-table-column prop="proEndDate" label="完工日期" align="center"
|
||||||
:formatter="dateFormatter2"/>
|
:formatter="dateFormatter2"/>
|
||||||
<el-table-column label="计划状态" align="center" prop="planStatus">
|
<el-table-column label="计划状态" align="center" prop="proStatus">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.PLAN_STATUS" :value="scope.row.planStatus"/>
|
<dict-tag :type="DICT_TYPE.PLAN_STATUS" :value="scope.row.proStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -374,6 +378,8 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const openForm = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
|
sessionStorage.setItem('NEED_REFRESH_LIST', 'true')
|
||||||
|
|
||||||
router.push({
|
router.push({
|
||||||
name: 'PlanForm',
|
name: 'PlanForm',
|
||||||
query: {
|
query: {
|
||||||
@ -398,23 +404,18 @@ const handleDelete = async (id: number) => {
|
|||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** 从保存/下发/取消返回时刷新数据 */
|
|
||||||
const doRefresh = async () => {
|
|
||||||
if (route.query.refresh === '1') {
|
|
||||||
await getList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
// 加载规格型号下拉数据
|
|
||||||
|
/** 初始化与缓存激活 **/
|
||||||
|
onActivated(async () => {
|
||||||
specList.value = await MaterialApi.getSpecDropdown({})
|
specList.value = await MaterialApi.getSpecDropdown({})
|
||||||
doRefresh()
|
|
||||||
})
|
|
||||||
|
|
||||||
// keep-alive 激活时刷新(从 PlanForm 返回)
|
// 只有在从表单页面返回时才自动查询
|
||||||
onActivated(() => {
|
if (sessionStorage.getItem('NEED_REFRESH_LIST') === 'true') {
|
||||||
if (route.query.refresh === '1') {
|
sessionStorage.removeItem('NEED_REFRESH_LIST')
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -99,6 +99,8 @@ const open = (selected?: MaterialApi.MaterialVO) => {
|
|||||||
selectedRow.value = selected || null
|
selectedRow.value = selected || null
|
||||||
queryParams.keyword=undefined,
|
queryParams.keyword=undefined,
|
||||||
queryParams.pageNo=1
|
queryParams.pageNo=1
|
||||||
|
list.value=[]
|
||||||
|
total.value=0
|
||||||
// resetQuery()
|
// resetQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
<el-table-column label="采购单号" prop="purOrdNo" align="center" min-width="120" />
|
<el-table-column label="采购单号" prop="purOrdNo" align="center" min-width="150" />
|
||||||
<el-table-column label="单据类型" prop="billType" align="center" width="120" >
|
<el-table-column label="单据类型" prop="billType" align="center" width="120" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.BILL_TYPE" :value="scope.row.billType"/>
|
<dict-tag :type="DICT_TYPE.BILL_TYPE" :value="scope.row.billType"/>
|
||||||
@ -104,7 +104,8 @@ const open = (supplierSimName) => {
|
|||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
queryParams.supplierName = supplierSimName
|
queryParams.supplierName = supplierSimName
|
||||||
queryParams.purOrdNo = undefined
|
queryParams.purOrdNo = undefined
|
||||||
|
list.value=[]
|
||||||
|
total.value=0
|
||||||
// resetQuery()
|
// resetQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
|
:disabled="formType === 'details'"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- 单据信息 -->
|
<!-- 单据信息 -->
|
||||||
@ -35,7 +36,7 @@
|
|||||||
<el-form-item label="原料名称" prop="materialId" >
|
<el-form-item label="原料名称" prop="materialId" >
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.matName"
|
v-model="formData.matName"
|
||||||
placeholder="请选择产品"
|
placeholder="请选择原料名称"
|
||||||
class="!w-full"
|
class="!w-full"
|
||||||
clearable
|
clearable
|
||||||
@click="openMaterialDialog"
|
@click="openMaterialDialog"
|
||||||
@ -187,13 +188,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-table :data="formData.rawMaterialInspTotalList" border style="width: 100%" row-key="id">
|
<el-table :data="formData.rawMaterialInspTotalList" border style="width: 100%" row-key="id" :row-class-name="getRowClassName">
|
||||||
<el-table-column type="expand" width="50" align="center">
|
<el-table-column type="expand" width="50" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="padding: 10px 20px;">
|
<div style="padding: 10px 20px;">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="4">
|
||||||
<el-col v-for="item in getExtraDetails(scope.row)" :key="item.index" :span="4" style="margin-bottom: 10px;">
|
<el-col v-for="item in getExtraDetails(scope.row)" :key="item.index" :span="3" style="margin-bottom: 8px;">
|
||||||
<div style="text-align: center; margin-bottom: 5px;">实测值{{ item.index }}</div>
|
<div style="text-align: center; margin-bottom: 4px; font-size: 12px;">实测值{{ item.index }}</div>
|
||||||
<!-- 数字类型 -->
|
<!-- 数字类型 -->
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="scope.row.itemValueType === 'I'"
|
v-if="scope.row.itemValueType === 'I'"
|
||||||
@ -202,7 +203,9 @@
|
|||||||
:controls="false"
|
:controls="false"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
class="!w-full"
|
class="!w-full"
|
||||||
|
clearable
|
||||||
@change="calcAverage(scope.row); autoJudge(scope.row)"
|
@change="calcAverage(scope.row); autoJudge(scope.row)"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<!-- 文本类型:有绑定值则下拉,无则手动录入 -->
|
<!-- 文本类型:有绑定值则下拉,无则手动录入 -->
|
||||||
<el-select
|
<el-select
|
||||||
@ -225,6 +228,7 @@
|
|||||||
v-model="item.item.actValue"
|
v-model="item.item.actValue"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
class="!w-full"
|
class="!w-full"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -238,20 +242,21 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="index in 5"
|
v-for="index in 5"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="'实测值' + index"
|
label="实测值"
|
||||||
align="center"
|
align="center"
|
||||||
width="120"
|
width="120"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="index <= scope.row.testNum">
|
<template v-if="index <= scope.row.testNum && scope.row.rawMaterialInspDetailList && scope.row.rawMaterialInspDetailList[index - 1]">
|
||||||
<!-- 数字类型 -->
|
<!-- 数字类型 -->
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="scope.row.itemValueType === 'I'"
|
v-if="scope.row.itemValueType === 'I'"
|
||||||
v-model="scope.row.rawMaterialInspDetailList[index - 1].actValue"
|
v-model.number="scope.row.rawMaterialInspDetailList[index - 1].actValue"
|
||||||
:precision="scope.row.floatNum ?? 2"
|
:precision="scope.row.floatNum ?? 2"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
class="!w-full"
|
class="!w-full"
|
||||||
|
clearable
|
||||||
@change="calcAverage(scope.row); autoJudge(scope.row)"
|
@change="calcAverage(scope.row); autoJudge(scope.row)"
|
||||||
/>
|
/>
|
||||||
<!-- 文本类型:有绑定值则下拉 -->
|
<!-- 文本类型:有绑定值则下拉 -->
|
||||||
@ -276,13 +281,14 @@
|
|||||||
v-model="scope.row.rawMaterialInspDetailList[index - 1].actValue"
|
v-model="scope.row.rawMaterialInspDetailList[index - 1].actValue"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
class="!w-full"
|
class="!w-full"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<span v-else></span>
|
<span v-else></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 平均值:数字类型自动计算(只读),文本类型手动录入 -->
|
<!-- 平均值:数字类型自动计算(只读),文本类型手动录入 -->
|
||||||
<el-table-column label="平均值" align="center">
|
<el-table-column label="平均值" align="center" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input
|
<el-input
|
||||||
v-if="scope.row.itemValueType === 'T'"
|
v-if="scope.row.itemValueType === 'T'"
|
||||||
@ -302,7 +308,7 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
@change="handleSingleJudgmentChange(scope.row)"
|
@change="handleSingleJudgmentChange()"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getCheckResultOptions()"
|
v-for="dict in getCheckResultOptions()"
|
||||||
@ -314,23 +320,23 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="标准值" prop="standardValue" align="center">
|
<el-table-column label="标准值" prop="standardValue" align="center" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.standardValue" placeholder="请输入" clearable/>
|
<el-input v-model="scope.row.standardValue" placeholder="请输入" clearable/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上限值" prop="upperLimit" align="center">
|
<el-table-column label="上限值" prop="upperLimit" align="center" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.upperLimit" placeholder="请输入" clearable/>
|
<el-input v-model="scope.row.upperLimit" placeholder="请输入" clearable/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="下限值" prop="lowerLimit" align="center">
|
<el-table-column label="下限值" prop="lowerLimit" align="center" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.lowerLimit" placeholder="请输入" clearable/>
|
<el-input v-model="scope.row.lowerLimit" placeholder="请输入" clearable/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="备注" prop="remark" align="center">
|
<el-table-column label="备注" prop="remark" align="center" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.remark" placeholder="请输入" clearable/>
|
<el-input v-model="scope.row.remark" placeholder="请输入" clearable/>
|
||||||
</template>
|
</template>
|
||||||
@ -342,13 +348,15 @@
|
|||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</el-form>
|
||||||
<!-- 底部按钮 -->
|
<!-- 底部按钮 -->
|
||||||
<div style="display: flex; justify-content: center; gap: 16px; margin-top: 24px;">
|
<div style="display: flex; justify-content: center; gap: 16px; margin-top: 24px;">
|
||||||
|
<template v-if="formType !== 'details'">
|
||||||
<el-button type="primary" @click="handleSave" :loading="formLoading">保存</el-button>
|
<el-button type="primary" @click="handleSave" :loading="formLoading">保存</el-button>
|
||||||
<el-button type="primary" @click="handleIssue" :loading="formLoading">确认</el-button>
|
<el-button type="primary" @click="handleIssue" :loading="formLoading">确认</el-button>
|
||||||
|
</template>
|
||||||
<el-button @click="goBack()">取消</el-button>
|
<el-button @click="goBack()">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<MaterialSelectDialog ref="materialDialogRef" @confirm="handleMaterialConfirm"/>
|
<MaterialSelectDialog ref="materialDialogRef" @confirm="handleMaterialConfirm"/>
|
||||||
@ -359,10 +367,12 @@
|
|||||||
import * as RawMaterialInspApi from '@/api/biz/rawmaterialinsp'
|
import * as RawMaterialInspApi from '@/api/biz/rawmaterialinsp'
|
||||||
import * as InspplanitemApi from '@/api/biz/inspplanitem'
|
import * as InspplanitemApi from '@/api/biz/inspplanitem'
|
||||||
import * as SupplierApi from '@/api/biz/supplier'
|
import * as SupplierApi from '@/api/biz/supplier'
|
||||||
import {nextTick, onActivated, watch} from 'vue'
|
import {nextTick, watch} from 'vue'
|
||||||
import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
||||||
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||||
import MaterialSelectDialog from "./MaterialSelectDialog.vue";
|
import MaterialSelectDialog from "./MaterialSelectDialog.vue";
|
||||||
import PurchaseOrderSelectDialog from "./PurchaseOrderSelectDialog.vue";
|
import PurchaseOrderSelectDialog from "./PurchaseOrderSelectDialog.vue";
|
||||||
|
import dayjs from "dayjs";
|
||||||
const {query} = useRoute()
|
const {query} = useRoute()
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
@ -398,7 +408,7 @@ const formData = ref<Partial<RawMaterialInspApi.RawMaterialInspVO> & { supplierN
|
|||||||
checkUserId: undefined,
|
checkUserId: undefined,
|
||||||
checkExUserId: undefined,
|
checkExUserId: undefined,
|
||||||
checkExDate: undefined,
|
checkExDate: undefined,
|
||||||
checkStatus: '0',
|
checkStatus: '1',
|
||||||
checkRemark: undefined,
|
checkRemark: undefined,
|
||||||
strness: undefined,
|
strness: undefined,
|
||||||
inmatType: undefined,
|
inmatType: undefined,
|
||||||
@ -416,6 +426,28 @@ watch(dialogVisible, (val) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 监听检测值变化,自动计算平均值和判定(兼容 clearable 和删除操作)
|
||||||
|
watch(
|
||||||
|
() => formData.value.rawMaterialInspTotalList,
|
||||||
|
(list) => {
|
||||||
|
if (!list || list.length === 0) return
|
||||||
|
list.forEach((item: any) => {
|
||||||
|
if (item.itemValueType === 'I') {
|
||||||
|
// 只在有实际输入值时触发计算
|
||||||
|
const hasValue = (item.rawMaterialInspDetailList || []).some(
|
||||||
|
(d: any) => d.actValue != null && d.actValue !== ''
|
||||||
|
)
|
||||||
|
if (hasValue || item.actValue != null) {
|
||||||
|
calcAverage(item)
|
||||||
|
autoJudge(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
updateOverallCheckResult()
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
)
|
||||||
|
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
supplierId: [{ required: true, message: '供应商不能为空', trigger: 'chang' }],
|
supplierId: [{ required: true, message: '供应商不能为空', trigger: 'chang' }],
|
||||||
materialId: [{ required: true, message: '原料名称不能为空', trigger: 'chang' }],
|
materialId: [{ required: true, message: '原料名称不能为空', trigger: 'chang' }],
|
||||||
@ -424,28 +456,42 @@ const formRules = reactive({
|
|||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
// const open = async (type: string, id?: number) => {
|
||||||
dialogVisible.value = true
|
// dialogVisible.value = true
|
||||||
dialogTitle.value = t('action.' + type)
|
// dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
// formType.value = type
|
||||||
resetForm()
|
// resetForm()
|
||||||
supperList.value= await SupplierApi.dropdown(['1', '2'])
|
// supperList.value= await SupplierApi.dropdown(['1', '2'])
|
||||||
// 修改时,设置数据
|
// // 修改时,设置数据
|
||||||
if (id) {
|
// if (id) {
|
||||||
formLoading.value = true
|
// formLoading.value = true
|
||||||
try {
|
// try {
|
||||||
formData.value = await RawMaterialInspApi.getRawMaterialInsp(id)
|
// formData.value = await RawMaterialInspApi.getRawMaterialInsp(id)
|
||||||
} finally {
|
// // 确保 rawMaterialInspDetailList 已初始化
|
||||||
formLoading.value = false
|
// const totalList = formData.value.rawMaterialInspTotalList || []
|
||||||
}
|
// totalList.forEach((item: any) => {
|
||||||
}
|
// if (!item.rawMaterialInspDetailList) {
|
||||||
}
|
// item.rawMaterialInspDetailList = []
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
// }
|
||||||
|
// const num = item.testNum || 0
|
||||||
|
// for (let i = item.rawMaterialInspDetailList.length; i < num; i++) {
|
||||||
|
// item.rawMaterialInspDetailList.push({ actValue: undefined })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// } finally {
|
||||||
|
// formLoading.value = false
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
// 获取超出5个的实测值数量(用于展开行)
|
|
||||||
const getExtraTestNum = (testNum: number) => {
|
// 行 class 名称,用于隐藏无需展开行的箭头
|
||||||
const extra = testNum - 5
|
const getRowClassName = ({ row }: { row: any }) => {
|
||||||
return extra > 0 ? extra : 0
|
if (!row.testNum || row.testNum <= 5) {
|
||||||
|
return 'hl-row-no-expand'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取展开行中所有实测值的数据(从1开始)
|
// 获取展开行中所有实测值的数据(从1开始)
|
||||||
@ -462,48 +508,55 @@ const getItemContentOptions = (itemContent?: string) => {
|
|||||||
|
|
||||||
// 获取检验结果字典选项,过滤掉值等于3的
|
// 获取检验结果字典选项,过滤掉值等于3的
|
||||||
const getCheckResultOptions = () => {
|
const getCheckResultOptions = () => {
|
||||||
return getStrDictOptions(DICT_TYPE.CHECK_RESULT).filter(d => d.value != '3')
|
return getStrDictOptions(DICT_TYPE.CHECK_RESULT).filter(d => d.value != '2')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 计算平均值(数字类型)
|
// 计算平均值(数字类型)
|
||||||
const calcAverage = (row: any) => {
|
const calcAverage = (row: any) => {
|
||||||
if (row.itemValueType !== 'I') return
|
if (row.itemValueType !== 'I') return
|
||||||
const values = (row.rawMaterialInspDetailList || [])
|
const values = (row.rawMaterialInspDetailList || [])
|
||||||
|
.filter((d: any) => d.actValue != null && d.actValue !== '')
|
||||||
.map((d: any) => Number(d.actValue))
|
.map((d: any) => Number(d.actValue))
|
||||||
.filter((v: number) => !isNaN(v))
|
.filter((v: number) => !isNaN(v))
|
||||||
if (values.length === 0) {
|
if (values.length === 0) {
|
||||||
|
// 没有检测值时清空平均值并继续执行 autoJudge 清空单项判定
|
||||||
row.actValue = undefined
|
row.actValue = undefined
|
||||||
|
autoJudge(row)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const sum = values.reduce((a: number, b: number) => a + b, 0)
|
const sum = values.reduce((a: number, b: number) => a + b, 0)
|
||||||
const avg = sum / values.length
|
const avg = sum / values.length
|
||||||
const floatNum = row.floatNum ?? 2
|
const floatNum = row.floatNum ?? 2
|
||||||
row.actValue = Number(avg.toFixed(floatNum))
|
row.actValue = avg.toFixed(floatNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自动判定(数字类型)
|
// 自动判定(数字类型)
|
||||||
const autoJudge = (row: any) => {
|
const autoJudge = (row: any) => {
|
||||||
if (row.itemValueType !== 'I' || row.actValue == null) return
|
if (row.itemValueType !== 'I') return
|
||||||
|
const values = (row.rawMaterialInspDetailList || [])
|
||||||
|
.filter((d: any) => d.actValue != null && d.actValue !== '')
|
||||||
|
.map((d: any) => Number(d.actValue))
|
||||||
|
.filter((v: number) => !isNaN(v))
|
||||||
|
// 没有检测值时清空单项判定
|
||||||
|
if (values.length === 0 || row.actValue == null) {
|
||||||
|
row.checkResult = undefined
|
||||||
|
updateOverallCheckResult()
|
||||||
|
return
|
||||||
|
}
|
||||||
const val = Number(row.actValue)
|
const val = Number(row.actValue)
|
||||||
const upper = row.upperLimit != null ? Number(row.upperLimit) : undefined
|
const upper = row.upperLimit != null ? Number(row.upperLimit) : undefined
|
||||||
const lower = row.lowerLimit != null ? Number(row.lowerLimit) : undefined
|
const lower = row.lowerLimit != null ? Number(row.lowerLimit) : undefined
|
||||||
|
|
||||||
if (upper != null && lower != null) {
|
if (upper != null && lower != null) {
|
||||||
row.checkResult = (val >= lower && val <= upper) ? '1' : '0'
|
row.checkResult = (val >= lower && val <= upper) ? '0' : '1'
|
||||||
} else if (upper != null) {
|
} else if (upper != null) {
|
||||||
row.checkResult = val <= upper ? '1' : '0'
|
row.checkResult = val <= upper ? '0' : '1'
|
||||||
} else if (lower != null) {
|
} else if (lower != null) {
|
||||||
row.checkResult = val >= lower ? '1' : '0'
|
row.checkResult = val >= lower ? '0' : '1'
|
||||||
}
|
}
|
||||||
updateOverallCheckResult()
|
updateOverallCheckResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取单项判定显示文本
|
|
||||||
const getJudgeLabel = (result?: string) => {
|
|
||||||
if (result == null) return '-'
|
|
||||||
const dict = getCheckResultOptions().find(d => d.value === result)
|
|
||||||
return dict ? dict.label : result
|
|
||||||
}
|
|
||||||
|
|
||||||
// 单项判定变更时更新整体检验结果
|
// 单项判定变更时更新整体检验结果
|
||||||
const handleSingleJudgmentChange = () => {
|
const handleSingleJudgmentChange = () => {
|
||||||
@ -513,10 +566,29 @@ const handleSingleJudgmentChange = () => {
|
|||||||
// 更新整体检验结果
|
// 更新整体检验结果
|
||||||
const updateOverallCheckResult = () => {
|
const updateOverallCheckResult = () => {
|
||||||
const list = formData.value.rawMaterialInspTotalList
|
const list = formData.value.rawMaterialInspTotalList
|
||||||
if (!list || list.length === 0) return
|
if (!list || list.length === 0) {
|
||||||
|
formData.value.checkResult = '0'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const hasUnqualified = list.some((item: any) => item.checkResult === '0')
|
// 只考虑有值的项目(非空)
|
||||||
formData.value.checkResult = hasUnqualified ? '0' : '1'
|
const valuedItems = list.filter((item: any) => item.checkResult != null && item.checkResult !== '')
|
||||||
|
if (valuedItems.length === 0) {
|
||||||
|
formData.value.checkResult = '0'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 有任何一个不合格 → 整体不合格('1'=不合格)
|
||||||
|
const hasUnqualified = valuedItems.some((item: any) => item.checkResult === '1')
|
||||||
|
// 所有有值的都合格 → 整体合格('0'=合格)
|
||||||
|
const allQualified = valuedItems.every((item: any) => item.checkResult === '0')
|
||||||
|
|
||||||
|
if (hasUnqualified) {
|
||||||
|
formData.value.checkResult = '1'
|
||||||
|
} else if (allQualified) {
|
||||||
|
formData.value.checkResult = '0'
|
||||||
|
}
|
||||||
|
// 既有合格又有空值时,保持原值不变
|
||||||
}
|
}
|
||||||
|
|
||||||
// 供应商变更时更新简称
|
// 供应商变更时更新简称
|
||||||
@ -537,6 +609,7 @@ const handleMaterialConfirm = async (row: any) => {
|
|||||||
formData.value.matName = row.matName
|
formData.value.matName = row.matName
|
||||||
formData.value.spec = row.spec
|
formData.value.spec = row.spec
|
||||||
|
|
||||||
|
|
||||||
const list = await InspplanitemApi.selectMaterialId(row.id)
|
const list = await InspplanitemApi.selectMaterialId(row.id)
|
||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
// 初始化每行的实测值明细列表
|
// 初始化每行的实测值明细列表
|
||||||
@ -549,8 +622,15 @@ const handleMaterialConfirm = async (row: any) => {
|
|||||||
item.rawMaterialInspDetailList.push({ actValue: undefined })
|
item.rawMaterialInspDetailList.push({ actValue: undefined })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
// 映射字段
|
||||||
|
list.forEach((item: any) => {
|
||||||
|
item.inspPlanItemId = item.id
|
||||||
|
item.inspPlanId = item.schemeId
|
||||||
|
})
|
||||||
formData.value.rawMaterialInspTotalList = list
|
formData.value.rawMaterialInspTotalList = list
|
||||||
formData.value.testNum = list[0].tolNum
|
formData.value.testNum = list[0].tolNum
|
||||||
|
formData.value.formCode = list[0].formCode
|
||||||
|
formData.value.qaSchemeBaseId = list[0].schemeId
|
||||||
// 初始化时自动计算数字类型的平均值和判定
|
// 初始化时自动计算数字类型的平均值和判定
|
||||||
list.forEach((item: any) => {
|
list.forEach((item: any) => {
|
||||||
if (item.itemValueType === 'I') {
|
if (item.itemValueType === 'I') {
|
||||||
@ -564,13 +644,10 @@ const handleMaterialConfirm = async (row: any) => {
|
|||||||
formData.value.testNum = undefined
|
formData.value.testNum = undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let initialized = false
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
queryData(query.active as string, query.id ? Number(query.id) : undefined).catch((error) => {
|
if (initialized) return
|
||||||
console.error('初始化失败:', error)
|
initialized = true
|
||||||
})
|
|
||||||
})
|
|
||||||
// keep-alive 缓存后再次激活时重新初始化
|
|
||||||
onActivated(() => {
|
|
||||||
queryData(query.active as string, query.id ? Number(query.id) : undefined).catch((error) => {
|
queryData(query.active as string, query.id ? Number(query.id) : undefined).catch((error) => {
|
||||||
console.error('初始化失败:', error)
|
console.error('初始化失败:', error)
|
||||||
})
|
})
|
||||||
@ -585,6 +662,19 @@ const queryData = async (type: string, id ?: number) => {
|
|||||||
supperList.value= await SupplierApi.dropdown(['1', '2'])
|
supperList.value= await SupplierApi.dropdown(['1', '2'])
|
||||||
if (id) {
|
if (id) {
|
||||||
formData.value = await RawMaterialInspApi.getRawMaterialInsp(id)
|
formData.value = await RawMaterialInspApi.getRawMaterialInsp(id)
|
||||||
|
formData.value.recieveDate = formData.value.recieveDate ? dayjs(formData.value.recieveDate).format('YYYY-MM-DD') as unknown as Date : undefined
|
||||||
|
formData.value.checkDate = formData.value.checkDate ? dayjs(formData.value.checkDate).format('YYYY-MM-DD') as unknown as Date : undefined
|
||||||
|
// 确保 rawMaterialInspDetailList 已初始化
|
||||||
|
const totalList = formData.value.rawMaterialInspTotalList || []
|
||||||
|
totalList.forEach((item: any) => {
|
||||||
|
if (!item.rawMaterialInspDetailList) {
|
||||||
|
item.rawMaterialInspDetailList = []
|
||||||
|
}
|
||||||
|
const num = item.testNum || 0
|
||||||
|
for (let i = item.rawMaterialInspDetailList.length; i < num; i++) {
|
||||||
|
item.rawMaterialInspDetailList.push({ actValue: undefined })
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('加载数据失败:', error)
|
console.error('加载数据失败:', error)
|
||||||
@ -596,29 +686,22 @@ const queryData = async (type: string, id ?: number) => {
|
|||||||
}
|
}
|
||||||
// 返回上一级(列表页),兼容动态路由未加载的情况
|
// 返回上一级(列表页),兼容动态路由未加载的情况
|
||||||
const goBack = async () => {
|
const goBack = async () => {
|
||||||
// 优先按路由名称跳转(动态注册的路由名称为 RawMaterialInsp)
|
// 关闭当前页面页签,然后返回上一页
|
||||||
if (router.hasRoute('RawMaterialInsp')) {
|
const currentRoute = router.currentRoute.value
|
||||||
await router.push({ name: 'RawMaterialInsp', query: { refresh: '1' } })
|
const tagsViewStore = useTagsViewStore()
|
||||||
} else {
|
tagsViewStore.delView(currentRoute)
|
||||||
// 降级:获取当前路由的父路径导航
|
sessionStorage.setItem('NEED_REFRESH_LIST', 'true')
|
||||||
const currentPath = router.currentRoute.value.path
|
router.replace({ name: 'RawMaterialInsp' })
|
||||||
const parentPath = currentPath.substring(0, currentPath.lastIndexOf('/'))
|
|
||||||
try {
|
|
||||||
await router.push({ path: parentPath, query: { refresh: '1' } })
|
|
||||||
} catch {
|
|
||||||
router.back()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 保存
|
// 保存
|
||||||
const handleSave = async () => {
|
const handleSave = async () => {
|
||||||
formData.value.checkStatus = '0' as any
|
formData.value.checkStatus = '1' as any
|
||||||
await doSave('保存成功')
|
await doSave('保存成功')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下发
|
// 下发
|
||||||
const handleIssue = async () => {
|
const handleIssue = async () => {
|
||||||
formData.value.checkStatus = '1' as any
|
formData.value.checkStatus = '2' as any
|
||||||
await doSave('确认成功')
|
await doSave('确认成功')
|
||||||
}
|
}
|
||||||
// 通用的保存操作
|
// 通用的保存操作
|
||||||
@ -717,6 +800,8 @@ const handleClearMaterial = () => {
|
|||||||
formData.value.rawMaterialInspTotalList = []
|
formData.value.rawMaterialInspTotalList = []
|
||||||
formData.value.testNum = undefined
|
formData.value.testNum = undefined
|
||||||
formData.value.checkResult = '0'
|
formData.value.checkResult = '0'
|
||||||
|
formData.value.formCode = undefined
|
||||||
|
formData.value.qaSchemeBaseId = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开产品选择弹窗,传入已选物料进行回显
|
// 打开产品选择弹窗,传入已选物料进行回显
|
||||||
@ -724,8 +809,8 @@ const openMaterialDialog = () => {
|
|||||||
if (formData.value.materialId) {
|
if (formData.value.materialId) {
|
||||||
materialDialogRef.value?.open({
|
materialDialogRef.value?.open({
|
||||||
id: formData.value.materialId,
|
id: formData.value.materialId,
|
||||||
materialCode: formData.value.matCode,
|
matCode: formData.value.matCode,
|
||||||
materialName: formData.value.matName,
|
matName: formData.value.matName,
|
||||||
spec: formData.value.spec,
|
spec: formData.value.spec,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -778,7 +863,7 @@ const resetForm = () => {
|
|||||||
checkUserId: undefined,
|
checkUserId: undefined,
|
||||||
checkExUserId: undefined,
|
checkExUserId: undefined,
|
||||||
checkExDate: undefined,
|
checkExDate: undefined,
|
||||||
checkStatus: '0',
|
checkStatus: '1',
|
||||||
checkRemark: undefined,
|
checkRemark: undefined,
|
||||||
strness: undefined,
|
strness: undefined,
|
||||||
inmatType: undefined,
|
inmatType: undefined,
|
||||||
@ -798,4 +883,10 @@ const resetForm = () => {
|
|||||||
.el-input-number :deep(.el-input__inner) {
|
.el-input-number :deep(.el-input__inner) {
|
||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* testNum <= 5 时隐藏展开箭头 */
|
||||||
|
:deep(.hl-row-no-expand .el-table__expand-icon) {
|
||||||
|
visibility: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
placeholder="请输入物料名称"
|
placeholder="请输入物料名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-200px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单据状态" prop="checkStatus">
|
<el-form-item label="单据状态" prop="checkStatus">
|
||||||
@ -63,27 +63,27 @@
|
|||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border>
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border>
|
||||||
<el-table-column label="序号" align="center" type="index" width="60px"/>
|
<el-table-column label="序号" align="center" type="index" width="60px"/>
|
||||||
<el-table-column label="检验单号" align="center" prop="checkCode" />
|
<el-table-column label="检验单号" align="center" prop="checkCode" width="150"/>
|
||||||
<el-table-column label="原料名称" align="center" prop="matName" />
|
<el-table-column label="原料名称" align="center" prop="matName" width="150" />
|
||||||
<el-table-column label="供应商简称" align="center" prop="supplierSimName" width="150"/>
|
<el-table-column label="供应商简称" align="center" prop="supplierSimName" width="150"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="spec" />
|
<el-table-column label="规格型号" align="center" prop="spec" width="120" />
|
||||||
<el-table-column label="检验结果" align="center" prop="checkResult" >
|
<el-table-column label="检验结果" align="center" prop="checkResult" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.CHECK_RESULT" :value="scope.row.checkResult"/>
|
<dict-tag :type="DICT_TYPE.CHECK_RESULT" :value="scope.row.checkResult"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验人员" align="center" prop="checkUserName" />
|
<el-table-column label="检验人员" align="center" prop="checkUserName" width="120"/>
|
||||||
<el-table-column label="到货日期" align="center" prop="recieveDate" />
|
<el-table-column label="到货日期" align="center" prop="recieveDate" width="120" :formatter="dateFormatter2"/>
|
||||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
<el-table-column label="批次号" align="center" prop="lotNo" width="120"/>
|
||||||
<el-table-column label="检验日期" align="center" prop="checkDate" />
|
<el-table-column label="检验日期" align="center" prop="checkDate" width="120" :formatter="dateFormatter2"/>
|
||||||
<el-table-column label="抽检数量" align="center" prop="sampleQty" />
|
<el-table-column label="抽检数量" align="center" prop="sampleQty" width="120"/>
|
||||||
<el-table-column label="采购订单号" align="center" prop="purOrdNo" width="150"/>
|
<el-table-column label="采购订单号" align="center" prop="purOrdNo" width="150"/>
|
||||||
<el-table-column label="单据状态" align="center" prop="checkStatus" fixed="right" >
|
<el-table-column label="单据状态" align="center" prop="checkStatus" fixed="right" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.CHECK_STATUS" :value="scope.row.checkStatus"/>
|
<dict-tag :type="DICT_TYPE.CHECK_STATUS" :value="scope.row.checkStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right">
|
<el-table-column label="操作" align="center" fixed="right" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
@ -124,6 +124,7 @@
|
|||||||
import * as RawMaterialInspApi from '@/api/biz/rawmaterialinsp'
|
import * as RawMaterialInspApi from '@/api/biz/rawmaterialinsp'
|
||||||
import {getStrDictOptions,DICT_TYPE} from "@/utils/dict";
|
import {getStrDictOptions,DICT_TYPE} from "@/utils/dict";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
|
import {dateFormatter2} from "@/utils/formatTime";
|
||||||
|
|
||||||
defineOptions({ name: 'RawMaterialInsp' })
|
defineOptions({ name: 'RawMaterialInsp' })
|
||||||
|
|
||||||
@ -205,6 +206,7 @@ const resetQuery = () => {
|
|||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
|
|
||||||
const openForm = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
|
sessionStorage.setItem('NEED_REFRESH_LIST', 'true')
|
||||||
router.push({
|
router.push({
|
||||||
name: 'RawMaterialInspForm',
|
name: 'RawMaterialInspForm',
|
||||||
query: {
|
query: {
|
||||||
@ -229,21 +231,12 @@ const handleDelete = async (id: number) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化与缓存激活 **/
|
||||||
onMounted(() => {
|
onActivated(() => {
|
||||||
// 默认不自动查询,需手动点击搜索按钮
|
// 只有在从表单页面返回时才自动查询
|
||||||
})
|
if (sessionStorage.getItem('NEED_REFRESH_LIST') === 'true') {
|
||||||
|
sessionStorage.removeItem('NEED_REFRESH_LIST')
|
||||||
// 监听 refresh 参数,从表单页返回时自动刷新
|
|
||||||
import { useRoute } from 'vue-router'
|
|
||||||
const route = useRoute()
|
|
||||||
watch(
|
|
||||||
() => route.query.refresh,
|
|
||||||
(val) => {
|
|
||||||
if (val === '1') {
|
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
{ immediate: false }
|
|
||||||
)
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user