|
@@ -13,6 +13,13 @@
|
|
|
<el-radio :label="1">盲票购买</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="addData.type === 1" label="是否新用户注册发放:">
|
|
|
+ <el-switch :disabled="readonly"
|
|
|
+ v-model="addData.isNewUserCoupon"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="券金额:" prop="discount">
|
|
|
<el-input v-model.number="addData.discount" :readonly="readonly" type="number" :min="0" placeholder="请输入券券金额">
|
|
|
<template slot="append">元</template>
|
|
@@ -32,6 +39,7 @@
|
|
|
</el-input>
|
|
|
<div class="tip">若门店承担100%,则核销后公司不需要打款给门店,依此类推。</div>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="最低消费金额:" prop="minOrderAmt">
|
|
|
<el-input v-model="addData.minOrderAmt" :readonly="readonly" type="number" placeholder="请输入可使用的最低消费金额">
|
|
|
<template slot="append">元</template>
|
|
@@ -52,6 +60,9 @@
|
|
|
<template slot="append">天有效</template>
|
|
|
</el-input> -->
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="已使用数量:" v-if="readonly || addData.status === 'on' || addData.status === 'off'">
|
|
|
+ <div style="color:#606266">{{ addData.usedQty }}</div>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="使用说明:" prop="description">
|
|
|
<el-input type="textarea" rows="4" :readonly="readonly" v-model="addData.description" placeholder="请输入使用说明 对用户可见"/>
|
|
|
</el-form-item>
|
|
@@ -169,6 +180,7 @@ export default {
|
|
|
addData: {
|
|
|
ticketBoxList:[],
|
|
|
useArea: 5,
|
|
|
+ isNewUserCoupon: 0,
|
|
|
dueDays: 90,
|
|
|
type: 2,
|
|
|
channelSharedRate:0,
|
|
@@ -211,14 +223,15 @@ export default {
|
|
|
created() {
|
|
|
if (this.id) {
|
|
|
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,usedQty, ticketBoxList, channelList, status } = res.data
|
|
|
this.addData = {
|
|
|
type: JSON.parse(res.data.type).value,
|
|
|
useArea: JSON.parse(res.data.useArea).value,
|
|
|
+ isNewUserCoupon: isNewUserCoupon ? 1 : 0 ,
|
|
|
status: JSON.parse(res.data.status).value,
|
|
|
discount: accDiv(discount, 100),
|
|
|
minOrderAmt: accDiv(minOrderAmt, 100),
|
|
|
- couponId, title, quantity, channelSharedRate, dueDays, description, ticketBoxList
|
|
|
+ couponId, title, quantity, channelSharedRate, dueDays, description, ticketBoxList,usedQty
|
|
|
}
|
|
|
this.channelList = channelList
|
|
|
})
|
|
@@ -249,6 +262,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
} else if (this.addData.type == 2) {
|
|
|
+ this.addData.isNewUserCoupon = null
|
|
|
if(this.addData.useArea !== 2 && this.addData.useArea !== 0 && this.addData.useArea !== 1 ) {
|
|
|
this.$message({
|
|
|
message: '请选择使用范围!',
|