package cn.iocoder.yudao.module.aftersales.controller.admin.returnobj.vo;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotNull;
|
import lombok.Data;
|
|
import java.math.BigDecimal;
|
import java.util.List;
|
|
/**
|
* 售后退货申请保存 VO
|
*/
|
@Schema(description = "售后退货申请 - 保存 Request VO")
|
@Data
|
public class AfterSaleReturnSaveReqVO {
|
|
@Schema(description = "退货申请编号", example = "1")
|
private Long id;
|
|
@Schema(description = "关联工单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@NotNull(message = "关联工单不能为空")
|
private Long ticketId;
|
|
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@NotNull(message = "客户不能为空")
|
private Long customerId;
|
|
@Schema(description = "关联销售订单编号", example = "1")
|
private Long saleOrderId;
|
|
@Schema(description = "退货类型: 1-退款退货 2-换货 3-仅退款", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@NotNull(message = "退货类型不能为空")
|
private Integer returnType;
|
|
@Schema(description = "退货原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "产品外观缺陷")
|
@NotEmpty(message = "退货原因不能为空")
|
private String returnReason;
|
|
@Schema(description = "缺陷分类", example = "外观缺陷")
|
private String defectCategory;
|
|
@Schema(description = "备注")
|
private String remark;
|
|
@Schema(description = "退货明细行列表")
|
private List<Item> items;
|
|
@Schema(description = "退货明细行")
|
@Data
|
public static class Item {
|
|
@Schema(description = "工单明细行编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
@NotNull(message = "工单明细行不能为空")
|
private Long ticketItemId;
|
|
@Schema(description = "MDM物料编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
@NotNull(message = "物料不能为空")
|
private Long itemId;
|
|
@Schema(description = "物料编码", example = "MAT-001")
|
private String itemCode;
|
|
@Schema(description = "物料名称", example = "电子元器件")
|
private String itemName;
|
|
@Schema(description = "批次编号", example = "1")
|
private Long batchId;
|
|
@Schema(description = "批次号", example = "BATCH-2024-001")
|
private String batchCode;
|
|
@Schema(description = "退货数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10.000")
|
@NotNull(message = "退货数量不能为空")
|
private BigDecimal returnQuantity;
|
|
@Schema(description = "销售单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
@NotNull(message = "销售单价不能为空")
|
private BigDecimal unitPrice;
|
|
@Schema(description = "退货金额", example = "1000.00")
|
private BigDecimal returnPrice;
|
|
@Schema(description = "备注")
|
private String remark;
|
}
|
|
}
|