241 lines
11 KiB
HTML
241 lines
11 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<template>
|
|
<proposal-search :page="pageForm" @search="doSearch"></proposal-search>
|
|
|
|
<el-card shadow="never" class="mt20">
|
|
<table-tool label="提案委员会秘书审核" :app="this">
|
|
<template #func>
|
|
<!--# if(@shiro.hasRole('jdhdbt01')){ #-->
|
|
<!-- <el-button v-if="!pageForm.isAudit" type="primary" size="small"-->
|
|
<!-- @click="batchExport">批量导出-->
|
|
<!-- </el-button>-->
|
|
<!--# } #-->
|
|
</template>
|
|
</table-tool>
|
|
<el-table :data="tableData" align="center" header-align="center" :row-key="(row)=>{row.id}"
|
|
:size="tableSize"
|
|
@sort-change="pageOrder">
|
|
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
|
|
<template scope="scope">
|
|
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
align="center"
|
|
header-align="center"
|
|
v-for="column in tableColumns"
|
|
show-overflow-tooltip
|
|
:label="column.label"
|
|
:width="column.width"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
>
|
|
<template v-if="column.prop=='proposalName'" scope="{row}">
|
|
<el-link type="primary" @click="openView(row)">{{row.proposalName}}</el-link>
|
|
</template>
|
|
<template v-else-if="column.prop=='auditState'" scope="{row}">
|
|
<span class="text-success" v-if="row.stateCode!=proposal.SECRETART">已审核</span>
|
|
<span class="text-primary" v-if="row.stateCode==proposal.SECRETART">待审核</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="200px">
|
|
<template scope="{row}">
|
|
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
|
<el-button v-if="[proposal.SECRETART].includes(row.stateCode)"
|
|
type="primary"
|
|
size="mini" @click="openAudit(row.id)">审核
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
|
|
</template>
|
|
|
|
<template #edit>
|
|
<proposal-info ref="audit" label="提案委员会秘书审核" handle>
|
|
<template #handle>
|
|
<el-form :model="formData" ref="auditForm" :rules="formRules" label-width="120px">
|
|
<vi-title title="审核信息"></vi-title>
|
|
<el-row gutter="20">
|
|
<el-col :span="12">
|
|
<el-form-item prop="username" label="审核人">
|
|
<el-input v-model="formData.username" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item prop="auditTime" label="审核时间">
|
|
<el-input v-model="formData.auditTime" readonly></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="1000"
|
|
placeholder="请填写您的审核意见"></el-input>
|
|
</el-form-item>
|
|
|
|
<el-form-item v-if="isSign()" prop="sign" label="签  字">
|
|
<sign prefix="proposal" :qz.sync="formData.sign"></sign>
|
|
</el-form-item>
|
|
|
|
<el-row style="margin: 40px 0;text-align: right">
|
|
<!-- <el-button type="danger" :disabled="submitDisabled" @click="doAudit(false)">退回</el-button>-->
|
|
<el-button type="primary" :disabled="submitDisabled" @click="doAudit(true)">通过</el-button>
|
|
</el-row>
|
|
|
|
</el-form>
|
|
</template>
|
|
</proposal-info>
|
|
</template>
|
|
|
|
<template #view>
|
|
<proposal-info ref="info"></proposal-info>
|
|
</template>
|
|
</guava>
|
|
</div>
|
|
|
|
<script>
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
components: {
|
|
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
|
|
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
|
|
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue'),
|
|
},
|
|
data() {
|
|
return {
|
|
isSign: () => {
|
|
return proposal.needSignState.map(v => v.stateCode).includes(proposal.DELEGATION)
|
|
},
|
|
tableColumns: [
|
|
{prop: 'proposalCode', label: '提案编号', width: "120", sortable: true, disabled: true},
|
|
{prop: 'proposalName', label: '提案名称', width: "300", disabled: true},
|
|
{prop: 'username', label: '提案人', disabled: true},
|
|
{prop: 'typeCode', label: '提案类型编码', sortable: true, checked: 0},
|
|
{prop: 'typeName', label: '提案类型', sortable: true},
|
|
{prop: 'mannerCode', label: '提案方式编码', sortable: true, checked: 0},
|
|
{prop: 'mannerName', label: '提案方式', sortable: true},
|
|
{prop: 'meetingName', label: '届次', sortable: true},
|
|
{prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0},
|
|
{prop: 'delegationName', label: '代表团', sortable: true},
|
|
{prop: 'stateName', label: '提案状态', sortable: true},
|
|
{prop: 'auditState', label: '审核状态', sortable: true},
|
|
],
|
|
submitDisabled: false,
|
|
pageForm: {searchName: 'proposalName', isAudit: false},
|
|
formData: {
|
|
username: "${@shiro.getPrincipalProperty('username')}",
|
|
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
|
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
opinion: '同意该提案!',
|
|
sign: ''
|
|
},
|
|
formRules: {
|
|
opinion: [{required: true, message: '请输入审核意见', trigger: ['blur', 'change']}],
|
|
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
batchExport() {
|
|
const {meetingId} = this.pageForm
|
|
if (!meetingId) {
|
|
this.$message.warning('请选择教代会届次')
|
|
return
|
|
}
|
|
window.open(loc() + '/batchExport?meetingId=' + meetingId)
|
|
},
|
|
dropdownCommand(command) {
|
|
const {type, data} = command
|
|
if (type === 'view') {
|
|
this.openView(data)
|
|
} else if (type === 'audit') {
|
|
this.openAudit(data.id)
|
|
}
|
|
},
|
|
openView(row) {
|
|
this.$refs.guava.view()
|
|
this.$refs.info.openView(row.id)
|
|
},
|
|
openAudit(id) {
|
|
this.formData.proposalId = id
|
|
this.$refs.guava.edit()
|
|
this.$refs.audit.openView(id)
|
|
|
|
if (this.$refs['auditForm']) {
|
|
this.$refs['auditForm'].resetFields()
|
|
}
|
|
},
|
|
async doAudit(flag) {
|
|
this.submitDisabled = true
|
|
let formValid = true
|
|
this.$refs["auditForm"].validate((valid) => {
|
|
formValid = valid
|
|
})
|
|
|
|
if (formValid) {
|
|
const flagText = flag ? '您是否要通过该提案?' : '该提案将退回至撰写人,修改后需重新邀请附议,请确认是否退回?'
|
|
this.$confirm(flagText, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
text: '正在提交...',
|
|
spinner: 'el-icon-loading',
|
|
background: COVER_LAYER_COLOR
|
|
});
|
|
|
|
if (!flag) {
|
|
if (this.formData.opinion === '同意该提案!') {
|
|
this.formData.opinion = '退回该提案!'
|
|
}
|
|
}
|
|
|
|
const resp = await $.post(loc() + '/audit', {
|
|
audit: JSON.stringify(this.formData),
|
|
sign: this.formData.sign,
|
|
isPass: flag,
|
|
proposalId: this.formData.proposalId
|
|
})
|
|
|
|
if (resp.code === 0) {
|
|
this.$notify.success({title: '成功', message: resp.msg});
|
|
this.pageData()
|
|
this.$refs.guava.index()
|
|
} else {
|
|
this.$notify.error({title: '失败', message: resp.msg});
|
|
}
|
|
loading.close()
|
|
this.submitDisabled = false
|
|
|
|
}).catch(() => {
|
|
this.submitDisabled = false
|
|
})
|
|
|
|
} else {
|
|
this.submitDisabled = false
|
|
}
|
|
}
|
|
},
|
|
async created() {
|
|
this.pageData()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#--> |