File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/views/mall/promotion/discountActivity Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,19 @@ const formRef = ref() // 表单 Ref
78
78
79
79
const spuSelectRef = ref () // 商品和属性选择 Ref
80
80
const spuAndSkuListRef = ref () // sku 限时折扣 配置组件Ref
81
- const ruleConfig: RuleConfig [] = []
81
+ const ruleConfig: RuleConfig [] = [
82
+ {
83
+ name: ' productConfig.discountPrice' ,
84
+ rule : (arg ) => arg > 0 ,
85
+ message: ' 商品优惠金额不能为 0 !!!'
86
+ }
87
+ ]
82
88
const spuList = ref <DiscountActivityApi .SpuExtension []>([]) // 选择的 spu
83
89
const spuPropertyList = ref <SpuProperty <DiscountActivityApi .SpuExtension >[]>([])
84
90
const spuIds = ref <number []>([])
85
91
const selectSpu = (spuId : number , skuIds : number []) => {
92
+ // TODO puhui999: 艿艿现在限时折扣活动可以选择多个 spu ,那么 spuId 是不是得改成 spuIds 来存放多个?🤣
93
+ formRef .value .setValues ({ spuId })
86
94
getSpuDetails (spuId , skuIds )
87
95
}
88
96
/**
You can’t perform that action at this time.
0 commit comments