零件进程管理

This commit is contained in:
z 2025-09-05 08:19:16 +08:00
parent 91f88b8eb9
commit 6100b0109a
67 changed files with 1393 additions and 290 deletions

View File

@ -213,5 +213,11 @@ public class MaterialPlanController {
PageResult<MaterialPlanBoomDO> pageResult = materialPlanService.getPartPurchasePages(pageReqVO);
return success(pageResult);
}
@PostMapping("/saveLog")
@Operation(summary = "库存补充")
@PreAuthorize("@ss.hasPermission('heli:process-bom:create')")
public CommonResult<Boolean> saveLog(@Valid @RequestBody TaskDispatchDetailDO detailDO) {
return success(materialPlanService.saveLog(detailDO));
}
}

View File

@ -0,0 +1,95 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
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.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail.PlanSubDetailDO;
import com.chanko.yunxi.mes.module.heli.service.plansubdetail.PlanSubDetailService;
@Tag(name = "管理后台 - 生产计划子项目设计时间明细")
@RestController
@RequestMapping("/heli/plan-sub-detail")
@Validated
public class PlanSubDetailController {
@Resource
private PlanSubDetailService planSubDetailService;
@PostMapping("/create")
@Operation(summary = "创建生产计划子项目设计时间明细")
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:create')")
public CommonResult<Long> createPlanSubDetail(@Valid @RequestBody PlanSubDetailSaveReqVO createReqVO) {
return success(planSubDetailService.createPlanSubDetail(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产计划子项目设计时间明细")
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:update')")
public CommonResult<Boolean> updatePlanSubDetail(@Valid @RequestBody PlanSubDetailSaveReqVO updateReqVO) {
planSubDetailService.updatePlanSubDetail(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产计划子项目设计时间明细")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:delete')")
public CommonResult<Boolean> deletePlanSubDetail(@RequestParam("id") Long id) {
planSubDetailService.deletePlanSubDetail(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产计划子项目设计时间明细")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:query')")
public CommonResult<PlanSubDetailRespVO> getPlanSubDetail(@RequestParam("id") Long id) {
PlanSubDetailDO planSubDetail = planSubDetailService.getPlanSubDetail(id);
return success(BeanUtils.toBean(planSubDetail, PlanSubDetailRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产计划子项目设计时间明细分页")
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:query')")
public CommonResult<PageResult<PlanSubDetailRespVO>> getPlanSubDetailPage(@Valid PlanSubDetailPageReqVO pageReqVO) {
PageResult<PlanSubDetailDO> pageResult = planSubDetailService.getPlanSubDetailPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PlanSubDetailRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产计划子项目设计时间明细 Excel")
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:export')")
@OperateLog(type = EXPORT)
public void exportPlanSubDetailExcel(@Valid PlanSubDetailPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PlanSubDetailDO> list = planSubDetailService.getPlanSubDetailPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产计划子项目设计时间明细.xls", "数据", PlanSubDetailRespVO.class,
BeanUtils.toBean(list, PlanSubDetailRespVO.class));
}
}

View File

@ -0,0 +1,63 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 生产计划子项目设计时间明细分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PlanSubDetailPageReqVO extends PageParam {
@Schema(description = "计划id", example = "13863")
private Long projectPlanId;
@Schema(description = "项目id", example = "11384")
private Long projectId;
@Schema(description = "子项目id", example = "26785")
private Long projectSubId;
@Schema(description = "子项目编码")
private String projectSubCode;
@Schema(description = "设计结束日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] twoDimDate;
@Schema(description = "设计负责人")
private Long twoDimOwner;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "设计开始日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] startTwoDimDate;
@Schema(description = "设计类型(BLUEPRINT_WORKBLANK-毛坯 BLUEPRINT_2D-2D BLUEPRINT_3D-3D)", example = "1")
private String subType;
@Schema(description = "结束( 默认0 1结束")
private Boolean isOverProcess;
@Schema(description = "时间段顺序")
private Long seqNo;
@Schema(description = "设计天数")
private Long designNum;
@Schema(description = "项目编号,唯一")
private String code;
@Schema(description = "子项目名称,唯一", example = "张三")
private String name;
}

View File

@ -0,0 +1,76 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产计划子项目设计时间明细 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlanSubDetailRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "6922")
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "计划id", requiredMode = Schema.RequiredMode.REQUIRED, example = "13863")
@ExcelProperty("计划id")
private Long projectPlanId;
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "11384")
@ExcelProperty("项目id")
private Long projectId;
@Schema(description = "子项目id", example = "26785")
@ExcelProperty("子项目id")
private Long projectSubId;
@Schema(description = "子项目编码")
@ExcelProperty("子项目编码")
private String projectSubCode;
@Schema(description = "设计结束日期")
@ExcelProperty("设计结束日期")
private LocalDateTime twoDimDate;
@Schema(description = "设计负责人")
@ExcelProperty("设计负责人")
private Long twoDimOwner;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "设计开始日期")
@ExcelProperty("设计开始日期")
private LocalDateTime startTwoDimDate;
@Schema(description = "设计类型(BLUEPRINT_WORKBLANK-毛坯 BLUEPRINT_2D-2D BLUEPRINT_3D-3D)", example = "1")
@ExcelProperty("设计类型(BLUEPRINT_WORKBLANK-毛坯 BLUEPRINT_2D-2D BLUEPRINT_3D-3D)")
private String subType;
@Schema(description = "结束( 默认0 1结束")
@ExcelProperty("结束( 默认0 1结束")
private Boolean isOverProcess;
@Schema(description = "时间段顺序")
@ExcelProperty("时间段顺序")
private Long seqNo;
@Schema(description = "设计天数")
@ExcelProperty("设计天数")
private Long designNum;
@Schema(description = "项目编号,唯一")
@ExcelProperty("项目编号,唯一")
private String code;
@Schema(description = "子项目名称,唯一", example = "张三")
@ExcelProperty("子项目名称,唯一")
private String name;
}

View File

@ -0,0 +1,59 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 生产计划子项目设计时间明细新增/修改 Request VO")
@Data
public class PlanSubDetailSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "6922")
private Long id;
@Schema(description = "计划id", requiredMode = Schema.RequiredMode.REQUIRED, example = "13863")
@NotNull(message = "计划id不能为空")
private Long projectPlanId;
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "11384")
@NotNull(message = "项目id不能为空")
private Long projectId;
@Schema(description = "子项目id", example = "26785")
private Long projectSubId;
@Schema(description = "子项目编码")
private String projectSubCode;
@Schema(description = "设计结束日期")
private LocalDateTime twoDimDate;
@Schema(description = "设计负责人")
private Long twoDimOwner;
@Schema(description = "设计开始日期")
private LocalDateTime startTwoDimDate;
@Schema(description = "设计类型(BLUEPRINT_WORKBLANK-毛坯 BLUEPRINT_2D-2D BLUEPRINT_3D-3D)", example = "1")
private String subType;
@Schema(description = "结束( 默认0 1结束")
private Boolean isOverProcess;
@Schema(description = "时间段顺序")
private Long seqNo;
@Schema(description = "设计天数")
private Long designNum;
@Schema(description = "项目编号,唯一")
private String code;
@Schema(description = "子项目名称,唯一", example = "张三")
private String name;
}

View File

@ -195,7 +195,7 @@ public class ProcessBomController {
// vo.setUnit(processBomDO.getUnit() != null ? unitDictData.get(processBomDO.getUnit()) : "");
vo.setSpec(processBomDO.getSpec() != null ? processBomDO.getSpec() : "");
vo.setBlueprintNo(processBomDO.getBlueprintNo() != null ? processBomDO.getBlueprintNo() : "");
vo.setAmount(processBomDO.getAmount() != null ? processBomDO.getAmount() : 0); // Assuming getAmount() returns Integer
vo.setAmount(processBomDO.getAmount() != null ? processBomDO.getAmount().toString() : "0"); // Assuming getAmount() returns Integer
vo.setComposition(processBomDO.getCompositionName() != null ? processBomDO.getCompositionName() : "");
return vo;

View File

@ -44,7 +44,7 @@ public class ProcessBomImportExcelVO {
private String blueprintNo;
@ExcelProperty("*数量")
private Integer amount;
private String amount;
@ExcelProperty("*系统单位")
private String unit;

View File

@ -11,6 +11,7 @@ import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFramewor
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuser.FpUserDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
@ -279,4 +280,16 @@ public class TaskDispatchController {
List<TaskDispatchDO> list= taskDispatchService.getListCl(id,projectSubId);
return success( list);
}
@GetMapping("/taskBbPage")
@Operation(summary = "获得外协零件分页")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<PageResult<TaskDispatchDetailDO>> taskBbPage(@Valid TaskPlanJDBaoBiaoPageReqVO pageReqVO) {
return success(taskDispatchService.taskBbPage(pageReqVO));
}
@GetMapping("/taskPage")
@Operation(summary = "获得非外协零件分页")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<PageResult<TaskDispatchDetailDO>> taskPage(@Valid TaskPlanJDBaoBiaoPageReqVO pageReqVO) {
return success(taskDispatchService.taskPage(pageReqVO));
}
}

View File

@ -24,6 +24,7 @@ public class TaskPlanJDBaoBiaoPageReqVO extends PageParam {
private String projectName;
@Schema(description = "生产计划号")
private String taskNo;
@ -61,4 +62,6 @@ public class TaskPlanJDBaoBiaoPageReqVO extends PageParam {
private Long owner;
@Schema(description = "子项目简码")
private String projectSubCode;
@Schema(description = "子项目简码")
private String blueprintNo;
}

View File

@ -41,7 +41,7 @@ public class OrderYsDetailDO extends BaseDO {
/**
* 回款日期
*/
private LocalDate paymentDate;
private Date paymentDate;
/**
* 回款类型
*/

View File

@ -0,0 +1,85 @@
package com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产计划子项目设计时间明细 DO
*
* @author 管理员
*/
@TableName("project_plan_sub_detail")
@KeySequence("project_plan_sub_detail_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PlanSubDetailDO extends BaseDO {
/**
* 自增字段唯一
*/
@TableId
private Long id;
/**
* 计划id
*/
private Long projectPlanId;
/**
* 项目id
*/
private Long projectId;
/**
* 子项目id
*/
private Long projectSubId;
/**
* 子项目编码
*/
private String projectSubCode;
/**
* 设计结束日期
*/
private LocalDateTime twoDimDate;
/**
* 设计负责人
*/
private Long twoDimOwner;
/**
* 设计开始日期
*/
private LocalDateTime startTwoDimDate;
/**
* 设计类型(BLUEPRINT_WORKBLANK-毛坯 BLUEPRINT_2D-2D BLUEPRINT_3D-3D)
*/
private String subType;
/**
* 结束 默认0 1结束
*/
private Boolean isOverProcess;
/**
* 时间段顺序
*/
private Long seqNo;
/**
* 设计天数
*/
private Long designNum;
/**
* 项目编号唯一
*/
private String code;
/**
* 子项目名称唯一
*/
private String name;
}

View File

@ -251,4 +251,12 @@ public class TaskDispatchDetailDO extends BaseDO {
private Long users;
@TableField(exist = false)
private BigDecimal bgWorkTimes;
@TableField(exist = false)
private Integer dispatchStatus;
@TableField(exist = false)
private Integer pgType;
@TableField(exist = false)
private Integer receivingStatus;
@TableField(exist = false)
private Integer mplanStatus;
}

View File

@ -0,0 +1,59 @@
package com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetaillog;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
/**
* 派工明细 DO
*
* @author 管理员
*/
@TableName("pro_task_dispatch_detail_log")
@KeySequence("pro_task_dispatch_detail_log_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TaskDispatchDetailLogDO extends BaseDO {
/**
* 自增字段唯一
*/
@TableId
private Long id;
/**
* 派工单明细id
*/
private Long dispatchDetailId;
/**
* 负责人
*/
private Long owner;
/**
* 需求计划责任人
*/
private Long duEmpId;
/**
* 订单子项目名称
*/
private String projectSubName;
/**
* 零件号
*/
private String blueprintNo;
/**
* 零件名称
*/
private String boomName;
/**
* 工序名称
*/
private String procedureName;
}

View File

@ -0,0 +1,39 @@
package com.chanko.yunxi.mes.module.heli.dal.mysql.plansubdetail;
import java.util.*;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail.PlanSubDetailDO;
import org.apache.ibatis.annotations.Mapper;
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.*;
/**
* 生产计划子项目设计时间明细 Mapper
*
* @author 管理员
*/
@Mapper
public interface PlanSubDetailMapper extends BaseMapperX<PlanSubDetailDO> {
default PageResult<PlanSubDetailDO> selectPage(PlanSubDetailPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<PlanSubDetailDO>()
.eqIfPresent(PlanSubDetailDO::getProjectPlanId, reqVO.getProjectPlanId())
.eqIfPresent(PlanSubDetailDO::getProjectId, reqVO.getProjectId())
.eqIfPresent(PlanSubDetailDO::getProjectSubId, reqVO.getProjectSubId())
.eqIfPresent(PlanSubDetailDO::getProjectSubCode, reqVO.getProjectSubCode())
.betweenIfPresent(PlanSubDetailDO::getTwoDimDate, reqVO.getTwoDimDate())
.eqIfPresent(PlanSubDetailDO::getTwoDimOwner, reqVO.getTwoDimOwner())
.betweenIfPresent(PlanSubDetailDO::getCreateTime, reqVO.getCreateTime())
.betweenIfPresent(PlanSubDetailDO::getStartTwoDimDate, reqVO.getStartTwoDimDate())
.eqIfPresent(PlanSubDetailDO::getSubType, reqVO.getSubType())
.eqIfPresent(PlanSubDetailDO::getIsOverProcess, reqVO.getIsOverProcess())
.eqIfPresent(PlanSubDetailDO::getSeqNo, reqVO.getSeqNo())
.eqIfPresent(PlanSubDetailDO::getDesignNum, reqVO.getDesignNum())
.eqIfPresent(PlanSubDetailDO::getCode, reqVO.getCode())
.likeIfPresent(PlanSubDetailDO::getName, reqVO.getName())
.orderByDesc(PlanSubDetailDO::getId));
}
}

View File

@ -30,6 +30,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatch
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetailowner.TaskDispatchDetailOwnerDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplanboom.MaterialPlanBoomMapper;
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.apache.ibatis.annotations.Mapper;
@ -797,4 +798,75 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
BigDecimal finalInspection(@Param("id")Long id, @Param("projectSubId")Long projectSubId);
BigDecimal processInspection(@Param("id") Long id);
default PageResult<TaskDispatchDetailDO> taskPage( TaskPlanJDBaoBiaoPageReqVO pageReqVO){
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
query.selectAll(TaskDispatchDetailDO.class)
.select("g.name as procedureName,d.material_name as materialName")
.select("a.dispatch_status as dispatchStatus")
.select("CASE " +
" WHEN pg.pg_Type = 1 THEN 2 " + // pg类型为1
" WHEN MAX(CASE WHEN l.ent_time IS NOT NULL THEN 1 ELSE 0 END) = 1 THEN 1 " + // 只要有一条l.ent_time不为空就是1
" ELSE 0 " + // 其他情况
"END AS pgType")
.leftJoin(TaskDispatchDO.class, "a", TaskDispatchDO::getId, TaskDispatchDetailDO::getDispatchId)
.leftJoin(ProjectOrderDO.class, "b", ProjectOrderDO::getId, TaskDispatchDO::getProjectId)
.leftJoin(ProjectOrderSubDO.class, "c", ProjectOrderSubDO::getId, TaskDispatchDO::getProjectSubId)
.leftJoin(ProcessBomDetailDO.class, "d", ProcessBomDetailDO::getId, TaskDispatchDO::getBomDetailId)
.leftJoin(ProcessBomDO.class,"i",ProcessBomDO::getId,ProcessBomDetailDO::getBomId)
.leftJoin(ProcedureDO.class, "g", ProcedureDO::getId, TaskDispatchDetailDO::getProcedureId)
.leftJoin(PgMasterLineDO.class, "pg", PgMasterLineDO::getDispatchDetailId, TaskDispatchDetailDO::getId)
.leftJoin(BgMasterLineDO.class,"l",BgMasterLineDO::getZjMxId, PgMasterLineDO::getId)
.groupBy(TaskDispatchDetailDO::getId)
.disableSubLogicDel();
query
.like(!StringUtils.isEmpty(pageReqVO.getProjectCode()), ProjectOrderDO::getCode, pageReqVO.getProjectCode())
.like(!StringUtils.isEmpty(pageReqVO.getBlueprintNo()), ProcessBomDetailDO::getBlueprintNo, pageReqVO.getBlueprintNo())
.like(!StringUtils.isEmpty(pageReqVO.getProjectName()), ProjectOrderDO::getProjectName, pageReqVO.getProjectName())
.like(!StringUtils.isEmpty(pageReqVO.getProjectSubName()), ProjectOrderSubDO::getName, pageReqVO.getProjectSubName())
.like(!StringUtils.isEmpty(pageReqVO.getMaterialName()), ProcessBomDetailDO::getMaterialName, pageReqVO.getMaterialName())
.like(!StringUtils.isEmpty(pageReqVO.getProcdureName()), ProcedureDO::getName, pageReqVO.getProcdureName())
.eq(TaskDispatchDO::getDispatchType, "PRODUCTION")
.eq( TaskDispatchDetailDO::getIsOutsourcing, "N");
return selectPage(pageReqVO, query);
}
default PageResult<TaskDispatchDetailDO> taskBbPage(TaskPlanJDBaoBiaoPageReqVO pageReqVO){
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
query.selectAll(TaskDispatchDetailDO.class)
.select("g.name as procedureName,d.material_name as materialName")
.select("a.dispatch_status as dispatchStatus")
.select("CASE " +
" WHEN pg.pg_Type = 1 THEN 2 " + // pg类型为1
" WHEN MAX(CASE WHEN l.ent_time IS NOT NULL THEN 1 ELSE 0 END) = 1 THEN 1 " + // 只要有一条l.ent_time不为空就是1
" ELSE 0 " + // 其他情况
"END AS pgType")
.select("p.mplan_status as mplanStatus")
.select("n.receiving_status as receivingStatus")
.leftJoin(TaskDispatchDO.class, "a", TaskDispatchDO::getId, TaskDispatchDetailDO::getDispatchId)
.leftJoin(ProjectOrderDO.class, "b", ProjectOrderDO::getId, TaskDispatchDO::getProjectId)
.leftJoin(ProjectOrderSubDO.class, "c", ProjectOrderSubDO::getId, TaskDispatchDO::getProjectSubId)
.leftJoin(ProcessBomDetailDO.class, "d", ProcessBomDetailDO::getId, TaskDispatchDO::getBomDetailId)
.leftJoin(ProcessBomDO.class,"i",ProcessBomDO::getId,ProcessBomDetailDO::getBomId)
.leftJoin(ProcedureDO.class, "g", ProcedureDO::getId, TaskDispatchDetailDO::getProcedureId)
.leftJoin(PgMasterLineDO.class, "pg", PgMasterLineDO::getDispatchDetailId, TaskDispatchDetailDO::getId)
.leftJoin(BgMasterLineDO.class,"l",BgMasterLineDO::getZjMxId, PgMasterLineDO::getId)
.leftJoin(MaterialPlanBoomDO.class,"p",MaterialPlanBoomDO::getId,TaskDispatchDetailDO::getProjectMaterialPlanDetailId)
.leftJoin(PurchaseOrderMakeDetailDO.class,"m",PurchaseOrderMakeDetailDO::getId, MaterialPlanBoomDO::getProjectPurchaseOrderMakeDetailId)
.leftJoin(PurchaseOrderNoDetailDO.class,"n",PurchaseOrderNoDetailDO::getId, PurchaseOrderMakeDetailDO::getPurchaseOrderNoDetailId)
.groupBy(TaskDispatchDetailDO::getId)
.disableSubLogicDel();
query
.like(!StringUtils.isEmpty(pageReqVO.getProjectCode()), ProjectOrderDO::getCode, pageReqVO.getProjectCode())
.like(!StringUtils.isEmpty(pageReqVO.getBlueprintNo()), ProcessBomDetailDO::getBlueprintNo, pageReqVO.getBlueprintNo())
.like(!StringUtils.isEmpty(pageReqVO.getProjectName()), ProjectOrderDO::getProjectName, pageReqVO.getProjectName())
.like(!StringUtils.isEmpty(pageReqVO.getProjectSubName()), ProjectOrderSubDO::getName, pageReqVO.getProjectSubName())
.like(!StringUtils.isEmpty(pageReqVO.getMaterialName()), ProcessBomDetailDO::getMaterialName, pageReqVO.getMaterialName())
.like(!StringUtils.isEmpty(pageReqVO.getProcdureName()), ProcedureDO::getName, pageReqVO.getProcdureName())
.eq(TaskDispatchDO::getDispatchType, "PRODUCTION")
.eq( TaskDispatchDetailDO::getIsOutsourcing, "Y");
return selectPage(pageReqVO, query);
}
}

View File

@ -0,0 +1,19 @@
package com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatchdetaillog;
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetaillog.TaskDispatchDetailLogDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 派工明细 Mapper
*
* @author 管理员
*/
@Mapper
public interface TaskDispatchDetailLogMapper extends BaseMapperX<TaskDispatchDetailLogDO> {
}

View File

@ -84,4 +84,6 @@ public interface MaterialPlanService {
PageResult<MaterialPlanBoomDO> getPartPurchasePages(MaterialPlanPageReqVO pageReqVO);
CommonResult<Boolean> delMaterialPlanBoom(Long id, String projectMaterialPlanNo);
Boolean saveLog(TaskDispatchDetailDO detailDO);
}

View File

@ -17,6 +17,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumber
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetaillog.TaskDispatchDetailLogDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplanboom.MaterialPlanBoomMapper;
@ -25,6 +26,7 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorderno.PurchaseOrderNoMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatchdetaillog.TaskDispatchDetailLogMapper;
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
@ -97,6 +99,8 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
private MaterialMapper materialMapper;
@Resource
private ProcessBomMapper processBomMapper;
@Resource
private TaskDispatchDetailLogMapper taskDispatchDetailLogMapper;
@Override
public Long createMaterialPlan(MaterialPlanSaveReqVO createReqVO) {
// 插入
@ -338,6 +342,7 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
taskDispatchDetailDO.setPlanStatus(1);
taskDispatchDetailDO.setMatPlanProcess("Y");
taskDispatchDetailDO.setProjectMaterialPlanNo(planDO.getProjectMaterialPlanNo());
saveLog(taskDispatchDetailDO);
}
// materialPlanBoomMapper.insertBatch(materialPlanBoomDOList);
taskDispatchDetailMapper.insertOrUpdateBatch(list);
@ -553,10 +558,9 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
LambdaQueryWrapper<MaterialPlanBoomDO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(MaterialPlanBoomDO::getBoomDetailId, taskDispatchDO.getBomDetailId());
queryWrapper.eq(MaterialPlanBoomDO::getProcedureId, taskDispatchDetailDO.getProcedureId());
queryWrapper.in(MaterialPlanBoomDO::getMplanStatus,1,2,3);
queryWrapper.in(MaterialPlanBoomDO::getMplanStatus,1,2);
if (materialPlanBoomMapper.selectCount(queryWrapper) > 0)return CommonResult.error(400,"该零件已送审,不允许删除,请确认!");
materialPlanMapper.delMaterialPlanBoom(taskDispatchDO.getBomDetailId(),taskDispatchDetailDO.getProcedureId());
}
LambdaQueryWrapper<MaterialPlanBoomDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
@ -574,4 +578,18 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
return CommonResult.error(400,"派工单明细不存在,请刷新页面");
}
@Override
public Boolean saveLog(TaskDispatchDetailDO detailDO) {
TaskDispatchDetailLogDO log = new TaskDispatchDetailLogDO();
log.setDispatchDetailId(detailDO.getId());
log.setOwner(detailDO.getOwner());
log.setDuEmpId(detailDO.getDuEmpId());
log.setBoomName(detailDO.getMaterialName());
log.setBlueprintNo(detailDO.getBlueprintNo());
log.setProcedureName(detailDO.getProcedureName());
log.setProjectSubName(detailDO.getProjectSubName());
taskDispatchDetailLogMapper.insert(log);
return true;
}
}

