Commit 66836ce7 by 吕明尚

修改后台管理页面

parent 3a4388ad
......@@ -104,7 +104,7 @@
<!-- <el-table-column align="center" label="会员配置id" prop="memberConfigId"/>-->
<el-table-column align="center" label="所需金额" prop="requiredAmount"/>
<el-table-column align="center" label="会员有效期" prop="validityPeriod"/>
<el-table-column align="center" label="是否删除" prop="isDelete"/>
<!-- <el-table-column align="center" label="是否删除" prop="isDelete"/>-->
<el-table-column align="center" label="备注" prop="remark"/>
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
<template slot-scope="scope">
......
......@@ -116,13 +116,25 @@
<el-table-column align="center" label="充值赠送方式" prop="giveType"/>
<el-table-column align="center" label="充值满送金额" prop="giveAmount"/>
<!-- <el-table-column align="center" label="启用禁用:1-启用,0-禁用" prop="enable"/>-->
<el-table-column align="center" label="启用禁用" prop="enable">
<el-table-column align="center" label="是否启用" prop="enable">
<template slot-scope="scope">
<dict-tag :options="dict.type.store_is_use_coupon" :value="scope.row.enable"/>
</template>
</el-table-column>
<el-table-column align="center" label="充值适用类型:1-平台通用,2-单门店" prop="suitType"/>
<el-table-column align="center" label="充值适用门店id" prop="storeIds"/>
<!-- <el-table-column align="center" label="充值适用类型:1-平台通用,2-单门店" prop="suitType"/>-->
<el-table-column align="center" label="充值适用类型" prop="suitType">
<template slot-scope="scope">
<dict-tag :options="dict.type.recharge_suit_type" :value="scope.row.suitType"/>
</template>
</el-table-column>
<el-table-column align="center" label="适用门店" prop="storeIds" width="350">
<template slot-scope="scope">
<div v-if="scope.row.storeIds" style="display: flex;flex-wrap: wrap;width: 100%;">
<dict-tag v-for="(item ,k) in scope.row.storeIds" :key="k" :options="storeList" :value="item"
style="margin: 0 3px;"/>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="备注" prop="remark"/>
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
<template slot-scope="scope">
......@@ -166,15 +178,35 @@
<el-form-item label="充值满送金额" prop="giveAmount">
<el-input v-model="form.giveAmount" placeholder="请输入充值满送金额"/>
</el-form-item>
<el-form-item label="启用禁用:1-启用,0-禁用" prop="enable">
<el-input v-model="form.enable" placeholder="请输入启用禁用:1-启用,0-禁用"/>
<!-- <el-form-item label="启用禁用:1-启用,0-禁用" prop="enable">-->
<!-- <el-input v-model="form.enable" placeholder="请输入启用禁用:1-启用,0-禁用"/>-->
<!-- </el-form-item>-->
<el-form-item label="是否启用" prop="enable">
<el-radio-group v-model="form.enable">
<el-radio
v-for="dict in dict.type.store_is_use_coupon"
:key="dict.value"
:label="parseInt(dict.value)"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="充值适用门店id" prop="storeIds">
<el-input v-model="form.storeIds" placeholder="请输入充值适用门店id"/>
</el-form-item>
<el-form-item label="删除标记:1-删除,0-正常" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标记:1-删除,0-正常"/>
<!-- <el-form-item label="充值适用门店id" prop="storeIds">-->
<!-- <el-input v-model="form.storeIds" placeholder="请输入充值适用门店id"/>-->
<!-- </el-form-item>-->
<el-form-item label="适用门店" prop="storeIds">
<el-select v-model="form.storeIds" clearable multiple placeholder="请选择适用门店">
<el-option
v-for="dict in storeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="删除标记:1-删除,0-正常" prop="delFlag">-->
<!-- <el-input v-model="form.delFlag" placeholder="请输入删除标记:1-删除,0-正常"/>-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注"/>
</el-form-item>
......@@ -195,16 +227,17 @@ import {
addRechargeConf,
updateRechargeConf
} from "@/api/system/rechargeConf";
import {storeList} from '@/api/system/store';
export default {
name: "RechargeConf",
dicts: ['store_is_use_coupon'],
dicts: ['store_is_use_coupon', 'recharge_suit_type'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
storeList: [],
// 非单个禁用
single: true,
// 非多个禁用
......@@ -259,13 +292,19 @@ export default {
},
created() {
this.getList();
this.onStoreList();
},
methods: {
/** 查询充值配置列表 */
getList() {
this.loading = true;
listRechargeConf(this.queryParams).then(response => {
this.rechargeConfList = response.rows;
this.rechargeConfList = response.rows.map(item => {
return {
...item,
storeIds: item.storeIds && item.storeIds.length ? item.storeIds.split(",") : []
}
});
this.total = response.total;
this.loading = false;
});
......@@ -295,6 +334,24 @@ export default {
};
this.resetForm("form");
},
onStoreList() {
storeList().then(res => {
this.storeList = res.data.map(obj => {
return {
...obj,
raw: {
dictSort: 1,
dictValue: "1",
listClass: "primary",
cssClass: ''
},
value: obj.id.toString(),
label: obj.name,
}
})
this.$forceUpdate();
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
......@@ -323,6 +380,9 @@ export default {
const id = row.id || this.ids
getRechargeConf(id).then(response => {
this.form = response.data;
if (this.form.storeIds) {
this.form.storeIds = this.form.storeIds.split(",")
}
this.open = true;
this.title = "修改充值配置";
});
......
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