feat(configuration): 添加区域分组页面

This commit is contained in:
woody 2025-06-25 20:03:35 +08:00
parent b8229da887
commit 2d0e470a73
7 changed files with 774 additions and 409 deletions

View File

@ -6,7 +6,7 @@
*/
import request from '@/utils/request'
//获取体系配置列表
// 获取体系配置列表
export function getvertexList(params) {
return request({
url: '/system/manage/vertex/list',
@ -15,15 +15,15 @@ export function getvertexList(params) {
})
}
//删除体系配置
// 删除体系配置
export function deleteVertex(pkId) {
return request({
url: '/system/manage/vertex/' + pkId,
method: 'delete',
method: 'delete'
})
}
//获取单条体系配置
// 获取单条体系配置
export function getOnevertexList(params) {
return request({
url: '/system/manage/vertex/detail',
@ -32,7 +32,7 @@ export function getOnevertexList(params) {
})
}
//修改单条体系配置
// 修改单条体系配置
export function updateVertex(data) {
return request({
url: '/system/manage/vertex/update',
@ -41,7 +41,7 @@ export function updateVertex(data) {
})
}
//添加单条体系配置
// 添加单条体系配置
export function saveVertex(data) {
return request({
url: '/system/manage/vertex/save',
@ -50,7 +50,7 @@ export function saveVertex(data) {
})
}
//注册页面配置-允许禁止枚举
// 注册页面配置-允许禁止枚举
export function getYseNoList(params) {
return request({
url: '/system/pub/enums/yes-no',
@ -59,7 +59,7 @@ export function getYseNoList(params) {
})
}
//注册页面配置列表
// 注册页面配置列表
export function getRegisterPageList(params) {
return request({
url: '/system/manage/register-page/list',
@ -67,7 +67,7 @@ export function getRegisterPageList(params) {
params
})
}
//体系下拉
// 体系下拉
export function findVertex(params) {
return request({
url: 'system/manage/vertex/find-vertex',
@ -76,7 +76,7 @@ export function findVertex(params) {
})
}
//保存注册页面配置
// 保存注册页面配置
export function saveRegisterPage(data) {
return request({
url: '/system/manage/register-page/save',
@ -85,7 +85,7 @@ export function saveRegisterPage(data) {
})
}
//刷新体系
// 刷新体系
export function flushAll(params) {
return request({
url: '/system/manage/vertex/flush-all',
@ -93,3 +93,39 @@ export function flushAll(params) {
params
})
}
// 获取区域体系分组
export function getGroupConfigurationList(params) {
return request({
url: '/system/manage/bd-region-vertex/list',
method: 'get',
params
})
}
// 添加区域体系分组
export function addGroupConfiguration(data) {
return request({
url: '/system/manage/bd-region-vertex/add',
method: 'post',
data
})
}
// 更新区域体系分组
export function updateGroupConfiguration(data) {
return request({
url: '/system/manage/bd-region-vertex/update',
method: 'post',
data
})
}
// 删除区域体系分组
export function deleteGroupConfiguration(data) {
return request({
url: '/system/manage/bd-region-vertex/delete',
method: 'post',
data
})
}

View File

@ -1665,11 +1665,17 @@ export const constantRoutes = [
},
{
path: 'systemconfiguration',
name: 'Systemconfiguration',
name: 'SystemconfigurationMenu',
meta: { title: '体系配置' },
component: ParentView,
redirect: 'systemconfiguration/index',
children: [
{
path: 'groupConfiguration',
name: 'GroupConfigurationList',
component: () => import('@/views/configManage/systemconfiguration/groupConfiguration'),
meta: { title: '区域体系分组' }
},
{
path: 'txpz',
name: 'Systemconfiguration',

View File

@ -7,10 +7,10 @@
<el-col :span="4">
<el-form-item :label="'会员编号'" prop="memberCode">
<el-input
clearable
v-model="queryParams.memberCode"
clearable
:placeholder="'请输入'"
></el-input>
/>
</el-form-item>
</el-col>
<el-col :span="4">
@ -20,36 +20,36 @@
clearable
placeholder=""
>
<el-option label="是" value="0"></el-option>
<el-option label="否" value="1"></el-option>
<el-option label="是" value="0" />
<el-option label="否" value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="签呈来源">
<el-select
v-model="queryParams.source"
clearable
:placeholder="'请选择'"
v-model="queryParams.source"
>
<el-option
v-for="item in sourceList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('收益区域')" prop="accountStatus">
<el-cascader
clearable
@change="flChange"
v-model="address"
clearable
:options="areaData"
:placeholder="'请选择省市区'"
:props="regionParams"
@change="flChange"
/>
</el-form-item>
</el-col>
@ -91,18 +91,15 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="changeTime2"
>
</el-date-picker>
/>
</el-form-item>
</el-col>
<el-col :span="4">
<div class="searchbox">
<el-button class="my_search" @click="research()">
{{ '搜索' }}</el-button
>
{{ '搜索' }}</el-button>
<el-button class="my_reset" @click="reChongzhi">
{{ '重置' }}</el-button
>
{{ '重置' }}</el-button>
</div>
</el-col>
</el-row>
@ -112,27 +109,25 @@
<div class="maintop">
<div class="mainbtn">
<el-button
v-hasButtons="['memberRetailRegionAdd']"
size="small"
style="background-color: #48b2fd"
class="thebtn1"
v-hasButtons="['memberRetailRegionAdd']"
@click="addRules"
>{{ '添加' }}</el-button
>
>{{ '添加' }}</el-button>
<el-button
size="small"
v-hasButtons="['memberRetailRegionExport']"
size="small"
class="thebtn2"
@click="handleExport"
>
{{ '导出' }}</el-button
>
{{ '导出' }}</el-button>
</div>
</div>
<div class="maintable">
<el-table
:data="tableData"
v-loading="loading"
:data="tableData"
height="730px"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
@ -200,21 +195,21 @@
<el-table-column align="center" :label="'操作'" width="150">
<template slot-scope="scope">
<el-button
v-has-buttons="['memberRetailRegionUpdate']"
class="colors"
type="text"
size="small"
style="color: #ffad41"
v-has-buttons="['memberRetailRegionUpdate']"
@click.native.prevent="updateShow(scope.row)"
>
{{ $t("修改") }}
</el-button>
<el-button
v-has-buttons="['memberRetailRegionDel']"
class="colors"
type="text"
size="small"
style="color: #c73030"
v-has-buttons="['memberRetailRegionDel']"
@click.native.prevent="delRole(scope.row)"
>
{{ '删除' }}
@ -232,36 +227,35 @@
:close-on-click-modal="false"
:before-close="handleClose"
>
<el-form ref="forms" :rules="rules" :model="table" label-width="100px">
<el-form ref="forms" :rules="rules" :model="table" label-width="120px">
<el-form-item :label="$t('会员编号')" prop="memberCode">
<el-input
v-model="table.memberCode"
style="width: 460px"
clearable
:disabled="types == 2 ? true : false"
v-model="table.memberCode"
@input="getmemberinfo"
:placeholder="'请输入'"
></el-input>
@input="getmemberinfo"
/>
</el-form-item>
<el-form-item :label="$t('收益区域')" prop="addressd">
<el-cascader
style="width: 460px"
@change="flChange1"
v-model="table.addressd"
style="width: 460px"
:options="areaData"
:placeholder="'请选择省市区'"
:props="regionParams"
@change="flChange1"
/>
</el-form-item>
<el-form-item :label="$t('生效结束时间')" prop="addressd">
<el-form-item :label="$t('生效结束时间')" prop="effectiveEndDate">
<el-date-picker
v-model="table.effectiveEndDate"
:picker-options="pickerOptions"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
@change="changeTime3"
>
</el-date-picker>
/>
</el-form-item>
<div style="padding-top: 30px; display: flex; justify-content: center">
<el-button
@ -270,8 +264,7 @@
class="button-style"
@click="handleClose"
>
{{ '取消' }}</el-button
>
{{ '取消' }}</el-button>
<el-button
v-preventReClick="3000"
type="text"
@ -296,20 +289,20 @@
</template>
<script>
import topBar from "@/components/topBar";
import { getbdmenuList, getPubenumsList } from "@/api/system";
import { getgradeRanglist, getAwardsListChiose } from "@/api/level";
import * as con from "@/api/configManage.js";
import * as api from "@/api/manage.js";
import { Message } from "element-ui";
import { deleteAgreement } from "@/api/configManage";
import ImageUpload from "@/components/ImageUpload";
import { areaList } from "@/api/site";
import topBar from '@/components/topBar'
import { getbdmenuList, getPubenumsList } from '@/api/system'
import { getgradeRanglist, getAwardsListChiose } from '@/api/level'
import * as con from '@/api/configManage.js'
import * as api from '@/api/manage.js'
import { Message } from 'element-ui'
import { deleteAgreement } from '@/api/configManage'
import ImageUpload from '@/components/ImageUpload'
import { areaList } from '@/api/site'
export default {
name: "Qxpz",
name: 'Qxpz',
components: {
topBar,
ImageUpload,
ImageUpload
},
data() {
return {
@ -318,253 +311,259 @@ export default {
effectiveTime: [],
sourceList: [],
regionParams: {
label: "name",
value: "id",
children: "children",
expandTrigger: "hover",
label: 'name',
value: 'id',
children: 'children',
expandTrigger: 'hover'
},
title: '添加',
forms: "",
forms: '',
pickerOptions: {
disabledDate(time) {
const now = new Date();
now.setHours(0, 0, 0, 0); // Reset to start of today
return time.getTime() < now.getTime(); // Disable only dates before today
},
const now = new Date()
now.setHours(0, 0, 0, 0) // Reset to start of today
return time.getTime() < now.getTime() // Disable only dates before today
}
},
rules: {
memberCode: [
{ required: true, message: '请选择发布位置', trigger: "blur" },
{ required: true, message: '请输入会员编号', trigger: 'blur' }
],
addressd: [
{ required: true, message: '请选择收益区域', trigger: 'blur' }
],
effectiveEndDate: [
{ required: true, message: '请选择生效结束时间', trigger: 'blur' }
]
},
table: {
memberCode: "",
pkMember: "",
addressd: ["", "", ""],
effectiveEndDate: "",
memberCode: '',
pkMember: '',
addressd: ['', '', ''],
effectiveEndDate: ''
},
ruleShow: false,
moren: "memberRetailRegion",
moren: 'memberRetailRegion',
topList: [
{
name: this.$t("收益区域配置"),
path: "memberRetailRegion",
},
name: this.$t('收益区域配置'),
path: 'memberRetailRegion'
}
],
defaultParams: {
label: "label",
value: "value",
children: "enumList",
label: 'label',
value: 'value',
children: 'enumList'
},
multipleSelection: [],
queryParams: {
pageNum: 1,
pageSize: 50,
effective: "0",
effective: '0'
},
gradeRangList: [],
awardsList: [],
statusList: [
{ name: '立即发送', id: "1" },
{ name: '定时发送', id: "2" },
{ name: '立即发送', id: '1' },
{ name: '定时发送', id: '2' }
],
statusList1: [
{ name: '未发送', id: "0" },
{ name: '已发送', id: "1" },
{ name: '未发送', id: '0' },
{ name: '已发送', id: '1' }
],
menuOptions: [],
loading: false,
tableData: [],
total: 0,
types: "",
formId: "",
types: '',
formId: '',
getPostionList: [],
address: "",
address: '',
areaData: [],
pkIds: "",
};
pkIds: ''
}
},
created() {
this.research();
this.getsignSource();
this.getAllArea();
this.research()
this.getsignSource()
this.getAllArea()
},
methods: {
handleExport() {
this.$confirm('是否确认导出所有数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
type: 'warning'
}).then((_) => {
this.download(
"/member/manage/cu-member-retail-region/export",
'/member/manage/cu-member-retail-region/export',
{ ...this.queryParams },
`${this.$t("会员收益区域配置")}}${new Date().getTime()}.xlsx`
);
});
`${this.$t('会员收益区域配置')}}${new Date().getTime()}.xlsx`
)
})
},
getmemberinfo(member) {
con.getQueryMemberInfo({ memberCode: member }).then((res) => {
this.table.pkMember = res.data.pkId;
});
this.table.pkMember = res.data.pkId
})
},
getAllArea() {
areaList().then((res) => {
this.areaData = res.data;
});
this.areaData = res.data
})
},
flChange(value) {
this.queryParams.county = "";
this.queryParams.province = "";
this.queryParams.city = "";
this.queryParams.county = ''
this.queryParams.province = ''
this.queryParams.city = ''
this.queryParams.province = value[0];
this.queryParams.city = value[1];
this.queryParams.county = value[2];
this.queryParams.province = value[0]
this.queryParams.city = value[1]
this.queryParams.county = value[2]
},
flChange1(value) {
this.table.county = "";
this.table.province = "";
this.table.city = "";
this.table.province = value[0];
this.table.city = value[1];
this.table.county = value[2];
this.table.county = ''
this.table.province = ''
this.table.city = ''
this.table.province = value[0]
this.table.city = value[1]
this.table.county = value[2]
},
getsignSource() {
api.noticeWebsiteType().then((res) => {
this.sourceList = res.data;
});
this.sourceList = res.data
})
},
addRules() {
this.types = 1;
this.ruleShow = true;
this.title = '添加';
this.types = 1
this.ruleShow = true
this.title = '添加'
},
submitBtn() {
//
this.ruleSubmit();
this.ruleSubmit()
},
updateShow(item) {
this.types = 2;
this.title = '修改';
this.table = item;
let arr = [item.province + "", item.city + "", (item.county || "") + ""];
arr = arr.filter((item) => item != "");
this.$set(this.table, "addressd", arr);
this.$forceUpdate();
console.log(this.table.addressd, "table");
this.pkIds = item.pkId;
this.ruleShow = true;
this.types = 2
this.title = '修改'
this.table = item
let arr = [item.province + '', item.city + '', (item.county || '') + '']
arr = arr.filter((item) => item != '')
this.$set(this.table, 'addressd', arr)
this.$forceUpdate()
console.log(this.table.addressd, 'table')
this.pkIds = item.pkId
this.ruleShow = true
},
delRole(item) {
this.$confirm(this.$t("确认要删除该配置吗?"), '提示', {
this.$confirm(this.$t('确认要删除该配置吗?'), '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
type: 'warning'
}).then(() => {
con.delRetailRegion(item.pkId).then((res) => {
if (res.code === 200) {
Message({
message: res.msg,
type: "success",
});
this.research();
type: 'success'
})
this.research()
} else {
Message({
message: res.msg,
type: "error",
});
type: 'error'
})
}
});
});
})
})
},
ruleSubmit() {
const datas = {};
const that = this;
this.$refs["forms"].validate((valid) => {
const datas = {}
const that = this
this.$refs['forms'].validate((valid) => {
if (!valid) {
return false;
return false
} else {
if (this.types === 1) {
datas.pkMember = this.table.pkMember;
datas.province = this.table.addressd[0];
datas.city = this.table.addressd[1];
datas.county = this.table.addressd[2];
datas.effectiveEndDate = this.table.effectiveEndDate;
datas.pkMember = this.table.pkMember
datas.province = this.table.addressd[0]
datas.city = this.table.addressd[1]
datas.county = this.table.addressd[2]
datas.effectiveEndDate = this.table.effectiveEndDate
con.retailRegionAdd(datas).then((res) => {
if (res.code === 200) {
Message({
message: res.msg,
type: "success",
});
that.ruleShow = false;
type: 'success'
})
that.ruleShow = false
that.table = {
pkMember: "",
addressd: ["", "", ""],
};
that.research();
pkMember: '',
addressd: ['', '', '']
}
});
that.research()
}
})
}
if (this.types === 2) {
datas.pkMember = this.table.pkMember;
datas.pkId = this.pkIds;
datas.province = this.table.addressd[0];
datas.city = this.table.addressd[1];
datas.county = this.table.addressd[2];
datas.effectiveEndDate = this.table.effectiveEndDate;
datas.pkMember = this.table.pkMember
datas.pkId = this.pkIds
datas.province = this.table.addressd[0]
datas.city = this.table.addressd[1]
datas.county = this.table.addressd[2]
datas.effectiveEndDate = this.table.effectiveEndDate
con.retailRegionUpdate(datas).then((res) => {
if (res.code === 200) {
Message({
message: res.msg,
type: "success",
});
that.ruleShow = false;
type: 'success'
})
that.ruleShow = false
that.table = {
pkMember: "",
addressd: ["", "", ""],
};
that.research();
pkMember: '',
addressd: ['', '', '']
}
});
that.research()
}
})
}
}
});
})
},
statusChange(value) {
if (this.table.status.length > 1) {
this.table.status.splice(0, 1);
this.table.status.splice(0, 1)
}
},
handleClose() {
this.ruleShow = false;
this.ruleShow = false
this.table = {
pkMember: "",
addressd: ["", "", ""],
};
pkMember: '',
addressd: ['', '', '']
}
},
changeBox(row) {
console.error(row);
console.error(row)
},
addFrom() {},
addRule() {},
changeTime(value) {
this.queryParams.startDate = value[0] ? value[0] : "";
this.queryParams.endDate = value[1] ? value[1] : "";
this.queryParams.startDate = value[0] ? value[0] : ''
this.queryParams.endDate = value[1] ? value[1] : ''
},
changeTime1(value) {
this.queryParams.startDateModify = value[0] ? value[0] : "";
this.queryParams.endDateModify = value[1] ? value[1] : "";
this.queryParams.startDateModify = value[0] ? value[0] : ''
this.queryParams.endDateModify = value[1] ? value[1] : ''
},
changeTime2(value) {
this.queryParams.effectiveStaDateStr = value[0] ? value[0] : "";
this.queryParams.effectiveEndDateStr = value[1] ? value[1] : "";
this.queryParams.effectiveStaDateStr = value[0] ? value[0] : ''
this.queryParams.effectiveEndDateStr = value[1] ? value[1] : ''
},
changeTime3(value) {
this.table.effectiveEndDate = value;
this.table.effectiveEndDate = value
},
disabledDates(time) {
const now = new Date(); //
const now = new Date() //
const currentDateTime = new Date(
now.getFullYear(),
now.getMonth(),
@ -572,30 +571,30 @@ export default {
now.getHours(),
now.getMinutes(),
now.getSeconds()
);
return time.getTime() < currentDateTime.getTime(); //
)
return time.getTime() < currentDateTime.getTime() //
},
handleChangeMunu(value) {
console.log("🌈", value[value.length - 1]);
this.queryParams.menuId = value[value.length - 1];
console.log('🌈', value[value.length - 1])
this.queryParams.menuId = value[value.length - 1]
},
//
getPubenumsList() {
getPubenumsList().then((res) => {
this.menuOptions = res.data;
});
this.menuOptions = res.data
})
},
//
getgradeRanglist() {
getgradeRanglist().then((res) => {
this.gradeRangList = res.data;
});
this.gradeRangList = res.data
})
},
//
getAwardsListChiose() {
getAwardsListChiose().then((res) => {
this.awardsList = res.rows;
});
this.awardsList = res.rows
})
},
research() {
// //
@ -603,27 +602,27 @@ export default {
// this.queryParams.creationTimeStart = this.queryParams.creationTime[0];
// this.queryParams.creationTimeEnd = this.queryParams.creationTime[1];
// }
this.loading = true;
this.loading = true
con.getRetailRegionList(this.queryParams).then((res) => {
this.tableData = res.rows;
this.total = res.total;
this.loading = false;
});
this.tableData = res.rows
this.total = res.total
this.loading = false
})
},
reChongzhi() {
this.queryParams = {
pageNum: 1,
pageSize: 50,
};
this.modifiedTime = [];
this.modifiedTime1 = [];
this.effectiveTime = [];
this.address = [];
this.research();
pageSize: 50
}
this.modifiedTime = []
this.modifiedTime1 = []
this.effectiveTime = []
this.address = []
this.research()
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// if (columnIndex === 0) {
@ -642,14 +641,14 @@ export default {
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
return 'warning-row'
} else if (rowIndex % 2 == 0) {
return "success-row";
return 'success-row'
}
return "";
},
},
};
return ''
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-upload--picture-card {

View File

@ -0,0 +1,303 @@
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
:top-list="topList"
:moren="moren"
/>
<div class="thetopbox">
<el-form label-width="auto">
<el-row :gutter="10">
<el-col :span="4">
<el-form-item label="分组名称" prop="name">
<el-input v-model="queryParams.name" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<div class="searchbox">
<el-button class="delBtn" @click="handleSearch()">
{{ '搜索' }}</el-button>
<el-button @click="reset"> {{ '重置' }}</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="handleAddOrEdit(true)"
>添加</el-button>
</div>
</div>
<div class="maintable">
<el-table
v-loading="loading"
height="740px"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName"
:data="tableData"
>
>
<el-table-column type="selection" width="55" />
<el-table-column
align="center"
prop="name"
label="分组名称"
/>
<el-table-column
align="center"
prop="creationTime"
:label="'创建日期'"
/>
<el-table-column
align="center"
prop="modifyTime"
label="修改时间"
/>
<el-table-column
align="center"
prop="time"
:label="'操作'"
fixed="right"
>
<template slot-scope="scope">
<el-button
class="button-s"
type="text"
size="small"
style="color: #6962f6"
@click.native.prevent="handleAddOrEdit(false, scope.row)"
>
{{ '修改' }}
</el-button>
<el-button
class="button-s"
type="text"
size="small"
style="color: #c73030"
@click.native.prevent="deleteRow(scope.row)"
>
{{ '删除' }}
</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="getGroupConfigurationList"
/>
<el-dialog
:close-on-click-modal="false"
:visible.sync="updateDialogVisibe"
:title="updateTitle"
width="500px"
@close="handleClose"
>
<el-form :model="form" label-width="100px">
<el-form-item label="分组名称">
<el-input v-model="form.name" />
</el-form-item>
</el-form>
<div class="footer" style="text-align: center; margin-top: 20px">
<el-button @click="updateDialogVisibe = false">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import topBar from '@/components/topBar'
import { topList } from './mixins'
import { getGroupConfigurationList, addGroupConfiguration, updateGroupConfiguration, deleteGroupConfiguration } from '@/api/systemconfiguration'
export default {
name: 'Txpz',
components: {
topBar
},
data() {
return {
form: {
name: undefined //
},
moren: 'groupConfiguration',
topList: topList,
tableData: [],
loading: false,
multipleSelection: [],
total: 0,
cjsj: '',
queryParams: {
pageNum: 1,
pageSize: 50,
name: ''
},
updateShow: false,
updateDialogVisibe: false, // true false
updateTitle: '',
isAdd: false,
vertexList: []
}
},
created() {
this.getGroupConfigurationList()
},
methods: {
reset() {
this.queryParams.pageNum = 1
this.queryParams.name = ''
this.getGroupConfigurationList()
},
handleSearch() {
this.queryParams.pageNum = 1
this.getGroupConfigurationList()
},
getGroupConfigurationList() {
this.loading = true
if (this.cjsj) {
this.queryParams.createStartDate = this.cjsj[0]
this.queryParams.createEndDate = this.cjsj[1]
}
getGroupConfigurationList({
...this.queryParams,
name: this.queryParams.name || undefined
}).then((res) => {
this.tableData = res.rows
this.total = res.total
this.loading = false
})
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return 'warning-row'
} else if (rowIndex % 2 == 0) {
return 'success-row'
}
return ''
},
handleAddOrEdit(isAdd, row) {
this.isAdd = isAdd
if (isAdd) {
this.updateDialogVisibe = true
this.updateTitle = '添加'
} else {
this.updateDialogVisibe = true
this.updateTitle = '修改'
this.form = JSON.parse(JSON.stringify(row))
}
},
handleConfirm() {
const api = this.isAdd ? addGroupConfiguration : updateGroupConfiguration
api(this.form).then((res) => {
if (res.code !== 200) return
this.updateDialogVisibe = false
this.getGroupConfigurationList()
})
},
deleteRow(row) {
this.$confirm('确定删除该分组吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteGroupConfiguration(row).then((res) => {
if (res.code !== 200) return
this.getGroupConfigurationList()
})
})
},
handleClose() {
this.form.name = ''
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table .warning-row {
background: #f9f9f9;
}
::v-deep .el-table .success-row {
background: #ffffff;
}
::v-deep .el-table thead {
color: #000000;
}
::v-deep .el-row {
// margin-top: 20px;
}
.page {
padding: 20px;
background: #f9f9f9;
font-size: 14px;
.thetopbox {
padding: 0 20px 0px 20px !important;
background: #ffffff;
border-radius: 8px;
.searchbox {
display: flex;
align-items: center;
.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 {
background: #3181e5;
color: #ffffff;
width: 68px;
height: 32px;
}
.thebtn2 {
background: #ffad41;
color: #ffffff;
width: 68px;
height: 32px;
}
}
}
.maintable {
// max-height: 550px;
overflow: auto;
}
}
}
::v-deep .el-range-editor {
width: auto;
}
::v-deep .el-select {
width: 100%;
}
</style>

