This commit is contained in:
2024-10-12 08:46:32 +08:00
parent dbdf74e628
commit e11c9d18cf
8 changed files with 220 additions and 86 deletions
@@ -114,14 +114,7 @@ layout("/layouts/platform.html"){
<text-editor v-model="formData.constructionPlan"></text-editor>
</el-form-item>
<el-form-item required label="文档上传" prop="files">
<file-upload :files.sync="formData.files" card :max="10"
:type="['doc','docx','xls','xlsx','pdf','ppt', 'jpg', 'png', 'jpeg']">
<template #el-upload__tip>
</template>
</file-upload>
<div class="el-upload__tip">请上传党组织盖章文档</div>
</el-form-item>
</el-form>
<el-row class="mt10" justify="center" type="flex">
@@ -76,7 +76,7 @@ layout("/layouts/platform.html"){
<el-button @click="openExport(row.id)"
size="mini"
type="primary"
v-if="['10030'].includes(row.state) && row.state">申报表导出
v-if="row.state">申报表导出
</el-button>
<el-button @click="openEdit(row)"
size="mini"
@@ -11,40 +11,41 @@ layout("/layouts/platform.html"){
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
v-model="pageForm.year"
value-format="yyyy"
formData="yyyy"
type="year"
@change="doSearch"
formData="yyyy"
placeholder="请选择年度"
style="width: 100%"
placeholder="请选择年度">
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-select placeholder="所属工会" v-model="pageForm.unionId"
<el-select @change="doSearch" clearable="true"
filterable="true"
placeholder="所属工会"
style="width: 100%;"
clearable="true"
@change="doSearch"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname"
:value="item.id"></el-option>
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-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="审核列表" :app="this">
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="审核列表">
<template #func>
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
<el-radio-group @change="doSearch" class="mr10" size="small"
v-model="pageForm.isAudit">
<el-radio-button :label="null">全部</el-radio-button>
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
@@ -52,35 +53,49 @@ layout("/layouts/platform.html"){
</template>
</table-tool>
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
@sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<el-table-column align="center" header-align="center" type="index"
:index="indexMethod" label="序号"
<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 :index="indexMethod" align="center" header-align="center"
label="序号" type="index"
width="80px"></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"
:width="column.width"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop === 'applyDate'">
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
</template>
<template scope="{row}" v-else-if="column.prop === 'files'">
<span>{{ row.files?"已上传":"未上传" }}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="300">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="openAudit(row)" v-if="['10020'].includes(row.state) || !row.state"
size="mini" type="primary">审核
<el-button @click="openView(row)" size="mini" type="primary">查看
</el-button>
<el-button @click="openAudit(row)"
size="mini"
type="primary"
v-if="['10020'].includes(row.state) || !row.state">审核
</el-button>
<el-button @click="doRollBack(row.id)"
v-if="['10025','10030'].includes(row.state) || !row.state" size="mini" type="danger">
size="mini"
type="danger"
v-if="['10025','10030'].includes(row.state) || !row.state">
撤回
</el-button>
<el-button @click="openFile(row)" size="mini" type="primary">上传党组织盖章文档
</el-button>
</template>
</el-table-column>
</el-table>
@@ -96,42 +111,60 @@ layout("/layouts/platform.html"){
<wakes-info-apply ref="auditInfo">
<template #handle>
<el-tab-pane label="校工会审核" name="schoolAudit">
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input value="${@shiro.getPrincipalProperty('username')}"
disabled></el-input>
<el-form-item label="审核人员" prop="username">
<el-input disabled
value="${@shiro.getPrincipalProperty('username')}"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="auditOpinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item prop="auditSign" label="审核签字">
<el-form-item label="审核签字" prop="auditSign">
<sign :qz.sync="formData.auditSign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
<el-button type="primary" @click="doReview(true)">通过</el-button>
<el-button @click="doReview(false)" type="danger">拒绝</el-button>
<el-button @click="doReview(true)" type="primary">通过</el-button>
</div>
</el-tab-pane>
</template>
</wakes-info-apply>
</template>
</guava>
<el-dialog
:visible.sync="filesDialogVisible"
title="上传党组织盖章文档"
width="30%">
<file-upload :files.sync="formData.files" :max="10"
:type="['doc','docx','xls','xlsx','pdf','ppt', 'jpg', 'png', 'jpeg']"
card>
<template #el-upload__tip>
</template>
</file-upload>
<span class="dialog-footer" slot="footer">
<el-button @click="filesDialogVisible = false">关 闭</el-button>
<el-button @click="doFiles" type="primary">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
@@ -139,31 +172,58 @@ layout("/layouts/platform.html"){
el: '#app',
mixins: [initTableMixins],
data: {
id:'',
unions:[],
pageForm:{
isAudit:false,
id: '',
unions: [],
pageForm: {
isAudit: false,
year: moment().format('YYYY'),
},
tableColumns: [
{prop: 'unionName', label: '申报工会', sortable: true},
{prop: 'username', label: '申报人', sortable: true},
{prop: 'loginName', label: '申报人工号', sortable: true},
{prop: 'mobile', label: '联系方式', sortable: true},
{prop: 'username', label: '申报人', sortable: true, width: "100px"},
{prop: 'loginName', label: '申报人工号', sortable: true, width: "150px"},
{prop: 'mobile', label: '联系方式', sortable: true, width: "150px"},
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
{prop: 'applyDate', label: '申报日期', sortable: true},
{prop: 'files', label: '是否上传党组织盖章文档', sortable: true},
{prop: 'stateName', label: '审核状态', sortable: true},
],
formRules: {
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
filesDialogVisible: false,
},
components: {
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
},
methods: {
doReview(row){
async doFiles() {
if (this.formData.files && this.formData.files.length === 0) {
this.notifyWarning("请上传党组织盖章文档")
return
}
const {code, msg} = await $.post(loc() + '/doFiles', {
id: this.formData.id,
files: JSON.stringify(this.formData.files),
})
if (code === 0) {
this.pageData()
this.notifySuccess(msg)
this.filesDialogVisible = false
} else {
this.notifyWarning(msg)
}
},
openFile(row) {
const formData = clone(row)
this.formData.id = formData.id
this.formData.files = formData.files ? JSON.parse(formData.files) : []
this.filesDialogVisible = true
},
doReview(row) {
this.$refs['form'].validate(valid => {
if (valid) {
this.$confirm('您确定要提交吗?', '提示', {
@@ -187,30 +247,30 @@ layout("/layouts/platform.html"){
}
})
},
openView(row){
openView(row) {
this.$refs.guava.view()
this.$refs.viewInfo.openView(row.id)
},
openAudit(row){
this.formData={}
openAudit(row) {
this.formData = {}
this.id = row.id
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
this.$refs.guava.edit()
this.$refs.auditInfo.activeName = 'schoolAudit'
this.$refs.auditInfo.openView(row.id)
},
async doRollBack(id){
async doRollBack(id) {
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ("confirm" === confirm) {
const resp = await $.get(loc() + '/doRollBack',{id:id})
if (resp.code === 0){
const resp = await $.get(loc() + '/doRollBack', {id: id})
if (resp.code === 0) {
this.pageData();
this.$message.success(resp.msg)
}else {
} else {
this.$message.warning(resp.msg)
}
}
@@ -223,7 +283,7 @@ layout("/layouts/platform.html"){
}
},
},
async created(){
async created() {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
} else {
@@ -59,16 +59,22 @@ layout("/layouts/platform.html"){
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:width="column.width"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop === 'applyDate'">
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
</template>
<template scope="{row}" v-else-if="column.prop === 'files'">
<span>{{ row.files?"已上传":"未上传" }}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="250px">
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="350">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="openExport(row.id)" size="mini" type="primary">导出申报表</el-button>
<el-button @click="openFile(row)" size="mini" type="primary">上传党组织盖章文档
</el-button>
</template>
</el-table-column>
</el-table>
@@ -80,6 +86,21 @@ layout("/layouts/platform.html"){
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
</template>
</guava>
<el-dialog
:visible.sync="filesDialogVisible"
title="上传党组织盖章文档"
width="30%">
<file-upload :files.sync="formData.files" :max="10"
:type="['doc','docx','xls','xlsx','pdf','ppt', 'jpg', 'png', 'jpeg']"
card>
<template #el-upload__tip>
</template>
</file-upload>
<span class="dialog-footer" slot="footer">
<el-button @click="filesDialogVisible = false">关 闭</el-button>
<el-button @click="doFiles" type="primary">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
@@ -94,23 +115,50 @@ layout("/layouts/platform.html"){
year: moment().format('YYYY'),
},
tableColumns: [
{prop: 'unionName', label: '申报工会', sortable: true},
{prop: 'username', label: '申报人', sortable: true},
{prop: 'loginName', label: '申报人工号', sortable: true},
{prop: 'mobile', label: '联系方式', sortable: true},
{prop: 'unionName', label: '申报工会', sortable: true,width: "150px"},
{prop: 'username', label: '申报人', sortable: true, width: "100px"},
{prop: 'loginName', label: '申报人工号', sortable: true, width: "150px"},
{prop: 'mobile', label: '联系方式', sortable: true, width: "150px"},
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
{prop: 'applyDate', label: '申报日期', sortable: true},
{prop: 'files', label: '是否上传党组织盖章文档', sortable: true},
{prop: 'stateName', label: '审核状态', sortable: true},
],
formRules: {
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
filesDialogVisible: false,
},
components: {
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
},
methods: {
async doFiles() {
if (this.formData.files && this.formData.files.length === 0) {
this.notifyWarning("请上传党组织盖章文档")
return
}
const {code, msg} = await $.post('/platform/wakeshome/declaration/school/doFiles', {
id: this.formData.id,
files: JSON.stringify(this.formData.files),
})
if (code === 0) {
this.pageData()
this.notifySuccess(msg)
this.filesDialogVisible=false
} else {
this.notifyWarning(msg)
}
},
openFile(row) {
const formData = clone(row)
this.formData.id = formData.id
this.formData.files = formData.files ? JSON.parse(formData.files) : []
this.filesDialogVisible = true
},
openExport(id) {
window.open("/platform/wakeshome/declaration/mine/openExport?id=" + id)
},