Files
UNION_HUTB/target/classes/views/platform/jdh/two/audit.html
T
2026-09-09 09:14:28 +08:00

175 lines
6.7 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
.item-button {
text-align: center;
}
.item-button .el-button {
padding: 12px 100px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<jdh-two-search :page="pageForm" @search="doSearch"></jdh-two-search>
<jdh-two-table :loading="tableLoading" :page="pageForm" :table="tableData">
<template #column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<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:'audit',data:scope.row}"
v-if="[100,300].includes(scope.row.audit_state)">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</template>
<template #pagination>
<!--#include("/layouts/pagination.html"){}#-->
</template>
</jdh-two-table>
</template>
<template #edit>
<jdh-two-info :label="title" handle ref="audit">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="auditForm">
<vi-title title="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="reply_username">
<el-input disabled value="${@shiro.getPrincipalProperty('username')}"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="reply_time">
<el-input disabled v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="opinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<el-form-item class="item-button">
<el-button @click="doAudit(false)" style="margin-right: 20px" type="danger">退&emsp;&emsp;
</el-button>
<el-button @click="doAudit(true)" type="primary">&emsp;&emsp;</el-button>
</el-form-item>
</el-form>
</template>
</jdh-two-info>
</template>
<template #view>
<jdh-two-info ref="view"></jdh-two-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'jdh-two-search': httpVueLoader('/components/jdh/JdhTwoSearch.vue'),
'jdh-two-table': httpVueLoader('/components/jdh/JdhTwoTable.vue?v=1.0.0'),
'jdh-two-info': httpVueLoader('/components/jdh/JdhTwoInfo.vue')
},
data() {
return {
title: '审核',
pageForm: {
searchName: "meeting_name",
isAudit: false
},
formData: {
auditTime: moment().format('YYYY-MM-DD')
},
formRules: {
opinion: [{required: true, message: '请填写审核意见', trigger: ['blur', 'change']}],
}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'audit') {
this.openReview(data)
}
},
openView(data) {
this.$refs.guava.view()
this.$refs.view.openView(data.id)
},
openReview(data) {
this.title = data.audit_state == 100 ? "院级党委审核" : "校工会审核"
this.formData.id = data.id
this.$refs.guava.edit()
this.$refs.audit.openView(data.id)
},
doAudit(flag) {
this.$refs["auditForm"].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() + "/doAudit", {
id: this.formData.id,
opinion: this.formData.opinion,
flag: flag
})
requestLaterFun(resp, async () => {
this.pageData()
this.$refs.guava.index()
this.$notify.success({title: '成功', message: resp.msg});
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
})
}
})
}
},
async created() {
this.pageData();
}
})
</script>
<!--#
}
#-->