Commit 09350082 by huaying

fix: 积分购卡券新增、编辑添加字段

parent e90d361b
......@@ -479,16 +479,16 @@
</div>
<div class="section-content">
<h3>售后服务</h3>
<el-form-item label="支持退款" prop="refund">
<el-radio v-model="couponForm.refund" :label="1">
<el-form-item label="支持退款" prop="refundType">
<el-radio v-model="couponForm.refundType" :label="0">
</el-radio>
<el-radio v-model="couponForm.refund" :label="2">
<el-radio v-model="couponForm.refundType" :label="1">
</el-radio>
</el-form-item>
<el-form-item label="退款期限" prop="num">
<el-input-number v-model="couponForm.num"
<el-form-item label="退款期限" prop="refundPeriod">
<el-input-number v-model="couponForm.refundPeriod"
controls-position="right"
:min="1"
:max="10"
......@@ -496,10 +496,10 @@
:step="1"
step-strictly></el-input-number>
</el-form-item>
<el-form-item label="退款方式" prop="refundList">
<el-checkbox-group v-model="couponForm.refundList">
<el-checkbox label="主动退款"></el-checkbox>
<el-checkbox label="过期自动退款"></el-checkbox>
<el-form-item label="退款方式" prop="refundWay">
<el-checkbox-group v-model="couponForm.refundWay" @change="checkBoxChange">
<el-checkbox label="1">主动退款</el-checkbox>
<el-checkbox label="2">过期自动退款</el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
......@@ -637,9 +637,9 @@ export default {
timeRangeList: [{ timeRange: '' }], // 部分时段数组
timeZones: ['', ''],
ladder: [],
refund: 1,
num: 1,
refundList: [],
refundType: 0,
refundPeriod: 10,
refundWay: [],
},
uploadAction: getInputVal.uploadAction(),
headersUpload: {
......@@ -662,7 +662,7 @@ export default {
exchangeDateDayArr: [{ required: true, message: '请选择时间', trigger: 'change' }],
exchangeDateWeekArr: [{ required: true, message: '请选择时间', trigger: 'change' }],
proName: [{ required: true, message: '请输入券包名称', trigger: 'blur' }],
refundList: [{ required: true, message: '请选择退款方式', trigger: 'blur' }],
refundWay: [{ required: true, message: '请选择退款方式', trigger: 'blur' }],
},
validateTime,
mallProId: '',
......@@ -736,6 +736,9 @@ export default {
document.documentElement.scrollTop = 0;
},
methods: {
checkBoxChange (e) {
console.log(e);
},
clearHistoryData () {
this.$confirm('是否确认清除【展示门店数据】?清除后,可进入升级后的编辑页面。', '提示', {
confirmButtonText: '确定',
......@@ -915,6 +918,9 @@ export default {
this.proReferId = this.coupCardId;
this.getCardInfo();
}
this.couponForm.refundType = res.data.result.refundType ? res.data.result.refundType : 0;
this.couponForm.refundPeriod = res.data.result.refundPeriod ? res.data.result.refundPeriod : 10;
this.couponForm.refundWay = res.data.result.refundWay ? res.data.result.refundWay.split(',') : [];
this.echoVisibleData(res.data.result);
this.couponForm.proName = res.data.result.proName;
this.proNameLen = getInputVal.getZhLen(this.couponForm.proName);
......@@ -1086,6 +1092,10 @@ export default {
};
request.post('/api-integral-mall/get-card', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
// 退款方式
if (res.data.result.refundWay) {
this.couponForm.refundWay = res.data.result.refundWay.split(',');
}
this.cardList = [];
this.cardList = res.data.result;
if (this.cardList.length === 1) {
......@@ -1434,6 +1444,9 @@ export default {
exchangeTimeType: this.couponForm.exchangeTimeType, // 兑换时段
isDifferentialPricing: this.isDifferentialPricing,
differentialPricingJson: JSON.stringify(this.submitLadderList),
refundType: this.couponForm.refundType,
refundPeriod: this.couponForm.refundPeriod,
refundWay: this.couponForm.refundWay.toString(),
};
// 可见配置参数组装
params = { ...params, ...data };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment