|
|
@@ -101,8 +101,7 @@
|
|
|
<el-table-column fixed="right" label="操作" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <el-button @click="handleModifyClick(scope.row)" type="text" size="small">修改</el-button> -->
|
|
|
- <el-button v-if="scope.row.type == 1" @click="handleDetailClick(scope.row)" type="text" size="small">查看详情</el-button>
|
|
|
- <el-button v-else-if="scope.row.type == 2" @click="handleDetailClick(scope.row)" type="text" size="small">查看详情</el-button>
|
|
|
+ <el-button @click="handleDetailClick(scope.row)" type="text" size="small">查看详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -116,7 +115,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- 代金劵详情 -->
|
|
|
- <el-dialog title="优惠券详情" custom-class="add-account-class" :visible.sync="dialogVoucherVisible" :close-on-click-modal="true"
|
|
|
+ <el-dialog title="优惠券详情" custom-class="shou-info-voucher-class" :visible.sync="dialogVoucherVisible" :close-on-click-modal="true"
|
|
|
:close-on-press-escape="true" @close="dialogVoucherVisible = false">
|
|
|
<div style="height: 444px; padding: 0; margin: 0; overflow:auto;">
|
|
|
<p><label class="lbl-cls">代金券名称:</label>{{ coupon.name }}</p>
|
|
|
@@ -128,19 +127,21 @@
|
|
|
<h3 style="padding-top: 20px;">限制条件</h3>
|
|
|
<p><label class="lbl-cls">使用条件:</label> 订单满{{ coupon.meetPrice }}元可使用</p>
|
|
|
<p v-if="coupon.effectiveType == 1"><label class="lbl-cls">有效期:</label> {{ coupon.effectiveStartDate }} ~ {{ coupon.effectiveEndDate}}</p>
|
|
|
- <p v-else-if="coupon.effectiveType == 2"><label class="lbl-cls">有效期:</label> 领取后{{ coupon.effectiveDay }}天开始,{{ coupon.effectiveLoseDay }}天内有效
|
|
|
+ <p v-else-if="coupon.effectiveType == 2"><label class="lbl-cls">有效期:</label>
|
|
|
+ 领取后{{ coupon.effectiveDay }}天开始,{{ coupon.effectiveLoseDay }}天内有效
|
|
|
</p>
|
|
|
- <p v-if="coupon.hotelIds == -1"><label class="lbl-cls">选用民宿:</label> 全部民宿</p>
|
|
|
- <p v-else><label class="lbl-cls">选用民宿:</label>
|
|
|
+ <p v-if="coupon.hotelIds == -1"><label class="lbl-cls">选用民宿:</label><el-tag effect="plain" style="margin: 2px 3px;">全部民宿</el-tag></p>
|
|
|
+ <p v-else-if="coupon.hotelNames != ''"><label class="lbl-cls">选用民宿:</label>
|
|
|
<el-tag v-for="item in coupon.hotelNames" :key="item" type="" effect="plain" style="margin: 2px 3px;">
|
|
|
{{ item }}
|
|
|
</el-tag>
|
|
|
</p>
|
|
|
+ <p v-else><label class="lbl-cls">选用民宿:</label></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 折扣劵详情 -->
|
|
|
- <el-dialog title="优惠券详情" custom-class="add-account-class" :visible.sync="dialogCouponVisible" :close-on-click-modal="true" :close-on-press-escape="true"
|
|
|
+ <el-dialog title="优惠券详情" custom-class="shou-info-coupon-class" :visible.sync="dialogCouponVisible" :close-on-click-modal="true" :close-on-press-escape="true"
|
|
|
@close="dialogCouponVisible = false">
|
|
|
<div style="height: 500px; padding: 0; margin: 0; overflow:auto;">
|
|
|
<p><label class="lbl-cls">折扣券名称:</label>{{ coupon.name }}</p>
|
|
|
@@ -153,14 +154,16 @@
|
|
|
<h3 style="padding-top: 20px;">限制条件</h3>
|
|
|
<p><label class="lbl-cls">使用条件:</label> 订单满{{ coupon.meetPrice }}元可使用</p>
|
|
|
<p v-if="coupon.effectiveType == 1"><label class="lbl-cls">有效期:</label> {{ coupon.effectiveStartDate }} ~ {{ coupon.effectiveEndDate}}</p>
|
|
|
- <p v-else-if="coupon.effectiveType == 2"><label class="lbl-cls">有效期:</label> 领取后{{ coupon.effectiveDay }}天开始,{{ coupon.effectiveLoseDay }}天内有效
|
|
|
+ <p v-else-if="coupon.effectiveType == 2"><label class="lbl-cls">有效期:</label>
|
|
|
+ 领取后{{ coupon.effectiveDay }}天开始,{{ coupon.effectiveLoseDay }}天内有效
|
|
|
</p>
|
|
|
- <p v-if="coupon.hotelIds == -1"><label class="lbl-cls">选用民宿:</label> 全部民宿</p>
|
|
|
- <p v-else><label class="lbl-cls">选用民宿:</label>
|
|
|
+ <p v-if="coupon.hotelIds == -1"><label class="lbl-cls">选用民宿:</label><el-tag effect="plain" style="margin: 2px 3px;">全部民宿</el-tag></p>
|
|
|
+ <p v-else-if="coupon.hotelNames != ''"><label class="lbl-cls">选用民宿:</label>
|
|
|
<el-tag v-for="item in coupon.hotelNames" :key="item" type="" effect="plain" style="margin: 2px 3px;">
|
|
|
{{ item }}
|
|
|
</el-tag>
|
|
|
</p>
|
|
|
+ <p v-else><label class="lbl-cls">选用民宿:</label></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -1292,93 +1295,93 @@
|
|
|
* 打开修改优惠券对话框
|
|
|
* @param {Object} row
|
|
|
*/
|
|
|
- handleModifyClick(row) {
|
|
|
- // 获取适用民宿列表
|
|
|
- this.getMinSuList()
|
|
|
-
|
|
|
- if (row.type == 1) { // 代金券
|
|
|
- this.dialogModifyVoucherFormVisible = true
|
|
|
-
|
|
|
- this.formModifyVoucher = {}
|
|
|
-
|
|
|
- this.$set(this.formModifyVoucher, 'name', row.name);
|
|
|
- this.$set(this.formModifyVoucher, 'deductionPrice', row.deductionPrice);
|
|
|
- this.$set(this.formModifyVoucher, 'grantNumber', row.grantNumber);
|
|
|
- this.$set(this.formModifyVoucher, 'limitNumber', row.limitNumber);
|
|
|
- this.$set(this.formModifyVoucher, 'grantTimes', [row.grantStartDate, row.grantEndDate]);
|
|
|
- this.$set(this.formModifyVoucher, 'meetPrice', row.meetPrice);
|
|
|
- if (row.effectiveType == 1) {
|
|
|
- this.$set(this.formModifyVoucher, 'radio', '1');
|
|
|
- this.$set(this.formModifyVoucher, 'effectiveDateTime', [row.effectiveStartDate, row.effectiveEndDate]);
|
|
|
- } else {
|
|
|
- this.$set(this.formModifyVoucher, 'radio', '2');
|
|
|
- this.$set(this.formModifyVoucher, 'effectiveDay', row.effectiveDay);
|
|
|
- this.$set(this.formModifyVoucher, 'effectiveLoseDay', row.effectiveLoseDay);
|
|
|
- }
|
|
|
+ // handleModifyClick(row) {
|
|
|
+ // // 获取适用民宿列表
|
|
|
+ // this.getMinSuList()
|
|
|
+
|
|
|
+ // if (row.type == 1) { // 代金券
|
|
|
+ // this.dialogModifyVoucherFormVisible = true
|
|
|
+
|
|
|
+ // this.formModifyVoucher = {}
|
|
|
+
|
|
|
+ // this.$set(this.formModifyVoucher, 'name', row.name);
|
|
|
+ // this.$set(this.formModifyVoucher, 'deductionPrice', row.deductionPrice);
|
|
|
+ // this.$set(this.formModifyVoucher, 'grantNumber', row.grantNumber);
|
|
|
+ // this.$set(this.formModifyVoucher, 'limitNumber', row.limitNumber);
|
|
|
+ // this.$set(this.formModifyVoucher, 'grantTimes', [row.grantStartDate, row.grantEndDate]);
|
|
|
+ // this.$set(this.formModifyVoucher, 'meetPrice', row.meetPrice);
|
|
|
+ // if (row.effectiveType == 1) {
|
|
|
+ // this.$set(this.formModifyVoucher, 'radio', '1');
|
|
|
+ // this.$set(this.formModifyVoucher, 'effectiveDateTime', [row.effectiveStartDate, row.effectiveEndDate]);
|
|
|
+ // } else {
|
|
|
+ // this.$set(this.formModifyVoucher, 'radio', '2');
|
|
|
+ // this.$set(this.formModifyVoucher, 'effectiveDay', row.effectiveDay);
|
|
|
+ // this.$set(this.formModifyVoucher, 'effectiveLoseDay', row.effectiveLoseDay);
|
|
|
+ // }
|
|
|
|
|
|
- this.voucherModifyMinSuIds = row.hotelIds.split(',')
|
|
|
- this.voucherModifyCheckedTowns.length = 0
|
|
|
- setTimeout(() => {
|
|
|
- var tmp = []
|
|
|
- row.hotelIds.split(',').forEach((item) => {
|
|
|
- townOptions_obj.forEach((obj) => {
|
|
|
- if (obj.hid == item) {
|
|
|
- tmp.push(obj.hname);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- this.voucherModifyCheckedTowns = tmp
|
|
|
- this.$set(this.formModifyVoucher, 'voucherModifyCheckedTowns', tmp);
|
|
|
- }, 1000);
|
|
|
-
|
|
|
- this.$set(this.formModifyVoucher, 'createId', this.currentUserId); // 创建人
|
|
|
- this.$set(this.formModifyVoucher, 'effectiveType', row.effectiveType); // 有效期类型(1.时间段 2.生效失效天数)
|
|
|
- this.$set(this.formModifyVoucher, 'type', 1); // 类型(1.代金券 2.折扣券)
|
|
|
- this.$set(this.formModifyVoucher, 'status', 1); // 状态(0删除 1正常)
|
|
|
- this.$set(this.formModifyVoucher, 'id', row.id);
|
|
|
- } else { // 折扣券
|
|
|
- this.dialogModifyCouponFormVisible = true
|
|
|
-
|
|
|
- this.formModifyCoupon = {}
|
|
|
-
|
|
|
- this.$set(this.formModifyCoupon, 'name', row.name);
|
|
|
- this.$set(this.formModifyCoupon, 'rebatePrice', row.rebatePrice);
|
|
|
- this.$set(this.formModifyCoupon, 'maxDeduction', row.maxDeduction);
|
|
|
- this.$set(this.formModifyCoupon, 'grantNumber', row.grantNumber);
|
|
|
- this.$set(this.formModifyCoupon, 'limitNumber', row.limitNumber);
|
|
|
- this.$set(this.formModifyCoupon, 'grantTimes', [row.grantStartDate, row.grantEndDate]);
|
|
|
- this.$set(this.formModifyCoupon, 'meetPrice', row.meetPrice);
|
|
|
- if (row.effectiveType == 1) {
|
|
|
- this.$set(this.formModifyCoupon, 'radio', '1');
|
|
|
- this.$set(this.formModifyCoupon, 'effectiveDateTime', [row.effectiveStartDate, row.effectiveEndDate]);
|
|
|
- } else {
|
|
|
- this.$set(this.formModifyCoupon, 'radio', '2');
|
|
|
- this.$set(this.formModifyCoupon, 'effectiveDay', row.effectiveDay);
|
|
|
- this.$set(this.formModifyCoupon, 'effectiveLoseDay', row.effectiveLoseDay);
|
|
|
- }
|
|
|
+ // this.voucherModifyMinSuIds = row.hotelIds.split(',')
|
|
|
+ // this.voucherModifyCheckedTowns.length = 0
|
|
|
+ // setTimeout(() => {
|
|
|
+ // var tmp = []
|
|
|
+ // row.hotelIds.split(',').forEach((item) => {
|
|
|
+ // townOptions_obj.forEach((obj) => {
|
|
|
+ // if (obj.hid == item) {
|
|
|
+ // tmp.push(obj.hname);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // this.voucherModifyCheckedTowns = tmp
|
|
|
+ // this.$set(this.formModifyVoucher, 'voucherModifyCheckedTowns', tmp);
|
|
|
+ // }, 1000);
|
|
|
+
|
|
|
+ // this.$set(this.formModifyVoucher, 'createId', this.currentUserId); // 创建人
|
|
|
+ // this.$set(this.formModifyVoucher, 'effectiveType', row.effectiveType); // 有效期类型(1.时间段 2.生效失效天数)
|
|
|
+ // this.$set(this.formModifyVoucher, 'type', 1); // 类型(1.代金券 2.折扣券)
|
|
|
+ // this.$set(this.formModifyVoucher, 'status', 1); // 状态(0删除 1正常)
|
|
|
+ // this.$set(this.formModifyVoucher, 'id', row.id);
|
|
|
+ // } else { // 折扣券
|
|
|
+ // this.dialogModifyCouponFormVisible = true
|
|
|
+
|
|
|
+ // this.formModifyCoupon = {}
|
|
|
+
|
|
|
+ // this.$set(this.formModifyCoupon, 'name', row.name);
|
|
|
+ // this.$set(this.formModifyCoupon, 'rebatePrice', row.rebatePrice);
|
|
|
+ // this.$set(this.formModifyCoupon, 'maxDeduction', row.maxDeduction);
|
|
|
+ // this.$set(this.formModifyCoupon, 'grantNumber', row.grantNumber);
|
|
|
+ // this.$set(this.formModifyCoupon, 'limitNumber', row.limitNumber);
|
|
|
+ // this.$set(this.formModifyCoupon, 'grantTimes', [row.grantStartDate, row.grantEndDate]);
|
|
|
+ // this.$set(this.formModifyCoupon, 'meetPrice', row.meetPrice);
|
|
|
+ // if (row.effectiveType == 1) {
|
|
|
+ // this.$set(this.formModifyCoupon, 'radio', '1');
|
|
|
+ // this.$set(this.formModifyCoupon, 'effectiveDateTime', [row.effectiveStartDate, row.effectiveEndDate]);
|
|
|
+ // } else {
|
|
|
+ // this.$set(this.formModifyCoupon, 'radio', '2');
|
|
|
+ // this.$set(this.formModifyCoupon, 'effectiveDay', row.effectiveDay);
|
|
|
+ // this.$set(this.formModifyCoupon, 'effectiveLoseDay', row.effectiveLoseDay);
|
|
|
+ // }
|
|
|
|
|
|
- this.couponModifyMinSuIds = row.hotelIds.split(',')
|
|
|
- this.couponModifyCheckedTowns.length = 0
|
|
|
- setTimeout(() => {
|
|
|
- var tmp = []
|
|
|
- row.hotelIds.split(',').forEach((item) => {
|
|
|
- townOptions_obj.forEach((obj) => {
|
|
|
- if (obj.hid == item) {
|
|
|
- tmp.push(obj.hname);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- this.couponModifyCheckedTowns = tmp
|
|
|
- this.$set(this.formModifyCoupon, 'couponModifyCheckedTowns', tmp);
|
|
|
- }, 1000);
|
|
|
-
|
|
|
- this.$set(this.formModifyCoupon, 'createId', this.currentUserId); // 创建人
|
|
|
- this.$set(this.formModifyCoupon, 'effectiveType', row.effectiveType); // 有效期类型(1.时间段 2.生效失效天数)
|
|
|
- this.$set(this.formModifyCoupon, 'type', 1); // 类型(1.代金券 2.折扣券)
|
|
|
- this.$set(this.formModifyCoupon, 'status', 1); // 状态(0删除 1正常)
|
|
|
- this.$set(this.formModifyCoupon, 'id', row.id);
|
|
|
- }
|
|
|
- },
|
|
|
+ // this.couponModifyMinSuIds = row.hotelIds.split(',')
|
|
|
+ // this.couponModifyCheckedTowns.length = 0
|
|
|
+ // setTimeout(() => {
|
|
|
+ // var tmp = []
|
|
|
+ // row.hotelIds.split(',').forEach((item) => {
|
|
|
+ // townOptions_obj.forEach((obj) => {
|
|
|
+ // if (obj.hid == item) {
|
|
|
+ // tmp.push(obj.hname);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // this.couponModifyCheckedTowns = tmp
|
|
|
+ // this.$set(this.formModifyCoupon, 'couponModifyCheckedTowns', tmp);
|
|
|
+ // }, 1000);
|
|
|
+
|
|
|
+ // this.$set(this.formModifyCoupon, 'createId', this.currentUserId); // 创建人
|
|
|
+ // this.$set(this.formModifyCoupon, 'effectiveType', row.effectiveType); // 有效期类型(1.时间段 2.生效失效天数)
|
|
|
+ // this.$set(this.formModifyCoupon, 'type', 1); // 类型(1.代金券 2.折扣券)
|
|
|
+ // this.$set(this.formModifyCoupon, 'status', 1); // 状态(0删除 1正常)
|
|
|
+ // this.$set(this.formModifyCoupon, 'id', row.id);
|
|
|
+ // }
|
|
|
+ // },
|
|
|
/**
|
|
|
* 点击查看优惠券详情,弹出优惠券详情对话框
|
|
|
* @param {Object} row
|
|
|
@@ -1858,4 +1861,12 @@
|
|
|
.el-form-item {
|
|
|
margin-bottom: 16px !important;
|
|
|
}
|
|
|
+
|
|
|
+ .shou-info-voucher-class {
|
|
|
+ height: 580px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .shou-info-coupon-class {
|
|
|
+ height: 620px !important;
|
|
|
+ }
|
|
|
</style>
|