first commit

This commit is contained in:
2026-09-23 09:38:39 +08:00
commit 98a8b8cace
6257 changed files with 1266718 additions and 0 deletions
@@ -0,0 +1,406 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 13px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0px;
border-color: lightgray;
}
.van-doc-card .van-button--small {
border-top-right-radius: 16px;
border-bottom-left-radius: 16px;
height: 26px;
}
.van-button--small {
border-radius: revert;
width: 40%;
height: 30px;
}
.van-col {
line-height: 24px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 13px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-dropdown-menu__item {
flex: auto;
}
.userPopup {
height: 90%;
background-color: #f6f7f9;
font-size: 14px;
}
.audit_icon {
font-size: 24px;
position: absolute;
font-weight: bolder;
right: 0;
top: 60px;
}
.userPopup .van-cell {
padding: 10px 0px;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<!--top栏-->
<van-nav-bar
title="协会审核"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
safe-area-inset-top
></van-nav-bar>
<!--筛选框-->
<div class="search-fixed">
<van-search
v-model="pageForm.searchKeyword"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入协会名称进行查询"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</div>
<!--列表-->
<div style="margin-top: 116px">
<van-list
v-model="loading"
:finished="finished" :immediate-check="false" @load="onLoad"
:finished-text="tableData.length>0?'没有更多了':''"
>
<div class="van-doc-card" v-for="o in tableData">
<div @click="openView(o.id)">
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{o.name}}</span>
</div>
<div style="color: grey">{{o.location}}</div>
</div>
<!--<div style="color: #1867b0; white-space: nowrap;">
<span v-if="o.status==1">待协会审核</span>
<span v-if="o.status==2" style="color: red">协会拒绝</span>
<span v-if="o.status==3">待校工会审核</span>
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
<span v-if="o.status==5" style="color: green">审核通过</span>
</div>-->
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="12"><span style="color: grey">联&ensp;系&ensp;人:</span>{{o.fzrname}}</van-col>
<van-col span="12"><span style="color: grey">电&emsp;&emsp;话:</span>{{o.fzr_mobile}}
</van-col>
</van-row>
<van-row>
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
<van-col span="12"><span style="color: grey">当前人数:</span>{{o.people_num}}</van-col>
</van-row>
<van-row>
<van-col span="24" class="cus_overflow">
<span style="color: grey">介绍链接:</span>
<span style="color: #236eb4"
@click.stop="window.open(o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href)">{{o.introduce_href}}</span>
</van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: flex-end">
<div>
<van-button @click.stop="getAuditList(o)" class="cus_button"
type="primary" size="small" color="#1867b0"
style="margin-right: 8px; width: auto;">已审{{o.has_audit}}
</van-button>
<van-button @click.stop="openView(o)" class="cus_button"
type="primary" size="small" color="#1867b0"
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
<!--审核人员-->
<van-action-sheet v-model:show="userShow" title="申请人员列表" class="userPopup" @close="popClose">
<div class="content">
<div class="van-doc-card">
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
<div v-if="queryType === 'notAudit'">
<van-tag @click="checkAll()" plain type="primary" size="large">全选</van-tag>
<van-tag @click="toggleAll()" plain size="large" style="margin-left: 6px" type="primary">反选
</van-tag>
</div>
</div>
<van-checkbox-group v-model="result" ref="checkboxGroup" v-if="userList !== null">
<van-cell-group>
<van-cell
v-for="(obj, index) in userList"
clickable class="cus_cell"
:key="obj.id"
@click="toggle(index)">
<div>
<span style="color: grey">姓&emsp;&emsp;名:</span>
{{obj.username}}
</div>
<div>
<span style="color: grey">工&emsp;&emsp;号:</span>
{{obj.loginname}}
</div>
<div>
<span style="color: grey">单&emsp;&emsp;位:</span>
{{obj.unitname}}
</div>
<div>
<span style="color: grey">性&emsp;&emsp;别:</span>
{{obj.sex}}
</div>
<div>
<span style="color: grey">联系方式:</span>
{{obj.mobile}}
</div>
<div>
<span style="color: grey">审核状态:</span>
<span v-if="obj.status==1">待协会审核</span>
<span v-if="obj.status==2">协会拒绝</span>
<span v-if="obj.status==3">待校工会审核</span>
<span v-if="obj.status==4">校工会拒绝</span>
<span v-if="obj.status==5">审核通过</span>
</div>
<!--<span style="display: inline-block; width: 86px">{{obj.username}}</span>
<span class="unit">{{obj.unitname}}</span>
<br/>
<span style="display: inline-block; width: 85px">{{obj.sex}}</span>
<span style="display: inline-block; width: 106px">13296575967</span>
<span style="display: inline-block;">{{obj.loginname}}</span>-->
<van-icon class="audit_icon" color="green"
name="passed"
v-if="queryType === 'hasAudit' && obj.auditstate == true"></van-icon>
<van-icon class="audit_icon" color="grey"
name="close"
v-if="queryType === 'hasAudit' && obj.auditstate == false"></van-icon>
<template #right-icon v-if="queryType === 'notAudit'">
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
<div style="margin-top: 4px; text-align: center" v-else>暂无申请人员</div>
</div>
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%"
v-if="queryType === 'notAudit'">
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回
</van-button>
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过
</van-button>
</div>
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%"
v-if="queryType === 'notAudit'">
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回
</van-button>
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过
</van-button>
</div>
</div>
</van-action-sheet>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
queryType: '',
result: [],
userList: [],
userShow: false,
clickRow: {},
typeOptions: [],
}
},
methods: {
async audit(type, auditType) {
if (type === 'many' && this.result.length === 0) {
vant.Toast('请先选择人员')
return
}
const str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择!' : '您确定要一键全部审核吗?'
vant.Dialog.confirm({title: '提示', message: str,}).then(async () => {
let idList = this.result
if (type === 'all') {
idList = this.userList.map(o => o.id)
}
const resp = await $.post('/platform/sys/club/sh/check', {
ids: JSON.stringify(idList),
flag: auditType === 'pass',
type: 1,
})
if (resp.code === 0) {
this.doSearch()
}
vant.Toast(resp.msg)
this.userShow = false
}).catch(() => {
});
},
checkAll() {
this.$refs.checkboxGroup.children.forEach(item => item.toggle(true))
},
toggleAll() {
this.$refs.checkboxGroup.children.forEach(item => item.toggle())
},
toggle(index) {
this.$refs.checkboxes[index].toggle();
},
popClose() {
this.$nextTick(function () {
if (this.$refs.checkboxes !== undefined) {
this.$refs.checkboxes.forEach(item => item.toggle(false));
}
})
},
async getAuditList(o) {
this.queryType = 'hasAudit'
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
id: o.id,
auditType: 'hasAudit',
type: 1,
})
if (resp.code === 0) {
this.userList = resp.data
this.userList.sort((a, b) => {
return b.auditstate - a.auditstate
})
this.userShow = true
}
},
async openView(o) {
this.queryType = 'notAudit'
this.userList = []
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
id: o.id,
auditType: 'notAudit',
type: 1,
})
if (resp.code === 0) {
this.userList = resp.data
this.userClickList = []
if (this.userList.length === 0) {
vant.Toast('暂无申请人员')
} else {
this.userShow = true
}
return
}
vant.Toast('系统错误,请联系管理员')
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.loading = true
this.pageForm.type = 1
$.post('/platform/sys/club/sh/getMyClub', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.loading = false
})
},
},
async created() {
const data = await getClubType()
data.forEach(item => {
this.typeOptions.push({text: item.name, value: item.code})
})
this.typeOptions.unshift({text: '全部类型'})
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
this.onLoad()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,269 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 13px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0px;
border-color: lightgray;
}
.van-button--small {
border-top-right-radius: 16px;
border-bottom-left-radius: 16px;
height: 26px;
}
.van-col {
line-height: 24px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 13px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-dropdown-menu__item {
flex: auto;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<!--top栏-->
<van-nav-bar
title="加入协会"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
safe-area-inset-top
></van-nav-bar>
<!--筛选框-->
<div class="search-fixed">
<van-search
v-model="pageForm.searchKeyword"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入协会名称进行查询"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.isjr" :options="clubType"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</div>
<!--列表-->
<div style="margin-top: 116px">
<van-list
v-model="loading"
:finished="finished" :immediate-check="false" @load="onLoad"
:finished-text="tableData.length>0?'没有更多了':''"
>
<div class="van-doc-card" v-for="o in tableData">
<div @click="openView(o.id)">
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{o.name}}</span>
</div>
<div style="color: grey">{{o.location}}</div>
</div>
<div style="color: #1867b0; white-space: nowrap;">
<span v-if="o.status==1">待协会审核</span>
<span v-if="o.status==2" style="color: red">协会拒绝</span>
<span v-if="o.status==3">待校工会审核</span>
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
<span v-if="o.status==5" style="color: green">审核通过</span>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="12"><span style="color: grey">联&ensp;系&ensp;人:</span>{{o.fzrname}}</van-col>
<van-col span="12"><span style="color: grey">电&emsp;&emsp;话:</span>{{o.fzr_mobile}}
</van-col>
</van-row>
<van-row>
<van-col span="12"><span style="color: grey">会费标准:</span>{{o.dues_standard}}</van-col>
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
</van-row>
<van-row>
<van-col span="24" class="cus_overflow">
<span style="color: grey">介绍链接:</span>
<span style="color: #236eb4"
@click="window.open(o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href)">{{o.introduce_href}}</span>
</van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: flex-end">
<div>
<van-button @click="rollback(o)" color="#1867b0"
size="small" style="margin-right: 8px" type="primary"
v-if="pageForm.isjr === true && (o.status==1 || o.status==3)">撤销申请
</van-button>
<van-button @click="needJoin(o)"
color="#1867b0"
size="small" style="margin-right: 8px" type="primary"
v-if="(o.cynum + o.approvalnum) < o.number && pageForm.isjr === false">我要加入
</van-button>
<van-button @click="needJoin(o)"
color="#1867b0"
:disabled="(o.cynum + o.approvalnum) >= o.number"
size="small" style="margin-right: 8px" type="primary"
v-if="(o.cynum + o.approvalnum) >= o.number && pageForm.isjr === false">人数已满
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
clickRow: {},
typeOptions: [],
clubType: [{text: '未加入', value: false}, {text: '已加入', value: true}],
}
},
methods: {
openView(id) {
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.loading = true
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.loading = false
})
},
async needJoin(o) {
this.clickRow = o
const {code, data} = await $.post('/platform/sys/club/sq/getInClubByCurUser')
let str = '您还没有参加协会'
if (data && data.length > 0) {
str = '您已经加入了'
data.forEach((item) => {
str += '【' + item.name + '】'
})
}
str += ',请确认是否申请加入【' + o.name + '】?'
vant.Dialog.confirm({title: '提示', message: str,}).then(() => {
const id = o.id
$.post("/platform/sys/club/sq/submit", {id}, (data) => {
if (data.code === 0) {
vant.Toast('提交申请成功');
this.doSearch();
} else {
vant.Toast(data.msg);
}
}, "json");
}).catch(() => {
});
},
rollback(o) {
vant.Dialog.confirm({title: '提示', message: '请确定是否撤销申请?',}).then(() => {
const id = o.id
$.post("/platform/sys/club/sq/revocation", {id}, (data) => {
if (data.code === 0) {
vant.Toast('撤销申请成功');
this.doSearch();
} else {
vant.Toast(data.msg);
}
}, "json");
}).catch(() => {
});
}
},
async created() {
const data = await getClubType()
data.forEach(item => {
this.typeOptions.push({text: item.name, value: item.code})
})
this.typeOptions.unshift({text: '全部类型'})
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
this.$set(this.pageForm, "isjr", this.clubType[0].value)
this.pageForm.searchName = 'club.name'
this.onLoad()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,382 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 13px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0px;
border-color: lightgray;
}
.van-doc-card .van-button--small {
border-top-right-radius: 16px;
border-bottom-left-radius: 16px;
height: 26px;
}
.van-button--small {
border-radius: revert;
width: 40%;
height: 30px;
}
.van-col {
line-height: 24px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 13px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-dropdown-menu__item {
flex: auto;
}
.userPopup {
height: 90%;
background-color: #f6f7f9;
font-size: 14px;
}
.audit_icon {
font-size: 24px;
position: absolute;
font-weight: bolder;
right: 0;
}
.userPopup .van-cell {
padding: 10px 0px;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<!--top栏-->
<van-nav-bar
@click-left="history.go(-1)"
fixed
left-arrow
placeholder
safe-area-inset-top
title="校工会审核"
></van-nav-bar>
<!--筛选框-->
<div class="search-fixed">
<van-search
@search="doSearch"
maxlength="10"
placeholder="请输入协会名称进行查询"
shape="round"
v-model="pageForm.searchKeyword"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item :options="typeOptions" @change="doSearch"
v-model="pageForm.clubType"></van-dropdown-item>
</van-dropdown-menu>
</div>
<!--列表-->
<div style="margin-top: 116px">
<van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false" @load="onLoad"
v-model="loading"
>
<div class="van-doc-card" v-for="o in tableData">
<div @click="openView(o.id)">
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{o.name}}</span>
</div>
<div style="color: grey">{{o.location}}</div>
</div>
<!--<div style="color: #1867b0; white-space: nowrap;">
<span v-if="o.status==1">待协会审核</span>
<span v-if="o.status==2" style="color: red">协会拒绝</span>
<span v-if="o.status==3">待校工会审核</span>
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
<span v-if="o.status==5" style="color: green">审核通过</span>
</div>-->
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="12"><span style="color: grey">联&ensp;系&ensp;人:</span>{{o.fzrname}}</van-col>
<van-col span="12"><span style="color: grey">电&emsp;&emsp;话:</span>{{o.fzr_mobile}}
</van-col>
</van-row>
<van-row>
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
<van-col span="12"><span style="color: grey">当前人数:</span>{{o.people_num}}</van-col>
</van-row>
<van-row>
<van-col class="cus_overflow" span="24">
<span style="color: grey">介绍链接:</span>
<span @click.stop="window.open(o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href)"
style="color: #236eb4">{{o.introduce_href}}</span>
</van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: flex-end">
<div>
<van-button @click.stop="getAuditList(o)" class="cus_button"
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
type="primary">已审{{o.has_audit}}
</van-button>
<van-button @click.stop="openView(o)" class="cus_button"
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
type="primary">未审{{o.no_audit}}
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty
class="custom-image"
description="暂无数据"
image="/none.svg"
v-if="mLoading==false&&tableData.length==0"
></van-empty>
</div>
<!--审核人员-->
<van-action-sheet @close="popClose" class="userPopup" title="申请人员列表" v-model:show="userShow">
<div class="content">
<div class="van-doc-card">
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
<div v-if="queryType === 'notAudit'">
<van-tag @click="checkAll()" plain size="large" type="primary">全选</van-tag>
<van-tag @click="toggleAll()" plain size="large" style="margin-left: 6px" type="primary">反选
</van-tag>
</div>
</div>
<van-checkbox-group ref="checkboxGroup" v-if="userList !== null" v-model="result">
<van-cell-group>
<van-cell
:key="obj.id"
@click="toggle(index)" class="cus_cell"
clickable
v-for="(obj, index) in userList">
<div><span style="color: grey">姓&emsp;&emsp;名:</span>{{obj.username}}</div>
<div><span style="color: grey">工&emsp;&emsp;号:</span>{{obj.loginname}}</div>
<div><span style="color: grey">单&emsp;&emsp;位:</span>{{obj.unitname}}</div>
<div><span style="color: grey">性&emsp;&emsp;别:</span>{{obj.sex}}</div>
<div><span style="color: grey">联系方式:</span>{{obj.mobile}}</div>
<!--<span style="display: inline-block; width: 86px">{{obj.username}}</span>
<span class="unit">{{obj.unitname}}</span>
<br/>
<span style="display: inline-block; width: 85px">{{obj.sex}}</span>
<span style="display: inline-block; width: 106px">13296575967</span>
<span style="display: inline-block;">{{obj.loginname}}</span>-->
<van-icon class="audit_icon" color="green"
name="passed"
v-if="queryType === 'hasAudit' && obj.auditstate === true"></van-icon>
<van-icon class="audit_icon" color="grey"
name="close"
v-if="queryType === 'hasAudit' && obj.auditstate === false"></van-icon>
<template #right-icon v-if="queryType === 'notAudit'">
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
<div style="margin-top: 4px; text-align: center" v-else>暂无申请人员</div>
</div>
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%"
v-if="queryType === 'notAudit'">
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回
</van-button>
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过
</van-button>
</div>
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%"
v-if="queryType === 'notAudit'">
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回
</van-button>
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过
</van-button>
</div>
</div>
</van-action-sheet>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
queryType: '',
result: [],
userList: [],
userShow: false,
clickRow: {},
typeOptions: [],
}
},
methods: {
async audit(type, auditType) {
if (type === 'many' && this.result.length === 0) {
vant.Toast('请先选择人员')
return
}
const str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择!' : '您确定要一键全部审核吗?'
vant.Dialog.confirm({title: '提示', message: str,}).then(async () => {
let idList = this.result
if (type === 'all') {
idList = this.userList.map(o => o.id)
}
const resp = await $.post('/platform/sys/club/sh/check', {
ids: JSON.stringify(idList),
flag: auditType === 'pass',
type: 2,
})
if (resp.code === 0) {
this.doSearch()
}
vant.Toast(resp.msg)
this.userShow = false
}).catch(() => {
});
},
checkAll() {
this.$refs.checkboxGroup.children.forEach(item => item.toggle(true))
},
toggleAll() {
this.$refs.checkboxGroup.children.forEach(item => item.toggle())
},
toggle(index) {
this.$refs.checkboxes[index].toggle();
},
popClose() {
this.$nextTick(function () {
if (this.$refs.checkboxes !== undefined) {
this.$refs.checkboxes.forEach(item => item.toggle(false));
}
})
},
async getAuditList(o) {
this.queryType = 'hasAudit'
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
id: o.id,
auditType: 'hasAudit',
type: 2,
})
if (resp.code === 0) {
this.userList = resp.data
this.userList.sort((a, b) => {
return b.auditstate - a.auditstate
})
this.userShow = true
}
},
async openView(o) {
this.queryType = 'notAudit'
this.userList = []
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
id: o.id,
auditType: 'notAudit',
type: 2,
})
if (resp.code === 0) {
this.userList = resp.data
this.userClickList = []
if (this.userList.length === 0) {
vant.Toast('暂无申请人员')
} else {
this.userShow = true
}
return
}
vant.Toast('系统错误,请联系管理员')
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.loading = true
this.pageForm.type = 2
$.post('/platform/sys/club/sh/getMyClub', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.loading = false
})
},
},
async created() {
const data = await getClubType()
data.forEach(item => {
this.typeOptions.push({text: item.name, value: item.code})
})
this.typeOptions.unshift({text: '全部类型'})
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
this.onLoad()
}
})
</script>
<!--#
}
#-->