近期更新
This commit is contained in:
parent
ab7c159b01
commit
7e2ec50c1a
@ -1,5 +1,7 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.plansub;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.plansub;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailRespVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.shopCalendar.vo.ShopCalendarRespVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.shopCalendar.vo.ShopCalendarRespVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.shopCalendar.ShopCalendarDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.shopCalendar.ShopCalendarDO;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -74,7 +76,6 @@ public class PlanSubController {
|
|||||||
public CommonResult<Integer> getSearchRlTs(@RequestParam("startDateTime") String startDateTime,@RequestParam("endDateTime") String endDateTime) {
|
public CommonResult<Integer> getSearchRlTs(@RequestParam("startDateTime") String startDateTime,@RequestParam("endDateTime") String endDateTime) {
|
||||||
Integer planSubDOList = planSubService.getSearchRlTs(startDateTime,endDateTime);
|
Integer planSubDOList = planSubService.getSearchRlTs(startDateTime,endDateTime);
|
||||||
return success(planSubDOList);
|
return success(planSubDOList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getOwnderMp")
|
@GetMapping("/getOwnderMp")
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.plansub.PlanSubService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -37,14 +38,14 @@ public class PlanSubDetailController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private PlanSubDetailService planSubDetailService;
|
private PlanSubDetailService planSubDetailService;
|
||||||
|
@Resource
|
||||||
|
private PlanSubService planSubService;
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建生产计划子项目设计时间明细")
|
@Operation(summary = "创建生产计划子项目设计时间明细")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:create')")
|
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:create')")
|
||||||
public CommonResult<Long> createPlanSubDetail(@Valid @RequestBody PlanSubDetailSaveReqVO createReqVO) {
|
public CommonResult<Long> createPlanSubDetail(@Valid @RequestBody PlanSubDetailSaveReqVO createReqVO) {
|
||||||
return success(planSubDetailService.createPlanSubDetail(createReqVO));
|
return success(planSubDetailService.createPlanSubDetail(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新生产计划子项目设计时间明细")
|
@Operation(summary = "更新生产计划子项目设计时间明细")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:update')")
|
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:update')")
|
||||||
@ -52,7 +53,6 @@ public class PlanSubDetailController {
|
|||||||
planSubDetailService.updatePlanSubDetail(updateReqVO);
|
planSubDetailService.updatePlanSubDetail(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除生产计划子项目设计时间明细")
|
@Operation(summary = "删除生产计划子项目设计时间明细")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@ -60,7 +60,6 @@ public class PlanSubDetailController {
|
|||||||
public CommonResult<Boolean> deletePlanSubDetail(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deletePlanSubDetail(@RequestParam("id") Long id) {
|
||||||
return planSubDetailService.deletePlanSubDetail(id);
|
return planSubDetailService.deletePlanSubDetail(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得生产计划子项目设计时间明细")
|
@Operation(summary = "获得生产计划子项目设计时间明细")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@ -69,9 +68,6 @@ public class PlanSubDetailController {
|
|||||||
PlanSubDetailDO planSubDetail = planSubDetailService.getPlanSubDetail(id);
|
PlanSubDetailDO planSubDetail = planSubDetailService.getPlanSubDetail(id);
|
||||||
return success(BeanUtils.toBean(planSubDetail, PlanSubDetailRespVO.class));
|
return success(BeanUtils.toBean(planSubDetail, PlanSubDetailRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得生产计划子项目设计时间明细分页")
|
@Operation(summary = "获得生产计划子项目设计时间明细分页")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:query')")
|
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:query')")
|
||||||
@ -103,7 +99,13 @@ public class PlanSubDetailController {
|
|||||||
public CommonResult<Integer> getSearchRlTs(@RequestParam("startDateTime") String startDateTime) {
|
public CommonResult<Integer> getSearchRlTs(@RequestParam("startDateTime") String startDateTime) {
|
||||||
Integer planSubDOList = planSubDetailService.getSearchRlTs(startDateTime);
|
Integer planSubDOList = planSubDetailService.getSearchRlTs(startDateTime);
|
||||||
return success(planSubDOList);
|
return success(planSubDOList);
|
||||||
|
}
|
||||||
|
@PostMapping("/getSearchRlT")
|
||||||
|
@Operation(summary = "查询修改的时间是否大于前一个时间段时间")
|
||||||
|
@Parameter(name = "names", description = "负责人", required = true)
|
||||||
|
public CommonResult<Integer> getSearchRlT(@RequestBody PlanSubDetailRespVO pageReqVO) {
|
||||||
|
Integer planSubDOList = planSubService.getSearchRlT(pageReqVO);
|
||||||
|
return success(planSubDOList);
|
||||||
}
|
}
|
||||||
@PostMapping("/modification")
|
@PostMapping("/modification")
|
||||||
@Operation(summary = "修改生产计划子项目设计时间明细")
|
@Operation(summary = "修改生产计划子项目设计时间明细")
|
||||||
@ -135,8 +137,6 @@ public class PlanSubDetailController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/insertWork")
|
@PostMapping("/insertWork")
|
||||||
@Operation(summary = "插活")
|
@Operation(summary = "插活")
|
||||||
public CommonResult insertWork(@Valid @RequestBody PlanSubDetailSaveReqVO updateReqVO) {
|
public CommonResult insertWork(@Valid @RequestBody PlanSubDetailSaveReqVO updateReqVO) {
|
||||||
|
|||||||
@ -78,4 +78,5 @@ public class PlanSubDetailPageReqVO extends PageParam {
|
|||||||
private String planNo;
|
private String planNo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,4 +80,6 @@ public class PlanSubDetailRespVO {
|
|||||||
private String projectCode;
|
private String projectCode;
|
||||||
private String planNo;
|
private String planNo;
|
||||||
private String projectSubName ;
|
private String projectSubName ;
|
||||||
|
private String projectNameSim ;
|
||||||
|
private LocalDateTime time ;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,6 +104,17 @@ public class PurchaseOrderMakeController {
|
|||||||
BeanUtils.toBean(list, PurchaseOrderMakeRespVO.class));
|
BeanUtils.toBean(list, PurchaseOrderMakeRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/exportOut")
|
||||||
|
@Operation(summary = "导出采购单审批")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportOut(@Valid PurchaseOrderMakePageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
|
||||||
|
List<PurchaseOrderMakeDetailDO> list = purchaseOrderMakeService.getPurchaseOrderMakePages(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "采购单审批.xls", "数据", PurchaseOrderMakeRespVO.class,
|
||||||
|
BeanUtils.toBean(list, PurchaseOrderMakeRespVO.class));
|
||||||
|
}
|
||||||
@GetMapping("/getPartPurchaseOrderPage")
|
@GetMapping("/getPartPurchaseOrderPage")
|
||||||
@Operation(summary = "获得零件采购订单生成分页")
|
@Operation(summary = "获得零件采购订单生成分页")
|
||||||
// @PreAuthorize("@ss.hasPermission('heli:material-plan:query')")
|
// @PreAuthorize("@ss.hasPermission('heli:material-plan:query')")
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -16,79 +18,107 @@ import com.alibaba.excel.annotation.*;
|
|||||||
public class PurchaseOrderMakeRespVO {
|
public class PurchaseOrderMakeRespVO {
|
||||||
|
|
||||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "29741")
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "29741")
|
||||||
@ExcelProperty("自增字段,唯一")
|
// @ExcelProperty("自增字段,唯一")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
@ExcelProperty("送审日期")
|
||||||
|
private String time;
|
||||||
|
@ExcelProperty("子项目编码")
|
||||||
|
private String projectSubCode;
|
||||||
|
@ExcelProperty("图号")
|
||||||
|
private String blueprintNo;
|
||||||
|
@ExcelProperty("零件名称")
|
||||||
|
private String boomName;
|
||||||
|
@ExcelProperty("规格")
|
||||||
|
private String boomSpec;
|
||||||
|
@ExcelProperty("材料")
|
||||||
|
private String composition;
|
||||||
|
@ExcelProperty("工序")
|
||||||
|
private String procedureName;
|
||||||
|
@ExcelProperty("需求数量")
|
||||||
|
private String boomAmount;
|
||||||
|
@ExcelProperty("采购数量")
|
||||||
|
private String purchaseAmount;
|
||||||
|
@ExcelProperty("供应商")
|
||||||
|
private String supplierName;
|
||||||
|
@ExcelProperty("单价")
|
||||||
|
private String unitPrice;
|
||||||
|
|
||||||
@Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@ExcelProperty("采购单号")
|
|
||||||
private String purchaseNo;
|
private String purchaseNo;
|
||||||
|
|
||||||
@Schema(description = "采购合同号")
|
@Schema(description = "采购合同号")
|
||||||
@ExcelProperty("采购合同号")
|
// @ExcelProperty("采购合同号")
|
||||||
private String contractNo;
|
private String contractNo;
|
||||||
|
|
||||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1")
|
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1")
|
||||||
@ExcelProperty("采购单类型,1按物料需求计划采购,2备库采购")
|
// @ExcelProperty("采购单类型,1按物料需求计划采购,2备库采购")
|
||||||
private Integer purchaseType;
|
private Integer purchaseType;
|
||||||
|
|
||||||
@Schema(description = "采购物类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "采购物类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
@ExcelProperty("采购物类型,1物料,2加工件")
|
// @ExcelProperty("采购物类型,1物料,2加工件")
|
||||||
private Integer goodsType;
|
private Integer goodsType;
|
||||||
|
|
||||||
@Schema(description = "结算币种", example = "2")
|
@Schema(description = "结算币种", example = "2")
|
||||||
@ExcelProperty("结算币种")
|
// @ExcelProperty("结算币种")
|
||||||
private Integer currencyType;
|
private Integer currencyType;
|
||||||
|
|
||||||
@Schema(description = "税率")
|
@Schema(description = "税率")
|
||||||
@ExcelProperty("税率")
|
// @ExcelProperty("税率")
|
||||||
private Integer taxRatio;
|
private Integer taxRatio;
|
||||||
|
|
||||||
@Schema(description = "暂估价金额", example = "13902")
|
@Schema(description = "暂估价金额", example = "13902")
|
||||||
@ExcelProperty("暂估价金额")
|
@ExcelProperty("总价")
|
||||||
private BigDecimal estimatedPrice;
|
private BigDecimal estimatedPrice;
|
||||||
|
@ExcelProperty("责任人")
|
||||||
|
private String duEmpName;
|
||||||
|
@ExcelProperty(value = "收货状态", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_receiving_status")
|
||||||
|
private String effectiveReceivingStatus;
|
||||||
|
@ExcelProperty("要求到货日期")
|
||||||
|
private String requir;
|
||||||
@Schema(description = "实际价金额", example = "14735")
|
@Schema(description = "实际价金额", example = "14735")
|
||||||
@ExcelProperty("实际价金额")
|
// @ExcelProperty("实际价金额")
|
||||||
private BigDecimal actualPrice;
|
private BigDecimal actualPrice;
|
||||||
|
|
||||||
@Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2")
|
@Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2")
|
||||||
@ExcelProperty("单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1")
|
// @ExcelProperty("单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description = "送审人", example = "17514")
|
@Schema(description = "送审人", example = "17514")
|
||||||
@ExcelProperty("送审人")
|
// @ExcelProperty("送审人")
|
||||||
private Long submitUserId;
|
private Long submitUserId;
|
||||||
|
|
||||||
@Schema(description = "送审时间")
|
@Schema(description = "送审时间")
|
||||||
@ExcelProperty("送审时间")
|
// @ExcelProperty("送审时间")
|
||||||
private LocalDateTime submitTime;
|
private LocalDateTime submitTime;
|
||||||
|
|
||||||
@Schema(description = "审核人")
|
@Schema(description = "审核人")
|
||||||
@ExcelProperty("审核人")
|
// @ExcelProperty("审核人")
|
||||||
private Long auditor;
|
private Long auditor;
|
||||||
|
|
||||||
@Schema(description = "审核时间")
|
@Schema(description = "审核时间")
|
||||||
@ExcelProperty("审核时间")
|
// @ExcelProperty("审核时间")
|
||||||
private LocalDateTime auditTime;
|
private LocalDateTime auditTime;
|
||||||
|
|
||||||
@Schema(description = "备注", example = "随便")
|
@Schema(description = "备注", example = "随便")
|
||||||
@ExcelProperty("备注")
|
// @ExcelProperty("备注")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@ExcelProperty("创建时间")
|
// @ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
@Schema(description = "订单id", example = "14178")
|
@Schema(description = "订单id", example = "14178")
|
||||||
@ExcelProperty("订单id")
|
// @ExcelProperty("订单id")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
@Schema(description = "生产计划id", example = "707")
|
@Schema(description = "生产计划id", example = "707")
|
||||||
@ExcelProperty("生产计划id")
|
// @ExcelProperty("生产计划id")
|
||||||
private Long projectPlanId;
|
private Long projectPlanId;
|
||||||
|
|
||||||
@Schema(description = "客户id", example = "20356")
|
@Schema(description = "客户id", example = "20356")
|
||||||
@ExcelProperty("客户id")
|
// @ExcelProperty("客户id")
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
|
|
||||||
@Schema(description = "客户简称")
|
@Schema(description = "客户简称")
|
||||||
@ -96,16 +126,16 @@ public class PurchaseOrderMakeRespVO {
|
|||||||
private String brief;
|
private String brief;
|
||||||
|
|
||||||
@Schema(description = "项目名称", example = "芋艿")
|
@Schema(description = "项目名称", example = "芋艿")
|
||||||
@ExcelProperty("项目名称")
|
// @ExcelProperty("项目名称")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
@Schema(description = "项目名称简码")
|
@Schema(description = "项目名称简码")
|
||||||
@ExcelProperty("项目名称简码")
|
// @ExcelProperty("项目名称简码")
|
||||||
private String projectNameSim;
|
private String projectNameSim;
|
||||||
@Schema(description = "送审人姓名")
|
@Schema(description = "送审人姓名")
|
||||||
@ExcelProperty("送审人姓名")
|
// @ExcelProperty("送审人姓名")
|
||||||
private String submitUserName;
|
private String submitUserName;
|
||||||
@Schema(description = "采购单类型")
|
@Schema(description = "采购单类型")
|
||||||
@ExcelProperty("采购单类型")
|
// @ExcelProperty("采购单类型")
|
||||||
private String purchaseOrderType;
|
private String purchaseOrderType;
|
||||||
}
|
}
|
||||||
@ -1,95 +1,106 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.shenhe;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.shenhe;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import javax.annotation.Resource;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import javax.annotation.Resource;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import javax.validation.constraints.*;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import javax.validation.*;
|
|
||||||
import javax.servlet.http.*;
|
import javax.validation.constraints.*;
|
||||||
import java.util.*;
|
import javax.validation.*;
|
||||||
import java.io.IOException;
|
import javax.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
import java.io.IOException;
|
||||||
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.pojo.PageParam;
|
||||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.shenhe.vo.*;
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.service.shenhe.ShenheService;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.shenhe.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO;
|
||||||
@Tag(name = "管理后台 - 审核")
|
import com.chanko.yunxi.mes.module.heli.service.shenhe.ShenheService;
|
||||||
@RestController
|
|
||||||
@RequestMapping("/heli/shenhe")
|
@Tag(name = "管理后台 - 审核")
|
||||||
@Validated
|
@RestController
|
||||||
public class ShenheController {
|
@RequestMapping("/heli/shenhe")
|
||||||
|
@Validated
|
||||||
@Resource
|
public class ShenheController {
|
||||||
private ShenheService shenheService;
|
|
||||||
|
@Resource
|
||||||
@PostMapping("/create")
|
private ShenheService shenheService;
|
||||||
@Operation(summary = "创建审核")
|
@Resource
|
||||||
@PreAuthorize("@ss.hasPermission('heli:shenhe:create')")
|
private ShenheMapper shenheMapper;
|
||||||
public CommonResult<Long> createShenhe(@Valid @RequestBody ShenheSaveReqVO createReqVO) {
|
|
||||||
return success(shenheService.createShenhe(createReqVO));
|
@PostMapping("/create")
|
||||||
}
|
@Operation(summary = "创建审核")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:shenhe:create')")
|
||||||
@PutMapping("/update")
|
public CommonResult<Long> createShenhe(@Valid @RequestBody ShenheSaveReqVO createReqVO) {
|
||||||
@Operation(summary = "更新审核")
|
LambdaQueryWrapper<ShenheDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
@PreAuthorize("@ss.hasPermission('heli:shenhe:update')")
|
lambdaQueryWrapper.eq(ShenheDO::getShenheName, createReqVO.getShenheName());
|
||||||
public CommonResult<Boolean> updateShenhe(@Valid @RequestBody ShenheSaveReqVO updateReqVO) {
|
if (shenheMapper.selectCount(lambdaQueryWrapper) > 0) return CommonResult.error(400,"该审核类型已存在,不允许添加多个");
|
||||||
shenheService.updateShenhe(updateReqVO);
|
return success(shenheService.createShenhe(createReqVO));
|
||||||
return success(true);
|
}
|
||||||
}
|
|
||||||
|
@PutMapping("/update")
|
||||||
@DeleteMapping("/delete")
|
@Operation(summary = "更新审核")
|
||||||
@Operation(summary = "删除审核")
|
@PreAuthorize("@ss.hasPermission('heli:shenhe:update')")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
public CommonResult<Boolean> updateShenhe(@Valid @RequestBody ShenheSaveReqVO updateReqVO) {
|
||||||
@PreAuthorize("@ss.hasPermission('heli:shenhe:delete')")
|
LambdaQueryWrapper<ShenheDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
public CommonResult<Boolean> deleteShenhe(@RequestParam("id") Long id) {
|
lambdaQueryWrapper.eq(ShenheDO::getShenheName, updateReqVO.getShenheName());
|
||||||
shenheService.deleteShenhe(id);
|
lambdaQueryWrapper.ne(ShenheDO::getId, updateReqVO.getId());
|
||||||
return success(true);
|
if (shenheMapper.selectCount(lambdaQueryWrapper) > 0) return CommonResult.error(400,"该审核类型已存在,不允许添加多个");
|
||||||
}
|
shenheService.updateShenhe(updateReqVO);
|
||||||
|
return success(true);
|
||||||
@GetMapping("/get")
|
}
|
||||||
@Operation(summary = "获得审核")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@DeleteMapping("/delete")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:shenhe:query')")
|
@Operation(summary = "删除审核")
|
||||||
public CommonResult<ShenheRespVO> getShenhe(@RequestParam("id") Long id) {
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
ShenheDO shenhe = shenheService.getShenhe(id);
|
@PreAuthorize("@ss.hasPermission('heli:shenhe:delete')")
|
||||||
return success(BeanUtils.toBean(shenhe, ShenheRespVO.class));
|
public CommonResult<Boolean> deleteShenhe(@RequestParam("id") Long id) {
|
||||||
}
|
shenheService.deleteShenhe(id);
|
||||||
|
return success(true);
|
||||||
@GetMapping("/page")
|
}
|
||||||
@Operation(summary = "获得审核分页")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:shenhe:query')")
|
@GetMapping("/get")
|
||||||
public CommonResult<PageResult<ShenheRespVO>> getShenhePage(@Valid ShenhePageReqVO pageReqVO) {
|
@Operation(summary = "获得审核")
|
||||||
PageResult<ShenheDO> pageResult = shenheService.getShenhePage(pageReqVO);
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
return success(BeanUtils.toBean(pageResult, ShenheRespVO.class));
|
@PreAuthorize("@ss.hasPermission('heli:shenhe:query')")
|
||||||
}
|
public CommonResult<ShenheRespVO> getShenhe(@RequestParam("id") Long id) {
|
||||||
|
ShenheDO shenhe = shenheService.getShenhe(id);
|
||||||
@GetMapping("/export-excel")
|
return success(BeanUtils.toBean(shenhe, ShenheRespVO.class));
|
||||||
@Operation(summary = "导出审核 Excel")
|
}
|
||||||
@PreAuthorize("@ss.hasPermission('heli:shenhe:export')")
|
|
||||||
@OperateLog(type = EXPORT)
|
@GetMapping("/page")
|
||||||
public void exportShenheExcel(@Valid ShenhePageReqVO pageReqVO,
|
@Operation(summary = "获得审核分页")
|
||||||
HttpServletResponse response) throws IOException {
|
@PreAuthorize("@ss.hasPermission('heli:shenhe:query')")
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
public CommonResult<PageResult<ShenheRespVO>> getShenhePage(@Valid ShenhePageReqVO pageReqVO) {
|
||||||
List<ShenheDO> list = shenheService.getShenhePage(pageReqVO).getList();
|
PageResult<ShenheDO> pageResult = shenheService.getShenhePage(pageReqVO);
|
||||||
// 导出 Excel
|
return success(BeanUtils.toBean(pageResult, ShenheRespVO.class));
|
||||||
ExcelUtils.write(response, "审核.xls", "数据", ShenheRespVO.class,
|
}
|
||||||
BeanUtils.toBean(list, ShenheRespVO.class));
|
|
||||||
}
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出审核 Excel")
|
||||||
}
|
@PreAuthorize("@ss.hasPermission('heli:shenhe:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportShenheExcel(@Valid ShenhePageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<ShenheDO> list = shenheService.getShenhePage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "审核.xls", "数据", ShenheRespVO.class,
|
||||||
|
BeanUtils.toBean(list, ShenheRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -193,6 +193,10 @@ public class PurchaseOrderMakeDetailDO extends BaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String duEmpName;
|
private String duEmpName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
private String time;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String requir;
|
||||||
|
@TableField(exist = false)
|
||||||
private Integer effectiveReceivingStatus;
|
private Integer effectiveReceivingStatus;
|
||||||
/**
|
/**
|
||||||
* 零件理论重量
|
* 零件理论重量
|
||||||
|
|||||||
@ -189,7 +189,8 @@ public interface PurchaseOrderMakeDetailMapper extends BaseMapperX<PurchaseOrder
|
|||||||
"END AS unitPrice")
|
"END AS unitPrice")
|
||||||
.select("e.name as procedureName")
|
.select("e.name as procedureName")
|
||||||
.select("COALESCE(no.receiving_status, 1) AS effectiveReceivingStatus")
|
.select("COALESCE(no.receiving_status, 1) AS effectiveReceivingStatus")
|
||||||
|
.select("DATE_FORMAT(t.create_time, '%Y-%m-%d') AS time")
|
||||||
|
.select("DATE_FORMAT(t.require_time, '%Y-%m-%d') AS requir")
|
||||||
.leftJoin(PurchaseOrderMakeDO.class,"a",PurchaseOrderMakeDO::getId,PurchaseOrderMakeDetailDO::getPurchaseOrderId)
|
.leftJoin(PurchaseOrderMakeDO.class,"a",PurchaseOrderMakeDO::getId,PurchaseOrderMakeDetailDO::getPurchaseOrderId)
|
||||||
.leftJoin(ProjectOrderDO.class,"b",ProjectOrderDO::getId,PurchaseOrderMakeDO::getProjectId)
|
.leftJoin(ProjectOrderDO.class,"b",ProjectOrderDO::getId,PurchaseOrderMakeDO::getProjectId)
|
||||||
.leftJoin(AdminUserDO.class,"c", AdminUserDO::getId,PurchaseOrderMakeDetailDO::getDuEmpId)
|
.leftJoin(AdminUserDO.class,"c", AdminUserDO::getId,PurchaseOrderMakeDetailDO::getDuEmpId)
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import javax.validation.*;
|
|||||||
|
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.plansub.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plansub.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailRespVO;
|
||||||
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.framework.common.pojo.PageResult;
|
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.pojo.PageParam;
|
||||||
@ -76,4 +78,5 @@ public interface PlanSubService {
|
|||||||
*/
|
*/
|
||||||
PageResult<PlanSubDO> getPlanSubPage(PlanSubPageReqVO pageReqVO);
|
PageResult<PlanSubDO> getPlanSubPage(PlanSubPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
Integer getSearchRlT(PlanSubDetailRespVO pageReqVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.chanko.yunxi.mes.framework.common.exception.ErrorCode;
|
import com.chanko.yunxi.mes.framework.common.exception.ErrorCode;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailRespVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.shopCalendar.vo.ShopCalendarPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.shopCalendar.vo.ShopCalendarPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail.PlanSubDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail.PlanSubDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
||||||
@ -26,6 +28,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.plansub.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plansub.vo.*;
|
||||||
@ -647,4 +650,19 @@ public class PlanSubServiceImpl implements PlanSubService {
|
|||||||
return planSubDOPageResult;
|
return planSubDOPageResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getSearchRlT(PlanSubDetailRespVO pageReqVO) {
|
||||||
|
LambdaQueryWrapper<PlanSubDetailDO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(PlanSubDetailDO::getProjectSubId,pageReqVO.getProjectSubId());
|
||||||
|
wrapper.eq(PlanSubDetailDO::getSubType,pageReqVO.getSubType());
|
||||||
|
wrapper.eq(PlanSubDetailDO::getSeqNo,pageReqVO.getSeqNo()-1);
|
||||||
|
PlanSubDetailDO planSubDetailDO = planSubDetailMapper.selectOne(wrapper);
|
||||||
|
if (ObjectUtil.isNotEmpty(planSubDetailDO)){
|
||||||
|
if (!pageReqVO.getTime().toLocalDate().isAfter(planSubDetailDO.getTwoDimDate().toLocalDate())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -215,6 +215,7 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
planSubDetailDO.setCustomerBrief(planSubDO.getCustomerName());
|
planSubDetailDO.setCustomerBrief(planSubDO.getCustomerName());
|
||||||
planSubDetailDO.setPlanNo(planSubDO.getPlanNo());
|
planSubDetailDO.setPlanNo(planSubDO.getPlanNo());
|
||||||
planSubDetailDO.setProjectName(planSubDO.getProjectNameSim());
|
planSubDetailDO.setProjectName(planSubDO.getProjectNameSim());
|
||||||
|
planSubDetailDO.setProjectNameSim(planSubDO.getProjectNameSim());
|
||||||
list.add(planSubDetailDO);
|
list.add(planSubDetailDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -479,7 +480,12 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
//该项目名称+子项目名称+类型没有保存,请先修改!
|
//该项目名称+子项目名称+类型没有保存,请先修改!
|
||||||
return CommonResult.error(400, "该子项目"+planSubDetailDO.getName()+" 设计类型"+type+" ,没有保存请确认!");
|
return CommonResult.error(400, "该子项目"+planSubDetailDO.getName()+" 设计类型"+type+" ,没有保存请确认!");
|
||||||
}else {
|
}else {
|
||||||
|
if (ObjectUtil.isEmpty(planSubDetailDO.getStartTwoDimDate())){
|
||||||
|
return CommonResult.error(400, "请选择开始时间!");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(planSubDetailDO.getTwoDimDate())){
|
||||||
|
return CommonResult.error(400, "请选择结束时间!");
|
||||||
|
}
|
||||||
planSubDetailDO.setDesignNum(calculateWorkDays(planSubDetailDO.getStartTwoDimDate(),planSubDetailDO.getTwoDimDate()));
|
planSubDetailDO.setDesignNum(calculateWorkDays(planSubDetailDO.getStartTwoDimDate(),planSubDetailDO.getTwoDimDate()));
|
||||||
ownerSet.add(planSubDetailDO.getTwoDimOwner());
|
ownerSet.add(planSubDetailDO.getTwoDimOwner());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,3 +76,6 @@ export const rejects = async (id:number) => {
|
|||||||
export const approvals = async (data) => {
|
export const approvals = async (data) => {
|
||||||
return await request.post({ url: `/heli/purchase-order-make/approvals`,data })
|
return await request.post({ url: `/heli/purchase-order-make/approvals`,data })
|
||||||
}
|
}
|
||||||
|
export const exportOut = async (params) => {
|
||||||
|
return await request.download({ url: `/heli/purchase-order-make/exportOut`, params })
|
||||||
|
}
|
||||||
|
|||||||
@ -69,3 +69,6 @@ export const exportPlanSubDetail = async (params) => {
|
|||||||
export const getSearchRlTsS = async (startDateTime: string ) => {
|
export const getSearchRlTsS = async (startDateTime: string ) => {
|
||||||
return await request.get({ url: `/heli/plan-sub-detail/getSearchRlTs?startDateTime=` + startDateTime})
|
return await request.get({ url: `/heli/plan-sub-detail/getSearchRlTs?startDateTime=` + startDateTime})
|
||||||
}
|
}
|
||||||
|
export const getSearchRlT = async (data) => {
|
||||||
|
return await request.post({ url: `/heli/plan-sub-detail/getSearchRlT`, data })
|
||||||
|
}
|
||||||
|
|||||||
@ -489,7 +489,9 @@ const getAddList = async () => {
|
|||||||
const params = {
|
const params = {
|
||||||
projectCode: addQueryParams.projectCode,
|
projectCode: addQueryParams.projectCode,
|
||||||
projectSubName: addQueryParams.projectSubName,
|
projectSubName: addQueryParams.projectSubName,
|
||||||
customerBrief:addQueryParams.customerBrief
|
customerBrief:addQueryParams.customerBrief,
|
||||||
|
pageNo:addQueryParams.pageNo,
|
||||||
|
pageSize:addQueryParams.pageSize
|
||||||
}
|
}
|
||||||
const res = await PlansubdetailApi.pageAddList(params)
|
const res = await PlansubdetailApi.pageAddList(params)
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@ -638,6 +640,14 @@ const currentRow = ref(null)
|
|||||||
const insertList = ref([])
|
const insertList = ref([])
|
||||||
const beforeList = ref([])
|
const beforeList = ref([])
|
||||||
const modification = async (row) => {
|
const modification = async (row) => {
|
||||||
|
if (row.subType==null|| row.subType==''){
|
||||||
|
message.error('设计类型不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (row.twoDimOwner==null|| row.twoDimOwner==''){
|
||||||
|
message.error('负责人不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
beforeList.value = []
|
beforeList.value = []
|
||||||
var data = row as unknown as PlansubdetailApi.PlanSubDetailVO
|
var data = row as unknown as PlansubdetailApi.PlanSubDetailVO
|
||||||
const res = await PlansubdetailApi.modificationPlanSubDetail(data)
|
const res = await PlansubdetailApi.modificationPlanSubDetail(data)
|
||||||
@ -796,9 +806,18 @@ const handleConfirm = async () => {
|
|||||||
}
|
}
|
||||||
// 禁用过去日期
|
// 禁用过去日期
|
||||||
const disabledFutureDates = (time) => {
|
const disabledFutureDates = (time) => {
|
||||||
const today = new Date()
|
// const today = new Date()
|
||||||
today.setHours(0, 0, 0, 0)
|
// today.setHours(0, 0, 0, 0)
|
||||||
return time.getTime() < today.getTime()
|
// return time.getTime() < today.getTime()
|
||||||
|
const today = new Date();
|
||||||
|
today.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
// 计算一周前的日期
|
||||||
|
const oneWeekAgo = new Date(today);
|
||||||
|
oneWeekAgo.setDate(today.getDate() - 7);
|
||||||
|
|
||||||
|
// 禁用一周前的日期(允许选择一周前到以后的所有日期)
|
||||||
|
return time.getTime() < oneWeekAgo.getTime();
|
||||||
}
|
}
|
||||||
// 修改删除方法,处理新增行的删除
|
// 修改删除方法,处理新增行的删除
|
||||||
const handleDelete = async (row) => {
|
const handleDelete = async (row) => {
|
||||||
@ -833,6 +852,17 @@ const change1 = async (row: any, type: number) => {
|
|||||||
isProcessingChange = true
|
isProcessingChange = true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (row.twoDimOwner == null || row.twoDimOwner == '') {
|
||||||
|
setTimeout(() => {
|
||||||
|
message.error('负责人不能为空')
|
||||||
|
}, 100)
|
||||||
|
if (type === 0) {
|
||||||
|
row.startTwoDimDate = undefined
|
||||||
|
} else {
|
||||||
|
row.twoDimDate = undefined
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
if (row.startTwoDimDate && row.twoDimDate) {
|
if (row.startTwoDimDate && row.twoDimDate) {
|
||||||
const startTime = new Date(row.startTwoDimDate).getTime()
|
const startTime = new Date(row.startTwoDimDate).getTime()
|
||||||
const endTime = new Date(row.twoDimDate).getTime()
|
const endTime = new Date(row.twoDimDate).getTime()
|
||||||
@ -856,7 +886,7 @@ const change1 = async (row: any, type: number) => {
|
|||||||
if (!time || isNaN(time.getTime()) || formatDate(time, 'YYYY-MM-DD') == '1970-01-01') return
|
if (!time || isNaN(time.getTime()) || formatDate(time, 'YYYY-MM-DD') == '1970-01-01') return
|
||||||
|
|
||||||
const data = await PlansubdetailApi.getSearchRlTsS(formatDate(time, 'YYYY-MM-DD'))
|
const data = await PlansubdetailApi.getSearchRlTsS(formatDate(time, 'YYYY-MM-DD'))
|
||||||
|
row.time = time.getTime()
|
||||||
if (data <= 0) {
|
if (data <= 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
message.error('选择的日期是节假日,请确认!')
|
message.error('选择的日期是节假日,请确认!')
|
||||||
@ -868,6 +898,20 @@ const change1 = async (row: any, type: number) => {
|
|||||||
row.twoDimDate = undefined
|
row.twoDimDate = undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (row.seqNo > 1) {
|
||||||
|
const flag = await PlansubdetailApi.getSearchRlT(row)
|
||||||
|
if (flag == 0) {
|
||||||
|
setTimeout(() => {
|
||||||
|
message.error('选择的日期不能小于等于上一段结束日期,请确认!')
|
||||||
|
}, 100)
|
||||||
|
|
||||||
|
if (type === 0) {
|
||||||
|
row.startTwoDimDate = undefined
|
||||||
|
} else {
|
||||||
|
row.twoDimDate = undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
isProcessingChange = false
|
isProcessingChange = false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,15 +77,15 @@ v-model="queryParams.ownerName" placeholder="请输入责任人" clearable @keyu
|
|||||||
<el-button @click="resetQuery">
|
<el-button @click="resetQuery">
|
||||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button-->
|
<el-button
|
||||||
<!-- type="success"-->
|
type="success"
|
||||||
<!-- plain-->
|
plain
|
||||||
<!-- @click="handleExport"-->
|
@click="handleExport"
|
||||||
<!-- :loading="exportLoading"-->
|
:loading="exportLoading"
|
||||||
<!-- v-hasPermi="['heli:pg-master:export']"-->
|
v-hasPermi="['heli:pg-master:export']"
|
||||||
<!-- >-->
|
>
|
||||||
<!-- <Icon icon="ep:download" class="mr-5px" /> 导出-->
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||||
<!-- </el-button>-->
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
@ -160,6 +160,7 @@ import {ref} from "vue";
|
|||||||
import {ElTable, ElTableColumn} from "element-plus";
|
import {ElTable, ElTableColumn} from "element-plus";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import Print from './print.vue'
|
import Print from './print.vue'
|
||||||
|
import download from "@/utils/download";
|
||||||
const printRef = ref()
|
const printRef = ref()
|
||||||
defineOptions({ name: 'PartPurchaseCheck' })
|
defineOptions({ name: 'PartPurchaseCheck' })
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -260,7 +261,7 @@ const print = async () => {
|
|||||||
message.error("请选择要打印的采购订单,请确认");
|
message.error("请选择要打印的采购订单,请确认");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
formLoading.value = true;
|
formLoading.value = true;
|
||||||
const printData = list.map((item,index)=>({
|
const printData = list.map((item,index)=>({
|
||||||
编号:index+1,
|
编号:index+1,
|
||||||
日期:item.createTime,
|
日期:item.createTime,
|
||||||
@ -285,10 +286,10 @@ const print = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const printDataStr = JSON.parse(JSON.stringify(printData));
|
const printDataStr = JSON.parse(JSON.stringify(printData));
|
||||||
// 生成打印模板 顺序分别为 编号 日期 客户名 模具名 件号 零件名称 材料 规格 数量 单价 总价格 要求日期
|
// 生成打印模板 顺序分别为 编号 日期 客户名 模具名 件号 零件名称 材料 规格 数量 单价 总价格 要求日期
|
||||||
// 将其放在table中 调用打印
|
// 将其放在table中 调用打印
|
||||||
printRef.value.open(printDataStr)
|
printRef.value.open(printDataStr)
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("打印失败:", error);
|
console.error("打印失败:", error);
|
||||||
@ -435,19 +436,19 @@ const handleDelete = async (id: number) => {
|
|||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
// const handleExport = async () => {
|
const handleExport = async () => {
|
||||||
// try {
|
try {
|
||||||
// // 导出的二次确认
|
// 导出的二次确认
|
||||||
// await message.exportConfirm()
|
await message.exportConfirm()
|
||||||
// // 发起导出
|
// 发起导出
|
||||||
// exportLoading.value = true
|
exportLoading.value = true
|
||||||
// const data = await PurchaseOrderNoDetailApi.exportOutsourcing(queryParams)
|
const data = await PartPurchaseOrderApi.exportOut(queryParams)
|
||||||
// download.excel(data, '外协费用查询.xlsx')
|
download.excel(data, '采购单审批.xlsx')
|
||||||
// } catch {
|
} catch {
|
||||||
// } finally {
|
} finally {
|
||||||
// exportLoading.value = false
|
exportLoading.value = false
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
const setDefaultDate = () => {
|
const setDefaultDate = () => {
|
||||||
queryParams.createTime = [
|
queryParams.createTime = [
|
||||||
dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
|||||||
@ -47,6 +47,10 @@
|
|||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item style="margin-left:15px">
|
||||||
|
<el-button style="margin-left: 3%" type="primary" size="large" @click="openUp"
|
||||||
|
>查看工作</el-button
|
||||||
|
> </el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
@ -169,6 +173,8 @@
|
|||||||
<!-- 【打印启动单】 - 弹框-->
|
<!-- 【打印启动单】 - 弹框-->
|
||||||
<Print ref="printRef" />
|
<Print ref="printRef" />
|
||||||
<A3sonPrint ref="A3printRef" />
|
<A3sonPrint ref="A3printRef" />
|
||||||
|
<insert ref="insert" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -180,11 +186,14 @@ import Print from './productionPrint.vue' // 引入打印弹框
|
|||||||
import A3sonPrint from './A3sonPrint.vue' // 引入A3打印弹框
|
import A3sonPrint from './A3sonPrint.vue' // 引入A3打印弹框
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
import routeParamsCache from '@/utils/routeParamsCache';
|
import routeParamsCache from '@/utils/routeParamsCache';
|
||||||
|
import Insert from "@/views/heli/plan/insert.vue";
|
||||||
|
import {ref} from "vue";
|
||||||
defineOptions({ name: 'Plan' })
|
defineOptions({ name: 'Plan' })
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const insert= ref()
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const list = ref([]) // 列表的数据
|
const list = ref([]) // 列表的数据
|
||||||
@ -216,6 +225,9 @@ const getList = async () => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const openUp=()=>{
|
||||||
|
insert.value?.open()
|
||||||
|
}
|
||||||
const handleCommand = async (command, id, code) => {
|
const handleCommand = async (command, id, code) => {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'detail':
|
case 'detail':
|
||||||
|
|||||||
@ -139,7 +139,7 @@ const queryParams = reactive({
|
|||||||
projectCode: undefined,
|
projectCode: undefined,
|
||||||
projectSubCode: undefined,
|
projectSubCode: undefined,
|
||||||
customerName: undefined,
|
customerName: undefined,
|
||||||
dispatchStatus: 0,
|
dispatchStatus: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
createTime: [],
|
createTime: [],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user