Files
2026-09-08 19:49:21 +08:00

307 lines
13 KiB
HTML

<!--#
layout("/mobile/platform.html"){
#-->
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar
title="我的审核"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
></van-nav-bar>
<div class="search-fixed">
<van-dropdown-menu active-color="RGB(8,23,118)">
<van-dropdown-item v-model="pageForm.year" @change="yearChange"
:options="yearList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange"
:options="auditList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.djlx" @change="yearChange"
:options="djlxList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('wyh02')||@shiro.hasRole('wyh03')}"
:options="mCommon.unionList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
:options="mCommon.unitList"></van-dropdown-item>
</van-dropdown-menu>
</div>
<div style="margin: 70px auto 0">
<van-list
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click="openView(o)">
<van-cell-group inset>
<van-cell title="登记类型" :border="false">
<div style="display: flex;align-items: center">
<span :style="{color:themeColor}" style="font-size: 16px"
class="van-ellipsis">{{o.dj_djlx=='1'?'幼升小':o.dj_djlx=='2'?'小学':'初升高'}}</span>
</div>
</van-cell>
<van-cell :border="false" title="子女姓名">{{o.dj_znname}}</van-cell>
<!-- <van-cell :border="false" title="出生日期" v-if="o.dj_djlx===2">{{o.dj_znzsny}}</van-cell>-->
<van-cell :border="false" title="教职工姓名">{{o.jzgname}}</van-cell>
<van-cell :border="false" title="所属单位">{{o.dj_szdw}}</van-cell>
<van-cell :border="false" title="所属分工会">{{o.jzgfghname}}</van-cell>
<van-cell :border="false" title="手机号码">{{o.dj_iphone}}</van-cell>
<van-cell :border="false" title="审核状态">
<span :style="'color: ' + o.stateColor">{{o.stateName}}</span>
</van-cell>
<div style="text-align: right;margin-bottom: 10px;margin-right: 10px;margin-top: -35px;">
<van-button :color="themeColor" plain round size="small"
type="primary"
@click.stop="openView(o)" style="width: 60px">
{{(o.dj_sqzt===5100||o.dj_sqzt===5200)?'审核':'查看'}}
</van-button>
</div>
</van-cell-group>
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
<div :style="{color:themeColor}"
style="text-align: right;position: fixed;bottom: 20px;right: 20px">
<van-button :color="themeColor" hairline size="mini" type="primary">
总:{{pageForm.totalCount}}人
</van-button>
</div>
<van-popup v-model="popupShow" position="right" :style="{ height: '100%', width: '100%'}">
<van-nav-bar :title="barTitle"
left-arrow
placeholder
fixed
@click-left="onRefresh();popupShow=false"></van-nav-bar>
<rxdj-mobile-info :dj_id="dj_id" :title="barTitle" :handle="handle">
<template #handle>
<div class="handle">
<van-form>
<van-field
readonly
value="${@shiro.getPrincipalProperty('username')}"
name="username"
label="审核人员"
></van-field>
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
<van-field v-model="formData.dj_fghshyj"
required
rows="1"
autosize
label="审核意见"
type="textarea"
placeholder="请输入审核意见"
v-if="pageForm.lx=='1'"
></van-field>
<van-field v-model="formData.dj_xghshyj"
required
rows="1"
autosize
label="审核意见"
type="textarea"
placeholder="请输入审核意见"
v-if="pageForm.lx=='2'"
></van-field>
</van-form>
<div style="display: flex;justify-content: space-around;padding: 5px 0 20px 0;">
<van-button type="danger" plain style="flex: 1;margin: 0 10px 0 10px"
@click="doHandle(pageForm.lx==='1'?5115:5215)">拒绝
</van-button>
<van-button :color="themeColor" plain
style="flex: 1;margin: 0 10px 0 10px"
@click="doHandle(pageForm.lx==='1'?5118:5218)">
退回
</van-button>
<van-button :color="themeColor" style="flex: 1;margin: 0 10px 0 10px"
@click="doHandle(pageForm.lx==='1'?5200:5300)">通过
</van-button>
</div>
</div>
</template>
</rxdj-mobile-info>
</van-popup>
</div>
<script>
let vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
barTitle: false,
handle: true,
dj_id: "",
popupShow: false,
pageForm: {
djlx: null,
lx: GetQueryString('lx'),
year: new Date().getFullYear(),
isAudit: false,
},
unitList: [],
unionList: [],
djlxList: [
{text: '全部登记类型', value: null},
{text: '幼升小', value: 1},
{text: '小学', value: 2},
{text: '初升高', value: 3},
],
yearList: [],
auditList: [
{text: '未审核', value: false},
{text: '已审核', value: true},
],
}
},
components: {
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()),
},
methods: {
yearChange() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.flushUnits()
this.onLoad()
},
async onRefresh() {
this.tableData = []
this.refreshing = true;
this.finished = false;
this.pageForm.pageNumber = 0
this.loading = true;
await this.onLoad();
},
async onLoad() {
this.mLoading = true
$.post('/platform/zgfw/mobile/rxdj/audit/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.pageForm.totalCount = res.data.totalCount
}
this.mLoading = false
})
},
async doHandle(s) {
this.formData.dj_sqzt = s
if (this.formData.dj_fghshyj === "" && this.pageForm.lx === '1') {
vant.Toast('请填写审核意见');
return
}
if (this.formData.dj_xghshyj === "" && this.pageForm.lx === '2') {
vant.Toast('请填写审核意见');
return
}
vant.Dialog.confirm({
title: '提醒',
message: '您确定要提交吗?',
}).then(async () => {
const loading = this.$toast({
duration: 0,
message: '提交中...',
forbidClick: true,
loadingType: 'spinner',
type: 'loading',
overlay: true
});
const shUrl = this.pageForm.lx === '1' ? "/dofghSh" : "/doxghSh"
const res = await $.post('/platform/zgfw/rxdj/sh' + shUrl, this.formData)
if (res.code === 0) {
setTimeout(() => {
loading.type = 'success'
loading.message = '提交成功'
this.onRefresh()
loading.close()
this.popupShow = false
}, 500)
}
}).catch(() => {
});
},
async openView(o) {
this.formData = {
dj_id: o.dj_id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
dj_fghshyj: '',
dj_xghshyj: '',
}
const {data} = await $.get("/platform/zgfw/mobile/rxdj/audit/GetRxdjDjSqzt", {dj_id: o.dj_id})
if (this.pageForm.lx === '1') {
if (data !== 5100) {
this.barTitle = "登记详情"
}
this.handle = data === 5100
} else {
if (data !== 5200) {
this.barTitle = "登记详情"
}
this.handle = data === 5200
}
this.dj_id = o.dj_id
this.popupShow = true
},
async flushUnits() {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('wyh03')||@shiro.hasRole('wyh02')||@shiro.hasRole('H03')}" === 'true') {
await mCommon.getUnitList(this.pageForm.unionId)
} else {
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
}, async init() {
let nowYear = new Date().getFullYear()
for (let i = nowYear; i >= nowYear - 9; i--) {
this.yearList.push({text: i, value: i})
}
await mCommon.getUnionList()
if (mCommon.unionList && mCommon.unionList.length > 0) {
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
}
if (mCommon.unitList && mCommon.unitList.length > 0) {
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
}
}
},
async created() {
this.flushUnits()
this.init()
this.barTitle = this.pageForm.lx === "1" ? "分工会审核" : "校工会审核"
}
})
</script>
<!--#
}
#-->