package cn.iocoder.yudao.module.crm.controller.admin.invoice.vo.invoice;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
import jakarta.validation.constraints.NotNull;
|
import lombok.Data;
|
|
import java.math.BigDecimal;
|
import java.time.LocalDateTime;
|
import java.util.List;
|
|
@Schema(description = "管理后台 - CRM 开票新增/修改 Request VO")
|
@Data
|
public class CrmInvoiceSaveReqVO {
|
|
@Schema(description = "编号", example = "25787")
|
private Long id;
|
|
@Schema(description = "开票编号", example = "31177")
|
private String no;
|
|
@Schema(description = "客户编号", example = "2")
|
private Long customerId; // 该字段不通过前端传递,而是 contractId 查询出来设置进去
|
|
@Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@NotNull(message = "合同编号不能为空")
|
private Long contractId;
|
|
@Schema(description = "关联销售订单")
|
private Long saleOrderId;
|
|
@Schema(description = "关联出库单")
|
private Long saleOutId;
|
|
@Schema(description = "出库单号(后端按 saleOutId 回填,前端无需传递)", hidden = true)
|
private String saleOutCode;
|
|
@Schema(description = "负责人编号", example = "25682")
|
@NotNull(message = "开票负责人不能为空,请选择负责人")
|
private Long ownerUserId;
|
|
@Schema(description = "发票类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@NotNull(message = "发票类型不能为空")
|
private Integer invoiceType;
|
|
@Schema(description = "发票号码", example = "02564178")
|
private String invoiceNo;
|
|
@Schema(description = "发票抬头", example = "XX科技有限公司")
|
private String invoiceTitle;
|
|
@Schema(description = "开票金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000")
|
@NotNull(message = "开票金额不能为空")
|
private BigDecimal price;
|
|
@Schema(description = "合同金额")
|
private BigDecimal contractAmount;
|
|
@Schema(description = "预付款金额")
|
private BigDecimal prepaymentAmount;
|
|
@Schema(description = "到货款金额")
|
private BigDecimal deliveryAmount;
|
|
@Schema(description = "验收款金额")
|
private BigDecimal acceptanceAmount;
|
|
@Schema(description = "开票日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02")
|
@NotNull(message = "开票日期不能为空")
|
private LocalDateTime invoiceTime;
|
|
@Schema(description = "备注", example = "备注")
|
private String remark;
|
|
@Schema(description = "发票附件 BlobId 列表")
|
private List<Long> blobIds;
|
|
@Schema(description = "收款节点(合同款/预付款/到货款/验收款/质保金)")
|
private List<PaymentNode> paymentNodes;
|
|
@Schema(description = "收款节点")
|
@Data
|
public static class PaymentNode {
|
|
@Schema(description = "阶段:1合同款 2预付款 3到货款 4验收款 5质保金", requiredMode = Schema.RequiredMode.REQUIRED)
|
private Integer stage;
|
|
@Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
private BigDecimal amount;
|
|
@Schema(description = "计划回款时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
private LocalDateTime returnTime;
|
|
@Schema(description = "备注")
|
private String remark;
|
|
}
|
|
}
|