View File

@ -0,0 +1,55 @@
package com.chanko.yunxi.mes.module.heli.service.plansubdetail;
import java.util.*;
import javax.validation.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail.PlanSubDetailDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
/**
* 生产计划子项目设计时间明细 Service 接口
*
* @author 管理员
*/
public interface PlanSubDetailService {
/**
* 创建生产计划子项目设计时间明细
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createPlanSubDetail(@Valid PlanSubDetailSaveReqVO createReqVO);
/**
* 更新生产计划子项目设计时间明细
*
* @param updateReqVO 更新信息
*/
void updatePlanSubDetail(@Valid PlanSubDetailSaveReqVO updateReqVO);
/**
* 删除生产计划子项目设计时间明细
*
* @param id 编号
*/
void deletePlanSubDetail(Long id);
/**
* 获得生产计划子项目设计时间明细
*
* @param id 编号
* @return 生产计划子项目设计时间明细
*/
PlanSubDetailDO getPlanSubDetail(Long id);
/**
* 获得生产计划子项目设计时间明细分页
*
* @param pageReqVO 分页查询
* @return 生产计划子项目设计时间明细分页
*/
PageResult<PlanSubDetailDO> getPlanSubDetailPage(PlanSubDetailPageReqVO pageReqVO);
}

View File

