390 lines
20 KiB
HTML
390 lines
20 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<style></style>
|
|
|
|
<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>
|
|
<el-button icon="el-icon-s-promotion" type="primary" size="small"
|
|
@click="batchAudit">批量审核
|
|
</el-button>
|
|
</template>
|
|
</table-tool>
|
|
<el-table :data="tableData" align="center" header-align="center" :row-key="(row)=>{row.id}"
|
|
:size="tableSize"
|
|
@sort-change="pageOrder" @selection-change="(val)=>{this.batchSelection = val}">
|
|
<el-table-column
|
|
:selectable="(row)=>{return row.secretaryOpinions==null && row.resultCode!='notGive'}"
|
|
type="selection"
|
|
width="55"></el-table-column>
|
|
<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=='determineTypeCode'" scope="{row}">
|
|
{{row.determineTypeCode === 'emphasis' ? '重点' :row.determineTypeCode === 'ordinary'?
|
|
'普通':'否'}}
|
|
</template>
|
|
<template v-else-if="column.prop=='isConjoin'" scope="{row}">
|
|
{{row.isConjoin?'是':'否'}}
|
|
</template>
|
|
<template v-else-if="column.prop=='leaderAuditState'" scope="{row}">
|
|
{{row.secretaryOpinions?'已审核':'未审核'}}
|
|
</template>
|
|
<template v-else-if="column.prop=='secretaryAuditState'" scope="{row}">
|
|
{{row.secretaryOpinionsAgain?'已审核':'未审核'}}
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="300px">
|
|
<template scope="{row}">
|
|
<el-button size="mini" @click="openView(row)">
|
|
查看
|
|
</el-button>
|
|
<el-button type="primary" size="mini"
|
|
v-if="${@shiro.hasRole('principal')} && row.secretaryOpinions==null && row.resultCode!='notGive'"
|
|
@click="openAudit(row)">
|
|
审阅
|
|
</el-button>
|
|
<el-button type="primary" size="mini"
|
|
v-if="${@shiro.hasRole('secretary')} && row.secretaryOpinionsAgain==null && row.resultCode!='notGive'"
|
|
@click="openAudit(row)">
|
|
审阅
|
|
</el-button>
|
|
<el-button @click="rollback(row.id)" size="mini"
|
|
type="danger"
|
|
v-if="canRollBack(row)">
|
|
撤回
|
|
</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="proTableData.length > 1 ? '并案信息' : '提案信息'"></vi-title>
|
|
<el-form-item>
|
|
<el-table :data="proTableData" tooltip-effect="dark"
|
|
style="width: 100%">
|
|
<el-table-column align="left" header-align="left" prop="proposalCode"
|
|
label="提案编号"></el-table-column>
|
|
<el-table-column align="left" header-align="left" prop="username"
|
|
label="提案人"
|
|
show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="left" header-align="left" prop="proposalName" label="提案名称"
|
|
show-overflow-tooltip>
|
|
<template slot-scope="{row}">
|
|
<span @click="openView(row)"
|
|
style="color: #236eb4; cursor: pointer; text-decoration: underline">{{row.proposalName}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-form-item>
|
|
<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" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item prop="auditTime" label="审阅时间">
|
|
<el-input v-model="formData.auditTime" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<!-- <el-form-item prop="other" label="立案建议">-->
|
|
<!-- <el-radio-group v-model="formData.other">-->
|
|
<!-- <el-radio v-for="item in resultOptions" :label="item.code" border>{{item.name}}-->
|
|
<!-- </el-radio>-->
|
|
<!-- </el-radio-group>-->
|
|
<!-- </el-form-item>-->
|
|
|
|
<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 label="签  字" prop="sign" v-if="isSign()">
|
|
<sign prefix="proposal" :qz.sync="formData.sign"></sign>
|
|
</el-form-item>
|
|
|
|
<el-row style="margin: 40px 0;text-align: right">
|
|
<el-button type="primary" :disabled="submitDisabled" @click="doAudit">提 交</el-button>
|
|
</el-row>
|
|
|
|
</el-form>
|
|
</template>
|
|
</proposal-info>
|
|
</template>
|
|
|
|
<template #view>
|
|
<proposal-info ref="info"></proposal-info>
|
|
</template>
|
|
|
|
<el-dialog title="批量批阅" :visible.sync="batchDialog" width="70%" :close-on-click-modal="false" top="50px">
|
|
<vi-title title="已选提案"></vi-title>
|
|
<el-table :data="batchSelection" max-height="300" class="mb20">
|
|
<el-table-column type="index" label="序号"></el-table-column>
|
|
<el-table-column prop="proposalName" label="提案名称"></el-table-column>
|
|
<el-table-column prop="username" label="提案人"></el-table-column>
|
|
<el-table-column prop="resultName" label="立案结果"></el-table-column>
|
|
</el-table>
|
|
<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" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item prop="auditTime" label="审核时间">
|
|
<el-input v-model="formData.auditTime" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<!-- <el-form-item prop="other" label="立案建议">-->
|
|
<!-- <el-radio-group v-model="formData.other">-->
|
|
<!-- <el-radio v-for="item in resultOptions" :label="item.code" border>{{item.name}}-->
|
|
<!-- </el-radio>-->
|
|
<!-- </el-radio-group>-->
|
|
<!-- </el-form-item>-->
|
|
|
|
<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="primary" :disabled="submitDisabled" @click="doBatchAudit">提 交</el-button>
|
|
</el-row>
|
|
|
|
</el-form>
|
|
</el-dialog>
|
|
</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 {
|
|
proTableData: [],
|
|
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, checked: 0},
|
|
{prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0},
|
|
{prop: 'delegationName', label: '代表团', sortable: true, checked: 0},
|
|
{prop: 'resultName', label: '立案结果', sortable: true},
|
|
{prop: 'isConjoin', label: '是否并案'},
|
|
// {prop: 'determineTypeCode', label: '是否重点'},
|
|
{prop: 'stateName', label: '提案状态', sortable: true},
|
|
{prop: 'leaderAuditState', label: '校长审核', sortable: true},
|
|
{prop: 'secretaryAuditState', label: '书记审核', sortable: true},
|
|
],
|
|
batchDialog: false,
|
|
batchSelection: [],
|
|
isSign: () => {
|
|
return proposal.needSignState.map(v => v.stateCode).includes(330)
|
|
},
|
|
auditUrl: base + '/platform/proposal/transact/audit',
|
|
submitDisabled: false,
|
|
pageForm: {searchName: 'proposalName', isAudit: false},
|
|
formData: {
|
|
username: "${@shiro.getPrincipalProperty('username')}",
|
|
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
|
auditTime: moment().format('YYYY-MM-DD'),
|
|
opinion: '',
|
|
sign: '',
|
|
other: 'ordinary'
|
|
},
|
|
formRules: {
|
|
opinion: [{required: true, message: '请输入审核意见', trigger: ['blur', 'change']}],
|
|
other: [{required: true, message: '请选择立案意见', trigger: ['blur', 'change']}],
|
|
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
|
|
},
|
|
resultOptions: [],
|
|
isNode: false
|
|
}
|
|
},
|
|
methods: {
|
|
openView(row) {
|
|
this.$refs.guava.view()
|
|
this.$refs.info.openView(row.id)
|
|
},
|
|
async openAudit(row) {
|
|
this.formData.proposalId = row.id
|
|
this.$set(this.formData, "opinion", "同意该提案作为" + row.resultName)
|
|
const res = await $.get('/platform/proposal/common/findConjoinProposal', {proposalId: row.id})
|
|
this.proTableData = res.data.filter(o => {
|
|
return o.id !== row.id
|
|
})
|
|
this.proTableData.unshift(row)
|
|
this.$refs.guava.edit()
|
|
this.$refs.audit.openView(row.id)
|
|
|
|
|
|
},
|
|
async batchAudit() {
|
|
if (this.batchSelection.length === 0) {
|
|
this.$notify.warning('请选择需要批量审核的记录')
|
|
return
|
|
}
|
|
this.$set(this.formData, "opinion", "同意!")
|
|
this.batchDialog = true
|
|
},
|
|
async doAudit() {
|
|
this.submitDisabled = true
|
|
const valid = await this.$refs["auditForm"].validate()
|
|
if (valid) {
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
text: '正在提交...',
|
|
spinner: 'el-icon-loading',
|
|
background: COVER_LAYER_COLOR
|
|
});
|
|
|
|
const resp = await $.post(loc() + "/audit", {
|
|
audit: JSON.stringify(this.formData),
|
|
proposalIds: this.formData.proposalId,
|
|
sign: this.formData.sign,
|
|
})
|
|
loading.close()
|
|
this.submitDisabled = false
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.pageData()
|
|
this.$refs.guava.index()
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
async doBatchAudit() {
|
|
const valid = await this.$refs["auditForm"].validate()
|
|
if (valid) {
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
text: '正在提交...',
|
|
spinner: 'el-icon-loading',
|
|
background: COVER_LAYER_COLOR
|
|
})
|
|
let proposalIds = []
|
|
if (this.batchSelection && this.batchSelection.length > 0) {
|
|
proposalIds = this.batchSelection.map(v => v.id)
|
|
}
|
|
const resp = await $.post(loc() + "/audit", {
|
|
audit: JSON.stringify(this.formData),
|
|
proposalIds: JSON.stringify(proposalIds),
|
|
sign: this.formData.sign,
|
|
})
|
|
loading.close()
|
|
this.submitDisabled = false
|
|
if(resp.code===0){
|
|
this.notifySuccess(resp.msg)
|
|
this.pageData()
|
|
this.batchDialog = false
|
|
this.batchSelection = []
|
|
this.$refs.guava.index()
|
|
}else{
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
async rollback(id) {
|
|
const confirm = await this.$confirm('您确定要撤回吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (confirm === 'confirm') {
|
|
const resp = await $.post(loc() + '/rollback', {id})
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.doSearch()
|
|
} else {
|
|
this.notifyError(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
canRollBack(row) {
|
|
if (this.isNode) {
|
|
if ([this.nextStateCode, proposal.PRINCIPALREAD].includes(row.stateCode)) {
|
|
const hasPrincipalRole = "${@shiro.hasRole('principal')}"==='true'
|
|
const hasSecretaryRole = "${@shiro.hasRole('secretary')}"==='true'
|
|
if (hasPrincipalRole) {
|
|
return row.secretaryOpinions != null
|
|
} else if (hasSecretaryRole) {
|
|
return row.secretaryOpinionsAgain != null
|
|
} else {
|
|
return row.secretaryOpinions != null || row.secretaryOpinionsAgain != null
|
|
}
|
|
} else {
|
|
return false
|
|
}
|
|
|
|
return this.nextStateCode === row.stateCode
|
|
} else {
|
|
return row.secretaryOpinions && row.stateCode < proposal.CASEUNIT && row.resultCode !== 'notGive'
|
|
}
|
|
}
|
|
},
|
|
async created() {
|
|
this.isNode = await proposal.getProposalIsNodeState(proposal.PRINCIPALREAD)
|
|
this.nextStateCode = await proposal.getProposalNextNode(proposal.PRINCIPALREAD)
|
|
await proposal.initData(this)
|
|
this.resultOptions = await getDictByCode("proposal_result")
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#--> |