This commit is contained in:
think 2025-02-26 11:15:28 +08:00
commit a47baa31dc
54 changed files with 1369 additions and 212 deletions

View File

@ -78,6 +78,7 @@ public interface ErrorCodeConstants {
ErrorCode PROCESS_BOM_CODE_IS_EMPTY= new ErrorCode(1_006_005, "工艺bom编码为空"); ErrorCode PROCESS_BOM_CODE_IS_EMPTY= new ErrorCode(1_006_005, "工艺bom编码为空");
ErrorCode PROCESS_BOM_DETAIL_BLUE_PRINT_NO_REPEAT = new ErrorCode(1_006_006, "工艺bom明细图号重复"); ErrorCode PROCESS_BOM_DETAIL_BLUE_PRINT_NO_REPEAT = new ErrorCode(1_006_006, "工艺bom明细图号重复");
ErrorCode PROCESS_BOM_DETAIL_MATERIAL_NAME_IS_NULL = new ErrorCode(1_006_007, "工艺bom明细物料名称为空"); ErrorCode PROCESS_BOM_DETAIL_MATERIAL_NAME_IS_NULL = new ErrorCode(1_006_007, "工艺bom明细物料名称为空");
ErrorCode PROCESS_BOM_DETAIL_MATERIAL_AMOUNT_ILLGAL = new ErrorCode(1_006_0012, "工艺bom明细数量必须为数字");
ErrorCode PROCESS_BOM_DETAIL_UNSTANDARD_MATERIAL_NAME_IS_NULL = new ErrorCode(1_006_008, "非标准件工艺bom明细物料名称为空"); ErrorCode PROCESS_BOM_DETAIL_UNSTANDARD_MATERIAL_NAME_IS_NULL = new ErrorCode(1_006_008, "非标准件工艺bom明细物料名称为空");
ErrorCode PROCESS_BOM_DETAIL_UNSTANDARD_MATERIAL_NAME_IS_REPEAT= new ErrorCode(1_006_009, "非标准件工艺bom明细物料名称重复"); ErrorCode PROCESS_BOM_DETAIL_UNSTANDARD_MATERIAL_NAME_IS_REPEAT= new ErrorCode(1_006_009, "非标准件工艺bom明细物料名称重复");
ErrorCode PROCESS_BOM_DETAIL_UNSTANDARD_SPEC_IS_NULL= new ErrorCode(1_006_010, "非标准件工艺bom明细规格为空"); ErrorCode PROCESS_BOM_DETAIL_UNSTANDARD_SPEC_IS_NULL= new ErrorCode(1_006_010, "非标准件工艺bom明细规格为空");
@ -135,7 +136,7 @@ public interface ErrorCodeConstants {
ErrorCode ORDER_YF_NOT_EXISTS = new ErrorCode(1_011_001, "应付记录不存在"); ErrorCode ORDER_YF_NOT_EXISTS = new ErrorCode(1_011_001, "应付记录不存在");
ErrorCode ORDER_YS_NOT_EXISTS = new ErrorCode(1_011_001, "应收记录不存在"); ErrorCode ORDER_YS_NOT_EXISTS = new ErrorCode(1_011_001, "应收记录不存在");
ErrorCode ORDER_YS_DETAIL_NOT_EXISTS = new ErrorCode(1_011_001, "应收记录明细不存在");
ErrorCode SALE_ORDER_COST_DETAIL_NOT_EXISTS = new ErrorCode(1_011_001, "项目订单成本汇算明细不存在"); ErrorCode SALE_ORDER_COST_DETAIL_NOT_EXISTS = new ErrorCode(1_011_001, "项目订单成本汇算明细不存在");
/************责任人管理***********/ /************责任人管理***********/
ErrorCode OWNER_NOT_EXISTS = new ErrorCode(1_013_001, "人员配置主数据维护错误,请确认!"); ErrorCode OWNER_NOT_EXISTS = new ErrorCode(1_013_001, "人员配置主数据维护错误,请确认!");

View File

@ -117,7 +117,9 @@ public class MaterialRespVO {
@Schema(description = "库存预警下限") @Schema(description = "库存预警下限")
@ExcelProperty("库存预警下限") @ExcelProperty("库存预警下限")
private BigDecimal invLowerLimit; private BigDecimal invLowerLimit;
@Schema(description = "库存单价")
@ExcelProperty("库存单价")
private BigDecimal price;
@Schema(description = "物料条码") @Schema(description = "物料条码")
@ExcelProperty("物料条码") @ExcelProperty("物料条码")
private String barcode; private String barcode;

View File

@ -80,7 +80,8 @@ public class MaterialSaveReqVO {
@Schema(description = "库存预警上限") @Schema(description = "库存预警上限")
private BigDecimal invUpperLimit; private BigDecimal invUpperLimit;
@Schema(description = "库存单价")
private BigDecimal price;
@Schema(description = "库存预警下限") @Schema(description = "库存预警下限")
private BigDecimal invLowerLimit; private BigDecimal invLowerLimit;

View File

@ -1,5 +1,7 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo; package com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo;
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.OrderYsDetailSaveReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import java.util.*; import java.util.*;
@ -40,5 +42,7 @@ public class OrderYsSaveReqVO {
@Schema(description = "备注") @Schema(description = "备注")
private String rem; private String rem;
@Schema(description = "收款明细")
private List<OrderYsDetailDO> orderYsDetails;
} }

View File

@ -0,0 +1,102 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
import com.chanko.yunxi.mes.module.heli.service.orderysdetail.OrderYsDetailService;
@Tag(name = "管理后台 - 应收记录表明细")
@RestController
@RequestMapping("/heli/order-ys-detail")
@Validated
public class OrderYsDetailController {
@Resource
private OrderYsDetailService orderYsDetailService;
@PostMapping("/create")
@Operation(summary = "创建应收记录表明细")
@PreAuthorize("@ss.hasPermission('heli:order-ys-detail:create')")
public CommonResult<Integer> createOrderYsDetail(@Valid @RequestBody OrderYsDetailSaveReqVO createReqVO) {
return success(orderYsDetailService.createOrderYsDetail(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新应收记录表明细")
@PreAuthorize("@ss.hasPermission('heli:order-ys-detail:update')")
public CommonResult<Boolean> updateOrderYsDetail(@Valid @RequestBody OrderYsDetailSaveReqVO updateReqVO) {
orderYsDetailService.updateOrderYsDetail(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除应收记录表明细")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:order-ys-detail:delete')")
public CommonResult<Boolean> deleteOrderYsDetail(@RequestParam("id") Integer id) {
orderYsDetailService.deleteOrderYsDetail(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得应收记录表明细")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:order-ys-detail:query')")
public CommonResult<OrderYsDetailRespVO> getOrderYsDetail(@RequestParam("id") Integer id) {
OrderYsDetailDO orderYsDetail = orderYsDetailService.getOrderYsDetail(id);
return success(BeanUtils.toBean(orderYsDetail, OrderYsDetailRespVO.class));
}
@GetMapping("/getOrderYsDetails")
@Operation(summary = "获得应收记录表明细")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:order-ys-detail:query')")
public CommonResult<List<OrderYsDetailRespVO>> getOrderYsDetails(@RequestParam("id") Integer id) {
List<OrderYsDetailDO> orderYsDetail = orderYsDetailService.getOrderYsDetails(id);
return success(BeanUtils.toBean(orderYsDetail, OrderYsDetailRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得应收记录表明细分页")
@PreAuthorize("@ss.hasPermission('heli:order-ys-detail:query')")
public CommonResult<PageResult<OrderYsDetailRespVO>> getOrderYsDetailPage(@Valid OrderYsDetailPageReqVO pageReqVO) {
PageResult<OrderYsDetailDO> pageResult = orderYsDetailService.getOrderYsDetailPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, OrderYsDetailRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出应收记录表明细 Excel")
@PreAuthorize("@ss.hasPermission('heli:order-ys-detail:export')")
@OperateLog(type = EXPORT)
public void exportOrderYsDetailExcel(@Valid OrderYsDetailPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<OrderYsDetailDO> list = orderYsDetailService.getOrderYsDetailPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "应收记录表明细.xls", "数据", OrderYsDetailRespVO.class,
BeanUtils.toBean(list, OrderYsDetailRespVO.class));
}
}

View File

@ -0,0 +1,41 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo;
import lombok.*;
import java.time.LocalDate;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 应收记录表明细分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderYsDetailPageReqVO extends PageParam {
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "回款金额")
private BigDecimal cgYishou;
@Schema(description = "备注")
private String rem;
@Schema(description = "回款日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDate[] paymentDate;
@Schema(description = "回款类型", example = "2")
private String cgType;
@Schema(description = "应收id", example = "30630")
private Integer cgId;
}

View File

@ -0,0 +1,47 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDate;
import java.util.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 应收记录表明细 Response VO")
@Data
@ExcelIgnoreUnannotated
public class OrderYsDetailRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2612")
@ExcelProperty("主键")
private Integer id;
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "回款金额")
@ExcelProperty("回款金额")
private BigDecimal cgYishou;
@Schema(description = "备注")
@ExcelProperty("备注")
private String rem;
@Schema(description = "回款日期")
@ExcelProperty("回款日期")
private LocalDate paymentDate;
@Schema(description = "回款类型", example = "2")
@ExcelProperty("回款类型")
private String cgType;
@Schema(description = "应收id", example = "30630")
@ExcelProperty("应收id")
private Integer cgId;
}

View File

@ -0,0 +1,34 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDate;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 应收记录表明细新增/修改 Request VO")
@Data
public class OrderYsDetailSaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2612")
private Integer id;
@Schema(description = "回款金额")
private BigDecimal cgYishou;
@Schema(description = "备注")
private String rem;
@Schema(description = "回款日期")
private LocalDate paymentDate;
@Schema(description = "回款类型", example = "2")
private String cgType;
@Schema(description = "应收id", example = "30630")
private Integer cgId;
}

View File

@ -1,10 +1,18 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.storage; package com.chanko.yunxi.mes.module.heli.controller.admin.storage;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chanko.yunxi.mes.module.heli.controller.admin.outsourcestockboom.vo.OutsourceStockBoomSaveReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.outsourcestockboom.vo.OutsourceStockBoomSaveReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelog.StorageLogDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelog.StorageLogDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagemat.StorageMatMapper;
import com.chanko.yunxi.mes.module.heli.service.storagelog.StorageLogService; import com.chanko.yunxi.mes.module.heli.service.storagelog.StorageLogService;
import com.chanko.yunxi.mes.module.heli.service.storagemat.StorageMatService; import com.chanko.yunxi.mes.module.heli.service.storagemat.StorageMatService;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -17,6 +25,7 @@ import javax.validation.constraints.*;
import javax.validation.*; import javax.validation.*;
import javax.servlet.http.*; import javax.servlet.http.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.io.IOException; import java.io.IOException;
@ -50,7 +59,12 @@ public class StorageController {
@Resource @Resource
private StorageLogService storageLogService; private StorageLogService storageLogService;
@Resource
private StorageMatMapper storageMatMapper;
@Resource
private StorageLogNowMapper storageLogNowMapper;
@Resource
private MaterialMapper materialMapper;
@PostMapping("/cancelWeiWai") @PostMapping("/cancelWeiWai")
@Operation(summary = "委外取消提交") @Operation(summary = "委外取消提交")
@PreAuthorize("@ss.hasPermission('heli:storage:create')") @PreAuthorize("@ss.hasPermission('heli:storage:create')")
@ -125,6 +139,54 @@ public class StorageController {
storageService.updateStorage(updateReqVO); storageService.updateStorage(updateReqVO);
int status = targetDo.getStatus(); int status = targetDo.getStatus();
if (updateReqVO.getStockType()==1&&updateReqVO.getStockInType()==1){
if (status==2){
List<StorageMatDO> matList = storageMatMapper.selectMatByStorckID(targetDo.getId());
for (StorageMatDO storageMatDO : matList) {
LambdaQueryWrapper<StorageLogNowDO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(StorageLogNowDO::getMatCode, storageMatDO.getMatCode());
wrapper.eq(StorageLogNowDO::getMatName,storageMatDO.getMatName());
BigDecimal totalStorageOkQty = storageLogNowMapper.selectList(wrapper).stream()
.map(StorageLogNowDO::getStorageOkQty)
.filter(Objects::nonNull) // 确保过滤掉 null
.reduce(BigDecimal.ZERO, BigDecimal::add);
LambdaQueryWrapper<MaterialDO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(MaterialDO::getCode, storageMatDO.getMatCode());
queryWrapper.eq(MaterialDO::getName,storageMatDO.getMatName());
MaterialDO materialDO = materialMapper.selectOne(queryWrapper);
if (ObjectUtil.isEmpty(materialDO.getPrice())){
materialDO.setPrice(BigDecimal.ZERO);
}
BigDecimal add = totalStorageOkQty.multiply(materialDO.getPrice()).add(storageMatDO.getPrice().multiply(storageMatDO.getStorageOkQty()));
BigDecimal divide = add.divide(totalStorageOkQty.add(storageMatDO.getStorageOkQty()),2,RoundingMode.HALF_UP);
materialDO.setPrice(divide);
materialMapper.updateById(materialDO);
}
}else if (status==3){
List<StorageMatDO> matList = storageMatMapper.selectMatByStorckID(targetDo.getId());
for (StorageMatDO storageMatDO : matList) {
LambdaQueryWrapper<StorageLogNowDO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(StorageLogNowDO::getMatCode, storageMatDO.getMatCode());
wrapper.eq(StorageLogNowDO::getMatName,storageMatDO.getMatName());
BigDecimal totalStorageOkQty = storageLogNowMapper.selectList(wrapper).stream()
.map(StorageLogNowDO::getStorageOkQty)
.filter(Objects::nonNull) // 确保过滤掉 null
.reduce(BigDecimal.ZERO, BigDecimal::add);
LambdaQueryWrapper<MaterialDO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(MaterialDO::getCode, storageMatDO.getMatCode());
queryWrapper.eq(MaterialDO::getName,storageMatDO.getMatName());
MaterialDO materialDO = materialMapper.selectOne(queryWrapper);
if (ObjectUtil.isEmpty(materialDO.getPrice())){
materialDO.setPrice(BigDecimal.ZERO);
}
BigDecimal add = totalStorageOkQty.multiply(materialDO.getPrice()).subtract(storageMatDO.getPrice().multiply(storageMatDO.getStorageOkQty()));
BigDecimal divide = add.divide(totalStorageOkQty.subtract(storageMatDO.getStorageOkQty()),2,RoundingMode.HALF_UP);
materialDO.setPrice(divide);
materialMapper.updateById(materialDO);
}
}
}
//状态说明1保存 2提交 3作废 4已审批 //状态说明1保存 2提交 3作废 4已审批
if(updateReqVO.getStockType() == 2){ if(updateReqVO.getStockType() == 2){
//盘亏出库以外直接出 //盘亏出库以外直接出

View File

@ -56,7 +56,13 @@ public class StorageLogController {
storageLogService.updateStorageLog(updateReqVO); storageLogService.updateStorageLog(updateReqVO);
return success(true); return success(true);
} }
@PostMapping("/updatePrice")
@Operation(summary = "更新库存单价")
@PreAuthorize("@ss.hasPermission('heli:storage-log:update')")
public CommonResult<Boolean> updatePrice( @RequestBody StorageLogSaveReqVO updateReqVO) {
storageLogService.updatePrice(updateReqVO);
return success(true);
}
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除入/出库日志") @Operation(summary = "删除入/出库日志")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@ -114,6 +120,13 @@ public class StorageLogController {
PageResult<StorageLogNowDO> pageResult = storageLogService.getStorageNowPage(pageReqVO); PageResult<StorageLogNowDO> pageResult = storageLogService.getStorageNowPage(pageReqVO);
return success(pageResult); return success(pageResult);
} }
@GetMapping("/price")
@Operation(summary = "获得库存单价分页")
@PreAuthorize("@ss.hasPermission('heli:storage-log:query')")
public CommonResult<PageResult<StorageLogNowDO>> getStorageNowPricePage(@Valid StorageLogPageReqVO pageReqVO) {
PageResult<StorageLogNowDO> pageResult = storageLogService.getStorageNowPricePage(pageReqVO);
return success(pageResult);
}
// @GetMapping("/nowsmall") // @GetMapping("/nowsmall")
// @Operation(summary = "获得入/出库实时分页") // @Operation(summary = "获得入/出库实时分页")
// @PreAuthorize("@ss.hasPermission('heli:storage-log:query')") // @PreAuthorize("@ss.hasPermission('heli:storage-log:query')")

View File

@ -45,5 +45,9 @@ public class StorageLogSaveReqVO {
@Schema(description = "状态", example = "你说的对") @Schema(description = "状态", example = "你说的对")
private Integer status; private Integer status;
@Schema(description = "物料编码", example = "你说的对")
private String matCode;
@Schema(description = "库存单价")
private BigDecimal price;
} }

View File

@ -41,7 +41,9 @@ public class StorageMatRespVO {
@Schema(description = "库存良品数量") @Schema(description = "库存良品数量")
@ExcelProperty("库存良品数量") @ExcelProperty("库存良品数量")
private BigDecimal storageOkQty; private BigDecimal storageOkQty;
@Schema(description = "库存价格")
@ExcelProperty("库存价格")
private BigDecimal price;
@Schema(description = "批次号") @Schema(description = "批次号")
@ExcelProperty("批次号") @ExcelProperty("批次号")
private String lotNo; private String lotNo;

View File

@ -37,7 +37,8 @@ public class StorageMatSaveReqVO {
@Schema(description = "库存良品数量") @Schema(description = "库存良品数量")
private BigDecimal storageOkQty; private BigDecimal storageOkQty;
@Schema(description = "库存价格")
private BigDecimal price;
@Schema(description = "批次号") @Schema(description = "批次号")
private String lotNo; private String lotNo;

View File

@ -90,7 +90,6 @@ public class DeliverOrderSubDO extends BaseDO {
/** /**
* 销售订单子项id * 销售订单子项id
*/ */
@TableField(exist = false)
private Long saleOrderId; private Long saleOrderId;
private Long saleOrderSubId; private Long saleOrderSubId;
/** /**

View File

@ -119,6 +119,10 @@ public class MaterialDO extends TenantBaseDO {
* 库存预警上限 * 库存预警上限
*/ */
private BigDecimal invUpperLimit; private BigDecimal invUpperLimit;
/**
* 库存单价
*/
private BigDecimal price;
/** /**
* 库存预警下限 * 库存预警下限
*/ */

View File

@ -0,0 +1,54 @@
package com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail;
import lombok.*;
import java.time.LocalDate;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
/**
* 应收记录表明细 DO
*
* @author 管理员
*/
@TableName("cg_order_ys_detail")
@KeySequence("cg_order_ys_detail_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderYsDetailDO extends BaseDO {
/**
* 主键
*/
@TableId
private Integer id;
/**
* 回款金额
*/
private BigDecimal cgYishou;
/**
* 备注
*/
private String rem;
/**
* 回款日期
*/
private LocalDate paymentDate;
/**
* 回款类型
*/
private String cgType;
/**
* 应收id
*/
private Integer cgId;
}

View File

@ -30,9 +30,7 @@ public class StorageLogNowDO extends BaseDO {
private Long id; private Long id;
private BigDecimal storageOkQty; private BigDecimal storageOkQty;
private String lotNo; private String lotNo;
private String matName; private String matName;
private String shortName; private String shortName;
private String matCode; private String matCode;
@ -51,11 +49,15 @@ public class StorageLogNowDO extends BaseDO {
private Long pnId; private Long pnId;
private String pnName; private String pnName;
private BigDecimal sumKcMoney; private BigDecimal sumKcMoney;
@TableField(exist = false)
private BigDecimal sumKcMoneys;
@TableField(exist = false) @TableField(exist = false)
private Long materialTypeId; private Long materialTypeId;
@TableField(exist = false)
private BigDecimal price;
@TableField(exist = false)
private BigDecimal storageOkQtys;
@TableField(exist = false) @TableField(exist = false)
private Long matUnitId; private Long matUnitId;

View File

@ -52,6 +52,10 @@ public class StorageMatDO extends BaseDO {
* 库存良品数量 * 库存良品数量
*/ */
private BigDecimal storageOkQty; private BigDecimal storageOkQty;
/**
* 库存价格
*/
private BigDecimal price;
/** /**
* 批次号 * 批次号
*/ */

View File

@ -0,0 +1,31 @@
package com.chanko.yunxi.mes.module.heli.dal.mysql.orderysdetail;
import java.util.*;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
import org.apache.ibatis.annotations.Mapper;
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.*;
/**
* 应收记录表明细 Mapper
*
* @author 管理员
*/
@Mapper
public interface OrderYsDetailMapper extends BaseMapperX<OrderYsDetailDO> {
default PageResult<OrderYsDetailDO> selectPage(OrderYsDetailPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<OrderYsDetailDO>()
.betweenIfPresent(OrderYsDetailDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(OrderYsDetailDO::getCgYishou, reqVO.getCgYishou())
.eqIfPresent(OrderYsDetailDO::getRem, reqVO.getRem())
.betweenIfPresent(OrderYsDetailDO::getPaymentDate, reqVO.getPaymentDate())
.eqIfPresent(OrderYsDetailDO::getCgType, reqVO.getCgType())
.eqIfPresent(OrderYsDetailDO::getCgId, reqVO.getCgId())
.orderByDesc(OrderYsDetailDO::getId));
}
}

View File

@ -107,4 +107,21 @@ public interface StorageLogNowMapper extends BaseMapperX<StorageLogNowDO> {
List<StorageLogNowDO> selectNowByMatPnId(@Param("matId")Long matId,@Param("pnId")Long pnId); List<StorageLogNowDO> selectNowByMatPnId(@Param("matId")Long matId,@Param("pnId")Long pnId);
default PageResult<StorageLogNowDO> getStorageNowPricePage(StorageLogPageReqVO reqVO) {
MPJLambdaWrapper<StorageLogNowDO> query = new MPJLambdaWrapper<>();
query.selectAll(StorageLogNowDO.class)
.select("COALESCE(SUM(storage_ok_qty), 0) as storageOkQtys,a.price as price,COALESCE(SUM(storage_ok_qty), 0) * a.price as sumKcMoneys")
.leftJoin(MaterialDO.class,"a",MaterialDO::getCode,StorageLogNowDO::getMatCode)
.groupBy(StorageLogNowDO::getMatCode)
.orderByDesc(StorageLogNowDO::getId);
query.like(!StringUtils.isEmpty(reqVO.getMatType()),StorageLogNowDO::getMatType, reqVO.getMatType())
.ne(true,StorageLogNowDO::getStorageOkQty,0)
.like(!StringUtils.isEmpty(reqVO.getMatName()), StorageLogNowDO::getMatName, reqVO.getMatName())
.like(!StringUtils.isEmpty(reqVO.getMatCode()), StorageLogNowDO::getMatCode, reqVO.getMatCode());
return selectPage(reqVO,query);
}
} }

View File

@ -58,6 +58,7 @@ public interface TaskDispatchMapper extends BaseMapperX<TaskDispatchDO> {
.leftJoin(PlanTaskBomDO.class, "i", wrapper -> wrapper.eq(PlanTaskBomDO::getTaskId, PlanTaskDO::getId).eq(PlanTaskBomDO::getBomDetailId, TaskDispatchDO::getBomDetailId)) .leftJoin(PlanTaskBomDO.class, "i", wrapper -> wrapper.eq(PlanTaskBomDO::getTaskId, PlanTaskDO::getId).eq(PlanTaskBomDO::getBomDetailId, TaskDispatchDO::getBomDetailId))
.leftJoin(AdminUserDO.class, "u1", AdminUserDO::getId, PlanTaskBomDO::getOwner) .leftJoin(AdminUserDO.class, "u1", AdminUserDO::getId, PlanTaskBomDO::getOwner)
.orderByDesc(TaskDispatchDO::getId) .orderByDesc(TaskDispatchDO::getId)
.eq(ProjectOrderSubDO::getDeleted,0)
.disableSubLogicDel(); .disableSubLogicDel();
query.like(!StringUtils.isEmpty(reqVO.getCode()), TaskDispatchDO::getCode, reqVO.getCode()) query.like(!StringUtils.isEmpty(reqVO.getCode()), TaskDispatchDO::getCode, reqVO.getCode())

View File

@ -180,9 +180,10 @@ public class CrossOrderManager {
//如果历史没发过 以本次为准 //如果历史没发过 以本次为准
if(historyDeliveredSubList.isEmpty()) { if(historyDeliveredSubList.isEmpty()) {
historyDeliveredSubList = projectIdEntity.getValue(); historyDeliveredSubList = projectIdEntity.getValue();
}else {
historyDeliveredSubList.addAll(projectIdEntity.getValue());
} }
//else {
// historyDeliveredSubList.addAll(projectIdEntity.getValue());
// }
Map<Long, List<DeliverOrderSubDO>> historyDeliveredSubsGroupBySaleSubId = historyDeliveredSubList.stream().collect(Collectors.groupingBy(DeliverOrderSubDO::getSaleOrderSubId)); Map<Long, List<DeliverOrderSubDO>> historyDeliveredSubsGroupBySaleSubId = historyDeliveredSubList.stream().collect(Collectors.groupingBy(DeliverOrderSubDO::getSaleOrderSubId));
// 考虑变更订单情况 只需判断历史发货是否大于等于订单子项数量 // 考虑变更订单情况 只需判断历史发货是否大于等于订单子项数量

View File

@ -2,7 +2,13 @@ package com.chanko.yunxi.mes.module.heli.service.orderys;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.OrderYsDetailSaveReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderSaveReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderSaveReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.orderysdetail.OrderYsDetailMapper;
import com.chanko.yunxi.mes.module.heli.service.customer.CustomerService; import com.chanko.yunxi.mes.module.heli.service.customer.CustomerService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -12,6 +18,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo.*; import com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderys.OrderYsDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderys.OrderYsDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult; import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
@ -36,6 +44,8 @@ public class OrderYsServiceImpl implements OrderYsService {
private OrderYsMapper orderYsMapper; private OrderYsMapper orderYsMapper;
@Resource @Resource
private CustomerService customerService; private CustomerService customerService;
@Resource
private OrderYsDetailMapper OrderYsDetailMapper;
@Override @Override
public Integer createOrderYs(OrderYsSaveReqVO createReqVO) { public Integer createOrderYs(OrderYsSaveReqVO createReqVO) {
@ -53,6 +63,17 @@ public class OrderYsServiceImpl implements OrderYsService {
// 更新 // 更新
OrderYsDO updateObj = BeanUtils.toBean(updateReqVO, OrderYsDO.class); OrderYsDO updateObj = BeanUtils.toBean(updateReqVO, OrderYsDO.class);
orderYsMapper.updateById(updateObj); orderYsMapper.updateById(updateObj);
//插入子表
createOrUpdateOrderYsDetails(updateReqVO.getOrderYsDetails());
}
private void createOrUpdateOrderYsDetails(List<OrderYsDetailDO> orderYsDetails) {
// 分组更新与插入
List<OrderYsDetailDO> updateList = orderYsDetails.stream().filter(o -> o.getId() != null).collect(Collectors.toList());
List<OrderYsDetailDO> insertList = orderYsDetails.stream().filter(o -> o.getId() == null).collect(Collectors.toList());
if(!updateList.isEmpty()) OrderYsDetailMapper.updateBatch(updateList);
if(!insertList.isEmpty()) OrderYsDetailMapper.insertBatch(insertList);
} }
@Override @Override
@ -61,6 +82,8 @@ public class OrderYsServiceImpl implements OrderYsService {
validateOrderYsExists(id); validateOrderYsExists(id);
// 删除 // 删除
orderYsMapper.deleteById(id); orderYsMapper.deleteById(id);
LambdaUpdateWrapper<OrderYsDetailDO> eq = new UpdateWrapper<OrderYsDetailDO>().lambda().eq(OrderYsDetailDO::getCgId, id);
OrderYsDetailMapper.delete(eq);
} }
private void validateOrderYsExists(Integer id) { private void validateOrderYsExists(Integer id) {

View File

@ -0,0 +1,56 @@
package com.chanko.yunxi.mes.module.heli.service.orderysdetail;
import java.util.*;
import javax.validation.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
/**
* 应收记录表明细 Service 接口
*
* @author 管理员
*/
public interface OrderYsDetailService {
/**
* 创建应收记录表明细
*
* @param createReqVO 创建信息
* @return 编号
*/
Integer createOrderYsDetail(@Valid OrderYsDetailSaveReqVO createReqVO);
/**
* 更新应收记录表明细
*
* @param updateReqVO 更新信息
*/
void updateOrderYsDetail(@Valid OrderYsDetailSaveReqVO updateReqVO);
/**
* 删除应收记录表明细
*
* @param id 编号
*/
void deleteOrderYsDetail(Integer id);
/**
* 获得应收记录表明细
*
* @param id 编号
* @return 应收记录表明细
*/
OrderYsDetailDO getOrderYsDetail(Integer id);
List<OrderYsDetailDO> getOrderYsDetails(Integer id);
/**
* 获得应收记录表明细分页
*
* @param pageReqVO 分页查询
* @return 应收记录表明细分页
*/
PageResult<OrderYsDetailDO> getOrderYsDetailPage(OrderYsDetailPageReqVO pageReqVO);
}

View File

@ -0,0 +1,81 @@
package com.chanko.yunxi.mes.module.heli.service.orderysdetail;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.module.heli.dal.mysql.orderysdetail.OrderYsDetailMapper;
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
/**
* 应收记录表明细 Service 实现类
*
* @author 管理员
*/
@Service
@Validated
public class OrderYsDetailServiceImpl implements OrderYsDetailService {
@Resource
private OrderYsDetailMapper orderYsDetailMapper;
@Override
public Integer createOrderYsDetail(OrderYsDetailSaveReqVO createReqVO) {
// 插入
OrderYsDetailDO orderYsDetail = BeanUtils.toBean(createReqVO, OrderYsDetailDO.class);
orderYsDetailMapper.insert(orderYsDetail);
// 返回
return orderYsDetail.getId();
}
@Override
public void updateOrderYsDetail(OrderYsDetailSaveReqVO updateReqVO) {
// 校验存在
validateOrderYsDetailExists(updateReqVO.getId());
// 更新
OrderYsDetailDO updateObj = BeanUtils.toBean(updateReqVO, OrderYsDetailDO.class);
orderYsDetailMapper.updateById(updateObj);
}
@Override
public void deleteOrderYsDetail(Integer id) {
// 校验存在
validateOrderYsDetailExists(id);
// 删除
orderYsDetailMapper.deleteById(id);
}
private void validateOrderYsDetailExists(Integer id) {
if (orderYsDetailMapper.selectById(id) == null) {
throw exception(ORDER_YS_DETAIL_NOT_EXISTS);
}
}
@Override
public OrderYsDetailDO getOrderYsDetail(Integer id) {
return orderYsDetailMapper.selectById(id);
}
@Override
public List<OrderYsDetailDO> getOrderYsDetails(Integer id) {
LambdaQueryWrapper<OrderYsDetailDO> eq = new LambdaQueryWrapper<OrderYsDetailDO>().eq(OrderYsDetailDO::getCgId, id);
return orderYsDetailMapper.selectList(eq);
}
@Override
public PageResult<OrderYsDetailDO> getOrderYsDetailPage(OrderYsDetailPageReqVO pageReqVO) {
return orderYsDetailMapper.selectPage(pageReqVO);
}
}

View File

@ -267,6 +267,11 @@ public class ProcessBomServiceImpl implements ProcessBomService {
processBomDetailDO.setUnit(o.getUnit());//单位 processBomDetailDO.setUnit(o.getUnit());//单位
processBomDetailDO.setBlueprintNo(o.getBlueprintNo());//图号 processBomDetailDO.setBlueprintNo(o.getBlueprintNo());//图号
try {
BigDecimal number = new BigDecimal(o.getAmount());
} catch (NumberFormatException e) {
throw exception(PROCESS_BOM_DETAIL_MATERIAL_AMOUNT_ILLGAL);
}
processBomDetailDO.setAmount(o.getAmount());//数量 processBomDetailDO.setAmount(o.getAmount());//数量
processBomDetailDO.setBomType(1); processBomDetailDO.setBomType(1);
processBomDetailDO.setUpdateTimes(LocalDateTime.now()); processBomDetailDO.setUpdateTimes(LocalDateTime.now());

View File

@ -452,6 +452,7 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
deliverAmount = deliverOrderSubDOList.stream().mapToInt(DeliverOrderSubDO::getAmount).sum(); deliverAmount = deliverOrderSubDOList.stream().mapToInt(DeliverOrderSubDO::getAmount).sum();
} }
projectOrderSubDO.setDeliverAmount(deliverAmount); projectOrderSubDO.setDeliverAmount(deliverAmount);
}); });
} }

View File

@ -71,4 +71,7 @@ public interface StorageLogService {
void createStorageLogBatch(List<StorageLogDO> storageLogDOs); void createStorageLogBatch(List<StorageLogDO> storageLogDOs);
PageResult<StorageLogNowDO> getStorageNowPricePage(StorageLogPageReqVO pageReqVO);
void updatePrice(StorageLogSaveReqVO updateReqVO);
} }

View File

@ -1,5 +1,6 @@
package com.chanko.yunxi.mes.module.heli.service.storagelog; package com.chanko.yunxi.mes.module.heli.service.storagelog;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogAll.StorageLogAllDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogAll.StorageLogAllDO;
@ -163,6 +164,19 @@ public class StorageLogServiceImpl implements StorageLogService {
}
@Override
public PageResult<StorageLogNowDO> getStorageNowPricePage(StorageLogPageReqVO pageReqVO) {
return storageLogNowMapper.getStorageNowPricePage(pageReqVO);
}
@Override
public void updatePrice(StorageLogSaveReqVO updateReqVO) {
LambdaUpdateWrapper<MaterialDO> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(MaterialDO::getCode,updateReqVO.getMatCode());
wrapper.set(MaterialDO::getPrice,updateReqVO.getPrice());
materialMapper.update(wrapper);
} }
} }

View File

@ -15,6 +15,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthing
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
@ -268,7 +269,8 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
for (TaskDispatchDO taskDispatchDO : list) { for (TaskDispatchDO taskDispatchDO : list) {
Integer num ; Integer num ;
if (numMap.get(taskDispatchDO.getProjectSubId())==null){ if (numMap.get(taskDispatchDO.getProjectSubId())==null){
num = projectOrderSubMapper.selectById(taskDispatchDO.getProjectSubId()).getAmount(); ProjectOrderSubDO projectOrderSubDO = projectOrderSubMapper.selectById(taskDispatchDO.getProjectSubId());
num = projectOrderSubMapper.selectById(taskDispatchDO.getProjectSubId()).getAmount();
numMap.put(taskDispatchDO.getProjectSubId(),num); numMap.put(taskDispatchDO.getProjectSubId(),num);
}else { }else {
num= numMap.get(taskDispatchDO.getProjectSubId()); num= numMap.get(taskDispatchDO.getProjectSubId());

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chanko.yunxi.mes.module.heli.dal.mysql.orderysdetail.OrderYsDetailMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@ -38,6 +38,10 @@ public class PostRespVO {
@Schema(description = "备注", example = "快乐的备注") @Schema(description = "备注", example = "快乐的备注")
private String remark; private String remark;
@Schema(description = "层级", example = "层级")
private String grade;
@Schema(description = "岗位成本", example = "岗位成本")
private String gradeCost;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;

View File

@ -36,5 +36,9 @@ public class PostSaveReqVO {
@Schema(description = "备注", example = "快乐的备注") @Schema(description = "备注", example = "快乐的备注")
private String remark; private String remark;
@Schema(description = "层级", example = "层级")
private String grade;
@Schema(description = "岗位成本", example = "岗位成本")
private String gradeCost;
} }

View File

@ -46,5 +46,13 @@ public class PostDO extends BaseDO {
* 备注 * 备注
*/ */
private String remark; private String remark;
/**
* 层级
*/
private String grade;
/**
* 岗位成本
*/
private String gradeCost;
} }

View File

@ -10,6 +10,7 @@ export interface OrderYsVO {
cgYishou: number cgYishou: number
cgTypee: number cgTypee: number
rem: string rem: string
orderYsDetails:any[];
} }
// 查询应收记录分页 // 查询应收记录分页

View File

@ -0,0 +1,43 @@
import request from '@/config/axios'
export interface OrderYsDetailVO {
id: number
cgYishou: number
rem: string
paymentDate: localdate
cgType: string
cgId: number
}
// 查询应收记录表明细分页
export const getOrderYsDetailPage = async (params) => {
return await request.get({ url: `/heli/order-ys-detail/page`, params })
}
// 查询应收记录表明细详情
export const getOrderYsDetail = async (id: number) => {
return await request.get({ url: `/heli/order-ys-detail/get?id=` + id })
}
// 查询根据应收id查询应收记录表明细
export const getOrderYsDetails = async (id: number) => {
return await request.get({ url: `/heli/order-ys-detail/getOrderYsDetails?id=` + id })
}
// 新增应收记录表明细
export const createOrderYsDetail = async (data: OrderYsDetailVO) => {
return await request.post({ url: `/heli/order-ys-detail/create`, data })
}
// 修改应收记录表明细
export const updateOrderYsDetail = async (data: OrderYsDetailVO) => {
return await request.put({ url: `/heli/order-ys-detail/update`, data })
}
// 删除应收记录表明细
export const deleteOrderYsDetail = async (id: number) => {
return await request.delete({ url: `/heli/order-ys-detail/delete?id=` + id })
}
// 导出应收记录表明细 Excel
export const exportOrderYsDetail = async (params) => {
return await request.download({ url: `/heli/order-ys-detail/export-excel`, params })
}

View File

@ -13,6 +13,7 @@ export interface StorageLogVO {
noZero: number noZero: number
matCode: string matCode: string
matType:string matType:string
price:number
} }
@ -41,6 +42,10 @@ export const getStorageNowAllPage = async (params) => {
export const getStorageNowPage = async (params) => { export const getStorageNowPage = async (params) => {
return await request.get({ url: `/heli/storage-log/now`, params }) return await request.get({ url: `/heli/storage-log/now`, params })
} }
// 查询库存单价分页
export const getStorageNowPricePage = async (params) => {
return await request.get({ url: `/heli/storage-log/price`, params })
}
// 查询入/出库实时分页 // 查询入/出库实时分页
export const getStorageNowPagesmall = async (params) => { export const getStorageNowPagesmall = async (params) => {
@ -62,7 +67,10 @@ export const getStorageLog = async (id: number) => {
export const createStorageLog = async (data: StorageLogVO) => { export const createStorageLog = async (data: StorageLogVO) => {
return await request.post({ url: `/heli/storage-log/create`, data }) return await request.post({ url: `/heli/storage-log/create`, data })
} }
//修改物料单价
export const updatePrice = async (data: StorageLogVO) => {
return await request.post({ url: `/heli/storage-log/updatePrice`, data })
}
// 修改入/出库日志 // 修改入/出库日志
export const updateStorageLog = async (data: StorageLogVO) => { export const updateStorageLog = async (data: StorageLogVO) => {
return await request.put({ url: `/heli/storage-log/update`, data }) return await request.put({ url: `/heli/storage-log/update`, data })

View File

@ -8,6 +8,7 @@ export interface StorageMatVO {
rgId: number rgId: number
pnId: number pnId: number
storageOkQty: number storageOkQty: number
price: number
lotNo: string lotNo: string
projectNo: string projectNo: string
description: string description: string

View File

@ -277,7 +277,8 @@ export enum DICT_TYPE {
HELI_YINGFU_MONEY = 'heli_yingfu_money', HELI_YINGFU_MONEY = 'heli_yingfu_money',
HELI_PLANTYPE = 'heli_planType',//生产进度报表中生产状态 HELI_PLANTYPE = 'heli_planType',//生产进度报表中生产状态
HELI_PG_PLANTYPE = 'heli_pg_planType',//生产进度报表中派工是否完成状态 HELI_PG_PLANTYPE = 'heli_pg_planType',//生产进度报表中派工是否完成状态
HELI_GRADE='heli_grade',
HELI_CGTYPE='heli_cgType'
} }

View File

@ -34,7 +34,8 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item label="业务员" prop="salesman"> <el-form-item label="业务员" prop="salesman">
<el-select class="!w-265px" v-model="formData.salesman" clearable @update:new-value="handleSelectedUser"> <el-select class="!w-265px" v-model="formData.salesman" clearable @update:new-value="handleSelectedUser">
<el-option v-for="dict in userInit" :key="dict.id" <el-option
v-for="dict in userInit" :key="dict.id"
:label="dict.username+' '+dict.nickname" :value="dict.id" /> :label="dict.username+' '+dict.nickname" :value="dict.id" />
</el-select> </el-select>
<!-- <UserSelect :disabled="alterDisabled || detailDisabled" v-model="formData.salesman" @update:new-value="handleSelectedUser" />--> <!-- <UserSelect :disabled="alterDisabled || detailDisabled" v-model="formData.salesman" @update:new-value="handleSelectedUser" />-->
@ -311,7 +312,7 @@ const queryData = async (type: string, id?: number) => {
pageNo: 1, pageNo: 1,
pageSize: 99, pageSize: 99,
businessId: id, businessId: id,
businessType: businessType businessType: 'PROJECT_BAOJIA'
} }
formData.value.attachments = (await getFilePage(attParams)).list formData.value.attachments = (await getFilePage(attParams)).list
} }

View File

@ -922,7 +922,7 @@ const queryData = async (type: string, id?: number) => {
sub.saleOrderSubId = sub.id sub.saleOrderSubId = sub.id
sub.id = '' sub.id = ''
sub.saleOrderCode = sub.projectOrderCode sub.saleOrderCode = sub.projectOrderCode
sub.amounts = sub.amount - sub.deliverAmount sub.amount = sub.amount - sub.deliverAmount
}) })
formData.value.deliverOrderSubs = formData.value.deliverOrderSubs.concat( formData.value.deliverOrderSubs = formData.value.deliverOrderSubs.concat(
subList subList

View File

@ -3,7 +3,8 @@
<template #footer> <template #footer>
<el-card class="hl-incard" :class="{ 'alter-class': fieldHasAlter('attachments') }"> <el-card class="hl-incard" :class="{ 'alter-class': fieldHasAlter('attachments') }">
<el-upload ref="contractUploadRef" :file-list="contractUploadFiles" multiple :action="uploadUrl" :headers="{ <el-upload
ref="contractUploadRef" :file-list="contractUploadFiles" multiple :action="uploadUrl" :headers="{
Authorization: 'Bearer ' + getAccessToken(), Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId() 'tenant-id': getTenantId()
}" name="files" :show-file-list="false" :auto-upload="false" :data="contractUploadData" :on-change="contractUploadChange" :on-error="handleError" :on-success="handleSuccess" :before-upload="before" class="upload-file-uploader"> }" name="files" :show-file-list="false" :auto-upload="false" :data="contractUploadData" :on-change="contractUploadChange" :on-error="handleError" :on-success="handleSuccess" :before-upload="before" class="upload-file-uploader">
@ -38,6 +39,7 @@
import { deleteFileLogic, downloadFile, getFilePage } from '@/api/infra/file' import { deleteFileLogic, downloadFile, getFilePage } from '@/api/infra/file'
import { inject } from 'vue' import { inject } from 'vue'
import { dateFormatter, formatDate } from '@/utils/formatTime' import { dateFormatter, formatDate } from '@/utils/formatTime'
import download from '@/utils/download'
const { t } = useI18n() // const { t } = useI18n() //
const formData = ref({ const formData = ref({
id: undefined, id: undefined,
@ -104,6 +106,11 @@ formData.value = await MaterialApi.getMaterial(id)
formData.value.attachments = (await getFilePage(attParams)).list formData.value.attachments = (await getFilePage(attParams)).list
} }
//
const downloadAttachment = async (name, url) => {
const data = await downloadFile(url)
download.any(data, name)
}
const contractUploadChange =async (file, files) => { const contractUploadChange =async (file, files) => {
contractUploadFiles.value = files contractUploadFiles.value = files
@ -115,7 +122,7 @@ const contractUploadChange =async (file, files) => {
} }
const refreshAttachments = (files, type) => { const refreshAttachments = (files, type) => {
formData.value.attachments=[] // formData.value.attachments=[]
formData.value.attachments = formData.value.attachments.filter((value, index, array) => { formData.value.attachments = formData.value.attachments.filter((value, index, array) => {
return value.businessFileType != type || value.id return value.businessFileType != type || value.id
}) })

View File

@ -1,5 +1,5 @@
<template> <template>
<Dialog :title="dialogTitle" v-model="dialogVisible"> <Dialog :title="dialogTitle" v-model="dialogVisible" width="1200px">
<el-form <el-form
ref="formRef" ref="formRef"
:model="formData" :model="formData"
@ -7,11 +7,14 @@
label-width="160px" label-width="160px"
v-loading="formLoading" v-loading="formLoading"
> >
<el-form-item label="项目编号" prop="code"> <el-row>
<el-input v-model="formData.code" placeholder="请输入项目编号" disabled/>
<el-form-item label="项目编号" prop="code" width="200px">
<el-input v-model="formData.code" placeholder="请输入项目编号" disabled class="!w-220px"/>
</el-form-item> </el-form-item>
<el-form-item label="项目名称" prop="projectName"> <el-form-item label="项目名称" prop="projectName">
<el-input v-model="formData.projectName" placeholder="请输入项目名称" disabled/> <el-input v-model="formData.projectName" placeholder="请输入项目名称" disabled class="!w-220px"/>
</el-form-item> </el-form-item>
<el-form-item label="生成日期" prop="cgTime" > <el-form-item label="生成日期" prop="cgTime" >
<el-date-picker <el-date-picker
@ -19,23 +22,28 @@
type="date" type="date"
value-format="x" value-format="x"
placeholder="选择生成日期" disabled placeholder="选择生成日期" disabled
class="!w-220px"
/> />
</el-form-item> </el-form-item>
</el-row>
<el-row>
<el-form-item label="客户名称" prop="cgKhname" > <el-form-item label="客户名称" prop="cgKhname" >
<el-input v-model="formData.cgKhname" placeholder="请输入客户名称" disabled/> <el-input v-model="formData.cgKhname" placeholder="请输入客户名称" disabled class="!w-220px"/>
</el-form-item> </el-form-item>
<el-form-item label="应收金额" prop="cgYs" > <el-form-item label="应收金额" prop="cgYs" >
<el-input v-model="formData.cgYs" placeholder="请输入应收金额" disabled/> <el-input v-model="formData.cgYs" placeholder="请输入应收金额" disabled class="!w-220px"/>
</el-form-item> </el-form-item>
<el-form-item label="已收金额" prop="cgYishou"> <el-form-item label="已收金额" prop="cgYishou">
<el-input v-model="formData.cgYishou" placeholder="请输入已收金额" /> <el-input v-model="formData.cgYishou" placeholder="请输入已收金额" disabled class="!w-220px"/>
</el-form-item> </el-form-item>
</el-row>
<el-row>
<el-form-item label="是否回款完成" prop="cgTypee" > <el-form-item label="是否回款完成" prop="cgTypee" >
<el-select <el-select
v-model="formData.cgTypee" v-model="formData.cgTypee"
placeholder="请选择" placeholder="请选择"
clearable clearable
class="!w-240px" class="!w-220px"
> >
<el-option <el-option
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_YINGFU_MONEY)" v-for="dict in getIntDictOptions(DICT_TYPE.HELI_YINGFU_MONEY)"
@ -46,9 +54,77 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="rem"> <el-form-item label="备注" prop="rem">
<el-input v-model="formData.rem" placeholder="请输入备注" /> <el-input v-model="formData.rem" placeholder="请输入备注" class="!w-220px"/>
</el-form-item> </el-form-item>
</el-row>
</el-form> </el-form>
<el-card class="hl-card-info">
<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 type="primary" size="large" @click="onAddItem" v-if="formData.cgTypee==1">新增</el-button>
</el-col>
<el-form ref="OrderYsDetailSubFormRef" :model="formData.orderYsDetails" label-width="0" >
<el-table :data="formData.orderYsDetails" class="hl-table" >
<el-table-column type="index" label="序号" align="center" min-width="60" fixed />
<el-table-column min-width="150" align="center">
<template #header> <span class="hl-table_header">*</span>回款日期 </template>
<template #default="scope">
<el-form-item prop="paymentDate" >
<el-date-picker :disabled="scope.row.id"
v-model="scope.row.paymentDate"
type="date"
value-format=""
placeholder="选择回款日期"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column min-width="150" align="center">
<template #header> <span class="hl-table_header">*</span>回款类型 </template>
<template #default="scope">
<el-form-item prop="cgType" >
<el-select
v-model="scope.row.cgType" :disabled="scope.row.id"
placeholder="请选择"
clearable
@change="getGradeCost" >
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_CGTYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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="cgYishou" >
<el-input v-model="scope.row.cgYishou" type="number" placeholder="请输入回款金额" @change="sum" :disabled="scope.row.id" />
</el-form-item>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120" fixed="right">
<template #default="scope">
<el-button link type="danger" size="small" @click.prevent="onDeleteItem(scope.$index)" v-if="formData.cgTypee==1">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-col>
</el-row>
</el-card>
<template #footer> <template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button> <el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
@ -57,7 +133,14 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import * as OrderYsApi from '@/api/heli/orderys' import * as OrderYsApi from '@/api/heli/orderys'
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict"; import * as OrderYsDetailApi from '@/api/heli/orderysdetail'
import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from "@/utils/dict";
import CompositionSelect from "@/views/heli/hlvuestyle/compositionSelect.vue";
import EquipSelect from "@/views/heli/hlvuestyle/equipSelect.vue";
import * as ProjectOrderApi from "@/api/heli/projectorder";
import * as UserApi from "@/api/system/user";
import * as FpUserDetailApi from "@/api/heli/fpuserdetail";
import {number} from "vue-types";
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -73,14 +156,33 @@ const formData = ref({
cgTime: undefined, cgTime: undefined,
cgKhname: undefined, cgKhname: undefined,
cgYs: undefined, cgYs: undefined,
cgYishou: undefined, cgYishou: 0,
cgTypee: undefined, cgTypee: undefined,
orderYsDetails: [],
rem: undefined, rem: undefined,
}) })
// const subFormRules = reactive({
// paymentDate: [{
// required: true,
// message: '',
// trigger: 'blur'
// }],
// cgType: [{
// required: true,
// message: '',
// trigger: 'change'
// }],
// cgYishou: [{
// required: true,
// message: '',
// trigger: 'blur'
// }]
// })
const formRules = reactive({ const formRules = reactive({
}) })
const formRef = ref() // Ref const formRef = ref() // Ref
const OrderYsDetailSubFormRef = ref()
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, id?: number) => { const open = async (type: string, id?: number) => {
dialogVisible.value = true dialogVisible.value = true
@ -92,27 +194,84 @@ const open = async (type: string, id?: number) => {
formLoading.value = true formLoading.value = true
try { try {
formData.value = await OrderYsApi.getOrderYs(id) formData.value = await OrderYsApi.getOrderYs(id)
formData.value.orderYsDetails= await OrderYsDetailApi.getOrderYsDetails(id)
formData.value.orderYsDetails.map(o=>{
o.cgType=Number( o.cgType)
let date = new Date();
date.setFullYear(o.paymentDate[0]);
date.setMonth(o.paymentDate[1]-1);
date.setDate(o.paymentDate[2]);
o.paymentDate=date
})
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
/** 新增子项按钮操作 */
const onAddItem = () => {
const row = {
id: undefined,
cgYishou: undefined,
paymentDate:new Date(),
cgType: undefined,
cgId: undefined,
}
row.cgId = formData.value.id
formData.value.orderYsDetails.push(row)
}
/** 删除子项操作 */
const onDeleteItem = async (index) => {
if (index!=formData.value.orderYsDetails.length-1){
message.error(`请从最后一条数据开始删除`)
return false
}
let deletedItems = formData.value.orderYsDetails.splice(index, 1)
let id = deletedItems[0].id;
if (id) await OrderYsDetailApi.deleteOrderYsDetail(id)
formData.value.cgYishou=formData.value.orderYsDetails.reduce((sum, item) => sum + Number(item.cgYishou), 0);
}
const sum = async () => {
formData.value.cgYishou=formData.value.orderYsDetails.reduce((sum, item) => sum + Number(item.cgYishou), 0);
}
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success']) // success
const submitForm = async () => { const submitForm = async () => {
// //
await formRef.value.validate() // await formRef.value.validate()
if (formData.value.cgYishou<formData.value.cgYs&&formData.value.cgTypee==2){ // await OrderYsDetailSubFormRef.value.validate()
await message.confirm("已收金额小于应收金额,回款未完成,请确认") for (let i = 0; i < formData.value.orderYsDetails.length; i++) {
}else if (formData.value.cgYishou>=formData.value.cgYs&&formData.value.cgTypee==1){ if (formData.value.orderYsDetails[i].paymentDate==null){
await message.confirm("已收金额大于等于应收金额,回款已完成,请确认") message.error('第'+(i+1)+'行回款日期不能为空')
return false
}
if (formData.value.orderYsDetails[i].cgType==null){
message.error('第'+(i+1)+'行回款类型不能为空')
return false
}
if (formData.value.orderYsDetails[i].cgYishou==null){
message.error('第'+(i+1)+'行回款金额不能为空')
return false
}
}
if (formData.value.cgYishou!=''&&formData.value.cgYishou!=undefined&&formData.value.cgYishou!=null){
if (formData.value.cgYishou<formData.value.cgYs&&formData.value.cgTypee==2){
await message.confirm("已收金额小于应收金额,回款未完成,请确认")
}else if (formData.value.cgYishou>=formData.value.cgYs&&formData.value.cgTypee==1){
await message.confirm("已收金额大于等于应收金额,回款已完成,请确认")
}
}else {
if (formData.value.cgTypee==2){
await message.confirm("未输入已收金额,回款未完成,请确认")
}
} }
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as OrderYsApi.OrderYsVO const data = formData.value as unknown as OrderYsApi.OrderYsVO
if (formType.value === 'create') { if (formType.value === 'create') {
await OrderYsApi.createOrderYs(data) await OrderYsApi.createOrderYs(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -127,7 +286,6 @@ const submitForm = async () => {
formLoading.value = false formLoading.value = false
} }
} }
/** 重置表单 */ /** 重置表单 */
const resetForm = () => { const resetForm = () => {
formData.value = { formData.value = {

View File

@ -7,11 +7,29 @@
:rules="formRules" :rules="formRules"
label-width="108px" label-width="108px"
> >
<el-form-item label="岗位编码" prop="code" >
<el-input v-model="formData.code" placeholder="请输入岗位编码" class="!w-250px" :disabled="flag"/>
</el-form-item>
<el-form-item label="岗位名称" prop="name"> <el-form-item label="岗位名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入岗位名称" class="!w-250px" /> <el-input v-model="formData.name" placeholder="请输入岗位名称" class="!w-250px" />
</el-form-item> </el-form-item>
<el-form-item label="岗位编码" prop="code"> <el-form-item label="岗位层级" prop="grade">
<el-input v-model="formData.code" placeholder="请输入岗位编码" class="!w-250px" /> <el-select
v-model="formData.grade"
placeholder="请选择"
clearable
class="!w-240px"
@change="getGradeCost">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_GRADE)"
:key="dict.label"
:label="dict.label"
:value="dict.label"
/>
</el-select>
</el-form-item>
<el-form-item label="岗位成本" prop="gradeCost">
<el-input-number v-model="formData.gradeCost" :min="0" controls-position="right" class="!w-250px" />
</el-form-item> </el-form-item>
<el-form-item label="岗位顺序" prop="sort"> <el-form-item label="岗位顺序" prop="sort">
<el-input-number v-model="formData.sort" :min="0" controls-position="right" class="!w-250px" /> <el-input-number v-model="formData.sort" :min="0" controls-position="right" class="!w-250px" />
@ -48,6 +66,7 @@ const { t } = useI18n() // 国际化
const message = useMessage() // const message = useMessage() //
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const flag = ref(false) //
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
@ -57,7 +76,9 @@ const formData = ref({
code: '', code: '',
sort: 0, sort: 0,
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
remark: '' remark: '',
gradeCost:'',
grade:'',
}) })
const formRules = reactive({ const formRules = reactive({
name: [{ required: true, message: '岗位名称不能为空', trigger: 'blur' }], name: [{ required: true, message: '岗位名称不能为空', trigger: 'blur' }],
@ -73,6 +94,9 @@ const open = async (type: string, id?: number) => {
dialogVisible.value = true dialogVisible.value = true
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
if (formType.value!='create'){
flag.value=true
}
resetForm() resetForm()
// //
if (id) { if (id) {
@ -88,6 +112,19 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success']) // success
const getGradeCost = async (val) => {
if (val==''){
formData.value.gradeCost=''
}else {
var intDictOptions = getIntDictOptions(DICT_TYPE.HELI_GRADE);
intDictOptions.filter(item=>{
if (item.label==val){
formData.value.gradeCost=item.value
}
})
}
}
const submitForm = async () => { const submitForm = async () => {
// //
if (!formRef) return if (!formRef) return

View File

@ -66,8 +66,10 @@
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true" class="hl-table"> <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true" class="hl-table">
<el-table-column type="index" width="100" label="序号" align="center" /> <el-table-column type="index" width="100" label="序号" align="center" />
<el-table-column label="岗位名称" align="center" prop="name" />
<el-table-column label="岗位编码" align="center" prop="code" /> <el-table-column label="岗位编码" align="center" prop="code" />
<el-table-column label="岗位名称" align="center" prop="name" />
<el-table-column label="岗位层级" align="center" prop="grade" />
<el-table-column label="岗位成本" align="center" prop="gradeCost" />
<el-table-column label="岗位顺序" align="center" prop="sort" /> <el-table-column label="岗位顺序" align="center" prop="sort" />
<el-table-column label="岗位备注" align="center" prop="remark" /> <el-table-column label="岗位备注" align="center" prop="remark" />
<el-table-column label="启用状态" align="center" prop="status"> <el-table-column label="启用状态" align="center" prop="status">

View File

@ -14,13 +14,16 @@
</div> </div>
<div v-else class="shipments"> <div v-else class="shipments">
<span v-if="betweenDay(new Date(), new Date(formData.projectEndTime)) == -1" <span
v-if="betweenDay(new Date(), new Date(formData.projectEndTime)) == -1"
class="shipmentsfont">距交货还有{{ betweenDay(new Date(), new Date(formData.projectEndTime)) + 1 }} class="shipmentsfont">距交货还有{{ betweenDay(new Date(), new Date(formData.projectEndTime)) + 1 }}
</span> </span>
<span v-else-if="betweenDay(new Date(), new Date(formData.projectEndTime)) < -1" <span
v-else-if="betweenDay(new Date(), new Date(formData.projectEndTime)) < -1"
class="shipmentsfont">距交货还有{{ betweenDay(new Date(), new Date(formData.projectEndTime)) + 1 }} class="shipmentsfont">距交货还有{{ betweenDay(new Date(), new Date(formData.projectEndTime)) + 1 }}
</span> </span>
<span v-else <span
v-else
class="shipmentsfont">距交货还有{{ betweenDay(new Date(), new Date(formData.projectEndTime)) + 1 }} class="shipmentsfont">距交货还有{{ betweenDay(new Date(), new Date(formData.projectEndTime)) + 1 }}
</span> </span>
@ -43,9 +46,11 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="项目编号" prop="code"> <el-form-item label="项目编号" prop="code">
<el-input v-if="query.active != 'detailArchive'" disabled <el-input
v-if="query.active != 'detailArchive'" disabled
v-model="formData.code" class="!w-250px" placeholder="系统自动生成" /> v-model="formData.code" class="!w-250px" placeholder="系统自动生成" />
<el-input v-else disabled v-model="formData.snapshotCode" class="!w-250px" <el-input
v-else disabled v-model="formData.snapshotCode" class="!w-250px"
placeholder="系统自动生成" /> placeholder="系统自动生成" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -53,7 +58,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="提出部门" prop="businessDeptId"> <el-form-item label="提出部门" prop="businessDeptId">
<el-tree-select class="!w-250px" v-model="formData.businessDeptId" <el-tree-select
class="!w-250px" v-model="formData.businessDeptId"
:data="deptList" :props="defaultProps" check-strictly node-key="id" :data="deptList" :props="defaultProps" check-strictly node-key="id"
clearable placeholder="请选择提出部门" clearable placeholder="请选择提出部门"
:disabled="alterDisabled || detailDisabled || priceDisabled" /> :disabled="alterDisabled || detailDisabled || priceDisabled" />
@ -63,7 +69,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="项目名称" prop="projectName"> <el-form-item label="项目名称" prop="projectName">
<el-input class="!w-250px" :disabled="alterDisabled || detailDisabled || priceDisabled" <el-input
class="!w-250px" :disabled="alterDisabled || detailDisabled || priceDisabled"
v-model="formData.projectName" placeholder="请输入项目名称" /> v-model="formData.projectName" placeholder="请输入项目名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -71,7 +78,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="项目开始日期" prop="projectStartTime"> <el-form-item label="项目开始日期" prop="projectStartTime">
<el-date-picker class="!w-250px" v-model="formData.projectStartTime" <el-date-picker
class="!w-250px" v-model="formData.projectStartTime"
type="date" value-format="x" placeholder="选择项目开始日期" type="date" value-format="x" placeholder="选择项目开始日期"
:disabled="alterDisabled || detailDisabled || priceDisabled" /> :disabled="alterDisabled || detailDisabled || priceDisabled" />
</el-form-item> </el-form-item>
@ -82,7 +90,8 @@
<el-form-item label="首付款" prop="shouFuKuan"> <el-form-item label="首付款" prop="shouFuKuan">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-input-number v-model="formData.shouFuKuan" <el-input-number
v-model="formData.shouFuKuan"
:disabled="detailDisabled || formData.hasPrice == 0" :disabled="detailDisabled || formData.hasPrice == 0"
placeholder="请输入首付款" @blur="handleBlur" :controls="false" :min="0" placeholder="请输入首付款" @blur="handleBlur" :controls="false" :min="0"
:precision="6" style="width: 150px" :precision="6" style="width: 150px"
@ -101,7 +110,8 @@
<el-form-item label="第三笔款" prop="threeFuKuan"> <el-form-item label="第三笔款" prop="threeFuKuan">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-input-number v-model="formData.threeFuKuan" <el-input-number
v-model="formData.threeFuKuan"
:disabled="detailDisabled || formData.hasPrice == 0" :disabled="detailDisabled || formData.hasPrice == 0"
placeholder="输入第三笔付款" @blur="threehandleBlur" :controls="false" placeholder="输入第三笔付款" @blur="threehandleBlur" :controls="false"
:min="0" :precision="6" style="width: 150px" :min="0" :precision="6" style="width: 150px"
@ -120,7 +130,8 @@
<el-form-item label="第五笔款" prop="fiveFuKuan"> <el-form-item label="第五笔款" prop="fiveFuKuan">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-input-number v-model="formData.fiveFuKuan" <el-input-number
v-model="formData.fiveFuKuan"
:disabled="detailDisabled || formData.hasPrice == 0" :disabled="detailDisabled || formData.hasPrice == 0"
placeholder="输入第三笔付款" @blur="fivehandleBlur" :controls="false" placeholder="输入第三笔付款" @blur="fivehandleBlur" :controls="false"
:min="0" :precision="6" style="width: 150px" :min="0" :precision="6" style="width: 150px"
@ -151,7 +162,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="业务员" prop="businessMan"> <el-form-item label="业务员" prop="businessMan">
<el-tree-select class="!w-250px" v-model="formData.businessMan" <el-tree-select
class="!w-250px" v-model="formData.businessMan"
:data="userList" :props="userProps" check-strictly node-key="id" :data="userList" :props="userProps" check-strictly node-key="id"
clearable placeholder="请选择业务员" clearable placeholder="请选择业务员"
:disabled="alterDisabled || detailDisabled || priceDisabled" /> :disabled="alterDisabled || detailDisabled || priceDisabled" />
@ -164,7 +176,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="所属业务线" prop="businessLine"> <el-form-item label="所属业务线" prop="businessLine">
<el-select class="!w-250px" v-model="formData.businessLine" <el-select
class="!w-250px" v-model="formData.businessLine"
placeholder="请选择所属业务线" :disabled="alterDisabled || detailDisabled"> placeholder="请选择所属业务线" :disabled="alterDisabled || detailDisabled">
<el-option <el-option
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_BUSINESS_LINE)" v-for="dict in getStrDictOptions(DICT_TYPE.HELI_BUSINESS_LINE)"
@ -176,11 +189,13 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="项目结束日期" prop="projectEndTime"> <el-form-item label="项目结束日期" prop="projectEndTime">
<el-date-picker class="!w-250px" <el-date-picker
class="!w-250px"
:class="{ 'alter-class': fieldHasAlter('projectEndTime') }" :class="{ 'alter-class': fieldHasAlter('projectEndTime') }"
v-model="formData.projectEndTime" type="date" value-format="x" v-model="formData.projectEndTime" type="date" value-format="x"
placeholder="选择项目结束日期" :disabled="detailDisabled || priceDisabled" /> placeholder="选择项目结束日期" :disabled="detailDisabled || priceDisabled" />
<span style="position: absolute; left: 0; top: 30px" <span
style="position: absolute; left: 0; top: 30px"
v-if="formData.projectStartTime && formData.projectEndTime">{{ v-if="formData.projectStartTime && formData.projectEndTime">{{
' 共计' + ' 共计' +
betweenDay1( betweenDay1(
@ -195,7 +210,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="首付款预计时间" prop="shouFuKuanTime"> <el-form-item label="首付款预计时间" prop="shouFuKuanTime">
<el-date-picker class="!w-250px" v-model="formData.shouFuKuanTime" <el-date-picker
class="!w-250px" v-model="formData.shouFuKuanTime"
type="date" value-format="x" placeholder="选择日期" type="date" value-format="x" placeholder="选择日期"
:disabled="detailDisabled || formData.hasPrice == 0" /> :disabled="detailDisabled || formData.hasPrice == 0" />
</el-form-item> </el-form-item>
@ -205,7 +221,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="第三笔款预计时间" prop="threeFuKuanTime"> <el-form-item label="第三笔款预计时间" prop="threeFuKuanTime">
<el-date-picker class="!w-250px" v-model="formData.threeFuKuanTime" <el-date-picker
class="!w-250px" v-model="formData.threeFuKuanTime"
type="date" value-format="x" placeholder="选择日期" type="date" value-format="x" placeholder="选择日期"
:disabled="detailDisabled || formData.hasPrice == 0" /> :disabled="detailDisabled || formData.hasPrice == 0" />
</el-form-item> </el-form-item>
@ -215,7 +232,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="第五笔款预计时间" prop="fiveFuKuanTime"> <el-form-item label="第五笔款预计时间" prop="fiveFuKuanTime">
<el-date-picker class="!w-250px" v-model="formData.fiveFuKuanTime" <el-date-picker
class="!w-250px" v-model="formData.fiveFuKuanTime"
type="date" value-format="x" placeholder="选择日期" type="date" value-format="x" placeholder="选择日期"
:disabled="detailDisabled || formData.hasPrice == 0" /> :disabled="detailDisabled || formData.hasPrice == 0" />
</el-form-item> </el-form-item>
@ -228,7 +246,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="可引用的原有技术" prop="referenceTechnology"> <el-form-item label="可引用的原有技术" prop="referenceTechnology">
<el-input class="!w-703px" :disabled="detailDisabled || priceDisabled" <el-input
class="!w-703px" :disabled="detailDisabled || priceDisabled"
v-model="formData.referenceTechnology" placeholder="请输入可引用的原有技术" v-model="formData.referenceTechnology" placeholder="请输入可引用的原有技术"
:class="{ 'alter-class': fieldHasAlter('referenceTechnology') }" /> :class="{ 'alter-class': fieldHasAlter('referenceTechnology') }" />
</el-form-item> </el-form-item>
@ -248,17 +267,20 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="客户名称" prop="customerId"> <el-form-item label="客户名称" prop="customerId">
<ClientSelect :disabled="alterDisabled || detailDisabled || priceDisabled" <ClientSelect
v-model="formData.customerId" @update:newValue="handleSelectedClient" /> :disabled="alterDisabled || detailDisabled || priceDisabled"
v-model="formData.customerId" @update:new-value="handleSelectedClient" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="性质" prop="property"> <el-form-item label="性质" prop="property">
<el-select class="!w-250px" :class="{ 'alter-class': fieldHasAlter('property') }" <el-select
class="!w-250px" :class="{ 'alter-class': fieldHasAlter('property') }"
:disabled="detailDisabled || priceDisabled" v-model="formData.property" placeholder="请选择性质"> :disabled="detailDisabled || priceDisabled" v-model="formData.property" placeholder="请选择性质">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PROPERTY)" <el-option
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PROPERTY)"
:key="dict.value" :label="dict.label" :value="dict.value" /> :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -267,9 +289,11 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="是否有价格" prop="hasPrice"> <el-form-item label="是否有价格" prop="hasPrice">
<el-radio-group v-model="formData.hasPrice" :disabled="detailDisabled || priceDisabled" <el-radio-group
v-model="formData.hasPrice" :disabled="detailDisabled || priceDisabled"
:class="{ 'alter-class': fieldHasAlter('hasPrice') }"> :class="{ 'alter-class': fieldHasAlter('hasPrice') }">
<el-radio v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)" <el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)"
:key="dict.value" :label="dict.value"> :key="dict.value" :label="dict.value">
{{ dict.label }} {{ dict.label }}
</el-radio> </el-radio>
@ -284,7 +308,8 @@
<el-form-item label="第二笔款" prop="twoFuKuan"> <el-form-item label="第二笔款" prop="twoFuKuan">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-input-number v-model="formData.twoFuKuan" <el-input-number
v-model="formData.twoFuKuan"
:disabled="detailDisabled || formData.hasPrice == 0" placeholder="输入第二笔付款" :disabled="detailDisabled || formData.hasPrice == 0" placeholder="输入第二笔付款"
@blur="twohandleBlur" :controls="false" :min="0" :precision="6" @blur="twohandleBlur" :controls="false" :min="0" :precision="6"
style="width: 150px" :class="{ 'alter-class': fieldHasAlter('price') }" /> style="width: 150px" :class="{ 'alter-class': fieldHasAlter('price') }" />
@ -302,7 +327,8 @@
<el-form-item label="第四笔款" prop="fourFuKuan"> <el-form-item label="第四笔款" prop="fourFuKuan">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-input-number v-model="formData.fourFuKuan" <el-input-number
v-model="formData.fourFuKuan"
:disabled="detailDisabled || formData.hasPrice == 0" placeholder="输入第四笔付款" :disabled="detailDisabled || formData.hasPrice == 0" placeholder="输入第四笔付款"
@blur="fourhandleBlur" :controls="false" :min="0" :precision="6" @blur="fourhandleBlur" :controls="false" :min="0" :precision="6"
style="width: 150px" :class="{ 'alter-class': fieldHasAlter('price') }" /> style="width: 150px" :class="{ 'alter-class': fieldHasAlter('price') }" />
@ -319,7 +345,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="第六笔款" prop="sixFuKuan"> <el-form-item label="第六笔款" prop="sixFuKuan">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-input-number v-model="formData.sixFuKuan" <el-input-number
v-model="formData.sixFuKuan"
:disabled="detailDisabled || formData.hasPrice == 0" placeholder="输入第六笔付款" :disabled="detailDisabled || formData.hasPrice == 0" placeholder="输入第六笔付款"
@blur="sixhandleBlur" :controls="false" :min="0" :precision="6" @blur="sixhandleBlur" :controls="false" :min="0" :precision="6"
style="width: 150px" :class="{ 'alter-class': fieldHasAlter('price') }" /> style="width: 150px" :class="{ 'alter-class': fieldHasAlter('price') }" />
@ -337,9 +364,11 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="是否紧急" prop="isUrgency"> <el-form-item label="是否紧急" prop="isUrgency">
<el-radio-group v-model="formData.isUrgency" :disabled="detailDisabled || priceDisabled" <el-radio-group
v-model="formData.isUrgency" :disabled="detailDisabled || priceDisabled"
:class="{ 'alter-class': fieldHasAlter('isUrgency') }"> :class="{ 'alter-class': fieldHasAlter('isUrgency') }">
<el-radio v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)" <el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)"
:key="dict.value" :label="dict.value"> :key="dict.value" :label="dict.value">
{{ dict.label }} {{ dict.label }}
</el-radio> </el-radio>
@ -359,7 +388,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="合同号" prop="contractNo"> <el-form-item label="合同号" prop="contractNo">
<el-input class="!w-250px" :disabled="alterDisabled || detailDisabled || priceDisabled" <el-input
class="!w-250px" :disabled="detailDisabled || priceDisabled"
v-model="formData.contractNo" placeholder="请输入合同号" /> v-model="formData.contractNo" placeholder="请输入合同号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -367,7 +397,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="模具图号" prop="blueprintNo"> <el-form-item label="模具图号" prop="blueprintNo">
<el-input class="!w-250px" :disabled="alterDisabled || detailDisabled || priceDisabled" <el-input
class="!w-250px" :disabled="alterDisabled || detailDisabled || priceDisabled"
v-model="formData.blueprintNo" placeholder="请输入模具图号" /> v-model="formData.blueprintNo" placeholder="请输入模具图号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -376,14 +407,17 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="价格(元)" prop="price"> <el-form-item label="价格(元)" prop="price">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-input-number v-model="formData.price" <el-input-number
v-model="formData.price"
:disabled="detailDisabled || formData.hasPrice == 0" placeholder="请输入价格" :disabled="detailDisabled || formData.hasPrice == 0" placeholder="请输入价格"
:controls="false" :min="0" :precision="6" style="width: 150px" :controls="false" :min="0" :precision="6" style="width: 150px"
:class="{ 'alter-class': fieldHasAlter('price') }" /> :class="{ 'alter-class': fieldHasAlter('price') }" />
<el-select :disabled="detailDisabled" v-model="formData.currency" <el-select
:disabled="detailDisabled" v-model="formData.currency"
placeholder="请选择币种" style="width: 100px" placeholder="请选择币种" style="width: 100px"
:class="{ 'alter-class': fieldHasAlter('currency') }"> :class="{ 'alter-class': fieldHasAlter('currency') }">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.HELI_CURRENCY)" <el-option
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_CURRENCY)"
:key="dict.value" :label="dict.label" :value="dict.value" /> :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select> </el-select>
</div> </div>
@ -395,7 +429,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="第二笔预计时间" prop="twoFuKuanTime"> <el-form-item label="第二笔预计时间" prop="twoFuKuanTime">
<el-date-picker class="!w-250px" v-model="formData.twoFuKuanTime" type="date" <el-date-picker
class="!w-250px" v-model="formData.twoFuKuanTime" type="date"
value-format="x" placeholder="选择日期" value-format="x" placeholder="选择日期"
:disabled="detailDisabled || formData.hasPrice == 0" /> :disabled="detailDisabled || formData.hasPrice == 0" />
</el-form-item> </el-form-item>
@ -405,7 +440,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="第四笔款预计时间" prop="fourFuKuanTime"> <el-form-item label="第四笔款预计时间" prop="fourFuKuanTime">
<el-date-picker class="!w-250px" v-model="formData.fourFuKuanTime" type="date" <el-date-picker
class="!w-250px" v-model="formData.fourFuKuanTime" type="date"
value-format="x" placeholder="选择日期" value-format="x" placeholder="选择日期"
:disabled="detailDisabled || formData.hasPrice == 0" /> :disabled="detailDisabled || formData.hasPrice == 0" />
</el-form-item> </el-form-item>
@ -415,7 +451,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="第六笔款预计时间" prop="sixFuKuanTime"> <el-form-item label="第六笔款预计时间" prop="sixFuKuanTime">
<el-date-picker class="!w-250px" v-model="formData.sixFuKuanTime" type="date" <el-date-picker
class="!w-250px" v-model="formData.sixFuKuanTime" type="date"
value-format="x" placeholder="选择日期" value-format="x" placeholder="选择日期"
:disabled="detailDisabled || formData.hasPrice == 0" /> :disabled="detailDisabled || formData.hasPrice == 0" />
</el-form-item> </el-form-item>
@ -426,7 +463,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="是否已变更" prop="hasAlter"> <el-form-item label="是否已变更" prop="hasAlter">
<el-select class="!w-250px" v-model="formData.hasAlter" placeholder="请选择" disabled> <el-select class="!w-250px" v-model="formData.hasAlter" placeholder="请选择" disabled>
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)" <el-option
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)"
:key="dict.value" :label="dict.label" :value="dict.value" /> :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -437,14 +475,16 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检验要求" prop="qualityRequirement"> <el-form-item label="检验要求" prop="qualityRequirement">
<el-input class="!w-703px" :disabled="detailDisabled || priceDisabled " type="textarea" <el-input
class="!w-703px" :disabled="detailDisabled || priceDisabled " type="textarea"
v-model="formData.qualityRequirement" placeholder="请输入检验要求" show-word-limit v-model="formData.qualityRequirement" placeholder="请输入检验要求" show-word-limit
maxlength="200" :class="{ 'alter-class': fieldHasAlter('qualityRequirement') }" /> maxlength="200" :class="{ 'alter-class': fieldHasAlter('qualityRequirement') }" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="备注" prop="remark" :disabled="detailDisabled"> <el-form-item label="备注" prop="remark" :disabled="detailDisabled">
<el-input class="!w-703px" :disabled="detailDisabled || priceDisabled" type="textarea" <el-input
class="!w-703px" :disabled="detailDisabled || priceDisabled" type="textarea"
v-model="formData.remark" placeholder="请输入检验备注" show-word-limit maxlength="200" v-model="formData.remark" placeholder="请输入检验备注" show-word-limit maxlength="200"
:class="{ 'alter-class': fieldHasAlter('remark') }" /> :class="{ 'alter-class': fieldHasAlter('remark') }" />
</el-form-item> </el-form-item>
@ -458,9 +498,11 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="有无合同" prop="hasContract"> <el-form-item label="有无合同" prop="hasContract">
<el-radio-group :disabled="detailDisabled || priceDisabled" v-model="formData.hasContract" <el-radio-group
:disabled="detailDisabled || priceDisabled" v-model="formData.hasContract"
:class="{ 'alter-class': fieldHasAlter('hasContract') }"> :class="{ 'alter-class': fieldHasAlter('hasContract') }">
<el-radio v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)" <el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)"
:key="dict.value" :label="dict.value"> :key="dict.value" :label="dict.value">
{{ dict.label }} {{ dict.label }}
</el-radio> </el-radio>
@ -469,9 +511,11 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="有无技术协议" prop="hasTechnologyProtocol"> <el-form-item label="有无技术协议" prop="hasTechnologyProtocol">
<el-radio-group :disabled="detailDisabled || priceDisabled" v-model="formData.hasTechnologyProtocol" <el-radio-group
:disabled="detailDisabled || priceDisabled" v-model="formData.hasTechnologyProtocol"
:class="{ 'alter-class': fieldHasAlter('hasTechnologyProtocol') }"> :class="{ 'alter-class': fieldHasAlter('hasTechnologyProtocol') }">
<el-radio v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)" <el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)"
:key="dict.value" :label="dict.value"> :key="dict.value" :label="dict.value">
{{ dict.label }} {{ dict.label }}
</el-radio> </el-radio>
@ -480,9 +524,11 @@
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="有无图纸/数模" prop="hasBlueprint"> <el-form-item label="有无图纸/数模" prop="hasBlueprint">
<el-radio-group :disabled="detailDisabled || priceDisabled" v-model="formData.hasBlueprint" <el-radio-group
:disabled="detailDisabled || priceDisabled" v-model="formData.hasBlueprint"
:class="{ 'alter-class': fieldHasAlter('hasBlueprint') }"> :class="{ 'alter-class': fieldHasAlter('hasBlueprint') }">
<el-radio v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)" <el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)"
:key="dict.value" :label="dict.value"> :key="dict.value" :label="dict.value">
{{ dict.label }} {{ dict.label }}
</el-radio> </el-radio>
@ -491,7 +537,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="" label-width="0" prop="blueprintRemark"> <el-form-item label="" label-width="0" prop="blueprintRemark">
<el-input v-model="formData.blueprintRemark" placeholder="请输入图纸/数模说明" :disabled=" <el-input
v-model="formData.blueprintRemark" placeholder="请输入图纸/数模说明" :disabled="
detailDisabled || (formData.hasBlueprint == 0 && (formData.blueprintRemark = '')) || priceDisabled detailDisabled || (formData.hasBlueprint == 0 && (formData.blueprintRemark = '')) || priceDisabled
" :class="{ 'alter-class': fieldHasAlter('blueprintRemark') }" /> " :class="{ 'alter-class': fieldHasAlter('blueprintRemark') }" />
</el-form-item> </el-form-item>
@ -509,17 +556,21 @@
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增 <el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增
</el-button> </el-button>
</el-col> </el-col>
<el-form ref="projectOrderSubFormRef" :model="formData.projectOrderSubs" <el-form
ref="projectOrderSubFormRef" :model="formData.projectOrderSubs"
:rules="subFormRules" v-loading="subFormLoading" label-width="0"> :rules="subFormRules" v-loading="subFormLoading" label-width="0">
<el-table :data="formData.projectOrderSubs" class="hl-table" <el-table
:data="formData.projectOrderSubs" class="hl-table"
:row-class-name="({row,rowIndex}) => { return fieldHasAlterInRow('NEW', row) ? 'alter-class1' : ''}"> :row-class-name="({row,rowIndex}) => { return fieldHasAlterInRow('NEW', row) ? 'alter-class1' : ''}">
<el-table-column label="序号" type="index" width="80" /> <el-table-column label="序号" type="index" width="80" />
<el-table-column min-width="200" align="center"> <el-table-column 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="{ row, $index }"> <template #default="{ row, $index }">
<el-form-item :prop="`${$index}.name`" :rules="subFormRules.name" <el-form-item
:prop="`${$index}.name`" :rules="subFormRules.name"
class="mb-0px!"> class="mb-0px!">
<el-input :disabled="detailDisabled || row.id || priceDisabled" v-model="row.name" <el-input
:disabled="detailDisabled || row.id || priceDisabled" v-model="row.name"
placeholder="请输入子项目名称" /> placeholder="请输入子项目名称" />
</el-form-item> </el-form-item>
</template> </template>
@ -531,10 +582,12 @@
</el-form-item> </el-form-item>
</template> --> </template> -->
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-form-item :prop="`${$index}.deviceModel`" <el-form-item
:prop="`${$index}.deviceModel`"
:rules="subFormRules.deviceModel" class="mb-0px!"> :rules="subFormRules.deviceModel" class="mb-0px!">
<EquipSelect v-model="row.deviceModel" <EquipSelect
@update:newValue="handleSelectedequip($index, $event)" v-model="row.deviceModel"
@update:new-value="handleSelectedequip($index, $event)"
:disabled="detailDisabled || (alterDisabled && row.id) || priceDisabled" /> :disabled="detailDisabled || (alterDisabled && row.id) || priceDisabled" />
</el-form-item> </el-form-item>
</template> </template>
@ -542,9 +595,11 @@
<el-table-column min-width="125" align="center"> <el-table-column min-width="125" align="center">
<template #header> <span class="hl-table_header">*</span>数量 </template> <template #header> <span class="hl-table_header">*</span>数量 </template>
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-form-item :prop="`${$index}.amount`" :rules="subFormRules.amount" <el-form-item
:prop="`${$index}.amount`" :rules="subFormRules.amount"
class="mb-0px!"> class="mb-0px!">
<el-input-number style="width: 100%" :disabled="auditDisabled&&(detailDisabled || priceDisabled)" <el-input-number
style="width: 100%" :disabled="auditDisabled&&(detailDisabled || priceDisabled)"
v-model="row.amount" placeholder="请输入数量" :min="0" :precision="0" v-model="row.amount" placeholder="请输入数量" :min="0" :precision="0"
:class="{ 'alter-class': fieldHasAlterInRow('amount', row) }" /> :class="{ 'alter-class': fieldHasAlterInRow('amount', row) }" />
</el-form-item> </el-form-item>
@ -553,9 +608,11 @@
<el-table-column min-width="125" align="center"> <el-table-column min-width="125" align="center">
<template #header> <span class="hl-table_header">*</span>单位 </template> <template #header> <span class="hl-table_header">*</span>单位 </template>
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-form-item :prop="`${$index}.unit`" :rules="subFormRules.unit" <el-form-item
:prop="`${$index}.unit`" :rules="subFormRules.unit"
class="mb-0px!"> class="mb-0px!">
<el-select :disabled="detailDisabled || priceDisabled" v-model="row.unit" <el-select
:disabled="detailDisabled || priceDisabled" v-model="row.unit"
placeholder="请选择单位" placeholder="请选择单位"
:class="{ 'alter-class': fieldHasAlterInRow('unit', row) }"> :class="{ 'alter-class': fieldHasAlterInRow('unit', row) }">
<el-option <el-option
@ -568,10 +625,12 @@
<el-table-column min-width="150" align="center"> <el-table-column min-width="150" align="center">
<template #header> <span class="hl-table_header">*</span>材质 </template> <template #header> <span class="hl-table_header">*</span>材质 </template>
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-form-item :prop="`${$index}.compositionId`" <el-form-item
:prop="`${$index}.compositionId`"
:rules="subFormRules.compositionId" class="mb-0px!"> :rules="subFormRules.compositionId" class="mb-0px!">
<CompositionSelect v-model="row.compositionId" <CompositionSelect
@update:newValue="handleSelectedcomposition($index, $event)" v-model="row.compositionId"
@update:new-value="handleSelectedcomposition($index, $event)"
:disabled="detailDisabled || priceDisabled" :disabled="detailDisabled || priceDisabled"
:class="{ 'alter-class': fieldHasAlterInRow('compositionId', row) }" /> :class="{ 'alter-class': fieldHasAlterInRow('compositionId', row) }" />
</el-form-item> </el-form-item>
@ -579,9 +638,11 @@
</el-table-column> </el-table-column>
<el-table-column label="备注" min-width="180" align="center"> <el-table-column label="备注" min-width="180" align="center">
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-form-item :prop="`${$index}.remark`" :rules="subFormRules.remark" <el-form-item
:prop="`${$index}.remark`" :rules="subFormRules.remark"
class="mb-0px!"> class="mb-0px!">
<el-input :disabled="detailDisabled || priceDisabled" v-model="row.remark" <el-input
:disabled="detailDisabled || priceDisabled" v-model="row.remark"
placeholder="请输入备注" placeholder="请输入备注"
:class="{ 'alter-class': fieldHasAlterInRow('remark', row) }" /> :class="{ 'alter-class': fieldHasAlterInRow('remark', row) }" />
</el-form-item> </el-form-item>
@ -611,7 +672,8 @@
<el-col> <el-col>
<el-card class="hl-incard" :class="{ 'alter-class': fieldHasAlter('attachments') }"> <el-card class="hl-incard" :class="{ 'alter-class': fieldHasAlter('attachments') }">
<el-col v-if="'update,create,alter'.indexOf(query.active) > -1"> <el-col v-if="'update,create,alter'.indexOf(query.active) > -1">
<el-upload v-if="formData.hasContract == 1" ref="contractUploadRef" <el-upload
v-if="formData.hasContract == 1" ref="contractUploadRef"
:file-list="contractUploadFiles" multiple :action="uploadUrl" :headers="{ :file-list="contractUploadFiles" multiple :action="uploadUrl" :headers="{
Authorization: 'Bearer ' + getAccessToken(), Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId() 'tenant-id': getTenantId()
@ -622,7 +684,8 @@
<Icon icon="ep:upload-filled" />上传合同 <Icon icon="ep:upload-filled" />上传合同
</el-button> </el-button>
</el-upload> </el-upload>
<el-upload v-if="formData.hasTechnologyProtocol == 1" ref="protocolUploadRef" multiple <el-upload
v-if="formData.hasTechnologyProtocol == 1" ref="protocolUploadRef" multiple
:action="uploadUrl" :headers="{ :action="uploadUrl" :headers="{
Authorization: 'Bearer ' + getAccessToken(), Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId() 'tenant-id': getTenantId()
@ -634,7 +697,8 @@
</el-button> </el-button>
</el-upload> </el-upload>
</el-col> </el-col>
<el-table :data="formData.attachments" v-loading.fullscreen.lock="uploading" <el-table
:data="formData.attachments" v-loading.fullscreen.lock="uploading"
element-loading-text="附件上传中..." element-loading-background="rgba(122, 122, 122, 0.6)" element-loading-text="附件上传中..." element-loading-background="rgba(122, 122, 122, 0.6)"
class="hl-table"> class="hl-table">
<el-table-column prop="name" label="文件名称" align="center" /> <el-table-column prop="name" label="文件名称" align="center" />
@ -645,16 +709,19 @@
}} }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" align="center" label="上传时间" <el-table-column
prop="createTime" align="center" label="上传时间"
:formatter="dateFormatter" /> :formatter="dateFormatter" />
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template #default="scope"> <template #default="scope">
<el-button v-if="'update,create,alter'.indexOf(query.active) > -1" link <el-button
v-if="'update,create,alter'.indexOf(query.active) > -1" link
type="danger" size="small" type="danger" size="small"
@click="handleDeleteAttachment(scope.$index, scope.row.businessFileType)"> @click="handleDeleteAttachment(scope.$index, scope.row.businessFileType)">
删除 删除
</el-button> </el-button>
<el-button v-if="!!scope.row.id" link type="primary" size="small" <el-button
v-if="!!scope.row.id" link type="primary" size="small"
@click="downloadAttachment(scope.row.name, scope.row.url)"> @click="downloadAttachment(scope.row.name, scope.row.url)">
下载 下载
</el-button> </el-button>
@ -672,7 +739,8 @@
<el-row> <el-row>
<el-col> <el-col>
<el-card class="hl-incard"> <el-card class="hl-incard">
<el-table v-if="formData && formData.operateLogs" :data="formData.operateLogs" <el-table
v-if="formData && formData.operateLogs" :data="formData.operateLogs"
class="hl-table" :style="{ height: formData.operateLogs.length > 10 ? '450px' : '' }"> class="hl-table" :style="{ height: formData.operateLogs.length > 10 ? '450px' : '' }">
<el-table-column prop="type" label="操作" align="center"> <el-table-column prop="type" label="操作" align="center">
<template #default="scope"> <template #default="scope">
@ -680,7 +748,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userNickname" label="操作人" align="center" /> <el-table-column prop="userNickname" label="操作人" align="center" />
<el-table-column label="操作时间" align="center" prop="startTime" width="220" <el-table-column
label="操作时间" align="center" prop="startTime" width="220"
:formatter="dateFormatter" /> :formatter="dateFormatter" />
<el-table-column prop="content" label="操作意见" align="center" /> <el-table-column prop="content" label="操作意见" align="center" />
</el-table> </el-table>
@ -689,31 +758,40 @@
</el-row> </el-row>
</el-card> </el-card>
</el-form> </el-form>
<div class="text-center hl-footer"> <div class="hl-footer text-center">
<el-button @click="() => router.back()" size="large"> </el-button> <el-button @click="() => router.back()" size="large"> </el-button>
<el-button v-if="'update,create'.indexOf(query.active) > -1 && formData.orderStatus <= 4" <el-button
v-if="'update,create'.indexOf(query.active) > -1 && formData.orderStatus <= 4"
@click="submitForm('SAVE')" type="success" size="large" :disabled="saveDisabled"> </el-button> @click="submitForm('SAVE')" type="success" size="large" :disabled="saveDisabled"> </el-button>
<el-button v-if="'price'.indexOf(query.active) > -1" <el-button
v-if="'price'.indexOf(query.active) > -1"
@click="submitForm('PRICE')" type="success" size="large"> </el-button> @click="submitForm('PRICE')" type="success" size="large"> </el-button>
<el-button v-if="'update,create'.indexOf(query.active) > -1 && formData.orderStatus < 8" <el-button
v-if="'update,create'.indexOf(query.active) > -1 && formData.orderStatus < 8"
@click="submitForm('SUBMIT_AUDIT')" type="primary" size="large" :disabled="submitDisabled"> </el-button> @click="submitForm('SUBMIT_AUDIT')" type="primary" size="large" :disabled="submitDisabled"> </el-button>
<el-button v-if="query.active == 'audit' && formData.orderStatus == 8" @click="submitForm('AUDIT')" <el-button
v-if="query.active == 'audit' && formData.orderStatus == 8" @click="submitForm('AUDIT')"
type="primary" size="large"> </el-button> type="primary" size="large"> </el-button>
<el-button v-if="query.active == 'approve' && formData.orderStatus == 16" @click="submitForm('APPROVE')" <el-button
v-if="query.active == 'approve' && formData.orderStatus == 16" @click="submitForm('APPROVE')"
type="primary" size="large"> </el-button> type="primary" size="large"> </el-button>
<el-button v-if="query.active == 'alter' && formData.orderStatus == 32" @click="submitForm('ALTER')" <el-button
v-if="query.active == 'alter' && formData.orderStatus == 32" @click="submitForm('ALTER')"
type="danger" size="large">发起变更</el-button> type="danger" size="large">发起变更</el-button>
<el-button v-if=" <el-button
v-if="
'audit,approve'.indexOf(query.active) > -1 && 'audit,approve'.indexOf(query.active) > -1 &&
(formData.orderStatus == 8 || formData.orderStatus == 16) (formData.orderStatus == 8 || formData.orderStatus == 16)
" @click="activeOpinionDialogVisible = true" type="danger" size="large"> </el-button> " @click="activeOpinionDialogVisible = true" type="danger" size="large"> </el-button>
<el-button v-if="query.active == 'terminate' && formData.orderStatus == 32" @click="submitForm('TERMINATE')" <el-button
v-if="query.active == 'terminate' && formData.orderStatus == 32" @click="submitForm('TERMINATE')"
type="danger" size="large">直接终止</el-button> type="danger" size="large">直接终止</el-button>
</div> </div>
</el-card> </el-card>
<el-dialog v-model="activeOpinionDialogVisible" title="打回原因" width="30%" center> <el-dialog v-model="activeOpinionDialogVisible" title="打回原因" width="30%" center>
<el-input type="textarea" v-model="formData.activeOpinion" placeholder="请输入打回原因" show-word-limit <el-input
type="textarea" v-model="formData.activeOpinion" placeholder="请输入打回原因" show-word-limit
maxlength="200" /> maxlength="200" />
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">

View File

@ -94,8 +94,8 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PURCHASE_ORDER_STATUS).filter(it
<dict-tag :type="DICT_TYPE.HELI_CURRENCY" :value="scope.row.currencyType" /> <dict-tag :type="DICT_TYPE.HELI_CURRENCY" :value="scope.row.currencyType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="暂估金额(元)" align="center" prop="estimatedPrice" min-width="180"/> <el-table-column label="暂估价(元)" align="center" prop="estimatedPrice" min-width="180"/>
<el-table-column label="实际金额(元)" align="center" prop="actualPrice" min-width="180"/> <el-table-column label="实际价(元)" align="center" prop="actualPrice" min-width="180"/>
<el-table-column label="税率" align="center" prop="taxRatio" min-width="180" /> <el-table-column label="税率" align="center" prop="taxRatio" min-width="180" />
<el-table-column label="备注" align="center" prop="description" min-width="180" /> <el-table-column label="备注" align="center" prop="description" min-width="180" />
<el-table-column label="单据状态" align="center" prop="status" fixed="right" min-width="120"> <el-table-column label="单据状态" align="center" prop="status" fixed="right" min-width="120">
@ -104,8 +104,8 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PURCHASE_ORDER_STATUS).filter(it
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="right" fixed="right" min-width="200"> <el-table-column label="操作" align="right" fixed="right" min-width="200">
<template #header> <template #header>
<span style="margin-right: 30%">操作</span> <span style="margin-right: 30%">操作</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="openForm('audit', scope.row.id)" v-if="scope.row.status == 2"> <el-button link type="primary" @click="openForm('audit', scope.row.id)" v-if="scope.row.status == 2">
@ -173,12 +173,12 @@ const getList = async () => {
loading.value = true loading.value = true
try { try {
const route = useRoute(); const route = useRoute();
if(route){ if(route){
const idid = route.query.idid; const idid = route.query.idid;
queryParams.purchaseNo=idid queryParams.purchaseNo=idid
} }
const data = await PurchaseOrderApi.getPurchaseOrderPageByStatus(queryParams) const data = await PurchaseOrderApi.getPurchaseOrderPageByStatus(queryParams)
list.value = data.list list.value = data.list
total.value = data.total total.value = data.total

View File

@ -168,21 +168,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际价" @change="handleActualPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -275,21 +275,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际价" @change="handleActualPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -385,21 +385,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="boomEstimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subFormRules.boomEstimatedPrice" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.boomEstimatedPrice" placeholder="暂估价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="boomActualPrice" min-width="200" align="center"> <el-table-column prop="boomActualPrice" min-width="200" align="center">
<template #header>实际</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.boomActualPrice" placeholder="实际单价" @change="handleActualPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -487,18 +487,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -698,21 +698,21 @@ const formRules = reactive({
}) })
const subFormRules = reactive({ const subFormRules = reactive({
matId: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }], matId: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
estimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }], estimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }],
purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }] purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }]
}) })
const subBoomFormRules = reactive({ const subBoomFormRules = reactive({
boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }], boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }],
boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
boomEstimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }] boomEstimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }]
}) })
const subMatPlanFormRules = reactive({ const subMatPlanFormRules = reactive({
purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
estimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }] estimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }]
}) })
const subBoomPlanFormRules = reactive({ const subBoomPlanFormRules = reactive({
boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
boomEstimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }] boomEstimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }]
}) })
const formRef = ref() // Ref const formRef = ref() // Ref
const subFormRef = ref() // Ref const subFormRef = ref() // Ref
@ -1146,7 +1146,7 @@ formData.value.boomItemDOList.forEach((item) => {
item.boomDescription = item.description; item.boomDescription = item.description;
item.materialName = item.boomName; item.materialName = item.boomName;
item.compositionName = item.composition; item.compositionName = item.composition;
// composition // composition
if (Array.isArray(item.composition) && item.composition.length > 0) { if (Array.isArray(item.composition) && item.composition.length > 0) {
item.composition = Number(item.composition); item.composition = Number(item.composition);

View File

@ -178,18 +178,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -281,21 +281,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -391,21 +391,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="boomEstimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subBoomFormRules.boomEstimatedPrice" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.boomEstimatedPrice" placeholder="暂估价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="boomActualPrice" min-width="200" align="center"> <el-table-column prop="boomActualPrice" min-width="200" align="center">
<template #header>实际</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.boomActualPrice" placeholder="实际单价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -488,18 +488,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.estimatedPrice" placeholder="暂估价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-input-number style="width: 100%" v-model="scope.row.actualPrice" placeholder="实际价" @change="handleEstimatedPrice" :min="0" :precision="6" disabled />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -711,24 +711,24 @@ const formRules = reactive({
}) })
const subFormRules = reactive({ const subFormRules = reactive({
matId: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }], matId: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
estimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }], estimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }],
purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }] purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }]
}) })
const subBoomFormRules = reactive({ const subBoomFormRules = reactive({
boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }], boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }],
composition: [{ required: true, message: '材质不能为空', trigger: 'blur' }], composition: [{ required: true, message: '材质不能为空', trigger: 'blur' }],
boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
boomEstimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }], boomEstimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }],
boomArriveTime: [{ required: true, message: '预计到货时间不能为空', trigger: 'blur' }], boomArriveTime: [{ required: true, message: '预计到货时间不能为空', trigger: 'blur' }],
}) })
const subMatPlanFormRules = reactive({ const subMatPlanFormRules = reactive({
purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
estimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }] estimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }]
}) })
const subBoomPlanFormRules = reactive({ const subBoomPlanFormRules = reactive({
boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }], boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }],
boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
boomEstimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }] boomEstimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }]
}) })
const formRef = ref() // Ref const formRef = ref() // Ref
const subFormRef = ref() // Ref const subFormRef = ref() // Ref
@ -759,12 +759,12 @@ const handleSelectedMaterialPlanMat = (arr) => {
}); });
}; };
const handleSelectedMaterialPlanBoom =async (arrBoom) => { const handleSelectedMaterialPlanBoom =async (arrBoom) => {
//debugger //debugger
const existingBoomDetailIds = new Set(formData.value.boomItemDOList.map(boom => boom.boomDetailId)); const existingBoomDetailIds = new Set(formData.value.boomItemDOList.map(boom => boom.boomDetailId));
arrBoom.forEach((item) => { arrBoom.forEach((item) => {
if (!existingBoomDetailIds.has(item.boomDetailId)) { if (!existingBoomDetailIds.has(item.boomDetailId)) {
item.description = ''; item.description = '';
// formData.value.boomItemDOList.requireTime = item.boomArriveDate // formData.value.boomItemDOList.requireTime = item.boomArriveDate
// formData.value.boomItemDOList.composition = item.compositionName // formData.value.boomItemDOList.composition = item.compositionName
// formData.value.boomItemDOList.boomName = item.materialName // formData.value.boomItemDOList.boomName = item.materialName
@ -812,7 +812,7 @@ const handleEstimatedPrice = () => {
formData.value.actualPrice = allActualPrice formData.value.actualPrice = allActualPrice
} }
const handleActualPrice = () => { const handleActualPrice = () => {
} }
// ==================== ======================================= // ==================== =======================================
@ -981,7 +981,7 @@ const onAddItem = () => {
} }
const getList = async (arrMat) => { const getList = async (arrMat) => {
arrMat.forEach((row) => { arrMat.forEach((row) => {
if ( formData.value.matItemDOList.filter((item) => item.matId == row.matId).length == 0) if ( formData.value.matItemDOList.filter((item) => item.matId == row.matId).length == 0)
{ {
row.id = undefined row.id = undefined
formData.value.matItemDOList.push(row) formData.value.matItemDOList.push(row)
@ -1180,7 +1180,7 @@ const submitForm = async () => {
} catch (e) { } catch (e) {
return return
} }
// //
formData.value.receivingStatus = 2 formData.value.receivingStatus = 2
formData.value.status = 2 formData.value.status = 2
formData.value.submitUserId = useUserStore().getUser.id formData.value.submitUserId = useUserStore().getUser.id
@ -1227,7 +1227,7 @@ onMounted(async () => {
}) })
formData.value.matItemRemoveList = [] formData.value.matItemRemoveList = []
formData.value.boomItemRemoveList = [] formData.value.boomItemRemoveList = []
// //
formData.value.boomItemDOList = ( formData.value.boomItemDOList = (
@ -1245,7 +1245,7 @@ formData.value.boomItemDOList.forEach((item) => {
item.boomDescription = item.description; item.boomDescription = item.description;
item.materialName = item.boomName; item.materialName = item.boomName;
item.compositionName = item.composition; item.compositionName = item.composition;
// composition // composition
if (Array.isArray(item.composition) && item.composition.length > 0) { if (Array.isArray(item.composition) && item.composition.length > 0) {
item.composition = Number(item.composition); item.composition = Number(item.composition);

View File

@ -177,18 +177,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subFormRules.estimatedPrice" class="mb-0px!"> <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-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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -281,21 +281,21 @@
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!"> <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-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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -391,21 +391,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="boomEstimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.boomEstimatedPrice`" :rules="subBoomFormRules.boomEstimatedPrice" class="mb-0px!"> <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-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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="boomActualPrice" min-width="200" align="center"> <el-table-column prop="boomActualPrice" min-width="200" align="center">
<template #header>实际</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.boomActualPrice`" class="mb-0px!"> <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-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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -488,18 +488,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="estimatedPrice" min-width="200" align="center"> <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"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.estimatedPrice`" :rules="subMatPlanFormRules.estimatedPrice" class="mb-0px!"> <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-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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualPrice" min-width="200" align="center"> <el-table-column prop="actualPrice" min-width="200" align="center">
<template #header>实际金额</template> <template #header>实际</template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.actualPrice`" class="mb-0px!"> <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-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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -719,24 +719,24 @@ const formRules = reactive({
}) })
const subFormRules = reactive({ const subFormRules = reactive({
matId: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }], matId: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
estimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }], estimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }],
purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }] purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }]
}) })
const subBoomFormRules = reactive({ const subBoomFormRules = reactive({
boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }], boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }],
composition: [{ required: true, message: '材质不能为空', trigger: 'blur' }], composition: [{ required: true, message: '材质不能为空', trigger: 'blur' }],
boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
boomEstimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }], boomEstimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }],
boomArriveTime: [{ required: true, message: '预计到货时间不能为空', trigger: 'blur' }], boomArriveTime: [{ required: true, message: '预计到货时间不能为空', trigger: 'blur' }],
}) })
const subMatPlanFormRules = reactive({ const subMatPlanFormRules = reactive({
purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], purchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
estimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }] estimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }]
}) })
const subBoomPlanFormRules = reactive({ const subBoomPlanFormRules = reactive({
boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }], boomName: [{ required: true, message: '零件名称不能为空', trigger: 'blur' }],
boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }], boomPurchaseAmount: [{ required: true, message: '采购数量不能为空', trigger: 'blur' }],
boomEstimatedPrice: [{ required: true, message: '暂估金额不能为空', trigger: 'blur' }] boomEstimatedPrice: [{ required: true, message: '暂估价不能为空', trigger: 'blur' }]
}) })
const formRef = ref() // Ref const formRef = ref() // Ref
const subFormRef = ref() // Ref const subFormRef = ref() // Ref
@ -769,12 +769,12 @@ const handleSelectedMaterialPlanMat = (arr) => {
}); });
}; };
const handleSelectedMaterialPlanBoom =async (arrBoom) => { const handleSelectedMaterialPlanBoom =async (arrBoom) => {
//debugger //debugger
const existingBoomDetailIds = new Set(formData.value.boomItemDOList.map(boom => boom.boomDetailId)); const existingBoomDetailIds = new Set(formData.value.boomItemDOList.map(boom => boom.boomDetailId));
arrBoom.forEach((item) => { arrBoom.forEach((item) => {
if (!existingBoomDetailIds.has(item.boomDetailId)) { if (!existingBoomDetailIds.has(item.boomDetailId)) {
item.description = ''; item.description = '';
// formData.value.boomItemDOList.requireTime = item.boomArriveDate // formData.value.boomItemDOList.requireTime = item.boomArriveDate
// formData.value.boomItemDOList.composition = item.compositionName // formData.value.boomItemDOList.composition = item.compositionName
// formData.value.boomItemDOList.boomName = item.materialName // formData.value.boomItemDOList.boomName = item.materialName
@ -822,7 +822,7 @@ const handleEstimatedPrice = () => {
formData.value.actualPrice = allActualPrice formData.value.actualPrice = allActualPrice
} }
const handleActualPrice = () => { const handleActualPrice = () => {
} }
// ==================== ======================================= // ==================== =======================================
@ -991,7 +991,7 @@ const onAddItem = () => {
} }
const getList = async (arrMat) => { const getList = async (arrMat) => {
arrMat.forEach((row) => { arrMat.forEach((row) => {
if ( formData.value.matItemDOList.filter((item) => item.matId == row.matId).length == 0) if ( formData.value.matItemDOList.filter((item) => item.matId == row.matId).length == 0)
{ {
row.id = undefined row.id = undefined
formData.value.matItemDOList.push(row) formData.value.matItemDOList.push(row)
@ -1212,7 +1212,7 @@ const submitForm = async () => {
} catch (e) { } catch (e) {
return return
} }
// //
formData.value.receivingStatus = 2 formData.value.receivingStatus = 2
formData.value.status = 2 formData.value.status = 2
formData.value.submitUserId = useUserStore().getUser.id formData.value.submitUserId = useUserStore().getUser.id
@ -1259,7 +1259,7 @@ onMounted(async () => {
}) })
formData.value.matItemRemoveList = [] formData.value.matItemRemoveList = []
formData.value.boomItemRemoveList = [] formData.value.boomItemRemoveList = []
// //
formData.value.boomItemDOList = ( formData.value.boomItemDOList = (
@ -1277,7 +1277,7 @@ formData.value.boomItemDOList.forEach((item) => {
item.boomDescription = item.description; item.boomDescription = item.description;
item.materialName = item.boomName; item.materialName = item.boomName;
item.compositionName = item.composition; item.compositionName = item.composition;
// composition // composition
if (Array.isArray(item.composition) && item.composition.length > 0) { if (Array.isArray(item.composition) && item.composition.length > 0) {
item.composition = Number(item.composition); item.composition = Number(item.composition);

View File

@ -37,7 +37,7 @@ v-for="dicts in getIntDictOptions(DICT_TYPE.HELI_SHENHE)" :key="dicts.value"
<script setup lang="ts"> <script setup lang="ts">
import * as ShenheApi from '@/api/heli/shenhe' import * as ShenheApi from '@/api/heli/shenhe'
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict' import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
import UserSelect from '@/views/heli/hlvuestyle/userSelect.vue' import UserSelect from '@/views/heli/hlvuestyle/userSelectAll.vue'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //

View File

@ -177,6 +177,28 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="price" align="center" min-width="120" v-if="formData.stockInType=='1'">
<template #header> <span class="hl-table_header">*</span> 入库单价 </template>
<template #default="scope">
<el-form-item :prop="`${scope.$index}.price`" :rules="subFormRules.price"
class="mb-0px!">
<el-input v-model="scope.row.price" v-bind:disabled="ctrView || ctrSave" />
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="price" align="center" min-width="120" v-if="formData.stockInType!='1'">
<template #header>入库单价 </template>
<template #default="scope">
<el-form-item :prop="`${scope.$index}.price`"
class="mb-0px!">
<el-input v-model="scope.row.price" v-bind:disabled="ctrView || ctrSave" />
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="lotNo" label="批次号" align="center" min-width="120" v-if="false"> <el-table-column prop="lotNo" label="批次号" align="center" min-width="120" v-if="false">
<template #default="scope"> <template #default="scope">
@ -395,7 +417,9 @@ const subFormRules = reactive({
matCode: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }], matCode: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
rgId: [{ required: true, message: '库区不能为空', trigger: 'blur' }], rgId: [{ required: true, message: '库区不能为空', trigger: 'blur' }],
pnId: [{ required: true, message: '库位不能为空', trigger: 'blur' }], pnId: [{ required: true, message: '库位不能为空', trigger: 'blur' }],
storageOkQty: [{ required: true, message: '入库数量不能为空', trigger: 'blur' }] storageOkQty: [{ required: true, message: '入库数量不能为空', trigger: 'blur' }],
price: [{ required: true, message: '入库价格不能为空', trigger: 'blur' }]
}) })
const matOpenFormRef = ref() const matOpenFormRef = ref()

View File

@ -0,0 +1,141 @@
<template>
<el-card class="hl-card">
<template #header>
<span>库存单价管理</span>
</template>
<ContentWrap class="borderxx">
<!-- 搜索工作栏 -->
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="108px">
<el-form-item label="物料编码" prop="matCode">
<el-input v-model="queryParams.matCode" placeholder="物料编码" clearable @keyup.enter="handleQuery"
class="!w-240px" />
</el-form-item>
<el-form-item label="物料名称" prop="matName">
<el-input v-model="queryParams.matName" placeholder="物料名称" clearable @keyup.enter="handleQuery"
class="!w-240px" />
</el-form-item>
<el-form-item label="物料类型" prop="matType">
<el-select v-model="queryParams.matType" placeholder="下拉选择" clearable class="!w-240px">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_TYPE)" :key="dict.label" :label="dict.label"
:value="dict.label" />
</el-select>
</el-form-item>
<el-form-item style="margin-left:15px">
<el-button @click="handleQuery" type="primary">
<Icon icon="ep:search" class="mr-5px" /> 搜索
</el-button>
<el-button @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> 重置
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
<el-table-column type="index" width="100" fixed label="序号" align="center" />
<el-table-column label="物料名称" align="center" prop="matName" fixed min-width="120"/>
<el-table-column label="物料编码" align="center" prop="matCode" fixed min-width="120" />
<el-table-column label="物料类型" align="center" prop="matType" min-width="120"/>
<el-table-column label="库存数量" align="center" prop="storageOkQtys" min-width="120"/>
<el-table-column label="库存单位" align="center" prop="matUnit" min-width="120"/>
<el-table-column label="库存单价(元)" align="center" prop="price" min-width="120">
<template #default="scope">
<el-input-number v-model="scope.row.price" type="number" :precision="2" />
</template>
</el-table-column>
<el-table-column label="库存金额(元)" align="center" prop="sumKcMoneys" min-width="120"/>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
type="primary"
link
@click="updatePrice(scope.row)"
>
修改金额
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@pagination="getList" />
</ContentWrap>
</el-card>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as StorageLogApi from '@/api/heli/storagelog'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import * as WarehouseApi from '@/api/heli/warehouse'
import * as RgApi from '@/api/heli/rg'
import * as PnApi from '@/api/heli/pn'
import {getStorageNowPage, getStorageNowPricePage} from "@/api/heli/storagelog";
import * as ModelApi from "@/api/bpm/model";
defineOptions({ name: 'StorageLog' })
const whList = ref([])
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
matCode: undefined,
matName: undefined,
matType: undefined,
lotNo: undefined,
whId: undefined,
rgId:undefined,
pnId: undefined,
headerNo: undefined,
})
const queryFormRef = ref() //
const emit = defineEmits(['success'])
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await StorageLogApi.getStorageNowPricePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
const updatePrice = async (row) => {
try {
await message.confirm("是否修改当前物料"+row.matName+"库存单价?")
await StorageLogApi.updatePrice(row);
message.success(t('修改成功'))
await getList()
}catch {}
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 初始化 **/
onMounted(async () => {
await getList()
})
</script>

View File

@ -297,7 +297,7 @@ v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"
<el-form-item :prop="`${$index}.startTime`" :rules="subFormRules.startTime" class="mb-0px!"> <el-form-item :prop="`${$index}.startTime`" :rules="subFormRules.startTime" class="mb-0px!">
<el-date-picker <el-date-picker
:disabled="detailDisabled " v-model="row.startTime" :disabled="detailDisabled " v-model="row.startTime"
type="date" value-format="x" placeholder="选择预计开始日期" /> type="date" value-format="x" placeholder="选择预计开始日期" @change="changePrepTime('START',$index,row)" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -307,7 +307,7 @@ v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"
<el-form-item :prop="`${$index}.endTime`" :rules="subFormRules.endTime" class="mb-0px!"> <el-form-item :prop="`${$index}.endTime`" :rules="subFormRules.endTime" class="mb-0px!">
<el-date-picker <el-date-picker
:disabled=" detailDisabled" v-model="row.endTime" :disabled=" detailDisabled" v-model="row.endTime"
type="date" value-format="x" placeholder="选择预计结束日期" /> type="date" value-format="x" placeholder="选择预计结束日期" @change="changePrepTime('END',$index,row)"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -555,6 +555,21 @@ const formLoading = ref(false)
const dialogTitle = ref('') const dialogTitle = ref('')
const detailDisabled = ref(false) const detailDisabled = ref(false)
const changePrepTime = (type,index,row)=>{
if(index == 0){
formData.value.taskDispatchDetails.forEach((item)=>{
if(item.id == null){
console.log('sss')
if(type == 'END'){
item.endTime = row.endTime;
}else{
item.startTime = row.startTime;
}
}
})
}
}
const formatDateT = (timestamp) => { const formatDateT = (timestamp) => {
const date = new Date(timestamp); const date = new Date(timestamp);