feat 添加使用须知
This commit is contained in:
parent
84e75a1899
commit
a54379f1af
@ -27,6 +27,11 @@
|
|||||||
<el-input v-model="formData.couponDesc" placeholder="请输入优惠劵介绍" />
|
<el-input v-model="formData.couponDesc" placeholder="请输入优惠劵介绍" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :lg="24">
|
||||||
|
<el-form-item :label-width="labelWidth" label="使用须知" prop="couponUseIntro">
|
||||||
|
<el-input :rows="5" type="textarea" v-model="formData.couponUseIntro" placeholder="请输入使用须知" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :lg="24">
|
<el-col :lg="24">
|
||||||
<el-form-item :label-width="labelWidth" label="优惠劵类型" prop="couponType">
|
<el-form-item :label-width="labelWidth" label="优惠劵类型" prop="couponType">
|
||||||
<el-radio-group v-model="formData.couponType">
|
<el-radio-group v-model="formData.couponType">
|
||||||
@ -44,7 +49,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :lg="12" v-if="formData.couponType == 2">
|
<el-col :lg="12" v-if="formData.couponType == 2">
|
||||||
<el-form-item :label-width="labelWidth" label="折扣率" prop="couponDiscountRate">
|
<el-form-item :label-width="labelWidth" label="折扣率" prop="couponDiscountRate">
|
||||||
<el-input-number v-model.number="formData.couponDiscountRate" controls-position="right" :min="0"
|
<el-input-number v-model.number="formData.couponDiscountRate" controls-position="right" :min="0" :max="9.9"
|
||||||
precision="2" />
|
precision="2" />
|
||||||
<span class="number-unit">%</span>
|
<span class="number-unit">%</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -27,6 +27,11 @@
|
|||||||
<el-input v-model="formData.couponDesc" placeholder="请输入优惠劵介绍" />
|
<el-input v-model="formData.couponDesc" placeholder="请输入优惠劵介绍" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :lg="24">
|
||||||
|
<el-form-item :label-width="labelWidth" label="使用须知" prop="couponUseIntro">
|
||||||
|
<el-input :rows="5" type="textarea" v-model="formData.couponUseIntro" placeholder="请输入使用须知" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :lg="24">
|
<el-col :lg="24">
|
||||||
<el-form-item :label-width="labelWidth" label="优惠劵类型" prop="couponType">
|
<el-form-item :label-width="labelWidth" label="优惠劵类型" prop="couponType">
|
||||||
<el-radio-group v-model="formData.couponType">
|
<el-radio-group v-model="formData.couponType">
|
||||||
@ -44,8 +49,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :lg="12" v-if="formData.couponType == 2">
|
<el-col :lg="12" v-if="formData.couponType == 2">
|
||||||
<el-form-item :label-width="labelWidth" label="折扣率" prop="couponDiscountRate">
|
<el-form-item :label-width="labelWidth" label="折扣率" prop="couponDiscountRate">
|
||||||
<el-input-number v-model.number="formData.couponDiscountRate" controls-position="right" :min="0"
|
<el-input-number v-model.number="formData.couponDiscountRate" controls-position="right" :min="0" :max="9.9"
|
||||||
precision="2" />
|
precision="1" />
|
||||||
<span class="number-unit">%</span>
|
<span class="number-unit">%</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -6,43 +6,43 @@
|
|||||||
* @LastEditors: (lwh)
|
* @LastEditors: (lwh)
|
||||||
* @LastEditTime: (2023-07-31)
|
* @LastEditTime: (2023-07-31)
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="props.modelValue" title="领券记录信息详情" width="900px" @closed="closeDialog" @open="openDialog">
|
<el-dialog v-model="props.modelValue" title="领券记录信息详情" width="900px" @closed="closeDialog" @open="openDialog">
|
||||||
<el-form ref="formRef" :model="formData" :disabled="true">
|
<el-form ref="formRef" :model="formData" :disabled="true">
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="优惠券" prop="couponGuid">
|
||||||
<el-col :lg="12">
|
<el-input v-model='formData.couponName' disabled type="text">
|
||||||
<el-form-item :label-width="labelWidth" label="优惠劵guid" >
|
</el-input>
|
||||||
<el-input v-model="formData.couponGuid" />
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="客户" prop="customerGuid">
|
||||||
<el-col :lg="12">
|
<el-input v-model='formData.customerName' disabled type="text">
|
||||||
<el-form-item :label-width="labelWidth" label="客户guid" >
|
</el-input>
|
||||||
<el-input v-model="formData.customerGuid" />
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
|
||||||
|
<el-col :lg="12">
|
||||||
<el-col :lg="12">
|
<el-form-item :label-width="labelWidth" label="是否过期">
|
||||||
<el-form-item :label-width="labelWidth" label="是否过期" >
|
<el-select v-model="formData.customerCouponIsExpired">
|
||||||
<el-select v-model="formData.customerCouponIsExpired" >
|
<el-option v-for="item in is_expired " :key="item.dictValue" :label="item.dictLabel"
|
||||||
<el-option v-for="item in is_expired " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
|
:value="parseInt(item.dictValue)"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="是否已使用" >
|
<el-form-item :label-width="labelWidth" label="是否已使用">
|
||||||
<el-select v-model="formData.customerCouponIsUsed" >
|
<el-select v-model="formData.customerCouponIsUsed">
|
||||||
<el-option v-for="item in is_used " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
|
<el-option v-for="item in is_used " :key="item.dictValue" :label="item.dictLabel"
|
||||||
</el-select>
|
:value="parseInt(item.dictValue)"></el-option>
|
||||||
</el-form-item>
|
</el-select>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -61,8 +61,8 @@ import { reactive, ref, watch } from "vue";
|
|||||||
|
|
||||||
// 打开弹窗时回调
|
// 打开弹窗时回调
|
||||||
const openDialog = async () => {
|
const openDialog = async () => {
|
||||||
await getis_expired()
|
await getis_expired()
|
||||||
await getis_used()
|
await getis_used()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,38 +10,41 @@
|
|||||||
<el-dialog v-model="props.modelValue" title="修改领券记录信息" width="900px" @closed="closeDialog" @open="openDialog">
|
<el-dialog v-model="props.modelValue" title="修改领券记录信息" width="900px" @closed="closeDialog" @open="openDialog">
|
||||||
<el-form ref="formRef" :model="formData" :rules="rules">
|
<el-form ref="formRef" :model="formData" :rules="rules">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :lg="12">
|
|
||||||
<el-form-item :label-width="labelWidth" label="优惠劵guid" prop="couponGuid">
|
<el-col :lg="12">
|
||||||
<el-input v-model="formData.couponGuid" placeholder="请输入优惠劵guid" />
|
<el-form-item :label-width="labelWidth" label="优惠券" prop="couponGuid">
|
||||||
</el-form-item>
|
<el-input v-model='formData.couponName' disabled type="text">
|
||||||
</el-col>
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-col :lg="12">
|
</el-col>
|
||||||
<el-form-item :label-width="labelWidth" label="客户guid" prop="customerGuid">
|
<el-col :lg="12">
|
||||||
<el-input v-model="formData.customerGuid" placeholder="请输入客户guid" />
|
<el-form-item :label-width="labelWidth" label="客户" prop="customerGuid">
|
||||||
</el-form-item>
|
<el-input v-model='formData.customerName' disabled type="text">
|
||||||
</el-col>
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-col :lg="12">
|
</el-col>
|
||||||
<el-form-item :label-width="labelWidth" label="是否过期" prop="customerCouponIsExpired">
|
|
||||||
<el-select v-model="formData.customerCouponIsExpired" placeholder="请选择是否过期">
|
<el-col :lg="12">
|
||||||
<el-option v-for="item in is_expired " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
|
<el-form-item :label-width="labelWidth" label="是否过期" prop="customerCouponIsExpired">
|
||||||
</el-select>
|
<el-select v-model="formData.customerCouponIsExpired" placeholder="请选择是否过期">
|
||||||
</el-form-item>
|
<el-option v-for="item in is_expired " :key="item.dictValue" :label="item.dictLabel"
|
||||||
</el-col>
|
:value="parseInt(item.dictValue)"></el-option>
|
||||||
|
</el-select>
|
||||||
<el-col :lg="12">
|
</el-form-item>
|
||||||
<el-form-item :label-width="labelWidth" label="是否已使用" prop="customerCouponIsUsed">
|
</el-col>
|
||||||
<el-select v-model="formData.customerCouponIsUsed" placeholder="请选择是否已使用">
|
|
||||||
<el-option v-for="item in is_used " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
|
<el-col :lg="12">
|
||||||
</el-select>
|
<el-form-item :label-width="labelWidth" label="是否已使用" prop="customerCouponIsUsed">
|
||||||
</el-form-item>
|
<el-select v-model="formData.customerCouponIsUsed" placeholder="请选择是否已使用">
|
||||||
</el-col>
|
<el-option v-for="item in is_used " :key="item.dictValue" :label="item.dictLabel"
|
||||||
|
:value="parseInt(item.dictValue)"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -64,13 +67,13 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import modal from '@/plugins/modal.js'
|
import modal from '@/plugins/modal.js'
|
||||||
import { reactive, ref, watch } from "vue";
|
import { reactive, ref, watch } from "vue";
|
||||||
import { addOrUpdateCustomerCoupon } from "@/api/business/Marketing/CouponManage/CustomerCoupons/customerCoupon.js";
|
import { addOrUpdateCustomerCoupon } from "@/api/business/Marketing/CouponManage/CustomerCoupons/customerCoupon.js";
|
||||||
|
|
||||||
|
|
||||||
// 打开弹窗时回调
|
// 打开弹窗时回调
|
||||||
const openDialog = async () => {
|
const openDialog = async () => {
|
||||||
await getis_expired()
|
await getis_expired()
|
||||||
await getis_used()
|
await getis_used()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,11 +125,9 @@ const imgData = ref({
|
|||||||
|
|
||||||
// 验证
|
// 验证
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
customerCouponGuid: [{ required: true, message: "不能为空", trigger: "blur", type: "number" }],
|
customerCouponGuid: [{ required: true, message: "不能为空", trigger: "blur", type: "number" }],
|
||||||
couponGuid: [{ required: true, message: "优惠劵guid不能为空", trigger: "blur", type: "number" }],
|
customerCouponIsExpired: [{ required: true, message: "是否过期不能为空", trigger: "change", type: "number" }],
|
||||||
customerGuid: [{ required: true, message: "客户guid不能为空", trigger: "blur", type: "number" }],
|
customerCouponIsUsed: [{ required: true, message: "是否已使用不能为空", trigger: "change", type: "number" }],
|
||||||
customerCouponIsExpired: [{ required: true, message: "是否过期不能为空", trigger: "change", type: "number" }],
|
|
||||||
customerCouponIsUsed: [{ required: true, message: "是否已使用不能为空", trigger: "change", type: "number" }],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// -基础方法
|
// -基础方法
|
||||||
|
Loading…
Reference in New Issue
Block a user