按文档修改

This commit is contained in:
Ledo 2025-06-03 23:43:01 +08:00
parent 44b2a30055
commit 009d9afbf4
54 changed files with 7589 additions and 15807 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -202,8 +202,8 @@
<version>${redisson.version}</version>
<exclusions>
<exclusion>
<artifactId>spring-boot-starter-actuator</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</exclusion>
</exclusions>
</dependency>
@ -238,8 +238,8 @@
<version>${lock4j.version}</version>
<exclusions>
<exclusion>
<artifactId>redisson-spring-boot-starter</artifactId>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
@ -294,8 +294,8 @@
<version>${spring-boot-admin.version}</version>
<exclusions>
<exclusion>
<artifactId>spring-boot-admin-server-cloud</artifactId>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-cloud</artifactId>
</exclusion>
</exclusions>
</dependency>
@ -315,12 +315,12 @@
<version>${spring.boot.version}</version>
<exclusions>
<exclusion>
<artifactId>asm</artifactId>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<artifactId>mockito-core</artifactId>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
</exclusions>
</dependency>
@ -415,12 +415,12 @@
<version>${screw.version}</version>
<exclusions>
<exclusion>
<artifactId>freemarker</artifactId>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</exclusion>
<exclusion>
<artifactId>fastjson</artifactId>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</exclusion>
</exclusions>
</dependency>
@ -490,12 +490,12 @@
<version>${aliyun-java-sdk-core.version}</version>
<exclusions>
<exclusion>
<artifactId>opentracing-api</artifactId>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-api</artifactId>
</exclusion>
<exclusion>
<artifactId>opentracing-util</artifactId>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-util</artifactId>
</exclusion>
</exclusions>
</dependency>
@ -515,8 +515,8 @@
<version>${justauth.version}</version>
<exclusions>
<exclusion>
<artifactId>hutool-core</artifactId>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
</exclusion>
</exclusions>
</dependency>
@ -541,8 +541,8 @@
<version>${jimureport.version}</version>
<exclusions>
<exclusion>
<artifactId>druid</artifactId>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</exclusion>
</exclusions>
</dependency>

View File

