|
@@ -48,20 +48,20 @@
|
|
|
<el-option v-for="i in statusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
|
|
|
</template>
|
|
|
<template #cb_config>
|
|
|
- <el-form :model="cb_config" ref="cb_config" label-width="180px" @save="toSave">
|
|
|
+ <el-form :model="cb_config" ref="cb_config" label-width="180px" @save="toSave" v-if="form.is_cashBack == '0'">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="返现金额类型" prop="back_type">
|
|
|
<el-select v-model="cb_config.back_type" clearable filterable placeholder="请选择返现金额类型" size="small" style="width: 100%">
|
|
|
- <el-option v-for="i in typeList" :key="i.label" :label="i.label" :value="i.label"> </el-option>
|
|
|
+ <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"> </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" v-if="cb_config.back_type == '固定金额'">
|
|
|
+ <el-col :span="24" v-if="cb_config.back_type == 'fixed'">
|
|
|
<el-form-item label="具体返现金额设置" prop="money">
|
|
|
<el-input v-model="cb_config.money" placeholder="请输入金额" type="number" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" v-if="cb_config.back_type == '百分比'">
|
|
|
+ <el-col :span="24" v-if="cb_config.back_type == 'percent'">
|
|
|
<el-form-item label="具体返现金额设置" prop="money">
|
|
|
<el-input v-model="cb_config.money" placeholder="请输入百分比" type="number" size="small"></el-input>
|
|
|
</el-form-item>
|
|
@@ -196,7 +196,7 @@ export default {
|
|
|
const res = await this.fetch(data._id);
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `form`, res.data);
|
|
|
- this.cb_config = res.data.cb_config;
|
|
|
+ if (res.data.cb_config) this.cb_config = res.data.cb_config;
|
|
|
if (data.shop) {
|
|
|
let list = [];
|
|
|
let res = await this.shopFetch(data.shop._id);
|
|
@@ -275,6 +275,9 @@ export default {
|
|
|
// 是否返现
|
|
|
res = await this.getDict({ code: 'use' });
|
|
|
if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
|
|
|
+ // 返现金额类型
|
|
|
+ res = await this.getDict({ code: 'cashBack_type' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `typeList`, res.data);
|
|
|
},
|
|
|
// 商品状态
|
|
|
getStatus(data) {
|