采购订单修改
This commit is contained in:
parent
bf5966f386
commit
fb1a942ac1
@ -151,7 +151,7 @@ public class bdgzsomthingController {
|
||||
BeanUtils.toBean(list, bdgzsomthingRespVO.class));
|
||||
}
|
||||
|
||||
@Scheduled(fixedRate = 10800000)
|
||||
// @Scheduled(fixedRate = 10800000)
|
||||
public void scheduledTask() {
|
||||
bdgzsomthingService.selectds();
|
||||
}
|
||||
@ -159,15 +159,15 @@ public class bdgzsomthingController {
|
||||
//@Scheduled(cron = "0 2 0 * * ?") //每天十天执行一次
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
selectHasPrice();
|
||||
selectSafeStorageAndDeliverOneYear();
|
||||
// selectHasPrice();
|
||||
// selectSafeStorageAndDeliverOneYear();
|
||||
}
|
||||
@Scheduled(cron = "0 0 2 * * ?")
|
||||
// @Scheduled(cron = "0 0 2 * * ?")
|
||||
public void selectHasPrice(){
|
||||
bdgzsomthingService.selectHasPrice();
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 0 0 * * ?")
|
||||
// @Scheduled(cron = "0 0 0 * * ?")
|
||||
public void selectSafeStorageAndDeliverOneYear(){bdgzsomthingService.selectSafeStorageAndDeliverOneYear();}
|
||||
@PostMapping("/getMessage")
|
||||
@Operation(summary = "小程序消息")
|
||||
|
@ -80,7 +80,13 @@ public class MaterialPlanController {
|
||||
PageResult<MaterialPlanDO> pageResult = materialPlanService.getMaterialPlanPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialPlanRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/getBeiKuPage")
|
||||
@Operation(summary = "获得备库物料需求计划分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:query')")
|
||||
public CommonResult<PageResult<MaterialPlanRespVO>> getBeiKuPage(@Valid MaterialPlanPageReqVO pageReqVO) {
|
||||
PageResult<MaterialPlanDO> pageResult = materialPlanService.getBeiKuPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialPlanRespVO.class));
|
||||
}
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出物料需求计划 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:export')")
|
||||
@ -140,4 +146,12 @@ public class MaterialPlanController {
|
||||
ExcelUtils.write(response, "零件物料需求计划.xlsx", "数据", PartExcelVO.class,
|
||||
BeanUtils.toBean(list, PartExcelVO.class));
|
||||
}
|
||||
@GetMapping("/getProjectMaterialPlanNo")
|
||||
@Operation(summary = "根据编码获得物料需求计划")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:query')")
|
||||
public CommonResult<MaterialPlanRespVO> getProjectMaterialPlanNo(@RequestParam("code") String code) {
|
||||
MaterialPlanDO materialPlan = materialPlanService.getProjectMaterialPlanNo(code);
|
||||
return success(BeanUtils.toBean(materialPlan, MaterialPlanRespVO.class));
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,13 @@ public class MaterialPlanBoomController {
|
||||
PageResult<MaterialPlanBoomDO> pageResult = materialPlanBoomService.getMaterialPlanBoomPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialPlanBoomRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/getProjectMaterialPlanId")
|
||||
@Operation(summary = "根据物料需求计划id获取物料")
|
||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
|
||||
public CommonResult<PageResult<MaterialPlanBoomRespVO>> getProjectMaterialPlanId(@Valid MaterialPlanBoomPageReqVO pageReqVO) {
|
||||
PageResult<MaterialPlanBoomDO> pageResult = materialPlanBoomService.getProjectMaterialPlanId(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialPlanBoomRespVO.class));
|
||||
}
|
||||
@GetMapping("/page-sum")
|
||||
@Operation(summary = "获得物料需求计划加工件明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
|
||||
|
@ -50,5 +50,14 @@ public class MaterialPlanBoomPageReqVO extends PageParam {
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
@Schema(description = "物料名称")
|
||||
private String matName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String matCode;
|
||||
|
||||
@Schema(description = "物料类型")
|
||||
private Long matType;
|
||||
|
||||
|
||||
}
|
@ -69,7 +69,30 @@ public class MaterialPlanBoomRespVO extends PageParam {
|
||||
@Schema(description = "工序")
|
||||
@ExcelProperty("工序")
|
||||
private String procedureName;
|
||||
@Schema(description = "物料名称")
|
||||
@ExcelProperty("物料名称")
|
||||
private String matName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String matCode;
|
||||
|
||||
@Schema(description = "物料规格型号")
|
||||
@ExcelProperty("物料规格型号")
|
||||
private String matSpec;
|
||||
|
||||
@Schema(description = "物料单位")
|
||||
@ExcelProperty("物料单位")
|
||||
private String matUnit;
|
||||
|
||||
@Schema(description = "物料类型")
|
||||
@ExcelProperty("物料类型")
|
||||
private String matType;
|
||||
@Schema(description = "库存数量")
|
||||
@ExcelProperty("库存数量")
|
||||
private BigDecimal matRest;
|
||||
@Schema(description = "物料id")
|
||||
@ExcelProperty("物料id")
|
||||
private Long matId;
|
||||
|
||||
}
|
@ -1,8 +1,12 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorder.vo.PurchaseOrderRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorder.vo.PurchaseOrderSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.PurchaseOrderNoPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.PurchaseOrderNoRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.PurchaseOrderNoSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.purchaseorderno.PurchaseOrderNoService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
@ -99,4 +103,21 @@ public class PurchaseOrderNoController {
|
||||
PageResult<PurchaseOrderNoDO> pageResult = purchaseOrderNoService.getPurchaseOrderPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PurchaseOrderNoRespVO.class));
|
||||
}
|
||||
@GetMapping("/page-by-status")
|
||||
@Operation(summary = "获得采购订单审核分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:purchase-order:query')")
|
||||
public CommonResult<PageResult<PurchaseOrderNoRespVO>> getPurchaseOrderPageByStatus(@Valid PurchaseOrderNoPageReqVO pageReqVO) {
|
||||
PageResult<PurchaseOrderNoDO> pageResult = purchaseOrderNoService.getPurchaseOrderPageByStatus(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PurchaseOrderNoRespVO.class));
|
||||
}
|
||||
@PutMapping("/updateRSById")
|
||||
@Operation(summary = "更新采购订单收获状态")
|
||||
@PreAuthorize("@ss.hasPermission('heli:purchase-order:updateRSById')")
|
||||
public CommonResult<Boolean> updatePORSById(@RequestParam("id") Long id) {
|
||||
PurchaseOrderNoDO purchaseOrderNo = purchaseOrderNoService.getPurchaseOrderNo(id);
|
||||
purchaseOrderNo.setReceivingStatus(3);
|
||||
PurchaseOrderNoSaveReqVO purchaseOrderVO = BeanUtils.toBean(purchaseOrderNo, PurchaseOrderNoSaveReqVO.class);
|
||||
purchaseOrderNoService.updatePurchaseOrderNo(purchaseOrderVO);
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
|
@ -18,14 +18,18 @@ import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_Y
|
||||
@ToString(callSuper = true)
|
||||
public class PurchaseOrderNoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
@Schema(description = "采购单号")
|
||||
private String purchaseNo;
|
||||
@Schema(description = "选中采购编号")
|
||||
private List<Long> ids;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1")
|
||||
private Boolean purchaseType;
|
||||
private Integer purchaseType;
|
||||
|
||||
@Schema(description = "采购物类型,1物料,2加工件", example = "2")
|
||||
private Boolean goodsType;
|
||||
private Integer goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "2163")
|
||||
private BigDecimal estimatedPrice;
|
||||
@ -34,7 +38,7 @@ public class PurchaseOrderNoPageReqVO extends PageParam {
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2")
|
||||
private Boolean status;
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "送审人", example = "18499")
|
||||
private Long submitUserId;
|
||||
@ -54,8 +58,7 @@ public class PurchaseOrderNoPageReqVO extends PageParam {
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
private String createTime;
|
||||
|
||||
@Schema(description = "供应商id", example = "3648")
|
||||
private Long supplierId;
|
||||
@ -82,5 +85,7 @@ public class PurchaseOrderNoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "供应商名称")
|
||||
private String supplierName;
|
||||
@Schema(description = "物料需求计划单号")
|
||||
private String materialPlanNo;
|
||||
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.convert.TimestampToDateConvert;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@ -16,86 +19,90 @@ import com.alibaba.excel.annotation.*;
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PurchaseOrderNoRespVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "5114")
|
||||
@ExcelProperty("自增字段,唯一")
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("采购单号")
|
||||
private String purchaseNo;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1")
|
||||
@ExcelProperty("采购单类型,1按物料需求计划采购,2备库采购")
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty(value="单据日期", converter = TimestampToDateConvert.class)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "供应商名称")
|
||||
@ExcelProperty("供应商")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购")
|
||||
@ExcelProperty(value = "采购单类型", converter = DictConvert.class)
|
||||
@DictFormat("heli_project_purchase_order_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private Integer purchaseType;
|
||||
|
||||
@Schema(description = "采购物类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("采购物类型,1物料,2加工件")
|
||||
@Schema(description = "物料需求计划单号")
|
||||
@ExcelProperty("物料需求计划单号")
|
||||
private String materialPlanNo;
|
||||
|
||||
@Schema(description = "采购物类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "采购物料类型", converter = DictConvert.class)
|
||||
@DictFormat("heli_project_purchase_goods_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private Integer goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "2163")
|
||||
@ExcelProperty("暂估价金额")
|
||||
@Schema(description = "采购合同号")
|
||||
@ExcelProperty("采购合同号")
|
||||
private String contractNo;
|
||||
|
||||
@Schema(description = "物料需求计划id")
|
||||
private Long projectMaterialPlanId;
|
||||
|
||||
|
||||
@Schema(description = "结算币种")
|
||||
@ExcelProperty(value ="结算币种",converter = DictConvert.class)
|
||||
@DictFormat("heli_currency")
|
||||
private Integer currencyType;
|
||||
|
||||
|
||||
@Schema(description = "暂估价金额")
|
||||
@ExcelProperty("暂估价金额(元)")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "1238")
|
||||
@ExcelProperty("实际价金额")
|
||||
@Schema(description = "实际价金额")
|
||||
@ExcelProperty("实际价金额(元)")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2")
|
||||
@ExcelProperty("单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1")
|
||||
@Schema(description = "税率")
|
||||
@ExcelProperty("税率(%)")
|
||||
private Integer taxRatio;
|
||||
|
||||
@Schema(description = "状态,1已保存,2已送审,3已审核,4已打回 ,默认是1")
|
||||
@ExcelProperty(value = "单据状态", converter = DictConvert.class)
|
||||
@DictFormat("heli_purchase_order_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "送审人", example = "18499")
|
||||
@ExcelProperty("送审人")
|
||||
@Schema(description = "状态,1未收货,2收获中,3收货完成 ,默认是1")
|
||||
@ExcelProperty(value = "采购单收货状态", converter = DictConvert.class)
|
||||
@DictFormat("heli_purchase_receiving_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private Integer receivingStatus;
|
||||
|
||||
@Schema(description = "送审人")
|
||||
private Long submitUserId;
|
||||
|
||||
@Schema(description = "送审时间")
|
||||
@ExcelProperty("送审时间")
|
||||
private LocalDateTime submitTime;
|
||||
|
||||
@Schema(description = "审核人")
|
||||
@ExcelProperty("审核人")
|
||||
private Long auditor;
|
||||
|
||||
@Schema(description = "审核时间")
|
||||
@ExcelProperty("审核时间")
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "供应商id", example = "3648")
|
||||
@ExcelProperty("供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "是否打印")
|
||||
@ExcelProperty("是否打印")
|
||||
private String isPrint;
|
||||
|
||||
@Schema(description = "打印时间")
|
||||
@ExcelProperty("打印时间")
|
||||
private LocalDateTime printDtime;
|
||||
|
||||
@Schema(description = "订单日期")
|
||||
@ExcelProperty("订单日期")
|
||||
private LocalDate ordDate;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "1")
|
||||
@ExcelProperty("收货状态 未收货/收货中/收货完成 1/2/3")
|
||||
private Integer receivingStatus;
|
||||
|
||||
@Schema(description = "结算币种", example = "2")
|
||||
@ExcelProperty("结算币种")
|
||||
private Integer currencyType;
|
||||
|
||||
@Schema(description = "税率")
|
||||
@ExcelProperty("税率")
|
||||
private Integer taxRatio;
|
||||
@Schema(description = "供应商名称")
|
||||
@ExcelProperty("供应商名称")
|
||||
private String supplierName;
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
}
|
@ -19,15 +19,18 @@ public class PurchaseOrderNoSaveReqVO {
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "采购单号不能为空")
|
||||
// @NotEmpty(message = "采购单号不能为空")
|
||||
private String purchaseNo;
|
||||
|
||||
@Schema(description = "采购合同号", example = "2163")
|
||||
private String contractNo;
|
||||
@Schema(description = "物料需求计划id", example = "2163")
|
||||
private Long projectMaterialPlanId;
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1")
|
||||
private Boolean purchaseType;
|
||||
private Integer purchaseType;
|
||||
|
||||
@Schema(description = "采购物类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "采购物类型,1物料,2加工件不能为空")
|
||||
private Boolean goodsType;
|
||||
private Integer goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "2163")
|
||||
private BigDecimal estimatedPrice;
|
||||
@ -36,7 +39,7 @@ public class PurchaseOrderNoSaveReqVO {
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2")
|
||||
private Boolean status;
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "送审人", example = "18499")
|
||||
private Long submitUserId;
|
||||
|
@ -74,9 +74,9 @@ public class PurchaseOrderNoDetailController {
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得采购订单明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no-detail:query')")
|
||||
public CommonResult<PageResult<PurchaseOrderNoDetailRespVO>> getPurchaseOrderNoDetailPage(@Valid PurchaseOrderNoDetailPageReqVO pageReqVO) {
|
||||
public CommonResult<PageResult<PurchaseOrderNoDetailDO>> getPurchaseOrderNoDetailPage(@Valid PurchaseOrderNoDetailPageReqVO pageReqVO) {
|
||||
PageResult<PurchaseOrderNoDetailDO> pageResult = purchaseOrderNoDetailService.getPurchaseOrderNoDetailPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PurchaseOrderNoDetailRespVO.class));
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
|
@ -121,5 +121,17 @@ public class MaterialPlanBoomDO extends BaseDO {
|
||||
private String projectMaterialPlanNo;
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
@TableField(exist = false)
|
||||
private Long matId;
|
||||
@TableField(exist = false)
|
||||
private String matCode;
|
||||
@TableField(exist = false)
|
||||
private String matSpec;
|
||||
@TableField(exist = false)
|
||||
private String matUnit;
|
||||
@TableField(exist = false)
|
||||
private String matType;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal matRest;
|
||||
|
||||
}
|
@ -37,14 +37,38 @@ public class PurchaseOrderNoDO extends BaseDO {
|
||||
* 采购单号
|
||||
*/
|
||||
private String purchaseNo;
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplierId;
|
||||
/**
|
||||
* 采购合同号
|
||||
*/
|
||||
private String contractNo;
|
||||
/**
|
||||
* 采购单类型,1按物料需求计划采购,2备库采购
|
||||
*
|
||||
* 枚举 {@link TODO heli_project_purchase_order_type 对应的类}
|
||||
*/
|
||||
private Integer purchaseType;
|
||||
/**
|
||||
* 物料需求计划id
|
||||
*/
|
||||
private Long projectMaterialPlanId;
|
||||
/**
|
||||
* 采购物类型,1物料,2加工件
|
||||
*
|
||||
* 枚举 {@link TODO heli_project_purchase_goods_type 对应的类}
|
||||
*/
|
||||
private Integer goodsType;
|
||||
/**
|
||||
* 结算币种
|
||||
*/
|
||||
private Integer currencyType;
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
private Integer taxRatio;
|
||||
/**
|
||||
* 暂估价金额
|
||||
*/
|
||||
@ -54,7 +78,15 @@ public class PurchaseOrderNoDO extends BaseDO {
|
||||
*/
|
||||
private BigDecimal actualPrice;
|
||||
/**
|
||||
* 单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1
|
||||
* 采购单收货状态,1未收货,2收获中,3收货完成 ,默认是1
|
||||
*
|
||||
* 枚举 {@link TODO heli_purchase_receiving_status 对应的类}
|
||||
*/
|
||||
private Integer receivingStatus;
|
||||
/**
|
||||
* 状态,1已保存,2已送审,3已审核,4已打回 ,默认是1
|
||||
*
|
||||
* 枚举 {@link TODO heli_purchase_order_status 对应的类}
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
@ -77,10 +109,31 @@ public class PurchaseOrderNoDO extends BaseDO {
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplierId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String supplierName;
|
||||
@TableField(exist = false)
|
||||
private String materialPlanNo;
|
||||
@TableField(exist = false)
|
||||
private String materialCode;
|
||||
@TableField(exist = false)
|
||||
private String materialName;
|
||||
@TableField(exist = false)
|
||||
private String materialType;
|
||||
@TableField(exist = false)
|
||||
private String materialSpec;
|
||||
@TableField(exist = false)
|
||||
private String unit;
|
||||
@TableField(exist = false)
|
||||
private String zanGuMoney;
|
||||
@TableField(exist = false)
|
||||
private String shiJiMoney;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal caiGouMoney;
|
||||
@TableField(exist = false)
|
||||
private String amount;
|
||||
@TableField(exist = false)
|
||||
private String type;
|
||||
/**
|
||||
* 是否打印
|
||||
*/
|
||||
@ -93,22 +146,4 @@ public class PurchaseOrderNoDO extends BaseDO {
|
||||
* 订单日期
|
||||
*/
|
||||
private LocalDate ordDate;
|
||||
/**
|
||||
* 收货状态 未收货/收货中/收货完成 1/2/3
|
||||
*/
|
||||
private Integer receivingStatus;
|
||||
/**
|
||||
* 结算币种
|
||||
*/
|
||||
private Integer currencyType;
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
private Integer taxRatio;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String supplierName;
|
||||
|
||||
}
|
@ -159,5 +159,22 @@ public class PurchaseOrderNoDetailDO extends BaseDO {
|
||||
* 责任人id
|
||||
*/
|
||||
private Long duEmpId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long matId;
|
||||
@TableField(exist = false)
|
||||
private String matName;
|
||||
@TableField(exist = false)
|
||||
private String matCode;
|
||||
@TableField(exist = false)
|
||||
private String matSpec;
|
||||
@TableField(exist = false)
|
||||
private String matUnit;
|
||||
@TableField(exist = false)
|
||||
private String matType;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal matRest;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal requireAmount;
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime requireArriveTime;
|
||||
}
|
@ -57,6 +57,22 @@ public interface MaterialPlanMapper extends BaseMapperX<MaterialPlanDO> {
|
||||
|
||||
|
||||
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
|
||||
default PageResult<MaterialPlanDO> getBeiKuPage(MaterialPlanPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<MaterialPlanDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(MaterialPlanDO.class)
|
||||
.select("p.project_name as projectName","pl.plan_no as planNo")
|
||||
.leftJoin(PlanDO.class, "pl", PlanDO::getId, MaterialPlanDO::getProjectPlanId)
|
||||
.leftJoin(ProjectOrderDO.class, "p", ProjectOrderDO::getId, MaterialPlanDO::getProjectId)
|
||||
.disableSubLogicDel()
|
||||
.orderByDesc(MaterialPlanDO::getMatPlanDate);
|
||||
query.like(!StringUtils.isEmpty(pageReqVO.getProjectMaterialPlanNo()), MaterialPlanDO::getProjectMaterialPlanNo, pageReqVO.getProjectMaterialPlanNo())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getProjectName()), "p.project_name", pageReqVO.getProjectName())
|
||||
.eq(MaterialPlanDO::getMatType,2);
|
||||
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
// default PageResult<MaterialPlanDO> selectPage(MaterialPlanPageReqVO reqVO) {
|
||||
|
@ -2,16 +2,19 @@ package com.chanko.yunxi.mes.module.heli.dal.mysql.materialplanboom;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO;
|
||||
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.processbom.ProcessBomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.BoomDetailTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.ProcessBomStatusEnum;
|
||||
@ -89,6 +92,24 @@ public interface MaterialPlanBoomMapper extends BaseMapperX<MaterialPlanBoomDO>
|
||||
return selectPage(pageReqVO,query);
|
||||
}
|
||||
|
||||
default PageResult<MaterialPlanBoomDO> getProjectMaterialPlanId(MaterialPlanBoomPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<MaterialPlanBoomDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(MaterialPlanBoomDO.class)
|
||||
.select("mat.id as matId","mat.name as matName","mat.code as matCode","mat.spec as matSpec","mat.unit as matUnit","mat.material_type as matType")
|
||||
.select("sum(ifnull(sm.storage_ok_qty,0)) as matRest")
|
||||
.leftJoin(MaterialDO.class, "mat", MaterialDO::getId, MaterialPlanDetailDO::getMaterialId)
|
||||
.leftJoin(StorageMaterialDO.class,"sm",StorageMaterialDO::getId, MaterialPlanDetailDO::getMaterialId)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(MaterialPlanBoomDO::getId)
|
||||
.orderByDesc(MaterialPlanBoomDO::getCreateTime);
|
||||
query.eq(ObjectUtil.isNotEmpty(pageReqVO.getProjectMaterialPlanId()),MaterialPlanDetailDO::getProjectMaterialPlanId, pageReqVO.getProjectMaterialPlanId());
|
||||
query.eq(ObjectUtil.isNotEmpty(pageReqVO.getMatCode()),MaterialDO::getCode, pageReqVO.getMatCode());
|
||||
query.eq(ObjectUtil.isNotEmpty(pageReqVO.getMatName()),MaterialDO::getName, pageReqVO.getMatName());
|
||||
query.eq(ObjectUtil.isNotEmpty(pageReqVO.getMatType()),MaterialDO::getMaterialType, pageReqVO.getMatType());
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
|
||||
// default PageResult<MaterialPlanBoomDO> selectPage(MaterialPlanBoomPageReqVO reqVO) {
|
||||
// return selectPage(reqVO, new LambdaQueryWrapperX<MaterialPlanBoomDO>()
|
||||
// .eqIfPresent(MaterialPlanBoomDO::getId, reqVO.getId())
|
||||
|
@ -5,12 +5,18 @@ import java.util.*;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equip.EquipDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.supplier.SupplierDO;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.PurchaseStatusEnum;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import io.netty.util.internal.ObjectUtil;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.*;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@ -20,29 +26,26 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
@Mapper
|
||||
public interface PurchaseOrderNoMapper extends BaseMapperX<PurchaseOrderNoDO> {
|
||||
|
||||
default PageResult<PurchaseOrderNoDO> selectPage(PurchaseOrderNoPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PurchaseOrderNoDO>()
|
||||
.eqIfPresent(PurchaseOrderNoDO::getPurchaseNo, reqVO.getPurchaseNo())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getPurchaseType, reqVO.getPurchaseType())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getGoodsType, reqVO.getGoodsType())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getEstimatedPrice, reqVO.getEstimatedPrice())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getActualPrice, reqVO.getActualPrice())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getSubmitUserId, reqVO.getSubmitUserId())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getSubmitTime, reqVO.getSubmitTime())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getAuditor, reqVO.getAuditor())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getAuditTime, reqVO.getAuditTime())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getSupplierId, reqVO.getSupplierId())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getIsPrint, reqVO.getIsPrint())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getPrintDtime, reqVO.getPrintDtime())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getOrdDate, reqVO.getOrdDate())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getReceivingStatus, reqVO.getReceivingStatus())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getCurrencyType, reqVO.getCurrencyType())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getTaxRatio, reqVO.getTaxRatio())
|
||||
.orderByDesc(PurchaseOrderNoDO::getId));
|
||||
MPJLambdaWrapper<PurchaseOrderNoDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(PurchaseOrderNoDO.class)
|
||||
.select("s.name as supplierName","m.project_material_plan_no as materialPlanNo")
|
||||
.leftJoin(SupplierDO.class, "s", SupplierDO::getId, PurchaseOrderNoDO::getSupplierId)
|
||||
.leftJoin(MaterialPlanDO.class, "m", MaterialPlanDO::getId, PurchaseOrderNoDO::getProjectMaterialPlanId)
|
||||
.disableSubLogicDel()
|
||||
.orderByDesc(PurchaseOrderNoDO::getCreateTime);
|
||||
query.like(!StringUtils.isEmpty(reqVO.getPurchaseNo()), PurchaseOrderDO::getPurchaseNo, reqVO.getPurchaseNo())
|
||||
.like(!StringUtils.isEmpty(reqVO.getSupplierName()), "s.name", reqVO.getSupplierName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getMaterialPlanNo()), "m.project_material_plan_no", reqVO.getMaterialPlanNo())
|
||||
.apply(!StringUtils.isEmpty(reqVO.getCreateTime()), "DATE_FORMAT(t.create_time,'%Y-%m-%d') = {0}", reqVO.getCreateTime())
|
||||
.eq(reqVO.getStatus() != null, PurchaseOrderNoDO::getStatus, reqVO.getStatus())
|
||||
.eq(reqVO.getReceivingStatus() != null, PurchaseOrderNoDO::getReceivingStatus, reqVO.getReceivingStatus())
|
||||
.eq(reqVO.getPurchaseType() != null, PurchaseOrderNoDO::getPurchaseType, reqVO.getPurchaseType())
|
||||
.eq(reqVO.getGoodsType() != null, PurchaseOrderNoDO::getGoodsType, reqVO.getGoodsType())
|
||||
.in(reqVO.getIds() != null && !reqVO.getIds().isEmpty(),PurchaseOrderNoDO::getId,reqVO.getIds());
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
||||
default PageResult<PurchaseOrderNoDO> getPurchaseOrderPage(PurchaseOrderNoPageReqVO pageReqVO){
|
||||
@ -58,4 +61,26 @@ public interface PurchaseOrderNoMapper extends BaseMapperX<PurchaseOrderNoDO> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
default PageResult<PurchaseOrderNoDO> getPurchaseOrderPageByStatus(PurchaseOrderNoPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<PurchaseOrderNoDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(PurchaseOrderNoDO.class)
|
||||
.select("s.name as supplierName","m.project_material_plan_no as materialPlanNo")
|
||||
.leftJoin(SupplierDO.class, "s", SupplierDO::getId, PurchaseOrderDO::getSupplierId)
|
||||
.leftJoin(MaterialPlanDO.class, "m", MaterialPlanDO::getId, PurchaseOrderDO::getProjectMaterialPlanId)
|
||||
.disableSubLogicDel()
|
||||
.orderByDesc(PurchaseOrderDO::getCreateTime);
|
||||
query.like(!StringUtils.isEmpty(pageReqVO.getPurchaseNo()), PurchaseOrderNoDO::getPurchaseNo, pageReqVO.getPurchaseNo())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getSupplierName()), "s.name", pageReqVO.getSupplierName())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getMaterialPlanNo()), "m.project_material_plan_no", pageReqVO.getMaterialPlanNo())
|
||||
.apply(pageReqVO.getCreateTime() != null, "DATE_FORMAT(t.create_time,'%Y-%m-%d') = {0}", pageReqVO.getCreateTime())
|
||||
.eq(pageReqVO.getStatus() != null, PurchaseOrderNoDO::getStatus, pageReqVO.getStatus())
|
||||
.eq(pageReqVO.getAuditor() != null, PurchaseOrderNoDO::getAuditor, pageReqVO.getAuditor())
|
||||
.ne(true, PurchaseOrderDO::getStatus, PurchaseStatusEnum.START.getCode())
|
||||
.eq(pageReqVO.getPurchaseType() != null, PurchaseOrderNoDO::getPurchaseType, pageReqVO.getPurchaseType())
|
||||
.eq(pageReqVO.getGoodsType() != null, PurchaseOrderNoDO::getGoodsType, pageReqVO.getGoodsType());
|
||||
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
}
|
@ -5,7 +5,15 @@ import java.util.*;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial.vo.PurchaseOrderMaterialPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderboom.PurchaseOrderBoomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermaterial.PurchaseOrderMaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.vo.*;
|
||||
|
||||
@ -17,41 +25,24 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.v
|
||||
@Mapper
|
||||
public interface PurchaseOrderNoDetailMapper extends BaseMapperX<PurchaseOrderNoDetailDO> {
|
||||
|
||||
default PageResult<PurchaseOrderNoDetailDO> selectPage(PurchaseOrderNoDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PurchaseOrderNoDetailDO>()
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getPurchaseOrderId, reqVO.getPurchaseOrderId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBoomDetailId, reqVO.getBoomDetailId())
|
||||
.likeIfPresent(PurchaseOrderNoDetailDO::getBoomName, reqVO.getBoomName())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBoomSpec, reqVO.getBoomSpec())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBoomUnit, reqVO.getBoomUnit())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getComposition, reqVO.getComposition())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getPurchaseAmount, reqVO.getPurchaseAmount())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getEstimatedPrice, reqVO.getEstimatedPrice())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getActualPrice, reqVO.getActualPrice())
|
||||
.betweenIfPresent(PurchaseOrderNoDetailDO::getArriveTime, reqVO.getArriveTime())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(PurchaseOrderNoDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBoomAmount, reqVO.getBoomAmount())
|
||||
.betweenIfPresent(PurchaseOrderNoDetailDO::getRequireTime, reqVO.getRequireTime())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectMaterialPlanId, reqVO.getProjectMaterialPlanId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectMaterialPlanBoomId, reqVO.getProjectMaterialPlanBoomId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectPlanSubId, reqVO.getProjectPlanSubId())
|
||||
.likeIfPresent(PurchaseOrderNoDetailDO::getName, reqVO.getName())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getNameSim, reqVO.getNameSim())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectPlanId, reqVO.getProjectPlanId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getCustomerId, reqVO.getCustomerId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBrief, reqVO.getBrief())
|
||||
.likeIfPresent(PurchaseOrderNoDetailDO::getProjectName, reqVO.getProjectName())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectNameSim, reqVO.getProjectNameSim())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getMaterialId, reqVO.getMaterialId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getReceivingStatus, reqVO.getReceivingStatus())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getStorageId, reqVO.getStorageId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getStorageMatId, reqVO.getStorageMatId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getPurchaseRemAmount, reqVO.getPurchaseRemAmount())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getTheWeight, reqVO.getTheWeight())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getDuEmpId, reqVO.getDuEmpId())
|
||||
.orderByDesc(PurchaseOrderNoDetailDO::getId));
|
||||
}
|
||||
default PageResult<PurchaseOrderNoDetailDO> selectPage(PurchaseOrderNoDetailPageReqVO pageReqVO) {
|
||||
MPJLambdaWrapper<PurchaseOrderNoDetailDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(PurchaseOrderNoDetailDO.class)
|
||||
.select("mat.id as matId","mat.name as matName","mat.code as matCode","mat.spec as matSpec","mat.unit as matUnit","mat.material_type as matType")
|
||||
.select(" sum(ifnull(sm.storage_ok_qty,0)) as matRest")
|
||||
.select(" mp.require_amount") // sum(ifnull(mp.require_amount,0)) as requireAmount
|
||||
.select("min(mp.require_arrive_time) as requireArriveTime")
|
||||
.leftJoin(PurchaseOrderDO.class, "pb", PurchaseOrderDO::getId, PurchaseOrderBoomDO::getPurchaseOrderId)
|
||||
.leftJoin("project_material_plan_detail mp on mp.project_material_plan_id = pb.project_material_plan_id AND mp.material_id = t.material_id")
|
||||
.leftJoin(MaterialDO.class, "mat", MaterialDO::getId, PurchaseOrderNoDetailDO::getMaterialId)
|
||||
.leftJoin(StorageMaterialDO.class,"sm",StorageMaterialDO::getId,PurchaseOrderNoDetailDO::getMaterialId)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(MaterialPlanDetailDO::getMaterialId)
|
||||
.orderByAsc(PurchaseOrderMaterialDO::getId);
|
||||
query.eq(pageReqVO.getPurchaseOrderId()!=null,PurchaseOrderMaterialDO::getPurchaseOrderId, pageReqVO.getPurchaseOrderId())
|
||||
.orderByAsc(PurchaseOrderMaterialDO::getCreateTime);
|
||||
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
}
|
@ -66,4 +66,8 @@ public interface MaterialPlanService {
|
||||
Boolean submit(List<TaskDispatchDetailDO> list);
|
||||
|
||||
CommonResult<Boolean> withdraw(String code);
|
||||
|
||||
PageResult<MaterialPlanDO> getBeiKuPage(MaterialPlanPageReqVO pageReqVO);
|
||||
|
||||
MaterialPlanDO getProjectMaterialPlanNo(String code);
|
||||
}
|
||||
|
@ -326,4 +326,17 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
|
||||
return CommonResult.success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<MaterialPlanDO> getBeiKuPage(MaterialPlanPageReqVO pageReqVO) {
|
||||
return materialPlanMapper.getBeiKuPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaterialPlanDO getProjectMaterialPlanNo(String code) {
|
||||
LambdaQueryWrapper<MaterialPlanDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MaterialPlanDO::getProjectMaterialPlanNo, code);
|
||||
queryWrapper.eq(MaterialPlanDO::getDeleted,0);
|
||||
return materialPlanMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,4 +58,6 @@ public interface MaterialPlanBoomService {
|
||||
PageResult<ProcessBomDetailDO> getProcessBoomDetailList(ProcessBoomPageReqVO pageReqVO);
|
||||
|
||||
PageResult<MaterialPlanBoomDO> getMaterialPlanBoomPages(ProcessBoomPageReqVO pageReqVO);
|
||||
|
||||
PageResult<MaterialPlanBoomDO> getProjectMaterialPlanId(MaterialPlanBoomPageReqVO pageReqVO);
|
||||
}
|
||||
|
@ -159,4 +159,9 @@ public class MaterialPlanBoomServiceImpl implements MaterialPlanBoomService {
|
||||
return materialPlanBoomMapper.getMaterialPlanBoomPages(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<MaterialPlanBoomDO> getProjectMaterialPlanId(MaterialPlanBoomPageReqVO pageReqVO) {
|
||||
return materialPlanBoomMapper.getProjectMaterialPlanId(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,4 +53,6 @@ public interface PurchaseOrderNoService {
|
||||
PageResult<PurchaseOrderNoDO> getPurchaseOrderNoPage(PurchaseOrderNoPageReqVO pageReqVO);
|
||||
|
||||
PageResult<PurchaseOrderNoDO> getPurchaseOrderPage(PurchaseOrderNoPageReqVO pageReqVO);
|
||||
|
||||
PageResult<PurchaseOrderNoDO> getPurchaseOrderPageByStatus(PurchaseOrderNoPageReqVO pageReqVO);
|
||||
}
|
||||
|
@ -1,10 +1,33 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.purchaseorderno;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chanko.yunxi.mes.framework.security.core.LoginUser;
|
||||
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.OrderYfSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.supplier.SupplierDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorder.PurchaseOrderMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.supplier.SupplierMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.orderyf.OrderYfService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
@ -15,6 +38,8 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorderno.PurchaseOrderNoMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.CodeEnum.PURCHASE_ORDER;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
@ -28,13 +53,38 @@ public class PurchaseOrderNoServiceImpl implements PurchaseOrderNoService {
|
||||
|
||||
@Resource
|
||||
private PurchaseOrderNoMapper purchaseOrderNoMapper;
|
||||
@Resource
|
||||
private SerialNumberService serialNumberService;
|
||||
@Resource
|
||||
private ShenheMapper shenheMapper;
|
||||
@Resource
|
||||
private SupplierMapper supplierMapper;
|
||||
@Resource
|
||||
private OrderYfService orderYfService;
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
@Resource
|
||||
private AttentiontodoMapper attentiontodoMapper;
|
||||
@Autowired
|
||||
private AttentiontodoService attentiontodoService;
|
||||
@Resource
|
||||
private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper;
|
||||
|
||||
@Override
|
||||
public Long createPurchaseOrderNo(PurchaseOrderNoSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
PurchaseOrderNoDO purchaseOrderNo = BeanUtils.toBean(createReqVO, PurchaseOrderNoDO.class);
|
||||
purchaseOrderNoMapper.insert(purchaseOrderNo);
|
||||
|
||||
// 返回
|
||||
// 月度流水号
|
||||
SerialNumberDO serialNumberDO = new SerialNumberDO();
|
||||
serialNumberDO = serialNumberService.getSerialNumber(PURCHASE_ORDER.name(), new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
||||
serialNumberDO.setSerialNumber(serialNumberDO.getSerialNumber()+1);
|
||||
|
||||
purchaseOrderNo.setPurchaseNo(PURCHASE_ORDER.getCode(serialNumberDO.getSerialNumber().toString()));
|
||||
purchaseOrderNoMapper.insert(purchaseOrderNo);
|
||||
// 回写序列记录
|
||||
serialNumberService.updateSerialNumber(serialNumberDO);
|
||||
return purchaseOrderNo.getId();
|
||||
}
|
||||
|
||||
@ -45,8 +95,116 @@ public class PurchaseOrderNoServiceImpl implements PurchaseOrderNoService {
|
||||
// 更新
|
||||
PurchaseOrderNoDO updateObj = BeanUtils.toBean(updateReqVO, PurchaseOrderNoDO.class);
|
||||
purchaseOrderNoMapper.updateById(updateObj);
|
||||
// 更新
|
||||
SupplierDO supplier = supplierMapper.selectById(updateReqVO.getSupplierId());
|
||||
String supplierName = supplier.getName();
|
||||
LocalDateTime currTime = LocalDateTime.now();
|
||||
LoginUser loginUser = getLoginUser();
|
||||
if (updateReqVO.getStatus() == 2 && (updateObj.getAuditor() == null || !updateReqVO.getAuditor().equals(loginUser.getId()) )) {
|
||||
ShenheDO shenHeDO = shenheMapper.selectOne(ShenheDO::getShenheName,"1",ShenheDO::getShenheNum,1);
|
||||
if (shenHeDO != null) {
|
||||
updateObj.setAuditor(shenHeDO.getShenheUser());
|
||||
updateObj.setSubmitTime(currTime);
|
||||
} else {
|
||||
// 处理未找到审核人情况
|
||||
throw new RuntimeException("审核人未找到");
|
||||
}
|
||||
}else if(updateReqVO.getStatus()==2 && updateReqVO.getAuditor().equals(loginUser.getId())){
|
||||
ShenheDO shenHeDOOne = shenheMapper.selectOne(ShenheDO::getShenheName,"1",ShenheDO::getShenheUser,updateReqVO.getAuditor());
|
||||
if (shenHeDOOne != null) {
|
||||
ShenheDO shenHeDOTwo = shenheMapper.selectOne(ShenheDO::getShenheName,"1",ShenheDO::getShenheNum,shenHeDOOne.getShenheNum()+1);
|
||||
if(shenHeDOTwo != null ){
|
||||
updateObj.setAuditor(shenHeDOTwo.getShenheUser());
|
||||
updateObj.setSubmitTime(currTime);
|
||||
}else if(shenHeDOTwo == null){
|
||||
updateObj.setStatus(3);
|
||||
updateObj.setAuditTime(currTime);
|
||||
OrderYfSaveReqVO orderYfVO = new OrderYfSaveReqVO();
|
||||
orderYfVO.setCgOrderNum(updateReqVO.getPurchaseNo());
|
||||
orderYfVO.setCgGysname(supplierName);
|
||||
orderYfVO.setCgYf(updateReqVO.getActualPrice());
|
||||
orderYfService.createCg(orderYfVO);
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException("采购订单审核失败,请联系管理员!");
|
||||
}
|
||||
}
|
||||
if(updateReqVO.getStatus()== 3){
|
||||
// pOrderReceivedCompleted(updateReqVO.getPurchaseNo(),updateReqVO.getId());
|
||||
}
|
||||
purchaseOrderNoMapper.updateById(updateObj);
|
||||
}
|
||||
private void pOrderReceivedCompleted(String purchaseNo,Long id) {
|
||||
PurchaseOrderNoPageReqVO purchaseOrderPageReqVO = new PurchaseOrderNoPageReqVO();
|
||||
purchaseOrderPageReqVO.setPageNo(1);
|
||||
purchaseOrderPageReqVO.setPageSize(10);
|
||||
purchaseOrderPageReqVO.setId(id);
|
||||
PageResult<PurchaseOrderNoDO> purchaseOrderDOPageResult = purchaseOrderNoMapper.selectPage(purchaseOrderPageReqVO);
|
||||
PurchaseOrderNoDO purchaseOrderDO = purchaseOrderDOPageResult.getList().get(0);
|
||||
String materialPlanNo = purchaseOrderDO.getMaterialPlanNo();
|
||||
bdgzsomthingDO abc= new bdgzsomthingDO();
|
||||
abc.setThingname("《物料需求计划》的采购");
|
||||
abc.setAttr3(materialPlanNo);//改成单独查询的
|
||||
bdgzsomthingMapper.updateokone(abc);
|
||||
//采购订单收货完成
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(10);//查找该类型的待办和关注人 改
|
||||
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(10);
|
||||
if (attentiontodook1.size()<1){
|
||||
{
|
||||
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("《采购订单》到货时通知检验");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(nickname);
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||
{
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO();
|
||||
BdgzsomthingDO.setThingname(attentiontodoRespVO.getEvent());//事件名称
|
||||
BdgzsomthingDO.setThings("采购订单"+purchaseNo+"已完成收货");//事件名称
|
||||
|
||||
BdgzsomthingDO.setAttr2(purchaseNo);//跳转携带参数
|
||||
BdgzsomthingDO.setAttr3(purchaseNo);//独特标识
|
||||
// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期
|
||||
// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写
|
||||
if(attentiontodoRespVO.getAttr5().equals("1")){//提醒状态
|
||||
BdgzsomthingDO.setDborgz("待办");
|
||||
}
|
||||
else if(attentiontodoRespVO.getAttr5().equals("2")){
|
||||
BdgzsomthingDO.setDborgz("关注");
|
||||
}
|
||||
BdgzsomthingDO.setClick(attentiontodoRespVO.getAttr4());//提醒人
|
||||
if(attentiontodoRespVO.getLevel().equals("1")){
|
||||
BdgzsomthingDO.setLevel("紧急");
|
||||
}
|
||||
else if(attentiontodoRespVO.getLevel().equals("2")){
|
||||
BdgzsomthingDO.setLevel("一般");
|
||||
}
|
||||
else if(attentiontodoRespVO.getLevel().equals("3")){
|
||||
BdgzsomthingDO.setLevel("非紧急");
|
||||
}
|
||||
// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人
|
||||
BdgzsomthingDO.setYesorno("0");//是否点击
|
||||
BdgzsomthingDO.setAttr4("0");//是否已处理
|
||||
|
||||
// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改
|
||||
bdgzsomthingMapper.insert(BdgzsomthingDO);
|
||||
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void deletePurchaseOrderNo(Long id) {
|
||||
// 校验存在
|
||||
@ -76,4 +234,12 @@ public class PurchaseOrderNoServiceImpl implements PurchaseOrderNoService {
|
||||
return purchaseOrderNoMapper.getPurchaseOrderPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PurchaseOrderNoDO> getPurchaseOrderPageByStatus(PurchaseOrderNoPageReqVO pageReqVO) {
|
||||
if (ObjectUtil.isNotEmpty(pageReqVO.getStatus())&&pageReqVO.getStatus()==2){
|
||||
pageReqVO.setAuditor(getLoginUser().getId());
|
||||
}
|
||||
return purchaseOrderNoMapper.getPurchaseOrderPageByStatus(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -67,3 +67,11 @@ export const submitForm = async (data) => {
|
||||
export const withdraw = async (code) => {
|
||||
return await request.get({ url: `/heli/material-plan/withdraw?code=` + code })
|
||||
}
|
||||
// 查询备库物料需求计划分页
|
||||
export const getBeiKuPage = async (params) => {
|
||||
return await request.get({ url: `/heli/material-plan/getBeiKuPage`, params })
|
||||
}
|
||||
// 查询物料需求计划详情
|
||||
export const getProjectMaterialPlanNo = async (code:string) => {
|
||||
return await request.get({ url: `/heli/material-plan/getProjectMaterialPlanNo?code=` + code })
|
||||
}
|
||||
|
@ -51,3 +51,6 @@ export const exportMaterialPlanBoom = async (params) => {
|
||||
export const getMaterialPlanBoomPages = async (params) => {
|
||||
return await request.get({ url: `/heli/material-plan-boom/pages`, params })
|
||||
}
|
||||
export const getProjectMaterialPlanId = async (params) => {
|
||||
return await request.get({ url: `/heli/material-plan-boom/getProjectMaterialPlanId`, params })
|
||||
}
|
||||
|
@ -55,3 +55,11 @@ export const exportPurchaseOrderNo = async (params) => {
|
||||
export const getPurchaseOrderPage = async (params) => {
|
||||
return await request.get({ url: `/heli/purchase-order-no/getPurchaseOrderPage`, params })
|
||||
}
|
||||
// 查询采购订单分页
|
||||
export const getPurchaseOrderNoPageByStatus = async (params) => {
|
||||
return await request.get({ url: `/heli/purchase-order-no/page-by-status`, params })
|
||||
}
|
||||
// 修改采购订单收获状态
|
||||
export const updateReceivingStatus = async (id: number) => {
|
||||
return await request.put({ url: `/heli/purchase-order/updateRSById?id=` + id })
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ export default defineComponent({
|
||||
// 注册
|
||||
onMounted(() => {
|
||||
const tableRef = unref(elTableRef)
|
||||
emit('register', tableRef?.$parent, elTableRef)
|
||||
emit('register', tableRef?.$parent, elTableRef.value)
|
||||
})
|
||||
|
||||
const pageSizeRef = ref(props.pageSize)
|
||||
|
@ -100,7 +100,7 @@
|
||||
width="180px"
|
||||
v-if="false"
|
||||
/>
|
||||
<el-table-column label="采购订单编号" align="center" prop="cgOrderNum" width="200"/>
|
||||
<el-table-column label="采购订单编号" align="center" prop="cgOrderNum" />
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="生成日期"-->
|
||||
<!-- align="center"-->
|
||||
@ -108,17 +108,17 @@
|
||||
<!-- :formatter="dateFormatter"-->
|
||||
<!-- width="180px"-->
|
||||
<!-- />-->
|
||||
<el-table-column label="供应商名称" align="center" prop="cgGysname" width="250"/>
|
||||
<el-table-column label="应付金额(元)" align="center" prop="cgYf" width="150"/>
|
||||
<el-table-column label="已付金额(元)" align="center" prop="cgYifu" width="150"/>
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" width="150"/>
|
||||
<el-table-column label="付款状态" align="center" prop="cgTypee" width="120">
|
||||
<el-table-column label="供应商名称" align="center" prop="cgGysname"/>
|
||||
<el-table-column label="应付金额(元)" align="center" prop="cgYf" />
|
||||
<el-table-column label="已付金额(元)" align="center" prop="cgYifu" />
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" />
|
||||
<el-table-column label="付款状态" align="center" prop="cgTypee" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.cgTypee" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="rem" width="220" />
|
||||
<el-table-column label="操作" align="center" width="80">
|
||||
<el-table-column label="备注" align="center" prop="rem"/>
|
||||
<el-table-column label="操作" align="center" >
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
|
@ -71,9 +71,9 @@
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick" highlight-current-row>
|
||||
<el-table-column label="采购订单编号" align="center" prop="cgOrderNum" width="200"/>
|
||||
<el-table-column label="采购订单编号" align="center" prop="cgOrderNum"/>
|
||||
|
||||
<el-table-column label="供应商名称" align="center" prop="cgGysname" width="250px"/>
|
||||
<el-table-column label="供应商名称" align="center" prop="cgGysname" />
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="预计回款日期"-->
|
||||
<!-- align="center"-->
|
||||
@ -81,16 +81,16 @@
|
||||
<!-- :formatter="dateFormatter1"-->
|
||||
<!-- width="200px"-->
|
||||
<!-- />-->
|
||||
<el-table-column label="应付金额(元)" align="center" prop="cgYf" width="150"/>
|
||||
<el-table-column label="已付金额(元)" align="center" prop="cgYifu" width="150"/>
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" width="150"/>
|
||||
<el-table-column label="付款状态" align="center" prop="cgTypee" width="150" >
|
||||
<el-table-column label="应付金额(元)" align="center" prop="cgYf" />
|
||||
<el-table-column label="已付金额(元)" align="center" prop="cgYifu" />
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" />
|
||||
<el-table-column label="付款状态" align="center" prop="cgTypee" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.cgTypee" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="项目编号" align="center" prop="code" width="180"/>-->
|
||||
<el-table-column label="备注" align="center" prop="rem" width="250"/>
|
||||
<el-table-column label="备注" align="center" prop="rem" />
|
||||
<!-- <el-table-column label="操作" align="center" width="180">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button-->
|
||||
|
@ -86,7 +86,7 @@
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="150"/>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="生成日期"-->
|
||||
<!-- align="center"-->
|
||||
@ -94,7 +94,7 @@
|
||||
<!-- :formatter="dateFormatter"-->
|
||||
<!-- width="250px"-->
|
||||
<!-- />-->
|
||||
<el-table-column label="客户名称" align="center" prop="cgKhname" width="200px"/>
|
||||
<el-table-column label="客户名称" align="center" prop="cgKhname"/>
|
||||
<el-table-column
|
||||
label="预计回款日期"
|
||||
align="center"
|
||||
@ -102,17 +102,17 @@
|
||||
:formatter="dateFormatter1"
|
||||
width="200px"
|
||||
/>
|
||||
<el-table-column label="应收金额(元)" align="center" prop="cgYs" width="150"/>
|
||||
<el-table-column label="已收金额(元)" align="center" prop="cgYishou" width="150"/>
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" width="150"/>
|
||||
<el-table-column label="回款状态" align="center" prop="cgTypee" width="150" >
|
||||
<el-table-column label="应收金额(元)" align="center" prop="cgYs" />
|
||||
<el-table-column label="已收金额(元)" align="center" prop="cgYishou" />
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" />
|
||||
<el-table-column label="回款状态" align="center" prop="cgTypee" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.cgTypee" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="项目编号" align="center" prop="code" width="180"/>-->
|
||||
<el-table-column label="备注" align="center" prop="rem" width="250"/>
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<el-table-column label="备注" align="center" prop="rem" />
|
||||
<el-table-column label="操作" align="center" >
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
|
@ -86,7 +86,7 @@
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick" :row-class-name="tableRowClassName" highlight-current-row>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="250"/>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="生成日期"-->
|
||||
<!-- align="center"-->
|
||||
@ -94,7 +94,7 @@
|
||||
<!-- :formatter="dateFormatter"-->
|
||||
<!-- width="250px"-->
|
||||
<!-- />-->
|
||||
<el-table-column label="客户名称" align="center" prop="cgKhname" width="250px"/>
|
||||
<el-table-column label="客户名称" align="center" prop="cgKhname" />
|
||||
<el-table-column
|
||||
label="预计回款日期"
|
||||
align="center"
|
||||
@ -102,16 +102,16 @@
|
||||
:formatter="dateFormatter1"
|
||||
width="200px"
|
||||
/>
|
||||
<el-table-column label="应收金额(元)" align="center" prop="cgYs" width="150"/>
|
||||
<el-table-column label="已收金额(元)" align="center" prop="cgYishou" width="150"/>
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" width="150"/>
|
||||
<el-table-column label="回款状态" align="center" prop="cgTypee" width="150" >
|
||||
<el-table-column label="应收金额(元)" align="center" prop="cgYs" />
|
||||
<el-table-column label="已收金额(元)" align="center" prop="cgYishou" />
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" />
|
||||
<el-table-column label="回款状态" align="center" prop="cgTypee" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.cgTypee" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="项目编号" align="center" prop="code" width="180"/>-->
|
||||
<el-table-column label="备注" align="center" prop="rem" width="250"/>
|
||||
<el-table-column label="备注" align="center" prop="rem"/>
|
||||
<!-- <el-table-column label="操作" align="center" width="180">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button-->
|
||||
|
@ -68,7 +68,7 @@ class="!w-265px" v-model="formData.createTime" value-format="x" placeholder="单
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="物料需求计划编号" v-if="!formData.isPlan" prop="projectMaterialPlanNo"
|
||||
label="物料需求计划编号" prop="projectMaterialPlanNo"
|
||||
:rules="formRules.projectMaterialPlanNo">
|
||||
<div class="!w-265px">
|
||||
<el-input
|
||||
@ -80,13 +80,6 @@ v-model="formData.projectMaterialPlanNo" @click.prevent="handleClick"
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料需求计划编号" v-else>
|
||||
<div class="!w-265px">
|
||||
<el-input v-model="formData.projectMaterialPlanNo" disabled>
|
||||
<template #append><el-button :icon="Search" :disabled="formData.isPlan" /></template>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -154,12 +147,13 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PURCHASE_GOODS_TYPE)"
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import * as SupplierApi from '@/api/heli/supplier'
|
||||
import * as PurchaseOrderApi from '@/api/heli/purchaseorder'
|
||||
import * as PurchaseOrderNoApi from '@/api/heli/purchaseorderNo'
|
||||
import { Search, Plus } from '@element-plus/icons-vue'
|
||||
import materialPlanDialog from '@/views/heli/purchaseorder/materialPlanDialog.vue'
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
import supplierDialog from '@/views/heli/purchaseorder/supplierDialog.vue'
|
||||
import SupplierSelect from '@/views/heli/hlvuestyle/supplierSelect.vue'
|
||||
import * as materialPlanApi from "@/api/heli/materialplan";
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
@ -256,17 +250,24 @@ const submitForm = async () => {
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as PurchaseOrderApi.PurchaseOrderVO
|
||||
var purchaseOrderId = await PurchaseOrderApi.createPurchaseOrder(data)
|
||||
// const data = formData.value as unknown as PurchaseOrderApi.PurchaseOrderVO
|
||||
const data = formData.value as unknown as PurchaseOrderNoApi.PurchaseOrderNoVO
|
||||
var plan = await materialPlanApi.getProjectMaterialPlanNo(data.projectMaterialPlanNo);
|
||||
console.log(plan)
|
||||
if (!plan){
|
||||
message.alert('该单号'+data.projectMaterialPlanNo+'不存在,请确认')
|
||||
return
|
||||
}
|
||||
var purchaseOrderId = await PurchaseOrderNoApi.createPurchaseOrderNo(data)
|
||||
router.push({ path: '/purchase/purchaseorderedit', query: { id: purchaseOrderId } })
|
||||
|
||||
//this.$tab.closeOpenPage({path:"/purchase/add"});
|
||||
|
||||
tagsViewStore.delVisitedView(currentTag)
|
||||
dialogVisible.value = false
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
router.push({ path: '/purchase/purchaseorderedit', query: { id: purchaseOrderId } })
|
||||
tagsViewStore.delVisitedView(currentTag)
|
||||
// router.push({ path: '/purchase/purchaseorderedit', query: { id: purchaseOrderId } })
|
||||
// tagsViewStore.delVisitedView(currentTag)
|
||||
//this.$tab.closePage();
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ v-model="queryParams.purchaseNo" placeholder="采购单号" clearable @keyup.ent
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期" prop="createTime">
|
||||
<el-date-picker
|
||||
class="!w-240px" v-model="queryParams.createTime" type="date" value-format="x"
|
||||
class="!w-240px" v-model="queryParams.createTime" type="date" value-format="x"
|
||||
placeholder="单据日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierName">
|
||||
@ -131,8 +131,10 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PURCHASE_ORDER_STATUS).filter(it
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import * as PurchaseOrderApi from '@/api/heli/purchaseorder'
|
||||
import * as PurchaseOrderNoApi from '@/api/heli/purchaseorderno'
|
||||
import PurchaseOrderForm from './PurchaseOrderForm.vue'
|
||||
import {getPurchaseOrderNoPageByStatus} from "@/api/heli/purchaseorderno";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
defineOptions({ name: 'PurchaseOrder' })
|
||||
|
||||
@ -163,7 +165,7 @@ const queryParams = reactive({
|
||||
auditTime: [],
|
||||
description: undefined,
|
||||
creator: undefined,
|
||||
createTime: [],
|
||||
createTime: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
@ -179,7 +181,7 @@ const getList = async () => {
|
||||
queryParams.purchaseNo=idid
|
||||
}
|
||||
|
||||
const data = await PurchaseOrderApi.getPurchaseOrderPageByStatus(queryParams)
|
||||
const data = await PurchaseOrderNoApi.getPurchaseOrderNoPageByStatus(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
@ -190,6 +192,9 @@ const getList = async () => {
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
if (queryParams.createTime !== "Invalid Date" && queryParams.createTime !== "") {
|
||||
queryParams.createTime = formatDate(queryParams.createTime, 'YYYY-MM-DD')
|
||||
}
|
||||
getList()
|
||||
}
|
||||
|
||||
@ -241,9 +246,13 @@ const handleExport = async () => {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
const setDefaultDate = () => {
|
||||
queryParams.createTime = dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
|
||||
}
|
||||
/** 初始化 **/
|
||||
onMounted(async () => {
|
||||
await getList()
|
||||
setDefaultDate()
|
||||
})
|
||||
</script>
|
||||
|
@ -133,105 +133,105 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 物料信息-非计划 -->
|
||||
<el-card class="hl-card-info" v-if="(formData.purchaseType == 2||formData.purchaseType == 3) && formData.goodsType == 1">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem" disabled>新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subFormRef" :model="formData.matItemDOList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">
|
||||
<el-table :data="formData.matItemDOList" class="hl-table" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column type="index" label="序号" fixed align="center" width="60" />
|
||||
<el-table-column prop="matName" label="物料名称" min-width="200" align="center" />
|
||||
<!-- <el-card class="hl-card-info" v-if="(formData.purchaseType == 2||formData.purchaseType == 3) && formData.goodsType == 1">-->
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem" disabled>新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subFormRef" :model="formData.matItemDOList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">-->
|
||||
<!-- <el-table :data="formData.matItemDOList" class="hl-table" :stripe="true" :show-overflow-tooltip="true">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" width="60" />-->
|
||||
<!-- <el-table-column prop="matName" label="物料名称" min-width="200" align="center" />-->
|
||||
|
||||
<el-table-column prop="matType" label="物料类型" min-width="120" align="center">
|
||||
<!-- <el-table-column prop="matType" label="物料类型" min-width="120" align="center">-->
|
||||
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matSpec" label="规格型号" min-width="100" align="center" />、
|
||||
<el-table-column prop="matRest" label="库存数量" min-width="100" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matSpec" label="规格型号" min-width="100" align="center" />、-->
|
||||
<!-- <el-table-column prop="matRest" label="库存数量" min-width="100" align="center" />-->
|
||||
<!-- <el-table-column prop="purchaseAmount" min-width="180" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subFormRules.purchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" :min="0" :precision="2" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="estimatedPrice" min-width="200" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subFormRules.purchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" :min="0" :precision="2" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="estimatedPrice" min-width="200" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" min-width="200" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="actualPrice" min-width="200" align="center">-->
|
||||
|
||||
<template #header>实际单价</template>
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleActualPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleActualPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="180" align="center">-->
|
||||
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货日期 </template>
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货日期 </template>-->
|
||||
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">
|
||||
<el-date-picker class="!w-265px" v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matId" min-width="200" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>物料编码</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">
|
||||
<MaterialSelect :key="scope.row.matId" v-model="scope.row.matId" disabled @update:new-value="handleSelectedMaterial(scope.$index, $event)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="scope.row.matUnit ? true : false" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" min-width="180" label="备注" align="center">
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">-->
|
||||
<!-- <el-date-picker class="!w-265px" v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matId" min-width="200" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>物料编码</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">-->
|
||||
<!-- <MaterialSelect :key="scope.row.matId" v-model="scope.row.matId" disabled @update:new-value="handleSelectedMaterial(scope.$index, $event)" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="scope.row.matUnit ? true : false" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="description" min-width="180" label="备注" align="center">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.description" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.description" disabled />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)" disabled>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)" disabled>-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 物料信息-计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 1">
|
||||
<el-card class="hl-card-info" >
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>
|
||||
</template>
|
||||
@ -261,7 +261,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matSpec" label="规格/型号" min-width="100" align="center" />
|
||||
<el-table-column prop="requireAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="matRest" label="库存数量" min-width="180" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
|
||||
@ -303,13 +303,13 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="requireArriveTime" label="需求数量到货日期(最早)" min-width="220" align="center">
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatDate(scope.row.requireArriveTime, 'YYYY-MM-DD')
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="requireArriveTime" label="需求数量到货日期(最早)" min-width="220" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{-->
|
||||
<!-- formatDate(scope.row.requireArriveTime, 'YYYY-MM-DD')-->
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">
|
||||
|
||||
<template #default="scope">
|
||||
@ -338,208 +338,208 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 加工件信息-非计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 2 && formData.goodsType == 2">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItem" disabled>新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subBoomFormRef" :model="formData.boomItemDOList" :rules="subBoomFormRules" v-loading="subBoomFormLoading" label-width="0">
|
||||
<el-table :data="formData.boomItemDOList" class="hl-table" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column type="index" label="序号" fixed align="center" width="60" />
|
||||
<el-table-column prop="boomName" min-width="180" label="零件名称" align="center" :rules="subBoomFormRules.boomName">
|
||||
<!-- <el-card class="hl-card-info" v-if="formData.purchaseType == 2 && formData.goodsType == 2">-->
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItem" disabled>新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subBoomFormRef" :model="formData.boomItemDOList" :rules="subBoomFormRules" v-loading="subBoomFormLoading" label-width="0">-->
|
||||
<!-- <el-table :data="formData.boomItemDOList" class="hl-table" :stripe="true" :show-overflow-tooltip="true">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" width="60" />-->
|
||||
<!-- <el-table-column prop="boomName" min-width="180" label="零件名称" align="center" :rules="subBoomFormRules.boomName">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.boomName" class="!w-180px" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomSpec" min-width="100" label="规格型号" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.boomName" class="!w-180px" disabled />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomSpec" min-width="100" label="规格型号" align="center">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.boomSpec" class="!w-180px" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="composition" min-width="180" label="材质" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.boomSpec" class="!w-180px" disabled />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="composition" min-width="180" label="材质" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>材质</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>材质</template>-->
|
||||
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.composition`" :rules="subBoomFormRules.composition" class="mb-0px!">
|
||||
<CompositionSelect v-model="row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomPurchaseAmount" min-width="180" align="center">
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.composition`" :rules="subBoomFormRules.composition" class="mb-0px!">-->
|
||||
<!-- <CompositionSelect v-model="row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomPurchaseAmount" min-width="180" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomPurchaseAmount`" :rules="subFormRules.boomPurchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomPurchaseAmount" placeholder="采购数量" :min="0" :precision="2" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomEstimatedPrice" min-width="200" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomPurchaseAmount`" :rules="subFormRules.boomPurchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomPurchaseAmount" placeholder="采购数量" :min="0" :precision="2" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomEstimatedPrice" min-width="200" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subFormRules.boomEstimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomEstimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomActualPrice" min-width="200" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subFormRules.boomEstimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomEstimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomActualPrice" min-width="200" align="center">-->
|
||||
|
||||
<template #header>实际单价</template>
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomActualPrice" placeholder="实际单价" @change="handleActualPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomActualPrice" placeholder="实际单价" @change="handleActualPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="180" align="center">-->
|
||||
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货时间 </template>
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货时间 </template>-->
|
||||
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.boomArriveTime`" class="mb-0px!">
|
||||
<el-date-picker class="!w-265px" v-model="row.boomArriveTime" type="date" value-format="x" placeholder="预计到货时间" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center" :rules="subBoomFormRules.boomUnit">
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.boomArriveTime`" class="mb-0px!">-->
|
||||
<!-- <el-date-picker class="!w-265px" v-model="row.boomArriveTime" type="date" value-format="x" placeholder="预计到货时间" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center" :rules="subBoomFormRules.boomUnit">-->
|
||||
|
||||
<template #default="scope">
|
||||
<!-- <el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable class="!w-240px" disabled>-->
|
||||
<!-- <el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />-->
|
||||
<!-- </el-select>-->
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.boomUnit" v-if="scope.row.boomUnit ? true : false" />
|
||||
<!-- <template #default="scope">-->
|
||||
<!--<!– <el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable class="!w-240px" disabled>–>-->
|
||||
<!--<!– <el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />–>-->
|
||||
<!--<!– </el-select>–>-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.boomUnit" v-if="scope.row.boomUnit ? true : false" />-->
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomDescription" min-width="180" label="备注" align="center">
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomDescription" min-width="180" label="备注" align="center">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.boomDescription" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.boomDescription" disabled />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" disabled>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" disabled>-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 加工件信息-计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 2">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItemOpen" disabled>新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subBoomPlanFormRef" :model="formData.boomItemDOList" :rules="subBoomPlanFormRules" label-width="0">
|
||||
<el-table :data="formData.boomItemDOList" class="hl-table">
|
||||
<el-table-column type="index" label="序号" fixed align="center" min-width="60" />
|
||||
<el-table-column prop="materialName" fixed label="零件名称" min-width="120" align="center" />
|
||||
<!-- <!– 加工件信息-计划 –>-->
|
||||
<!-- <el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 2">-->
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItemOpen" disabled>新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subBoomPlanFormRef" :model="formData.boomItemDOList" :rules="subBoomPlanFormRules" label-width="0">-->
|
||||
<!-- <el-table :data="formData.boomItemDOList" class="hl-table">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" min-width="60" />-->
|
||||
<!-- <el-table-column prop="materialName" fixed label="零件名称" min-width="120" align="center" />-->
|
||||
|
||||
<!-- <el-table-column prop="boomName" fixed min-width="200" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>零件名称 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomDetailId`" :rules="subMatPlanFormRules.boomDetailId" class="mb-0px!">
|
||||
<MaterialSelect :key="scope.row.boomDetailId" v-model="scope.row.boomDetailId" disabled @update:new-value="handleSelectedBoomMaterial(scope.$index, $event)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="boomSpec" label="规格型号" min-width="120" align="center" />
|
||||
<el-table-column prop="compositionName" min-width="180" label="材质" align="center">
|
||||
<!-- <template #header>材质</template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.composition`" class="mb-0px!">
|
||||
<CompositionSelect v-model="row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subMatPlanFormRules.purchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="estimatedPrice" min-width="200" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" min-width="200" align="center">
|
||||
<template #header>实际单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomArriveDate" label="需求到货日期(最早)" min-width="180" align="center">
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatDate(scope.row.boomArriveDate, 'YYYY-MM-DD')
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180" prop="arriveTime" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货日期 </template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">
|
||||
<el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.boomUnit" v-if="scope.row.boomUnit ? true : false" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" min-width="180" label="备注" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.description" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" disabled>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- <!– <el-table-column prop="boomName" fixed min-width="200" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>零件名称 </template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomDetailId`" :rules="subMatPlanFormRules.boomDetailId" class="mb-0px!">-->
|
||||
<!-- <MaterialSelect :key="scope.row.boomDetailId" v-model="scope.row.boomDetailId" disabled @update:new-value="handleSelectedBoomMaterial(scope.$index, $event)" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column> –>-->
|
||||
<!-- <el-table-column prop="boomSpec" label="规格型号" min-width="120" align="center" />-->
|
||||
<!-- <el-table-column prop="compositionName" min-width="180" label="材质" align="center">-->
|
||||
<!-- <!– <template #header>材质</template>-->
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.composition`" class="mb-0px!">-->
|
||||
<!-- <CompositionSelect v-model="row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template> –>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />-->
|
||||
<!-- <el-table-column prop="purchaseAmount" min-width="180" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subMatPlanFormRules.purchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="estimatedPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="actualPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomArriveDate" label="需求到货日期(最早)" min-width="180" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{-->
|
||||
<!-- formatDate(scope.row.boomArriveDate, 'YYYY-MM-DD')-->
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="180" prop="arriveTime" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货日期 </template>-->
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">-->
|
||||
<!-- <el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.boomUnit" v-if="scope.row.boomUnit ? true : false" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="description" min-width="180" label="备注" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.description" disabled />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" disabled>-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 附件信息 -->
|
||||
<el-card class="hl-card-info">
|
||||
@ -645,8 +645,8 @@ ref="matUploadRef" :file-list="matUploadFiles" multiple :action="uploadUrl" :hea
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import * as MaterialPlanApi from '@/api/heli/materialplan'
|
||||
import * as PurchaseOrderApi from '@/api/heli/purchaseorder'
|
||||
import * as PurchaseOrderMaterialApi from '@/api/heli/purchaseordermaterial'
|
||||
import * as PurchaseOrderNoApi from '@/api/heli/purchaseorderno'
|
||||
import * as PurchaseOrderNoDetailApi from '@/api/heli/purchaseordernodetail'
|
||||
import * as PurchaseOrderBoomApi from '@/api/heli/purchaseorderboom'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import * as MaterialApi from '@/api/heli/material'
|
||||
@ -663,6 +663,7 @@ import CompositionSelect from '@/views/heli/hlvuestyle/compositionSelect.vue'
|
||||
import MaterialDialog from '@/views/heli/purchaseorder/materialDialog.vue'
|
||||
import BoomDialog from '@/views/heli/purchaseorder/boomDialog.vue'
|
||||
import {UploadUserFile} from "element-plus";
|
||||
import {PurchaseOrderNoDetailVO} from "@/api/heli/purchaseordernodetail";
|
||||
|
||||
const reload: any = inject('reload')
|
||||
const { t } = useI18n() // 国际化
|
||||
@ -777,7 +778,7 @@ const uploading = ref(false)
|
||||
|
||||
const matUploadFiles = ref<UploadUserFile[]>([])
|
||||
const matUploadData = ref({
|
||||
businessType: 'PURCHASEORDER',
|
||||
businessType: 'PURCHASEORDERNO',
|
||||
businessId: formData.value.id,
|
||||
businessFileType: 'MATERIAL'
|
||||
})
|
||||
@ -957,14 +958,14 @@ const saveMaterials = async () => {
|
||||
subData.materialId = item.matId
|
||||
subData.purchaseOrderId = formData.value.id
|
||||
if (subData.id == undefined) {
|
||||
subData.id = await PurchaseOrderMaterialApi.createPurchaseOrderMaterial(subData)
|
||||
subData.id = await PurchaseOrderNoDetailApi.createPurchaseOrderNoDetail(subData)
|
||||
} else {
|
||||
await PurchaseOrderMaterialApi.updatePurchaseOrderMaterial(subData)
|
||||
await PurchaseOrderNoDetailApi.updatePurchaseOrderNoDetail(subData)
|
||||
}
|
||||
})
|
||||
formData.value.matItemRemoveList.forEach(async (item) => {
|
||||
if (item.id != undefined) {
|
||||
await PurchaseOrderMaterialApi.deletePurchaseOrderMaterial(item.id)
|
||||
await PurchaseOrderNoDetailApi.deletePurchaseOrderNoDetail(item.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -1039,13 +1040,13 @@ const saveForm = async (active) => {
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as PurchaseOrderApi.PurchaseOrderVO
|
||||
const data = formData.value as unknown as PurchaseOrderNoApi.PurchaseOrderNoVO
|
||||
if(active == 4){
|
||||
data.receivingStatus = 1;
|
||||
}
|
||||
data.status = active
|
||||
//data.auditor = useUserStore().getUser.id
|
||||
await PurchaseOrderApi.updatePurchaseOrder(data)
|
||||
await PurchaseOrderNoApi.updatePurchaseOrderNo(data)
|
||||
message.success('已' + (active == 2 ? '审核' : '打回'))
|
||||
isShow.value = false
|
||||
} finally {
|
||||
@ -1106,11 +1107,10 @@ const queryParams = reactive({
|
||||
// 页面数据加载初始化
|
||||
onMounted(async () => {
|
||||
// 获取采购订单信息
|
||||
formData.value = await PurchaseOrderApi.getPurchaseOrder(query.id)
|
||||
formData.value = await PurchaseOrderNoApi.getPurchaseOrderNo(query.id)
|
||||
|
||||
// 获取物料需求计划编号
|
||||
if (
|
||||
formData.value.purchaseType == 1 &&
|
||||
formData.value.projectMaterialPlanId != undefined &&
|
||||
formData.value.projectMaterialPlanId != ''
|
||||
) {
|
||||
@ -1123,7 +1123,7 @@ onMounted(async () => {
|
||||
|
||||
// 获取物料需求计划的物料列表
|
||||
formData.value.matItemDOList = (
|
||||
await PurchaseOrderMaterialApi.getPurchaseOrderMaterialPage(queryParams)
|
||||
await PurchaseOrderNoDetailApi.getPurchaseOrderNoDetailPage(queryParams)
|
||||
).list
|
||||
formData.value.matItemDOList.forEach((item) => {
|
||||
matList.value.push({ id: item.materialId, code: item.matCode })
|
||||
@ -1174,7 +1174,7 @@ formData.value.boomItemDOList.forEach((item) => {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
businessId: query.id,
|
||||
businessType: 'PURCHASEORDER'
|
||||
businessType: 'PURCHASEORDERNO'
|
||||
}
|
||||
formData.value.attachments = (await getFilePage(attParams)).list
|
||||
|
||||
|
@ -135,110 +135,110 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 物料信息-非计划 -->
|
||||
<el-card class="hl-card-info" v-if="(formData.purchaseType == 2||formData.purchaseType == 3) && formData.goodsType == 1">
|
||||
<!-- <el-card class="hl-card-info" v-if="(formData.purchaseType == 2||formData.purchaseType == 3) && formData.goodsType == 1">-->
|
||||
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem" disabled>新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subFormRef" :model="formData.matItemDOList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">
|
||||
<el-table :data="formData.matItemDOList" class="hl-table">
|
||||
<el-table-column type="index" label="序号" fixed align="center" width="60" />
|
||||
<!-- <el-table-column prop="matId" fixed min-width="200" align="center">
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem" disabled>新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subFormRef" :model="formData.matItemDOList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">-->
|
||||
<!-- <el-table :data="formData.matItemDOList" class="hl-table">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" width="60" />-->
|
||||
<!-- <!– <el-table-column prop="matId" fixed min-width="200" align="center">-->
|
||||
|
||||
<template #header> <span class="hl-table_header">*</span>物料编码/名称 </template>
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>物料编码/名称 </template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">
|
||||
<MaterialSelect :key="scope.row.matId" v-model="scope.row.matId" v-bind:disabled="formData.status == 2 || formData.status == 3" @update:newValue="handleSelectedMaterial(scope.$index, $event)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column prop="matName" label="物料名称" min-width="120" align="center" /> -->
|
||||
<el-table-column prop="matName" label="物料名称" min-width="200" align="center" />
|
||||
<el-table-column prop="matType" label="物料类型" min-width="120" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="matSpec" label="规格型号" min-width="120" align="center" />
|
||||
<el-table-column prop="matRest" label="库存数量" min-width="100" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subFormRules.purchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="estimatedPrice" min-width="200" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" min-width="200" align="center">
|
||||
<template #header>实际单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货日期 </template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">
|
||||
<el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matId" min-width="220" align="center" >
|
||||
<template #header> <span class="hl-table_header">*</span> 物料编码</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">
|
||||
<!-- <MaterialSelect v-model="scope.row.matId"
|
||||
@update:newValue="handleSelectedMaterial(scope.$index, $event)"
|
||||
v-bind:disabled="ctrView || ctrSave" /> -->
|
||||
<el-input class="!w-265px" placeholder="物料编码" disabled v-model="scope.row.matCode" readonly>
|
||||
<!-- <template #append ><el-button @click="onAddItem" > <Icon icon="ep:search" class="mr-5px" /> </el-button></template> -->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="scope.row.matUnit ? true : false" />-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" min-width="180" label="备注" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.description" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)" disabled>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">-->
|
||||
<!-- <MaterialSelect :key="scope.row.matId" v-model="scope.row.matId" v-bind:disabled="formData.status == 2 || formData.status == 3" @update:newValue="handleSelectedMaterial(scope.$index, $event)" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column> –>-->
|
||||
<!-- <!– <el-table-column prop="matName" label="物料名称" min-width="120" align="center" /> –>-->
|
||||
<!-- <el-table-column prop="matName" label="物料名称" min-width="200" align="center" />-->
|
||||
<!-- <el-table-column prop="matType" label="物料类型" min-width="120" align="center">-->
|
||||
<!-- <!– <template #default="scope">–>-->
|
||||
<!-- <!– <dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matSpec" label="规格型号" min-width="120" align="center" />-->
|
||||
<!-- <el-table-column prop="matRest" label="库存数量" min-width="100" align="center" />-->
|
||||
<!-- <el-table-column prop="purchaseAmount" min-width="180" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subFormRules.purchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="estimatedPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="actualPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="180" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货日期 </template>-->
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">-->
|
||||
<!-- <el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matId" min-width="220" align="center" >-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span> 物料编码</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">-->
|
||||
<!-- <!– <MaterialSelect v-model="scope.row.matId"-->
|
||||
<!-- @update:newValue="handleSelectedMaterial(scope.$index, $event)"-->
|
||||
<!-- v-bind:disabled="ctrView || ctrSave" /> –>-->
|
||||
<!-- <el-input class="!w-265px" placeholder="物料编码" disabled v-model="scope.row.matCode" readonly>-->
|
||||
<!-- <!– <template #append ><el-button @click="onAddItem" > <Icon icon="ep:search" class="mr-5px" /> </el-button></template> –>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">-->
|
||||
<!-- <!– <template #default="scope">–>-->
|
||||
<!-- <!– <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="scope.row.matUnit ? true : false" />–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="description" min-width="180" label="备注" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.description" disabled />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)" disabled>-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 物料信息-计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 1">
|
||||
<el-card class="hl-card-info" >
|
||||
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>
|
||||
@ -268,7 +268,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matSpec" label="规格/型号" min-width="120" align="center" />
|
||||
<el-table-column prop="requireAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="matRest" label="库存数量" min-width="100" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
@ -309,13 +309,13 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="requireArriveTime" label="需求到货日期(最早)" min-width="200" align="center">
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatDate(scope.row.requireArriveTime, 'YYYY-MM-DD')
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="requireArriveTime" label="需求到货日期(最早)" min-width="200" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{-->
|
||||
<!-- formatDate(scope.row.requireArriveTime, 'YYYY-MM-DD')-->
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="typeof scope.row.matUnit === 'number'"/>
|
||||
@ -343,208 +343,208 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 加工件信息-非计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 2 && formData.goodsType == 2">
|
||||
<!-- <el-card class="hl-card-info" v-if="formData.purchaseType == 2 && formData.goodsType == 2">-->
|
||||
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItem" disabled>新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subBoomFormRef" :model="formData.boomItemDOList" :rules="subBoomFormRules" v-loading="subBoomFormLoading" label-width="0">
|
||||
<el-table :data="formData.boomItemDOList" class="hl-table" :stripe="true">
|
||||
<el-table-column type="index" label="序号" fixed align="center" min-width="60" />
|
||||
<el-table-column prop="boomName" min-width="180" label="零件名称" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>零件名称</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomName`" class="mb-0px!" :rules="subBoomFormRules.boomName">
|
||||
<el-input v-model="scope.row.boomName" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomSpec" min-width="120" label="规格型号" align="center">
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItem" disabled>新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subBoomFormRef" :model="formData.boomItemDOList" :rules="subBoomFormRules" v-loading="subBoomFormLoading" label-width="0">-->
|
||||
<!-- <el-table :data="formData.boomItemDOList" class="hl-table" :stripe="true">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" min-width="60" />-->
|
||||
<!-- <el-table-column prop="boomName" min-width="180" label="零件名称" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>零件名称</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomName`" class="mb-0px!" :rules="subBoomFormRules.boomName">-->
|
||||
<!-- <el-input v-model="scope.row.boomName" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomSpec" min-width="120" label="规格型号" align="center">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.boomSpec" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="composition" min-width="180" label="材质" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>材质</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.composition`" :rules="subBoomFormRules.composition" class="mb-0px!">
|
||||
<CompositionSelect v-model="scope.row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomPurchaseAmount" min-width="180" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.boomSpec" disabled />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="composition" min-width="180" label="材质" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>材质</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.composition`" :rules="subBoomFormRules.composition" class="mb-0px!">-->
|
||||
<!-- <CompositionSelect v-model="scope.row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomPurchaseAmount" min-width="180" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomPurchaseAmount`" :rules="subBoomFormRules.boomPurchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomPurchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomEstimatedPrice" min-width="200" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomPurchaseAmount`" :rules="subBoomFormRules.boomPurchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomPurchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomEstimatedPrice" min-width="200" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subBoomFormRules.boomEstimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomEstimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomActualPrice" min-width="200" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subBoomFormRules.boomEstimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomEstimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomActualPrice" min-width="200" align="center">-->
|
||||
|
||||
<template #header>实际单价</template>
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomActualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货时间 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomArriveTime`" :rules="subBoomFormRules.boomArriveTime" class="mb-0px!" >
|
||||
<el-date-picker v-model="scope.row.boomArriveTime" type="date" value-format="x" placeholder="预计到货时间" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable disabled>
|
||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomDescription" min-width="180" label="备注" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomActualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="180" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货时间 </template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomArriveTime`" :rules="subBoomFormRules.boomArriveTime" class="mb-0px!" >-->
|
||||
<!-- <el-date-picker v-model="scope.row.boomArriveTime" type="date" value-format="x" placeholder="预计到货时间" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable disabled>-->
|
||||
<!-- <el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomDescription" min-width="180" label="备注" align="center">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.boomDescription" disabled/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.boomDescription" disabled/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" disabled>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" disabled>-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 加工件信息-计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 2">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItemOpen" disabled>新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subBoomPlanFormRef" :model="formData.boomItemDOList" :rules="subBoomPlanFormRules" label-width="0">
|
||||
<el-table :data="formData.boomItemDOList" class="hl-table">
|
||||
<el-table-column type="index" label="序号" fixed align="center" min-width="60" />
|
||||
<el-table-column prop="materialName" fixed label="零件名称" min-width="120" align="center" />
|
||||
<!-- <!– 加工件信息-计划 –>-->
|
||||
<!-- <el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 2">-->
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItemOpen" disabled>新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subBoomPlanFormRef" :model="formData.boomItemDOList" :rules="subBoomPlanFormRules" label-width="0">-->
|
||||
<!-- <el-table :data="formData.boomItemDOList" class="hl-table">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" min-width="60" />-->
|
||||
<!-- <el-table-column prop="materialName" fixed label="零件名称" min-width="120" align="center" />-->
|
||||
|
||||
<!-- <el-table-column prop="boomName" fixed min-width="200" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>零件名称 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomDetailId`" :rules="subMatPlanFormRules.boomDetailId" class="mb-0px!">
|
||||
<MaterialSelect :key="scope.row.boomDetailId" v-model="scope.row.boomDetailId" disabled @update:new-value="handleSelectedBoomMaterial(scope.$index, $event)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="boomSpec" label="规格型号" min-width="120" align="center" />
|
||||
<el-table-column prop="compositionName" min-width="180" label="材质" align="center">
|
||||
<!-- <template #header>材质</template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.composition`" class="mb-0px!">
|
||||
<CompositionSelect v-model="row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subMatPlanFormRules.purchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="estimatedPrice" min-width="200" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" min-width="200" align="center">
|
||||
<template #header>实际单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="200" prop="arriveTime" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货日期</template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">
|
||||
<el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomArriveDate" label="需求到货日期(最早)" min-width="200" align="center">
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatDate(scope.row.boomArriveDate, 'YYYY-MM-DD')
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <!– <el-table-column prop="boomName" fixed min-width="200" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>零件名称 </template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomDetailId`" :rules="subMatPlanFormRules.boomDetailId" class="mb-0px!">-->
|
||||
<!-- <MaterialSelect :key="scope.row.boomDetailId" v-model="scope.row.boomDetailId" disabled @update:new-value="handleSelectedBoomMaterial(scope.$index, $event)" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column> –>-->
|
||||
<!-- <el-table-column prop="boomSpec" label="规格型号" min-width="120" align="center" />-->
|
||||
<!-- <el-table-column prop="compositionName" min-width="180" label="材质" align="center">-->
|
||||
<!-- <!– <template #header>材质</template>-->
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.composition`" class="mb-0px!">-->
|
||||
<!-- <CompositionSelect v-model="row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template> –>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />-->
|
||||
<!-- <el-table-column prop="purchaseAmount" min-width="180" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subMatPlanFormRules.purchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="estimatedPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="actualPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="200" prop="arriveTime" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货日期</template>-->
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">-->
|
||||
<!-- <el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" disabled />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomArriveDate" label="需求到货日期(最早)" min-width="200" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{-->
|
||||
<!-- formatDate(scope.row.boomArriveDate, 'YYYY-MM-DD')-->
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">
|
||||
<template #default="scope">
|
||||
<!-- <el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable :disabled="formData.status == 2 || formData.status == 3">-->
|
||||
<!-- <el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />-->
|
||||
<!-- </el-select>-->
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.boomUnit" v-if="scope.row.boomUnit ? true : false" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" min-width="180" label="备注" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.description" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" disabled>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- <el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <!– <el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable :disabled="formData.status == 2 || formData.status == 3">–>-->
|
||||
<!-- <!– <el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />–>-->
|
||||
<!-- <!– </el-select>–>-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.boomUnit" v-if="scope.row.boomUnit ? true : false" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="description" min-width="180" label="备注" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.description" disabled />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" disabled>-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 附件信息 -->
|
||||
<el-card class="hl-card-info">
|
||||
@ -665,6 +665,8 @@ import CompositionSelect from '@/views/heli/hlvuestyle/compositionSelect.vue'
|
||||
|
||||
|
||||
import SupplierSelect from '@/views/heli/hlvuestyle/supplierSelect.vue'
|
||||
import * as PurchaseOrderNoApi from "@/api/heli/purchaseorderno";
|
||||
import * as PurchaseOrderNoDetailApi from "@/api/heli/purchaseordernodetail";
|
||||
const reload: any = inject('reload')
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
@ -820,7 +822,7 @@ const uploading = ref(false)
|
||||
|
||||
const matUploadFiles = ref<UploadUserFile[]>([])
|
||||
const matUploadData = ref({
|
||||
businessType: 'PURCHASEORDER',
|
||||
businessType: 'PURCHASEORDERNO',
|
||||
businessId: formData.value.id,
|
||||
businessFileType: 'MATERIAL'
|
||||
})
|
||||
@ -1220,11 +1222,10 @@ const matSimpList = ref([]) // 物料基本信息列表
|
||||
// 页面数据加载初始化
|
||||
onMounted(async () => {
|
||||
// 获取采购订单信息
|
||||
formData.value = await PurchaseOrderApi.getPurchaseOrder(query.id)
|
||||
formData.value = await PurchaseOrderNoApi.getPurchaseOrderNo(query.id)
|
||||
|
||||
// 获取物料需求计划编号
|
||||
if (
|
||||
formData.value.purchaseType == 1 &&
|
||||
formData.value.projectMaterialPlanId != undefined &&
|
||||
formData.value.projectMaterialPlanId != ''
|
||||
) {
|
||||
@ -1237,14 +1238,14 @@ onMounted(async () => {
|
||||
|
||||
// 获取物料需求计划的物料列表
|
||||
formData.value.matItemDOList = (
|
||||
await PurchaseOrderMaterialApi.getPurchaseOrderMaterialPage(queryParams)
|
||||
await PurchaseOrderNoDetailApi.getPurchaseOrderNoDetailPage(queryParams)
|
||||
).list
|
||||
var matTypes = getIntDictOptions(DICT_TYPE.HELI_MATERIAL_TYPE)
|
||||
var matUnits = getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)
|
||||
formData.value.matItemDOList.forEach((item) => {
|
||||
matList.value.push({ id: item.materialId, code: item.matCode })
|
||||
item.matType = matTypes.find( op => op.value == matSimpList.value.find((record) => record.id === item.materialId)?.material_type)?.label
|
||||
item.matUnit = matUnits.find( op => op.value == matSimpList.value.find((record) => record.id === item.materialId)?.unit)?.label
|
||||
// item.matType = matTypes.find( op => op.value == matSimpList.value.find((record) => record.id === item.materialId)?.material_type)?.label
|
||||
// item.matUnit = matUnits.find( op => op.value == matSimpList.value.find((record) => record.id === item.materialId)?.unit)?.label
|
||||
})
|
||||
formData.value.matItemRemoveList = []
|
||||
formData.value.boomItemRemoveList = []
|
||||
@ -1292,7 +1293,7 @@ onMounted(async () => {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
businessId: query.id,
|
||||
businessType: 'PURCHASEORDER'
|
||||
businessType: 'PURCHASEORDERNO'
|
||||
}
|
||||
formData.value.attachments = (await getFilePage(attParams)).list
|
||||
|
||||
|
@ -135,110 +135,110 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 物料信息-非计划 -->
|
||||
<el-card class="hl-card-info" v-if="(formData.purchaseType == 2||formData.purchaseType == 3) && formData.goodsType == 1">
|
||||
<!-- <el-card class="hl-card-info" v-if="(formData.purchaseType == 2||formData.purchaseType == 3) && formData.goodsType == 1">-->
|
||||
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem" :disabled="formData.status == 2 || formData.status == 3">新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subFormRef" :model="formData.matItemDOList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">
|
||||
<el-table :data="formData.matItemDOList" class="hl-table">
|
||||
<el-table-column type="index" label="序号" fixed align="center" width="60" />
|
||||
<!-- <el-table-column prop="matId" fixed min-width="200" align="center">
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem" :disabled="formData.status == 2 || formData.status == 3">新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subFormRef" :model="formData.matItemDOList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">-->
|
||||
<!-- <el-table :data="formData.matItemDOList" class="hl-table">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" width="60" />-->
|
||||
<!-- <!– <el-table-column prop="matId" fixed min-width="200" align="center">-->
|
||||
|
||||
<template #header> <span class="hl-table_header">*</span>物料编码/名称 </template>
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>物料编码/名称 </template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">
|
||||
<MaterialSelect :key="scope.row.matId" v-model="scope.row.matId" v-bind:disabled="formData.status == 2 || formData.status == 3" @update:newValue="handleSelectedMaterial(scope.$index, $event)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column prop="matName" label="物料名称" min-width="120" align="center" /> -->
|
||||
<el-table-column prop="matName" label="物料名称" min-width="200" align="center" />
|
||||
<el-table-column prop="matType" label="物料类型" min-width="120" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">-->
|
||||
<!-- <MaterialSelect :key="scope.row.matId" v-model="scope.row.matId" v-bind:disabled="formData.status == 2 || formData.status == 3" @update:newValue="handleSelectedMaterial(scope.$index, $event)" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="matSpec" label="规格型号" min-width="120" align="center" />
|
||||
<el-table-column prop="matRest" label="库存数量" min-width="100" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subFormRules.purchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="estimatedPrice" min-width="200" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" min-width="200" align="center">
|
||||
<template #header>实际单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货日期 </template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">
|
||||
<el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matId" min-width="220" align="center" >
|
||||
<template #header> <span class="hl-table_header">*</span> 物料编码</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">
|
||||
<!-- <MaterialSelect v-model="scope.row.matId"
|
||||
@update:newValue="handleSelectedMaterial(scope.$index, $event)"
|
||||
v-bind:disabled="ctrView || ctrSave" /> -->
|
||||
<el-input class="!w-265px" placeholder="物料编码" :disabled="true || formData.status == 2 || formData.status == 3" v-model="scope.row.matCode" readonly>
|
||||
<!-- <template #append ><el-button @click="onAddItem" > <Icon icon="ep:search" class="mr-5px" /> </el-button></template> -->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="scope.row.matUnit ? true : false" />-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" min-width="180" label="备注" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.description" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)" :disabled="formData.status == 2 || formData.status == 3">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- </el-table-column> –>-->
|
||||
<!-- <!– <el-table-column prop="matName" label="物料名称" min-width="120" align="center" /> –>-->
|
||||
<!-- <el-table-column prop="matName" label="物料名称" min-width="200" align="center" />-->
|
||||
<!-- <el-table-column prop="matType" label="物料类型" min-width="120" align="center">-->
|
||||
<!--<!– <template #default="scope">–>-->
|
||||
<!--<!– <dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />–>-->
|
||||
<!--<!– </template>–>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matSpec" label="规格型号" min-width="120" align="center" />-->
|
||||
<!-- <el-table-column prop="matRest" label="库存数量" min-width="100" align="center" />-->
|
||||
<!-- <el-table-column prop="purchaseAmount" min-width="180" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subFormRules.purchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="estimatedPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="actualPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="180" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货日期 </template>-->
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">-->
|
||||
<!-- <el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matId" min-width="220" align="center" >-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span> 物料编码</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">-->
|
||||
<!-- <!– <MaterialSelect v-model="scope.row.matId"-->
|
||||
<!-- @update:newValue="handleSelectedMaterial(scope.$index, $event)"-->
|
||||
<!-- v-bind:disabled="ctrView || ctrSave" /> –>-->
|
||||
<!-- <el-input class="!w-265px" placeholder="物料编码" :disabled="true || formData.status == 2 || formData.status == 3" v-model="scope.row.matCode" readonly>-->
|
||||
<!-- <!– <template #append ><el-button @click="onAddItem" > <Icon icon="ep:search" class="mr-5px" /> </el-button></template> –>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">-->
|
||||
<!-- <!– <template #default="scope">–>-->
|
||||
<!-- <!– <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="scope.row.matUnit ? true : false" />–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="description" min-width="180" label="备注" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.description" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)" :disabled="formData.status == 2 || formData.status == 3">-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 物料信息-计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 1">
|
||||
<el-card class="hl-card-info">
|
||||
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>
|
||||
@ -264,11 +264,11 @@
|
||||
<el-table-column prop="matType" label="物料类型" min-width="120" align="center">
|
||||
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="typeof scope.row.matUnit === 'number'"/>
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matSpec" label="规格/型号" min-width="120" align="center" />
|
||||
<el-table-column prop="requireAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="matRest" label="库存数量" min-width="100" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
@ -309,16 +309,16 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="requireArriveTime" label="需求到货日期(最早)" min-width="200" align="center">
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatDate(scope.row.requireArriveTime, 'YYYY-MM-DD')
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="requireArriveTime" label="需求到货日期(最早)" min-width="200" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{-->
|
||||
<!-- formatDate(scope.row.requireArriveTime, 'YYYY-MM-DD')-->
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="matUnit" label="系统单位" min-width="100" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="typeof scope.row.matUnit === 'number'"/>
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" min-width="180" label="备注" align="center">
|
||||
@ -343,208 +343,208 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 加工件信息-非计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 2 && formData.goodsType == 2">
|
||||
<!-- <el-card class="hl-card-info" v-if="formData.purchaseType == 2 && formData.goodsType == 2">-->
|
||||
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItem" :disabled="formData.status == 2 || formData.status == 3">新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subBoomFormRef" :model="formData.boomItemDOList" :rules="subBoomFormRules" v-loading="subBoomFormLoading" label-width="0">
|
||||
<el-table :data="formData.boomItemDOList" class="hl-table" :stripe="true">
|
||||
<el-table-column type="index" label="序号" fixed align="center" min-width="60" />
|
||||
<el-table-column prop="boomName" min-width="180" label="零件名称" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>零件名称</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomName`" class="mb-0px!" :rules="subBoomFormRules.boomName">
|
||||
<el-input v-model="scope.row.boomName" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomSpec" min-width="120" label="规格型号" align="center">
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItem" :disabled="formData.status == 2 || formData.status == 3">新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subBoomFormRef" :model="formData.boomItemDOList" :rules="subBoomFormRules" v-loading="subBoomFormLoading" label-width="0">-->
|
||||
<!-- <el-table :data="formData.boomItemDOList" class="hl-table" :stripe="true">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" min-width="60" />-->
|
||||
<!-- <el-table-column prop="boomName" min-width="180" label="零件名称" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>零件名称</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomName`" class="mb-0px!" :rules="subBoomFormRules.boomName">-->
|
||||
<!-- <el-input v-model="scope.row.boomName" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomSpec" min-width="120" label="规格型号" align="center">-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.boomSpec" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="composition" min-width="180" label="材质" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>材质</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.composition`" :rules="subBoomFormRules.composition" class="mb-0px!">
|
||||
<CompositionSelect v-model="scope.row.composition" :disabled="formData.status == 2 || formData.status == 3" @update:new-value="(val) => { row.composition = val.id; }" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomPurchaseAmount" min-width="180" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.boomSpec" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="composition" min-width="180" label="材质" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>材质</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.composition`" :rules="subBoomFormRules.composition" class="mb-0px!">-->
|
||||
<!-- <CompositionSelect v-model="scope.row.composition" :disabled="formData.status == 2 || formData.status == 3" @update:new-value="(val) => { row.composition = val.id; }" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomPurchaseAmount" min-width="180" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomPurchaseAmount`" :rules="subBoomFormRules.boomPurchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomPurchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomEstimatedPrice" min-width="200" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomPurchaseAmount`" :rules="subBoomFormRules.boomPurchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomPurchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomEstimatedPrice" min-width="200" align="center">-->
|
||||
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subBoomFormRules.boomEstimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomEstimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomActualPrice" min-width="200" align="center">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subBoomFormRules.boomEstimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomEstimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomActualPrice" min-width="200" align="center">-->
|
||||
|
||||
<template #header>实际单价</template>
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.boomActualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货时间 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomArriveTime`" :rules="subBoomFormRules.boomArriveTime" class="mb-0px!" >
|
||||
<el-date-picker v-model="scope.row.boomArriveTime" type="date" value-format="x" placeholder="预计到货时间" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable :disabled="formData.status == 2 || formData.status == 3">
|
||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomDescription" min-width="180" label="备注" align="center">
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.boomDescription" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" :disabled="formData.status == 2 || formData.status == 3">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<!-- 加工件信息-计划 -->
|
||||
<el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 2">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItemOpen" :disabled="formData.status == 2 || formData.status == 3">新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="subBoomPlanFormRef" :model="formData.boomItemDOList" :rules="subBoomPlanFormRules" label-width="0">
|
||||
<el-table :data="formData.boomItemDOList" class="hl-table">
|
||||
<el-table-column type="index" label="序号" fixed align="center" min-width="60" />
|
||||
<el-table-column prop="materialName" fixed label="零件名称" min-width="120" align="center" />
|
||||
|
||||
<!-- <el-table-column prop="boomName" fixed min-width="200" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>零件名称 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.boomDetailId`" :rules="subMatPlanFormRules.boomDetailId" class="mb-0px!">
|
||||
<MaterialSelect :key="scope.row.boomDetailId" v-model="scope.row.boomDetailId" disabled @update:new-value="handleSelectedBoomMaterial(scope.$index, $event)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="boomSpec" label="规格型号" min-width="120" align="center" />
|
||||
<el-table-column prop="compositionName" min-width="180" label="材质" align="center">
|
||||
<!-- <template #header>材质</template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.composition`" class="mb-0px!">
|
||||
<CompositionSelect v-model="row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />
|
||||
<el-table-column prop="purchaseAmount" min-width="180" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>采购数量</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subMatPlanFormRules.purchaseAmount" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="estimatedPrice" min-width="200" align="center">
|
||||
<template #header><span class="hl-table_header">*</span>暂估单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" min-width="200" align="center">
|
||||
<template #header>实际单价</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">
|
||||
<el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="200" prop="arriveTime" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>预计到货日期</template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">
|
||||
<el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomArriveDate" label="需求到货日期(最早)" min-width="200" align="center">
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatDate(scope.row.boomArriveDate, 'YYYY-MM-DD')
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">
|
||||
<template #default="scope">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.boomActualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="180" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货时间 </template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomArriveTime`" :rules="subBoomFormRules.boomArriveTime" class="mb-0px!" >-->
|
||||
<!-- <el-date-picker v-model="scope.row.boomArriveTime" type="date" value-format="x" placeholder="预计到货时间" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable :disabled="formData.status == 2 || formData.status == 3">-->
|
||||
<!-- <el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />-->
|
||||
<!-- </el-select>-->
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.boomUnit" v-if="scope.row.boomUnit ? true : false" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" min-width="180" label="备注" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.description" :disabled="formData.status == 2 || formData.status == 3" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" :disabled="formData.status == 2 || formData.status == 3">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomDescription" min-width="180" label="备注" align="center">-->
|
||||
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.boomDescription" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" :disabled="formData.status == 2 || formData.status == 3">-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- <!– 加工件信息-计划 –>-->
|
||||
<!-- <el-card class="hl-card-info" v-if="formData.purchaseType == 1 && formData.goodsType == 2">-->
|
||||
<!-- <template #header>-->
|
||||
<!-- <div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购明细</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-card class="hl-incard">-->
|
||||
<!-- <el-col>-->
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onBoomAddItemOpen" :disabled="formData.status == 2 || formData.status == 3">新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-form ref="subBoomPlanFormRef" :model="formData.boomItemDOList" :rules="subBoomPlanFormRules" label-width="0">-->
|
||||
<!-- <el-table :data="formData.boomItemDOList" class="hl-table">-->
|
||||
<!-- <el-table-column type="index" label="序号" fixed align="center" min-width="60" />-->
|
||||
<!-- <el-table-column prop="materialName" fixed label="零件名称" min-width="120" align="center" />-->
|
||||
|
||||
<!-- <!– <el-table-column prop="boomName" fixed min-width="200" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>零件名称 </template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.boomDetailId`" :rules="subMatPlanFormRules.boomDetailId" class="mb-0px!">-->
|
||||
<!-- <MaterialSelect :key="scope.row.boomDetailId" v-model="scope.row.boomDetailId" disabled @update:new-value="handleSelectedBoomMaterial(scope.$index, $event)" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column> –>-->
|
||||
<!-- <el-table-column prop="boomSpec" label="规格型号" min-width="120" align="center" />-->
|
||||
<!-- <el-table-column prop="compositionName" min-width="180" label="材质" align="center">-->
|
||||
<!-- <!– <template #header>材质</template>-->
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.composition`" class="mb-0px!">-->
|
||||
<!-- <CompositionSelect v-model="row.composition" disabled @update:new-value="(val) => { row.composition = val.id; }" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template> –>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomAmount" label="需求数量" min-width="100" align="center" />-->
|
||||
<!-- <el-table-column prop="purchaseAmount" min-width="180" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>采购数量</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.purchaseAmount`" :rules="subMatPlanFormRules.purchaseAmount" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.purchaseAmount" placeholder="采购数量" @change="handleEstimatedPrice" :min="0" :precision="2" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="estimatedPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header><span class="hl-table_header">*</span>暂估单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="actualPrice" min-width="200" align="center">-->
|
||||
<!-- <template #header>实际单价</template>-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!">-->
|
||||
<!-- <el-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column min-width="200" prop="arriveTime" align="center">-->
|
||||
<!-- <template #header> <span class="hl-table_header">*</span>预计到货日期</template>-->
|
||||
<!-- <template #default="{ row, $index }">-->
|
||||
<!-- <el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!">-->
|
||||
<!-- <el-date-picker v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="boomArriveDate" label="需求到货日期(最早)" min-width="200" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{-->
|
||||
<!-- formatDate(scope.row.boomArriveDate, 'YYYY-MM-DD')-->
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column prop="boomUnit" label="系统单位" min-width="100" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!--<!– <el-select v-model="scope.row.boomUnit" placeholder="下拉选择" clearable :disabled="formData.status == 2 || formData.status == 3">–>-->
|
||||
<!--<!– <el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />–>-->
|
||||
<!--<!– </el-select>–>-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.boomUnit" v-if="scope.row.boomUnit ? true : false" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="description" min-width="180" label="备注" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.description" :disabled="formData.status == 2 || formData.status == 3" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" min-width="100">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button link type="danger" size="small" @click.prevent="handleDeleteBoom(scope.$index)" :disabled="formData.status == 2 || formData.status == 3">-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 附件信息 -->
|
||||
<el-card class="hl-card-info">
|
||||
@ -657,6 +657,8 @@ ref="matUploadRef" :file-list="matUploadFiles" multiple :action="uploadUrl" :hea
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import * as MaterialPlanApi from '@/api/heli/materialplan'
|
||||
import * as PurchaseOrderApi from '@/api/heli/purchaseorder'
|
||||
import * as PurchaseOrderNoApi from '@/api/heli/purchaseorderno'
|
||||
import * as PurchaseOrderNoDetailApi from '@/api/heli/purchaseordernodetail'
|
||||
import * as PurchaseOrderMaterialApi from '@/api/heli/purchaseordermaterial'
|
||||
import * as PurchaseOrderBoomApi from '@/api/heli/purchaseorderboom'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
@ -676,6 +678,10 @@ import MaterialDialog from '@/views/heli/purchaseorder/materialDialog.vue'
|
||||
import BoomDialog from '@/views/heli/purchaseorder/boomDialog.vue'
|
||||
import SupplierSelect from '@/views/heli/hlvuestyle/supplierSelect.vue'
|
||||
import {setFlagsFromString} from "node:v8";
|
||||
import {
|
||||
createPurchaseOrderNoDetail, deletePurchaseOrderNoDetail,
|
||||
PurchaseOrderNoDetailVO, updatePurchaseOrderNoDetail
|
||||
} from "@/api/heli/purchaseordernodetail";
|
||||
|
||||
const reload: any = inject('reload')
|
||||
const { t } = useI18n() // 国际化
|
||||
@ -755,14 +761,15 @@ const matOpenFormRef = ref()
|
||||
// })
|
||||
// }
|
||||
const handleSelectedMaterialPlanMat = (arr) => {
|
||||
console.log(arr)
|
||||
// 创建一个 Set 来存储现有的 matId
|
||||
debugger
|
||||
const existingMatIds = new Set(formData.value.matItemDOList.map(vo => vo.matId));
|
||||
arr.forEach((item) => {
|
||||
if (!existingMatIds.has(item.matId)) {
|
||||
item.description = '';
|
||||
item.matType=Number(item.matType)
|
||||
item.matUnit=Number(item.matUnit)
|
||||
console.log(item)
|
||||
formData.value.matItemDOList.push(item);
|
||||
existingMatIds.add(item.matId); // 将新添加的 matId 加入 Set
|
||||
}
|
||||
@ -832,7 +839,7 @@ const uploading = ref(false)
|
||||
|
||||
const matUploadFiles = ref<UploadUserFile[]>([])
|
||||
const matUploadData = ref({
|
||||
businessType: 'PURCHASEORDER',
|
||||
businessType: 'PURCHASEORDERNO',
|
||||
businessId: formData.value.id,
|
||||
businessFileType: 'MATERIAL'
|
||||
})
|
||||
@ -1022,14 +1029,14 @@ const saveMaterials = async () => {
|
||||
subData.materialId = item.matId
|
||||
subData.purchaseOrderId = formData.value.id
|
||||
if (subData.id == undefined) {
|
||||
subData.id = await PurchaseOrderMaterialApi.createPurchaseOrderMaterial(subData)
|
||||
subData.id = await PurchaseOrderNoDetailApi.createPurchaseOrderNoDetail(subData)
|
||||
} else {
|
||||
await PurchaseOrderMaterialApi.updatePurchaseOrderMaterial(subData)
|
||||
await PurchaseOrderNoDetailApi.updatePurchaseOrderNoDetail(subData)
|
||||
}
|
||||
})
|
||||
formData.value.matItemRemoveList.forEach(async (item) => {
|
||||
if (item.id != undefined) {
|
||||
await PurchaseOrderMaterialApi.deletePurchaseOrderMaterial(item.id)
|
||||
await PurchaseOrderNoDetailApi.deletePurchaseOrderNoDetail(item.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -1103,26 +1110,27 @@ const saveForm = async () => {
|
||||
let validateForm = formData.value.purchaseType + '' + formData.value.goodsType
|
||||
// 校验子表单
|
||||
try {
|
||||
switch (validateForm) {
|
||||
case "11":
|
||||
//计划+物料
|
||||
await subMatPlanFormRef.value.validate()
|
||||
break
|
||||
case "12":
|
||||
//计划+加工件
|
||||
await subBoomPlanFormRef.value.validate()
|
||||
break
|
||||
case "21":
|
||||
//备库+物料
|
||||
await subFormRef.value.validate()
|
||||
break
|
||||
case "22":
|
||||
//备库+加工件
|
||||
await subBoomFormRef.value.validate()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
await subMatPlanFormRef.value.validate()
|
||||
// switch (validateForm) {
|
||||
// case "11":
|
||||
// //计划+物料
|
||||
// await subMatPlanFormRef.value.validate()
|
||||
// break
|
||||
// case "12":
|
||||
// //计划+加工件
|
||||
// await subBoomPlanFormRef.value.validate()
|
||||
// break
|
||||
// case "21":
|
||||
// //备库+物料
|
||||
// await subFormRef.value.validate()
|
||||
// break
|
||||
// case "22":
|
||||
// //备库+加工件
|
||||
// await subBoomFormRef.value.validate()
|
||||
// break
|
||||
// default:
|
||||
// break
|
||||
// }
|
||||
} catch (e) {
|
||||
return
|
||||
}
|
||||
@ -1151,12 +1159,12 @@ const saveForm = async () => {
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as PurchaseOrderApi.PurchaseOrderVO
|
||||
var purchaseOrderId = await PurchaseOrderApi.updatePurchaseOrder(data)
|
||||
const data = formData.value as unknown as PurchaseOrderNoApi.PurchaseOrderNoVO
|
||||
var purchaseOrderId = await PurchaseOrderNoApi.updatePurchaseOrderNo(data)
|
||||
// 保存物料信息
|
||||
await saveMaterials()
|
||||
// 保存加工件信息
|
||||
await saveBooms()
|
||||
// await saveBooms()
|
||||
//formData.value.matItemDOList
|
||||
|
||||
if (formData.value.attachments != undefined && formData.value.attachments.length > 0) {
|
||||
@ -1190,26 +1198,28 @@ const submitForm = async () => {
|
||||
let validateForm = formData.value.purchaseType + '' + formData.value.goodsType
|
||||
// 校验子表单
|
||||
try {
|
||||
switch (validateForm) {
|
||||
case '11':
|
||||
//计划+物料
|
||||
await subMatPlanFormRef.value.validate()
|
||||
break
|
||||
case '12':
|
||||
//计划+加工件
|
||||
await subBoomPlanFormRef.value.validate()
|
||||
break
|
||||
case '21':
|
||||
//备库+物料
|
||||
await subFormRef.value.validate()
|
||||
break
|
||||
case '22':
|
||||
//备库+加工件
|
||||
await subBoomFormRef.value.validate()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
await subMatPlanFormRef.value.validate()
|
||||
|
||||
// switch (validateForm) {
|
||||
// case '11':
|
||||
// //计划+物料
|
||||
// await subMatPlanFormRef.value.validate()
|
||||
// break
|
||||
// case '12':
|
||||
// //计划+加工件
|
||||
// await subBoomPlanFormRef.value.validate()
|
||||
// break
|
||||
// case '21':
|
||||
// //备库+物料
|
||||
// await subFormRef.value.validate()
|
||||
// break
|
||||
// case '22':
|
||||
// //备库+加工件
|
||||
// await subBoomFormRef.value.validate()
|
||||
// break
|
||||
// default:
|
||||
// break
|
||||
// }
|
||||
} catch (e) {
|
||||
return
|
||||
}
|
||||
@ -1232,11 +1242,10 @@ const matSimpList = ref([]) // 物料基本信息列表
|
||||
// 页面数据加载初始化
|
||||
onMounted(async () => {
|
||||
// 获取采购订单信息
|
||||
formData.value = await PurchaseOrderApi.getPurchaseOrder(query.id)
|
||||
formData.value = await PurchaseOrderNoApi.getPurchaseOrderNo(query.id)
|
||||
|
||||
// 获取物料需求计划编号
|
||||
if (
|
||||
formData.value.purchaseType == 1 &&
|
||||
formData.value.projectMaterialPlanId != undefined &&
|
||||
formData.value.projectMaterialPlanId != ''
|
||||
) {
|
||||
@ -1249,14 +1258,14 @@ onMounted(async () => {
|
||||
|
||||
// 获取物料需求计划的物料列表
|
||||
formData.value.matItemDOList = (
|
||||
await PurchaseOrderMaterialApi.getPurchaseOrderMaterialPage(queryParams)
|
||||
await PurchaseOrderNoDetailApi.getPurchaseOrderNoDetailPage(queryParams)
|
||||
).list
|
||||
var matTypes = getIntDictOptions(DICT_TYPE.HELI_MATERIAL_TYPE)
|
||||
var matUnits = getIntDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)
|
||||
formData.value.matItemDOList.forEach((item) => {
|
||||
matList.value.push({ id: item.materialId, code: item.matCode })
|
||||
item.matType = matTypes.find( op => op.value == matSimpList.value.find((record) => record.id === item.materialId)?.material_type)?.label
|
||||
item.matUnit = matUnits.find( op => op.value == matSimpList.value.find((record) => record.id === item.materialId)?.unit)?.label
|
||||
// item.matType = matTypes.find( op => op.value == matSimpList.value.find((record) => record.id === item.materialId)?.material_type)?.label
|
||||
// item.matUnit = matUnits.find( op => op.value == matSimpList.value.find((record) => record.id === item.materialId)?.unit)?.label
|
||||
})
|
||||
formData.value.matItemRemoveList = []
|
||||
formData.value.boomItemRemoveList = []
|
||||
@ -1304,7 +1313,7 @@ formData.value.boomItemDOList.forEach((item) => {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
businessId: query.id,
|
||||
businessType: 'PURCHASEORDER'
|
||||
businessType: 'PURCHASEORDERNO'
|
||||
}
|
||||
formData.value.attachments = (await getFilePage(attParams)).list
|
||||
|
||||
|
@ -157,8 +157,11 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import * as PurchaseOrderApi from '@/api/heli/purchaseorder'
|
||||
import * as PurchaseOrderNoApi from '@/api/heli/purchaseorderno'
|
||||
import PurchaseOrderForm from './PurchaseOrderForm.vue'
|
||||
import { ElTable } from 'element-plus'
|
||||
import {getPurchaseOrderNoPage} from "@/api/heli/purchaseorderno";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
defineOptions({ name: 'PurchaseOrder' })
|
||||
|
||||
@ -200,7 +203,7 @@ const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
queryParams.ids = undefined
|
||||
const data = await PurchaseOrderApi.getPurchaseOrderPage(queryParams)
|
||||
const data = await PurchaseOrderNoApi.getPurchaseOrderNoPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
@ -327,9 +330,13 @@ const handleExportWithTax = async () => {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
const setDefaultDate = () => {
|
||||
queryParams.createTime = dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
|
||||
}
|
||||
/** 初始化 **/
|
||||
onMounted(async () => {
|
||||
await getList()
|
||||
setDefaultDate()
|
||||
})
|
||||
</script>
|
||||
|
@ -38,10 +38,9 @@ v-model="queryParams.matName" placeholder="物料名称" clearable @keyup.enter=
|
||||
ref="multipleTable" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"
|
||||
class="hl-table" @selection-change="handleSelectionChange" @row-click="clickRow" selection>
|
||||
<el-table-column type="selection" width="40" />
|
||||
<el-table-column label="物料编码" align="center" prop="matCode" />
|
||||
<el-table-column label="物料名称" align="center" prop="matName" />
|
||||
<el-table-column label="物料编码" align="center" prop="matCode" />
|
||||
<el-table-column label="物料类型" align="center" prop="matType" >
|
||||
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" />
|
||||
</template>
|
||||
@ -52,16 +51,7 @@ ref="multipleTable" v-loading="loading" :data="list" :stripe="true" :show-overfl
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="需求数量" align="center" prop="requireAmount" />
|
||||
<el-table-column
|
||||
label="需求到货日期(最早)" align="center" prop="requireArriveTime" :formatter="dateFormatter"
|
||||
min-width="180px">
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatDate(scope.row.requireArriveTime, 'YYYY-MM-DD')
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="需求数量" align="center" prop="boomAmount" />
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
@ -83,7 +73,7 @@ import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||
import { ref } from "vue";
|
||||
import { ElTable } from 'element-plus'
|
||||
|
||||
import * as materialPlanDetailApi from "@/api/heli/materialplandetail";
|
||||
import * as materialPlanBoomApi from "@/api/heli/materialplanboom";
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
@ -108,9 +98,8 @@ const queryFormRef = ref() // 搜索的表单
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await materialPlanDetailApi.getMaterialPlanDetailPage(queryParams)
|
||||
const data = await materialPlanBoomApi.getProjectMaterialPlanId(queryParams)
|
||||
list.value = data.list
|
||||
console.log(list.value);
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" width="80%" v-model="dialogVisible" center>
|
||||
<Dialog :title="dialogTitle" width="50%" v-model="dialogVisible" center>
|
||||
<ContentWrap class="borderxx">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="108px">
|
||||
@ -7,15 +7,15 @@
|
||||
<el-input v-model="queryParams.projectMaterialPlanNo" placeholder="请输入物料需求计划单号" clearable
|
||||
@keyup.enter="handleQuery" class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产计划单号" prop="planNo" label-width="130px" >
|
||||
<el-input v-model="queryParams.planNo" placeholder="请输入生产计划单号" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="生产计划单号" prop="planNo" label-width="130px" >-->
|
||||
<!-- <el-input v-model="queryParams.planNo" placeholder="请输入生产计划单号" clearable @keyup.enter="handleQuery"-->
|
||||
<!-- class="!w-240px" />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="项目名称" prop="projectName" :label-width="100">
|
||||
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="项目名称" prop="projectName" :label-width="100">-->
|
||||
<!-- <el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery"-->
|
||||
<!-- class="!w-240px" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery" type="primary">
|
||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||
@ -30,25 +30,26 @@
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table ref="multipleTable" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"
|
||||
class="hl-table" @selection-change="handleSelectionChange" @row-click="clickRow" selection>
|
||||
class="hl-table" @selection-change="handleSelectionChange" @row-click="clickRow" selection :row-key="getRowKeys">
|
||||
<el-table-column type="selection" width="40" />
|
||||
<el-table-column label="物料需求计划单号" align="center" prop="projectMaterialPlanNo" />
|
||||
<el-table-column label="单据日期" align="center" prop="createTime" :formatter="dateFormatter" min-width="180px">
|
||||
<el-table-column label="物料需求计划单号" align="center" prop="projectMaterialPlanNo" width="200" />
|
||||
<el-table-column label="单据日期" align="center" prop="matPlanDate" :formatter="dateFormatter" min-width="120px">
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatDate(scope.row.createTime, 'YYYY-MM-DD')
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产计划单号" align="center" prop="planNo" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="备注" align="center" prop="description" />
|
||||
<el-table-column fixed="right" label="生产状态" align="center" prop="status" width="150">
|
||||
<!-- <el-table-column label="生产计划单号" align="center" prop="planNo" />-->
|
||||
<!-- <el-table-column label="项目名称" align="center" prop="projectName" width="180"/>-->
|
||||
<el-table-column label="类型" align="center" prop="matType" width="150">
|
||||
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_PROJECT_MATERIAL_PLAN_STATUS" :value="scope.row.status" />
|
||||
<dict-tag :type="DICT_TYPE.HELI_MAT_TYPE" :value="scope.row.matType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="备注" align="center" prop="description" />-->
|
||||
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@ -95,7 +96,7 @@ const queryFormRef = ref() // 搜索的表单
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await materialPlanApi.getMaterialPlanPage(queryParams)
|
||||
const data = await materialPlanApi.getBeiKuPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
@ -108,7 +109,10 @@ const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
//指定key值,数据更新之后保留之前选中的数据
|
||||
const getRowKeys = (row) => {
|
||||
return row.id
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
|
@ -3,21 +3,21 @@
|
||||
<ContentWrap class="borderxx">
|
||||
<el-form class="-mb-15px" :model="queryReqVo" :inline="true" label-width="108px">
|
||||
<el-form-item label=" 项目编号:" label-width="150px">
|
||||
<el-input v-model="queryReqVo.projectCode" placeholder="项目编号" class="!w-200px" v-bind:disabled="!chkboxEnable" clearable />
|
||||
<el-input v-model="queryReqVo.projectCode" placeholder="项目编号" class="!w-200px" :disabled="!chkboxEnable" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label=" 项目名称:" label-width="150px">
|
||||
<el-input v-model="queryReqVo.projectName" placeholder="项目名称" class="!w-200px" v-bind:disabled="!chkboxEnable" clearable />
|
||||
<el-input v-model="queryReqVo.projectName" placeholder="项目名称" class="!w-200px" :disabled="!chkboxEnable" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="子项目名称">
|
||||
<el-input v-model="queryReqVo.projectSubName" placeholder="子项目名称" class="!w-200px" v-bind:disabled="!chkboxEnable" clearable />
|
||||
<el-input v-model="queryReqVo.projectSubName" placeholder="子项目名称" class="!w-200px" :disabled="!chkboxEnable" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户简称">
|
||||
<el-input v-model="queryReqVo.customerName" placeholder="客户简称" class="!w-200px" v-bind:disabled="!chkboxEnable" clearable/>
|
||||
<el-input v-model="queryReqVo.customerName" placeholder="客户简称" class="!w-200px" :disabled="!chkboxEnable" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery" type="primary" v-bind:disabled="!chkboxEnable">
|
||||
<el-button @click="handleQuery" type="primary" :disabled="!chkboxEnable">
|
||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||
</el-button><el-button @click="resetQuery" v-bind:disabled="!chkboxEnable">
|
||||
</el-button><el-button @click="resetQuery" :disabled="!chkboxEnable">
|
||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@ -147,7 +147,7 @@ const submitForm = async () => {
|
||||
try {
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success', multipleSelection.value,currScope)
|
||||
emit('success', multipleSelection.value,currScope.value)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user