first commit
This commit is contained in:
@@ -0,0 +1,231 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.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: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的入会申请" left-text="返回" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu v-if="$auth.hasRoleOr('sysadmin, SchoolUnionMemberAdmin, BranchUnionMemberAdmin')" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="unionList" @change="doSearch();flushUnits(pageForm.unionId)" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{item.username + '(' + item.loginname + ')'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">工作单位:</span>{{item.unitName}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">所属工会:</span><span>{{item.unionName}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">在职状态:</span>{{item.userState}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">人员类型:</span><span>{{item.personType}}</span></van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<span style="color: grey">当前状态:</span>
|
||||
<span>{{item.stateName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button size="small" @click="openView(item)"
|
||||
type="info" style="margin-right: 4px">查看
|
||||
</van-button>
|
||||
<van-button size="small" @click="pjaxReplace('/platform/member/apply/submit/h5?id=' + item.id)"
|
||||
v-if="[10,30,60].includes(item.applyStateId) && item.userId == user.id"
|
||||
type="info" style="margin-right: 4px">编辑</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow
|
||||
title="申请详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<member-apply-audit-info ref="memberApplyAuditInfoRef"></member-apply-audit-info>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/memberApplyAuditInfo.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
user: {},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
isAudit: false
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
infoShow: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-apply-audit-info': MEMBER_APPLY_AUDIT_INFO
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/member/apply/mine/pageData', this.pageForm)
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
} else {
|
||||
this.$toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async initUnion(unionId) {
|
||||
this.unionList = await getUnionList(unionId)
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
this.user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||
if (this.$auth.hasRoleOr("sysadmin, SchoolUnionMemberAdmin")) {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.initUnion(this.user.union.id)
|
||||
await this.flushUnits(this.user.union.id)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user