!547 【代码优化】商城: 满减活动范围支持分类多选

Merge pull request !547 from puhui999/dev-crm
This commit is contained in:
芋道源码 2024-09-10 13:09:06 +00:00 committed by Gitee
commit 823530bbc9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -56,7 +56,7 @@
label="分类" label="分类"
prop="productCategoryIds" prop="productCategoryIds"
> >
<ProductCategorySelect v-model="formData.productCategoryIds" /> <ProductCategorySelect v-model="formData.productCategoryIds" :multiple="true" />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注" /> <el-input v-model="formData.remark" placeholder="请输入备注" />
@ -188,7 +188,7 @@ const getProductScope = async () => {
case PromotionProductScopeEnum.CATEGORY.scope: case PromotionProductScopeEnum.CATEGORY.scope:
await nextTick() await nextTick()
let productCategoryIds = formData.value.productScopeValues as any let productCategoryIds = formData.value.productScopeValues as any
if (Array.isArray(productCategoryIds) && productCategoryIds.length > 0) { if (Array.isArray(productCategoryIds) && productCategoryIds.length === 1) {
// 使 // 使
productCategoryIds = productCategoryIds[0] productCategoryIds = productCategoryIds[0]
} }