@ -84,6 +84,7 @@ public interface ErrorCodeConstants {
ErrorCode PROCESS_BOM_DETAIL_UNSTANDARD_MATERIAL_NAME_IS_REPEAT= new ErrorCode(1_006_009, "非标准件工艺bom明细物料名称重复");
ErrorCode PROCESS_BOM_DETAIL_UNSTANDARD_SPEC_IS_NULL= new ErrorCode(1_006_010, "非标准件工艺bom明细规格为空");
ErrorCode PRICESS_UNIT_ERRPR = new ErrorCode(1_006_0011, "bom单位非法请在字典基础数据中维护");
/************生产计划管理***********/
ErrorCode PLAN_NOT_EXISTS = new ErrorCode(1_007_001, "生产计划不存在");
ErrorCode PLAN_SUB_NOT_EXISTS = new ErrorCode(1_007_002, "生产计划子项目不存在");
@ -111,6 +112,7 @@ public interface ErrorCodeConstants {
ErrorCode TASK_DISPATCH_TASK_IS_OVER = new ErrorCode(1_009_007, "报工数量已完成");
ErrorCode TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS = new ErrorCode(1_009_006, "无法超额报工");
ErrorCode TASK_REPORT_OTHER_PERSON_NO_SUBMIT = new ErrorCode(1_009_020, "其他人员尚未报工,无法结束生产");
//1_009_021已被使用
/*************质量管理***********/
ErrorCode UNQUALIFIED_NOTIFICATION_NOT_EXISTS = new ErrorCode(1_010_001, "品质异常通知单审核不存在");
ErrorCode QUALITY_FEEDBACK_NOT_EXISTS = new ErrorCode(1_010_002, "客户反馈质量不存在");

View File

@ -192,9 +192,10 @@ public class ProcessBomController {
@Parameters({@Parameter(name = "file", description = "Excel 文件", required = true)})
@PreAuthorize("@ss.hasPermission('heli:process-bom:import')")
@OperateLog(type = IMPORT)
public CommonResult<ProcessBomImportRespVO> importExcel(@RequestParam("file") MultipartFile file) {
public CommonResult<ProcessBomImportRespVO> importExcel(HttpServletRequest request,@RequestParam("file") MultipartFile file) {
try {
processBomService.importExcel(file);
String bomCode = request.getHeader("Bom-Code");
processBomService.importExcel(file,bomCode);
return success(null);
} catch (Exception e) {
return error(500, "文件导入失败: " + e.getMessage());

View File

@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
@ -88,4 +89,9 @@ public class ProcessBomRespVO {
@Schema(description = "审核人")
private Long shenheUser;
private String customerBrief;
private String projectNameSim;
private String subNameSim;
}

View File

@ -1,5 +1,6 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
@ -64,6 +65,11 @@ public class ProcessBomSaveReqVO {
@Schema(description = "操作意见")
private String activeOpinion;
private String customerBrief;
private String projectNameSim;
private String subNameSim;
/**
* 审核人
*/

View File

@ -94,6 +94,12 @@ public class ProcessDesignRespVO {
@Schema(description = "毛坯负责人名称")
private String blankOwnerName;
@Schema(description = "是否延期", example = "0")
private Integer isDelay;
@Schema(description = "延期时间戳", example = "2023-01-02")
private Date delayTime;
@Schema(description = "延期原因", example = "28809")
private String delayReason;
@Schema(description = "毛坯最新进度")
private BigDecimal progressBlank;

View File

@ -35,7 +35,12 @@ public class ProcessDesignSaveReqVO {
@Schema(description = "子项目id", example = "28809")
private Long projectSubId;
@Schema(description = "是否延期", example = "0")
private Integer isDelay;
@Schema(description = "延期时间戳", example = "2023-01-02")
private Date delayTime;
@Schema(description = "延期原因", example = "28809")
private String delayReason;
@Schema(description = "工艺设计进度列表")
private List<ProcessDesignProgressDO> processDesignProgressList;

View File

@ -35,4 +35,6 @@ public class TaskDispatchDetailPageReqVO extends PageParam {
@Schema(description = "bom明细id")
private Long bomDetailId;
@Schema(description = "项目或子项目id")
private String subOrDetailName;
}

View File

@ -110,6 +110,7 @@ public class PgMasterLineDO extends BaseDO {
* 预计工时
*/
private BigDecimal gongShi;
private Long procedureId;
/**
* 质量派工id
*/
@ -158,4 +159,4 @@ public class PgMasterLineDO extends BaseDO {
private String creator;
}
}

View File

@ -143,6 +143,12 @@ public class ProcessBomDO extends BaseDO {
@TableField(exist = false)
private String projectSubCode;
@TableField(exist = false)
private String customerBrief;
@TableField(exist = false)
private String projectNameSim;
@TableField(exist = false)
private String subNameSim;
@TableField(exist = false)
private Integer property;

View File

@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 工艺设计 DO
@ -52,6 +54,12 @@ public class ProcessDesignDO extends BaseDO {
* 项目id
*/
private Long projectId;
private Integer isDelay;
private Date delayTime;
private String delayReason;
/**
* 子项目id
*/

View File

@ -3,6 +3,7 @@ package com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesignprogress;
import lombok.*;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
@ -53,4 +54,9 @@ public class ProcessDesignProgressDO extends BaseDO {
@TableField(exist = false)
private String creatorName;
private Integer isOver;
private Date beginTime;
private Date endTime;
private BigDecimal workTime;
}

View File

@ -85,6 +85,8 @@ public class TaskDispatchDetailDO extends BaseDO {
private LocalDateTime startTime;
private Long detailOwnerId;
//是否过程检 -Y -N
private String testYn;
/**
* 预计结束日期
*/

View File

@ -70,7 +70,7 @@ public interface FpUserDetailMapper extends BaseMapperX<FpUserDetailDO> {
throw exception(OWNER_NOT_EXISTS);
}
if (id!=null &&fpUserDetailDOS.size()!=1) {
if (id!=null && fpUserDetailDOS.size()!=1) {
throw exception(OWNER_NOT_EXISTS);
}

View File

@ -1,7 +1,9 @@
package com.chanko.yunxi.mes.module.heli.dal.mysql.processbom;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
import com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo.ProcessBoomPageReqVO;
@ -53,7 +55,7 @@ public interface ProcessBomDetailMapper extends BaseMapperX<ProcessBomDetailDO>
"LEFT JOIN v_storage_material_now s ON p.material_id = s.id " +
"LEFT JOIN base_material m ON s.id=m.id "+
"WHERE p.bom_id = #{bomId} and p.material_id is not null AND p.deleted IN (0, 1) " +
"GROUP BY p.material_code")
"GROUP BY p.id") //2025 0601 因为bom明细页查询到结果 group by materialcode转换为 group by id
List<ProcessBomDetailDO> selectStandardListByBomId(@Param("bomId") Long bomId);
default Long getBomDetailByBluePrintNoAndBomId(String bomCode,String bluePrintNo){
@ -98,6 +100,17 @@ public interface ProcessBomDetailMapper extends BaseMapperX<ProcessBomDetailDO>
List<ProcessBomDetailDO> selectListByBomIdbyid(Long id,Long bomId);
default int updateCompositionIdBatch(List<Long> ids){
if(CollUtil.isNotEmpty(ids)){
UpdateWrapper<ProcessBomDetailDO> updateSql = new UpdateWrapper<>();
updateSql.set("composition_id",null).in("id",ids);
return update(updateSql);
}else {
return 0;
}
}
// return selectList(ProcessBomDetailDO::getBomId, bomId);
// }
default List<ProcessBomDetailDO> selectListByproid(Long bomId) {

View File

@ -126,7 +126,7 @@ public interface ProcessBomMapper extends BaseMapperX<ProcessBomDO> {
query.selectAll(ProcessBomDO.class)
.select("concat('BOM-', e.project_sub_code) as bomCode", "e.project_sub_code as projectSubCode")
.select("a.plan_no as planCode", "b.code as projectCode", "c.name as customerName", "b.project_name as projectName","b.property as property")
.select("c.brief as customerBrief,b.project_name_sim as projectNameSim,d.name_sim as subNameSim")
.select("d.name as projectSubName")
.leftJoin(PlanDO.class, "a", PlanDO::getId, ProcessBomDO::getPlanId)
.leftJoin(PlanSubDO.class, "e", PlanSubDO::getProjectSubId, ProcessBomDO::getProjectSubId)

View File

@ -305,6 +305,9 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
.ne(ProjectOrderDO::getStatus,6)
.groupBy(TaskDispatchDetailDO::getId)
.disableSubLogicDel();
if (reqVO.getSubOrDetailName() != null && !reqVO.getSubOrDetailName().trim().equals("")){
query.apply("(b.project_name like '%" + reqVO.getSubOrDetailName() + "%' or c.name like '%" + reqVO.getSubOrDetailName() + "%')");
}
if (reqVO.getProcedureStatusList().size()==1 && reqVO.getProcedureStatusList().get(0)==2){
//完工降序
query.orderByDesc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort);

View File

@ -79,7 +79,7 @@ public interface PgMasterService {
*/
List<PgMasterLineDO> getPgMasterLineListByZlPgId(Integer zlPgId);
Boolean insertPgList(Long task_id,Long project_id,Long bomMxId);
Boolean insertPgList(Long task_id,Long project_id,Long bomMxId,Long procedureId);
List<PgMasterLineDO> searchBomMx(Long task_id,Long project_id);

View File

@ -59,7 +59,7 @@ public class PgMasterServiceImpl implements PgMasterService {
@Override
public Boolean insertPgList(Long task_id,Long project_id,Long bomMxId){
public Boolean insertPgList(Long task_id,Long project_id,Long bomMxId,Long procedureId){
//213 605
//查询BOM明细
List<ProcessBomDO> processBomDOList = processBomMapper.selectBomMx(task_id,project_id,bomMxId);
@ -68,6 +68,8 @@ public class PgMasterServiceImpl implements PgMasterService {
PgMasterLineDO pgMasterLineDO = new PgMasterLineDO();
//bomID
pgMasterLineDO.setBomId(o.getBomId());
//工序id
pgMasterLineDO.setProcedureId(procedureId);
//bom名称
pgMasterLineDO.setBomName("BOM-"+o.getProjectSubShortName());
//bom编号

View File

@ -164,11 +164,13 @@ private TaskReportMapper taskReportMapper;
}
@Override
public PlanDO getPlanByProjectId(Long projectId){
return planMapper.selectOne(new LambdaQueryWrapper<PlanDO>() {{
return planMapper.selectOne(new LambdaQueryWrapper<PlanDO>() {
{
eq(PlanDO::getProjectId, projectId);
orderByDesc(PlanDO::getId);
last("LIMIT 1");
}});
}
});
}
@Override
@Transactional(rollbackFor = Exception.class)
@ -180,7 +182,8 @@ private TaskReportMapper taskReportMapper;
eq(PlanDO::getProjectId, projectId);
orderByDesc(PlanDO::getId);
last("LIMIT 1");
}});
}}
);
// 生成生产计划子项目信息
List<ProjectOrderSubDO> projectOrderSubDOs = projectOrderService.getProjectOrderSubListByProjectOrderId(projectId);
if(planDO != null){

View File

@ -36,7 +36,7 @@ public interface ProcessBomService {
* @param file 文件
* @return 编号
*/
void importExcel(@Valid MultipartFile file) throws IOException;
void importExcel(@Valid MultipartFile file,String bomCode) throws IOException;
/**
* 更新工艺bom
*

View File

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.generator.IFill;
import com.chanko.yunxi.mes.framework.common.enums.BomEditStatusEnum;
import com.chanko.yunxi.mes.framework.common.enums.StatusEnum;
import com.chanko.yunxi.mes.framework.common.exception.ErrorCode;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
@ -54,6 +55,7 @@ import org.springframework.validation.annotation.Validated;
import com.chanko.yunxi.mes.module.heli.service.shenhe.SerarchUser;
import org.springframework.web.multipart.MultipartFile;
import org.thymeleaf.expression.Ids;
import javax.annotation.Resource;
import javax.validation.Valid;
@ -128,13 +130,16 @@ public class ProcessBomServiceImpl implements ProcessBomService {
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void importExcel(@Valid MultipartFile file) throws IOException {
public void importExcel(@Valid MultipartFile file,String bomCode) throws IOException {
// 校验文件格式
if (!file.getOriginalFilename().endsWith(".xlsx") && !file.getOriginalFilename().endsWith(".xls")) {
throw exception(EXCEL_FILE_FORMAT_ERROR);
}
// 读取Excel文件并转换为VO对象列表
List<ProcessBomImportExcelVO> list = ExcelUtils.read(file, ProcessBomImportExcelVO.class);
for (ProcessBomImportExcelVO processBomImportExcelVO : list) {
processBomImportExcelVO.setCode(bomCode);
}
HashSet<String> blueprintNoList = new HashSet<String>();
Map<String, List<ProcessBomImportExcelVO>> groupedByCode = list.stream().collect(Collectors.groupingBy(vo -> vo.getCode() == null ? "NULL" : vo.getCode()));
Map<String, List<ProcessBomImportExcelVO>> groupedByBluePrintfNo = list.stream().collect(Collectors.groupingBy(vo -> vo.getBlueprintNo() == null ? "NULL" : vo.getBlueprintNo()));
@ -360,6 +365,37 @@ public class ProcessBomServiceImpl implements ProcessBomService {
throw exception(PROCESS_BOM_DETAIL_BLUE_PRINT_NO_REPEAT);
}
});
for (ProcessBomDetailDO processBomDetail : processBomDetails) {
//标准件不管材质非标准件材质必填
if (processBomDetail.getType().equals("2")){
if (processBomDetail.getCompositionId() == null) {
throw exception(new ErrorCode(1_006_9999,processBomDetail.getMaterialName()+"材质不能为空,请确认!"));
}
if(processBomDetail.getId() == null){
if(updateReqVO.getCustomerBrief() != null && !updateReqVO.getCustomerBrief().equals("")){
processBomDetail.setMaterialCode(updateReqVO.getCustomerBrief()+'-' );
if(updateReqVO.getProjectNameSim() != null && !updateReqVO.getProjectNameSim().equals("")){
processBomDetail.setMaterialCode(processBomDetail.getMaterialCode() + updateReqVO.getProjectNameSim() +'-');
if(updateReqVO.getSubNameSim() != null && !updateReqVO.getSubNameSim().equals("")){
processBomDetail.setMaterialCode(processBomDetail.getMaterialCode() + updateReqVO.getSubNameSim() + '-' );
if(processBomDetail.getBlueprintNo() != null && ! processBomDetail.getBlueprintNo().equals("")){
processBomDetail.setMaterialCode(processBomDetail.getMaterialCode()+processBomDetail.getBlueprintNo()) ;
}else{
processBomDetail.setMaterialCode("");
}
}else{
processBomDetail.setMaterialCode("");
}
}else{
processBomDetail.setMaterialCode("");
}
}else{
processBomDetail.setMaterialCode("");
}
}
}
}
Map<String, List<ProcessBomDetailDO>> groupedByMaterialName = processBomDetails.stream().filter(o -> o.getType().equals("2")).collect(Collectors.groupingBy(vo -> vo.getMaterialName() == null ? "NULL" : vo.getMaterialName()));
groupedByMaterialName.forEach((matName,list)->{
if (matName.equals("NULL")){
@ -417,7 +453,7 @@ public class ProcessBomServiceImpl implements ProcessBomService {
changeContent += "→物料名称由"+po.getMaterialName()+"变为"+vo.getMaterialName();
// }
}
if (!vo.getCompositionId().equals(po.getCompositionId())) {
if (po.getCompositionId() != null && vo.getCompositionId() != null && (!vo.getCompositionId().equals(po.getCompositionId()))) {
vo.setBomEditStatus(BomEditStatusEnum.HAS_EDIT.getStatus());
// if(vo.getMemo()!=null) {
// vo.setMemo(vo.getMemo() + "→材质由" + po.getCompositionId() + "变为" + vo.getCompositionId());
@ -425,6 +461,15 @@ public class ProcessBomServiceImpl implements ProcessBomService {
change = true;
changeContent +="→材质由"+po.getCompositionId()+"变为"+vo.getCompositionId();
// }
}
if (po.getCompositionId() != null && vo.getCompositionId() == null) {
change = true;
changeContent +="→材质设置被为空";
}
if (vo.getCompositionId() != null && po.getCompositionId() ==null){
change = true;
changeContent +="→材质设置被为"+vo.getCompositionId();
}
if (!vo.getBlueprintNo().equals(po.getBlueprintNo())) {
vo.setBomEditStatus(BomEditStatusEnum.HAS_EDIT.getStatus());
@ -936,7 +981,16 @@ public class ProcessBomServiceImpl implements ProcessBomService {
List<ProcessBomDetailDO> updateList = list.stream().filter(o -> o.getId() != null).collect(Collectors.toList());
List<ProcessBomDetailDO> insertList = list.stream().filter(o -> o.getId() == null).collect(Collectors.toList());
if(!updateList.isEmpty()) processBomDetailMapper.updateBatch(updateList);
if(!updateList.isEmpty()) {
List<Long> ids = new ArrayList<>();
for (ProcessBomDetailDO processBomDetailDO : updateList) {
if (processBomDetailDO.getCompositionId() == null){
ids.add(processBomDetailDO.getId());
}
}
processBomDetailMapper.updateCompositionIdBatch(ids);
processBomDetailMapper.updateBatch(updateList);
}
if(!insertList.isEmpty()) {
//如果新增的不为空就要看它有没有下发生产任务单了
processBomDetailMapper.insertBatch(insertList);

View File

@ -603,6 +603,17 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
throw exception(TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS);
}
}
//校验如果为完成添加逻辑1生产结束 增加管控 - 如果报工数量 = 派工数量 提示报工数量num1 != 派工数量num2不允许结束
if(operate == TaskReportOperateEnum.FINISH ){
List<TaskReportDO> historyReportList = taskReportMapper.selectList(new LambdaQueryWrapper<TaskReportDO>() {{
eq(TaskReportDO::getDispatchDetailId, taskDispatchDetailDO.getId())
.ne(TaskReportDO::getAmount, 0);
}});
int historyReportAmount = historyReportList.stream().mapToInt(TaskReportDO::getAmount).sum();
if ( taskDispatchDetailDO.getAmount() != historyReportAmount){
throw exception(new ErrorCode(1_009_021,"派工数量:"+taskDispatchDetailDO.getAmount()+"不等于总报工数量:"+historyReportAmount+",不允许结束!"));
}
}
}
PlanDO planDO = planMapper.selectById(taskDispatchDO.getPlanId());
// 执行
@ -742,10 +753,15 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
bdgzsomthingMapper.updateById(bdgzsomthingDO);
}
}
if (taskDispatchDO.getDispatchType().equals("PRODUCTION") && isBomDetailProductionOver){
pgMasterService.insertPgList(planDO.getId(),planDO.getProjectId(),taskDispatchDO.getBomDetailId());
}else if (taskDispatchDO.getDispatchType().equals("ASSEMBLE") && isProjectSubAssembleOver ){
if (taskDispatchDetailDO.getDispatchType().equals("PRODUCTION")){
pgMasterService.insertPgList(planDO.getId(),planDO.getProjectId(),taskDispatchDO.getBomDetailId(),taskDispatchDetailDO.getProcedureId());
}
// if (taskDispatchDO.getDispatchType().equals("PRODUCTION") && isBomDetailProductionOver){
//
// //现在生产报工的过程检要重新写
// pgMasterService.insertPgList(planDO.getId(),planDO.getProjectId(),taskDispatchDO.getBomDetailId(),taskDispatchDetailDO.getProcedureId());
// }else
if (taskDispatchDO.getDispatchType().equals("ASSEMBLE") && isProjectSubAssembleOver ){
zjPgMasterService.insertZjList(planDO.getId(),planDO.getProjectId(),taskDispatchDO.getProjectSubId());
}

View File

@ -1,6 +1,6 @@
server:
port: 33859
#@ port:8080
# port: 33859
port:8080
--- #################### 数据库相关配置 ####################
spring:
@ -50,10 +50,10 @@ spring:
# password: linus,.123
# master:
name: mes-heli-dev
url: jdbc:mysql://120.48.141.82:3306/mes-heli-dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&socketTimeout=30000&connectTimeout=30000
url: jdbc:mysql://localhost:33061/mes-heli-dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&socketTimeout=30000&connectTimeout=30000
driver-class-name: com.mysql.jdbc.Driver
username: root
password: qweasd,.123
password: 'root'
# slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
# name: ruoyi-vue-pro
# url: jdbc:mysql://localhost:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,10 @@
// const proBaseURL = 'http://124.221.23.100:9003'
// const devBaseURL = 'http://118.195.155.9:9002/'
// const proBaseURL = 'http://118.195.155.9:9002/'
const devBaseURL = 'http://192.168.0.169:9002/'
const proBaseURL = 'http://192.168.0.169:9002/'
// const devBaseURL = 'http://192.168.0.169:9002/'
// const proBaseURL = 'http://192.168.0.169:9002/'
const devBaseURL = 'http://218.75.46.166:8889/'
const proBaseURL = 'http://218.75.46.166:8889/'
export const BASE_URL = process.env.NODE_ENV === 'development' ? devBaseURL : proBaseURL
export const TIMEOUT = 5000

View File

@ -1,11 +1,11 @@
# 开发环境
NODE_ENV=development
VITE_DEV=true
VITE_DEV=false
# 请求路径https://star.hz-hl.com/admin-api http://192.168.1.87:8080
VITE_BASE_URL='https://nxhs.cjyx.cc'
VITE_BASE_URL='https://nxhs.cjyx.cc'
# 上传路径 http://218.75.46.166:8080
VITE_UPLOAD_URL='https://nxhs.cjyx.cc/admin-api/infra/file/upload'
@ -23,7 +23,7 @@ VITE_API_URL=/admin-api
VITE_DROP_DEBUGGER=true
# 是否删除console.log
VITE_DROP_CONSOLE=true
VITE_DROP_CONSOLE=false
# 是否sourcemap
VITE_SOURCEMAP=false

View File

@ -4,14 +4,14 @@ NODE_ENV=production
VITE_DEV=false
# 请求路径https://nxhs.cjyx.cc/admin-api http://192.168.1.87:8080
VITE_BASE_URL='https://nxhs.cjyx.cc'
VITE_BASE_URL='http://192.168.1.87:8080'
# 上传路径 http://218.75.46.166:8080
VITE_UPLOAD_URL='https://nxhs.cjyx.cc/admin-api/infra/file/upload'
VITE_UPLOAD_URL='http://192.168.1.87:8080/admin-api/infra/file/upload'
# 上传路径
VITE_UPLOAD_BATCH_URL='https://nxhs.cjyx.cc/admin-api/infra/file/uploadBatch'
VITE_UPLOAD_BATCH_URL='http://192.168.1.87:8080/admin-api/infra/file/uploadBatch'
# 接口前缀
VITE_API_BASEPATH=

View File

@ -118,7 +118,12 @@ watch(valueName, (newValue: any) => {
})
const onSelectChange = (newValue: any) => {
valueNameObject.value = compositionList.value.find((composition) => composition.id === newValue) //
emit('update:newValue', valueNameObject.value)
if(newValue != '' ) {
valueNameObject.value = compositionList.value.find((composition) => composition.id === newValue) //
emit('update:newValue', valueNameObject.value)
}else{
emit('update:newValue', '')
}
}
</script>

View File

@ -49,34 +49,34 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
<el-table-column fixed label="序号" type="index" width="60" align="center" />
<el-table-column fixed label="计划单号" align="center" prop="planCode" min-width="180">
<template #default="scope">
<el-button link type="primary" @click="openDetail('detail', scope.row.id)">
{{ scope.row.planCode }}
</el-button>
</template>
</el-table-column>
<el-table-column fixed label="项目编号" align="center" prop="projectCode" min-width="220" />
<el-table-column fixed label="生产状态" align="center" prop="status" width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PLAN_STATUS" :value="scope.row.planStatus" />
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" prop="customerName" min-width="240" />
<el-table-column fixed label="客户名称" align="center" prop="customerName" min-width="240" />
<el-table-column label="项目名称" align="center" prop="projectName" min-width="180" />
<el-table-column label="子项目名称" align="center" prop="projectSubName" min-width="180" />
<el-table-column label="性质" align="center" prop="property" min-width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PROPERTY" :value="scope.row.property" />
</template>
</el-table-column>
<el-table-column label="计划单号" align="center" prop="planCode" min-width="180">
<template #default="scope">
<el-button link type="primary" @click="openDetail('detail', scope.row.id)">
{{ scope.row.planCode }}
</el-button>
</template>
</el-table-column>
<el-table-column label="子项目编号" align="center" prop="projectSubCode" min-width="350" />
<el-table-column label="所属业务线" align="center" prop="businessLine" min-width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_BUSINESS_LINE" :value="scope.row.businessLine" />
</template>
</el-table-column>
<el-table-column label="性质" align="center" prop="property" min-width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PROPERTY" :value="scope.row.property" />
</template>
</el-table-column>
<el-table-column fixed="right" label="2D负责人" align="center" prop="twoDimOwnerName" width="120" />
<el-table-column fixed="right" label="2D截止日期" align="center" prop="twoDimDate" :formatter="dateFormatter2" min-width="140" />
<el-table-column fixed="right" label="最新进度" align="center" prop="progress" min-width="120">

View File

@ -87,32 +87,32 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
<el-table-column fixed label="序号" type="index" width="60" align="center" />
<el-table-column fixed label="计划单号" align="center" prop="planCode" min-width="180" >
<template #default="scope">
<el-button link type="primary" @click="openDetail('detail', scope.row.id)">
{{ scope.row.planCode }}
</el-button>
</template>
</el-table-column>
<el-table-column fixed label="项目编号" align="center" prop="projectCode" min-width="220" />
<el-table-column fixed label="生产状态" align="center" prop="status" width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PLAN_STATUS" :value="scope.row.planStatus" />
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" prop="customerName" min-width="240" />
<el-table-column fixed label="客户名称" align="center" prop="customerName" min-width="240" />
<el-table-column label="项目名称" align="center" prop="projectName" min-width="180" />
<el-table-column label="子项目名称" align="center" prop="projectSubName" min-width="180" />
<el-table-column label="子项目编号" align="center" prop="projectSubCode" min-width="350" />
<el-table-column label="所属业务线" align="center" prop="businessLine" min-width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_BUSINESS_LINE" :value="scope.row.businessLine" />
</template>
</el-table-column>
<el-table-column label="性质" align="center" prop="property" min-width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PROPERTY" :value="scope.row.property" />
</template>
</el-table-column>
<el-table-column label="计划单号" align="center" prop="planCode" min-width="180" >
<template #default="scope">
<el-button link type="primary" @click="openDetail('detail', scope.row.id)">
{{ scope.row.planCode }}
</el-button>
</template>
</el-table-column>
<el-table-column label="子项目编号" align="center" prop="projectSubCode" min-width="350" />
<el-table-column label="所属业务线" align="center" prop="businessLine" min-width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_BUSINESS_LINE" :value="scope.row.businessLine" />
</template>
</el-table-column>
<el-table-column fixed="right" label="3D负责人" align="center" prop="threeDimOwnerName" min-width="120"/>
<el-table-column fixed="right" label="3D截止日期" align="center" prop="threeDimDate" :formatter="dateFormatter2" min-width="140"/>

View File

@ -36,14 +36,14 @@
<el-button @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> 重置
</el-button>
<el-button
<!-- <el-button
type="primary"
plain
@click="handleImport"
v-hasPermi="['system:user:import']"
>
<Icon icon="ep:upload" /> 导入BOM
</el-button>
</el-button> -->
<el-button
type="success"
plain
@ -60,8 +60,8 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :row-class-name="tableRowClassName" class="hl-table">
<el-table-column fixed label="序号" align="center" type="index" width="60" />
<el-table-column fixed label="BOM编号" align="center" prop="bomCode" min-width="430">
<template #default="scope">
@ -183,7 +183,7 @@ const resetQuery = () => {
/** BOM导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
importFormRef.value.open(formData.value.bomCode)
}
/** 添加/修改操作 */
@ -253,4 +253,4 @@ onMounted(() => {
.status-4 {
background-color: wheat !important;
}
</style>
</style>

View File

@ -102,6 +102,15 @@
<el-row>
<el-col v-if="!detailDisabled">
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增</el-button>
<el-button
type="success"
size="large"
@click="handleImport"
v-hasPermi="['system:user:import']"
>
<Icon icon="ep:upload" /> 导入BOM
</el-button>
</el-col>
<el-col>
<el-card class="hl-incard">
@ -143,14 +152,14 @@
</el-table-column>
<el-table-column label="零件编码" prop="materialCode" min-width="120" />
<el-table-column label="材质" prop="compositionId" min-width="180">
<template #header><span class="hl-table_header">*</span>材质</template>
<template #header><span class="hl-table_header">{{startTag}}</span>材质</template>
<template #default="{ row, $index }">
<el-form-item
:prop="`${$index}.compositionId`" :rules="subFormRules.compositionId"
:prop="`${$index}.compositionId`"
class="mb-0px!">
<CompositionSelect
:disabled="getDisable(row.bomEditStatus)" v-model="row.compositionId"
@update:new-value="(val) => { row.compositionId = val.id; }" />
@update:new-value="(val) => { val == ''? row.compositionId = '': row.compositionId = val.id; }" />
</el-form-item>
</template>
</el-table-column>
@ -351,10 +360,12 @@
</el-card>
</el-form>
</el-card>
<BomImportForm ref="importFormRef" @success="getList" />
</template>
<script setup lang="ts">
import { DICT_TYPE, getDictLabel, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
import { dateFormatter, formatDate } from '@/utils/formatTime'
import BomImportForm from './bomImportForm.vue'
import { ref } from 'vue'
import { inject } from 'vue'
import { useUserStore } from '@/store/modules/user'
@ -380,6 +391,7 @@ const commonStore = useCommonStore()
const userStore = useUserStore()
const router = useRouter()
const { query } = useRoute()
const startTag = ref('*')
const active = toRef(commonStore.getStore('active'))
const currentId = toRef(commonStore.getStore('id'))
const formLoading = ref(false)
@ -420,7 +432,11 @@ const heliBomStatusOptions = ref<bomEditStatusEnum[]>([
]);
const formRef = ref() // Ref
const subFormRef = ref()
//20250601
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open(formData.value.bomCode)
}
//
const fieldHasAlter = (fieldName) => {
@ -678,6 +694,9 @@ const submitForm = async (operate) => {
//
formLoading.value = true
try {
//
//formData.value.processBomDetails = formData.value.processBomDetails.filter((item) => item.isSelected);
const data = formData.value as unknown as ProcessBomApi.ProcessBomVO
@ -740,8 +759,10 @@ const onDeleteItem = async (index) => {
const onChangeType = (row, val) => {
if (val==2){
row.spec = "A"
startTag.value = '*'
}else{
row.spec =undefined
startTag.value = ''
}
row.materialId = undefined
row.materialName = undefined

View File

@ -42,9 +42,10 @@ const importUrl =
import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/heli/process-bom/import'
const uploadHeaders = ref() // Header
const fileList = ref([]) //
const bomCode = ref('')
/** 打开弹窗 */
const open = () => {
const open = (bomcode :string) => {
bomCode.value = bomcode;
dialogVisible.value = true
resetForm()
}
@ -59,7 +60,8 @@ const submitForm = async () => {
//
uploadHeaders.value = {
Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId()
'tenant-id': getTenantId(),
'bom-code': bomCode.value
}
formLoading.value = true
uploadRef.value!.submit()

View File

@ -178,13 +178,66 @@
<el-col :span="6">
<el-form-item label="生产状态" prop="planCode">
<el-select v-model="formData.planStatus" placeholder="生产状态" clearable class="!w-260px" disabled>
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PLAN_STATUS)" :key="dict.value"
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PLAN_STATUS)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="6" v-if="(formData.isDelay == null || formData.isDelay == 0) ">
<el-button style="margin-left: 10%;" type="danger" @click="openDelay">延期</el-button>
</el-col> -->
<el-col :span="6" >
<el-form-item label="设计工时" prop="delayReason">
{{ getWorkTime(1)}}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="设计工期" prop="delayReason">
{{ getWorkTime(2) }}
</el-form-item>
</el-col>
<el-col :span="6" >
<el-button style="margin-left: 10%;" type="danger" @click="openDelay">延期</el-button>
</el-col>
<el-col :span="12" v-if="formData.isDelay == 1">
<el-form-item label="延期原因" prop="delayReason">
<el-input
v-model="formData.delayReason"
:rows="2"
disabled
type="textarea"
placeholder="延期原因"
/>
</el-form-item>
</el-col>
</el-row>
</el-card>
<!--延期弹框-->
<el-dialog
v-model="delayDialog"
title="延期信息填写"
:before-close="handleClose"
>
<span>
<el-input
v-model="formData.delayReason"
:rows="2"
type="textarea"
placeholder="延期原因"
/>
</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="delayDialog = false">取消</el-button>
<el-button type="primary" @click="delaySubmit">
确认
</el-button>
</span>
</template>
</el-dialog>
<!-- 表格类信息 -->
<el-card class="hl-card-info">
<template #header>
@ -192,14 +245,37 @@
</template>
<el-row>
<el-col v-if="active != 'detail'">
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增</el-button>
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">开始</el-button>
<el-button style="margin-left: 30px;" type="warning" size="large" @click="sendItem()">推送</el-button>
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增</el-button> -->
</el-col>
<el-col>
<el-card class="hl-incard">
<el-form ref="processDesignProgressFormRef" :model="formData.processDesignProgressList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">
<el-table :data="formData.processDesignProgressList" class="hl-table">
<el-table-column label="序号" align="center" type="index" width="80" fixed />
<el-table-column label="上报时间" align="center" prop="createTime" :formatter="dateFormatter" min-width="200"/>
<el-table-column label="开始时间" align="center" prop="beginTime" :formatter="dateFormatter" min-width="200"/>
<el-table-column label="结束时间" align="center" prop="endTime" :formatter="dateFormatter" min-width="200">
<template #header>结束时间</template>
<template #default="{ row, $index }">
<el-form-item :prop="`${$index}.endTime`" class="mb-0px!">
<!-- <el-input-number min="0" max="100" class="!w-240px" :disabled="detailDisabled || row.id" v-model="row.progress" placeholder="请输入进度百分比" @change="verify1($index)"/>-->
<el-date-picker :disabled-date="(date) => disabledDate(date, row)" :disabled="row.hasNext" :formatter="dateFormatter" v-model="row.endTime" type="datetime" placeholder="选择结束日期"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="已做时间(小时)" align="center" prop="workTime" width="280">
<template #header>已做时间(小时)</template>
<template #default="{ row, $index }">
<el-form-item :prop="`${$index}.workTime`" class="mb-0px!">
<el-input-number :max="row.maxTime" :precision="2" class="!w-240px" :disabled="row.hasNext" v-model="row.workTime" placeholder="请输入已做时间"/>
</el-form-item>
</template>
</el-table-column>
<!--2025.06.01-->
<!-- <el-table-column label="上报时间" align="center" prop="createTime" :formatter="dateFormatter" min-width="200"/>
<el-table-column label="上报人" prop="creatorName" min-width="100"/>
<el-table-column label="进度百分比(%" align="center" prop="progress" width="280">
<template #header> <span class="hl-table_header">*</span>进度百分比% </template>
@ -216,14 +292,27 @@
<el-input :disabled="detailDisabled || row.id" v-model="row.blueprintLink" placeholder="请输入图纸链接" />
</el-form-item>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="备注" prop="remark" min-width="280">
<template #default="{ row, $index }">
<el-form-item :prop="`${$index}.remark`" class="mb-0px!">
<el-input :disabled="detailDisabled || row.id" v-model="row.remark" placeholder="请输入备注" />
<el-input :disabled="row.hasNext" v-model="row.remark" placeholder="请输入备注" />
</el-form-item>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" min-width="160">
<template #default="scope">
<el-button
v-if="scope.row.isOver == 0 && active != 'detail'"
link
type="danger"
@click="overRow(scope.row)"
>
结束
</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
@ -231,21 +320,23 @@
</el-row>
</el-card>
</el-form>
<div class="text-center hl-footer">
<!-- <div class="hl-footer text-center">
<el-button @click="goback" size="large"> </el-button>
<el-button v-if="active != 'detail'" @click="submitForm('SAVE')" type="success" :disabled="formLoading" size="large"> </el-button>
</div>
</div> -->
</el-card>
</template>
<script setup lang="ts">
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
import {dateFormatter, formatDate} from "@/utils/formatTime";
import {dateFormatter, formatDate,dateFormatter1} from "@/utils/formatTime";
import {ref} from "vue";
import * as ProcessDesignApi from "@/api/heli/processdesign";
import { inject } from 'vue'
import {useUserStore} from "@/store/modules/user";
import {useCommonStore} from "@/store/modules/common";
import {verify} from "node:crypto";
import { delay, now } from 'lodash-es';
import { FolderOpened } from '@element-plus/icons-vue/dist/types';
defineOptions({ name: 'ProcessDesignDetail' })
@ -264,7 +355,7 @@ const formLoading = ref(false)
const dialogTitle = ref('')
const detailDisabled = ref(false)
const flag = ref(false)
const delayDialog = ref(false)
const formData = ref({
id: undefined,
planId: undefined,
@ -293,10 +384,165 @@ const resetForm = () => {
}
formRef.value?.resetFields()
}
const disabledDate = (time: Date,row : any) => {
const today = new Date();
const tomorrow = new Date(today);
tomorrow.setDate(tomorrow.getDate() + 1); //
tomorrow.setHours(23, 59, 59, 999);
const beginDate = new Date(row.beginTime);
return time.getTime() < beginDate.getTime() || time.getTime() > tomorrow.getTime();
}
const handleClose = (done: () => void) => {
ElMessageBox.confirm('是否退出?')
.then(() => {
delayDialog.value=false;
})
.catch(() => {
})
}
const getWorkTime = (type) =>{
if(formData.value.craftStartDate != null && formData.value.craftEndDate != null){
const start = new Date(formData.value.craftStartDate ).getTime();
const end = new Date( formData.value.craftEndDate).getTime();
const diffTime = Math.abs(end - start);
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
if(type == 1){
return day * 8 + '小时';
}else{
return day +'天'
}
}else{return ''
}
}
const delaySubmit = async() =>{
if(formData.value.delayReason == null || formData.value.delayReason.replaceAll(' ','') == ''){
message.error("延期原因不得为空,请确认!")
return;
}
formData.value.isDelay = 1;
formData.value.delayTime = (new Date()).getTime()
await submitForm('SAVE');
}
const openDelay = () =>{
var date = new Date();
if(processDesignType.value == 'BLUEPRINT_WORKBLANK'){
if(formData.value.blankDate != null ){
if(formData.value.blankDate > date.getTime()){
message.error("当前日期为正常生产周期,未达到延期条件,请确认!")
return
}
}else{
message.error("毛坯结束时间为空!请确认!")
return
}
}
if(processDesignType.value == 'BLUEPRINT_2D'){
if(formData.value.twoDimDate != null ){
if(formData.value.twoDimDate > date.getTime()){
message.error("当前日期为正常生产周期,未达到延期条件,请确认!")
return
}
}else{
message.error("2D结束时间为空!请确认!")
return
}
}
if(processDesignType.value == 'BLUEPRINT_3D'){
if(formData.value.threeDimDate != null ){
if(formData.value.threeDimDate > date.getTime()){
message.error("当前日期为正常生产周期,未达到延期条件,请确认!")
return
}
}else{
message.error("3D结束时间为空!请确认!")
return
}
}
if(processDesignType.value == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'){
console.log(formData.value.craftEndDate)
if(formData.value.craftEndDate != null ){
console.log(date.getTime())
console.log(formData.value.craftEndDate)
if(formData.value.craftEndDate > date.getTime()){
message.error("当前日期为正常生产周期,未达到延期条件,请确认!")
return
}
}else{
message.error("工艺结束时间为空!请确认!")
return
}
}
delayDialog.value = true;
}
const overRow = async( row :any) =>{
if(row.endTime == null || row.endTime == ''){
row.endTime = new Date().getTime()
var timeDiff = row.endTime -row.beginTime;
//
row.workTime = timeDiff / (1000 * 60 * 60);
row.maxTime = row.workTime;
// row.workTime = row.endTime - row.
}
if(row.endTime == null || row.endTime == ''){
message.error("结束时间不能为空!请确认!")
return
}
if(row.workTime == null || row.workTime == ''
){
message.error("已做时间不能为空!请确认")
return
}
row.isOver = 1;
// await submitForm('SAVE');
//
}
const sendItem = async() =>{
//,
if(formData.value.processDesignProgressList != null && formData.value.processDesignProgressList.length > 0){
var senIndex = 0;//,:
/**
* 推送最新一条数据内容为客户简称+项目名称+子项目名+备注内容
推送条件
报工后点击保存然后推送菜单有效
1要求先保证推送需要判断备注不能为空报警提示
*/
for (let index = 0; index < formData.value.processDesignProgressList.length; index++) {
var item = formData.value.processDesignProgressList[index];
if(!item.hasNext){
senIndex = index;
if(item.endTime == null || item.endTime == ''){
message.error("结束时间不能为空!请确认!")
return
}
if(item.workTime == null || item.workTime == ''){
message.error("已做时间不能为空!请确认")
return
}
if(item.remark == null || item.remark == ''){
message.error("推送备注不能为空!请确认")
return
}
}
}
//
await submitForm('SAVE');
//
}else{
message.error("至少添加一条数据后才能推送!请确认!")
}
}
const subFormLoading = ref(false) //
const subFormRules = reactive({
progress: [{ required: true, message: '进度百分比(%)不能为空', trigger: 'blur' }],
blueprintLink: [{ required: true, message: '图纸链接不能为空', trigger: 'blur' }],
// progress: [{ required: true, message: '(%)', trigger: 'blur' }],
// blueprintLink: [{ required: true, message: '', trigger: 'blur' }],
})
const queryData = async (id?: number) => {
@ -307,6 +553,37 @@ const queryData = async (id?: number) => {
try {
formData.value = await ProcessDesignApi.getProcessDesign(id)
formData.value.processDesignProgressList = await ProcessDesignApi.getProcessDesignProgressListByProcessDesignId(id)
if( formData.value.processDesignProgressList != null && formData.value.processDesignProgressList.length > 0){
var maxTime = null;
if(formData.value.processDesignProgressList.length == 1){
formData.value.processDesignProgressList[0].hasNext = false;
if(formData.value.processDesignProgressList[0].endTime != null && formData.value.processDesignProgressList[0].endTime != ''){
formData.value.processDesignProgressList[0].maxTime = (formData.value.processDesignProgressList[0].endTime - formData.value.processDesignProgressList[0].beginTime)/ (1000 * 60 * 60);
}
} else{
var maxIndex = 0;
for (let index = 0; index < formData.value.processDesignProgressList.length; index++) {
var item = formData.value.processDesignProgressList[index];
if(item.endTime != null && item.endTime != ''){
item.maxTime = (item.endTime - item.beginTime)/ (1000 * 60 * 60);
}
if(maxTime == null){
maxIndex = index;
maxTime = item.createTime;
item.hasNext = false;
}else{
if(item.createTime > maxTime){
formData.value.processDesignProgressList[maxIndex].hasNext = true;
maxIndex = index;
item.hasNext = false;
}else{
item.hasNext = true;
}
}
}
}
}
} finally {
formLoading.value = false
}
@ -314,14 +591,14 @@ const queryData = async (id?: number) => {
}
const submitForm = async (operate) => {
if (formData.value.processDesignProgressList.length>1){
var Current = formData.value.processDesignProgressList[0].progress;
var previous = formData.value.processDesignProgressList[1].progress;
if (Current<previous){
message.error("本次上报进度"+Current+"%小于上次上报进度"+previous+"%,请确认")
return
}
}
// if (formData.value.processDesignProgressList.length>1){
// var Current = formData.value.processDesignProgressList[0].progress;
// var previous = formData.value.processDesignProgressList[1].progress;
// if (Current<previous){
// message.error(""+Current+"%"+previous+"%,")
// return
// }
// }
//
@ -348,26 +625,100 @@ const submitForm = async (operate) => {
}
/** 新增按钮操作 */
const onAddItem = () => {
if (formData.value.processDesignProgressList.length>0){
var element = formData.value.processDesignProgressList[0].progress;
if (element==100){
message.error("上报进度已100%,请确认")
return
const onAddItem = async() => {
var date = new Date();
if(processDesignType.value == 'BLUEPRINT_WORKBLANK'){
if(formData.value.blankDate != null ){
if(formData.value.blankDate < date.getTime()){
if(formData.value.isDelay == null || formData.value.isDelay == 0){
message.error("当前任务已超期,请延期后重试!")
return
}
}
}else{
message.error("毛坯结束时间为空!请确认!")
return
}
}
if(processDesignType.value == 'BLUEPRINT_2D'){
if(formData.value.twoDimDate != null ){
if(formData.value.twoDimDate < date.getTime()){
if(formData.value.isDelay == null || formData.value.isDelay == 0){
message.error("当前任务已超期,请延期后重试!")
return
}
}
}else{
message.error("2D结束时间为空!请确认!")
return
}
}
if(processDesignType.value == 'BLUEPRINT_3D'){
if(formData.value.threeDimDate != null ){
if(formData.value.threeDimDate < date.getTime()){
if(formData.value.isDelay == null || formData.value.isDelay == 0){
message.error("当前任务已超期,请延期后重试!")
return
}
}
}else{
message.error("3D结束时间为空!请确认!")
return
}
}
if(processDesignType.value == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'){
console.log(formData.value.craftEndDate)
if(formData.value.craftEndDate != null ){
console.log(date.getTime())
console.log(formData.value.craftEndDate)
if(formData.value.craftEndDate < date.getTime()){
if(formData.value.isDelay == null || formData.value.isDelay == 0){
message.error("当前任务已超期,请延期后重试!")
return
}
}
}else{
message.error("工艺结束时间为空!请确认!")
return
}
}
if (formData.value.processDesignProgressList.length>0){
for ( var i = 0 ; i < formData.value.processDesignProgressList.length ; i++){
var item = formData.value.processDesignProgressList[i];
if(item.endTime == null || item.endTime == ''){
message.error("结束时间不能为空!请确认!")
return
}
if(item.workTime == null || item.workTime == ''
){
message.error("已做时间不能为空!请确认")
return
}
}
}
const row = {
id: undefined,
processDesignId: undefined,
progress: undefined,
blueprintLink: undefined,
remark: undefined,
createTime: new Date().getTime(),
remark: '',
createTime: date.getTime(),
beginTime:date.getTime(),
endTime:'',
isOver:0,
workTime:undefined,
creatorName: userStore.getUser.nickname,
status: 1,
}
row.processDesignId = formData.value.id
formData.value.processDesignProgressList.unshift(row)
await submitForm('SAVE');
}
const goback = () => {

View File

@ -78,20 +78,13 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
<el-table-column fixed label="序号" align="center" type="index" width="60" />
<el-table-column fixed label="计划单号" align="center" prop="planCode" min-width="180" >
<template #default="scope">
<el-button link type="primary" @click="openDetail('detail', scope.row.id)">
{{ scope.row.planCode }}
</el-button>
</template>
</el-table-column>
<el-table-column fixed label="项目编号" align="center" prop="projectCode" min-width="220" />
<el-table-column fixed label="项目编号" align="center" prop="projectCode" min-width="220" />
<el-table-column fixed label="生产状态" align="center" prop="status" width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PLAN_STATUS" :value="scope.row.planStatus" />
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" prop="customerName" min-width="240" />
<el-table-column fixed label="客户名称" align="center" prop="customerName" min-width="240" />
<el-table-column label="项目名称" align="center" prop="projectName" min-width="180" />
<el-table-column label="所属业务线" align="center" prop="businessLine" min-width="150">
<template #default="scope">
@ -103,6 +96,13 @@
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PROPERTY" :value="scope.row.property" />
</template>
</el-table-column>
<el-table-column label="计划单号" align="center" prop="planCode" min-width="180" >
<template #default="scope">
<el-button link type="primary" @click="openDetail('detail', scope.row.id)">
{{ scope.row.planCode }}
</el-button>
</template>
</el-table-column>
<el-table-column fixed="right" label="项目负责人" align="center" prop="projectOwnerName" min-width="120" />
<el-table-column fixed="right" label="工艺负责人" align="center" prop="craftOwnerName" min-width="120" />
<el-table-column fixed="right" label="工艺起止日期" align="center" prop="craftDate" min-width="240" >

View File

@ -49,33 +49,33 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
<el-table-column fixed label="序号" align="center" type="index" width="60" />
<el-table-column fixed label="计划单号" align="center" prop="planCode" min-width="180">
<el-table-column fixed label="项目编号" align="center" prop="projectCode" min-width="220" />
<el-table-column fixed label="生产状态" align="center" prop="status" width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PLAN_STATUS" :value="scope.row.planStatus" />
</template>
</el-table-column>
<el-table-column fixed label="客户名称" align="center" prop="customerName" min-width="300" />
<el-table-column label="项目名称" align="center" prop="projectName" min-width="180" />
<el-table-column label="子项目名称" align="center" prop="projectSubName" min-width="180" />
<el-table-column label="性质" align="center" prop="property" min-width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PROPERTY" :value="scope.row.property" />
</template>
</el-table-column>
<el-table-column label="计划单号" align="center" prop="planCode" min-width="180">
<template #default="scope">
<el-button link type="primary" @click="openDetail('detail', scope.row.id)">
{{ scope.row.planCode }}
</el-button>
</template>
</el-table-column>
<el-table-column fixed label="项目编号" align="center" prop="projectCode" min-width="220" />
<el-table-column fixed label="生产状态" align="center" prop="status" width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PLAN_STATUS" :value="scope.row.planStatus" />
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" prop="customerName" min-width="300" />
<el-table-column label="项目名称" align="center" prop="projectName" min-width="180" />
<el-table-column label="子项目名称" align="center" prop="projectSubName" min-width="180" />
<el-table-column label="子项目编号" align="center" prop="projectSubCode" min-width="350" />
<el-table-column label="所属业务线" align="center" prop="businessLine" min-width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_BUSINESS_LINE" :value="scope.row.businessLine" />
</template>
</el-table-column>
<el-table-column label="性质" align="center" prop="property" min-width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PROPERTY" :value="scope.row.property" />
</template>
</el-table-column>
<el-table-column fixed="right" label="毛坯负责人" align="center" prop="blankOwnerName" min-width="120" />
<el-table-column fixed="right" label="毛坯截止日期" align="center" prop="blankDate" :formatter="dateFormatter2" min-width="140" />
<el-table-column fixed="right" label="最新进度" align="center" prop="progress" min-width="120">

View File

@ -80,6 +80,7 @@ const handleSelectionChange = (val: []) => {
}
const clickRow = (row: any) => {
console.log(row)
if (chkboxEnable.value) {
if (row) {
multipleTable.value!.toggleRowSelection(row, undefined)
@ -90,12 +91,7 @@ const clickRow = (row: any) => {
}
//key,
const getRowKeys = (row) => {
if (formType.value == 'out'){
return `${row.whId}_${row.matCode}_${row.pnId}`
}else {
return row.id
}
}
const queryReqVo: any = reactive({
@ -187,7 +183,7 @@ const open = async (whId: number,type:string) => {
list.value.forEach((row) => {
setTimeout(() => {
multipleTable.value.toggleRowSelection(row, !chkboxEnable.value) //
multipleTable.value.toggleRowSelection(row, !chkboxEnable.value) //
}, 0)
})
try {

View File

@ -180,7 +180,22 @@ class="!w-260px" v-model="formData.createTime" type="date" value-format="x"
<el-col>
<el-checkbox-group v-if="active != 'detail' && formData.dispatchStatus == 1 " v-model="checkList" @change="onAddItem()">
<el-checkbox label="下料" size="large" border />
<el-checkbox label="铣床" size="large" border />
<el-checkbox label="电焊" size="large" border />
<el-checkbox label="开粗" size="large" border />
<el-checkbox label="铣床" size="large" border />
<el-checkbox label="车床" size="large" border />
<el-checkbox label="热处理" size="large" border />
<el-checkbox label="磨床" size="large" border />
<el-checkbox label="数控1" size="large" border />
<el-checkbox label="数控2" size="large" border />
<el-checkbox label="火花" size="large" border />
<el-checkbox label="刻字" size="large" border />
<el-checkbox label="网格" size="large" border />
<el-checkbox label="深孔钻" size="large" border />
<el-checkbox label="钻孔" size="large" border />
<!-- 2025 06 01 以下工序关闭 更新为上面的-->
<!-- <el-checkbox label="铣床" size="large" border />
<el-checkbox label="车床" size="large" border />
<el-checkbox label="热处理" size="large" border />
<el-checkbox label="磨床" size="large" border />
@ -189,10 +204,9 @@ class="!w-260px" v-model="formData.createTime" type="date" value-format="x"
<el-checkbox label="电火花" size="large" border />
<el-checkbox label="刻字" size="large" border />
<el-checkbox label="电焊" size="large" border />
<el-checkbox label="钻孔" size="large" border />
<!-- <el-checkbox label="装配" size="large" border />-->
<el-checkbox label="编程" size="large" border />
<el-checkbox label="开粗" size="large" border />
<el-checkbox label="钻孔" size="large" border /> -->
<!-- <el-checkbox label="编程" size="large" border />
<el-checkbox label="开粗" size="large" border /> -->
</el-checkbox-group>
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增</el-button> -->
</el-col>
@ -247,6 +261,16 @@ class="!w-260px" v-model="formData.createTime" type="date" value-format="x"
<!-- </el-form-item> -->
</template>
</el-table-column>
<el-table-column fixed label="过程检" align="center" prop="testYn" width="120px" >
<template #default="{ row, $index }">
<el-form-item :prop="`${$index}.testYn`" class="mb-0px!">
<el-radio-group size="small" :disabled="detailDisabled||row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.testYn" >
<el-radio-button label="N"></el-radio-button>
<el-radio-button label="Y"></el-radio-button>
</el-radio-group>
</el-form-item>
</template>
</el-table-column>
<el-table-column fixed label="派工类型" align="center" prop="dispatchType" width="145px">
<template #header>派工类型</template>
<template #default="{ row }">
@ -516,6 +540,7 @@ import EquipmentSelect from "@/views/heli/hlvuestyle/equipmentSelect.vue";
import ProductProcessPrint from "./ProductProcessPrint.vue";
import * as EquipManufactureApi from '@/api/heli/equipmanufacture';
import * as TaskdispatchApi from '@/api/heli/taskdispatch';
import * as PlanApi from '@/api/heli/plan'
import {
ElDialog,
ElTable,
@ -1188,6 +1213,7 @@ const personList = ref([])
const ownerList1 = ref<OwnerListType[]>([]);
const ownerList2 = ref<OwnerListPostType[]>([]);
const dispatchListTemp = ref([])
const craftInfos = ref([])
const queryData = async (id?: number) => {
resetForm()
//
@ -1196,6 +1222,8 @@ const queryData = async (id?: number) => {
try {
dispatchListTemp.value = []
formData.value = await TaskDispatchApi.getTaskDispatch(id)
var planData = await PlanApi.getPlan(formData.value.planId);
craftInfos.value = eval( planData.craftContent)
formData.value.taskDispatchDetails = await TaskDispatchApi.getTaskDispatchDetailListByDispatchId(id)
checkList.value = [];
if(formData.value.taskDispatchDetails!=null){
@ -1218,7 +1246,8 @@ const queryData = async (id?: number) => {
personList.value = await TaskDispatchApi.getOwnerList(formData.value.ownerId,1);
postList.value = await TaskDispatchApi.getOwnerList(formData.value.ownerId,2);
ownerList1.value = await getOwnerListThis ();
ownerList2.value = await getOwnerPostListThis ();
//20250601 2 ownerList2.value = await getOwnerPostListThis ();
ownerList2 .value.push({index:1,id:'2',label:'2'})
}
formData.value.bomCode = 'BOM-' + formData.value.projectSubCode
@ -1371,6 +1400,7 @@ const submitForm = async (operate) => {
const checkList = ref([])
const checkListTemp = ref([])
/** 新增按钮操作 */
const procedureArrary = ['下料','电焊','编程','开粗','铣床','车床','磨床','数控1','数控2','刻字','网格','深钻孔','钻孔','热处理','火花']
const onAddItem = () => {
//
@ -1411,6 +1441,7 @@ const onAddItem = () => {
amount: undefined,
summary: undefined,
status: 1,
testYn: 'N',
procedureStatus: 0,
beginProduce:0,
dispatchId: undefined,
@ -1428,7 +1459,6 @@ const onAddItem = () => {
if(items.name == element){
row.procedureId = items.id;
row.procedureCode = items.code
console.log(items);
if(items.isReport!= null){
row.isReport = items.isReport;
}
@ -1444,12 +1474,20 @@ const onAddItem = () => {
}
}
if(add){
row.amount = formData.value.amount
row.dispatchId = formData.value.id
row.endTime = formData.value.requiredCompletedDate
list.push(row)
row.sort = i;
i++;
if(procedureArrary.includes(element)){
row.startTime = getStartTime(element);
}
row.isOutsourcing = true;
row.dispatchType = 2
row.postId = '2'
row.amount = formData.value.amount
row.dispatchId = formData.value.id
row.endTime = formData.value.requiredCompletedDate
list.push(row)
row.sort = i;
i++;
}
});
@ -1459,6 +1497,35 @@ const onAddItem = () => {
}
}
const getStartTime = ( element : string) =>{
//20250601
// \ = /
// =/
// =
// =
// =
// :
/**
*
*
*
*/
if(element == '下料' || element == '电焊'){
return craftInfos.value[0].startDate;
}else if(element == '编程' || element == '开粗' || element == '铣床' || element == '车床' || element == '磨床' || element == '数控1' || element == '数控2' ||element == '刻字' ||
element == '网格' || element == '深钻孔' || element == '钻孔'
){
return craftInfos.value[1].startDate
}else if(element == '热处理'){
return craftInfos.value[2].startDate
}else if(element == '火花'){
return craftInfos.value[3].startDate
}else{
return ''
}
}
type OwnerListType = {
index: number;
id: number;
@ -1527,6 +1594,14 @@ const onDeleteItem = async (row,index) => {
message.success(t('common.delSuccess'))
}
const handleOutsourcingChange= async (row: any) => {
if(row.isOutsourcing == true){
row.dispatchType = 1
row.postId = ''
}else{
row.dispatchType = 2
row.owner = ''
row.postId = '2'
}
}
const handleSelectedProcedure = async (row: any) => {

View File

@ -2,13 +2,42 @@
<view class="popup-container" v-if="showPopup">
<view class="popup-mask" @click="onMaskClick"></view>
<view class="popup-content">
<text class="popup-title">进度百分比%:</text>
<!-- <text class="popup-title">进度百分比%:</text>
<input type="number" class="popup-input" v-model="progress" placeholder="请输入进度">
<view class="product-item">图纸链接</view>
<input type="text" class="popup-input" v-model="imageLink" placeholder="请输入图片链接">
<input type="text" class="popup-input" v-model="imageLink" placeholder="请输入图片链接"> -->
<view class="product-item">备注</view>
<uni-easyinput type="textarea" class="popup-input" v-model="remark" placeholder="请输入备注"/>
<button style="margin-top: 5%;" size="10px" type="primary" @click="onClose">确认上报</button>
<div class="container">
<div class="one-area">开始时间</div>
<div class="one-area">结束时间</div>
<div class="one-area">已做时间(小时)</div>
<div class="one-area">备注</div>
</div>
<div v-for="(item,index) in detailList" :key="index">
<div class="container1">
<div class="one-area1">
<uni-data-select v-model="item.procedureId" :localdata="procedureData"></uni-data-select>
</div>
<div class="one-area2">
<uni-data-select v-model="item.userId" :localdata="ownerData"
placeholder="请选择责任人"></uni-data-select>
<!-- <lfj-dropdown-box v-model="item.userId" :loadStatus="loadStatus" placeholder="请选择责任人"
dropDownLoading rightTextShow filterable :localdata="ownerData"
@lower="lower"></lfj-dropdown-box> -->
</div>
<div class="one-area1">
<uni-easyinput type="number" v-model="item.responsibilityRatio" placeholder="请输入比例" />
</div>
<div class="one-area1">
<button class="uni-button" size="mini" type="warn"
@click="deletedDetailList(item.index)">删除</button>
</div>
</div>
</div>
</view>
</view>
</template>
@ -61,6 +90,40 @@ watchEffect(() => {
<style scoped>
.container {
display: flex;
width: 630rpx;
margin-top: -10%;
}
.container1 {
display: flex;
width: 100%;
}
.one-area {
flex: 1;
text-align: center;
padding: 12px;
font-size: 15px;
font-weight: bold;
}
.one-area1 {
flex: 1;
text-align: center;
padding: 2px;
font-size: 15px;
font-weight: bold;
}
.one-area2 {
flex: 1.2;
text-align: center;
padding: 2px;
font-size: 15px;
font-weight: bold;
}
.popup-title {
margin-bottom: 20px;

View File

@ -1,430 +1,456 @@
<script setup lang="ts">
import { onMounted, computed, ref } from 'vue'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { getListAPI, getDictAPI,getListWxAPI,getTaskDetailAPI } from '@/services/productionReport'
import { useLoginStore } from '@/stores/modules/login'
import { formatDate } from '@/utils/index'
import { onMounted, computed, ref } from 'vue'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { getListAPI, getDictAPI, getListWxAPI, getTaskDetailAPI } from '@/services/productionReport'
import { useLoginStore } from '@/stores/modules/login'
import { formatDate } from '@/utils/index'
const userStore = useLoginStore()
const userId = userStore.userInfo.userId
const userStore = useLoginStore()
const userId = userStore.userInfo.userId
//
const isFinish = ref(false)
//
const isTriggered = ref(false)
// porps
const props = defineProps<{
orderState: string
}>()
const isOverBeforeProcedure = async(id:number) =>{
const params = {
id,
//
const isFinish = ref(false)
//
const isTriggered = ref(false)
// porps
const props = defineProps<{
orderState : string
}>()
const noticeMsg = ref('')
const isOverBeforeProcedure = async (id : number) => {
const params = {
id,
}
const data = await getTaskDetailAPI(params)
console.log(data.testYn)
if (data.beforeProcedureStatus == 0) {
//
noticeMsg.value = '上一道工序尚未完成报工!';
return true;
}else if(data.testYn != 'Y'){
noticeMsg.value = '上道工序过程检没有完成,请确认!';
return true;
}else {
return false;
}
}
const data = await getTaskDetailAPI(params)
if(data.beforeProcedureStatus == 0){
//
return true;
}else{
return false;
const statusText = computed(() => {
const text = props.orderState == '0,1' ? '处理' : '查看'
return text
})
//
const isLoading = ref(false)
//
const queryParams : Required<any> = {
pageNo: 1,
pageSize: 5,
owner: userId, //
procedureStatusList: props.orderState, //
dispatchType: 'PRODUCTION', //
isReport: 1, //
//20250601/
subOrDetailName:'',
}
}
const statusText = computed(() => {
const text = props.orderState == '0,1' ? '处理' : '查看'
return text
})
//
const isLoading = ref(false)
//
const queryParams: Required<any> = {
pageNo: 1,
pageSize: 5,
owner: userId, //
procedureStatusList: props.orderState, //
dispatchType: 'PRODUCTION', //
isReport: 1, //
}
const dataList = ref([])
const getListData = async () => {
// 退
if (isLoading.value) return
if (isFinish.value === true) {
return uni.showToast({ icon: 'none', title: '没有更多数据~' })
}
isLoading.value = true
//
// const data = await getListAPI(queryParams)
const data = await getListWxAPI(queryParams)
isLoading.value = false
data.list.forEach((e) => {
e.orderTime = formatDate(e.orderTime, 'YYYY-MM-DD')
e.startTime = formatDate(e.startTime, 'YYYY-MM-DD')
e.endTime = formatDate(e.endTime, 'YYYY-MM-DD')
})
//
dataList.value.push(...data.list)
//
if (queryParams.pageNo < data.total) {
//
queryParams.pageNo++
} else {
//
isFinish.value = true
}
}
const dataList = ref([])
const getListData = async () => {
if(props.orderState == '2'){
queryParams.subOrDetailName = '';
}
// 退
if (isLoading.value) return
if (isFinish.value === true) {
return uni.showToast({ icon: 'none', title: '没有更多数据~' })
}
isLoading.value = true
//
// const data = await getListAPI(queryParams)
const data = await getListWxAPI(queryParams)
isLoading.value = false
data.list.forEach((e) => {
e.orderTime = formatDate(e.orderTime, 'YYYY-MM-DD')
e.startTime = formatDate(e.startTime, 'YYYY-MM-DD')
e.endTime = formatDate(e.endTime, 'YYYY-MM-DD')
})
//
dataList.value.push(...data.list)
//
if (queryParams.pageNo < data.total) {
//
queryParams.pageNo++
} else {
//
isFinish.value = true
}
}
const todayStr = ref('');
onMounted(async () => {
const today = new Date();
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0');
const day = String(today.getDate()).padStart(2, '0');
onMounted(async () => {
await getListData()
})
todayStr.value = `${year}-${month}-${day}`;
await getListData()
})
onShow(async () => {
isFinish.value = false
isLoading.value = false
queryParams.pageNo = 1
dataList.value = []
await getListData()
})
onShow(async () => {
isFinish.value = false
isLoading.value = false
queryParams.pageNo = 1
dataList.value = []
await getListData()
})
const handleDetail = async(item) => {
var isoverBefore= await isOverBeforeProcedure(item.id);
if(isoverBefore == true){
uni.showToast({
title: '上一道工序尚未完成报工!',
icon: 'none',
duration: 2000,
})
return
}
const url = `/pages/productionReport/productionReport-detail?id=${item.id}`
uni.navigateTo({ url })
}
const handleDetail = async (item) => {
var isoverBefore = await isOverBeforeProcedure(item.id);
if (isoverBefore == true) {
uni.showToast({
title: noticeMsg.value,
icon: 'none',
duration: 2000,
})
return
}
const url = `/pages/productionReport/productionReport-detail?id=${item.id}`
uni.navigateTo({ url })
}
//
const onRefresherrefresh = async () => {
//
isTriggered.value = true
//
queryParams.pageNo = 1
dataList.value = []
isFinish.value = false
//
await getListData()
//
isTriggered.value = false
}
// const searchVal = ref('')
// const dataListDefault = ref([])
// const handleSearch = async () => {
// const code = searchVal.value
// if (code) {
// dataListDefault.value = dataList.value
// dataList.value = dataList.value.filter((e) => {
// return e.code == code
// })
// } else {
// dataList.value = dataListDefault.value
// }
// }
//
const onRefresherrefresh = async () => {
//
isTriggered.value = true
//
queryParams.pageNo = 1
dataList.value = []
isFinish.value = false
//
await getListData()
//
isTriggered.value = false
}
const searchVal = ref('')
// const dataListDefault = ref([])
const handleSearch = async () => {
queryParams.subOrDetailName = searchVal.value;
queryParams.pageNo = 1;
isFinish.value = false;
dataList.value = []
await getListData()
}
</script>
<template>
<view class="cont">
<!-- <view class="search" v-if="dataList.length > 5">
<view class="title"></view>
<input class="uni-input" v-model="searchVal" @change="handleSearch" placeholder="根据编号搜索" />
</view> -->
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered"
@refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
<view class="item" v-for="item in dataList" :key="item.id" @click="handleDetail(item)">
<view class="hd">
<view class="num">派工单</view>
<view class="statusLabel">{{ '(单号:'+ item.dispatchCode+') '}}</view>
<view class="num">下一道工序</view>
<view class="statusLabel " >{{ item.nextProcedureName == null ? '无':item.nextProcedureName}}</view>
</view>
<view class="md">
<view class="product-item">项目名称{{ item.projectCode + ' ' + item.projectName }}</view>
<view class="product-item">子项目{{ item.projectSubCode || '' }} {{' ' + item.projectSubName }}</view>
<view class="product-row">
<view class="row-item">
<view class="label">零件名称: {{ item.materialName }}</view>
</view>
<view class="row-item">
<view class="label">派工工序: {{ item.procedureName }}</view>
</view>
</view>
<view class="product-row">
<view class="row-item">
<view class="label">派工数量</view>
<view class="val">{{ item.amount }}</view>
</view>
<view class="row-item">
<view class="label">总报工数量</view>
<view class="val high-color">{{ item.totalReportAmount }}</view>
</view>
</view>
<view class="product-row">
<view class="row-item">
<view class="label">预计工时</view>
<view class="val">{{ item.workTime }}</view>
</view>
<view class="row-item">
<view class="label">总报工工时</view>
<view class="val high-color">{{ item.totalWorkTime }}</view>
</view>
</view>
<view class="product-item">预计生产日期{{ item.startTime }} {{ item.endTime }}</view>
</view>
<view class="statusText">{{ statusText }}</view>
</view>
<!-- 底部提示文字 -->
<view class="loading-text" :style="{ paddingBottom: safeAreaInsets?.bottom + 'px' }">
{{ isFinish ? '没有更多数据~' : '正在加载...' }}
</view>
</scroll-view>
</view>
<view class="cont">
<view class="search" v-if="props.orderState == '0,1' ">
<input class="uni-input" v-model="searchVal" placeholder="请输入项目或子项目名称" />
<uni-icons type="search" size="30" class="icons" @click="handleSearch"></uni-icons>
</view>
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered"
@refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
<view class="item" v-for="item in dataList" :key="item.id" @click="handleDetail(item)">
<view class="hd">
<view class="num">派工单</view>
<view class="statusLabel">{{ '(单号:'+ item.dispatchCode+') '}}</view>
<view class="num">{{ '下工序:'+ (item.nextProcedureName == null ? '无':item.nextProcedureName)}}</view>
<!-- <view class="statusLabel " ></view> -->
</view>
<view class="md">
<view class="product-item">项目名称{{ item.projectCode + ' ' + item.projectName }}</view>
<view class="product-item">子项目{{ item.projectSubCode || '' }} {{' ' + item.projectSubName }}</view>
<view class="product-row">
<view class="row-item">
<view class="label">零件名称: {{ item.materialName }}</view>
</view>
<view class="row-item">
<view class="label">派工工序: {{ item.procedureName }}</view>
</view>
</view>
<view class="product-row">
<view class="row-item">
<view class="label">派工数量</view>
<view class="val">{{ item.amount }}</view>
</view>
<view class="row-item">
<view class="label">总报工数量</view>
<view class="val high-color">{{ item.totalReportAmount }}</view>
</view>
</view>
<view class="product-row">
<view class="row-item">
<view class="label">预计工时</view>
<view class="val">{{ item.workTime }}</view>
</view>
<view class="row-item">
<view class="label">总报工工时</view>
<view class="val high-color">{{ item.totalWorkTime }}</view>
</view>
</view>
<view class="product-item" :style=" item.endTime < todayStr ? 'color:red':null">预计生产日期{{ item.startTime }} {{ item.endTime }}</view>
</view>
<view class="statusText">{{ statusText }}</view>
</view>
<!-- 底部提示文字 -->
<view class="loading-text" :style="{ paddingBottom: safeAreaInsets?.bottom + 'px' }">
{{ isFinish ? '没有更多数据~' : '正在加载...' }}
</view>
</scroll-view>
</view>
</template>
<style lang="scss">
//
//
.search {
padding: 4rpx;
width: 80%;
margin: 30rpx auto;
padding: 0rpx;
width: 90%;
margin: auto;
margin-top: 20rpx;
position: relative;
.uni-input {
border: 1px solid #D1D6DB;
border: 1px solid #d1d6db;
height: 60rpx;
line-height: 60rpx;
padding: 4rpx 10rpx;
font-size: 32rpx;
border-radius: 6rpx;
}
}
.data-list {
height: 90vh;
.item {
position: relative;
padding: 20rpx 0;
margin: 20rpx 20rpx;
border-radius: 10rpx;
background-color: #fff;
.hd {
padding: 10rpx;
font-size: 28rpx;
display: flex;
.statusLabel {
font-size: 24rpx;
color: #737D88;
}
}
.md {
position: relative;
padding: 10rpx;
min-height: 100rpx;
font-size: 28rpx;
border-top: 2rpx solid #F2F2F2;
.product-item {
margin: 20rpx 0;
display: flex;
align-items: center;
color: #737D88
}
.product-row {
margin: 20rpx 0;
display: flex;
flex-direction: row;
justify-content: space-between;
color: #737D88;
.row-item {
flex: 1;
.label {
margin-bottom: 10rpx;
}
.val {
color: #1D2129;
&.high-color {
color: #00B42A
}
}
}
}
}
.statusText {
position: absolute;
right: 30rpx;
top: 100rpx;
border-radius: 10rpx;
font-size: 24rpx;
padding: 10rpx 30rpx;
border-radius: 10rpx;
font-size: 24rpx;
background: linear-gradient(149deg, #2DACE6 4%, #356899 98%);
color: #fff;
}
&:last-child {
padding-bottom: 40rpx;
}
}
.status {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
color: #999;
margin-bottom: 15rpx;
.date {
color: #666;
flex: 1;
}
.primary {
color: #ff9240;
}
.icon-delete {
line-height: 1;
margin-left: 10rpx;
padding-left: 10rpx;
border-left: 1rpx solid #e3e3e3;
}
}
.goods {
display: flex;
margin-bottom: 20rpx;
.cover {
width: 170rpx;
height: 170rpx;
margin-right: 20rpx;
border-radius: 10rpx;
overflow: hidden;
position: relative;
.image {
width: 170rpx;
height: 170rpx;
}
}
.quantity {
position: absolute;
bottom: 0;
right: 0;
line-height: 1;
padding: 6rpx 4rpx 6rpx 8rpx;
font-size: 24rpx;
color: #fff;
border-radius: 10rpx 0 0 0;
background-color: rgba(0, 0, 0, 0.6);
}
.meta {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.name {
height: 80rpx;
font-size: 26rpx;
color: #444;
}
.type {
line-height: 1.8;
padding: 0 15rpx;
margin-top: 10rpx;
font-size: 24rpx;
align-self: flex-start;
border-radius: 4rpx;
color: #888;
background-color: #f7f7f8;
}
.more {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #333;
}
}
.payment {
display: flex;
justify-content: flex-end;
align-items: center;
line-height: 1;
padding: 20rpx 0;
text-align: right;
color: #999;
font-size: 28rpx;
border-bottom: 1rpx solid #eee;
.quantity {
font-size: 24rpx;
margin-right: 16rpx;
}
.amount {
color: #444;
margin-left: 6rpx;
}
.symbol {
font-size: 20rpx;
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
padding-top: 20rpx;
.button {
width: 180rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 20rpx;
border-radius: 60rpx;
border: 1rpx solid #ccc;
font-size: 26rpx;
color: #444;
}
.secondary {
color: #3775F6;
border-color: #3775F6;
}
.primary {
color: #fff;
background-color: #3775F6;
border-color: #3775F6;
}
}
.loading-text {
text-align: center;
font-size: 28rpx;
color: #666;
padding: 20rpx 0;
.icons {
width: 30rpx;
position: absolute;
right: 40rpx;
top: 0rpx;
}
}
.data-list {
height: 90vh;
.item {
position: relative;
padding: 20rpx 0;
margin: 20rpx 20rpx;
border-radius: 10rpx;
background-color: #fff;
.hd {
padding: 10rpx;
font-size: 28rpx;
display: flex;
.statusLabel {
font-size: 24rpx;
color: #737D88;
}
}
.md {
position: relative;
padding: 10rpx;
min-height: 100rpx;
font-size: 28rpx;
border-top: 2rpx solid #F2F2F2;
.product-item {
margin: 20rpx 0;
display: flex;
align-items: center;
color: #737D88
}
.product-row {
margin: 20rpx 0;
display: flex;
flex-direction: row;
justify-content: space-between;
color: #737D88;
.row-item {
flex: 1;
.label {
margin-bottom: 10rpx;
}
.val {
color: #1D2129;
&.high-color {
color: #00B42A
}
}
}
}
}
.statusText {
position: absolute;
right: 30rpx;
top: 100rpx;
border-radius: 10rpx;
font-size: 24rpx;
padding: 10rpx 30rpx;
border-radius: 10rpx;
font-size: 24rpx;
background: linear-gradient(149deg, #2DACE6 4%, #356899 98%);
color: #fff;
}
&:last-child {
padding-bottom: 40rpx;
}
}
.status {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
color: #999;
margin-bottom: 15rpx;
.date {
color: #666;
flex: 1;
}
.primary {
color: #ff9240;
}
.icon-delete {
line-height: 1;
margin-left: 10rpx;
padding-left: 10rpx;
border-left: 1rpx solid #e3e3e3;
}
}
.goods {
display: flex;
margin-bottom: 20rpx;
.cover {
width: 170rpx;
height: 170rpx;
margin-right: 20rpx;
border-radius: 10rpx;
overflow: hidden;
position: relative;
.image {
width: 170rpx;
height: 170rpx;
}
}
.quantity {
position: absolute;
bottom: 0;
right: 0;
line-height: 1;
padding: 6rpx 4rpx 6rpx 8rpx;
font-size: 24rpx;
color: #fff;
border-radius: 10rpx 0 0 0;
background-color: rgba(0, 0, 0, 0.6);
}
.meta {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.name {
height: 80rpx;
font-size: 26rpx;
color: #444;
}
.type {
line-height: 1.8;
padding: 0 15rpx;
margin-top: 10rpx;
font-size: 24rpx;
align-self: flex-start;
border-radius: 4rpx;
color: #888;
background-color: #f7f7f8;
}
.more {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #333;
}
}
.payment {
display: flex;
justify-content: flex-end;
align-items: center;
line-height: 1;
padding: 20rpx 0;
text-align: right;
color: #999;
font-size: 28rpx;
border-bottom: 1rpx solid #eee;
.quantity {
font-size: 24rpx;
margin-right: 16rpx;
}
.amount {
color: #444;
margin-left: 6rpx;
}
.symbol {
font-size: 20rpx;
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
padding-top: 20rpx;
.button {
width: 180rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 20rpx;
border-radius: 60rpx;
border: 1rpx solid #ccc;
font-size: 26rpx;
color: #444;
}
.secondary {
color: #3775F6;
border-color: #3775F6;
}
.primary {
color: #fff;
background-color: #3775F6;
border-color: #3775F6;
}
}
.loading-text {
text-align: center;
font-size: 28rpx;
color: #666;
padding: 20rpx 0;
}
}
</style>import type { stringify } from 'querystring';

View File

@ -1,14 +1,13 @@
/*
* @Author:
* @Author:
* @Date: 2024-01-04 12:54:56
* @LastEditors:
* @LastEditors:
* @LastEditTime: 2024-03-26 14:38:12
* @FilePath: /hl-app/src/services/constants.ts
* @Description: ,`customMade`, koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// export const serviceDomain = 'https://nxhs.cjyx.cc'
// export const serviceDomain = 'https://star.hz-hl.com'
export const serviceDomain = 'https://star.hz-hl.com'
// export const serviceDomain = 'http://222.71.165.187:9010'
// export const serviceDomain = 'http://localhost:8080'
export const serviceDomain = 'https://nxhs.cjyx.cc'
// export const serviceDomain = 'http://localhost:8080'
// export const serviceDomain = 'https://nxhs.cjyx.cc'

View File

@ -15,6 +15,16 @@ export const getListAPI = (data: Object) => {
data,
})
}
export interface ProcessDesignVO {
id: number
planId: number
processDesignType: string
remark: string
status: number
projectId: number
projectSubId: number
processDesignProgressList: any
}
/**
* ///
@ -49,7 +59,13 @@ export const getTaskDetailAPI = (id: number) => {
//data,
})
}
export const getProcessDesignProgressListByProcessDesignId = (id: number) => {
return http<any[]>({
method: 'GET',
url: "/heli/process-design/process-design-progress/list-by-process-design-id?processDesignId="+id
//data,
})
}
/**
*
*/
@ -70,6 +86,20 @@ export const postOperateAPIEnd = (data: Object) => {
data,
})
}
export const createProcessDesign = (data: Object) => {
return http<any[]>({
method: 'POST',
url: '/heli/process-design/create',
data,
})
}
export const updateProcessDesign = (data: Object) => {
return http<any[]>({
method: 'PUT',
url: '/heli/process-design/update',
data,
})
}
/**
* -

View File

@ -1,4 +1,4 @@
`uni-sass``uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839

View File

@ -1,3 +1,3 @@
.uni-border {
border: 1px $uni-border-1 solid;
}
}

View File

@ -9,31 +9,31 @@
@mixin get-styles($direction,$i,$space,$n){
@if $direction == t {
@include fn($space, top,$i,$n);
}
}
@if $direction == r {
@include fn($space, right,$i,$n);
}
}
@if $direction == b {
@include fn($space, bottom,$i,$n);
}
}
@if $direction == l {
@include fn($space, left,$i,$n);
}
}
@if $direction == x {
@include fn($space, left,$i,$n);
@include fn($space, right,$i,$n);
}
}
@if $direction == y {
@include fn($space, top,$i,$n);
@include fn($space, bottom,$i,$n);
}
}
@if $direction == a {
@if $n {
#{$space}:#{$i*$uni-space-root}px;
} @else {
#{$space}:#{-$i*$uni-space-root}px;
}
}
}
}
@each $orientation in m,p {
@ -45,12 +45,12 @@
}
@for $i from 0 through 16 {
@each $direction in t, r, b, l, x, y, a {
.uni-#{$orientation}#{$direction}-#{$i} {
.uni-#{$orientation}#{$direction}-#{$i} {
@include get-styles($direction,$i,$space,true);
}
.uni-#{$orientation}#{$direction}-n#{$i} {
}
.uni-#{$orientation}#{$direction}-n#{$i} {
@include get-styles($direction,$i,$space,false);
}
}
}
}
}

View File

@ -8,7 +8,7 @@
$child-type: type-of($child);
$parent-is-map: $parent-type == map;
$child-is-map: $child-type == map;
@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
$result: map-merge($result, ( $key: $child ));
}@else {

View File

@ -5,7 +5,6 @@
<excludeFolder url="file://$MODULE_DIR$/heli-app/.idea" />
<excludeFolder url="file://$MODULE_DIR$/mes-ui/mes-ui-admin-vue3/.idea" />
<excludeFolder url="file://$MODULE_DIR$/mes-ui/mes-ui-admin-vue3/dist-pro" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</component>
</module>
</module>