Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
94081fa3d7
@ -27,10 +27,10 @@ public class PageParam implements Serializable {
|
|||||||
@Min(value = 1, message = "页码最小值为 1")
|
@Min(value = 1, message = "页码最小值为 1")
|
||||||
private Integer pageNo = PAGE_NO;
|
private Integer pageNo = PAGE_NO;
|
||||||
|
|
||||||
@Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
@Schema(description = "每页条数,最大值为 999", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||||
@NotNull(message = "每页条数不能为空")
|
@NotNull(message = "每页条数不能为空")
|
||||||
@Min(value = 1, message = "每页条数最小值为 1")
|
@Min(value = 1, message = "每页条数最小值为 1")
|
||||||
@Max(value = 100, message = "每页条数最大值为 100")
|
@Max(value = 999, message = "每页条数最大值为 999")
|
||||||
private Integer pageSize = PAGE_SIZE;
|
private Integer pageSize = PAGE_SIZE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,8 @@ public class ProcessDesignController {
|
|||||||
@Operation(summary = "报工")
|
@Operation(summary = "报工")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:process-design:create')")
|
@PreAuthorize("@ss.hasPermission('heli:process-design:create')")
|
||||||
public CommonResult<Long> updateBaoGong(@Valid @RequestBody ProcessDesignSaveReqSubVO processDesignSaveReqSubVO) {
|
public CommonResult<Long> updateBaoGong(@Valid @RequestBody ProcessDesignSaveReqSubVO processDesignSaveReqSubVO) {
|
||||||
|
return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO));
|
||||||
return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO.getZid(),processDesignSaveReqSubVO.getProgress(),processDesignSaveReqSubVO.getImageLink()));
|
// return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO.getZid(),processDesignSaveReqSubVO.getProgress(),processDesignSaveReqSubVO.getImageLink(),processDesignSaveReqSubVO.getRemark()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
|
@ -22,7 +22,8 @@ public class ProcessDesignSaveReqSubVO {
|
|||||||
|
|
||||||
@Schema(description = "图纸链接", example = "随便")
|
@Schema(description = "图纸链接", example = "随便")
|
||||||
private String imageLink;
|
private String imageLink;
|
||||||
|
@Schema(description = "备注", example = "随便")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -150,6 +150,13 @@ public class ProjectOrderController {
|
|||||||
PageResult<ProjectOrderDO> pageResult = projectOrderService.getProjectOrderPage(pageReqVO);
|
PageResult<ProjectOrderDO> pageResult = projectOrderService.getProjectOrderPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class));
|
return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class));
|
||||||
}
|
}
|
||||||
|
@GetMapping("/pageWX")
|
||||||
|
@Operation(summary = "获得项目订单分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:project-order:query')")
|
||||||
|
public CommonResult<PageResult<ProjectOrderRespVO>> getProjectOrderPageWX(@Valid ProjectOrderPageReqVO pageReqVO) {
|
||||||
|
PageResult<ProjectOrderDO> pageResult = projectOrderService.getProjectOrderPageWx(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出项目订单 Excel")
|
@Operation(summary = "导出项目订单 Excel")
|
||||||
|
@ -269,7 +269,8 @@ public class ProjectOrderDO extends BaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String projectSubName;
|
private String projectSubName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String unitName;
|
||||||
/**
|
/**
|
||||||
* 变更的字段列表
|
* 变更的字段列表
|
||||||
* */
|
* */
|
||||||
|
@ -50,7 +50,7 @@ public class StorageLogNowDO extends BaseDO {
|
|||||||
|
|
||||||
private Long pnId;
|
private Long pnId;
|
||||||
private String pnName;
|
private String pnName;
|
||||||
private Long sumKcMoney;
|
private BigDecimal sumKcMoney;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
@ -51,7 +51,6 @@ public class TaskDispatchDetailDO extends BaseDO {
|
|||||||
/**
|
/**
|
||||||
* 派工数量
|
* 派工数量
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
|
||||||
private Integer beforeAmount;
|
private Integer beforeAmount;
|
||||||
/**
|
/**
|
||||||
* 工序要点
|
* 工序要点
|
||||||
|
@ -80,10 +80,14 @@ public interface PgMasterLineMapper extends BaseMapperX<PgMasterLineDO> {
|
|||||||
.leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id")
|
.leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id")
|
||||||
.leftJoin(ProjectOrderSubDO.class,"pos",ProjectOrderSubDO::getId,PgMasterLineDO::getProjectSubId)
|
.leftJoin(ProjectOrderSubDO.class,"pos",ProjectOrderSubDO::getId,PgMasterLineDO::getProjectSubId)
|
||||||
.leftJoin(PlanDO.class,"pl",PlanDO::getProjectId,ProjectOrderSubDO::getProjectOrderId)
|
.leftJoin(PlanDO.class,"pl",PlanDO::getProjectId,ProjectOrderSubDO::getProjectOrderId)
|
||||||
.eq(PlanDO::getStatus,2)
|
|
||||||
.orderByDesc(PlanDO::getId)
|
|
||||||
.disableSubLogicDel();
|
|
||||||
|
|
||||||
|
.eq(PlanDO::getStatus,2)
|
||||||
|
.disableSubLogicDel();
|
||||||
|
if (reqVO.getPgType() == 1){
|
||||||
|
query.orderByDesc(PgMasterLineDO::getPgNumber);
|
||||||
|
}else{
|
||||||
|
query.orderByDesc(PlanDO::getId);
|
||||||
|
}
|
||||||
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
||||||
.eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType())
|
.eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType())
|
||||||
.eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
.eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
||||||
|
@ -6,6 +6,7 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
|||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderCostPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderCostPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
|
||||||
@ -79,7 +80,34 @@ public interface ProjectOrderMapper extends BaseMapperX<ProjectOrderDO> {
|
|||||||
;
|
;
|
||||||
return selectPage(reqVO, query);
|
return selectPage(reqVO, query);
|
||||||
}
|
}
|
||||||
|
default PageResult<ProjectOrderDO> selectPageWx(ProjectOrderPageReqVO reqVO) {
|
||||||
|
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||||
|
query.selectAll(ProjectOrderDO.class)
|
||||||
|
.select("u.nickname as businessManName", "d.name as businessDeptName", "e.name as customerName")
|
||||||
|
.leftJoin(AdminUserDO.class, "u", AdminUserDO::getId, ProjectOrderDO::getBusinessMan)
|
||||||
|
.leftJoin(DeptDO.class, "d", DeptDO::getId, ProjectOrderDO::getBusinessDeptId)
|
||||||
|
.leftJoin(CustomerDO.class, "e", CustomerDO::getId, ProjectOrderDO::getCustomerId)
|
||||||
|
.leftJoin(PlanDO.class,"p",PlanDO::getProjectId,ProjectOrderDO::getId)
|
||||||
|
.eq(PlanDO::getStatus,2)
|
||||||
|
.disableSubLogicDel()
|
||||||
|
.orderByDesc(ProjectOrderDO::getId);
|
||||||
|
query.like(!StringUtils.isEmpty(reqVO.getCode()), ProjectOrderDO::getCode, reqVO.getCode())
|
||||||
|
.like(!StringUtils.isEmpty(reqVO.getCustomerName()), "e.name", reqVO.getCustomerName())
|
||||||
|
.like(!StringUtils.isEmpty(reqVO.getBusinessManName()), "u.nickname", reqVO.getBusinessManName())
|
||||||
|
.like(!StringUtils.isEmpty(reqVO.getProjectName()), ProjectOrderDO::getProjectName, reqVO.getProjectName())
|
||||||
|
.like(!StringUtils.isEmpty(reqVO.getContractNo()), ProjectOrderDO::getContractNo, reqVO.getContractNo())
|
||||||
|
.eq(reqVO.getHasPrice() != null, ProjectOrderDO::getHasPrice, reqVO.getHasPrice())
|
||||||
|
.eq(reqVO.getOrderStatus() != null, ProjectOrderDO::getOrderStatus, reqVO.getOrderStatus())
|
||||||
|
.eq(reqVO.getDeliveryStatus() != null, ProjectOrderDO::getDeliveryStatus, reqVO.getDeliveryStatus())
|
||||||
|
.in(reqVO.getOrderStatusList() != null && !reqVO.getOrderStatusList().isEmpty(), ProjectOrderDO::getOrderStatus, reqVO.getOrderStatusList())
|
||||||
|
.in(reqVO.getDeliveryStatusList() != null && !reqVO.getDeliveryStatusList().isEmpty(), ProjectOrderDO::getDeliveryStatus, reqVO.getDeliveryStatusList())
|
||||||
|
.eq(reqVO.getIsSnapshot() != null, ProjectOrderDO::getIsSnapshot, reqVO.getIsSnapshot())
|
||||||
|
.eq(reqVO.getHasAlter() != null, ProjectOrderDO::getHasAlter, reqVO.getHasAlter())
|
||||||
|
.like(!StringUtils.isEmpty(reqVO.getSnapshotCode()), ProjectOrderDO::getSnapshotCode, reqVO.getSnapshotCode())
|
||||||
|
.in(CollUtil.isNotEmpty(reqVO.getIdList()), ProjectOrderDO::getId, reqVO.getIdList())
|
||||||
|
;
|
||||||
|
return selectPage(reqVO, query);
|
||||||
|
}
|
||||||
default ProjectOrderDO selectById(Long id) {
|
default ProjectOrderDO selectById(Long id) {
|
||||||
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||||
query.selectAll(ProjectOrderDO.class)
|
query.selectAll(ProjectOrderDO.class)
|
||||||
|
@ -169,7 +169,9 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
|||||||
query.orderByDesc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort);
|
query.orderByDesc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort);
|
||||||
}else {
|
}else {
|
||||||
//未完工升序
|
//未完工升序
|
||||||
query.orderByAsc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort)
|
|
||||||
|
query.eq(TaskDispatchDO::getDispatchStatus,2)
|
||||||
|
.orderByAsc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(postIds)) {
|
if (CollUtil.isNotEmpty(postIds)) {
|
||||||
|
@ -5,6 +5,7 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
|||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||||
@ -35,6 +36,7 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX<UnqualifiedNo
|
|||||||
.select("u1.nickname as ownerName", "u2.nickname as creatorName", "u3.nickname as auditorName")
|
.select("u1.nickname as ownerName", "u2.nickname as creatorName", "u3.nickname as auditorName")
|
||||||
.select("h.name as procedureName")
|
.select("h.name as procedureName")
|
||||||
.leftJoin(PlanSubDO.class, "b", PlanSubDO::getProjectSubId, UnqualifiedNotificationDO::getProjectSubId)
|
.leftJoin(PlanSubDO.class, "b", PlanSubDO::getProjectSubId, UnqualifiedNotificationDO::getProjectSubId)
|
||||||
|
.leftJoin(PlanDO.class,"p",PlanDO::getId,PlanSubDO::getProjectPlanId)
|
||||||
.leftJoin(ProjectOrderSubDO.class, "c", ProjectOrderSubDO::getId, UnqualifiedNotificationDO::getProjectSubId)
|
.leftJoin(ProjectOrderSubDO.class, "c", ProjectOrderSubDO::getId, UnqualifiedNotificationDO::getProjectSubId)
|
||||||
.leftJoin(ProjectOrderDO.class, "d", ProjectOrderDO::getId, UnqualifiedNotificationDO::getProjectId)
|
.leftJoin(ProjectOrderDO.class, "d", ProjectOrderDO::getId, UnqualifiedNotificationDO::getProjectId)
|
||||||
.leftJoin(CustomerDO.class, "e", CustomerDO::getId, ProjectOrderDO::getCustomerId)
|
.leftJoin(CustomerDO.class, "e", CustomerDO::getId, ProjectOrderDO::getCustomerId)
|
||||||
@ -45,7 +47,8 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX<UnqualifiedNo
|
|||||||
.leftJoin(AdminUserDO.class, "u2", AdminUserDO::getId, UnqualifiedNotificationDO::getCreator)
|
.leftJoin(AdminUserDO.class, "u2", AdminUserDO::getId, UnqualifiedNotificationDO::getCreator)
|
||||||
.leftJoin(AdminUserDO.class, "u3", AdminUserDO::getId, UnqualifiedNotificationDO::getAuditor)
|
.leftJoin(AdminUserDO.class, "u3", AdminUserDO::getId, UnqualifiedNotificationDO::getAuditor)
|
||||||
.disableSubLogicDel()
|
.disableSubLogicDel()
|
||||||
.orderByDesc(UnqualifiedNotificationDO::getId);
|
.eq(PlanDO::getStatus,2)
|
||||||
|
.orderByDesc(PlanDO::getId);
|
||||||
|
|
||||||
query.like(!StringUtils.isEmpty(reqVO.getCode()), UnqualifiedNotificationDO::getCode, reqVO.getCode())
|
query.like(!StringUtils.isEmpty(reqVO.getCode()), UnqualifiedNotificationDO::getCode, reqVO.getCode())
|
||||||
.eq(!StringUtils.isEmpty(reqVO.getType()), UnqualifiedNotificationDO::getType, reqVO.getType())
|
.eq(!StringUtils.isEmpty(reqVO.getType()), UnqualifiedNotificationDO::getType, reqVO.getType())
|
||||||
|
@ -105,9 +105,12 @@ public interface ZjPgMasterLineMapper extends BaseMapperX<ZjPgMasterLineDO> {
|
|||||||
query.selectAll(ZjPgMasterLineDO.class)
|
query.selectAll(ZjPgMasterLineDO.class)
|
||||||
.select("d.amounts,d.workTime")
|
.select("d.amounts,d.workTime")
|
||||||
.leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_zj_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id")
|
.leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_zj_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id")
|
||||||
.orderByAsc(ZjPgMasterLineDO::getTaskNo,ZjPgMasterLineDO::getPgNumber)
|
|
||||||
.disableSubLogicDel();
|
.disableSubLogicDel();
|
||||||
|
if(reqVO.getPgType() == 1){
|
||||||
|
query.orderByDesc(ZjPgMasterLineDO::getPgNumber);
|
||||||
|
}else {
|
||||||
|
query.orderByAsc(ZjPgMasterLineDO::getTaskNo,ZjPgMasterLineDO::getPgNumber);
|
||||||
|
}
|
||||||
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, ZjPgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, ZjPgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
||||||
.eq(reqVO.getPgType() != null, ZjPgMasterLineDO::getPgType, reqVO.getPgType())
|
.eq(reqVO.getPgType() != null, ZjPgMasterLineDO::getPgType, reqVO.getPgType())
|
||||||
.eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
.eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
||||||
|
@ -31,8 +31,8 @@ public interface ProcessDesignService {
|
|||||||
*/
|
*/
|
||||||
Long createProcessDesign(@Valid ProcessDesignSaveReqVO createReqVO);
|
Long createProcessDesign(@Valid ProcessDesignSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
Long updateBaoGong( ProcessDesignSaveReqSubVO processDesignSaveReqSubVO);
|
||||||
Long updateBaoGong(Long zid, BigDecimal progress, String imageLink);
|
Long updateBaoGong(Long zid, BigDecimal progress, String imageLink,String remark);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新工艺设计
|
* 更新工艺设计
|
||||||
|
@ -7,6 +7,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.ObjectUtils;
|
|||||||
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignProgressPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignProgressPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignSaveReqSubVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignSaveReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignSaveReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesign.ProcessDesignDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesign.ProcessDesignDO;
|
||||||
@ -51,9 +52,57 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
|
|||||||
public PageResult<ProcessDesignProgressDO> getProcessPage(ProcessDesignProgressPageReqVO pageReqVO) {
|
public PageResult<ProcessDesignProgressDO> getProcessPage(ProcessDesignProgressPageReqVO pageReqVO) {
|
||||||
return processDesignProgressMapper.selectPage(pageReqVO);
|
return processDesignProgressMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink){
|
public Long updateBaoGong(ProcessDesignSaveReqSubVO reqVO){
|
||||||
|
//先取出主ID下的所有报工百分比判断不能报工不能超过100
|
||||||
|
ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(reqVO.getZid());
|
||||||
|
BigDecimal value1 = reqVO.getProgress();
|
||||||
|
BigDecimal threshold = new BigDecimal("100");
|
||||||
|
if(processDesignProgressDOS != null){
|
||||||
|
//相加判断是否大于100,大于时返回前端并给用户提示
|
||||||
|
|
||||||
|
BigDecimal value2 = processDesignProgressDOS.getProgress();
|
||||||
|
BigDecimal sum = value1.add(value2);
|
||||||
|
|
||||||
|
if (value1.compareTo(threshold) > 0) {
|
||||||
|
//大于100时不执行,并返回给用户,提示设计进度不能超过100
|
||||||
|
throw exception(TASK_REPORT_PARAMS_ERRORJD);
|
||||||
|
} else {
|
||||||
|
if(processDesignProgressDOS.getProgress().compareTo(value1)>0){
|
||||||
|
throw exception(TASK_REPORT_PARAMS_ERRORSJBG);
|
||||||
|
}else{
|
||||||
|
//反之插入数据库数据
|
||||||
|
ProcessDesignProgressDO processDesignProgressDO = new ProcessDesignProgressDO();
|
||||||
|
processDesignProgressDO.setProcessDesignId(reqVO.getZid());
|
||||||
|
processDesignProgressDO.setProgress(reqVO.getProgress());
|
||||||
|
processDesignProgressDO.setBlueprintLink(reqVO.getImageLink());
|
||||||
|
if (reqVO.getRemark() != null && !reqVO.getRemark().trim().equals("")){
|
||||||
|
processDesignProgressDO.setRemark(reqVO.getRemark());
|
||||||
|
}
|
||||||
|
|
||||||
|
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(value1.compareTo(threshold) > 0){
|
||||||
|
throw exception(TASK_REPORT_PARAMS_ERRORJD);
|
||||||
|
}else{
|
||||||
|
//反之插入数据库数据
|
||||||
|
ProcessDesignProgressDO processDesignProgressDO = new ProcessDesignProgressDO();
|
||||||
|
processDesignProgressDO.setProcessDesignId(reqVO.getZid());
|
||||||
|
processDesignProgressDO.setProgress(reqVO.getProgress());
|
||||||
|
processDesignProgressDO.setBlueprintLink(reqVO.getImageLink());
|
||||||
|
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink,String remark){
|
||||||
//先取出主ID下的所有报工百分比判断不能报工不能超过100
|
//先取出主ID下的所有报工百分比判断不能报工不能超过100
|
||||||
ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(zid);
|
ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(zid);
|
||||||
BigDecimal value1 = progress;
|
BigDecimal value1 = progress;
|
||||||
@ -76,6 +125,7 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
|
|||||||
processDesignProgressDO.setProcessDesignId(zid);
|
processDesignProgressDO.setProcessDesignId(zid);
|
||||||
processDesignProgressDO.setProgress(progress);
|
processDesignProgressDO.setProgress(progress);
|
||||||
processDesignProgressDO.setBlueprintLink(imageLink);
|
processDesignProgressDO.setBlueprintLink(imageLink);
|
||||||
|
processDesignProgressDO.setRemark(remark);
|
||||||
processDesignProgressMapper.insert(processDesignProgressDO);
|
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,7 @@ public interface ProjectOrderService {
|
|||||||
* @return 项目订单分页
|
* @return 项目订单分页
|
||||||
*/
|
*/
|
||||||
PageResult<ProjectOrderDO> getProjectOrderPage(ProjectOrderPageReqVO pageReqVO);
|
PageResult<ProjectOrderDO> getProjectOrderPage(ProjectOrderPageReqVO pageReqVO);
|
||||||
|
PageResult<ProjectOrderDO> getProjectOrderPageWx(ProjectOrderPageReqVO pageReqVO);
|
||||||
PageResult<ProjectOrderDO> getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO);
|
PageResult<ProjectOrderDO> getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO);
|
||||||
|
|
||||||
ProjectOrderDO getProjectOrderCost(Long id,Long projectSubId);
|
ProjectOrderDO getProjectOrderCost(Long id,Long projectSubId);
|
||||||
|
@ -367,7 +367,10 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
|||||||
return projectOrderMapper.selectPage(pageReqVO);
|
return projectOrderMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<ProjectOrderDO> getProjectOrderPageWx(ProjectOrderPageReqVO pageReqVO) {
|
||||||
|
return projectOrderMapper.selectPageWx(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<ProjectOrderDO> getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO) {
|
public PageResult<ProjectOrderDO> getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO) {
|
||||||
|
@ -115,7 +115,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
throw exception(PROCESS_BOM_DETAIL_NOT_EXISTS);
|
throw exception(PROCESS_BOM_DETAIL_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新
|
// 更新
|
||||||
TaskDispatchDO updateObj = BeanUtils.toBean(updateReqVO, TaskDispatchDO.class);
|
TaskDispatchDO updateObj = BeanUtils.toBean(updateReqVO, TaskDispatchDO.class);
|
||||||
if(!updateObj.canOperate(operateTypeEnum)){
|
if(!updateObj.canOperate(operateTypeEnum)){
|
||||||
@ -124,11 +123,9 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
// 明细工序状态更新
|
// 明细工序状态更新
|
||||||
if(operateTypeEnum == OperateTypeEnum.SUBMIT){
|
if(operateTypeEnum == OperateTypeEnum.SUBMIT){
|
||||||
updateReqVO.getTaskDispatchDetails().forEach(taskDispatchDetailDO -> {
|
updateReqVO.getTaskDispatchDetails().forEach(taskDispatchDetailDO -> {
|
||||||
if(taskDispatchDetailDO.getProcedureStatus().intValue() == 0 ||
|
if(taskDispatchDetailDO.getProcedureStatus().intValue() == 0||taskDispatchDetailDO.getBeforeAmount()!=taskDispatchDetailDO.getAmount()
|
||||||
(taskDispatchDetailDO.getBeforeAmount()!=null && taskDispatchDetailDO.getAmount()!=null && taskDispatchDetailDO.getAmount() != taskDispatchDetailDO.getBeforeAmount())
|
|
||||||
|| (taskDispatchDetailDO.getBeforeAmount() == null && taskDispatchDetailDO.getAmount() != null)
|
|
||||||
|| (taskDispatchDetailDO.getBeforeAmount() != null && taskDispatchDetailDO.getAmount() == null)
|
|
||||||
){
|
){
|
||||||
|
taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount());
|
||||||
taskDispatchDetailDO.setProcedureStatus(TaskDispatchProcedureStatusEnum.SUBMITTED.getCode());
|
taskDispatchDetailDO.setProcedureStatus(TaskDispatchProcedureStatusEnum.SUBMITTED.getCode());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -148,9 +145,12 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
updateObj.setDispatchStatus(TaskDispatchStatusEnum.valueOf(updateReqVO.getActive()).getCode());
|
updateObj.setDispatchStatus(TaskDispatchStatusEnum.valueOf(updateReqVO.getActive()).getCode());
|
||||||
taskDispatchMapper.updateById(updateObj);
|
taskDispatchMapper.updateById(updateObj);
|
||||||
// 更新子表
|
// 更新子表
|
||||||
|
if(operateTypeEnum != OperateTypeEnum.CANCEL_SUBMIT){
|
||||||
updateTaskDispatchDetailList(updateReqVO.getId(), updateReqVO.getTaskDispatchDetails());
|
updateTaskDispatchDetailList(updateReqVO.getId(), updateReqVO.getTaskDispatchDetails());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteTaskDispatch(Long id) {
|
public void deleteTaskDispatch(Long id) {
|
||||||
@ -309,10 +309,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
List<TaskDispatchDetailDO> taskDispatchDetailDOS = taskDispatchDetailMapper.selectListByDispatchId(dispatchId);
|
List<TaskDispatchDetailDO> taskDispatchDetailDOS = taskDispatchDetailMapper.selectListByDispatchId(dispatchId);
|
||||||
for (TaskDispatchDetailDO taskDispatchDetailDO : taskDispatchDetailDOS) {
|
for (TaskDispatchDetailDO taskDispatchDetailDO : taskDispatchDetailDOS) {
|
||||||
taskDispatchDetailDO.setBeginProduce(taskReportMapper.hasReport(taskDispatchDetailDO.getId())) ;
|
taskDispatchDetailDO.setBeginProduce(taskReportMapper.hasReport(taskDispatchDetailDO.getId())) ;
|
||||||
if (taskDispatchDetailDO.getAmount()!=null){
|
|
||||||
|
|
||||||
taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return taskDispatchDetailDOS;
|
return taskDispatchDetailDOS;
|
||||||
}
|
}
|
||||||
@ -349,31 +345,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
postIds.add(fpUserDetailDO.getPostId());
|
postIds.add(fpUserDetailDO.getPostId());
|
||||||
}
|
}
|
||||||
PageResult<TaskDispatchDetailDO> taskDispatchDetailDOPageResult = taskDispatchDetailMapper.selectPageWx(pageReqVO, postIds);
|
PageResult<TaskDispatchDetailDO> taskDispatchDetailDOPageResult = taskDispatchDetailMapper.selectPageWx(pageReqVO, postIds);
|
||||||
// List<TaskDispatchDetailDO> list = taskDispatchDetailDOPageResult.getList();
|
|
||||||
// List<TaskDispatchDetailDO> afterList = new ArrayList<>();
|
|
||||||
// if (CollUtil.isNotEmpty(list)){
|
|
||||||
// Map<String, List<TaskDispatchDetailDO>> collect ;
|
|
||||||
// if(pageReqVO.getProcedureStatusList().size()==1 && pageReqVO.getProcedureStatusList().get(0)==2){
|
|
||||||
// collect = list.stream()
|
|
||||||
// .collect(Collectors.groupingBy(
|
|
||||||
// TaskDispatchDetailDO::getDispatchCode,
|
|
||||||
// () -> new TreeMap<>(Comparator.reverseOrder()),
|
|
||||||
// Collectors.toList()
|
|
||||||
// ));
|
|
||||||
//
|
|
||||||
// }else {
|
|
||||||
// collect = list.stream()
|
|
||||||
// .collect(Collectors.groupingBy(
|
|
||||||
// TaskDispatchDetailDO::getDispatchCode,
|
|
||||||
// TreeMap::new,
|
|
||||||
// Collectors.toList()
|
|
||||||
// ));
|
|
||||||
// }
|
|
||||||
// collect.forEach((code,list2)->{
|
|
||||||
// afterList.addAll(list2);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// taskDispatchDetailDOPageResult.setList(afterList);
|
|
||||||
return taskDispatchDetailDOPageResult;
|
return taskDispatchDetailDOPageResult;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@ -644,6 +615,9 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
taskDispatchDetailMapper.updateBatch(updateList);
|
taskDispatchDetailMapper.updateBatch(updateList);
|
||||||
}
|
}
|
||||||
if(!insertList.isEmpty()) {
|
if(!insertList.isEmpty()) {
|
||||||
|
for (TaskDispatchDetailDO taskDispatchDetailDO : insertList) {
|
||||||
|
taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount());
|
||||||
|
}
|
||||||
taskDispatchDetailMapper.insertBatch(insertList);
|
taskDispatchDetailMapper.insertBatch(insertList);
|
||||||
//如果插入不为空区分是按人还是按岗位
|
//如果插入不为空区分是按人还是按岗位
|
||||||
// Map<Long, List<TaskDispatchDetailDO>> groupedByType = insertList.stream().collect(Collectors.groupingBy(vo -> vo.getDispatchType() == null ? 0: vo.getDispatchType()));
|
// Map<Long, List<TaskDispatchDetailDO>> groupedByType = insertList.stream().collect(Collectors.groupingBy(vo -> vo.getDispatchType() == null ? 0: vo.getDispatchType()));
|
||||||
|
@ -12,6 +12,8 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.zjbgmasterline.ZjBgMasterLineMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.zjbgmasterline.ZjBgMasterLineMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum;
|
import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||||
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
|
import com.chanko.yunxi.mes.module.system.dal.mysql.user.AdminUserMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -57,11 +59,15 @@ public class ZjPgMasterServiceImpl implements ZjPgMasterService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MouldTypeMapper mouldTypeMapper;
|
private MouldTypeMapper mouldTypeMapper;
|
||||||
|
@Resource
|
||||||
|
private AdminUserMapper adminUserMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ZjPgMasterLineDO getLine(Integer id) {
|
public ZjPgMasterLineDO getLine(Integer id) {
|
||||||
return zjPgMasterLineMapper.selectById(id);
|
ZjPgMasterLineDO zjPgMasterLineDO = zjPgMasterLineMapper.selectById(id);
|
||||||
|
AdminUserDO adminUserDO = adminUserMapper.selectById(zjPgMasterLineDO.getDetilUser());
|
||||||
|
zjPgMasterLineDO.setNickName(adminUserDO.getNickname());
|
||||||
|
return zjPgMasterLineDO;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public ZjPgMasterLineDO getTaskDispatchDetail(ZjPgMasterLinePageReqVO pageReqVO){
|
public ZjPgMasterLineDO getTaskDispatchDetail(ZjPgMasterLinePageReqVO pageReqVO){
|
||||||
|
@ -70,7 +70,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="材质" prop="compositionId">
|
<el-form-item label="材质" prop="compositionId">
|
||||||
<el-input v-model="formData.compositionId" placeholder="" />
|
<!-- <el-input v-model="formData.compositionId" placeholder="" /> -->
|
||||||
|
<CompositionSelect v-model="formData.compositionId" disabled @update:new-value="(val) => { formData.compositionId = val.id; }" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -80,7 +81,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-input v-model="formData.unit" placeholder="请输入单位" />
|
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="formData.unit"/>
|
||||||
|
<!-- <el-input v-model="formData.unit" placeholder="请输入单位" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -98,7 +100,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="检验人" prop="detilUser">
|
<el-form-item label="检验人" prop="detilUser">
|
||||||
<el-input v-model="formData.detilUser" placeholder="" />
|
<el-input disabled v-model="formData.nickName" placeholder="" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -119,12 +121,14 @@
|
|||||||
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="开始日期" prop="startTime">
|
<el-form-item label="开始日期" prop="startTime">
|
||||||
<el-date-picker v-model="formData.startTime" type="date" value-format="x" placeholder="" />
|
<el-input v-model="formData.finalStartTime" disabled="true"/>
|
||||||
|
<!-- <el-date-picker v-model="formData.startTime" type="date" value-format="x" placeholder="" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="结束日期" prop="entTime">
|
<el-form-item label="结束日期" prop="entTime">
|
||||||
<el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" />
|
<el-input v-model="formData.finalEndTime" disabled="true"/>
|
||||||
|
<!-- <el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -158,6 +162,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import * as PgMasterApi from '@/api/heli/pgmaster'
|
import * as PgMasterApi from '@/api/heli/pgmaster'
|
||||||
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
|
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
|
||||||
|
import CompositionSelect from '../hlvuestyle/compositionSelect.vue'
|
||||||
const {
|
const {
|
||||||
t
|
t
|
||||||
} = useI18n() // 国际化
|
} = useI18n() // 国际化
|
||||||
@ -198,12 +203,24 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
|||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
pgNumber: undefined,
|
pgNumber: undefined,
|
||||||
active: undefined,
|
active: undefined,
|
||||||
|
finalStartTime:'',
|
||||||
|
finalEndTime:'',
|
||||||
|
nickName:'',
|
||||||
})
|
})
|
||||||
const formRules = reactive({})
|
const formRules = reactive({})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
const formatDate = (date) => {
|
||||||
|
const d = new Date(date);
|
||||||
|
const year = d.getFullYear();
|
||||||
|
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
||||||
|
const day = d.getDate().toString().padStart(2, '0');
|
||||||
|
const hours = d.getHours().toString().padStart(2, '0');
|
||||||
|
const minutes = d.getMinutes().toString().padStart(2, '0');
|
||||||
|
const seconds = d.getSeconds().toString().padStart(2, '0');
|
||||||
|
return `${year}-${month}-${day}${hours}:${minutes}:${seconds}`;
|
||||||
|
}
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id ? : number) => {
|
const open = async (type: string, nickName :string,id ? : number) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
dialogTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
@ -213,9 +230,12 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
|||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
formData.value = await PgMasterApi.getPgMasterLineListByZlPgIdLine(id)
|
formData.value = await PgMasterApi.getPgMasterLineListByZlPgIdLine(id)
|
||||||
|
formData.value.finalStartTime = formatDate(formData.value.startTime);
|
||||||
|
formData.value.finalEndTime = formatDate(formData.value.entTime);
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
formData.value.nickName = nickName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
@ -279,6 +299,9 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
|||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
pgNumber: undefined,
|
pgNumber: undefined,
|
||||||
active: undefined,
|
active: undefined,
|
||||||
|
finalStartTime:'',
|
||||||
|
finalEndTime:'',
|
||||||
|
nickName:'',
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="检验人" prop="detilUser">
|
<el-form-item label="检验人" prop="detilUser">
|
||||||
<UserSelect v-model="queryParams.detilUser" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
<UserSelect v-model="queryParams.detilUser" @update:new-value="handleSelectedUser1" class="!w-265px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="检验人" prop="detilUser">
|
<!-- <el-form-item label="检验人" prop="detilUser">
|
||||||
@ -158,14 +158,15 @@
|
|||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
||||||
<el-table-column v-if="false" label="主键" align="center" prop="id" />
|
<el-table-column v-if="false" label="主键" align="center" prop="id" />
|
||||||
<el-table-column v-if="false"
|
<el-table-column
|
||||||
|
v-if="false"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
width="180px"
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="生产计划单号" align="center" prop="taskNo" width="200" />
|
<el-table-column label="生产计划单号" fixed="left" align="center" prop="taskNo" width="200" />
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" />
|
<el-table-column label="子项目名称" align="center" prop="projectSubName" />
|
||||||
<el-table-column label="物料名称" align="center" prop="materialName" />
|
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||||
@ -210,12 +211,12 @@
|
|||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="140">
|
<el-table-column label="操作" align="center" width="140" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openForm('update', scope.row.id)"
|
@click="openForm('update', scope.row.nickName,scope.row.id)"
|
||||||
v-hasPermi="['heli:pg-master-line:update']"
|
v-hasPermi="['heli:pg-master-line:update']"
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
@ -324,8 +325,8 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const openForm = (type: string, id?: number) => {
|
const openForm = (type: string,nickName:string, id?: number) => {
|
||||||
formRef.value.open(type, id)
|
formRef.value.open(type, nickName,id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
@ -245,7 +245,7 @@ class="!w-260px" v-model="formData.createTime" type="date" value-format="x"
|
|||||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">派工明细</span>
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">派工明细</span>
|
||||||
</template>
|
</template>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col v-if="active != 'detail' || !detailDisabled">
|
<el-col v-if=" (formData.dispatchStatus != 2 && active != 'detail') || !detailDisabled">
|
||||||
<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-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
@ -260,7 +260,7 @@ ref="subFormRef" :model="formData.taskDispatchDetails" :rules="subFormRules"
|
|||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.procedureId`" :rules="subFormRules.procedureId" class="mb-0px!">
|
<el-form-item :prop="`${$index}.procedureId`" :rules="subFormRules.procedureId" class="mb-0px!">
|
||||||
<ProcedureSelect
|
<ProcedureSelect
|
||||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0"
|
:disabled="detailDisabled || row.procedureStatus != 0"
|
||||||
v-model="row.procedureId"
|
v-model="row.procedureId"
|
||||||
@update:new-value="(val) => { handleSelectedProcedure(row, val); }" />
|
@update:new-value="(val) => { handleSelectedProcedure(row, val); }" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -276,7 +276,7 @@ ref="subFormRef" :model="formData.taskDispatchDetails" :rules="subFormRules"
|
|||||||
<el-form-item :prop="`${$index}.sort`" :rules="subFormRules.sort" class="mb-0px!">
|
<el-form-item :prop="`${$index}.sort`" :rules="subFormRules.sort" class="mb-0px!">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
min="0" :precision="0" class="!w-240px"
|
min="0" :precision="0" class="!w-240px"
|
||||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.sort"
|
:disabled="detailDisabled || (row.beginProduce != 0 && row.procedureStatus != 0)" v-model="row.sort"
|
||||||
placeholder="请输入顺序号" />
|
placeholder="请输入顺序号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -288,7 +288,7 @@ min="0" :precision="0" class="!w-240px"
|
|||||||
<!-- <UserSelect-->
|
<!-- <UserSelect-->
|
||||||
<!--v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"-->
|
<!--v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"-->
|
||||||
<!-- @update:new-value="handleSelectedUser($index, $event)" />-->
|
<!-- @update:new-value="handleSelectedUser($index, $event)" />-->
|
||||||
<el-select v-model="row.owner" :disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" @update:new-value="handleSelectedUser($index, $event)">
|
<el-select v-model="row.owner" :disabled="detailDisabled || (row.beginProduce != 0 && row.procedureStatus != 0)" @update:new-value="handleSelectedUser($index, $event)">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userInit" :key="dict.id"
|
v-for="dict in userInit" :key="dict.id"
|
||||||
:label="dict.username+' '+dict.nickname" :value="dict.id" />
|
:label="dict.username+' '+dict.nickname" :value="dict.id" />
|
||||||
@ -301,7 +301,7 @@ v-for="dict in userInit" :key="dict.id"
|
|||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.startTime`" :rules="subFormRules.startTime" class="mb-0px!">
|
<el-form-item :prop="`${$index}.startTime`" :rules="subFormRules.startTime" class="mb-0px!">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.startTime"
|
:disabled="detailDisabled " v-model="row.startTime"
|
||||||
type="date" value-format="x" placeholder="选择预计开始日期" />
|
type="date" value-format="x" placeholder="选择预计开始日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -311,7 +311,7 @@ v-for="dict in userInit" :key="dict.id"
|
|||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.endTime`" :rules="subFormRules.endTime" class="mb-0px!">
|
<el-form-item :prop="`${$index}.endTime`" :rules="subFormRules.endTime" class="mb-0px!">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.endTime"
|
:disabled="detailDisabled " v-model="row.endTime"
|
||||||
type="date" value-format="x" placeholder="选择预计结束日期" />
|
type="date" value-format="x" placeholder="选择预计结束日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -322,7 +322,7 @@ v-for="dict in userInit" :key="dict.id"
|
|||||||
<el-form-item :prop="`${$index}.workTime`" :rules="subFormRules.workTime" class="mb-0px!">
|
<el-form-item :prop="`${$index}.workTime`" :rules="subFormRules.workTime" class="mb-0px!">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
min="0" :precision="2" class="!w-240px"
|
min="0" :precision="2" class="!w-240px"
|
||||||
:disabled="detailDisabled|| row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.workTime"
|
:disabled="detailDisabled" v-model="row.workTime"
|
||||||
placeholder="请输入预计工时" />
|
placeholder="请输入预计工时" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -344,7 +344,7 @@ min="0" :precision="2" class="!w-240px"
|
|||||||
<EquipmentSelect
|
<EquipmentSelect
|
||||||
v-model="row.deviceModel"
|
v-model="row.deviceModel"
|
||||||
@update:new-value="handleSelectedequip($index, $event)"
|
@update:new-value="handleSelectedequip($index, $event)"
|
||||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" />
|
:disabled="detailDisabled || (row.beginProduce != 0 && row.procedureStatus != 0)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -352,7 +352,7 @@ min="0" :precision="2" class="!w-240px"
|
|||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.summary`" class="mb-0px!">
|
<el-form-item :prop="`${$index}.summary`" class="mb-0px!">
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.summary"
|
:disabled="detailDisabled ||(row.beginProduce != 0 && row.procedureStatus != 0)" v-model="row.summary"
|
||||||
placeholder="请输入工序要点" />
|
placeholder="请输入工序要点" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -366,7 +366,7 @@ min="0" :precision="2" class="!w-240px"
|
|||||||
<el-table-column fixed="right" label="操作" align="center" min-width="100">
|
<el-table-column fixed="right" label="操作" align="center" min-width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="'detail' != active && scope.row.procedureStatus == 0" link type="danger"
|
v-if="'detail' != active && (scope.row.beginProduce == 0 && scope.row.procedureStatus == 0)" link type="danger"
|
||||||
size="small" @click.prevent="onDeleteItem(scope.$index)">
|
size="small" @click.prevent="onDeleteItem(scope.$index)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -296,7 +296,7 @@ v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"
|
|||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.startTime`" :rules="subFormRules.startTime" class="mb-0px!">
|
<el-form-item :prop="`${$index}.startTime`" :rules="subFormRules.startTime" class="mb-0px!">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="detailDisabled || row.procedureStatus != 0" v-model="row.startTime"
|
:disabled="detailDisabled " v-model="row.startTime"
|
||||||
type="date" value-format="x" placeholder="选择预计开始日期" />
|
type="date" value-format="x" placeholder="选择预计开始日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -306,7 +306,7 @@ v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"
|
|||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.endTime`" :rules="subFormRules.endTime" class="mb-0px!">
|
<el-form-item :prop="`${$index}.endTime`" :rules="subFormRules.endTime" class="mb-0px!">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="detailDisabled || row.procedureStatus != 0" v-model="row.endTime"
|
:disabled=" detailDisabled" v-model="row.endTime"
|
||||||
type="date" value-format="x" placeholder="选择预计结束日期" />
|
type="date" value-format="x" placeholder="选择预计结束日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -317,7 +317,7 @@ v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"
|
|||||||
<el-form-item :prop="`${$index}.workTime`" :rules="subFormRules.workTime" class="mb-0px!">
|
<el-form-item :prop="`${$index}.workTime`" :rules="subFormRules.workTime" class="mb-0px!">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
min="0" :precision="2" class="!w-240px"
|
min="0" :precision="2" class="!w-240px"
|
||||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.workTime"
|
:disabled="detailDisabled " v-model="row.workTime"
|
||||||
placeholder="请输入预计工时" />
|
placeholder="请输入预计工时" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -367,7 +367,7 @@ v-model="row.deviceModel"
|
|||||||
<el-table-column fixed="right" label="操作" align="center" min-width="90">
|
<el-table-column fixed="right" label="操作" align="center" min-width="90">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="'detail' != active && scope.row.procedureStatus == 0" link type="danger"
|
v-if="'detail' != active && (scope.row.beginProduce == 0 && scope.row.procedureStatus == 0)" link type="danger"
|
||||||
size="small" @click.prevent="onDeleteItem(scope.row,scope.$index)">
|
size="small" @click.prevent="onDeleteItem(scope.row,scope.$index)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -459,10 +459,10 @@ v-if="formData.dispatchStatus == 2" @click="printHandle(formData.id)" :disabled=
|
|||||||
</span>
|
</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="centerDialogVisible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="sureToCancle()">
|
<el-button type="primary" @click="sureToCancle()">
|
||||||
确认
|
确认
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button @click="centerDialogVisible = false">取消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -1086,7 +1086,6 @@ const submitForm = async (operate) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const data = formData.value as unknown as TaskDispatchApi.TaskDispatchVO
|
const data = formData.value as unknown as TaskDispatchApi.TaskDispatchVO
|
||||||
console.log(data);
|
|
||||||
let dataId = await TaskDispatchApi.operateTaskDispatch(data)
|
let dataId = await TaskDispatchApi.operateTaskDispatch(data)
|
||||||
message.success(t('common.operationSuccess'))
|
message.success(t('common.operationSuccess'))
|
||||||
|
|
||||||
@ -1146,6 +1145,7 @@ const onAddItem = () => {
|
|||||||
summary: undefined,
|
summary: undefined,
|
||||||
status: 1,
|
status: 1,
|
||||||
procedureStatus: 0,
|
procedureStatus: 0,
|
||||||
|
beginProduce:0,
|
||||||
dispatchId: undefined,
|
dispatchId: undefined,
|
||||||
procedureCode:'' ,
|
procedureCode:'' ,
|
||||||
isReport:0 ,
|
isReport:0 ,
|
||||||
|
@ -52,24 +52,27 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-input v-model="formData.unit" placeholder="" />
|
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="formData.unit"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="检验人" prop="detilUser">
|
<el-form-item label="检验人" prop="detilUser">
|
||||||
<el-input v-model="formData.detilUser" placeholder="" />
|
<el-input v-model="formData.nickName" disabled placeholder="" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="开始日期" prop="startTime">
|
<el-form-item label="开始日期" prop="startTime">
|
||||||
<el-date-picker v-model="formData.startTime" type="date" value-format="x"
|
<el-input v-model="formData.finalStartTime" disabled="true"/>
|
||||||
placeholder="选择开始日期" />
|
<!-- <el-date-picker
|
||||||
|
v-model="formData.startTime" type="date" value-format="x"
|
||||||
|
placeholder="选择开始日期" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="结束日期" prop="entTime">
|
<el-form-item label="结束日期" prop="entTime">
|
||||||
<el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" />
|
<el-input v-model="formData.finalEndTime" disabled="true"/>
|
||||||
|
<!-- <el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -130,6 +133,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import * as ZjPgMasterApi from '@/api/heli/zjpgmaster'
|
import * as ZjPgMasterApi from '@/api/heli/zjpgmaster'
|
||||||
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
|
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
|
||||||
|
import { string } from 'vue-types'
|
||||||
const {
|
const {
|
||||||
t
|
t
|
||||||
} = useI18n() // 国际化
|
} = useI18n() // 国际化
|
||||||
@ -163,10 +167,22 @@
|
|||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
dispatchStatus: undefined,
|
dispatchStatus: undefined,
|
||||||
active: undefined,
|
active: undefined,
|
||||||
|
finalStartTime:'',
|
||||||
|
finalEndTime:'',
|
||||||
|
nickName:'',
|
||||||
})
|
})
|
||||||
const formRules = reactive({})
|
const formRules = reactive({})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
const formatDate = (date) => {
|
||||||
|
const d = new Date(date);
|
||||||
|
const year = d.getFullYear();
|
||||||
|
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
||||||
|
const day = d.getDate().toString().padStart(2, '0');
|
||||||
|
const hours = d.getHours().toString().padStart(2, '0');
|
||||||
|
const minutes = d.getMinutes().toString().padStart(2, '0');
|
||||||
|
const seconds = d.getSeconds().toString().padStart(2, '0');
|
||||||
|
return `${year}-${month}-${day}${hours}:${minutes}:${seconds}`;
|
||||||
|
}
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id ? : number) => {
|
const open = async (type: string, id ? : number) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
@ -178,6 +194,8 @@
|
|||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
formData.value = await ZjPgMasterApi.getZjPgMasterLineListByZlPgIdLine(id)
|
formData.value = await ZjPgMasterApi.getZjPgMasterLineListByZlPgIdLine(id)
|
||||||
|
formData.value.finalStartTime = formatDate(formData.value.startTime);
|
||||||
|
formData.value.finalEndTime = formatDate(formData.value.entTime);
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
@ -230,6 +248,9 @@
|
|||||||
compositionName: undefined,
|
compositionName: undefined,
|
||||||
mouldId: undefined,
|
mouldId: undefined,
|
||||||
mouldName: undefined,
|
mouldName: undefined,
|
||||||
|
finalStartTime:'',
|
||||||
|
finalEndTime:'',
|
||||||
|
nickName:'',
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="检验人" prop="detilUser">
|
<el-form-item label="检验人" prop="detilUser">
|
||||||
<UserSelect v-model="queryParams.detilUser" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
<UserSelect v-model="queryParams.detilUser" @update:new-value="handleSelectedUser1" class="!w-265px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="检验人" prop="detilUser">
|
<!-- <el-form-item label="检验人" prop="detilUser">
|
||||||
@ -94,17 +94,18 @@
|
|||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
||||||
<el-table-column v-if = "false" label="主键" align="center" prop="id" />
|
<el-table-column v-if = "false" label="主键" align="center" prop="id" />
|
||||||
<el-table-column v-if = "false"
|
<el-table-column
|
||||||
|
v-if = "false"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
width="180px"
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="生产计划单号" align="center" prop="taskNo" width="200"/>
|
<el-table-column label="生产计划单号" fixed="left" align="center" prop="taskNo" width="200"/>
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
|
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
|
||||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" width="200"/>
|
<el-table-column label="子项目名称" align="center" prop="projectSubName" width="200"/>
|
||||||
<el-table-column label="模具名称" align="center" prop="mouldName" />
|
<el-table-column label="模具名称" align="center" prop="mouldName" min-width="105" />
|
||||||
<el-table-column label="材质" align="center" prop="compositionName" />
|
<el-table-column label="材质" align="center" prop="compositionName" />
|
||||||
|
|
||||||
<el-table-column label="单位" align="center" prop="unit" >
|
<el-table-column label="单位" align="center" prop="unit" >
|
||||||
@ -116,7 +117,7 @@
|
|||||||
<el-table-column label="检验人" align="center" prop="nickName" />
|
<el-table-column label="检验人" align="center" prop="nickName" />
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="材质名称" align="center" prop="compositionName" />
|
<el-table-column label="材质名称" align="center" prop="compositionName" min-width="100" />
|
||||||
|
|
||||||
<el-table-column label="派工单号" align="center" prop="pgNumber" width="220"/>
|
<el-table-column label="派工单号" align="center" prop="pgNumber" width="220"/>
|
||||||
|
|
||||||
@ -134,20 +135,20 @@
|
|||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
width="240"
|
width="240"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="派工状态" min-width="80">
|
<el-table-column label="派工状态" min-width="105">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.HELI_DISPATCH_STATUS" :value="scope.row.dispatchStatus" />
|
<dict-tag :type="DICT_TYPE.HELI_DISPATCH_STATUS" :value="scope.row.dispatchStatus" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单据状态" min-width="80">
|
<el-table-column label="单据状态" min-width="105" fixed="right" style="text-align: center;">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.HELI_PGTYPE" :value="scope.row.pgType" />
|
<dict-tag :type="DICT_TYPE.HELI_PGTYPE" :value="scope.row.pgType" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="140">
|
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
|
@ -4,10 +4,10 @@ import { onLoad, onShow } from '@dcloudio/uni-app'
|
|||||||
import { getListAPI, getDictAPI,postOperateAPIZF,updateBaoGong } from '@/services/moJuSheJiReport'
|
import { getListAPI, getDictAPI,postOperateAPIZF,updateBaoGong } from '@/services/moJuSheJiReport'
|
||||||
import { useLoginStore } from '@/stores/modules/login'
|
import { useLoginStore } from '@/stores/modules/login'
|
||||||
import { formatDate } from '@/utils/index'
|
import { formatDate } from '@/utils/index'
|
||||||
import popup from './popup.vue';
|
// import popup from './popup.vue';
|
||||||
import { nextTick } from 'vue';
|
import { nextTick } from 'vue';
|
||||||
|
|
||||||
|
const popup = ref<UniHelper.UniPopupInstance>()
|
||||||
const userStore = useLoginStore()
|
const userStore = useLoginStore()
|
||||||
const userId = userStore.userInfo.userId
|
const userId = userStore.userInfo.userId
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ const isFinish = ref(false)
|
|||||||
const isTriggered = ref(false)
|
const isTriggered = ref(false)
|
||||||
const progress = ref(0)
|
const progress = ref(0)
|
||||||
const imageLink = ref(0)
|
const imageLink = ref(0)
|
||||||
|
const remark = ref('')
|
||||||
const selectedId = ref(null); // 定义 selectedId 变量
|
const selectedId = ref(null); // 定义 selectedId 变量
|
||||||
|
|
||||||
// 定义 porps
|
// 定义 porps
|
||||||
@ -47,14 +47,14 @@ const queryParams: Required<any> = {
|
|||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
const showPopup = ref(false);
|
const showPopup = ref(false);
|
||||||
|
|
||||||
const onPopupClose = (progress, imageLink) => {
|
const onPopupClose = (progress, imageLink,remark) => {
|
||||||
|
|
||||||
// 这里可以添加关闭弹出框时的逻辑,例如重置某些状态
|
// 这里可以添加关闭弹出框时的逻辑,例如重置某些状态
|
||||||
showPopup.value = false;
|
showPopup.value = false;
|
||||||
|
console.log(remark)
|
||||||
|
|
||||||
const zid = selectedId.value;
|
const zid = selectedId.value;
|
||||||
callApi(zid,progress,imageLink)
|
callApi(zid,progress,imageLink,remark)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -63,16 +63,22 @@ const onPopupClose = (progress, imageLink) => {
|
|||||||
/* */
|
/* */
|
||||||
|
|
||||||
};
|
};
|
||||||
const callApi = async (zid: Number,progress :Number,imageLink: String) => {
|
const submitDetail = async() =>{
|
||||||
|
const zid = selectedId.value;
|
||||||
|
await callApi(zid,progress.value,imageLink.value,remark.value)
|
||||||
|
popup.value.close()
|
||||||
|
}
|
||||||
|
const callApi = async (zid: Number,progress :Number,imageLink: String,remark:String) => {
|
||||||
console.log(progress);
|
console.log(progress);
|
||||||
if(progress>0){
|
if(progress>0){
|
||||||
//调用报工接口,将录入的进度、图片链接和id传入进去
|
//调用报工接口,将录入的进度、图片链接和id传入进去
|
||||||
await updateBaoGong(zid,progress,imageLink);
|
await updateBaoGong(zid,progress,imageLink,remark);
|
||||||
isFinish.value = false;
|
isFinish.value = false;
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
queryParams.pageNo = 1;
|
queryParams.pageNo = 1;
|
||||||
dataList.value = [];
|
dataList.value = [];
|
||||||
await getListData();
|
await getListData();
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '设计进度填写时不能为0%,请重新填写后提交!',
|
title: '设计进度填写时不能为0%,请重新填写后提交!',
|
||||||
@ -133,8 +139,10 @@ const handleDetail =async (item) => {
|
|||||||
if(props.orderState == 0){
|
if(props.orderState == 0){
|
||||||
progress.value = 0;
|
progress.value = 0;
|
||||||
imageLink.value = item.blueprintLink;
|
imageLink.value = item.blueprintLink;
|
||||||
|
remark.value = item.remark;
|
||||||
await nextTick(); // 等待数据更新和DOM渲染
|
await nextTick(); // 等待数据更新和DOM渲染
|
||||||
showPopup.value = true;
|
// showPopup.value = true;
|
||||||
|
popup.value?.open()
|
||||||
selectedId.value = item.id;
|
selectedId.value = item.id;
|
||||||
}else{
|
}else{
|
||||||
const url = `/pages/moJuSheJiReport/moJuSheJiReport-detail?id=${item.id}&jd=${item.progress}`
|
const url = `/pages/moJuSheJiReport/moJuSheJiReport-detail?id=${item.id}&jd=${item.progress}`
|
||||||
@ -178,6 +186,9 @@ const onRefresherrefresh = async () => {
|
|||||||
// 关闭动画
|
// 关闭动画
|
||||||
isTriggered.value = false
|
isTriggered.value = false
|
||||||
}
|
}
|
||||||
|
const handleClose = () =>{
|
||||||
|
popup.value.close();
|
||||||
|
}
|
||||||
// const searchVal = ref('')
|
// const searchVal = ref('')
|
||||||
// const dataListDefault = ref([])
|
// const dataListDefault = ref([])
|
||||||
// const handleSearch = async () => {
|
// const handleSearch = async () => {
|
||||||
@ -226,7 +237,37 @@ const onRefresherrefresh = async () => {
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!-- <popup :show="showPopup" :progress="0.0" :imageLink="''" @close="onPopupClose" /> -->
|
<!-- <popup :show="showPopup" :progress="0.0" :imageLink="''" @close="onPopupClose" /> -->
|
||||||
<popup :showPopup="showPopup" :progress="progress" :imageLink="imageLink" @close="onPopupClose" />
|
<uni-popup class="popup" ref="popup" :mask-click="true" type="bottom" background-color="#fff">
|
||||||
|
<view class="title">
|
||||||
|
<view class="text">填写信息</view>
|
||||||
|
<view class="close" @click="handleClose">X</view>
|
||||||
|
</view>
|
||||||
|
<view class="cont">
|
||||||
|
<!-- <view class="item">
|
||||||
|
<view class="label">终检开始时间:</view>
|
||||||
|
<view class="val">{{ formObj.startTime }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="label">终检结束时间:</view>
|
||||||
|
<view class="val">{{ formObj.endTime }}</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="item">
|
||||||
|
<view class="label"><span class="star">*</span>进度百分比:</view>
|
||||||
|
<uni-easyinput class="val" type="number" v-model="progress" placeholder="请输入本次报工工时"></uni-easyinput>
|
||||||
|
<view class="unit">%</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="label"><span class="star">*</span>图纸连接:</view>
|
||||||
|
</view>
|
||||||
|
<uni-easyinput type="textarea" v-model="imageLink" placeholder="请输入图纸链接"></uni-easyinput>
|
||||||
|
<view class="item">
|
||||||
|
<view class="label"><span class="star"></span>备注:</view>
|
||||||
|
</view>
|
||||||
|
<uni-easyinput type="textarea" class="popup-input" v-model="remark" placeholder="请输入备注"/>
|
||||||
|
</view>
|
||||||
|
<view class="ok" @click="submitDetail()">确定</view>
|
||||||
|
</uni-popup>
|
||||||
|
<!-- <popup :showPopup="showPopup" :progress="progress" :imageLink="imageLink" :remark="remark" @close="onPopupClose" /> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -246,7 +287,70 @@ const onRefresherrefresh = async () => {
|
|||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.popup {
|
||||||
|
.title {
|
||||||
|
line-height: 1;
|
||||||
|
padding: 40rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
border-bottom: 1rpx solid #ddd;
|
||||||
|
color: #444;
|
||||||
|
|
||||||
|
.close {
|
||||||
|
position: absolute;
|
||||||
|
right: 24rpx;
|
||||||
|
top: 40rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
width: 60rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cont {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
margin: 40rpx;
|
||||||
|
height: 50vh;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 20rpx 0;
|
||||||
|
color: #737D88;
|
||||||
|
width: 94%;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-size: 32rpx;
|
||||||
|
width: 260rpx;
|
||||||
|
.star {
|
||||||
|
color: red
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.val {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
.unit {
|
||||||
|
width: 100rpx;
|
||||||
|
margin-left: 4rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ok {
|
||||||
|
font-size: 32rpx;
|
||||||
|
margin: 20rpx auto 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
width: 200rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 8rpx 0;
|
||||||
|
background-color: #3C8AF7;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
.data-list {
|
.data-list {
|
||||||
height: 90vh;
|
height: 90vh;
|
||||||
.item {
|
.item {
|
||||||
@ -291,7 +395,7 @@ const onRefresherrefresh = async () => {
|
|||||||
.product-item {
|
.product-item {
|
||||||
margin: 20rpx 0;
|
margin: 20rpx 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: left;
|
||||||
color: #737D88
|
color: #737D88
|
||||||
}
|
}
|
||||||
.product-row {
|
.product-row {
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
<input type="number" class="popup-input" v-model="progress" placeholder="请输入进度">
|
<input type="number" class="popup-input" v-model="progress" placeholder="请输入进度">
|
||||||
<view class="product-item">图纸链接</view>
|
<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="请输入图片链接">
|
||||||
<button @click="onClose">确认上报</button>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -22,12 +24,16 @@ const props = defineProps({
|
|||||||
imageLink: {
|
imageLink: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '123'
|
default: '123'
|
||||||
}
|
},
|
||||||
|
remark: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const progress = ref(0);
|
const progress = ref(0);
|
||||||
const imageLink = ref('');
|
const imageLink = ref('');
|
||||||
|
const remark = ref('');
|
||||||
const emit = defineEmits(['close']);
|
const emit = defineEmits(['close']);
|
||||||
|
|
||||||
const onMaskClick = () => {
|
const onMaskClick = () => {
|
||||||
@ -35,19 +41,20 @@ const onMaskClick = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onClose = () => {
|
const onClose = () => {
|
||||||
emit('close', progress.value, imageLink.value);
|
emit('close', progress.value, imageLink.value,remark.value);
|
||||||
progress.value = 0;
|
progress.value = 0;
|
||||||
imageLink.value = '';
|
imageLink.value = '';
|
||||||
|
remark.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
imageLink.value = props.imageLink;
|
imageLink.value = props.imageLink;
|
||||||
|
remark.value = props.remark;
|
||||||
});
|
});
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
console.log('传入的值');
|
|
||||||
console.log(props.imageLink);
|
|
||||||
imageLink.value = props.imageLink;
|
imageLink.value = props.imageLink;
|
||||||
|
remark.value = props.remark;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -211,8 +211,8 @@ const handleStop = async () => {
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="product-item">上报时间:{{ item.createTime }}</view>
|
<view class="product-item">上报时间:{{ item.createTime }}</view>
|
||||||
<!-- <view class="product-item">生产结束时间:{{ item.endTimeStr }}</view> -->
|
<!-- <view class="product-item">生产结束时间:{{ item.endTimeStr }}</view> -->
|
||||||
|
<view class="product-item">报工进度:{{ item.progress+'%' }}</view>
|
||||||
<view class="product-row">
|
<!-- <view class="product-row">
|
||||||
<view class="row-item">
|
<view class="row-item">
|
||||||
<view class="label">设计进度:</view>
|
<view class="label">设计进度:</view>
|
||||||
<view class="val high-color">{{ item.progress }}%</view>
|
<view class="val high-color">{{ item.progress }}%</view>
|
||||||
@ -221,7 +221,9 @@ const handleStop = async () => {
|
|||||||
<view class="label">图纸链接:</view>
|
<view class="label">图纸链接:</view>
|
||||||
<view class="val high-color">{{ item.blueprintLink }}</view>
|
<view class="val high-color">{{ item.blueprintLink }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
<view class="product-item">图纸链接:{{item.blueprintLink }}</view>
|
||||||
|
<view class="product-item">备注:{{ item.remark }}</view>
|
||||||
<view class="tip-index">
|
<view class="tip-index">
|
||||||
<image src="/static/images/productionReport-detail-index.png" class="icon-status" mode="scaleToFit">
|
<image src="/static/images/productionReport-detail-index.png" class="icon-status" mode="scaleToFit">
|
||||||
</image>
|
</image>
|
||||||
|
@ -163,6 +163,25 @@ const handleStart = async () => {
|
|||||||
}
|
}
|
||||||
// 结束生产
|
// 结束生产
|
||||||
const handleStop = async () => {
|
const handleStop = async () => {
|
||||||
|
|
||||||
|
//算时间和数量
|
||||||
|
//算时间
|
||||||
|
var lastIndex = historyList.value.length-1;
|
||||||
|
var lastItem = historyList.value[lastIndex];
|
||||||
|
console.log( historyList.value)
|
||||||
|
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
||||||
|
//算数量
|
||||||
|
if(historyList.value.length == 1){
|
||||||
|
amount.value =detailInfo.value.amount;
|
||||||
|
}else{
|
||||||
|
var beforeAmount = 0;
|
||||||
|
for (var i = 0 ; i < historyList.value.length-1;i++){
|
||||||
|
beforeAmount += historyList.value[i].amount
|
||||||
|
}
|
||||||
|
var finalamount = detailInfo.value.amount -beforeAmount
|
||||||
|
if(finalamount < 0){finalamount = 0}
|
||||||
|
amount.value = finalamount.toString();
|
||||||
|
}
|
||||||
popup.value.open();
|
popup.value.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { toRaw, ref, onMounted } from 'vue'
|
import { toRaw, ref, onMounted } from 'vue'
|
||||||
import { formatDate } from '@/utils/index'
|
import { formatDate } from '@/utils/index'
|
||||||
import { getApproveOrderAPI, getChildProductAPI } from '@/services/approveOrder'
|
import { getApproveOrderAPI, getChildProductAPI ,getApproveOrderAPIWx} from '@/services/approveOrder'
|
||||||
import { getBomPageAPI, getProcedurePageAPI, getUserPageAPI, postAddAPI } from '@/services/unqualifiedNotification'
|
import { getBomPageAPI, getProcedurePageAPI, getUserPageAPI, postAddAPI } from '@/services/unqualifiedNotification'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { useLoginStore } from '@/stores/modules/login'
|
import { useLoginStore } from '@/stores/modules/login'
|
||||||
@ -33,16 +33,16 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 项目
|
// 项目
|
||||||
let projectData = []
|
const projectData = ref([])
|
||||||
const getProjectData = async () => {
|
const getProjectData = async () => {
|
||||||
const params = {
|
const params = {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 99,
|
pageSize: 999,
|
||||||
orderStatusList: '32',
|
orderStatusList: '32',
|
||||||
isSnapshot: 0,
|
isSnapshot: 0,
|
||||||
deliveryStatusList: '1,2' // 发货状态1|2|3 未发货 部分发货 全部发货
|
deliveryStatusList: '1,2' // 发货状态1|2|3 未发货 部分发货 全部发货
|
||||||
}
|
}
|
||||||
const data = await getApproveOrderAPI(params)
|
const data = await getApproveOrderAPIWx(params)
|
||||||
const arr = []
|
const arr = []
|
||||||
data.list.forEach(e => {
|
data.list.forEach(e => {
|
||||||
const obj = {
|
const obj = {
|
||||||
@ -51,7 +51,8 @@
|
|||||||
}
|
}
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
})
|
})
|
||||||
projectData = arr
|
console.log(arr)
|
||||||
|
projectData.value = arr
|
||||||
}
|
}
|
||||||
const projectChildData = ref([])
|
const projectChildData = ref([])
|
||||||
const getProjectChildData = async (projectOrderId) => {
|
const getProjectChildData = async (projectOrderId) => {
|
||||||
@ -140,7 +141,7 @@
|
|||||||
await getTypeDictData()
|
await getTypeDictData()
|
||||||
await getProjectData()
|
await getProjectData()
|
||||||
await getBomData()
|
await getBomData()
|
||||||
await getProcedurePage()
|
// await getProcedurePage()
|
||||||
await getOwnerDataData()
|
await getOwnerDataData()
|
||||||
// isLoading.value = false
|
// isLoading.value = false
|
||||||
})
|
})
|
||||||
|
@ -162,6 +162,23 @@ const handleStart = async () => {
|
|||||||
}
|
}
|
||||||
// 结束生产
|
// 结束生产
|
||||||
const handleStop = async () => {
|
const handleStop = async () => {
|
||||||
|
// var lastIndex = historyList.value.length-1;
|
||||||
|
var lastItem = historyList.value[0];
|
||||||
|
console.log(historyList.value)
|
||||||
|
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
||||||
|
//算数量
|
||||||
|
if(historyList.value.length == 1){
|
||||||
|
amount.value = detailInfo.value.amount;
|
||||||
|
}else{
|
||||||
|
var beforeAmount = 0;
|
||||||
|
for (var i = historyList.value.length-1 ; i >0;i--){
|
||||||
|
console.log( historyList.value[i])
|
||||||
|
beforeAmount += historyList.value[i].amount
|
||||||
|
}
|
||||||
|
var finalamount = detailInfo.value.amount -beforeAmount
|
||||||
|
if(finalamount < 0){finalamount = 0}
|
||||||
|
amount.value = finalamount.toString();
|
||||||
|
}
|
||||||
popup.value.open();
|
popup.value.open();
|
||||||
/* const params = {
|
/* const params = {
|
||||||
id: detailInfo.value?.id,
|
id: detailInfo.value?.id,
|
||||||
|
@ -15,7 +15,13 @@ export const getApproveOrderAPI = (data: Object) => {
|
|||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export const getApproveOrderAPIWx = (data: Object) => {
|
||||||
|
return http<any[]>({
|
||||||
|
method: 'GET',
|
||||||
|
url: '/heli/project-order/pageWX',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
export const getApproveOrderDetailAPI = (data: Object) => {
|
export const getApproveOrderDetailAPI = (data: Object) => {
|
||||||
return http<any[]>({
|
return http<any[]>({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
@ -19,11 +19,12 @@ export const getListAPI = (data: Object) => {
|
|||||||
/**
|
/**
|
||||||
* 操作生产任务(开始/结束/提交/完成)
|
* 操作生产任务(开始/结束/提交/完成)
|
||||||
*/
|
*/
|
||||||
export const updateBaoGong = (zid: String,progress: String,imageLink:String) => {
|
export const updateBaoGong = (zid: String,progress: String,imageLink:String,remark:String) => {
|
||||||
const data = {
|
const data = {
|
||||||
zid: zid,
|
zid: zid,
|
||||||
progress: progress,
|
progress: progress,
|
||||||
imageLink: imageLink
|
imageLink: imageLink,
|
||||||
|
remark:remark
|
||||||
};
|
};
|
||||||
return http<any[]>({
|
return http<any[]>({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
Loading…
Reference in New Issue
Block a user