first commit

This commit is contained in:
2026-09-08 19:49:21 +08:00
commit ebffbab428
7320 changed files with 1477614 additions and 0 deletions
@@ -0,0 +1,334 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">姓名工号:</div>
<div class="search-item-option">
<el-input clearable maxlength="20" v-model.trim="pageForm.keyword"></el-input>
</div>
</div>
<div class="search-item"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">是否会员:</div>
<div class="search-item-option">
<el-select clearable filterable style="width: 100%"
v-model="pageForm.isMember">
<el-option label="全部" :value="null"></el-option>
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="0"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="审核列表">
<template #func>
<el-button size="small" type="primary" class="mr5" @click="batchAudit">批量审核</el-button>
<el-button size="small" type="primary" class="mr5" @click="doExport">导出汇总表</el-button>
<el-radio-group @change="doSearch()" size="small" v-model="pageForm.auditState">
<el-radio-button label="0">全部</el-radio-button>
<el-radio-button label="1">已审核</el-radio-button>
<el-radio-button label="-1">未审核</el-radio-button>
</el-radio-group>
<el-radio-group @change="doSearch()" size="small" v-model="pageForm.isAccept" class="ml10">
<el-radio-button label="null">全部</el-radio-button>
<el-radio-button label="1">申请</el-radio-button>
<el-radio-button label="0">放弃</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
row-key="id"
ref="table"
align="center" header-align="center">
<el-table-column type="selection" reserve-selection
:selectable="(row)=>{return row.stateCode===500}"></el-table-column>
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop==='isAccept'">
<span v-if="row.isAccept !== null"
:class="{'text-success': row.isAccept, 'text-danger': !row.isAccept}">
{{ row.isAccept ? '申请' : '放弃' }}
</span>
<span v-else class="text-info"></span>
</template>
<template scope="{row}" v-else-if="column.prop==='stateName'">
<vi-table-state :state="row"></vi-table-state>
</template>
</el-table-column>
<el-table-column label="操作" width="250">
<template scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
<el-button :disabled="row.stateCode!=500" @click="openAudit(row.id)" size="mini" type="primary">
审核
</el-button>
<el-button :disabled="![600,700].includes(row.stateCode)"
@click="doRevoke(row.id,row.stateCode)" size="mini" type="danger">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<sick-help-info ref="sickView"></sick-help-info>
</template>
<template #edit>
<sick-help-info ref="sickAudit">
<template #audit>
<el-tab-pane label="审核" name="999">
<vi-title title="校工会审核"></vi-title>
<el-form :model="formData" :rules="rules" label-width="120px" ref="form">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="1000"
placeholder="请填写您的意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="校工会签字" prop="auditSign">
<sign :qz.sync="formData.auditSign"></sign>
</el-form-item>
</el-form>
<el-row justify="end" type="flex">
<!-- <el-button @click="doAudit(false)" type="danger">拒绝</el-button>-->
<el-button @click="doAudit(true)" type="primary">通过</el-button>
</el-row>
</el-tab-pane>
</template>
</sick-help-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'SickHelpInfo': httpVueLoader('/components/sickHelp/SickHelpInfo.vue'),
},
data() {
return {
pageForm: {
auditState: 0,
year: (new Date().getFullYear() - 1).toString(),
isMember: null,
isAccept: null
},
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位', sortable: true},
// {prop: 'unionName', label: '分工会', sortable: true},
{prop: 'year', label: '年度', sortable: true},
{prop: 'selfPayMoney', label: '个人支付金额(元)', sortable: true},
{prop: 'subsidyMoney', label: '补助金额(元)', sortable: true},
// {prop: 'subsidyRatio', label: '补助比例', sortable: true},
// {prop: 'isMeetRequirements', label: '是否符合申请要求'},
// {prop: 'isAccept', label: '是否接受补助'},
{prop: 'isAccept', label: '是否申请补助'},
{prop: 'stateName', label: '审核状态'},
{prop: 'remarks', label: '备注'}
],
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
auditOpinion: '',
auditSign: '',
auditPass: true
},
rules: {
auditSign: [{required: false, message: '请签字', trigger: ['change', 'blur']}],
auditOpinion: [{required: true, message: '请输入审核意见', trigger: ['change', 'blur']}]
},
unions: [],
units: [],
selections: []
}
},
methods: {
async doAudit(flag) {
const valid = await this.$refs['form'].validate()
if (!valid) return
const r = flag ? '通过' : '拒绝';
const confirm = await this.$confirm('你确定要' + r + '吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
this.formData.auditPass = flag
const resp = await $.post(loc() + '/doAudit', this.formData)
if (resp.code === 0) {
this.$refs.guava.index()
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
},
async doRevoke(id, stateCode) {
if (![600, 700].includes(stateCode)) return
const confirm = await this.$confirm('你确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/doRevoke/' + id)
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
openView(id) {
this.$refs.guava.view()
this.$refs.sickView.openView(id)
},
async openAudit(id) {
this.$refs.guava.edit()
this.$refs.sickAudit.openAudit(id)
this.$set(this.formData, 'id', id)
this.$set(this.formData, 'auditOpinion', '同意')
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
doExport() {
const {year, auditState} = this.pageForm
if (!year) {
this.notifyWarning('请先选择年度')
return
}
window.open(loc() + '/doExport?year=' + year + '&auditState=' + auditState)
},
async batchAudit() {
const selection = this.$refs.table.selection
if (selection.length === 0) {
this.notifyWarning('请选择需要批量审核的记录')
return
}
const confirm = await this.$confirm('你确定要通过勾选的记录吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const ids = selection.map(v => v.id)
const resp = await $.post(loc() + '/batchAudit', {ids: JSON.stringify(ids)})
if (resp.code === 0) {
this.doSearch()
this.$refs.table.clearSelection()
} else {
this.notifyWarning(resp.msg)
}
}
},
async created() {
this.pageData()
this.unions = await getUnions(null)
}
})
</script>
<!--#
}
#-->