first commit
This commit is contained in:
@@ -0,0 +1,300 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-clock>
|
||||
<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"
|
||||
formData="yyyy"
|
||||
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-select @change="doSearch" 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-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-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>
|
||||
</el-radio-group>
|
||||
</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 :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
: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" 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)"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="['10020'].includes(row.state) || !row.state">审核
|
||||
</el-button>
|
||||
<el-button @click="doRollBack(row.id)"
|
||||
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>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<wakes-info-apply ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="schoolAudit">
|
||||
<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 label="审核人员" prop="username">
|
||||
<el-input disabled
|
||||
value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<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 label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" 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>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<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>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
id: '',
|
||||
unions: [],
|
||||
pageForm: {
|
||||
isAudit: false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', 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: {
|
||||
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('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.formData.auditPass = row
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
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) {
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.pageData();
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user