Commit e428d0a4 authored by xhx's avatar xhx

客户表

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