414 lines
20 KiB
HTML
414 lines
20 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.el-select {
|
|
width: 100%;
|
|
}
|
|
|
|
.pro_table {
|
|
padding-left: 65px;
|
|
}
|
|
</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 @click="oneKeyRemind" size="small" type="primary"-->
|
|
<!-- v-if="(${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')} && pageForm.isAudit==false)"-->
|
|
<!-- >一键提醒-->
|
|
<!-- </el-button>-->
|
|
</template>
|
|
</table-tool>
|
|
<el-table :data="tableData" align="center" header-align="center" row-key="replyId"
|
|
:tree-props="{children: 'children'}"
|
|
: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="column.align?column.align:'center'"
|
|
header-align="center"
|
|
v-for="column in tableColumns"
|
|
show-overflow-tooltip
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:width="column.width"
|
|
: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=='isLeaderAudit'" scope="{row}">
|
|
<!-- <template-->
|
|
<!-- v-if="!row.caseCheckNeedSecondAudit || (row.caseCheckNeedSecondAudit && row.replyNumber===1)">-->
|
|
<!-- <span v-if="row.isLeaderAudit" class="text-success">已审核</span>-->
|
|
<!-- <span v-else class="text-danger">未审核</span>-->
|
|
<!-- </template>-->
|
|
<!-- <template v-if="row.caseCheckNeedSecondAudit && row.replyNumber===2">-->
|
|
<!-- <span class="text-primary">未审核</span>-->
|
|
<!-- </template>-->
|
|
<!-- <template v-if="!row.caseCheckNeedSecondAudit && row.replyNumber===2">-->
|
|
<!-- <span class="text-primary">无需审核</span>-->
|
|
<!-- </template>-->
|
|
|
|
<span v-if="row.isLeaderAudit" class="text-success">已审核</span>
|
|
<span v-else class="text-danger">未审核</span>
|
|
|
|
|
|
</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>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="250px">
|
|
<template scope="{row}">
|
|
<el-button @click="openView(row)" size="mini">查看</el-button>
|
|
<el-button
|
|
v-if="(row.replyNumber===1 && !row.isLeaderAudit) || (!row.isLeaderAudit && row.replyNumber > 1)"
|
|
@click="openAudit(row)" type="primary" size="mini">审核
|
|
</el-button>
|
|
<!-- <el-button-->
|
|
<!-- v-if="[proposal.LEADERAUDIT, proposal.FEEDBACKSCORE].includes(row.stateCode)&&row.isLeaderAudit"-->
|
|
<!-- @click="rollback(row)" type="danger" size="mini">撤回-->
|
|
<!-- </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>
|
|
<div style="text-align: center;margin-top: -40px;"
|
|
v-if="formData.auditUnderTakeList && formData.auditUnderTakeList.length>1">
|
|
<span class="text-danger">温馨提醒:该提案的承办单位【{{formData.auditUnderTakeName}}】是由您来分管的,只需要审批一次即可。</span>
|
|
</div>
|
|
<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 label="审核意见" prop="leaderCheckOpinion">
|
|
<el-input type="textarea" v-model="formData.leaderCheckOpinion" rows="4" maxlength="1000"
|
|
placeholder="请填写您的审核意见"></el-input>
|
|
</el-form-item>
|
|
<el-form-item v-if="isSign()" prop="leaderSign" label="签  字">
|
|
<sign prefix="proposal" :qz.sync="formData.leaderSign"></sign>
|
|
</el-form-item>
|
|
|
|
|
|
<el-row style="margin: 40px 0;text-align: right">
|
|
<!-- <el-button v-if="isNode" type="danger" :disabled="submitDisabled" @click="doRollBack">返回修改-->
|
|
<!-- </el-button>-->
|
|
<el-button @click="$refs.guava.index()">取消</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>
|
|
<!--#include("/platform/proposal/include/proposal_include.js"){}#-->
|
|
|
|
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
components: {
|
|
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue?v='+new Date().getTime()),
|
|
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
|
|
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
|
|
},
|
|
data() {
|
|
return {
|
|
prevNode: "",
|
|
proTableData: [],
|
|
isSign: () => {
|
|
return proposal.needSignState.map(v => v.stateCode).includes(600)
|
|
},
|
|
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: 'isConjoin', label: '是否并案'},
|
|
// {prop: 'determineTypeCode', label: '是否重点'},
|
|
{prop: 'underTakeNameUser', label: '主管领导'},
|
|
{prop: 'underTakeName', label: '承办单位', sortable: false},
|
|
{prop: 'replyNumber', label: '办理次数', width: "80", sortable: false},
|
|
{prop: 'stateName', label: '提案状态', sortable: true},
|
|
{prop: 'isLeaderAudit', label: '审核状态', sortable: false},
|
|
],
|
|
// tableColumns: proposal_include.tableColumns.concat([{prop: 'underTakeName', label: '承办单位'},
|
|
// {prop: 'replyNumber', label: '办理次数'},
|
|
// {prop: 'isLeaderAudit', label: '审核状态'}]),
|
|
submitDisabled: false,
|
|
pageForm: {searchName: 'proposalName', isAudit: false},
|
|
formData: {
|
|
username: "${@shiro.getPrincipalProperty('username')}",
|
|
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
|
auditTime: moment().format('YYYY-MM-DD'),
|
|
leaderCheckOpinion: '同意该答复',
|
|
},
|
|
formRules: {
|
|
leaderCheckOpinion: [{required: true, message: '请输入审核意见', trigger: ['blur', 'change']}],
|
|
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}],
|
|
leaderSign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
|
|
},
|
|
isNode: false,
|
|
oneKeyRemindDialogVisible: false,
|
|
oneKeyTableData: []
|
|
}
|
|
},
|
|
methods: {
|
|
async oneKeyRemind() {
|
|
const {meetingId} = this.pageForm
|
|
if (!meetingId) {
|
|
this.notifyWarning('请先选择教代会届次')
|
|
return
|
|
}
|
|
const resp = await $.get(loc() + '/selectReadySendMsgUsers', {meetingId})
|
|
if (resp.code === 0) {
|
|
this.oneKeyRemindDialogVisible = true
|
|
this.oneKeyTableData = resp.data
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
|
|
},
|
|
async confirmOneKeyRemind() {
|
|
const selection = this.$refs.oneKeyRemindTable.selection
|
|
if (selection.length === 0) {
|
|
this.notifyWarning('请选择需要提醒的提案')
|
|
return
|
|
}
|
|
// if (this.oneKeyTableData.length === 0) {
|
|
// this.notifyWarning('没有可提醒的记录')
|
|
// return
|
|
// }
|
|
const confirm = await this.$confirm('确认要一键提醒未批阅的分管校领导吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (!confirm) return
|
|
const proposalIds = selection.map(v => v.id)
|
|
const resp = await $.post(loc() + '/oneKeyRemind', {proposalIds: JSON.stringify(proposalIds)})
|
|
if (resp.code === 0) {
|
|
this.oneKeyRemindDialogVisible = false
|
|
this.oneKeyTableData = []
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
},
|
|
async getLeaderAuditList(replyUnitId, proposalId) {
|
|
const {
|
|
data,
|
|
code,
|
|
msg
|
|
} = await $.get("/platform/proposal/transact/branchLeaderRead/getBranchLeaderAuditList", {
|
|
replyUnitId: replyUnitId,
|
|
proposalId: proposalId
|
|
})
|
|
if (code === 1) {
|
|
this.notifyWarning(msg)
|
|
}
|
|
return data
|
|
|
|
},
|
|
async rollback(row) {
|
|
const confirm = await this.$confirm('您确定要撤回吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (confirm === 'confirm') {
|
|
const resp = await $.post(loc() + '/rollback', {proposalId: row.id, replyUnitId: row.replyUnitId})
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.doSearch()
|
|
} else {
|
|
this.notifyError(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
dropdownCommand(command) {
|
|
const {type, data} = command
|
|
switch (type) {
|
|
case 'view':
|
|
this.openView(data);
|
|
break;
|
|
case 'audit':
|
|
this.openAudit(data);
|
|
break;
|
|
}
|
|
},
|
|
openView(row) {
|
|
this.$refs.guava.view()
|
|
this.$refs.info.openView(row.id)
|
|
},
|
|
async doRollBack(row) {
|
|
const confirm = await this.$confirm('返回该提案到承办单位办理,请确认?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (confirm) {
|
|
const resp = await $.post(loc() + '/doRollBack', {
|
|
proposalId: this.formData.proposalId,
|
|
replyId: this.formData.id,
|
|
replyUnitId: this.formData.replyUnitId,
|
|
leaderCheckOpinion: this.formData.leaderCheckOpinion
|
|
})
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.doSearch()
|
|
this.$refs.guava.index()
|
|
}
|
|
}
|
|
|
|
},
|
|
async openAudit(row) {
|
|
const {id, leaderCheckNumber, replyId, replyUnitId} = row
|
|
this.formData.proposalId = id
|
|
this.formData.id = replyId
|
|
this.formData.leaderCheckNumber = leaderCheckNumber ? leaderCheckNumber : 0
|
|
this.formData.replyUnitId = replyUnitId
|
|
|
|
const leaderAuditList = await this.getLeaderAuditList(replyUnitId, id)
|
|
if (leaderAuditList == null || leaderAuditList.length === 0) {
|
|
return
|
|
}
|
|
const auditUnderTakeIdList = leaderAuditList.map(v => v.underTakeId)
|
|
const replyUnit = await proposal.findOrganizer(row.id)
|
|
const auditUnderTakeList = replyUnit.filter(v => auditUnderTakeIdList.includes(v.replyUnitId))
|
|
const auditUnderTakeName = auditUnderTakeList.map(v => v.unitName).join(",")
|
|
this.$set(this.formData, "auditUnderTakeName", auditUnderTakeName)
|
|
this.$set(this.formData, "auditUnderTakeList", auditUnderTakeList)
|
|
|
|
|
|
const resp = await $.get('/platform/proposal/common/findConjoinProposal', {proposalId: row.id})
|
|
this.proTableData = resp.data.filter(o => {
|
|
return o.id !== row.id
|
|
})
|
|
this.proTableData.unshift(row)
|
|
|
|
|
|
this.$refs.guava.edit()
|
|
this.$refs.audit.openView(row.id)
|
|
if (this.$refs['auditForm']) {
|
|
this.$refs['auditForm'].resetFields()
|
|
}
|
|
},
|
|
async doAudit(flag) {
|
|
let formValid = true
|
|
this.$refs["auditForm"].validate(valid => {
|
|
formValid = valid
|
|
});
|
|
if (formValid) {
|
|
let a = this.formData.auditUnderTakeList.length > 1 ? '该提案的承办单位【' + this.formData.auditUnderTakeName + '】是由您来分管的,只需要审批一次即可' : '您确定提交吗?'
|
|
this.$confirm(a, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
this.submitDisabled = true
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
text: '正在提交...',
|
|
spinner: 'el-icon-loading',
|
|
background: COVER_LAYER_COLOR
|
|
});
|
|
|
|
const resp = await $.post(loc() + '/doAudit', {
|
|
reply: JSON.stringify(this.formData),
|
|
leaderSign: this.formData.leaderSign,
|
|
flag: flag
|
|
})
|
|
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()
|
|
}
|
|
}
|
|
},
|
|
async created() {
|
|
this.isNode = await proposal.getProposalIsNodeState(600)
|
|
await proposal.initData(this)
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#--> |