|
@@ -13,6 +13,13 @@
|
|
<el-radio :label="1">盲票购买</el-radio>
|
|
<el-radio :label="1">盲票购买</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item v-if="addData.type === 1" label="是否新用户注册发放:">
|
|
|
|
+ <el-switch
|
|
|
|
+ v-model="addData.isNewUserCoupon"
|
|
|
|
+ :active-value="1"
|
|
|
|
+ :inactive-value="0"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="券金额:" prop="discount">
|
|
<el-form-item label="券金额:" prop="discount">
|
|
<el-input v-model.number="addData.discount" :readonly="readonly" type="number" :min="0" placeholder="请输入券券金额">
|
|
<el-input v-model.number="addData.discount" :readonly="readonly" type="number" :min="0" placeholder="请输入券券金额">
|
|
<template slot="append">元</template>
|
|
<template slot="append">元</template>
|
|
@@ -32,6 +39,7 @@
|
|
</el-input>
|
|
</el-input>
|
|
<div class="tip">若门店承担100%,则核销后公司不需要打款给门店,依此类推。</div>
|
|
<div class="tip">若门店承担100%,则核销后公司不需要打款给门店,依此类推。</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
<el-form-item label="最低消费金额:" prop="minOrderAmt">
|
|
<el-form-item label="最低消费金额:" prop="minOrderAmt">
|
|
<el-input v-model="addData.minOrderAmt" :readonly="readonly" type="number" placeholder="请输入可使用的最低消费金额">
|
|
<el-input v-model="addData.minOrderAmt" :readonly="readonly" type="number" placeholder="请输入可使用的最低消费金额">
|
|
<template slot="append">元</template>
|
|
<template slot="append">元</template>
|
|
@@ -169,6 +177,7 @@ export default {
|
|
addData: {
|
|
addData: {
|
|
ticketBoxList:[],
|
|
ticketBoxList:[],
|
|
useArea: 5,
|
|
useArea: 5,
|
|
|
|
+ isNewUserCoupon: 0,
|
|
dueDays: 90,
|
|
dueDays: 90,
|
|
type: 2,
|
|
type: 2,
|
|
channelSharedRate:0,
|
|
channelSharedRate:0,
|
|
@@ -211,10 +220,11 @@ export default {
|
|
created() {
|
|
created() {
|
|
if (this.id) {
|
|
if (this.id) {
|
|
getCouponDetail(this.id).then(res => {
|
|
getCouponDetail(this.id).then(res => {
|
|
- const { couponId, title, quantity, discount, channelSharedRate, minOrderAmt, dueDays, description, ticketBoxList, channelList, status } = res.data
|
|
|
|
|
|
+ const { couponId, title,isNewUserCoupon, quantity, discount, channelSharedRate, minOrderAmt, dueDays, description, ticketBoxList, channelList, status } = res.data
|
|
this.addData = {
|
|
this.addData = {
|
|
type: JSON.parse(res.data.type).value,
|
|
type: JSON.parse(res.data.type).value,
|
|
useArea: JSON.parse(res.data.useArea).value,
|
|
useArea: JSON.parse(res.data.useArea).value,
|
|
|
|
+ isNewUserCoupon: isNewUserCoupon ? 1 : 0 ,
|
|
status: JSON.parse(res.data.status).value,
|
|
status: JSON.parse(res.data.status).value,
|
|
discount: accDiv(discount, 100),
|
|
discount: accDiv(discount, 100),
|
|
minOrderAmt: accDiv(minOrderAmt, 100),
|
|
minOrderAmt: accDiv(minOrderAmt, 100),
|
|
@@ -249,6 +259,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
} else if (this.addData.type == 2) {
|
|
} else if (this.addData.type == 2) {
|
|
|
|
+ this.addData.isNewUserCoupon = null
|
|
if(this.addData.useArea !== 2 && this.addData.useArea !== 0 && this.addData.useArea !== 1 ) {
|
|
if(this.addData.useArea !== 2 && this.addData.useArea !== 0 && this.addData.useArea !== 1 ) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '请选择使用范围!',
|
|
message: '请选择使用范围!',
|