View File

@ -2,15 +2,15 @@
<div class="page">
<topBar
v-if="topList.length > 0"
:topList="topList"
:top-list="topList"
:moren="moren"
></topBar>
/>
<div class="thetopbox">
<el-form label-width="auto">
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="'体系名称'" prop="vertexName">
<el-input clearable v-model="queryParams.vertexName"></el-input>
<el-input v-model="queryParams.vertexName" clearable />
</el-form-item>
</el-col>
<!-- <el-col :span="4">
@ -28,15 +28,13 @@
:end-placeholder="'结束日期'"
value-format="yyyy-MM-dd"
:unlink-panels="true"
>
</el-date-picker>
/>
</el-form-item>
</el-col>
<el-col :span="4">
<div class="searchbox">
<el-button class="delBtn" @click="getvertexList()">
{{ '搜索' }}</el-button
>
{{ '搜索' }}</el-button>
<el-button @click="reChongzhi"> {{ '重置' }}</el-button>
</div>
</el-col>
@ -51,58 +49,58 @@
size="small"
class="thebtn1"
@click="adddate()"
>{{ '添加' }}</el-button
>
>{{ '添加' }}</el-button>
<el-button
v-hasButtons="['SystemconfigurationExport']"
size="small"
class="thebtn2"
>
{{ '导出' }}</el-button
>
{{ '导出' }}</el-button>
<el-button
v-hasButtons="['SystemconfigurationUpAll']"
size="small"
class="tjBtn"
@click="upData"
>更新全部</el-button
>
>更新全部</el-button>
</div>
</div>
<div class="maintable">
<el-table
v-loading="loading"
height="740px"
style="width: 100%"
v-loading="loading"
:header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName"
:data="tableData"
>
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="selection" width="55" />
<el-table-column
align="center"
prop="vertexName"
:label="'体系名称'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="memberCode"
:label="'会员编号'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="vertexName"
label="所属区域"
/>
<el-table-column
align="center"
prop="creationTime"
:label="'创建日期'"
></el-table-column>
/>
<el-table-column
align="center"
prop="sort"
label="序号"
></el-table-column>
/>
<el-table-column
align="center"
prop="time"
@ -112,28 +110,28 @@
<template slot-scope="scope">
<el-button
class="button-s"
@click.native.prevent="update(scope.row)"
type="text"
size="small"
style="color: #6962f6"
@click.native.prevent="update(scope.row)"
>
{{ '修改' }}
</el-button>
<el-button
class="button-s"
@click.native.prevent="deleteRow(scope.row)"
type="text"
size="small"
style="color: #c73030"
@click.native.prevent="deleteRow(scope.row)"
>
{{ '删除' }}
</el-button>
<el-button
class="button-s"
@click.native.prevent="updateTeam(scope.row)"
type="text"
size="small"
style="color: #48b2fd"
@click.native.prevent="updateTeam(scope.row)"
>
{{ '更新体系' }}
</el-button>
@ -167,19 +165,19 @@
<el-col :span="12">
<el-form-item :label="'体系名称'" prop="vertexName">
<el-input
clearable
v-model="formd.vertexName"
clearable
:placeholder="'请输入体系名称'"
></el-input>
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="'会员编号'" prop="memberCode">
<el-input
clearable
v-model="formd.memberCode"
clearable
:placeholder="'请输入会员编号'"
></el-input>
/>
</el-form-item>
</el-col>
</el-row>
@ -187,22 +185,29 @@
<el-col :span="12">
<el-form-item :label="'上级体系'">
<el-select
v-model="formd.pkParent"
clearable
:placeholder="'请选择'"
v-model="formd.pkParent"
>
<el-option
v-for="item in vertexList"
:key="item.pkId"
:label="item.vertexName"
:value="item.pkId"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="区域分组">
<el-select v-model="formd.regionVertexPkId" clearable>
<el-option v-for="item in groupList" :key="item.pkId" :label="item.name" :value="item.pkId" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="序号">
<el-input clearable v-model="formd.sort"></el-input>
<el-input v-model="formd.sort" clearable />
</el-form-item>
</el-col>
</el-row>
@ -220,7 +225,7 @@
</template>
<script>
import topBar from "@/components/topBar";
import topBar from '@/components/topBar'
import {
getvertexList,
deleteVertex,
@ -229,131 +234,137 @@ import {
saveVertex,
findVertex,
flushAll,
} from "@/api/systemconfiguration";
import { updateVertexs } from "@/api/settle";
getGroupConfigurationList
} from '@/api/systemconfiguration'
import { updateVertexs } from '@/api/settle'
import { topList } from './mixins'
export default {
name: "Txpz",
name: 'Txpz',
components: {
topBar,
topBar
},
data() {
return {
formd: {
vertexName: "", //
vertexName: '', //
// memberCode: "", //
memberCode: "", //
memberCode: '', //
regionVertexPkId: '' //
},
moren: "txpz",
topList: [
{
name: '体系配置',
path: "txpz",
},
],
moren: 'txpz',
topList: topList,
tableData: [],
loading: false,
multipleSelection: [],
total: 0,
cjsj: "",
cjsj: '',
queryParams: {
pageNum: 1,
pageSize: 50,
vertexName: "", //
memberCode: "", //
createStartDate: "", //
createEndDate: "", //
vertexName: '', //
memberCode: '', //
createStartDate: '', //
createEndDate: '' //
},
updateShow: false,
addOrEdit: "", // true false
updateTitle: "",
addOrEdit: '', // true false
updateTitle: '',
rules: {
vertexName: [
{ required: true, message: '请输入体系名称', trigger: "blur" },
{ required: true, message: '请输入体系名称', trigger: 'blur' }
],
memberCode: [
{ required: true, message: '请输入会员编号', trigger: "blur" },
],
memberCode: [
{ required: true, message: '请输入会员编号', trigger: "blur" },
],
{ required: true, message: '请输入会员编号', trigger: 'blur' }
]
},
vertexList: [],
};
groupList: []
}
},
created() {
this.getvertexList();
this.getData();
this.getvertexList()
this.getData()
this.getGroupList()
},
methods: {
getData() {
findVertex().then((res) => {
this.vertexList = res.data;
});
this.vertexList = res.data
})
},
getGroupList() {
getGroupConfigurationList({
pageNum: 1,
pageSize: 999
}).then((res) => {
this.groupList = res.rows
console.log(this.vertexList, 'vertexList')
})
},
upData() {
this.$confirm("是否确认更新该体系?", "", {
this.$confirm('是否确认更新该体系?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
flushAll().then((res) => {
if (res.code == "200") {
if (res.code == '200') {
this.$message({
message: res.msg,
type: "success",
});
type: 'success'
})
}
loading.close();
});
});
loading.close()
})
})
},
//
updateTeam(row) {
this.$confirm("是否确认更新该体系?", "", {
this.$confirm('是否确认更新该体系?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
type: 'warning'
}).then(() => {
updateVertexs(row.pkId).then((res) => {
if (res.code == "200") {
if (res.code == '200') {
this.$message({
message: res.msg,
type: "success",
});
type: 'success'
})
}
});
});
})
})
},
//
//
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let url = "";
let url = ''
if (this.addOrEdit == true) {
url = saveVertex;
url = saveVertex
} else {
url = updateVertex;
url = updateVertex
}
url(this.formd).then((res) => {
if (res.code == 200) {
this.updateShow = false;
this.updateShow = false
this.$message({
message: res.msg,
type: "success",
});
this.getvertexList();
type: 'success'
})
this.getvertexList()
this.formd = {
vertexName: "", //
vertexName: '', //
// memberCode: "", //
memberCode: "", //
};
memberCode: '' //
}
}
// else {
@ -362,103 +373,103 @@ export default {
// type: "warning",
// });
// }
});
})
}
});
})
},
//
//
deleteRow(row) {
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
type: 'warning'
}).then(() => {
deleteVertex(row.pkId).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.getvertexList();
type: 'success'
})
this.getvertexList()
} else {
this.$message({
message: res.msg,
type: "warning",
});
type: 'warning'
})
}
});
});
})
})
},
//
//
update(row) {
console.log(
"%c [ row ]-266",
"font-size:13px; background:#a7ae35; color:#ebf279;",
'%c [ row ]-266',
'font-size:13px; background:#a7ae35; color:#ebf279;',
row
);
this.updateTitle = '修改';
this.updateShow = true;
this.addOrEdit = false;
)
this.updateTitle = '修改'
this.updateShow = true
this.addOrEdit = false
getOnevertexList({ pkId: row.pkId }).then((res) => {
this.formd = res.data;
});
this.formd = res.data
})
},
//
//
adddate() {
this.updateShow = true;
this.updateTitle = '添加';
this.addOrEdit = true;
this.updateShow = true
this.updateTitle = '添加'
this.addOrEdit = true
this.formd = {
vertexName: "", //
vertexName: '', //
// memberCode: "", //
memberCode: "", //
pkParent: "",
};
memberCode: '', //
pkParent: ''
}
},
//
//
getvertexList() {
this.loading = true;
this.loading = true
if (this.cjsj) {
this.queryParams.createStartDate = this.cjsj[0];
this.queryParams.createEndDate = this.cjsj[1];
this.queryParams.createStartDate = this.cjsj[0]
this.queryParams.createEndDate = this.cjsj[1]
}
getvertexList(this.queryParams).then((res) => {
this.tableData = res.rows;
this.total = res.total;
this.loading = false;
});
this.tableData = res.rows
this.total = res.total
this.loading = false
})
},
//
//
reChongzhi() {
this.cjsj = "";
this.cjsj = ''
this.queryParams = {
pageNum: 1,
pageSize: 50,
vertexName: "", //
memberCode: "", //
createStartDate: "", //
createEndDate: "", //
};
this.getvertexList();
vertexName: '', //
memberCode: '', //
createStartDate: '', //
createEndDate: '' //
}
this.getvertexList()
},
handleClose() {
this.updateShow = false;
this.$refs["form"].clearValidate();
this.$refs["form"].resetFields();
this.updateShow = false
this.$refs['form'].clearValidate()
this.$refs['form'].resetFields()
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
return 'warning-row'
} else if (rowIndex % 2 == 0) {
return "success-row";
return 'success-row'
}
return "";
},
},
};
return ''
}
}
}
</script>
<style lang="scss" scoped>

View File

@ -0,0 +1,10 @@
export const topList = [
{
name: '体系配置',
path: 'txpz'
},
{
name: '区域体系分组',
path: 'groupConfiguration'
}
]

View File

@ -44,7 +44,7 @@ module.exports = {
},
proxy: {
'/prod-api': {
target: 'http://localhost:8080',
target: 'http://192.168.0.104:8080',
changeOrigin: true,
pathRewrite: { '^/prod-api': '' }
}