@ -0,0 +1,74 @@
package com.chanko.yunxi.mes.module.heli.service.plansubdetail;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail.PlanSubDetailDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.module.heli.dal.mysql.plansubdetail.PlanSubDetailMapper;
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
/**
* 生产计划子项目设计时间明细 Service 实现类
*
* @author 管理员
*/
@Service
@Validated
public class PlanSubDetailServiceImpl implements PlanSubDetailService {
@Resource
private PlanSubDetailMapper planSubDetailMapper;
@Override
public Long createPlanSubDetail(PlanSubDetailSaveReqVO createReqVO) {
// 插入
PlanSubDetailDO planSubDetail = BeanUtils.toBean(createReqVO, PlanSubDetailDO.class);
planSubDetailMapper.insert(planSubDetail);
// 返回
return planSubDetail.getId();
}
@Override
public void updatePlanSubDetail(PlanSubDetailSaveReqVO updateReqVO) {
// 校验存在
validatePlanSubDetailExists(updateReqVO.getId());
// 更新
PlanSubDetailDO updateObj = BeanUtils.toBean(updateReqVO, PlanSubDetailDO.class);
planSubDetailMapper.updateById(updateObj);
}
@Override
public void deletePlanSubDetail(Long id) {
// 校验存在
validatePlanSubDetailExists(id);
// 删除
planSubDetailMapper.deleteById(id);
}
private void validatePlanSubDetailExists(Long id) {
if (planSubDetailMapper.selectById(id) == null) {
// throw exception(PLAN_SUB_DETAIL_NOT_EXISTS);
}
}
@Override
public PlanSubDetailDO getPlanSubDetail(Long id) {
return planSubDetailMapper.selectById(id);
}
@Override
public PageResult<PlanSubDetailDO> getPlanSubDetailPage(PlanSubDetailPageReqVO pageReqVO) {
return planSubDetailMapper.selectPage(pageReqVO);
}
}

View File

