first commit
This commit is contained in:
@@ -0,0 +1,221 @@
|
||||
<!--#
|
||||
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" :isadmin="isAdmin" :unionid="unionId"></jdh-two-search>
|
||||
|
||||
<jdh-two-table :page="pageForm" :table="tableData" :loading="tableLoading">
|
||||
<template #column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" 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 v-if="![100,300,500].includes(scope.row.audit_state)" :command="{type:'rollback',data:scope.row}">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="[100,300].includes(scope.row.audit_state)"
|
||||
:command="{type:'audit',data:scope.row}">
|
||||
审核
|
||||
</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 ref="audit" :label="title" handle>
|
||||
<template #handle>
|
||||
<el-form :model="formData" ref="auditForm" :rules="formRules" label-position="right"
|
||||
label-width="120px">
|
||||
|
||||
<vi-title title="批复信息"></vi-title>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="reply_username" label="批复人">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="reply_time" label="批复时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="opinion" label="批复意见">
|
||||
<el-input type="textarea" v-model="formData.opinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的批复意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="files" label="批复附件" class="is-required">
|
||||
<file-upload :max="1" :files.sync="formData.files">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式,上传数量为1个</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="item-button">
|
||||
<el-button type="danger" @click="doAudit(false)" style="margin-right: 20px">退  回
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doAudit(true)">通  过</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>
|
||||
var 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?v=1.0.0')
|
||||
},
|
||||
data() {
|
||||
const filesValid = (rule, value, callback) => {
|
||||
if (!this.formData.files || this.formData.files.length === 0) {
|
||||
callback(new Error('请上传批复附件'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
title: '审核',
|
||||
pageForm: {
|
||||
searchName: "meeting_name",
|
||||
isAudit: false
|
||||
},
|
||||
formData: {
|
||||
auditTime: moment().format('YYYY-MM-DD')
|
||||
},
|
||||
formRules: {
|
||||
opinion: [{required: true, message: '请填写审核意见', trigger: ['blur', 'change']}],
|
||||
files: [{validator: filesValid, trigger: ['blur', 'change']}],
|
||||
},
|
||||
isAdmin: "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true',
|
||||
unionId: "${@shiro.getPrincipalProperty('union').getId()}",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'audit') {
|
||||
this.openReview(data)
|
||||
} else if (type == 'rollback') {
|
||||
this.rollback(data)
|
||||
}
|
||||
},
|
||||
rollback(data) {
|
||||
this.$confirm('您确定要撤回吗!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
$.post(loc() + "/callback", {id: data.id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message({message: data.msg, type: 'success'});
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message({message: data.msg, type: 'warning'});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
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) {
|
||||
if (!this.formData.files || this.formData.files.length === 0) {
|
||||
this.$notify.warning({title: '提示', message: '请上传批复附件!'});
|
||||
return
|
||||
}
|
||||
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,
|
||||
files: JSON.stringify(this.formData.files)
|
||||
})
|
||||
loading.close()
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user