feat 添加使用须知

This commit is contained in:
lwh 2023-08-01 15:07:38 +08:00
parent 84e75a1899
commit a54379f1af
4 changed files with 87 additions and 76 deletions

View File

@ -27,6 +27,11 @@
<el-input v-model="formData.couponDesc" placeholder="请输入优惠劵介绍" />
</el-form-item>
</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-form-item :label-width="labelWidth" label="优惠劵类型" prop="couponType">
<el-radio-group v-model="formData.couponType">
@ -44,7 +49,7 @@
</el-col>
<el-col :lg="12" v-if="formData.couponType == 2">
<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" />
<span class="number-unit">%</span>
</el-form-item>

View File

@ -27,6 +27,11 @@
<el-input v-model="formData.couponDesc" placeholder="请输入优惠劵介绍" />
</el-form-item>
</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-form-item :label-width="labelWidth" label="优惠劵类型" prop="couponType">
<el-radio-group v-model="formData.couponType">
@ -44,8 +49,8 @@
</el-col>
<el-col :lg="12" v-if="formData.couponType == 2">
<el-form-item :label-width="labelWidth" label="折扣率" prop="couponDiscountRate">
<el-input-number v-model.number="formData.couponDiscountRate" controls-position="right" :min="0"
precision="2" />
<el-input-number v-model.number="formData.couponDiscountRate" controls-position="right" :min="0" :max="9.9"
precision="1" />
<span class="number-unit">%</span>
</el-form-item>
</el-col>

View File

@ -6,43 +6,43 @@
* @LastEditors: (lwh)
* @LastEditTime: (2023-07-31)
-->
<template>
<template>
<el-dialog v-model="props.modelValue" title="领券记录信息详情" width="900px" @closed="closeDialog" @open="openDialog">
<el-form ref="formRef" :model="formData" :disabled="true">
<el-row :gutter="20">
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="优惠券" prop="couponGuid">
<el-input v-model='formData.couponName' disabled type="text">
</el-input>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户" prop="customerGuid">
<el-input v-model='formData.customerName' disabled type="text">
</el-input>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="是否过期">
<el-select v-model="formData.customerCouponIsExpired">
<el-option v-for="item in is_expired " :key="item.dictValue" :label="item.dictLabel"
:value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="优惠劵guid" >
<el-input v-model="formData.couponGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户guid" >
<el-input v-model="formData.customerGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="是否过期" >
<el-select v-model="formData.customerCouponIsExpired" >
<el-option v-for="item in is_expired " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="是否已使用" >
<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-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="是否已使用">
<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-select>
</el-form-item>
</el-col>
@ -61,8 +61,8 @@ import { reactive, ref, watch } from "vue";
//
const openDialog = async () => {
await getis_expired()
await getis_used()
await getis_expired()
await getis_used()
}

View File

@ -15,33 +15,36 @@
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="优惠劵guid" prop="couponGuid">
<el-input v-model="formData.couponGuid" placeholder="请输入优惠劵guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="优惠券" prop="couponGuid">
<el-input v-model='formData.couponName' disabled type="text">
</el-input>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户" prop="customerGuid">
<el-input v-model='formData.customerName' disabled type="text">
</el-input>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户guid" prop="customerGuid">
<el-input v-model="formData.customerGuid" placeholder="请输入客户guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="是否过期" prop="customerCouponIsExpired">
<el-select v-model="formData.customerCouponIsExpired" placeholder="请选择是否过期">
<el-option v-for="item in is_expired " :key="item.dictValue" :label="item.dictLabel"
:value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="是否过期" prop="customerCouponIsExpired">
<el-select v-model="formData.customerCouponIsExpired" placeholder="请选择是否过期">
<el-option v-for="item in is_expired " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="是否已使用" prop="customerCouponIsUsed">
<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-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="是否已使用" prop="customerCouponIsUsed">
<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-select>
</el-form-item>
</el-col>
@ -64,13 +67,13 @@
import { ElMessage } from 'element-plus'
import modal from '@/plugins/modal.js'
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 () => {
await getis_expired()
await getis_used()
await getis_expired()
await getis_used()
}
@ -122,11 +125,9 @@ const imgData = ref({
//
const rules = reactive({
customerCouponGuid: [{ required: true, message: "不能为空", trigger: "blur", type: "number" }],
couponGuid: [{ required: true, message: "优惠劵guid不能为空", trigger: "blur", type: "number" }],
customerGuid: [{ required: true, message: "客户guid不能为空", trigger: "blur", type: "number" }],
customerCouponIsExpired: [{ required: true, message: "是否过期不能为空", trigger: "change", type: "number" }],
customerCouponIsUsed: [{ required: true, message: "是否已使用不能为空", trigger: "change", type: "number" }],
customerCouponGuid: [{ required: true, message: "不能为空", trigger: "blur", type: "number" }],
customerCouponIsExpired: [{ required: true, message: "是否过期不能为空", trigger: "change", type: "number" }],
customerCouponIsUsed: [{ required: true, message: "是否已使用不能为空", trigger: "change", type: "number" }],
});
// -