Files
zhgh_hrbnu/src/main/resources/views/mobile/difficulty/mine/index.html
T
2025-02-10 08:58:39 +08:00

294 lines
9.8 KiB
HTML

<!--#
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;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-dropdown-menu__item {
flex: auto;
}
p {
margin: 0 !important;
}
.van-cell__title {
width: 30%;
}
.van-cell__right-icon {
margin-left: 0;
}
.van-sidebar-item {
padding: 8px 12px;
}
.footer {
background-color: white;
width: 100%;
height: 60px;
display: flex;
justify-content: space-evenly;
align-items: center;
left: 0;
}
.footer .van-button {
height: 34px;
border-radius: 6px;
width: 90% !important;
}
.join {
background-color: #0e78c5;
color: white;
}
.info_tab .van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.process-title {
font-size: 15px;
color: #1867b0;
font-weight: 600;
margin: 10px 0 10px 0!important;
padding:10px;
position: relative;
line-height: 1.1;
font-family: inherit;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="困难帮扶申请记录" left-arrow placeholder fixed
@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 :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
<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">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</span><span>{{item.sex}}</span></van-col>
<van-col span="24"><span style="color: grey">联系方式:</span>{{item.mobile}}</van-col>
</van-row>
<van-row>
<van-col span="24"><span style="color: grey">所属工会:</span>{{item.unionName}}</van-col>
<van-col span="24"><span style="color: grey">工作单位:</span><span>{{item.unitName}}</span></van-col>
</van-row>
<van-row>
<van-col span="24"><span style="color: grey">款&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;项:</span>{{item.subsidyStandards}}</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.state_name}}</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/difficulty/apply/h5?id=' + item.id)"
v-if="[3000,3020,3050,3080].includes(item.stateId)"
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: '100vh', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow
title="困难帮扶申请记录详情"></van-nav-bar>
</van-sticky>
<div style="height: calc(100% - 44px);overflow-y: auto">
<info ref="infoRef"></info>
</div>
</van-popup>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
isAudit: false
},
unionList: [],
unitList: [],
yearList: [],
tableLoading: false,
tableFinished: false,
infoShow: false,
}
},
components: {
'info': info
},
methods: {
openView(item) {
this.infoShow = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen(item.id)
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
$.post('/platform/difficulty/applylist/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 getUnions(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() {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
await this.initUnion()
await this.flushUnits()
} else {
await this.initUnion("${@shiro.getPrincipalProperty('unit').getUnionid()}")
await this.flushUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
this.$set(this.pageForm, "year", this.yearList[0].value)
this.doSearch()
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->