This commit is contained in:
2026-09-09 16:16:22 +08:00
parent ebffbab428
commit ba3a985c40
3749 changed files with 29 additions and 608551 deletions
@@ -1,359 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-form .el-select, .el-form .el-date-editor {
width: 100%;
}
.el-divider {
background-color: #1867b0;
}
.el-divider__text {
color: #1867b0;
}
.w-e-text-container {
height: 250px !important;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<template #header>
<el-row justify="space-between" type="flex">
<h3 style="color: rgb(24, 103, 176);">
{{id?'项目编辑':'项目申报'}}
</h3>
</el-row>
</template>
<el-form :model="formData" :rules="rules" label-width="100px" ref="AddForm">
<div style="margin-bottom: 30px">
<el-form-item label="项目名称" prop="projectId">
<el-select v-model="formData.projectId" placeholder="请选择项目名称" clearable>
<el-option v-for="o in projectList" :label="o.projectName" :value="o.id"></el-option>
</el-select>
</el-form-item>
</div>
<el-divider content-position="left">申报工会信息</el-divider>
<div>
<el-row :gutter="20" type="flex">
<el-col :span="8">
<el-form-item label="院级工会" prop="unionId">
<el-select placeholder="请选择申报院级工会" v-model="formData.unionId"
style="width: 100%;"
disabled
@change="searchUnionInfo(formData.unionId)"
clearable="true"
filterable>
<el-option v-for="item in unions"
:label="item.unionname"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申报人" prop="declarer">
<el-input readonly placeholder="请填写申报人" v-model="formData.declarer"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工会主席" prop="unionLeader">
<el-input placeholder="请填写工会主席" v-model="formData.unionLeader"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="8">
<el-form-item label="工会人数" prop="unionPeoNum">
<el-input placeholder="请填写工会人数" v-model="formData.unionPeoNum"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="补助金额" prop="subsidyAmount">
<el-input placeholder="请填写补助金额" v-model="formData.subsidyAmount"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申请时间" prop="auditTime">
<el-date-picker
placeholder="申请时间"
style="width: 100%"
readonly
type="date"
v-model="formData.auditTime"
value-format="yyyy-MM-dd">
</el-date-picker>
<!--<el-input placeholder="请填写申请时间" v-model="formData.auditTime"></el-input>-->
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" :gutter="20">
<el-col :span="24">
<el-form-item label="年度获奖情况" prop="award">
<el-input v-model="formData.award" type="textarea" rows="4"
placeholder="如有多种奖励,请用 / 隔开"></el-input>
<el-popover
v-model="popover"
placement="top-start"
width="800"
trigger="click">
<el-table :data="honorList" ref="multipleTable" @selection-change="handleSelectionChange"
row-key="id"
style="width: 100%; max-height: 400px; overflow-y: auto" size="mini">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column property="prizeName" label="获奖名称"></el-table-column>
<el-table-column property="levelName" label="级别"></el-table-column>
<el-table-column property="grantDate" sortable label="授予时间"></el-table-column>
</el-table>
<div style="text-align: right; margin-top: 10px">
<el-button @click="multipleSelection = []; popover = false" size="mini">取消
</el-button>
<el-button @click="popoverOK" type="primary" size="mini">确定</el-button>
</div>
<el-button slot="reference" type="primary" size="mini">调用已录入荣誉</el-button>
</el-popover>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left" ref="specificInformation">
具体预算详情(最多填写400字,当前字数
<span :style="{color:(specificInfoLength>400?'red':'')}"> {{specificInfoLength}})</span>
</el-divider>
<el-form-item label-width="0" prop="specificInfo" style="margin-bottom: 40px;">
<div ref="specificInfo" style="width: 100%;"></div>
</el-form-item>
</div>
</el-form>
<el-row class="mt10" justify="center" type="flex">
<el-button v-bind:disabled="isSubmitting" @click="doSave" style="width: 300px" type="primary">保存</el-button>
<el-button v-bind:disabled="isSubmitting" @click="doSubmit" style="width: 300px" type="primary">提交</el-button>
</el-row>
</el-card>
</guava>
</div>
<script>
let specificInfoEditor = null
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
const validatorSpecificInfo = (rule, value, callback) => {
if (value === '') {
callback(new Error('请填写'))
} else if (removeHTMLTag(value).length > 400) {
callback(new Error('字数太多'))
} else {
callback()
}
}
return {
id:null,
popover: false,
isSubmitting: false,
formData:{
specificInfo: '',
unionPeoNum:null,
unionLeader:null,
userName:'',
userId:'',
},
pageData:{},
projectList:[],
unions:[],
rules:{
projectId: [{required: true, message: '请选择项目名称', trigger: ['blur', 'change']}],
unionId: [{required: true, message: '请选择院级工会', trigger: ['blur', 'change']}],
declarer: [{required: true, message: '请填写申报人', trigger: ['blur', 'change']}],
unionLeader: [{required: true, message: '请填写工会主席', trigger: ['blur', 'change']}],
unionPeoNum: [{required: true, message: '请填写工会人数', trigger: ['blur', 'change']}],
subsidyAmount: [{required: true, message: '请填写补助金额', trigger: ['blur', 'change']}],
auditTime: [{required: true, message: '请填写申请日期', trigger: ['blur', 'change']}],
award: [{required: false, message: '请填写申请日期', trigger: ['blur', 'change']}],
specificInfo: [{validator: validatorSpecificInfo, trigger: ['blur', 'change']}],
},
multipleSelection: [],
honorList:[],
}
},
methods: {
async doSave() {
let isValid = true
this.$refs.AddForm.validateField('projectId', (err) => {
if (err.length) {
isValid = false
}
})
if (!isValid) return
let loading = this.$loading({
lock: true,
text: '保存中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let postUrl = ''
if (this.formData.id) {
postUrl = '/platform/projectfunding/myDeclare/doEdit'
} else {
postUrl = '/platform/projectfunding/declare/doSave'
}
const o = this.projectList.find(o => o.id === this.formData.projectId)
this.formData.projectName = o.projectName
const resp = await $.post(base + postUrl, this.formData)
if (resp.code === 0) {
setTimeout(() => {
loading.text = '保存成功'
loading.spinner = 'el-icon-check'
setTimeout(() => {
loading.close()
sublime.jumpPagePjax('/platform/projectfunding/myDeclare')
}, 1000)
}, 1500)
} else {
loading.close()
this.notifyError(resp.msg)
}
},
async doSubmit() {
try {
const valid = await this.$refs['AddForm'].validate()
if (valid) {
let loading = this.$loading({
lock: true,
text: '提交中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let postUrl = ''
if (this.formData.id) {
postUrl = '/platform/projectfunding/myDeclare/doEdit'
this.formData.tjxx = '0';
} else {
postUrl = '/platform/projectfunding/declare/doAdd'
}
const o = this.projectList.find(o => o.id === this.formData.projectId)
this.formData.projectName = o.projectName
const resp = await $.post(base + postUrl, this.formData)
if (resp.code === 0) {
setTimeout(() => {
loading.text = '提交成功'
loading.spinner = 'el-icon-check'
setTimeout(() => {
loading.close()
sublime.jumpPagePjax('/platform/projectfunding/myDeclare')
}, 1000)
}, 1500)
} else {
loading.close()
this.notifyError(resp.msg)
}
}
} catch (e) {
console.log(e)
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
popoverOK(){
if (this.multipleSelection) {
let str = '';
this.multipleSelection.forEach(item => {
const time = item.grantDate ? moment(item.grantDate).format('YYYY') + '-' : ''
str += time + item.prizeName + '\n'
})
str = str.substring(0, str.length - 1)
this.formData.award = str
this.popover = false
}
},
async isEdit() {
const id = GetQueryString("id")
this.id = id
if (id) {
const resp = await $.get(loc() + '/findProjectInfo/' + id)
this.formData = resp.data
specificInfoEditor.txt.html(this.formData.specificInfo)
}
},
async initEditor() {
return await new Promise((resolve, reject) => {
this.$nextTick(() => {
setTimeout(() => {
specificInfoEditor = new wangEditor(this.$refs.specificInfo)
specificInfoEditor.config.onchange = (html) => {
if (removeHTMLTag(html).length > 400) {
this.$message.info('具体预算详情最多填写400字')
}
this.$refs.AddForm.validateField('specificInfo', (errMsg) => {
})
this.formData.specificInfo = html
}
specificInfoEditor.config.uploadImgShowBase64 = true
specificInfoEditor.create()
resolve()
}, 800)
})
})
},
async getProjectFunding(){
const resp = await $.get('/platform/projectfunding/manage/getProjectFunding')
if (resp.code === 0){
this.projectList = resp.data
}
},
async searchUnionInfo(id){
const resp = await $.get(loc() + '/getUnionInfo',{id:id})
if (resp.code === 0){
this.formData.unionPeoNum = resp.data.unionPeoNum;
this.formData.unionLeader = resp.data.username;
}
this.honorList = [];
await this.getUnionHonor(id)
},
async getUnionHonor(id){
const {data} = await $.post(loc() + '/getUnionHonor',{unionId:id})
this.honorList = data;
},
initFormData(){
if (this.id==null){
this.$set(this.formData, 'declarer', "${@shiro.getPrincipalProperty('username')}")
this.$set(this.formData, 'userId', "${@shiro.getPrincipalProperty('id')}")
this.$set(this.formData, "auditTime", new Date());
this.$set(this.formData, 'unionId', "${@shiro.getPrincipalProperty('union').getId()}")
}
},
},
computed: {
specificInfoLength() {
return removeHTMLTag(this.formData.specificInfo).length
},
},
async mounted() {
await this.initEditor()
await this.isEdit()
},
async created() {
this.initFormData();
this.unions = await getUnions();
await this.getProjectFunding();
await this.searchUnionInfo(this.formData.unionId);
}
})
</script>
<!--#
}
#-->
@@ -1,179 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.viewTable .el-descriptions__table {
table-layout: fixed !important;
}
.viewTable .el-descriptions-item__cell {
text-align: center !important;
}
</style>
<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="选择年度"
type="year"
@change="doSearch"
style="width: 100%"
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 @keyup.enter.native="doSearch" clearable
placeholder="请输入项目名称"
style="width: 100%"
v-model="pageForm.projectName">
</el-input>
</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="openAdd" size="medium" type="primary">新建项目</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize">
<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"
>
</el-table-column>
<el-table-column label="操作" width="250px">
<template scope="{row}">
<!--<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>-->
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="doDelete(row)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
<el-dialog :title="title" :visible.sync="DialogVisible" :close-on-click-modal="false" width="40%">
<el-form :model="formData" ref="addForm" :rules="formRules"
label-width="100px">
<el-form-item label="项目名称" prop="projectName">
<el-input type="text" v-model="formData.projectName" maxlength="50" placeholder="请填写项目名称"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="DialogVisible = false">取 消</el-button>
<el-button type="primary" :disabled="subDis" @click="operation">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
title:'',
DialogVisible:false,
subDis: false,
tableColumns: [
{label: '项目名称', prop: 'projectName', sortable: true},
{label: '创建时间', prop: 'createTime', sortable: true},
],
pageForm:{
year:moment().format('YYYY'),
},
formData:{},
formRules: {
projectName: [{required: true, message: '必选', trigger: ['blur', 'change']}],
},
}
},
methods: {
openAdd() {
this.title = "添加项目"
this.formData = {}
this.DialogVisible = true;
if (this.$refs['addForm']) {
this.$refs['addForm'].resetFields()
}
},
openEdit(data) {
this.title = "编辑项目"
this.formData = data
this.DialogVisible = true;
},
async operation() {
let method = this.formData.id ? "/doEdit" : "/doAdd"
this.$refs["addForm"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + method, this.formData)
if(resp.code===0){
this.DialogVisible = false
this.notifySuccess(resp.msg)
this.pageData()
}else{
this.notifyWarning(resp.msg)
}
loading.close()
}
});
},
async doDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {
const resp = await $.get(loc() + "/doDelete", {id: row.id})
if(resp.code===0){
this.notifySuccess(resp.msg)
this.pageData()
}else{
this.notifyWarning(resp.msg)
}
}
}
});
},
},
created() {
this.pageData();
}
})
</script>
<!--#
}
#-->
@@ -1,208 +0,0 @@
<!--#
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
placeholder="选择年度"
type="year"
@change="doSearch"
style="width: 100%"
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 v-model="pageForm.projectId" placeholder="请选择项目名称"
style="width: 100%;"
clearable
@change="doSearch();"
filterable="true">
<el-option v-for="o in projectList"
:label="o.projectName"
:value="o.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">申报人:</div>
<div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入内容" @keyup.enter.native="doSearch">
<el-select slot="prepend" v-model="pageForm.searchName" 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">
<div class="search-item-label">申报工会:</div>
<div class="search-item-option">
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId"
style="width: 100%;"
clearable
@change="doSearch();"
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-input @keyup.enter.native="doSearch" clearable
placeholder="请输入申报金额"
style="width: 100%"
v-model="pageForm.subsidyAmount">
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">审批金额:</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入审批金额"
style="width: 100%"
v-model="pageForm.auditAmount">
</el-input>
</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="mini" type="primary" @click="doExport">申报表导出(全部)</el-button>
</template>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" ref="table">
<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">
</el-table-column>
<el-table-column label="操作" width="280px">
<template slot-scope="{row}">
<el-button size="mini" type="primary" @click="doExport(row)">申报表导出</el-button>
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
<el-button size="mini" type="danger" @click="doDelete(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<project-funding-info ref="viewInfo"></project-funding-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageForm:{
year:moment().format('YYYY'),
isAudit: 'false',
},
formData:{},
tableColumns:[
{label: '项目名称', prop: 'projectName', sortable: true},
{label: '申报工会', prop: 'unionName', sortable: true},
{label: '工会人数', prop: 'unionPeoNum', sortable: true},
{label: '工会主席', prop: 'unionLeader', sortable: true},
{label: '申报人', prop: 'username', sortable: true},
{label: '申报金额', prop: 'subsidyAmount', sortable: true},
{label: '审批金额', prop: 'auditAmount', sortable: true},
{label: '状态', prop: 'stateName', sortable: true},
{label: '申报日期', prop: 'auditTime', sortable: true},
],
unions:[],
projectList:[],
}
},
components:{
'project-funding-info': httpVueLoader('/components/projectfunding/projectInfo.vue'),
},
methods: {
openView(row){
this.$refs.guava.view()
this.$refs.viewInfo.showInfo(row.id)
},
async doDelete(row) {
const confirm = await this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.post('/platform/projectfunding/myDeclare/doDelete', {id: row.id})
if (resp.code === 0) {
this.$notify.success(resp.msg);
this.pageData();
} else {
this.$notify.warning(resp.msg);
}
}
},
async getProjectFunding(){
const resp = await $.get('/platform/projectfunding/manage/getProjectFunding')
if (resp.code === 0){
this.projectList = resp.data
this.pageForm.projectId=this.projectList[0].id
}
},
doExport(row){
if (row.id){
window.open(loc() + '/doExport?id=' + row.id)
}else {
const {year,subsidyAmount, auditAmount,projectId,unionId,searchName,searchKeyword} = this.pageForm
window.open(loc()+'/doExport?year='+ year +
'&subsidyAmount=' +(subsidyAmount ? subsidyAmount : '') +
'&auditAmount=' +(auditAmount ? auditAmount : '') +
'&projectId=' +projectId +
'&unionId=' +(unionId ? unionId : '') +
'&searchName=' +searchName +
'&searchKeyword=' +searchKeyword)
}
},
},
async created() {
this.unions = await getUnions();
await this.getProjectFunding();
this.pageData();
}
})
</script>
<!--#
}
#-->
@@ -1,205 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.inline-flex {
display: inline-flex;
}
.flexbox {
display: flex;
}
.flexbox .el-form-item {
width: 33.3%;
}
.el-form .el-select, .el-form .el-date-editor {
width: 100%;
}
.el-divider {
background-color: #409EFF;
}
.el-divider__text {
color: #409EFF;
}
.w-e-text-container {
height: 250px !important;
}
</style>
<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="选择年度"
type="year"
@change="doSearch"
style="width: 100%"
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 v-model="pageForm.projectId" placeholder="请选择项目名称"
style="width: 100%;"
clearable
@change="doSearch();"
filterable="true">
<el-option v-for="o in projectList"
:label="o.projectName"
:value="o.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">申报人:</div>
<div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入内容" @keyup.enter.native="doSearch">
<el-select slot="prepend" v-model="pageForm.searchName" 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">
<div class="search-item-label">申报工会:</div>
<div class="search-item-option">
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId"
style="width: 100%;"
clearable
@change="doSearch();"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname"
:value="item.id"></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></template>
</table-tool>
<el-table :data="tableData" :size="tableSize">
<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"
>
</el-table-column>
<el-table-column label="操作" width="300px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="doExport(row)">导出</el-button>
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.state<=1700" @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<project-funding-info ref="viewInfo"></project-funding-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unions:[],
pageForm:{
year:moment().format('YYYY'),
},
tableColumns:[
{label: '项目名称', prop: 'projectName', sortable: true},
{label: '申报工会', prop: 'unionName', sortable: true},
{label: '工会人数', prop: 'unionPeoNum', sortable: true},
{label: '工会主席', prop: 'unionLeader', sortable: true},
{label: '申报人', prop: 'username', sortable: true},
{label: '申报金额', prop: 'subsidyAmount', sortable: true},
{label: '审批金额', prop: 'auditAmount', sortable: true},
{label: '状态', prop: 'stateName', sortable: true},
{label: '申报日期', prop: 'auditTime', sortable: true},
],
projectList:[],
}
},
methods: {
openView(row){
this.$refs.guava.view()
this.$refs.viewInfo.showInfo(row.id)
},
openEdit(row){
sublime.jumpPagePjax('/platform/projectfunding/declare?id=' + row.id)
},
async doDelete(id) {
const confirm = await this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.post('/platform/projectfunding/myDeclare/doDelete', {id: id})
if (resp.code === 0) {
this.$notify.success(resp.msg);
this.pageData();
}else {
this.$notify.warning(resp.msg);
}
}
},
async getProjectFunding(){
const resp = await $.get('/platform/projectfunding/manage/getProjectFunding')
if (resp.code === 0){
this.projectList = resp.data
this.pageForm.projectId=this.projectList[0].id
}
},
doExport(row){
window.open('/platform/projectfunding/multifunctionQuery/doExport?id=' + row.id)
},
},
async created() {
this.unions = await getUnions();
await this.getProjectFunding();
this.pageData();
},
components:{
'project-funding-info': httpVueLoader('/components/projectfunding/projectInfo.vue'),
}
})
</script>
<!--#
}
#-->
@@ -1,223 +0,0 @@
<!--#
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="选择年度"
type="year"
@change="doSearch"
style="width: 100%"
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">
<div class="search-item-option">
<el-select v-model="pageForm.projectId" placeholder="请选择项目名称"
style="width: 100%;"
clearable
@change="doSearch();"
filterable="true">
<el-option v-for="o in projectList"
:label="o.projectName"
:value="o.id"></el-option>
</el-select>
</div>
</div>
</div>
<div class="search-item">
<div class="search-item-label">申报人:</div>
<div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入内容" @keyup.enter.native="doSearch">
<el-select slot="prepend" v-model="pageForm.searchName" 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">
<div class="search-item-label">申报工会:</div>
<div class="search-item-option">
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId"
style="width: 100%;"
clearable
@change="doSearch();"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname"
:value="item.id"></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" @sort-change="pageOrder" ref="table">
<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">
</el-table-column>
<el-table-column label="操作" width="200px">
<template slot-scope="{row}">
<el-button size="mini" :type="row.state>1700?null:'primary'"
@click="openView(row,row.state>1700)">
{{row.state>1700?'查看':'审核'}}
</el-button>
<el-button size="mini" type="danger" v-if="row.state>1700 && row.state<=1800"
@click="doRollBack(row)">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<project-funding-info ref="auditInfo">
<template #handle>
<el-tab-pane label="二级党组织审核" name="twoAudit">
<el-form :model="formData" label-suffix="" label-width="100px" ref="auditForm">
<el-form-item label="审核人">
${@shiro.getPrincipalProperty('username')}
</el-form-item>
<el-form-item label="审核时间">
{{moment().format('YYYY-MM-DD')}}
</el-form-item>
<el-form-item :rules="[{required: true, message: '请输入审核意见', trigger: ['blur']}]"
label="审核意见"
prop="twoOrganizationOpinion">
<el-input maxlength="300" rows="5" type="textarea"
v-model="formData.twoOrganizationOpinion"></el-input>
</el-form-item>
<!--<el-form-item label="签字" prop="twoOrganizationSignature" :rules="[{required: true, message: '请签字', trigger: ['change']}]">
<sign :qz.sync="formData.twoOrganizationSignature" prefix="twoOrganizationSignature"></sign>
</el-form-item>-->
</el-form>
<el-row class="mt20 text-center">
<el-button @click="doHandle(false)" type="danger">拒 绝</el-button>
<el-button @click="doHandle(true)" type="success">通 过</el-button>
</el-row>
</el-tab-pane>
</template>
</project-funding-info>
</template>
<template #view>
<project-funding-info ref="viewInfo"></project-funding-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageForm:{
year:moment().format('YYYY'),
isAudit: 'false',
},
formData:{},
tableColumns:[
{label: '项目名称', prop: 'projectName', sortable: true},
{label: '申报工会', prop: 'unionName', sortable: true},
{label: '工会人数', prop: 'unionPeoNum', sortable: true},
{label: '工会主席', prop: 'unionLeader', sortable: true},
{label: '申报人', prop: 'username', sortable: true},
{label: '申报金额', prop: 'subsidyAmount', sortable: true},
{label: '状态', prop: 'stateName', sortable: true},
{label: '申报日期', prop: 'auditTime', sortable: true},
],
unions:[],
projectList:[],
}
},
components:{
'project-funding-info': httpVueLoader('/components/projectfunding/projectInfo.vue'),
},
methods: {
openView(row, isView) {
if (isView) {
this.$refs.guava.view()
this.$refs.viewInfo.showInfo(row.id)
} else {
this.$refs.guava.edit()
this.$refs.auditInfo.showInfo(row.id, 'twoAudit')
this.formData = {
id: row.id,
twoOrganizationOpinion: null,
twoOrganizationSignature: null
}
}
},
async doHandle(res) {
const valid = await this.$refs['auditForm'].validate()
if (!valid) return
this.formData.state = res ? 1800 : 1750
const resp = await $.post('/platform/projectfunding/twoOrganization/doHandle', this.formData)
if (resp.code === 0) {
this.$refs.guava.index()
this.notifySuccess(resp.msg)
this.pageData()
}
},
async doRollBack(row){
const resp = await $.get('/platform/projectfunding/twoOrganization/doRollBack',{id:row.id,state:row.state})
if (resp.code === 0){
this.notifySuccess(resp.msg)
this.pageData()
}
},
async getProjectFunding(){
const resp = await $.get('/platform/projectfunding/manage/getProjectFunding')
if (resp.code === 0){
this.projectList = resp.data
this.pageForm.projectId=this.projectList[0].id
}
},
},
async created() {
this.unions = await getUnions();
await this.getProjectFunding();
this.pageData();
}
})
</script>
<!--#
}
#-->
@@ -1,262 +0,0 @@
<!--#
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="选择年度"
type="year"
@change="doSearch"
style="width: 100%"
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">
<div class="search-item-option">
<el-select v-model="pageForm.projectId" placeholder="请选择项目名称"
style="width: 100%;"
clearable
@change="doSearch();"
filterable="true">
<el-option v-for="o in projectList"
:label="o.projectName"
:value="o.id"></el-option>
</el-select>
</div>
</div>
</div>
<div class="search-item">
<div class="search-item-label">申报人:</div>
<div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入内容" @keyup.enter.native="doSearch">
<el-select slot="prepend" v-model="pageForm.searchName" 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">
<div class="search-item-label">申报工会:</div>
<div class="search-item-option">
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId"
style="width: 100%;"
clearable
@change="doSearch();"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname"
:value="item.id"></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" @sort-change="pageOrder" ref="table">
<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">
</el-table-column>
<el-table-column label="操作" width="200px">
<template slot-scope="{row}">
<el-button size="mini" :type="row.state>1800?null:'primary'"
@click="openView(row,row.state>1800)">
{{row.state>1800?'查看':'审核'}}
</el-button>
<el-button size="mini" type="danger" v-if="row.state>1800 && row.state<=1900"
@click="doRollBack(row)">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<project-funding-info ref="auditInfo">
<template #handle>
<el-tab-pane label="校工会审核" name="xghAudit">
<el-form :model="formData" label-suffix="" label-width="100px" ref="auditForm">
<el-form-item label="审核人">
${@shiro.getPrincipalProperty('username')}
</el-form-item>
<el-form-item label="审核时间">
{{moment().format('YYYY-MM-DD')}}
</el-form-item>
<el-row>
<el-col span="24">
<el-form-item :rules="[{required: true, message: '请输入审批金额', trigger: ['blur']}]"
label="审批金额"
prop="auditAmount">
<el-input clearable type="text" rows="3" v-model="formData.auditAmount"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col span="24">
<el-form-item label="获奖情况"
prop="unionAward">
<el-input maxlength="300" readonly rows="3" type="textarea"
v-model="unionAward"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item :rules="[{required: true, message: '请输入审核意见', trigger: ['blur']}]"
label="审核意见"
prop="xghOpinion">
<el-input clearable v-model="formData.xghOpinion"></el-input>
</el-form-item>
<!-- <el-form-item label="签字" prop="xghSignature" :rules="[{required: true, message: '请签字', trigger: ['change']}]">
<sign :qz.sync="formData.xghSignature" prefix="xghSignature"></sign>
</el-form-item>-->
</el-form>
<el-row class="mt20 text-center">
<el-button @click="doHandle(false)" type="danger">拒 绝</el-button>
<el-button @click="doHandle(true)" type="success">通 过</el-button>
</el-row>
</el-tab-pane>
</template>
</project-funding-info>
</template>
<template #view>
<project-funding-info ref="viewInfo"></project-funding-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageForm:{
year:moment().format('YYYY'),
isAudit: 'false',
},
formData:{
auditAmount:'',
},
tableColumns:[
{label: '项目名称', prop: 'projectName', sortable: true},
{label: '申报工会', prop: 'unionName', sortable: true},
{label: '工会人数', prop: 'unionPeoNum', sortable: true},
{label: '工会主席', prop: 'unionLeader', sortable: true},
{label: '申报人', prop: 'username', sortable: true},
{label: '申报金额', prop: 'subsidyAmount', sortable: true},
{label: '审批金额', prop: 'auditAmount', sortable: true},
{label: '状态', prop: 'stateName', sortable: true},
{label: '申报日期', prop: 'auditTime', sortable: true},
],
unions:[],
projectList:[],
unionAward:'',
}
},
components:{
'project-funding-info': httpVueLoader('/components/projectfunding/projectInfo.vue'),
},
methods: {
openView(row, isView) {
this.unionAward='';
if (isView) {
this.$refs.guava.view()
this.$refs.viewInfo.showInfo(row.id)
} else {
this.unionAward = row.award
this.$refs.guava.edit()
this.$refs.auditInfo.showInfo(row.id, 'xghAudit')
this.formData = {
id: row.id,
xghOpinion: null,
xghSignature: null,
auditAmount : null,
}
if (row.award.search("全国模范职工小家") !== -1){
this.formData.auditAmount = 8000;
}else if (row.award.search("总省工会模范职工小家") !== -1){
this.formData.auditAmount = 7000;
}else if (row.award.search("省教科文卫工会模范职工小家") !== -1){
this.formData.auditAmount = 6000;
}else if (row.award.search("校级模范职工小家") !== -1){
this.formData.auditAmount = 5000;
}else if (row.award.search("之家") !== -1){
this.formData.auditAmount = 4000;
}else{
this.formData.auditAmount = 3000;
}
}
},
async doHandle(res) {
const valid = await this.$refs['auditForm'].validate()
if (!valid) return
this.formData.state = res ? 1900 : 1850
const resp = await $.post('/platform/projectfunding/xghAudit/doHandle', this.formData)
if (resp.code === 0) {
this.$refs.guava.index()
this.notifySuccess(resp.msg)
this.pageData()
}
},
async doRollBack(row){
const resp = await $.get('/platform/projectfunding/twoOrganization/doRollBack',{id:row.id,state:row.state})
if (resp.code === 0){
this.notifySuccess(resp.msg)
this.pageData()
}
},
async getProjectFunding(){
const resp = await $.get('/platform/projectfunding/manage/getProjectFunding')
if (resp.code === 0){
this.projectList = resp.data
this.pageForm.projectId=this.projectList[0].id
}
},
},
async created() {
this.unions = await getUnions();
await this.getProjectFunding();
this.pageData();
}
})
</script>
<!--#
}
#-->