Commit 06c5fb01 by Jianli Ou

完善业务审核分页功能

parent bb0fbfdf
...@@ -23,7 +23,10 @@ ...@@ -23,7 +23,10 @@
</el-table> </el-table>
<div v-if='page' <div v-if='page'
class='gs-table-page'> class='gs-table-page'>
<pages /> <pages :total="page.total"
:pageSize="page.pageSize"
:currPage="page.currPage"
@getLimit="handleCurrentChange"/>
</div> </div>
</div> </div>
</template> </template>
...@@ -82,6 +85,7 @@ export default { ...@@ -82,6 +85,7 @@ export default {
* @return {*} * @return {*}
*/ */
handleSizeChange(size) { handleSizeChange(size) {
console.log('分页大小变化', size)
this.size = size; this.size = size;
this.page.size = size; this.page.size = size;
this.current = 1; this.current = 1;
...@@ -96,6 +100,7 @@ export default { ...@@ -96,6 +100,7 @@ export default {
*/ */
handleCurrentChange(current) { handleCurrentChange(current) {
this.current = current; this.current = current;
console.log('分页页码变化', current)
this.$emit('page-change', current); this.$emit('page-change', current);
}, },
}, },
......
...@@ -72,6 +72,7 @@ export default { ...@@ -72,6 +72,7 @@ export default {
{ {
key: '4', key: '4',
label: '申请总数', label: '申请总数',
value: '3',
amount: '0', amount: '0',
color: '#F26335' color: '#F26335'
} }
...@@ -101,6 +102,7 @@ export default { ...@@ -101,6 +102,7 @@ export default {
{ {
key: '4', key: '4',
label: '申请总数', label: '申请总数',
value: '3',
amount: '0', amount: '0',
color: '#F26335' color: '#F26335'
} }
......
...@@ -8,15 +8,10 @@ ...@@ -8,15 +8,10 @@
<div class="gs-ac-search"> <div class="gs-ac-search">
<el-form :inline="true" :model="search"> <el-form :inline="true" :model="search">
<div class="search row" style="margin: 15px 0;"> <div class="search row" style="margin: 15px 0;">
<div class="col-lg-4"> <div v-if="!isAdminBranch" class="col-lg-4">
<el-form-item label="分中心名称:" label-width="90px"> <el-form-item label="分中心名称:" label-width="90px">
<el-select size="small" style="width: 145px" v-model="search.branchCode"> <el-select size="small" style="width: 145px" v-model="search.branchCode" clearable>
<el-option <el-option v-for="item in branchList" :label="item.label" :value="item.value" :key="item.value"></el-option>
v-for="item in subCenterList"
:key="item.value"
:label="item.value"
:value="item.value">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
...@@ -53,6 +48,7 @@ ...@@ -53,6 +48,7 @@
height="66vh" height="66vh"
:cell-style="{fontSize:'13px',color: '#414345'}" :cell-style="{fontSize:'13px',color: '#414345'}"
header-cell-class-name="gs-ac-st-table-header" header-cell-class-name="gs-ac-st-table-header"
@page-change="pageChangeEvent"
style="width: 100%"> style="width: 100%">
</gs-table> </gs-table>
</div> </div>
...@@ -74,8 +70,9 @@ export default { ...@@ -74,8 +70,9 @@ export default {
components: {CertificationDetail}, components: {CertificationDetail},
props: {query: Object}, props: {query: Object},
created() { created() {
// this.setData() this.isAdminBranch = JSON.parse(localStorage.getItem('gs-user')).type === 'adminBranch'
this.search.logout_flag = this.query.status if (this.isAdminBranch) this.search.branchCode = String(JSON.parse(localStorage.getItem('loginInfo')).levels)
this.search.logout_flag = this.query.status === '3' ? '' : this.query.status
if (this.query.type === 'new') { if (this.query.type === 'new') {
// TODO 查询新增 // TODO 查询新增
this.getAuditList() this.getAuditList()
...@@ -86,8 +83,10 @@ export default { ...@@ -86,8 +83,10 @@ export default {
}, },
data() { data() {
return { return {
isAdminBranch: false,
loading: false, loading: false,
page: {}, page: {},
branchList: window.CodeTable.ANCCBranches,
search: { search: {
logout_flag: '', logout_flag: '',
firmName: '', firmName: '',
...@@ -201,13 +200,6 @@ export default { ...@@ -201,13 +200,6 @@ export default {
}, },
getIcon(status) { getIcon(status) {
status = status.logoutFlag status = status.logoutFlag
// if (status === 'checked') {
// return checked
// } else if (status === 'unchecked') {
// return unchecked
// } else if (status === 'refuse') {
// return refuse
// }
if (status === 1) { if (status === 1) {
return checked return checked
} else if (status === 0) { } else if (status === 0) {
...@@ -218,6 +210,10 @@ export default { ...@@ -218,6 +210,10 @@ export default {
return refuse return refuse
} }
}, },
pageChangeEvent(currPage) {
this.search.page = currPage
this.getAuditList()
},
async getAuditList() { async getAuditList() {
this.loading = true this.loading = true
let result = null let result = null
...@@ -229,8 +225,9 @@ export default { ...@@ -229,8 +225,9 @@ export default {
result = await this.$api.myManage.tycpdmfirmChangeAuditList(this.search) result = await this.$api.myManage.tycpdmfirmChangeAuditList(this.search)
} }
this.result = result.data.list this.result = result.data.list
this.page = {pageSize: 10, currPage: result.data.currPage, total: result.data.totalCount}
this.loading = false this.loading = false
}, }
}, },
} }
</script> </script>
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
<p class="admin_name">{{ userName }}</p> <p class="admin_name">{{ userName }}</p>
<p>- - - | 中心管理员</p> <p>- - - | 中心管理员</p>
</template> </template>
<template v-else-if="type === ADMINBRANCH">
<p class="admin_name">{{ userName }}</p>
<p>- - - | 分中心管理员</p>
</template>
</div> </div>
</div> </div>
...@@ -18,6 +22,7 @@ ...@@ -18,6 +22,7 @@
const UN_VERIFY = 0; const UN_VERIFY = 0;
const SYSTEM_MEMBER = 1; const SYSTEM_MEMBER = 1;
const ADMIN = 2; const ADMIN = 2;
const ADMINBRANCH = 3;
export default { export default {
props: { props: {
type: Number type: Number
...@@ -27,6 +32,7 @@ export default { ...@@ -27,6 +32,7 @@ export default {
UN_VERIFY, UN_VERIFY,
SYSTEM_MEMBER, SYSTEM_MEMBER,
ADMIN, ADMIN,
ADMINBRANCH,
userName: '用户名', userName: '用户名',
phone: '手机号', phone: '手机号',
cardNo: '条码卡号', cardNo: '条码卡号',
......
...@@ -20,6 +20,7 @@ import {uuid} from "../../utils/utils"; ...@@ -20,6 +20,7 @@ import {uuid} from "../../utils/utils";
const UN_VERIFY = 0; const UN_VERIFY = 0;
const SYSTEM_MEMBER = 1; const SYSTEM_MEMBER = 1;
const ADMIN = 2; const ADMIN = 2;
const ADMINBRANCH = 3;
export default { export default {
components: { components: {
...@@ -97,12 +98,44 @@ export default { ...@@ -97,12 +98,44 @@ export default {
index: 0, index: 0,
link: "/MyManage/admin/check", link: "/MyManage/admin/check",
}, },
// {
// id: uuid("gs_nav"),
// name: "统一产品编码",
// index: 1,
// link: "/MyManage/admin/code",
// },
{ {
id: uuid("gs_nav"), id: uuid("gs_nav"),
name: "统一产品编码", name: "审核状态修改",
index: 1, index: 2,
link: "/MyManage/admin/code", link: "/MyManage/admin/status_change",
},
{
id: uuid("gs_nav"),
name: "企业信息修改",
index: 3,
link: "/MyManage/admin/ent_info",
},
{
id: uuid("gs_nav"),
name: "日志查看",
index: 4,
link: "/MyManage/admin/log",
},
],
adminBranchRouterList: [
{
id: uuid("gs_nav"),
name: "业务审核",
index: 0,
link: "/MyManage/admin/check",
}, },
// {
// id: uuid("gs_nav"),
// name: "统一产品编码",
// index: 1,
// link: "/MyManage/admin/code",
// },
{ {
id: uuid("gs_nav"), id: uuid("gs_nav"),
name: "审核状态修改", name: "审核状态修改",
...@@ -131,8 +164,11 @@ export default { ...@@ -131,8 +164,11 @@ export default {
// 1. 未申请条码 // 1. 未申请条码
// 2.系统成员 // 2.系统成员
// 3.管理员 // 3.管理员
// 4.分中心管理员
if (user.type === 'admin') { if (user.type === 'admin') {
this.userType = ADMIN; this.userType = ADMIN;
} else if (user.type === 'adminBranch') {
this.userType = ADMINBRANCH;
} else if (user.type === 'verify') { } else if (user.type === 'verify') {
this.userType = SYSTEM_MEMBER; this.userType = SYSTEM_MEMBER;
} else { } else {
...@@ -152,6 +188,8 @@ export default { ...@@ -152,6 +188,8 @@ export default {
this.$store.commit("system/SET_SUB_NAV", this.routerList); this.$store.commit("system/SET_SUB_NAV", this.routerList);
} else if (this.userType === ADMIN) { } else if (this.userType === ADMIN) {
this.$store.commit("system/SET_SUB_NAV", this.adminRouterList); this.$store.commit("system/SET_SUB_NAV", this.adminRouterList);
} else if (this.userType === ADMINBRANCH) {
this.$store.commit("system/SET_SUB_NAV", this.adminBranchRouterList);
} }
}, },
methods: {}, methods: {},
......
...@@ -132,6 +132,9 @@ export default { ...@@ -132,6 +132,9 @@ export default {
} else if (res.data.levels === 0) { } else if (res.data.levels === 0) {
localStorage.setItem('gs-user', JSON.stringify({type: 'admin'})) localStorage.setItem('gs-user', JSON.stringify({type: 'admin'}))
this.$router.push({path: '/MyManage/admin/check'}) this.$router.push({path: '/MyManage/admin/check'})
} else if (String(res.data.levels).length === 4) {
localStorage.setItem('gs-user', JSON.stringify({type: 'adminBranch'}))
this.$router.push({path: '/MyManage/admin/check'})
} }
} }
}) })
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
pages: { pages: {
size: 10, size: 10,
}, },
}; };
}, },
mounted(){ mounted(){
...@@ -190,4 +190,4 @@ export default { ...@@ -190,4 +190,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
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