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,234 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<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"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select @change="flushUnits" @clear="flushUnits"
clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<!-- <div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select clearable="true" filterable="true"
placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></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 @click="exportXlsx" size="small"
type="primary">导出分工会汇总表
</el-button>
<el-button @click="doExport" size="small"
type="primary">导出人员汇总名单
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
class="vi-table"
ref="table" row-key="id"
style="width: 100%" v-loading="tableLoading">
<el-table-column align="center" header-align="center" label="序号" type="index"
width="80px">
<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"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
width="200px">
<template scope="scope">
<el-button @click="openView(scope.row.id)" size="mini" type="primary">查看
</el-button>
<el-button @click="exportByUnion(scope.row.id)" size="mini" type="primary">导出
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</template>
<template #view>
<info ref="info"></info>
</template>
<el-dialog :close-on-click-modal="false" :visible.sync="viewDialogVisible" title="详情"
width="60%">
<el-table :data="viewTableData" border>
<el-table-column align="center" header-align="center" label="序号" type="index"
width="100px"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="userName"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="工号"
prop="loginName"></el-table-column>
<el-table-column align="center" header-align="center" label="单位" prop="unitName"
width="160"></el-table-column>
<el-table-column align="center" header-align="center" label="子女出生时间"
prop="cssj"></el-table-column>
<el-table-column align="center" header-align="center" label="上报时间"
prop="sqsj"></el-table-column>
</el-table>
</el-dialog>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unions: [],
units: [],
pageForm: {
unionId: "",
unitId: "",
year: new Date().getFullYear() + "",
searchName: "u.username",
},
tableColumns: [
{prop: 'unionname', label: '分工会名称'},
{prop: 'teacherCount', label: '教职工人数'},
{prop: 'childCount', label: '子女人数'},
/* {prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位'},
{prop: 'cssj', label: '子女出生时间'},
{prop: 'sqsj', label: '上报时间'},
// {prop: 'shjg', label: '审核结果'},
{prop: 'stateName', label: '审核状态', sortable: true},*/
],
viewDialogVisible: false,
viewTableData: []
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'info': httpVueLoader('/components/singleChild/info.vue'),
},
methods: {
exportByUnion(id) {
window.open('/platform/fw/singleChild/report/doExport?year=' + this.pageForm.year+"&unionId="+id)
},
pageData() {
sublime.showLoadingbar()
$.post(loc() + '/pageData', this.pageForm).then(res => {
sublime.closeLoadingbar()
if (res.code === 0) {
this.tableData = res.data
}
})
},
exportXlsx() {
window.open('/platform/fw/singleChild/reading/exportXlsx?year=' + this.pageForm.year)
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data.id)
}
},
async openView(id) {
const {code, msg, data} = await $.get(loc() + '/getTeacherByUnionId', {
year: this.pageForm.year,
unionId: id
})
if (code === 0) {
this.viewDialogVisible = true
this.viewTableData = data
}
/* this.$refs.info.getInfo(id)
this.$refs.guava.view()*/
},
async doExport() {
const loading = this.$loading({
lock: true,
text: '正在导出名单...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
setTimeout(() => {
loading.close();
window.location.href = base + "/platform/fw/singleChild/reading/export?unitId=" + this.pageForm.unitId
+ "&unionId=" + this.pageForm.unionId
+ "&year=" + this.pageForm.year
}, 1000)
},
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()}")
}
}
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,639 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-input-number input {
text-align: left !important;
}
</style>
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<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
@change="doSearch"
placeholder="选择年"
style="width: 100%" type="year"
v-model="pageForm.year" value-format="yyyy">
</el-date-picker>
</div>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="申请列表">
<template #func>
<el-button @click="openImport" size="small" type="primary">
导入
</el-button>
<el-button @click="exportByUnion" size="small" type="primary">
导出
</el-button>
<el-button @click="openAdd" icon="el-icon-s-promotion" size="small"
type="primary">上报
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
class="vi-table"
ref="table" row-key="id"
style="width: 100%" v-loading="tableLoading">
<el-table-column align="center" header-align="center" label="序号" type="index"
width="80px">
<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"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline"
width="300px">
<template scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看
</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary"
v-if="!${@shiro.hasRole('sysadmin')}&&row.state===500">
编辑
</el-button>
<el-button @click="doDelete(row)" size="mini" type="danger"
v-if="!${@shiro.hasRole('sysadmin')}
&&[500,200].includes(row.state)">删除
</el-button>
<template v-if="${@shiro.hasRole('sysadmin')}">
<el-button @click="openEdit(row)" size="mini" type="primary"
>编辑
</el-button>
<el-button @click="doDelete(row)" size="mini" type="danger">删除
</el-button>
</template>
<!-- <el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',data:scope.row}"
:disabled="![100,300].includes(scope.row.state)">
编辑
</el-dropdown-item>
<el-dropdown-item :command="{type:'delete',data:scope.row}"
:loading="scope.row.delLoading">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>-->
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<div style="margin-bottom: 50px">
<h3 style="color: rgb(24, 103, 176);margin: 0;text-align: center">填写申请信息</h3>
</div>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
<el-row gutter="60">
<el-col :span="24">
<el-form-item label="工&emsp;&emsp;号" prop="loginName">
<el-select
:disabled="formData.id"
:loading="userLoading"
:remote-method="userRemoteMethod"
@change="userChange"
clearable
filterable
placeholder="请输入姓名或工号查找"
remote
reserve-keyword
style="width: 100%"
v-model="formData.loginName">
<el-option
:key="item.loginName"
:label="item.userName+''+item.loginName+''"
:value="item.loginName"
v-for="item in userOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单&emsp;&emsp;位">
<el-input auto-complete="off" disabled
maxlength="100"
placeholder="所属单位" style="width: 100%;"
tabindex="4" type="text"
v-model="formData.unitName"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="基层工会">
<el-input auto-complete="off" disabled
maxlength="100"
placeholder="所属基层工会" style="width: 100%;"
tabindex="4" type="text"
v-model="formData.unionName"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="24">
<el-form-item label="入职时间" prop="rzsj">
<el-date-picker v-model="formData.rzsj" value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
style="width: 100%;" placeholder="请输入职时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="子女姓名" prop="name">
<el-input maxlength="100" placeholder="请填写子女姓名"
@change="childNameChange"
v-model="formData.name" style="width: 100%;"
auto-complete="off" tabindex="4" type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="子女性别" class="is-required" prop="sex">
<el-radio v-model="formData.sex" label="男" style="margin-right: 60px;" border>男
</el-radio>
<el-radio v-model="formData.sex" label="女" border>女</el-radio>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="办证时间" prop="bzsj">
<el-date-picker
v-model="formData.bzsj"
default-value="2007-1-1"
:picker-options="pickerOptions"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
type="date"
style="width: 100%;"
placeholder="请选择办证时间">
</el-date-picker>
</el-form-item>
</el-col>-->
<el-col :span="24">
<el-form-item label="子女出生时间" prop="cssj">
<el-date-picker
:picker-options="pickerOptions"
default-value="2010-1-1"
format="yyyy-MM-dd"
placeholder="请选择出生时间"
style="width: 100%;"
type="date"
v-model="formData.cssj"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备&emsp;&emsp;注" prop="bz">
<el-input placeholder="备注.." type="textarea"
v-model="formData.bz"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字" prop="signData">
<sign :qz.sync="formData.signData"></sign>
</el-form-item>
</el-col>
<!-- <el-col :span="24">
<el-form-item prop="files" label="独生子女父母光荣证">
<file-upload :files.sync="formData.files"
card></file-upload>
</el-form-item>
</el-col>
-->
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="doAdd" type="primary">确 定</el-button>
</div>
</template>
<el-dialog
:visible.sync="dialogVisible"
title="申请须知"
width="40%">
<span style="line-height: 24px">
&emsp;&emsp;本次独生子女费申报范围为{{startYear}}年1月1日至2015年12月31日之间出生的、并已经办理好独生子女证的独生子女,如果是以上日期出生但未办理独生子女证的一孩则不予申报,已生育二孩的也不予申报。独生子女费每人每年60元,双职工以各自所在的分工会分别上报。
</span>
<span class="dialog-footer" slot="footer">
<el-button @click="dialog" type="primary">同意</el-button>
</span>
</el-dialog>
<template #view>
<info ref="info"></info>
</template>
</guava>
<el-dialog
:close-on-click-modal="false"
:visible.sync="importVisible"
title="人员导入"
width="50%">
<div style="margin-left: 68px;padding-bottom: 10px">
<span style="color: red">填写时,请按一孩一列(一个出生日期一条记录)填写</span>
</div>
<el-timeline>
<el-timeline-item placement="top" timestamp="下载模板">
<el-card>
<el-button
@click="location.href='/platform/fw/singleChild/report/downloadTemplate'"
icon="el-icon-download"
size="medium"
style="width: 200px">下载模板
</el-button>
</el-card>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="上传文件">
<el-card>
<el-form>
<el-upload
:auto-upload="false"
:file-list="importData.fileList"
:limit="1"
:on-change="(file, fileList) => {
importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})
}"
:on-remove="(file, fileList) => {
importData.fileList = fileHandleRemove(file, fileList);
importResult={
errorCount:0,
successCount:0,
totalCount:0,
errorList:[]
}
}"
name="file"
ref="upload">
<el-button icon="el-icon-upload" size="medium" style="width: 200px"
type="">选择文件
</el-button>
<div class="el-upload__tip" slot="tip" style="color: #F56C6C">
只能上传 xls/xlsx 文件
</div>
</el-upload>
</el-form>
</el-card>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="导入结果">
<el-card shadow="never">
<p>总记录数:{{errorInfoData.totalCount}}</p>
<p>成功数:<span class="text-success">{{errorInfoData.successCount}}</span></p>
<p>错误数:<span class="text-danger">{{errorInfoData.errorCount}}</span></p>
<el-link @click="exportErrors" type="primary" v-if="errorInfoData.errorCount>0">
下载错误记录
</el-link>
</el-card>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="签字">
<sign :qz.sync="signData"></sign>
</el-timeline-item>
</el-timeline>
<span class="dialog-footer" slot="footer">
<el-button @click="importVisible = false">取 消</el-button>
<el-button @click="doImport" type="primary">确定</el-button>
</span>
</el-dialog>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
dialogVisible: false,
unions: [],
units: [],
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位'},
{prop: 'cssj', label: '子女出生时间'},
{prop: 'sqsj', label: '上报时间'},
// {prop: 'shjg', label: '审核结果'},
{prop: 'stateName', label: '审核状态', sortable: true},
],
pageForm: {
year: new Date().getFullYear() + "",
},
pickerOptions: {
disabledDate: time => {
var begin = moment("2010-1-1").valueOf();
var end = moment("2015-12-31").valueOf();
return time.getTime() < begin || time.getTime() > end;
}
},
formRules: {
loginName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
cssj: [{required: true, message: '必填', trigger: ['blur', 'change']}],
signData: [{required: true, message: '必填', trigger: ['change', 'blur']}],
},
formData: {
files: []
},
startYear: new Date().getFullYear() - 14,
userOptions: [],
userLoading: false,
importVisible: false,
importData: {
fileList: [],
},
errorInfoData: {
totalCount: 0,
successCount: 0,
errorCount: 0,
errorList: 0,
},
signData: "",
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'info': httpVueLoader('/components/singleChild/info.vue'),
},
methods: {
exportByUnion() {
window.open('/platform/fw/singleChild/report/doExport?year=' + this.pageForm.year)
},
doImport() {
if (this.importData.fileList.length === 0) {
this.$message.warning("请选择文件!")
return
}
if (this.signData == null || this.signData === '') {
this.$message.warning("请签字后再上传!")
return
}
const data = new FormData();
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name);
});
data.append("signData", this.signData)
this.importLoading = true
$.ajax({
url: loc() + "/doImportUser",
type: "post",
data: data,
processData: false,
contentType: false,
success: (data) => {
this.importLoading = false
if (data.code === 0 && !data.data) {
this.notifySuccess("导入成功")
this.importVisible = false
} else {
this.importLoading = false
this.notifyWarning("导入失败")
this.errorInfoData = data.data
}
this.pageData();
},
error: (data) => {
this.notifyWarning("导入失败")
this.importLoading = false
}
});
},
exportErrors() {
const data = this.errorInfoData.errorList
// 创建工作簿
const workbook = XLSX.utils.book_new();
// 创建工作表
const worksheet = XLSX.utils.json_to_sheet(data);
// 将工作表添加到工作簿
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
// 将工作簿转换为二进制对象
const excelBuffer = XLSX.write(workbook, {bookType: 'xlsx', type: 'array'});
// 将二进制对象转换为Blob对象
const blob = new Blob([excelBuffer], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
// 创建下载链接并设置相关属性
const url = window.URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = '错误记录.xlsx';
// 模拟点击下载链接
document.body.appendChild(link);
link.click();
// 清理下载链接
document.body.removeChild(link);
window.URL.revokeObjectURL(url);
},
openImport() {
this.importData = {
fileList: [],
}
this.errorInfoData = {
totalCount: 0,
successCount: 0,
errorCount: 0,
errorList: 0,
}
this.importVisible = true;
},
async userRemoteMethod(query) {
if (query) {
this.userLoading = true
const arr = await this.queryUser(query)
this.userOptions = arr
this.userLoading = false
}
},
async queryUser(query) {
const {data} = await $.get(loc() + "/queryUser", {query})
return data
},
async userChange(val) {
const {
userName,
unitId,
unitName,
unionId,
unionName
} = this.userOptions.find(v => v.loginName === val)
this.$set(this.formData, 'userName', userName)
this.$set(this.formData, 'unitId', unitId)
this.$set(this.formData, 'unitName', unitName)
this.$set(this.formData, 'unionid', unionId)
this.$set(this.formData, 'unionName', unionName)
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data.id)
} else if (type == 'edit') {
this.openEdit(data.id)
} else if (type == 'delete') {
this.doDelete(data)
}
},
dialog() {
this.formData = {}
this.dialogVisible = false
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
openAdd() {
this.dialogVisible = true
},
doAdd() {
let method = this.formData.id ? "/doEdit" : "/doAdd"
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const formData = Object.assign({}, this.formData);
formData.files = JSON.stringify(formData.files)
const resp = await $.post(loc() + method, formData)
loading.close()
if (resp.code === 0) {
this.pageData();
this.$refs.guava.index()
} else {
this.notifyWarning(resp.msg)
}
}
})
},
openView(id) {
this.$refs.info.getInfo(id)
this.$refs.guava.view()
},
async openEdit(row) {
this.userOptions = [{
userName: row.userName,
loginName: row.loginName,
unionName: row.unionName
}]
this.formData = clone(row)
this.$refs.guava.edit()
/* const resp = await $.get("/platform/fw/singleChild/report/findOne", {id})
if(resp.code===0){
const data = resp.data
if (data.files) {
data.files = JSON.parse(data.files)
}
this.formData = data
this.$refs.guava.edit()
}else{
this.notifyWarning(resp.msg)
}*/
},
doDelete(row) {
const {id} = row
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
this.$set(row, "delLoading", true)
const resp = await $.get(loc() + '/doDelete', {id: id})
this.$set(row, "delLoading", false)
if (resp.code === 0) {
this.pageData();
this.$refs.guava.index()
} else {
this.notifyWarning(resp.msg)
}
}
}
})
},
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()}")
}
},
async childNameChange(val) {
const resp = await $.get(loc() + '/getCert', {childName: val})
if (resp.code === 0) {
if (resp.data) {
this.$notify.success({
title: '提示',
message: '已为您匹配到最近一年的申请信息,部分信息已自动填写,请您核实!',
duration: 0
})
this.$nextTick(() => {
this.$set(this.formData, "files", resp.data.files)
this.$set(this.formData, "bzsj", resp.data.bzsj)
this.$set(this.formData, "cssj", resp.data.cssj)
this.$set(this.formData, "sex", resp.data.sex)
})
} else {
this.$set(this.formData, "files", [])
this.$set(this.formData, "bzsj", "")
this.$set(this.formData, "cssj", "")
this.$set(this.formData, "sex", "男")
}
}
}
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,335 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<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
v-model="pageForm.year"
type="year"
placeholder="选择年度"
value-format="yyyy"
style="width: 100%">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">职工信息:</div>
<div class="search-item-option">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
style="width: 100%"
@keyup.enter.native="doSearch">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 120px;">
<el-option label="姓名" value="u.username"></el-option>
<el-option label="工号" value="u.loginname"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('wyh02')}">
<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-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="审核列表" :app="this">
<template #func>
<el-button type="primary" size="small" class="mr10"
:disabled="tableSelection.length===0"
@click="batchPass">批量通过
</el-button>
<el-radio-group v-model="pageForm.isAudit" @change="doSearch" size="small">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" ref="table"
:size="tableSize" @selection-change="selectionChange">
<el-table-column type="selection" v-if="pageForm.isAudit===3"></el-table-column>
<el-table-column align="center" header-align="center" width="80px" label="序号" type="index">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span></template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<!-- <template v-if="column.prop=='shjg'" scope="{row:{shjg}}">-->
<!-- <el-tag v-if="shjg=='1'" type="warning">待基层工会审核</el-tag>-->
<!-- <el-tag v-if="shjg=='2'" type="danger">基层工会驳回</el-tag>-->
<!-- <el-tag v-if="shjg=='3'" type="warning">待校工会审核</el-tag>-->
<!-- <el-tag v-if="shjg=='4'" type="danger">校工会驳回</el-tag>-->
<!-- <el-tag v-if="shjg=='5'" type="success">校工会通过</el-tag>-->
<!-- </template>-->
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px">
<template scope="scope">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'Review',data:scope.row}"
:disabled="scope.row.state!==500">
审核
</el-dropdown-item>
<el-dropdown-item :command="{type:'rollBack',data:scope.row}"
:disabled="![200,600,700].includes(scope.row.state)">
撤回
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<info ref="info"></info>
</template>
<template #edit>
<info ref="info2" handle label="校工会审核">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="xghshr" label="审核人员">
<el-input v-model="formData.xghshr"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="xghshsj" label="审核时间">
<el-input v-model="formData.xghshsj" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="xghshyj" label="审核意见">
<el-input type="textarea" v-model="formData.xghshyj" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(0)" v-throttle type="danger">
拒绝
</el-button>
<el-button @click="doAudit(-1)" v-throttle type="warning">
退回修改
</el-button>
<el-button type="primary" @click="doAudit(1)" v-throttle>
通过
</el-button>
</div>
</template>
</info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
subDis: false,
subLoading1: false,
subLoading2: false,
addDialogVisible: false,
unions: [],
units: [],
pageForm: {
isAudit: 3,
searchName: "u.username",
year: new Date().getFullYear().toString()
},
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位'},
{prop: 'cssj', label: '子女出生时间'},
{prop: 'sqsj', label: '上报时间'},
// {prop: 'shjg', label: '审核结果'},
{prop: 'stateName', label: '审核状态', sortable: true},
],
formRules: {
xghshyj: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
tableSelection: []
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'info': httpVueLoader('/components/singleChild/info.vue'),
},
methods: {
async batchPass() {
const ids = this.tableSelection.map(v => v.id)
if (!ids) return
const confirm = await this.$confirm('您确定要批量通过吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (!confirm) return
const resp = await $.post(loc() + '/batchPass', {ids: JSON.stringify(ids)})
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
selectionChange(val) {
this.tableSelection = val
},
async doAudit(val) {
const confirm = await this.$refs["form"].validate()
if (!confirm) return
const params = {
...this.formData,
result: val
}
const resp = await $.post(loc() + "/doReview", params)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
this.$refs.guava.index()
} else {
this.notifyWarning(resp.msg)
}
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data.id)
} else if (type == 'Review') {
this.openReview(data.id)
} else if (type == 'rollBack') {
this.doRollBack(data.id)
}
},
async doRollBack(id) {
const confirm = await this.$confirm('您确定要撤回吗?撤回成功后可重新审核', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (!confirm) return
const resp = await $.post(loc() + '/doRollBack/' + id)
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
openView(id) {
this.$refs.info.getInfo(id)
this.$refs.guava.view()
},
openReview(id) {
this.formData = {
id,
xghshr: "${@shiro.getPrincipalProperty('username')}",
xghshsj: moment().format('YYYY-MM-DD'),
}
this.$refs.info2.getInfo(id)
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('wyh02')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
}
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,311 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" class="platform" v-cloak>
<guava ref="guava">
<template>
<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
v-model="pageForm.year"
type="year"
placeholder="选择年度"
value-format="yyyy"
style="width: 100%">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">职工信息:</div>
<div class="search-item-option">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
style="width: 100%"
@keyup.enter.native="doSearch">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 120px;">
<el-option label="上报人姓名" value="u.username"></el-option>
<el-option label="上报人工号" value="u.loginname"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('wyh02')}">
<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-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="审核列表" :app="this">
<template #func>
<el-radio-group v-model="pageForm.isAudit" @change="doSearch" size="small">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" ref="table"
:size="tableSize" class="vi-table">
<el-table-column align="center" header-align="center" width="80px" label="序号" type="index">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span></template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<!-- <template v-if="column.prop=='shjg'" scope="{row:{shjg}}">-->
<!-- <el-tag v-if="shjg=='1'" type="warning">待基层工会审核</el-tag>-->
<!-- <el-tag v-if="shjg=='2'" type="danger">基层工会驳回</el-tag>-->
<!-- <el-tag v-if="shjg=='3'" type="warning">待校工会审核</el-tag>-->
<!-- <el-tag v-if="shjg=='4'" type="danger">校工会驳回</el-tag>-->
<!-- <el-tag v-if="shjg=='5'" type="success">校工会通过</el-tag>-->
<!-- </template>-->
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px">
<template scope="scope">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'Review',data:scope.row}"
:disabled="![200,300].includes(scope.row.state)">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<info ref="info2" handle label="基层工会审核">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="fghshr" label="审核人员">
<el-input v-model="formData.fghshr"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="fghshsj" label="审核时间">
<el-input v-model="formData.fghshsj" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="fghshyj" label="审核意见">
<el-input type="textarea" v-model="formData.fghshyj" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(0)" v-throttle type="danger">
拒绝
</el-button>
<el-button @click="doAudit(-1)" v-throttle type="warning">
退回修改
</el-button>
<el-button type="primary" @click="doAudit(1)" v-throttle>
通过
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<info ref="info"></info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
subDis: false,
subLoading1: false,
subLoading2: false,
addDialogVisible: false,
unions: [],
units: [],
pageForm: {
isAudit: 3,
searchName: "u.username",
year: new Date().getFullYear().toString()
},
tableColumns: [
{prop: 'loginname', label: '上报人工号'},
{prop: 'username', label: '上报人'},
{prop: 'sqsj', label: '申请时间'},
{prop: 'name', label: '子女姓名'},
{prop: 'sex', label: '子女性别', sortable: true},
{prop: 'cssj', label: '出生时间', sortable: true},
{prop: 'unitname', label: '所在单位', sortable: true},
{prop: 'unionname', label: '所在工会', sortable: true},
// {prop: 'shjg', label: '审核结果', sortable: true},
{prop: 'stateName', label: '审核状态', sortable: true},
],
formRules: {
fghshyj: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'info': httpVueLoader('/components/singleChild/info.vue'),
},
methods: {
async doAudit(val) {
const confirm = await this.$refs["form"].validate()
if (!confirm) return
const params = {
...this.formData,
result: val
}
const resp = await $.post(loc() + "/doReview", params)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
this.$refs.guava.index()
} else {
this.notifyWarning(resp.msg)
}
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data.id)
} else if (type == 'Review') {
this.openReview(data.id)
}
},
openView(id) {
this.$refs.info.getInfo(id)
this.$refs.guava.view()
},
openReview(id) {
this.formData = {
id,
fghshr: "${@shiro.getPrincipalProperty('username')}",
fghshsj: moment().format('YYYY-MM-DD'),
}
this.$refs.info2.getInfo(id)
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.pass = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(loc() + "/doReview", this.formData)
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
if(resp.code===0){
this.pageData()
this.$refs.guava.index()
}else{
this.notifyWarning(resp.msg)
}
}
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}||@shiro.hasRole('wyh02')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->