Commit e428d0a4 authored by xhx's avatar xhx

客户表

parent f7bea40f
...@@ -21,19 +21,19 @@ ...@@ -21,19 +21,19 @@
{{ record.status | filterStatus }} {{ record.status | filterStatus }}
</span> </span>
<!-- 二级分行管理员 --> <!-- 二级分行管理员 -->
<span slot="secondaryManager" slot-scope="text,record"> <a @click="getSecondaryManageList(record.level)">查看</a> </span> <span slot="secondaryManager" slot-scope="text,record"> <a @click="getSecondaryManageList(record.level, 1)">查看</a> </span>
<!-- 一级支行管理员 --> <!-- 一级支行管理员 -->
<span slot="firstSubManager" slot-scope="text,record"> <a @click="getfirstSubManageList(record.level)">查看</a> </span> <span slot="firstSubManager" slot-scope="text,record"> <a @click="getfirstSubManageList(record.level, 1)">查看</a> </span>
<!-- 一级支行客户经理 --> <!-- 一级支行客户经理(无) -->
<span slot="firstSubClientManager" slot-scope="text,record"> <a @click="getFirstSubClientManagerList(record.level)">查看</a> </span> <span slot="firstSubClientManager" slot-scope="text,record"> <a @click="getFirstSubClientManagerList(record.level)">查看</a> </span>
<!-- 一级支行客户 --> <!-- 一级支行客户 -->
<span slot="firstSubClient" slot-scope="text,record"> <a @click="getFirstSubClientList(record.level)">查看</a> </span> <span slot="firstSubClient" slot-scope="text,record"> <a @click="getFirstSubClientList(record.uuid)">查看</a> </span>
<!-- 二级支行管理员 --> <!-- 二级支行管理员 -->
<span slot="secondarySubManager" slot-scope="text,record"> <a @click="getSecondarySubManagerList(record.level)">查看</a> </span> <span slot="secondarySubManager" slot-scope="text,record"> <a @click="getSecondarySubManagerList(record.level, 1)">查看</a> </span>
<!-- 二级支行客户经理 --> <!-- 二级支行客户经理 -->
<span slot="secondarySubClientManager" slot-scope="text,record"> <a @click="getSecondarySubClientManageList(record.level)">查看</a> </span> <span slot="secondarySubClientManager" slot-scope="text,record"> <a @click="getSecondarySubClientManageList(record.level)">查看</a> </span>
<!-- 二级支行客户 --> <!-- 二级支行客户 -->
<span slot="secondarySubClient" slot-scope="text,record"> <a @click="getSecondarySubClientList(record.level)">查看</a> </span> <span slot="secondarySubClient" slot-scope="text,record"> <a @click="getSecondarySubClientList(record.uuid)">查看</a> </span>
<!-- 操作 --> <!-- 操作 -->
<p slot="action" slot-scope="text,record" > <p slot="action" slot-scope="text,record" >
<span v-if="record.state!='已禁用'"> <span v-if="record.state!='已禁用'">
...@@ -147,15 +147,20 @@ export default Vue.extend({ ...@@ -147,15 +147,20 @@ export default Vue.extend({
platformQuery: 'queryUser', platformQuery: 'queryUser',
}), }),
getRouteQuery() { getRouteQuery() {
const keys = JSON.parse(this.$route.query.rankVal as string) if (this.$route.query.rankVal) {
console.log(keys) const keys = JSON.parse(this.$route.query.rankVal as string)
const level = this.$route.query.level const level = this.$route.query.level
this.params = { this.params = {
firstBranch: +keys[0]?.value || undefined, firstBranch: +keys[0]?.value || undefined,
firstSubBranch: +keys[2]?.value || undefined, firstSubBranch: +keys[2]?.value || undefined,
secondBranch: +keys[1]?.value || undefined, secondBranch: +keys[1]?.value || undefined,
secondSubBranch: +keys[3]?.value || undefined, secondSubBranch: +keys[3]?.value || undefined,
level level
}
} else {
this.params = {
location: this.$route.query.address
}
} }
}, },
getLists() { getLists() {
...@@ -238,7 +243,7 @@ export default Vue.extend({ ...@@ -238,7 +243,7 @@ export default Vue.extend({
}) })
this.$router.push({name:'firstSub',query:{level: key, rankVal: this.$route.query.rankVal}}) this.$router.push({name:'firstSub',query:{level: key, rankVal: this.$route.query.rankVal}})
}, },
// 一级支行客户经理 // 一级支行客户经理(无)
getFirstSubClientManagerList(key:string){ getFirstSubClientManagerList(key:string){
this.platformSave({ this.platformSave({
page: 1 page: 1
...@@ -246,11 +251,11 @@ export default Vue.extend({ ...@@ -246,11 +251,11 @@ export default Vue.extend({
this.$router.push({name:'firstSubClientManager',query:{level: key, rankVal: this.$route.query.rankVal}}) this.$router.push({name:'firstSubClientManager',query:{level: key, rankVal: this.$route.query.rankVal}})
}, },
// 一级支行客户 // 一级支行客户
getFirstSubClientList(key:string){ getFirstSubClientList(uuid:string){
this.platformSave({ this.platformSave({
page: 1 page: 1
}) })
this.$router.push({name:'firstSubClient',query:{level: key, rankVal: this.$route.query.rankVal}}) this.$router.push({name:'firstSubClient',query:{uuid}})
}, },
// 二级支行管理员 // 二级支行管理员
getSecondarySubManagerList(key:string){ getSecondarySubManagerList(key:string){
...@@ -267,11 +272,11 @@ export default Vue.extend({ ...@@ -267,11 +272,11 @@ export default Vue.extend({
this.$router.push({name:'secondarySubClientManager',query:{level: key, rankVal: this.$route.query.rankVal}}) this.$router.push({name:'secondarySubClientManager',query:{level: key, rankVal: this.$route.query.rankVal}})
}, },
// 二级支行客户 // 二级支行客户
getSecondarySubClientList(key:string){ getSecondarySubClientList(uuid:string){
this.platformSave({ this.platformSave({
page: 1 page: 1
}) })
this.$router.push({name:'secondarySubClient',query:{level: key, rankVal: this.$route.query.rankVal}}) this.$router.push({name:'secondarySubClient',query:{uuid}})
}, },
}, },
created() { created() {
......
...@@ -148,7 +148,7 @@ export default class StaffService { ...@@ -148,7 +148,7 @@ export default class StaffService {
page_size: number page_size: number
}) { }) {
return baseAxios({ return baseAxios({
url: '/staff/self/user', url: '/staff/self/users',
method: 'get', method: 'get',
params: data params: data
}) })
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<span class=" font-semibold">注册时间:</span> <span class=" font-semibold">注册时间:</span>
<timerange class=" mr-3" <timerange class=" mr-3"
@getNewTime="getNewTime"/> @getNewTime="getNewTime"/>
<a-input placeholder="姓名模糊搜索" v-model="queryParam.queryName" style=" width:150px; margin-right:10px;"/> <a-input placeholder="姓名模糊搜索" v-model="queryParam.user_name" style=" width:150px; margin-right:10px;"/>
<a-input placeholder="手机号模糊搜索" v-model="queryParam.queryTel" style=" width:150px; margin-right:10px;" /> <a-input placeholder="手机号模糊搜索" v-model="queryParam.phone" style=" width:150px; margin-right:10px;" />
<a-button type="primary" style=" margin-right:10px;" @click="query">查询</a-button> <a-button type="primary" style=" margin-right:10px;" @click="query">查询</a-button>
<a-button type="primary" @click="reset">重置</a-button> <a-button type="primary" @click="reset">重置</a-button>
<!-- 查看弹窗 --> <!-- 查看弹窗 -->
...@@ -44,7 +44,13 @@ ...@@ -44,7 +44,13 @@
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 客户信息列表 --> <!-- 客户信息列表 -->
<a-table :columns="columns" :data-source="userList" style=" text-align: center; margin-top:40px;" bordered > <a-table
:columns="columns"
:data-source="userList"
style=" text-align: center; margin-top:40px;"
bordered
:pagination="pagination"
@change="changePage">
<div slot="note" slot-scope="text"> <div slot="note" slot-scope="text">
<a @click="check(text)">查看</a> <a @click="check(text)">查看</a>
</div> </div>
...@@ -61,13 +67,16 @@ import { userList } from '@/mock/index' ...@@ -61,13 +67,16 @@ import { userList } from '@/mock/index'
import { user } from '@/types/user' import { user } from '@/types/user'
import { columns } from '@/const/columns/userColumns' import { columns } from '@/const/columns/userColumns'
import timerange from '@/components/TimePicker/index.vue' import timerange from '@/components/TimePicker/index.vue'
import StaffService from '@/service/StaffService/index'
const staff = new StaffService()
export default Vue.extend({ export default Vue.extend({
components:{ timerange }, components:{ timerange },
computed: { computed: {
userList():Array<user>{ // userList():Array<user>{
return userList // return userList
}, // },
columns(){ columns(){
return columns return columns
} }
...@@ -78,11 +87,12 @@ export default Vue.extend({ ...@@ -78,11 +87,12 @@ export default Vue.extend({
notes:'' notes:''
}, },
queryParam:{ queryParam:{
startTime:undefined as undefined | number, start:undefined as undefined | number,
endTime:undefined as undefined | number, end:undefined as undefined | number,
queryName:'', user_name:'' as undefined | string,
queryTel:'', phone:'' as undefined | string,
}, },
userList: [] as Array<user>,
visible:false, visible:false,
show:false, show:false,
labelCol: { span: 10 }, labelCol: { span: 10 },
...@@ -90,22 +100,62 @@ export default Vue.extend({ ...@@ -90,22 +100,62 @@ export default Vue.extend({
rules:{ rules:{
notes: [{ required: true, message: '请输入备注内容', trigger: 'blur' }], notes: [{ required: true, message: '请输入备注内容', trigger: 'blur' }],
}, },
note:{} note:{},
pagination: {
current: 1,
defaultPageSize: 10,
total: 0
}
} }
}, },
created() {
this.getList()
},
methods:{ methods:{
getList() {
const uuid = this.$route.query.uuid as string
if (uuid) {
staff.getStaffList({
uuid: uuid,
page: this.pagination.current,
page_size: this.pagination.defaultPageSize
}).then(res => {
this.userList = res.data.item
this.pagination.total = res.data.total
})
} else {
staff.getUserList({
page: this.pagination.current,
page_size: this.pagination.defaultPageSize
}).then(res => {
this.userList = res.data.item
this.pagination.total = res.data.total
})
}
},
changePage(v: { current: number }) {
this.pagination.current = v.current
this.getList()
},
getNewTime(startTime:number,endTime:number){ getNewTime(startTime:number,endTime:number){
this.queryParam.startTime = startTime this.queryParam.start = startTime
this.queryParam.endTime = endTime this.queryParam.end = endTime
}, },
query(){ query(){
console.log(this.queryParam) console.log(this.queryParam)
staff.queryStaff({
...this.queryParam
}).then(res => {
console.log(res)
this.userList = res.data.item
this.pagination.total = res.data.total
})
}, },
reset(){ reset(){
this.queryParam.startTime = undefined this.queryParam.start = undefined
this.queryParam.endTime = undefined this.queryParam.end = undefined
this.queryParam.queryName = '' this.queryParam.user_name = ''
this.queryParam.queryTel = '' this.queryParam.phone = ''
}, },
check(text:user){ check(text:user){
this.visible = true this.visible = true
...@@ -118,6 +168,7 @@ export default Vue.extend({ ...@@ -118,6 +168,7 @@ export default Vue.extend({
onSubmit(){ onSubmit(){
(this.$refs.ruleForm as FormModel).validate(valid => { (this.$refs.ruleForm as FormModel).validate(valid => {
if (valid) { if (valid) {
// staff.
this.show = false this.show = false
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
......
...@@ -46,6 +46,7 @@ import { eLevel } from '@/types/level'; ...@@ -46,6 +46,7 @@ import { eLevel } from '@/types/level';
import { fooList } from "@/views/Root/OutletManagement/components/HeaderSelect/const"; import { fooList } from "@/views/Root/OutletManagement/components/HeaderSelect/const";
import { PAGE_SIZE } from "@/const/config/page" import { PAGE_SIZE } from "@/const/config/page"
import HeaderSelect from "@/views/Root/OutletManagement/components/HeaderSelect/index.vue"; import HeaderSelect from "@/views/Root/OutletManagement/components/HeaderSelect/index.vue";
import { mapActions, mapMutations, mapState } from 'vuex'
Vue.use(Cascader) Vue.use(Cascader)
Vue.prototype.$message = message Vue.prototype.$message = message
...@@ -72,10 +73,22 @@ export default Vue.extend({ ...@@ -72,10 +73,22 @@ export default Vue.extend({
} }
}, },
mounted(){ mounted(){
this.clearPostion()
this.getBranchList() this.getBranchList()
}, },
methods:{ methods:{
...mapMutations('platformUserManagement', {
platformSave: 'save',
}),
clearPostion() {
this.platformSave({
location: '',
firstBranch: undefined,
firstSubBranch: undefined,
secondBranch: undefined,
secondSubBranch: undefined,
})
},
setFooList(v: any[]) { setFooList(v: any[]) {
this.fooList = [...v]; this.fooList = [...v];
}, },
...@@ -119,7 +132,7 @@ export default Vue.extend({ ...@@ -119,7 +132,7 @@ export default Vue.extend({
}, },
selectTables(arr: Array<{value: number, name: string}>|string) { selectTables(arr: Array<{value: number, name: string}>|string) {
if (typeof arr === 'string') { if (typeof arr === 'string') {
this.$router.push({path: '/backend/user/secondarySub', query: { rankVal: arr }}) this.$router.push({path: '/backend/user/secondarySub', query: { address: arr }})
} else { } else {
const count = arr.length const count = arr.length
switch (count) { switch (count) {
......
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