diff --git a/src/views/business/Marketing/CouponManage/Coupons/components/AddDialog.vue b/src/views/business/Marketing/CouponManage/Coupons/components/AddDialog.vue index 4b211d7..cd83bf2 100644 --- a/src/views/business/Marketing/CouponManage/Coupons/components/AddDialog.vue +++ b/src/views/business/Marketing/CouponManage/Coupons/components/AddDialog.vue @@ -69,13 +69,8 @@ - + @@ -91,10 +86,29 @@ + 指定商品 + + + + + + + + + + + +
- +
(-1不限制)
@@ -124,8 +138,8 @@ - - + + @@ -161,12 +175,6 @@ const display_status = ref([]); const ChooseGoodsDialogVisible = ref(false); const ChooseGoodsDialogRow = ref({}); -// 打开选择商品弹窗 -const handleChooseGoods = () => { - ChooseGoodsDialogVisible.value = true - ChooseGoodsDialogRow.value = formData -} - // -业务方法 // 字典获取 @@ -194,7 +202,11 @@ async function getdisplay_status() { }) } - +// 打开选择商品弹窗 +const handleChooseGoods = () => { + ChooseGoodsDialogVisible.value = true + ChooseGoodsDialogRow.value = formData +} // -基础参数 const loadingStatus = ref(false) @@ -207,7 +219,10 @@ const formData = reactive({ couponExpireType: 1, couponApplicableScope: 1, couponDisplayStatus: 1, - couponSort: 100 + couponSort: 100, + couponSendNumber: -1, + couponApplicableScopeConfig: [], + couponGoodsIds: [] }); const props = defineProps({ modelValue: Boolean, @@ -240,6 +255,12 @@ const handleAddClick = async (formEl) => { } loadingStatus.value = true + if (formData.couponGoodsIds.length != 0) { + formData.couponGoodsIds = formData.couponGoodsIds.join(',') + } + if (formData.couponApplicableScopeConfig) { + formData.couponApplicableScopeConfig = JSON.stringify(formData.couponApplicableScopeConfig) + } const { code } = await addOrUpdateCoupon(formData); if (code == 200) { @@ -250,6 +271,7 @@ const handleAddClick = async (formEl) => { }); }; const closeDialog = () => { + formData.couponApplicableScopeConfig = [] handleResetClick(formRef.value); props.done(); emits("update:modelValue", false); @@ -265,9 +287,9 @@ const handleResetClick = async (formEl) => { .number-unit { margin-left: 10px; } + .input-intro { color: #8c8c8c; font-size: 12px; } - \ No newline at end of file diff --git a/src/views/business/Marketing/CouponManage/Coupons/components/EditDialog.vue b/src/views/business/Marketing/CouponManage/Coupons/components/EditDialog.vue index 7d3b475..1dfa7b8 100644 --- a/src/views/business/Marketing/CouponManage/Coupons/components/EditDialog.vue +++ b/src/views/business/Marketing/CouponManage/Coupons/components/EditDialog.vue @@ -4,119 +4,129 @@ * @Author: (lwh) * @Date: (2023-07-24) * @LastEditors: (lwh) - * @LastEditTime: (2023-07-24) + * @LastEditTime: (2023-07-25) --> - + + + + +