@ -184,7 +184,7 @@ public class ProcessBomServiceImpl implements ProcessBomService {
Map<String, List<ProcessBomImportExcelVO>> groupedByBluePrintfNo = list.stream().collect(Collectors.groupingBy(vo -> vo.getBlueprintNo() == null ? "NULL" : vo.getBlueprintNo()));
Map<String, List<ProcessBomImportExcelVO>> groupedByMaterialName = list.stream().collect(Collectors.groupingBy(vo -> vo.getMaterialName() == null ? "NULL" : vo.getMaterialName()));
Map<String, List<ProcessBomImportExcelVO>> groupedByType = list.stream().collect(Collectors.groupingBy(vo -> vo.getType() == null ? "NULL" : vo.getType()));
Map<String, List<ProcessBomImportExcelVO>> groupedByAmount = list.stream().collect(Collectors.groupingBy(vo -> vo.getAmount() == null ? "NULL" : vo.getAmount().toString()));
Map<String, List<ProcessBomImportExcelVO>> groupedByAmount = list.stream().collect(Collectors.groupingBy(vo -> vo.getAmount() == null ? "NULL" : vo.getAmount()));
Map<String, List<ProcessBomImportExcelVO>> groupedByUnit = list.stream().collect(Collectors.groupingBy(vo -> vo.getUnit() == null ? "NULL" : vo.getUnit()));
// if (CollUtil.isNotEmpty(groupedByCode.get("NULL"))) {
@ -207,7 +207,10 @@ public class ProcessBomServiceImpl implements ProcessBomService {
}
Map<String, List<ProcessBomImportExcelVO>> groupedByAmounts = list.stream()
.collect(Collectors.groupingBy(vo -> {
if (vo.getAmount() <= 0) {
if (!vo.getAmount().matches("[0-9]+")) {
throw new RuntimeException(vo.getAmount() + "不是数字类型");
}
if (Integer.parseInt(vo.getAmount()) <= 0) {
throw exception(PROCESS_BOM_DETAIL_AMOUNT);
}
return vo.getAmount().toString();
@ -377,7 +380,7 @@ public class ProcessBomServiceImpl implements ProcessBomService {
} catch (NumberFormatException e) {
throw exception(PROCESS_BOM_DETAIL_MATERIAL_AMOUNT_ILLGAL);
}
processBomDetailDO.setAmount(o.getAmount());//数量
processBomDetailDO.setAmount(Integer.parseInt(o.getAmount()));//数量
processBomDetailDO.setBomType(1);
processBomDetailDO.setUpdateTimes(LocalDateTime.now());
processBomDetailDO.setStatus(1);//状态-1:正常

View File

@ -3,6 +3,7 @@ package com.chanko.yunxi.mes.module.heli.service.processdesign;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.generator.IFill;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
@ -16,12 +17,14 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.Proces
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail.PlanSubDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesign.ProcessDesignDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesignprogress.ProcessDesignProgressDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.plansubdetail.PlanSubDetailMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.processdesign.ProcessDesignMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.processdesign.ProcessDesignProgressMapper;
import com.chanko.yunxi.mes.module.heli.enums.ProcessDesignTypeEnum;
@ -36,6 +39,7 @@ import org.springframework.validation.annotation.Validated;
import org.yaml.snakeyaml.events.Event;
import javax.annotation.Resource;
import javax.xml.ws.RequestWrapper;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@ -64,6 +68,8 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
private bdgzsomthingMapper bdgzsomthingMapper;
@Resource
private AttentiontodoMapper attentiontodoMapper;
@Resource
private PlanSubDetailMapper planSubDetailMapper;
@Override
public PageResult<ProcessDesignProgressDO> getProcessPage(ProcessDesignProgressPageReqVO pageReqVO) {
return processDesignProgressMapper.selectPage(pageReqVO);
@ -255,6 +261,13 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
@Override
public int over(Long id) {
ProcessDesignDO processDesignDO = processDesignMapper.selectById(id);
LambdaUpdateWrapper<PlanSubDetailDO> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(PlanSubDetailDO::getProjectId, processDesignDO.getProjectId());
wrapper.eq(PlanSubDetailDO::getProjectSubId, processDesignDO.getProjectSubId());
wrapper.eq(PlanSubDetailDO::getSubType, processDesignDO.getProcessDesignType());
wrapper.set(PlanSubDetailDO::getIsOverProcess, 1);
planSubDetailMapper.update(wrapper);
return processDesignMapper.over(id);
}
@ -570,6 +583,13 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
BdgzsomthingDO.setAttr13("1");
bdgzsomthingMapper.insert(BdgzsomthingDO);
}
LambdaUpdateWrapper<PlanSubDetailDO> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(PlanSubDetailDO::getProjectId, processDesignDO.getProjectId());
wrapper.eq(PlanSubDetailDO::getProjectSubId, processDesignDO.getProjectSubId());
wrapper.eq(PlanSubDetailDO::getSubType, processDesignDO.getProcessDesignType());
wrapper.set(PlanSubDetailDO::getIsOverProcess, 0);
planSubDetailMapper.update(wrapper);
}
@Override

View File

@ -108,4 +108,8 @@ public interface TaskDispatchService {
List<TaskDispatchDO> getListCl(Long id, Long projectSubId);
List<HashMap<String, String>> getOwners(Long id);
PageResult<TaskDispatchDetailDO> taskPage( TaskPlanJDBaoBiaoPageReqVO pageReqVO);
PageResult<TaskDispatchDetailDO> taskBbPage(TaskPlanJDBaoBiaoPageReqVO pageReqVO);
}

View File

@ -1213,6 +1213,16 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
return fpUserMapList;
}
@Override
public PageResult<TaskDispatchDetailDO> taskPage( TaskPlanJDBaoBiaoPageReqVO pageReqVO) {
return taskDispatchDetailMapper.taskPage(pageReqVO);
}
@Override
public PageResult<TaskDispatchDetailDO> taskBbPage(TaskPlanJDBaoBiaoPageReqVO pageReqVO) {
return taskDispatchDetailMapper.taskBbPage(pageReqVO);
}
private void updateAssembleDetail(OperateTypeEnum operateTypeEnum,Long dispatchId, List<TaskDispatchDetailOwnerDO> list) {
list.forEach(o -> o.setDispatchId(dispatchId));

View File

@ -0,0 +1,17 @@
package com.chanko.yunxi.mes.module.heli.service.taskdispatchdetaillog;
import java.util.*;
import javax.validation.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetaillog.TaskDispatchDetailLogDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
/**
* 派工明细 Service 接口
*
* @author 管理员
*/
public interface TaskDispatchDetailLogService {
}

View File

@ -0,0 +1,16 @@
package com.chanko.yunxi.mes.module.heli.service.taskdispatchdetaillog;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
/**
* 派工明细 Service 实现类
*
* @author 管理员
*/
@Service
@Validated
public class TaskDispatchDetailLogServiceImpl implements TaskDispatchDetailLogService {
}

View File

@ -103,3 +103,6 @@ export const getPartPurchasePages = async (params) => {
export const delMaterialPlanBoom = async (id: number,projectMaterialPlanNo:string) => {
return await request.delete({ url: `/heli/material-plan/delMaterialPlanBoom?id=` + id+"&projectMaterialPlanNo="+projectMaterialPlanNo})
}
export const saveLog = async (data) => {
return await request.post({ url: `/heli/material-plan/saveLog`, data })
}

View File

@ -94,3 +94,11 @@ export const getTaskDispatchDetailListByDispatchIdAssembly = async (dispatchId)
export const getOwnerUserList = async(id:number,type:number)=>{
return await request.get({url:`/heli/task-dispatch/task-dispatch-detail/getOwnerUserList?id=`+id+`&type=`+type})
}
// 查询派工单分页
export const taskBbPage = async (params) => {
return await request.get({ url: `/heli/task-dispatch/taskBbPage`, params })
}
// 查询派工单分页
export const taskPage = async (params) => {
return await request.get({ url: `/heli/task-dispatch/taskPage`, params })
}

View File

@ -61,7 +61,7 @@ import * as ShopCalendarApi from '@/api/heli/shopCalendar'
import * as UserApi from '@/api/system/user'
defineOptions({
name: 'MaterialPlan'
name: 'ShopCalendar'
})
const router = useRouter()
const message = useMessage() //
@ -123,14 +123,14 @@ const resetQuery = (dates) =>{
message.error("请选择年月后再进行重置")
} else {
//
resetRl(dates)
resetRl(dates)
}
}
const resetRl = async (dates: string) =>{
const data = await ShopCalendarApi.resetRl(dates);
if(data){
ElMessage({
message: '重置成功',
@ -144,13 +144,13 @@ const resetRl = async (dates: string) =>{
/* 设置是否是节假日 */
const handleSwitchChange = (value,dates,times) =>{
var date = formatDate(dates, 'YYYY-MM');
updateJir(value,date,times)
updateJir(value,date,times)
}
const updateJir = async (value: string,dates: string,times: string) =>{
console.log(value+":"+dates+":"+times)
const data = await ShopCalendarApi.updateShopCalendarPlan(value,dates,times)
if(data){
ElMessage({
message: '设置节假日成功',
@ -165,7 +165,7 @@ const updateJir = async (value: string,dates: string,times: string) =>{
duration: 2000, //
});
}
}
}
@ -180,4 +180,4 @@ onMounted(() => {
queryParams.dates = '';
getList()
})
</script>
</script>

View File

@ -123,7 +123,7 @@
<el-table-column label="事项说明" min-width="150" align="center" prop="eventdescription" />
<el-table-column label="类型" align="center" prop="type">
<template #default="scope">
<dict-tag v-for="item in scope.row.type"
<dict-tag v-for="item in scope.row.type"
:key="item"
:type="DICT_TYPE.DB_TYPE"
:value="item" />
@ -136,9 +136,9 @@
</el-table-column>
<el-table-column label="提醒周期(天)" min-width="160" align="center" prop="remindtime" />
<el-table-column label="提醒人" align="center" prop="remindman" />
<!-- <el-table-column label="添加人" align="center" prop="addid" /> -->
<!-- <el-table-column label="添加时间" align="center" prop="addtime" :formatter="dateFormatter" width="180px" /> -->
<!-- <el-table-column label="修改人" align="center" prop="reviseman" /> -->
@ -182,7 +182,7 @@ import download from '@/utils/download'
import * as AttentiontodoApi from '@/api/heli/attentiontodo'
import AttentiontodoForm from './AttentiontodoForm.vue'
defineOptions({ name: 'Attentiontodo' })
defineOptions({ name: 'AttentiontodoForm' })
const message = useMessage() //
const { t } = useI18n() //
@ -233,11 +233,11 @@ const getList = async () => {
item.type = item.type.split(',');
}
}
});
total.value = data.total
} finally {
loading.value = false
}
@ -293,4 +293,4 @@ const handleExport = async () => {
onMounted(() => {
getList()
})
</script>
</script>

View File

@ -516,11 +516,11 @@ const formRules = reactive({
deliverCompany: [{ required: true, message: '发货单位不能为空', trigger: 'blur' }],
deliverDate: [{ required: true, message: '发货日期不能为空', trigger: 'blur' }],
deliverStatus: [{ required: true, message: '发货单状态不能为空', trigger: 'blur' }],
deliverPerson: [{ required: true, message: '发货人不能为空', trigger: 'blur' }],
deliverPersonMobile: [{ required: true, message: '发货人电话不能为空', trigger: 'blur' }],
receivePersonMobile: [{ required: true, message: '收货人电话不能为空', trigger: 'blur' }],
receivePersonName: [{ required: true, message: '收货人姓名不能为空', trigger: 'blur' }],
receiveAddress: [{ required: true, message: '收货详细地址不能为空', trigger: 'blur' }]
// deliverPerson: [{ required: true, message: '', trigger: 'blur' }],
// deliverPersonMobile: [{ required: true, message: '', trigger: 'blur' }],
// receivePersonMobile: [{ required: true, message: '', trigger: 'blur' }],
// receivePersonName: [{ required: true, message: '', trigger: 'blur' }],
// receiveAddress: [{ required: true, message: '', trigger: 'blur' }]
})
const subFormLoading = ref(false) //
const subFormRules = reactive({
@ -638,7 +638,7 @@ const submitForm = async (operate) => {
formData.value.active = operate
await formRef.value.validate()
//
if (active.value != 'create') {
if (active.value == 'DELIVER') {
await subFormRef.value.validate()
await otherSubFormRef.value.validate()
if (formData.value.transportFreightCost==null||formData.value.transportFreightCost==''){

View File

@ -27,7 +27,7 @@
placeholder="请选择部门启用状态"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_SYSTEM_COMMON_STATUS)"
@ -121,7 +121,7 @@ import * as DeptApi from '@/api/system/dept'
import DeptForm from './DeptForm.vue'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'SystemDept' })
defineOptions({ name: 'Dept' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -215,7 +215,7 @@ import UserImportForm from './UserImportForm.vue'
import UserAssignRoleForm from './UserAssignRoleForm.vue'
import DeptTree from './DeptTree.vue'
defineOptions({ name: 'SystemUser' })
defineOptions({ name: 'Employee' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -183,7 +183,7 @@ import * as DeptApi from "@/api/system/dept";
import {ref} from "vue";
import BranchSelect from "@/views/heli/hlvuestyle/branchSelect.vue";
defineOptions({ name: 'Master' })
defineOptions({ name: 'index' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -173,7 +173,7 @@ import * as UserApi from "@/api/system/user";
import * as MaterialApi from "@/api/heli/material";
import * as DeptApi from "@/api/system/dept";
defineOptions({ name: 'Master' })
defineOptions({ name: 'indexBb' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -158,7 +158,7 @@ import {ElTable} from "element-plus";
import * as UserApi from "@/api/system/user";
const formLoading = ref(false) // 12
defineOptions({ name: 'standard' })
defineOptions({ name: 'part' })
const reload: any = inject('reload')
const commonStore = useCommonStateWithOut()
const message = useMessage() //
@ -232,12 +232,14 @@ const change =(row:any)=>{
if (row.chkboxEnable){
for (let i = 0; i < bomDetails.length; i++) {
if (bomDetails[i].chkboxEnable){
bomDetails[i].duEmpId=row.duEmpId
}
}
}
}
if (row){
MaterialPlanApi.saveLog(row)
}
}
const change1 =(row:any)=>{
if (flag.value){

View File

@ -164,7 +164,7 @@ import {inject, ref} from "vue";
const formLoading = ref(false) // 12
const userStore = useUserStore()
const username = userStore.getUser.nickname
defineOptions({ name: 'Standard' })
defineOptions({ name: 'purchasemake' })
const reload: any = inject('reload')
const commonStore = useCommonStateWithOut()
const message = useMessage() //

View File

@ -179,14 +179,11 @@ import { useCommonStateWithOut } from '@/store/modules/common'
import { useUserStore } from '@/store/modules/user'
import matLog from './storageLog.vue'
import * as supplierApi from '@/api/heli/supplier'
import UserSelect from "@/views/heli/materialplan/userSelectNew.vue";
import {inject, ref} from "vue";
import { update } from 'lodash-es'
import { Hash } from 'crypto'
const formLoading = ref(false) // 12
const userStore = useUserStore()
const username = userStore.getUser.nickname
defineOptions({ name: 'Standard' })
defineOptions({ name: 'standardbuy' })
const reload: any = inject('reload')
const commonStore = useCommonStateWithOut()
const message = useMessage() //

View File

@ -145,7 +145,7 @@ import * as MaterialPlanApi from '@/api/heli/materialplan'
import matLog from './storageLog.vue'
defineOptions({ name: 'MaterialPlan' })
defineOptions({ name: 'standardParts' })
const router = useRouter()
const formLoading = ref(false) // 12
const message = useMessage() //

View File

@ -181,7 +181,7 @@ import download from '@/utils/download'
import * as OrderYfApi from '@/api/heli/orderyf'
import OrderYfForm from './OrderYfForm.vue'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
defineOptions({ name: 'OrderYf' })
defineOptions({ name: 'orderyf' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -192,7 +192,7 @@ import * as InvoiceApi from "@/api/heli/invoice";
import * as OrderYfApi from "@/api/heli/orderyf";
defineOptions({ name: 'OrderYs' })
defineOptions({ name: 'records' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -172,9 +172,9 @@
<el-button link type="danger" size="small" @click.prevent="onDeleteItem(scope.$index)" v-if="formData.cgTypee==2||formData.cgTypee==3">
删除
</el-button>
<el-button link type="primary" size="small" @click.prevent="invoices(scope.row.id)" v-if="scope.row.id">
开票
</el-button>
<!-- <el-button link type="primary" size="small" @click.prevent="invoices(scope.row.id)" v-if="scope.row.id">-->
<!-- 开票-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>
@ -327,11 +327,11 @@ const getList = async () => {
formData.value.orderYsDetails= await OrderYsDetailApi.getOrderYsDetails(ids.value)
formData.value.orderYsDetails.map(o=>{
o.cgType=Number( o.cgType)
let date = new Date();
date.setFullYear(o.paymentDate[0]);
date.setMonth(o.paymentDate[1]-1);
date.setDate(o.paymentDate[2]);
o.paymentDate=date
// let date = new Date();
// date.setFullYear(o.paymentDate[0]);
// date.setMonth(o.paymentDate[1]-1);
// date.setDate(o.paymentDate[2]);
// o.paymentDate=date
})
} finally {
formLoading.value = false
@ -416,24 +416,22 @@ const submitForm = async () => {
// return false
// }
// }
if (formData.value.cgYishou>formData.value.cgYs){
message.error("已收金额大于应收金额,请确认")
return false
}
if (formData.value.cgYishou!=''&&formData.value.cgYishou!=undefined&&formData.value.cgYishou!=null){
// if (formData.value.cgYishou<formData.value.cgYs&&formData.value.cgTypee==1){
// await message.confirm(",,")
// }else if (formData.value.cgYishou>=formData.value.cgYs&&formData.value.cgTypee==2){
// await message.confirm(",,")
// }else if (formData.value.cgTypee==3){
// await message.confirm("0,,")
// }
if (formData.value.cgYishou>formData.value.cgYs){
message.error("已收金额大于应收金额,请确认")
return false
if (formData.value.cgYishou<formData.value.cgYs&&formData.value.cgTypee==1){
await message.confirm("已收金额小于应收金额,回款未全部完成,请确认")
}else if (formData.value.cgYishou>=formData.value.cgYs&&formData.value.cgTypee==2){
await message.confirm("已收金额大于等于应收金额,回款已完成,请确认")
}else if (formData.value.cgTypee==3){
await message.confirm("已收金额不为0,不能选择未付款,请确认")
}
}else {
// if (formData.value.cgTypee==2||formData.value.cgTypee==1){
// await message.confirm(",,")
// }
if (formData.value.cgTypee==2||formData.value.cgTypee==1){
await message.confirm("未输入已收金额,回款未完成,请确认")
}
}
//
formLoading.value = true

View File

@ -79,7 +79,7 @@ import * as OrderYsApi from "@/api/heli/orderys";
import {dateFormatter2, dateFormatter3} from "@/utils/formatTime";
import dayjs from "dayjs";
defineOptions({ name: 'UnqualifiedNotificationStatistic' })
defineOptions({ name: 'orderysDetails' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -183,7 +183,7 @@ import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
import Invoivce from "@/views/heli/orderys/invoivce.vue";
import {ref} from "vue";
defineOptions({ name: 'OrderYs' })
defineOptions({ name: 'orderys' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -1,5 +1,5 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1200px">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1200px" @close="emits">
<el-form
ref="formRef"
:model="formData"

View File

@ -212,7 +212,7 @@ import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
import * as OrderYsDetailApi from "@/api/heli/orderysdetail";
import * as InvoiceApi from "@/api/heli/invoice";
defineOptions({ name: 'OrderYs' })
defineOptions({ name: 'record' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -133,7 +133,7 @@ import {useCommonStateWithOut} from "@/store/modules/common";
import {useUserStore} from "@/store/modules/user";
import dayjs from "dayjs";
import * as PurchaseOrderNoDetailApi from '@/api/heli/purchaseordernodetail'
defineOptions({ name: 'ProcessDesign3D' })
defineOptions({ name: 'outsourcingExpenses' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -210,10 +210,9 @@ import * as MaterialPlanBoomApi from "@/api/heli/materialplanboom";
import * as PartPurchaseOrderApi from "@/api/heli/partpurchaseorder";
import {ElTable} from "element-plus";
import {useUserStore} from "@/store/modules/user";
import SupplierSelect from "@/views/heli/hlvuestyle/supplierSelect.vue";
import {setFlagsFromString} from "node:v8";
import * as supplierApi from "@/api/heli/supplier";
const formLoading = ref(false) // 12
defineOptions({ name: 'PartPurchase' })
const userStore = useUserStore()
const username = userStore.getUser.nickname

View File

@ -118,7 +118,7 @@ import * as MaterialPlanApi from '@/api/heli/materialplan'
import * as PartPurchaseOrderApi from "@/api/heli/partpurchaseorder";
import {dateFormatter1} from "@/utils/formatTime";
import {approvals, review} from "@/api/heli/partpurchaseorder";
defineOptions({ name: 'MaterialPlan' })
defineOptions({ name: 'PartPurchaseCheck' })
const router = useRouter()
const message = useMessage() //
const { t } = useI18n() //

View File

@ -108,7 +108,7 @@ import {useUserStore} from "@/store/modules/user";
import {dateFormatter1} from "@/utils/formatTime";
const formLoading = ref(false) // 12
defineOptions({ name: 'standard' })
defineOptions({ name: 'PartPurchaseOrder' })
const userStore = useUserStore()
const username = userStore.getUser.nickname
const reload: any = inject('reload')

View File

@ -684,7 +684,7 @@ import * as processbomApi from '@/api/heli/processbom'
import * as UserApi from '@/api/system/user'
import type { TabsPaneContext } from 'element-plus'
import ProcessStatusModal from './ProcessStatusModal.vue';
defineOptions({ name: 'Shenhe' })
defineOptions({ name: 'planSchedule' })
const userList = ref<UserApi.UserVO[]>([]) //
const message = useMessage() //
const { t } = useI18n() //

View File

@ -43,9 +43,9 @@
<td colspan="2" style="font-size: 16px"> 项目工期 </td>
<td colspan="1" style="padding: 0 5px"> </td>
<td colspan="1" style="min-width: 70px;">{{ formatDate(new Date(formData.projectStartTime), 'YYYY-MM-DD') }}</td>
<td colspan="1"></td>
<td colspan="1">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>
<td>天数</td>
<td colspan="1" style="min-width: 70px;"></td>
<td colspan="1" style="min-width: 70px;">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>
<td style="min-width: 70px;">天数</td>
<td colspan="1">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime)) +1 }}</td>
<td colspan="1"> 是否有价格 </td>
<td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.hasPrice) }} </td>
@ -101,7 +101,7 @@
<td>结束日期</td>
<td>
<span v-if="!planData.craftEndDate">&nbsp;</span>
<span v-else>{{ formatDate(new Date(planData.craftEndDate), 'YYYY-MM-DD') }}</span>
<span v-else style="min-width: 70px;">{{ formatDate(new Date(planData.craftEndDate), 'YYYY-MM-DD') }}</span>
</td>
<td>负责人</td>
<td colspan="2">{{ userInit.find((user) => user.id == planData.craftOwner)?.nickname }}</td>
@ -111,7 +111,7 @@
<tbody>
<tr>
<td colspan="10">
<td colspan="10" style="height: 30px">
<div style="text-align: left; width: 100%">子项目信息:</div>
</td>
</tr>
@ -125,7 +125,7 @@
<td> 2D/日期 </td>
<td> 3D/日期 </td>
</tr>
<tr v-for="(item,idx) in formData.projectOrderSubs.slice(0, 4)" :key="idx">
<tr v-for="(item,idx) in formData.projectOrderSubs.slice(0, 6)" :key="idx">
<td class="xh"> {{ idx+1 }} </td>
<td colspan="3" style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between">
@ -164,8 +164,8 @@
</tr>
</tbody>
<tbody v-if="formData.projectOrderSubs.length<4">
<tr v-for="item in (4-formData.projectOrderSubs.length)" :key="item">
<tbody v-if="formData.projectOrderSubs.length<6">
<tr v-for="item in (6-formData.projectOrderSubs.length)" :key="item">
<td> {{item+(formData.projectOrderSubs.length)}}</td>
<td colspan="3">&nbsp; </td>
<td> &nbsp; </td>
@ -176,7 +176,7 @@
<td>&nbsp; </td>
</tr>
</tbody>
<tbody>
<tbody class="masterClass">
<tr>
<td class="xh"> 序号 </td>
@ -196,7 +196,7 @@
</td>
<td colspan="2">
<span v-if="!its.endDate">&nbsp;</span>
<span v-else>{{formatDate(new Date(its.endDate), 'YYYY-MM-DD')}} </span>
<span v-else style="min-width: 70px;">{{formatDate(new Date(its.endDate), 'YYYY-MM-DD')}} </span>
</td>
<td>{{userInit.find((user) => user.id == its.owner)?.nickname}} </td>
<td colspan="2"> {{its.description}}</td>
@ -220,7 +220,7 @@ style="
</td>
</tr>
</tbody>
<tbody>
<tbody class="masterClass">
<tr>
<td colspan="4" style="width: 33%"> 编制/日期 </td>
<td colspan="3" style="width: 33%"> 审核/日期 </td>
@ -259,123 +259,160 @@ style="
</tbody>
</table>
<div v-if="formData.projectOrderSubs.length>4">
<div v-if="formData.projectOrderSubs.length>6">
<!-- 附页是否开启需要判断 根据子项目信息-->
<table border="2" cellspacing="0" id="table1" style="height: 27.5cm;">
<tbody>
<tr>
<td colspan="2">
<div style="width: 100px; text-align: center">
<img :src="logoDataUrl" style="width: 100%" alt="" />
</div>
</td>
<td colspan="6">
<span style="font-size: 20px; font-weight: 700">模具生产计划单-附页</span>
</td>
<td colspan="2" style="padding: 5px 0">
<div style="border-bottom: 1px solid #666; padding-bottom: 5px;font-size: 16px">项目编号</div>
<div style="padding-top: 5px; font-size: 16px">{{ formData.code }}</div>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2" style="font-size: 16px"> 客户名称 </td>
<td colspan="5" style="font-size: 16px">
<span>{{ formData.customerName }}</span>
</td>
<td colspan="1" style="font-size: 16px">{{ formData.customer.brief }}</td>
<td style="font-size: 16px"> 编码 </td>
<td style="font-size: 16px">{{ formData.customer.code }} </td>
</tr>
</tbody>
<tr>
<td colspan="2" style="font-size: 16px"> 项目名称 </td>
<td colspan="6" style="font-size: 16px">
{{ formData.projectName }}
</td>
<td style="font-size: 16px"> 业务员 </td>
<td>{{ formData.businessManName }} </td>
</tr>
<tr>
<td colspan="2" style="font-size: 16px"> 项目工期 </td>
<td colspan="1" style="padding: 0 5px"> </td>
<td colspan="1" style="min-width: 70px;">
{{ formatDate(new Date(formData.projectStartTime), 'YYYY-MM-DD') }}
</td>
<td colspan="1"></td>
<td colspan="1">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>
<td>天数</td>
<td colspan="1">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime)) }}</td>
<td colspan="1"> 是否有价格 </td>
<td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.hasPrice) }} </td>
</tr>
<tr>
<td colspan="10">
<div style="font-size: 10px; height: 50px; line-height: 50px">
<span>接上页</span>
</div>
</td>
</tr>
<table border="2" cellspacing="0" id="table" style="height:27.2cm;">
<!-- <tbody >-->
<!-- <tr>-->
<!-- <td colspan="2">-->
<!-- <div style="width: 100px; text-align: center">-->
<!-- <img :src="logoDataUrl" style="width: 100%" alt="" />-->
<!-- </div>-->
<!-- </td>-->
<!-- <td colspan="6">-->
<!-- <span style="font-size: 20px; font-weight: 700">模具生产计划单-附页</span>-->
<!-- </td>-->
<!-- <td colspan="2" style="padding: 5px 0">-->
<!-- <div style="border-bottom: 1px solid #666; padding-bottom: 5px;font-size: 16px">项目编号</div>-->
<!-- <div style="padding-top: 5px; font-size: 16px">{{ formData.code }}</div>-->
<!-- </td>-->
<!-- </tr>-->
<!-- </tbody>-->
<!-- <tbody class="masterClass">-->
<!-- <tr>-->
<!-- <td colspan="2" style="font-size: 16px"> 客户名称 </td>-->
<!-- <td colspan="5" style="font-size: 16px">-->
<!-- <span>{{ formData.customerName }}</span>-->
<!-- </td>-->
<!-- <td colspan="1" style="font-size: 16px">{{ formData.customer.brief }}</td>-->
<!-- <td style="font-size: 16px"> 编码 </td>-->
<!-- <td style="font-size: 16px">{{ formData.customer.code }} </td>-->
<!-- </tr>-->
<!-- </tbody>-->
<!-- <tr class="masterClass">-->
<!-- <td colspan="2" style="font-size: 16px"> 项目名称 </td>-->
<!-- <td colspan="6" style="font-size: 16px">-->
<!-- {{ formData.projectName }}-->
<!-- </td>-->
<!-- <td style="font-size: 16px"> 业务员 </td>-->
<!-- <td>{{ formData.businessManName }} </td>-->
<!-- </tr>-->
<!-- <tr class="masterClass">-->
<!-- <td colspan="2" style="font-size: 16px"> 项目工期 </td>-->
<!-- <td colspan="1" style="padding: 0 5px"> </td>-->
<!-- <td colspan="1" style="min-width: 70px;">-->
<!-- {{ formatDate(new Date(formData.projectStartTime), 'YYYY-MM-DD') }}-->
<!-- </td>-->
<!-- <td colspan="1"></td>-->
<!-- <td colspan="1" style="min-width: 70px;">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>-->
<!-- <td style="min-width: 70px;">天数</td>-->
<!-- <td colspan="1">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime))+1 }}</td>-->
<!-- <td colspan="1"> 是否有价格 </td>-->
<!-- <td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.hasPrice) }} </td>-->
<!-- </tr>-->
<!-- <tr class="masterClass">-->
<!-- <td colspan="10">-->
<!-- <div style="font-size: 10px; height: 30px; line-height: 30px">-->
<!-- <span>接上页</span>-->
<!-- </div>-->
<!-- </td>-->
<!-- </tr>-->
<tbody>
<tbody >
<tr>
<td colspan="10">
<td colspan="10" style="height: 30px">
<div style="text-align: left; width: 100%">子项目信息:</div>
</td>
</tr>
<tr>
<td class="xh"> 序号 </td>
<td colspan="3"> 名称/编号 </td>
<td> 设备型号 </td>
<td> 数量 </td>
<td style="width:100px"> 主要材料 </td>
<td style="width:100px"> 毛坯日期 </td>
<td> 2D/日期 </td>
<td> 3D/日期 </td>
<td class="xh" style="width: 20%" > 序号 </td>
<td colspan="3" style="width: 25%"> 名称/编号 </td>
<td style="width: 10%"> 设备型号 </td>
<td style="width: 10%"> 数量 </td>
<td style="width: 10%"> 主要材料 </td>
<td style="width: 10%"> 毛坯日期 </td>
<td style="width: 10%"> 2D/日期 </td>
<td style="width: 10%"> 3D/日期 </td>
</tr>
</tbody>
<tbody>
<tr v-for="(item, idx) in formData.projectOrderSubs.slice(4)" :key="idx">
<td class="xh"> {{ idx+5 }} </td>
<td colspan="3" style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between">
<span > {{item.name}} </span>
<!-- <span style="border-bottom: 1px solid #666"> {{item.name}} </span>-->
<!-- <span v-if="!item.projectSubShortName">&nbsp;</span>-->
<!-- <span v-else style="font-size: 10px">{{ formData.code+'-'+formData.customer.code+'-'+ item.projectSubShortName}}</span>-->
</div>
</td>
<td>{{equipInit.find((equip) => equip.id == item.equipId)?.name}} </td>
<td>{{item.amount}} </td>
<td>{{ item.compositionName }} </td>
<td>
<span v-if="!item.blankDate"> &nbsp;</span>
<span v-else>{{ formatDate(new Date(item.blankDate), 'YYYY-MM-DD') }} </span>
</td>
<td style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between;width: 100px">
<span v-if="!item.twoDimDate" style="border-bottom: 1px solid #666">&nbsp;</span>
<span v-else style="border-bottom: 1px solid #666"> {{ formatDate(new Date(item.twoDimDate), 'YYYY-MM-DD') }} </span>
<span v-if="userInit.find((user) => user.id === item.twoDimOwner)?.nickname">{{ userInit.find((user) => user.id == item.twoDimOwner)?.nickname }}</span>
<span v-else>&nbsp;</span>
</div>
</td>
<td style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between;width: 100px">
<span v-if="!item.threeDimDate" style="border-bottom: 1px solid #666">&nbsp;</span>
<!-- <tr v-for="(item, idx) in formData.projectOrderSubs.slice(6)" :key="idx">-->
<!-- <td class="xh"> {{ idx+7 }} </td>-->
<!-- <td colspan="3" style="padding: 0 0">-->
<!-- <div style="display: flex; flex-direction: column; justify-content: space-between">-->
<!-- <span > {{item.name}} </span>-->
<!--&lt;!&ndash; <span style="border-bottom: 1px solid #666"> {{item.name}} </span>&ndash;&gt;-->
<!--&lt;!&ndash; <span v-if="!item.projectSubShortName">&nbsp;</span>&ndash;&gt;-->
<!--&lt;!&ndash; <span v-else style="font-size: 10px">{{ formData.code+'-'+formData.customer.code+'-'+ item.projectSubShortName}}</span>&ndash;&gt;-->
<!-- </div>-->
<!-- </td>-->
<!-- <td>{{equipInit.find((equip) => equip.id == item.equipId)?.name}} </td>-->
<!-- <td>{{item.amount}} </td>-->
<!-- <td>{{ item.compositionName }} </td>-->
<!-- <td>-->
<!-- <span v-if="!item.blankDate"> &nbsp;</span>-->
<!-- <span v-else>{{ formatDate(new Date(item.blankDate), 'YYYY-MM-DD') }} </span>-->
<!-- </td>-->
<!-- <td style="padding: 0 0">-->
<!-- <div style="display: flex; flex-direction: column; justify-content: space-between;width: 80px">-->
<!-- <span v-if="!item.twoDimDate" style="border-bottom: 1px solid #666">&nbsp;</span>-->
<!-- <span v-else style="border-bottom: 1px solid #666"> {{ formatDate(new Date(item.twoDimDate), 'YYYY-MM-DD') }} </span>-->
<!-- <span v-if="userInit.find((user) => user.id === item.twoDimOwner)?.nickname">{{ userInit.find((user) => user.id == item.twoDimOwner)?.nickname }}</span>-->
<!-- <span v-else>&nbsp;</span>-->
<!-- </div>-->
<!-- </td>-->
<!-- <td style="padding: 0 0">-->
<!-- <div style="display: flex; flex-direction: column; justify-content: space-between;width: 80px">-->
<!-- <span v-if="!item.threeDimDate" style="border-bottom: 1px solid #666">&nbsp;</span>-->
<span v-else style="border-bottom: 1px solid #666"> {{ formatDate(new Date(item.threeDimDate), 'YYYY-MM-DD') }} </span>
<span v-if="userInit.find((user) => user.id === item.threeDimOwner)?.nickname">
{{ userInit.find((user) => user.id === item.threeDimOwner)?.nickname }}
</span>
<span v-else>&nbsp;</span>
</div>
</td>
</tr>
<!-- <span v-else style="border-bottom: 1px solid #666"> {{ formatDate(new Date(item.threeDimDate), 'YYYY-MM-DD') }} </span>-->
<!-- <span v-if="userInit.find((user) => user.id === item.threeDimOwner)?.nickname">-->
<!-- {{ userInit.find((user) => user.id === item.threeDimOwner)?.nickname }}-->
<!-- </span>-->
<!-- <span v-else>&nbsp;</span>-->
<!-- </div>-->
<!-- </td>-->
<!-- </tr>-->
<tr v-for="(item,idx) in formData.projectOrderSubs.slice(6)" :key="idx" >
<td class="xh"> {{ idx+7 }} </td>
<td colspan="3" style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between">
<span> {{item.name}} </span>
<!-- <span style="border-bottom: 1px solid #666"> {{item.name}} </span>-->
<!-- <span v-if="!item.projectSubShortName">&nbsp;</span>-->
<!-- <span v-else style="font-size: 10px">{{ formData.code+'-'+formData.customer.code+'-'+ item.projectSubShortName}}</span>-->
</div>
</td>
<td>{{equipInit.find((equip) => equip.id == item.equipId)?.name}} </td>
<td>{{item.amount}} </td>
<td>{{ item.compositionName }} </td>
<td>
<span v-if="!item.blankDate"> &nbsp;</span>
<span v-else>{{ formatDate(new Date(item.blankDate), 'YYYY-MM-DD') }} </span>
</td>
<td style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between;width: 100px">
<span v-if="!item.twoDimDate" style="border-bottom: 1px solid #666">&nbsp;</span>
<span v-else style="border-bottom: 1px solid #666"> {{ formatDate(new Date(item.twoDimDate), 'YYYY-MM-DD') }} </span>
<span v-if="userInit.find((user) => user.id === item.twoDimOwner)?.nickname">{{ userInit.find((user) => user.id == item.twoDimOwner)?.nickname }}</span>
<span v-else>&nbsp;</span>
</div>
</td>
<td style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between;width: 100px">
<span v-if="!item.threeDimDate" style="border-bottom: 1px solid #666">&nbsp;</span>
<span v-else style="border-bottom: 1px solid #666"> {{ formatDate(new Date(item.threeDimDate), 'YYYY-MM-DD') }} </span>
<span v-if="userInit.find((user) => user.id === item.threeDimOwner)?.nickname">
{{ userInit.find((user) => user.id === item.threeDimOwner)?.nickname }}
</span>
<span v-else>&nbsp;</span>
</div>
</td>
</tr>
</tbody>
<tbody v-if="formData.projectOrderSubs.length<15">
<tr v-for="item in (15-formData.projectOrderSubs.length)" :key="item">
<tbody>
<tr v-for="item in formData.projectOrderSubs.length" :key="item">
<td> {{item+(formData.projectOrderSubs.length)}}</td>
<td colspan="3">&nbsp; </td>
<td> &nbsp; </td>
@ -387,61 +424,62 @@ style="
</tr>
</tbody>
<tbody>
<tr>
<td colspan="10">
<div
style="
text-align: left;
width: 100%;
display: flex;
flex-direction: column;
padding-left: 15px;
">
<span>说明:</span>
<span>1.每个项目的零部件制作工艺材料材质硬度要求必须统一出现任何问题各工程师负责!</span>
<span>2.模具调试试模需要根据客户要求自己安排调试我司根据需要安排人员参与配合</span>
</div>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="4" style="width: 33%"> 编制/日期 </td>
<td colspan="3" style="width: 33%"> 审核/日期 </td>
<td colspan="3" style="width: 33%"> 批准/日期 </td>
</tr>
<!-- <tbody>-->
<!-- <tr>-->
<!-- <td colspan="10">-->
<!-- <div-->
<!--style="-->
<tr>
<td colspan="4">
<span v-if="!planData.editorDate"> &nbsp;</span>
<span v-else>{{formatDate(new Date(planData.editorDate), 'YYYY-MM-DD')}}</span>
</td>
<td colspan="3">
<span v-if="!planData.auditDate"> &nbsp;</span>
<span v-else>{{formatDate(new Date(planData.auditDate), 'YYYY-MM-DD')}}</span>
</td>
<td colspan="3">
<span v-if="!planData.approveDate"> &nbsp;</span>
<span v-else>{{formatDate(new Date(planData.approveDate), 'YYYY-MM-DD')}}</span>
</td>
</tr>
<tr>
<td colspan="4">
<span v-if="!planData.editor"> &nbsp;</span>
<span v-else> {{ userInit.find((user) => user.id == planData.editor)?.nickname }}</span>
</td>
<td colspan="3">
<span v-if="!planData.auditor"> &nbsp;</span>
<span v-else> {{ userInit.find((user) => user.id == planData.auditor)?.nickname }}</span>
<!-- text-align: left;-->
<!-- width: 100%;-->
<!-- display: flex;-->
<!-- flex-direction: column;-->
<!-- padding-left: 15px;-->
<!-- ">-->
<!-- <span>说明:</span>-->
<!-- <span>1.每个项目的零部件制作工艺材料材质硬度要求必须统一出现任何问题各工程师负责!</span>-->
<!-- <span>2.模具调试试模需要根据客户要求自己安排调试我司根据需要安排人员参与配合</span>-->
<!-- </div>-->
<!-- </td>-->
<!-- </tr>-->
<!-- </tbody>-->
<!-- <tbody class="masterClass">-->
<!-- <tr>-->
<!-- <td colspan="4" style="width: 33%"> 编制/日期 </td>-->
<!-- <td colspan="3" style="width: 33%"> 审核/日期 </td>-->
<!-- <td colspan="3" style="width: 33%"> 批准/日期 </td>-->
<!-- </tr>-->
</td>
<td colspan="3">
<span v-if="!planData.approver"> &nbsp;</span>
<span v-else> {{ userInit.find((user) => user.id == planData.approver)?.nickname }}</span>
</td>
</tr>
</tbody>
<!-- <tr>-->
<!-- <td colspan="4">-->
<!-- <span v-if="!planData.editorDate"> &nbsp;</span>-->
<!-- <span v-else>{{formatDate(new Date(planData.editorDate), 'YYYY-MM-DD')}}</span>-->
<!-- </td>-->
<!-- <td colspan="3">-->
<!-- <span v-if="!planData.auditDate"> &nbsp;</span>-->
<!-- <span v-else>{{formatDate(new Date(planData.auditDate), 'YYYY-MM-DD')}}</span>-->
<!-- </td>-->
<!-- <td colspan="3">-->
<!-- <span v-if="!planData.approveDate"> &nbsp;</span>-->
<!-- <span v-else>{{formatDate(new Date(planData.approveDate), 'YYYY-MM-DD')}}</span>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td colspan="4">-->
<!-- <span v-if="!planData.editor"> &nbsp;</span>-->
<!-- <span v-else> {{ userInit.find((user) => user.id == planData.editor)?.nickname }}</span>-->
<!-- </td>-->
<!-- <td colspan="3">-->
<!-- <span v-if="!planData.auditor"> &nbsp;</span>-->
<!-- <span v-else> {{ userInit.find((user) => user.id == planData.auditor)?.nickname }}</span>-->
<!-- </td>-->
<!-- <td colspan="3">-->
<!-- <span v-if="!planData.approver"> &nbsp;</span>-->
<!-- <span v-else> {{ userInit.find((user) => user.id == planData.approver)?.nickname }}</span>-->
<!-- </td>-->
<!-- </tr>-->
<!-- </tbody>-->
</table>
</div>
</div>
@ -459,9 +497,8 @@ import * as UserApi from '@/api/system/user'
import * as PlanApi from '@/api/heli/plan'
import * as PlanSubApi from '@/api/heli/plansub'
import * as ProjectOrderApi from '@/api/heli/projectorder'
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
import { betweenDay, dateFormatter, formatDate } from '@/utils/formatTime'
import { Check } from '@element-plus/icons-vue'
import { getIntDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
import { betweenDay, formatDate } from '@/utils/formatTime'
import { getCustomer } from '@/api/heli/customer'
import { getOperateLogPage } from '@/api/system/operatelog'
import urlimg from '@/assets/imgs/exlogo.png'
@ -535,6 +572,9 @@ const onPrint = () => {
.xh {
width: 50px !important;
}
.xh {
height: 20px !important;
}
.checkbox {
border: 2px solid #999;
width: 10px;
@ -834,7 +874,10 @@ table {
}
}
.xh {
width: 50px !important;
width: 40px !important;
}
.xhs {
height: 20px !important;
}
.checkbox {
border: 2px solid #999;

View File

@ -49,7 +49,7 @@
</el-form-item>
<el-form-item label="任务负责人" prop="owner">
<UserSelect v-model="queryParams.owner" @update:new-value="handleSelectedUser1" class="!w-265px"/>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> </el-button>
@ -116,8 +116,7 @@ import download from '@/utils/download'
import * as TrackApi from '@/api/heli/track'
import TrackForm from './TrackForm.vue'
import { DICT_TYPE } from '@/utils/dict'
import UserSelect from '@/views/heli/hlvuestyle/userSelect.vue'
defineOptions({ name: 'Track' })
defineOptions({ name: 'planTrack' })
const message = useMessage() //
const { t } = useI18n() //
@ -214,4 +213,4 @@ const handleExport = async () => {
onMounted(() => {
getList()
})
</script>
</script>

View File

@ -125,7 +125,7 @@ import download from '@/utils/download'
import * as PostApi from '@/api/system/post'
import PostForm from './PostForm.vue'
defineOptions({ name: 'SystemPost' })
defineOptions({ name: 'Post' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -30,11 +30,13 @@
<script lang="ts" setup>
import { getAccessToken, getTenantId } from '@/utils/auth'
import {json} from "node:stream/consumers";
import DOMPurify from 'dompurify';
defineOptions({ name: 'BomImportForm' })
const message = useMessage() //
const dialogVisible = ref(false) //
const formLoading = ref(false) //
const uploadRef = ref()
@ -73,8 +75,26 @@ const emits = defineEmits(['success'])
const submitFormSuccess = (response: any) => {
if (response.code == 500) {
uploadRef.value!.clearFiles()
message.error(response.msg)
formLoading.value = false
let formattedMsg = response.msg
if (formattedMsg.includes("图号")) {
formattedMsg = formattedMsg.replace(/文件导入失败:/g, "文件导入失败:<br>");
const finalMsg = formattedMsg
.replace(/\r?\n/g, '<br>') // \r\n \n <br>
.replace(/\r/g, ''); // \r
ElMessage({
dangerouslyUseHTMLString: true,
message: finalMsg,
type: 'error',
duration: 5000,
showClose: false,
center: true
});
}else {
message.error(response.msg)
}
formLoading.value = false
return
}
message.alert("导入成功!")

View File

@ -88,7 +88,7 @@ import * as ProcessBomApi from '@/api/heli/processbom'
import { useCommonStateWithOut } from '@/store/modules/common'
import { useUserStore } from '@/store/modules/user'
import routeParamsCache from '@/utils/routeParamsCache'
defineOptions({ name: 'ProcessBom' })
defineOptions({ name: 'bomShenhe' })
const commonStore = useCommonStateWithOut()
const message = useMessage() //

View File

@ -129,7 +129,7 @@ import * as ProjectLeaderApi from '@/api/heli/projectleader'
import ProjectLeaderForm from './ProjectLeaderForm.vue'
import * as UserApi from "@/api/system/user";
defineOptions({ name: 'ProjectLeader' })
defineOptions({ name: 'projectLeader' })
const message = useMessage() //
const { t } = useI18n() //

View File

@ -301,10 +301,10 @@ const getList = async () => {
const route = useRoute();
if(route){
const idid = route.query.idid;
queryParams.code=idid
if (idid){
queryParams.code=idid
}
}
const data = await ProjectOrderApi.getProjectOrderPage(queryParams)
list.value = data.list
total.value = data.total

View File

@ -283,7 +283,9 @@ const getList = async () => {
if(route){
const idid = route.query.idid;
queryParams.code=idid
if (idid){
queryParams.code=idid
}
}
const data = await ProjectOrderApi.getProjectOrderPage(queryParams)

View File

@ -141,7 +141,7 @@ import {ref} from "vue";
import {dateFormatter2} from "@/utils/formatTime";
import Storage from './from.vue'
const formLoading = ref(false) // 12
defineOptions({ name: 'PurchaseOrder' })
defineOptions({ name: 'received' })
const message = useMessage() //
const { t } = useI18n() //
const router = useRouter()

View File

@ -66,13 +66,8 @@ ref="contractUploadRef" :file-list="contractUploadFiles" multiple :action="uplo
<script setup lang="ts">
import * as ZjPgMasterApi from '@/api/heli/zjpgmaster'
import UserSelect from '@/views/heli/hlvuestyle/userSelect.vue'
import * as UserApi from '@/api/system/user'
import { betweenDay, dateFormatter, formatDate ,dateFormatter2 } from '@/utils/formatTime'
import { dateFormatter, } from '@/utils/formatTime'
import { UploadUserFile } from 'element-plus'
import { deleteFileLogic, downloadFile, getFilePage } from '@/api/infra/file'
@ -80,7 +75,7 @@ import { getAccessToken, getTenantId } from '@/utils/auth'
import download from '@/utils/download'
defineOptions({ name: 'ZjPgMaster' })
defineOptions({ name: 'renshiFile' })
const reload: any = inject('reload')
const message = useMessage() //
const { t } = useI18n() //

View File

@ -61,7 +61,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border class="hl-table">
<el-table-column type="index" min-width="60" fixed label="序号" align="center" />
<el-table-column label="自增字段唯一" align="center" prop="id" v-if = "false"/>
@ -75,8 +75,8 @@
{{ userList.find((user) => user.id === scope.row.shenheUser)?.nickname }}
</template>
</el-table-column>
<el-table-column label="审核顺序" align="center" prop="shenheNum" />
<el-table-column label="操作" align="center">
<template #default="scope">
@ -120,7 +120,7 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
import UserSelect from '@/views/heli/hlvuestyle/userSelect.vue'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'Shenhe' })
defineOptions({ name: 'ProcessIndex' })
const userList = ref<UserApi.UserVO[]>([]) //
const message = useMessage() //
const { t } = useI18n() //
@ -202,4 +202,4 @@ onMounted(async () => {
await getList()
userList.value = await UserApi.getSimpleUserList()
})
</script>
</script>

View File

@ -122,7 +122,7 @@ import * as MatReqApi from "@/api/heli/matreq";
import {ref} from "vue";
import {ElTable} from "element-plus";
import * as MaterialPlanApi from "@/api/heli/materialplan";
defineOptions({ name: 'StorageLog' })
defineOptions({ name: 'supplement' })
const printref = ref()
const whList = ref([])
const rgList = ref([])

View File

@ -75,16 +75,9 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_TYPE)" :key="dict.label
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as SotrageInventoryApi from '@/api/heli/storageinventory'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import * as WarehouseApi from '@/api/heli/warehouse'
import * as RgApi from '@/api/heli/rg'
import * as PnApi from '@/api/heli/pn'
import {getStorageNowPage, getStorageNowPricePage} from "@/api/heli/storagelog";
import * as ModelApi from "@/api/bpm/model";
defineOptions({ name: 'StorageLog' })
defineOptions({ name: 'storagelogprice' })
const whList = ref([])

View File

@ -106,14 +106,13 @@
</template>
<script setup lang="ts">
import { getIntDictOptions, getStrDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter2 } from '@/utils/formatTime'
import download from '@/utils/download'
import * as TaskDispatchApi from '@/api/heli/taskdispatch'
import { useCommonStore } from '@/store/modules/common'
import { useUserStore } from '@/store/modules/user'
import Dispatchdialog from './detailDialog.vue'
import { Row } from 'element-plus/es/components/table-v2/src/components'
defineOptions({ name: 'TaskDispatch' })
const message = useMessage() //

View File

@ -0,0 +1,228 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="130px"
>
<el-form-item label="项目名称" prop="projectName">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目简码"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="子项目名称" prop="projectSubName">
<el-input
v-model="queryParams.projectSubName"
placeholder="请输入子项目名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="零件名称" prop="materialName">
<el-input
v-model="queryParams.materialName"
placeholder="请输入零件名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="项目编号" prop="projectCode">
<el-input
v-model="queryParams.projectCode"
placeholder="请输入项目编号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="零件号" prop="blueprintNo">
<el-input
v-model="queryParams.blueprintNo"
placeholder="请输入项目编号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="工序" prop="procdureName">
<el-input
v-model="queryParams.procdureName"
placeholder="请输入项目编号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="外协" name="first">{{ }}</el-tab-pane>
<el-tab-pane label="非外协" name="second">{{ }}</el-tab-pane>
</el-tabs>
<el-table style="height: 500px;" v-loading="loading" :data="list" :show-overflow-tooltip="true" border class="hl-table" >
<el-table-column type="index" min-width="80" label="序号" align="center" />
<el-table-column label="零件名称" align="center" prop="materialName" min-width="180"/>
<el-table-column label="工序" align="center" prop="procedureName" min-width="180"/>
<el-table-column label="是否外协" align="center" prop="isOutsourcing" min-width="180">
<template #default="{ row }">
{{ row.isOutsourcing=='Y' ?'是':'否'}}
</template>
</el-table-column>
<el-table-column label="是否过程检" prop="checkYn" min-width="180" align="center">
<template #default="{ row }">
{{ row.checkYn==0 ?'是':'否'}}
</template>
</el-table-column>
<el-table-column label="派工单状态" prop="dispatchStatus" min-width="180" align="center">
<template #default="{ row }">
{{ row.dispatchStatus==1 ?'保存':'提交'}}
</template>
</el-table-column>
<el-table-column v-if="activeIndex == 'first'" label="物料需求计划" prop="planStatus" min-width="180" align="center">
<template #default="{ row }">
{{ row.procedureStatus ?(row.planStatus== 0?'未提交':(row.planStatus == 1? '已提交':'')):''}}
</template>
</el-table-column>
<el-table-column v-if="activeIndex == 'first'" label="零件采购" prop="planStatus" min-width="180" align="center">
<template #default="{ row }">
{{ row.mplanStatus ?(row.mplanStatus== 0?'待送审':(row.planStatus == 1? '已送审':(row.planStatus == 2? '已审核':'打回'))):''}}
</template>
</el-table-column>
<el-table-column v-if="activeIndex == 'first'" label="零件采购订单" prop="planStatus" min-width="180" align="center">
<template #default="{ row }">
{{ row.receivingStatus ?(row.receivingStatus== 1?'已生成':(row.receivingStatus == 2? '部分收货':(row.planStatus == 3? '已收货':''))):''}}
</template>
</el-table-column>
<el-table-column v-if="activeIndex == 'second'" label="生产报工" prop="procedureStatus" min-width="180" align="center">
<template #default="{ row }">
{{ row.procedureStatus ?(row.procedureStatus== 0?'未报工':(row.procedureStatus == 1? '部分报工':'报工完成')):''}}
</template>
</el-table-column>
<el-table-column label="过程检" prop="dispatchStatus" min-width="180" align="center">
<template #default="{ row }">
{{ row.pgType ?(row.pgType== 1?'已检验':(row.pgType == 2 ? '已完成':'')):''}}
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
</template>
<script setup lang="ts">
import * as UserApi from '@/api/system/user'
import type { TabsPaneContext } from 'element-plus'
import * as TaskDispatchApi from '@/api/heli/taskdispatch'
defineOptions({ name: 'taskSchedule' })
const userList = ref<UserApi.UserVO[]>([]) //
const message = useMessage() //
const { t } = useI18n() //
const modal = ref();
const loading = ref(true) //
const list = ref([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
projectCode: undefined,
projectName: undefined,
taskNo: undefined,
projectSubName: undefined,
materialName: undefined,
owner: undefined,
projectSubCode:undefined,
procdureName:undefined,
blueprintNo:undefined,
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
const activeName = ref('first')
const activeIndex = ref('first')
/**切换tab */
const handleClick = async(tab: TabsPaneContext, event: Event) => {
var tabIndex = tab.props.name;
queryParams.pageNo = 1;
activeIndex.value = tabIndex;
await getList(tabIndex);
}
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
if( activeIndex.value == 'first'){
const data = await TaskDispatchApi.taskBbPage(queryParams)
list.value = data.list
total.value = data.total
}else{
const data = await TaskDispatchApi.taskPage(queryParams)
list.value = data.list
total.value = data.total
}
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
/** 初始化 **/
onMounted(async () => {
loading.value = true
await getList()
})
</script>
<style>
</style>

View File

@ -133,6 +133,7 @@ import {useUserStore} from "@/store/modules/user";
import * as BgMasterLineApi from "@/api/heli/bgmasterline";
import * as ZjBgMasterLineApi from '@/api/heli/zjbgmasterline'
import dayjs from "dayjs";
defineOptions({ name: 'workrecord' })
const message = useMessage() //