feat(router): 删除无用路由及功能
This commit is contained in:
parent
396512f5ac
commit
54819ad999
|
@ -1668,21 +1668,21 @@ export const constantRoutes = [
|
|||
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'mailbox',
|
||||
name: 'Mailbox',
|
||||
meta: { title: '邮箱配置' },
|
||||
component: ParentView,
|
||||
redirect: 'mailbox/index',
|
||||
children: [
|
||||
{
|
||||
path: 'mailbox',
|
||||
name: 'Mailbox',
|
||||
component: () => import('@/views/configManage/mailbox/index'),
|
||||
meta: { title: '邮箱配置' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: 'mailbox',
|
||||
// name: 'Mailbox',
|
||||
// meta: { title: '邮箱配置' },
|
||||
// component: ParentView,
|
||||
// redirect: 'mailbox/index',
|
||||
// children: [
|
||||
// {
|
||||
// path: 'mailbox',
|
||||
// name: 'Mailbox',
|
||||
// component: () => import('@/views/configManage/mailbox/index'),
|
||||
// meta: { title: '邮箱配置' }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: 'special',
|
||||
// name: 'Special',
|
||||
|
@ -1832,36 +1832,36 @@ export const constantRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'storeConfiguration',
|
||||
name: 'StoreConfiguration',
|
||||
meta: { title: '店铺配置' },
|
||||
component: ParentView,
|
||||
redirect: 'storeConfiguration/index',
|
||||
children: [
|
||||
{
|
||||
path: 'storeConfiguration',
|
||||
name: 'StoreConfiguration',
|
||||
component: () => import('@/views/configManage/storeConfiguration/index'),
|
||||
meta: { title: '店铺配置' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'storeGradeConfiguration',
|
||||
name: 'StoreGradeConfiguration',
|
||||
meta: { title: '店铺等级配置' },
|
||||
component: ParentView,
|
||||
redirect: 'storeGradeConfiguration/index',
|
||||
children: [
|
||||
{
|
||||
path: 'storeGradeConfiguration',
|
||||
name: 'StoreGradeConfiguration',
|
||||
component: () => import('@/views/configManage/storeGradeConfiguration/index'),
|
||||
meta: { title: '店铺等级配置' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: 'storeConfiguration',
|
||||
// name: 'StoreConfiguration',
|
||||
// meta: { title: '店铺配置' },
|
||||
// component: ParentView,
|
||||
// redirect: 'storeConfiguration/index',
|
||||
// children: [
|
||||
// {
|
||||
// path: 'storeConfiguration',
|
||||
// name: 'StoreConfiguration',
|
||||
// component: () => import('@/views/configManage/storeConfiguration/index'),
|
||||
// meta: { title: '店铺配置' }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: 'storeGradeConfiguration',
|
||||
// name: 'StoreGradeConfiguration',
|
||||
// meta: { title: '店铺等级配置' },
|
||||
// component: ParentView,
|
||||
// redirect: 'storeGradeConfiguration/index',
|
||||
// children: [
|
||||
// {
|
||||
// path: 'storeGradeConfiguration',
|
||||
// name: 'StoreGradeConfiguration',
|
||||
// component: () => import('@/views/configManage/storeGradeConfiguration/index'),
|
||||
// meta: { title: '店铺等级配置' }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: 'lenjoyStore',
|
||||
// name: 'LenjoyStore',
|
||||
|
|
|
@ -1,563 +0,0 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:topList="topList"
|
||||
:moren="moren"
|
||||
></topBar>
|
||||
<div class="thetopbox">
|
||||
<el-form label-width="70px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'名称'">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker
|
||||
v-model="queryParams.thedate"
|
||||
@change="checkTime"
|
||||
type="daterange"
|
||||
range-separator="——"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<div class="searchbox">
|
||||
<el-button class="my_search" @click="getSearch"> {{ '搜索' }}</el-button>
|
||||
<el-button class="my_reset" @click="reChongzhi"> {{ '重置' }}</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="maintop">
|
||||
<div class="mainbtn">
|
||||
<el-button size="small" class="thebtn1" @click="addData"
|
||||
v-has-buttons="['addHonor']"
|
||||
>{{'添加'}}</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
height="730px"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="picture"
|
||||
:label="'图片'"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<img
|
||||
style="width: 48px; height: 48px"
|
||||
:src="scope.row.img"
|
||||
alt=""
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="valueStr"
|
||||
:label="'名称'"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="typeStr"
|
||||
:label="'达标标准'"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
:label="'创建日期'"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="time"
|
||||
:label="'操作'"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
class="button"
|
||||
@click="update(scope.row,scope.row.pkId)"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #48B2FD"
|
||||
v-has-buttons="['updateHonor']"
|
||||
>
|
||||
{{'修改'}}
|
||||
</el-button>
|
||||
<el-button
|
||||
class="button"
|
||||
@click="deleteRow(scope.row,scope.row.pkId)"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #C8161D"
|
||||
v-has-buttons="['delHonor']"
|
||||
>
|
||||
{{'删除'}}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getSearch"
|
||||
/>
|
||||
<el-dialog
|
||||
:title="dialogTitle"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
center
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="'名称'" prop="name">
|
||||
<el-input v-model="form.name" :placeholder="'请输入'"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="'标题'" prop="title">
|
||||
<el-input v-model="form.title" :placeholder="'请输入标题'"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="'达标标准'" prop="type">
|
||||
<el-select
|
||||
@change="changes"
|
||||
class="select-s"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
v-model="form.type"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in levelValueList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="form.type==1">
|
||||
<el-form-item :label="'等级'" prop="value">
|
||||
<el-select
|
||||
class="select-s"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
v-model="form.value"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in gradeChioseList"
|
||||
:key="item.pkId"
|
||||
:label="item.gradeName"
|
||||
:value="item.pkId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="form.type==2">
|
||||
<el-form-item label="奖衔" prop="value">
|
||||
<el-select
|
||||
class="select-s"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
v-model="form.value"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in awardsChioseList"
|
||||
:key="item.pkId"
|
||||
:label="item.awardsName"
|
||||
:value="item.pkId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="form.type!=1 && form.type!=2 && form.type!='' " style="position: relative">
|
||||
<div class="unit" v-if="form.type==3">年</div>
|
||||
<el-form-item :label="levelValueList[selectIndex-1].label" prop="type">
|
||||
<el-input v-model="form.value" type="number">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'上传图片'" prop="img">
|
||||
<imageUpload v-model="form.img" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button class="close" type="primary" @click="handleClose"> {{ '取消' }}</el-button>
|
||||
<el-button class="submit" type="primary" @click="onSubmit('form')">{{'确定'}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from "@/components/topBar";
|
||||
import * as con from "@/api/configManage";
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
import {delMember, getHonorType, getMemberList, getStoreGradeAdd, getStoreGradeUpdate} from "@/api/configManage";
|
||||
import {getAwardsListChiose, getgradeRanglist} from "@/api/level";
|
||||
export default {
|
||||
name: "StoreGradeConfiguration",
|
||||
components: {
|
||||
topBar,
|
||||
ImageUpload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moren: "honorAdmin",
|
||||
topList: [
|
||||
{
|
||||
name: '荣誉馆配置',
|
||||
path: "honorAdmin",
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
loading:false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
thedate: [],
|
||||
},
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
|
||||
dialogVisible: false,
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入', trigger: "blur" },
|
||||
],
|
||||
title: [
|
||||
{ required: true, message: '请输入', trigger: "blur" },
|
||||
],
|
||||
value: [
|
||||
{ required: true, message: '请输入', trigger: "blur" },
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: "请选择达标标准", trigger: "change" },
|
||||
],
|
||||
|
||||
img: [
|
||||
{
|
||||
required: true,
|
||||
message: '请上传图片',
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
gradeChioseList: [],
|
||||
awardsChioseList: [],
|
||||
form: {
|
||||
title:'',
|
||||
name:'',
|
||||
value: "",
|
||||
type: "",
|
||||
img: "",
|
||||
},
|
||||
selectIndex:0,
|
||||
levelValueList: [], //荣誉馆下拉选择
|
||||
dialogTitle: "",
|
||||
ifadd: "", //1添加2修改
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getSearch();
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
//删除
|
||||
deleteRow(row) {
|
||||
this.$confirm('确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
delMember(row.pkId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.getSearch();
|
||||
} else {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
changes(index) {
|
||||
this.selectIndex = index
|
||||
this.form.value = ''
|
||||
},
|
||||
addList() {
|
||||
this.form.detailList.push({
|
||||
endAchievement: "",
|
||||
ratio: "",
|
||||
});
|
||||
},
|
||||
subList() {
|
||||
this.form.detailList.pop();
|
||||
},
|
||||
//修改
|
||||
update(data) {
|
||||
this.selectIndex = data.type
|
||||
this.dialogTitle = '修改';
|
||||
this.ifadd = 2;
|
||||
this.form.name = data.name
|
||||
this.form.value = data.value
|
||||
this.form.type = data.type
|
||||
this.form.img = data.img
|
||||
this.form.pkId = data.pkId
|
||||
this.form.title = data.title
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
//导出
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: "warning",
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
"/system/manage/store-level/export",
|
||||
{ ...this.queryParams },
|
||||
`${'店铺等级'}${new Date().getTime()}.xlsx`
|
||||
);
|
||||
});
|
||||
},
|
||||
onSubmit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let url = '';
|
||||
if (this.ifadd == 1) {
|
||||
url = con.getStoreGradeAdd;
|
||||
} else if (this.ifadd == 2) {
|
||||
url = con.getStoreGradeUpdate;
|
||||
}
|
||||
url(this.form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.dialogVisible = false
|
||||
this.getSearch()
|
||||
this.form = {
|
||||
value: "",
|
||||
type: "",
|
||||
title: '',
|
||||
img: "",
|
||||
name:'',
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.$refs["form"].clearValidate();
|
||||
this.$refs["form"].resetFields();
|
||||
this.form = {
|
||||
value: "",
|
||||
type: "",
|
||||
img: "",
|
||||
name:'',
|
||||
title: '',
|
||||
}
|
||||
},
|
||||
checkTime(val) {
|
||||
this.queryParams.startDate = val[0];
|
||||
this.queryParams.endDate = val[1];
|
||||
},
|
||||
|
||||
getData() {
|
||||
con.getHonorType().then((res) => {
|
||||
this.levelValueList = res.data;
|
||||
});
|
||||
getgradeRanglist().then((res) => {
|
||||
this.gradeChioseList = res.data;
|
||||
});
|
||||
getAwardsListChiose().then((res) => {
|
||||
this.awardsChioseList = res.rows;
|
||||
});
|
||||
},
|
||||
addData() {
|
||||
this.dialogTitle = '添加';
|
||||
this.ifadd = 1;
|
||||
this.form = {
|
||||
value: "",
|
||||
type: "",
|
||||
img: "",
|
||||
name:'',
|
||||
title: '',
|
||||
};
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
reChongzhi() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
thedate: [],
|
||||
};
|
||||
this.getSearch();
|
||||
},
|
||||
getSearch() {
|
||||
this.loading = true
|
||||
con.getMemberList(this.queryParams).then((res) => {
|
||||
this.tableData = res.rows;
|
||||
this.total = res.total;
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.unit{
|
||||
font-size: 16px;
|
||||
color: #999;
|
||||
position: absolute;
|
||||
right:40px;
|
||||
z-index: 1;
|
||||
top: 12px;
|
||||
}
|
||||
.button{
|
||||
padding: 0 5px;
|
||||
}
|
||||
::v-deep .image-slot{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 44px;
|
||||
}
|
||||
::v-deep .el-image{
|
||||
width: 44px !important;
|
||||
height: 44px !important;
|
||||
}
|
||||
::v-deep .el-upload--picture-card{
|
||||
min-width: 48px !important;
|
||||
min-height: 48px!important;
|
||||
}
|
||||
.select-s{
|
||||
width: 100%;
|
||||
}
|
||||
.submit{
|
||||
width: 209px;
|
||||
height: 48px;
|
||||
background: #48B2FD;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
opacity: 1;
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.close{
|
||||
font-size: 18px;
|
||||
border: none;
|
||||
width: 209px;
|
||||
height: 48px;
|
||||
background: #CCCCCC;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
opacity: 1;
|
||||
}
|
||||
::v-deep .el-range-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
padding: 10px 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.thetopbox {
|
||||
padding: 15px 20px 5px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
.searchbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.searchtitle {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.searchbtn {
|
||||
background: #08143f;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
//margin-top: 20px;
|
||||
background: #f9f9f9;
|
||||
//border-radius: 8px;
|
||||
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
|
||||
.maintop {
|
||||
display: flex;
|
||||
padding: 0px 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.mainbtn {
|
||||
.thebtn1 {
|
||||
color: #ffffff;
|
||||
background: #48b2fd;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
.thebtn2 {
|
||||
color: #ffffff;
|
||||
background: #ffad41;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,474 +0,0 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:topList="topList"
|
||||
:moren="moren"
|
||||
></topBar>
|
||||
<div class="thetopbox">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="$t('会员编号')">
|
||||
<el-input clearable v-model="queryParams.memberCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="$t('生效状态')">
|
||||
<el-select clearable v-model="queryParams.status">
|
||||
<el-option value="1" label="无效"></el-option>
|
||||
<el-option value="2" label="有效"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('生效时间')">
|
||||
<el-date-picker
|
||||
v-model="queryParams.thedate"
|
||||
@change="checkTime"
|
||||
type="daterange"
|
||||
range-separator="——"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('失效时间')">
|
||||
<el-date-picker
|
||||
v-model="queryParams.thedates"
|
||||
@change="checkTime1"
|
||||
type="daterange"
|
||||
range-separator="——"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="searchbox">
|
||||
<el-button class="my_search" @click="getSearch">
|
||||
{{ '搜索' }}</el-button
|
||||
>
|
||||
<el-button class="my_reset" @click="reChongzhi">
|
||||
{{ '重置' }}</el-button
|
||||
>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="maintop">
|
||||
<div class="mainbtn">
|
||||
<el-button
|
||||
size="small"
|
||||
class="thebtn1"
|
||||
@click="addData"
|
||||
v-hasButtons="['LenjoyStoreAdd']"
|
||||
>{{ '添加' }}</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
class="thebtn2"
|
||||
@click="handleExport"
|
||||
v-hasButtons="['LenjoyStoreExport']"
|
||||
>
|
||||
{{ '导出' }}</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
height="720px"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="memberCode"
|
||||
min-width="100px"
|
||||
:label="$t('会员编号')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="memberName"
|
||||
:label="$t('会员姓名')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="awardsName"
|
||||
:label="$t('真实奖衔')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
min-width="100px"
|
||||
prop="status"
|
||||
:label="$t('生效状态')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-text type="danger" v-if="scope.row.status == 1">无效</el-text>
|
||||
<el-text type="success" v-if="scope.row.status == 2"
|
||||
>有效</el-text
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
min-width="130px"
|
||||
prop="effectiveDate"
|
||||
:label="$t('生效时间')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
min-width="130px"
|
||||
prop="failureDate"
|
||||
:label="$t('失效时间')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
min-width="130px"
|
||||
prop="creationTime"
|
||||
:label="$t('创建时间')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="time"
|
||||
:label="'操作'"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click="deleteRow(scope.row)"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #c8161d"
|
||||
v-has-buttons="['LenjoyStoreDel']"
|
||||
>
|
||||
{{ $t("删除") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getSearch"
|
||||
/>
|
||||
<el-dialog
|
||||
:title="dialogTitle"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
center
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('会员编号')" prop="memberCode">
|
||||
<el-input v-model="form.memberCode" @change="getMemberInfo">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('会员姓名')" prop="memberName">
|
||||
<el-input disabled v-model="form.memberName"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">{{ '取消' }}</el-button>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{
|
||||
'确认'
|
||||
}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from "@/components/topBar";
|
||||
import * as con from "@/api/configManage";
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
export default {
|
||||
name: "LenjoyStore",
|
||||
components: {
|
||||
topBar,
|
||||
ImageUpload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moren: "lenjoyStore",
|
||||
topList: [
|
||||
{
|
||||
name: this.$t("乐享店铺"),
|
||||
path: "lenjoyStore",
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
loading: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
thedate: [],
|
||||
thedates: [],
|
||||
},
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
|
||||
dialogVisible: false,
|
||||
rules: {
|
||||
storeLevelName: [
|
||||
{ required: true, message: "请输入店铺等级", trigger: "blur" },
|
||||
],
|
||||
levelValue: [
|
||||
{ required: true, message: "请选择店属性", trigger: "change" },
|
||||
],
|
||||
|
||||
picture: [
|
||||
{
|
||||
required: true,
|
||||
message: '请上传图片',
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
form: {
|
||||
memberCode: "",
|
||||
memberName: "",
|
||||
},
|
||||
|
||||
levelValueList: [], //店铺属性下拉选
|
||||
dialogTitle: "",
|
||||
ifadd: "", //1添加2修改
|
||||
open_form: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getSearch();
|
||||
// this.getData();
|
||||
},
|
||||
methods: {
|
||||
getMemberInfo() {
|
||||
con.getLenjoyMember({ memberCode: this.form.memberCode }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.form.memberName = res.data.memberName;
|
||||
this.open_form = true;
|
||||
} else {
|
||||
this.open_form = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteRow(row) {
|
||||
this.$confirm('确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
con.delRangeStore(row.pkId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.getSearch();
|
||||
} else {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
addList() {
|
||||
this.form.detailList.push({
|
||||
endAchievement: "",
|
||||
ratio: "",
|
||||
});
|
||||
},
|
||||
subList() {
|
||||
this.form.detailList.pop();
|
||||
},
|
||||
//修改
|
||||
update(pkId) {
|
||||
this.dialogTitle = '修改';
|
||||
this.ifadd = 2;
|
||||
con.getStoreLevelOne({ pkId: pkId }).then((res) => {
|
||||
this.form = res.data;
|
||||
if (res.code == 200) {
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
//导出
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: "warning",
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
"/lenjoy-member/manage/range-store/export",
|
||||
{ ...this.queryParams },
|
||||
`${this.$t("乐享店铺")}${new Date().getTime()}.xlsx`
|
||||
);
|
||||
});
|
||||
},
|
||||
onSubmit(formName) {
|
||||
if (!this.open_form) {
|
||||
this.$message({
|
||||
message: "请输入正确的会员编码",
|
||||
type: "warning",
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
con.rangeStoreAdd(this.form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: "success",
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
this.getSearch();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.$refs["form"].clearValidate();
|
||||
this.$refs["form"].resetFields();
|
||||
},
|
||||
checkTime(val) {
|
||||
this.queryParams.startDate = val ? val[0] : "";
|
||||
this.queryParams.endDate = val ? val[1] : "";
|
||||
},
|
||||
checkTime1(val) {
|
||||
this.queryParams.failureStartDate = val ? val[0] : "";
|
||||
this.queryParams.failureEndDate = val ? val[1] : "";
|
||||
},
|
||||
getData() {
|
||||
con.rangeStoreStatus().then((res) => {
|
||||
this.noPageList = res.data;
|
||||
});
|
||||
con.getEnumsLevelValue().then((res) => {
|
||||
this.levelValueList = res.data;
|
||||
});
|
||||
},
|
||||
addData() {
|
||||
this.dialogTitle = '添加';
|
||||
this.ifadd = 1;
|
||||
this.form = {
|
||||
memberCode: "",
|
||||
memberName: "",
|
||||
};
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
reChongzhi() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
thedate: [],
|
||||
thedates: [],
|
||||
};
|
||||
this.getSearch();
|
||||
},
|
||||
getSearch() {
|
||||
this.loading = true;
|
||||
con.rangeStoreList(this.queryParams).then((res) => {
|
||||
this.tableData = res.rows;
|
||||
this.total = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-range-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
padding: 10px 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.thetopbox {
|
||||
padding: 15px 20px 15px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
.searchbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.searchtitle {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.searchbtn {
|
||||
background: #08143f;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
//margin-top: 20px;
|
||||
background: #f9f9f9;
|
||||
//border-radius: 8px;
|
||||
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
|
||||
.maintop {
|
||||
display: flex;
|
||||
// padding: 10px 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.mainbtn {
|
||||
.thebtn1 {
|
||||
color: #ffffff;
|
||||
background: #48b2fd;
|
||||
}
|
||||
.thebtn2 {
|
||||
color: #ffffff;
|
||||
background: #ffad41;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,13 +0,0 @@
|
|||
<template>
|
||||
<div>邮箱配置</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -1,478 +0,0 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:topList="topList"
|
||||
:moren="moren"
|
||||
></topBar>
|
||||
<div class="thetopbox">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'店铺编号'">
|
||||
<el-input clearable v-model="queryParams.storeCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'店铺名称'">
|
||||
<el-input clearable v-model="queryParams.storeName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="dizhi" :label="'详细地址'" prop="">
|
||||
<el-cascader
|
||||
style="width: 100%"
|
||||
clearable
|
||||
v-model="queryParams.shoppingAddress"
|
||||
:options="areaData"
|
||||
:props="regionParams"
|
||||
@change="handleChange1"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="" label-width="40px">
|
||||
<el-input clearable v-model="queryParams.address"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'店长编号'">
|
||||
<el-input clearable v-model="queryParams.memberCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'店长姓名'">
|
||||
<el-input clearable v-model="queryParams.shopowner"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'店铺等级'">
|
||||
<el-select clearable v-model="queryParams.pkStoreLevel">
|
||||
<el-option
|
||||
v-for="item in noPageList"
|
||||
:key="item.pkId"
|
||||
:label="item.storeLevelName"
|
||||
:value="item.pkId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker
|
||||
@change="checkTime"
|
||||
type="daterange"
|
||||
range-separator="——"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<div class="searchbox">
|
||||
<el-button class="my_search" @click="getSearch"> {{ '搜索' }}</el-button>
|
||||
<el-button class="my_reset" @click="reChongzhi"> {{ '重置' }}</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="maintop">
|
||||
<div class="mainbtn">
|
||||
<el-button size="mini" class="thebtn1" @click="addData"
|
||||
>{{'添加'}}</el-button
|
||||
>
|
||||
<el-button size="mini" class="thebtn2" @click="handleExport"
|
||||
> {{ '导出' }}</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
height="680px"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="storeCode"
|
||||
:label="'图片'"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<img style="width:48px;height:48px;" :src="scope.row.picture" alt="">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="storeCode"
|
||||
:label="'店铺编号'"
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="storeName" :label="'店铺名称'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="provinceVal" :label="'省'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="cityVal" :label="'市'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="countyVal" :label="'区/县'">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
min-width="150px"
|
||||
prop="address"
|
||||
:label="'详细地址'"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="memberCode" :label="'店长编号'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="shopowner" :label="'店长姓名'">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="pkTransactionVal"
|
||||
:label="'店铺等级'"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
min-width="100px"
|
||||
prop="creationTime"
|
||||
:label="'创建日期'"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getSearch"
|
||||
/>
|
||||
<el-dialog
|
||||
:title="'添加'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
center
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'店铺编号'" prop="storeCode">
|
||||
<el-input clearable disabled v-model="form.storeCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'店铺名称'" prop="storeName">
|
||||
<el-input clearable v-model="form.storeName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'店长编号'" prop="memberCode">
|
||||
<el-input
|
||||
clearable
|
||||
@blur="checkName"
|
||||
v-model="form.memberCode"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="店长名称" prop="shopowner">
|
||||
<el-input clearable disabled v-model="form.shopowner"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'店铺等级'" prop="pkStoreLevel">
|
||||
<el-select
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
v-model="form.pkStoreLevel"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in noPageList"
|
||||
:key="item.pkId"
|
||||
:label="item.storeLevelName"
|
||||
:value="item.pkId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="'详细地址'" class="dizhi" prop="shoppingAddress">
|
||||
<el-cascader
|
||||
v-model="form.shoppingAddress"
|
||||
:options="areaData"
|
||||
:props="regionParams"
|
||||
@change="handleChange2"
|
||||
></el-cascader>
|
||||
<el-input
|
||||
clearable
|
||||
type="textarea"
|
||||
v-model="form.address"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'上传图片'" prop="picture">
|
||||
<imageUpload v-model="form.picture" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">{{'取消'}}</el-button>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{'确认'}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from "@/components/topBar";
|
||||
import * as api from "@/api/site.js";
|
||||
import * as con from "@/api/configManage";
|
||||
import ImageUpload from '@/components/ImageUpload'
|
||||
export default {
|
||||
name: "StoreConfiguration",
|
||||
components: {
|
||||
topBar,ImageUpload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moren: "storeConfiguration",
|
||||
topList: [
|
||||
{
|
||||
name: '店铺配置',
|
||||
path: "storeConfiguration",
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
loading:false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
shoppingAddress: ["", "", ""],
|
||||
},
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
areaData: [],
|
||||
regionParams: {
|
||||
label: "name",
|
||||
value: "id",
|
||||
children: "children",
|
||||
expandTrigger: "hover",
|
||||
},
|
||||
dialogVisible: false,
|
||||
rules: {
|
||||
storeName: [
|
||||
{ required: true, message: '请输入店铺名称', trigger: "blur" },
|
||||
],
|
||||
memberCode: [
|
||||
{ required: true, message: '请输入店长编号', trigger: "blur" },
|
||||
],
|
||||
pkStoreLevel: [
|
||||
{ required: true, message: '请选择店铺等级', trigger: "change" },
|
||||
],
|
||||
|
||||
shoppingAddress: [
|
||||
{ required: true, message: '请选择收货地址', trigger: "change" },
|
||||
],
|
||||
picture:[{
|
||||
required: true, message: '请上传图片', trigger: "change"
|
||||
}]
|
||||
},
|
||||
form: {
|
||||
storeCode: "",
|
||||
storeName: "",
|
||||
province: "",
|
||||
city: "",
|
||||
county: "",
|
||||
address: "",
|
||||
memberCode: "",
|
||||
shopowner: "",
|
||||
pkStoreLevel: "",
|
||||
picture:"",
|
||||
shoppingAddress: ["", "", ""],
|
||||
},
|
||||
noPageList: [], //店铺等级下拉列表
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getSearch();
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
//导出
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: "warning",
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
"/member/manage/store/export",
|
||||
{ ...this.queryParams },
|
||||
`店铺配置${new Date().getTime()}.xlsx`
|
||||
);
|
||||
});
|
||||
|
||||
},
|
||||
onSubmit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
con.saveManageStore(this.form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: "success",
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
this.getSearch();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
checkName() {
|
||||
con.getMemberName({ memberCode: this.form.memberCode }).then((res) => {
|
||||
this.$set(this.form, "shopowner", res.memberName);
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.$refs["form"].clearValidate();
|
||||
this.$refs["form"].resetFields();
|
||||
},
|
||||
checkTime(val) {
|
||||
this.queryParams.startDate = val[0];
|
||||
this.queryParams.endDate = val[1];
|
||||
},
|
||||
handleChange1(val) {
|
||||
this.queryParams.province = val[0];
|
||||
this.queryParams.city = val[1];
|
||||
this.queryParams.county = val[2] || "";
|
||||
},
|
||||
handleChange2(val) {
|
||||
this.form.province = val[0];
|
||||
this.form.city = val[1];
|
||||
this.form.county = val[2] || "";
|
||||
},
|
||||
getData() {
|
||||
api.areaList().then((res) => {
|
||||
this.areaData = res.data;
|
||||
});
|
||||
con.getListNoPage().then((res) => {
|
||||
this.noPageList = res.data;
|
||||
});
|
||||
},
|
||||
addData() {
|
||||
this.form = {
|
||||
shoppingAddress: ["", "", ""],
|
||||
};
|
||||
con.getStoreCode({}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.form.storeCode = res.msg;
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
reChongzhi() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
shoppingAddress: ["", "", ""],
|
||||
};
|
||||
this.getSearch();
|
||||
},
|
||||
getSearch() {
|
||||
this.loading = true
|
||||
con.getStoreList(this.queryParams).then((res) => {
|
||||
this.tableData = res.rows;
|
||||
this.total = res.total;
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-range-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
padding: 10px 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.thetopbox {
|
||||
padding: 15px 20px 15px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
.searchbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.searchtitle {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.searchbtn {
|
||||
background: #08143f;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
//margin-top: 20px;
|
||||
background: #f9f9f9;
|
||||
//border-radius: 8px;
|
||||
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
|
||||
.maintop {
|
||||
display: flex;
|
||||
// padding: 10px 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.mainbtn {
|
||||
.thebtn1 {
|
||||
color: #ffffff;
|
||||
background: #48b2fd;
|
||||
// width: 68px;
|
||||
// height: 32px;
|
||||
}
|
||||
.thebtn2 {
|
||||
color: #ffffff;
|
||||
background: #ffad41;
|
||||
// width: 68px;
|
||||
// height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,479 +0,0 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:topList="topList"
|
||||
:moren="moren"
|
||||
></topBar>
|
||||
<div class="thetopbox">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'店铺等级'">
|
||||
<el-select clearable v-model="queryParams.levelValue">
|
||||
<el-option
|
||||
v-for="item in noPageList"
|
||||
:key="item.pkId"
|
||||
:label="item.storeLevelName"
|
||||
:value="item.pkId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker
|
||||
v-model="queryParams.thedate"
|
||||
@change="checkTime"
|
||||
type="daterange"
|
||||
range-separator="——"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<div class="searchbox">
|
||||
<el-button class="my_search" @click="getSearch"> {{ '搜索' }}</el-button>
|
||||
<el-button class="my_reset" @click="reChongzhi"> {{ '重置' }}</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="maintop">
|
||||
<div class="mainbtn">
|
||||
<el-button size="small" class="thebtn1" @click="addData"
|
||||
>{{'添加'}}</el-button
|
||||
>
|
||||
<el-button size="small" class="thebtn2" @click="handleExport"
|
||||
> {{ '导出' }}</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
|
||||
height="720px"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="picture"
|
||||
:label="'图片'"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<img
|
||||
style="width: 48px; height: 48px"
|
||||
:src="scope.row.picture"
|
||||
alt=""
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="storeLevelName"
|
||||
:label="'店铺等级'"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="storeName" :label="'奖金比例'">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<div style="border-bottom: 1px solid rgba(204, 204, 204, 0.5)">
|
||||
<span style="margin-right: 5px">{{ '比例' }}</span>
|
||||
<span
|
||||
style="margin-right: 5px"
|
||||
v-for="(aitem, aindex) in scope.row.detailList"
|
||||
:key="aindex"
|
||||
>{{ aitem.ratio }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span style="margin-right: 5px">{{ '业绩' }}</span>
|
||||
<span
|
||||
style="margin-right: 5px"
|
||||
v-for="(bitem, bindex) in scope.row.detailList"
|
||||
:key="bindex"
|
||||
>
|
||||
{{ bitem.endAchievement }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
min-width="100px"
|
||||
prop="creationTime"
|
||||
:label="'创建日期'"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="time"
|
||||
:label="'操作'"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click="update(scope.row.pkId)"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #6962f6"
|
||||
>
|
||||
{{ '修改' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getSearch"
|
||||
/>
|
||||
<el-dialog
|
||||
:title="dialogTitle"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
center
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-row
|
||||
style="
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 10px;
|
||||
"
|
||||
>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'店铺等级'" prop="storeLevelName">
|
||||
<el-input v-model="form.storeLevelName"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'店铺属性'" prop="levelValue">
|
||||
<el-select
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
v-model="form.levelValue"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in levelValueList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="'上传图片'" prop="picture">
|
||||
<imageUpload v-model="form.picture" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-for="(item, i) in form.detailList" :key="i">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
required
|
||||
:label="'业绩'"
|
||||
:prop="form.detailList[i].endAchievement"
|
||||
>
|
||||
<el-input v-model="form.detailList[i].endAchievement"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
required
|
||||
:label="'比例'+'(%)'"
|
||||
:prop="form.detailList[i].ratio"
|
||||
>
|
||||
<el-input v-model="form.detailList[i].ratio"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col style="text-align: center">
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-plus"
|
||||
@click="addList()"
|
||||
></el-button>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-minus"
|
||||
@click="subList()"
|
||||
></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">{{'取消'}}</el-button>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{'确认'}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from "@/components/topBar";
|
||||
import * as con from "@/api/configManage";
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
export default {
|
||||
name: "StoreGradeConfiguration",
|
||||
components: {
|
||||
topBar,
|
||||
ImageUpload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moren: "storeGradeConfiguration",
|
||||
topList: [
|
||||
{
|
||||
name: '店铺等级',
|
||||
path: "storeGradeConfiguration",
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
loading:false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
thedate: [],
|
||||
},
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
|
||||
dialogVisible: false,
|
||||
rules: {
|
||||
storeLevelName: [
|
||||
{ required: true, message: "请输入店铺等级", trigger: "blur" },
|
||||
],
|
||||
levelValue: [
|
||||
{ required: true, message: "请选择店属性", trigger: "change" },
|
||||
],
|
||||
|
||||
picture: [
|
||||
{
|
||||
required: true,
|
||||
message: '请上传图片',
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
form: {
|
||||
storeLevelName: "",
|
||||
levelValue: "",
|
||||
picture: "",
|
||||
detailList: [
|
||||
{
|
||||
endAchievement: "1",
|
||||
ratio: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
noPageList: [], //店铺等级下拉列表
|
||||
levelValueList: [], //店铺属性下拉选
|
||||
dialogTitle: "",
|
||||
ifadd: "", //1添加2修改
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getSearch();
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
addList() {
|
||||
this.form.detailList.push({
|
||||
endAchievement: "",
|
||||
ratio: "",
|
||||
});
|
||||
},
|
||||
subList() {
|
||||
this.form.detailList.pop();
|
||||
},
|
||||
//修改
|
||||
update(pkId) {
|
||||
this.dialogTitle = '修改';
|
||||
this.ifadd = 2;
|
||||
con.getStoreLevelOne({ pkId: pkId }).then((res) => {
|
||||
this.form = res.data;
|
||||
if (res.code == 200) {
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
//导出
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: "warning",
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
"/system/manage/store-level/export",
|
||||
{ ...this.queryParams },
|
||||
`${'店铺等级'}${new Date().getTime()}.xlsx`
|
||||
);
|
||||
});
|
||||
},
|
||||
onSubmit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.form.detailList.length > 0) {
|
||||
this.$message({
|
||||
message: "请至少添加一条业绩/比例",
|
||||
type: "warning",
|
||||
});
|
||||
return;
|
||||
}
|
||||
let url = "";
|
||||
if (this.ifadd == 1) {
|
||||
url = con.saveStoreLevel;
|
||||
} else if (this.ifadd == 2) {
|
||||
url = con.updateStoreLevel;
|
||||
}
|
||||
url(this.form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: "success",
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
this.getSearch();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.$refs["form"].clearValidate();
|
||||
this.$refs["form"].resetFields();
|
||||
},
|
||||
checkTime(val) {
|
||||
this.queryParams.startDate = val[0];
|
||||
this.queryParams.endDate = val[1];
|
||||
},
|
||||
|
||||
getData() {
|
||||
con.getListNoPage().then((res) => {
|
||||
this.noPageList = res.data;
|
||||
});
|
||||
con.getEnumsLevelValue().then((res) => {
|
||||
this.levelValueList = res.data;
|
||||
});
|
||||
},
|
||||
addData() {
|
||||
this.dialogTitle = '添加';
|
||||
this.ifadd = 1;
|
||||
this.form = {
|
||||
storeLevelName: "",
|
||||
levelValue: "",
|
||||
picture: "",
|
||||
detailList: [
|
||||
{
|
||||
endAchievement: "",
|
||||
ratio: "",
|
||||
},
|
||||
],
|
||||
};
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
reChongzhi() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
thedate: [],
|
||||
};
|
||||
this.getSearch();
|
||||
},
|
||||
getSearch() {
|
||||
this.loading = true
|
||||
con.getStoreGradeList(this.queryParams).then((res) => {
|
||||
this.tableData = res.rows;
|
||||
this.total = res.total;
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-range-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
padding: 10px 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.thetopbox {
|
||||
padding: 15px 20px 15px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
.searchbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.searchtitle {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.searchbtn {
|
||||
background: #08143f;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
//margin-top: 20px;
|
||||
background: #f9f9f9;
|
||||
//border-radius: 8px;
|
||||
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
|
||||
.maintop {
|
||||
display: flex;
|
||||
// padding: 10px 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.mainbtn {
|
||||
.thebtn1 {
|
||||
color: #ffffff;
|
||||
background: #48b2fd;
|
||||
|
||||
}
|
||||
.thebtn2 {
|
||||
color: #ffffff;
|
||||
background: #ffad41;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue