Commit 09350082 by huaying

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

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