Files
UNION_HUTB/target/classes/views/platform/proposal/transact/branchLeaderRead.html
T
2026-09-09 09:14:28 +08:00

421 lines
21 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 class="mt20" shadow="never">
<table-tool :app="this" label="分管校领导审批立案">
<template #func>
<el-button @click="openSendMsg" icon="el-icon-message" size="small" type="primary"
v-if="pageForm.isAudit==false && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')})">
发送消息
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" :tree-props="{children: 'children'}"
@sort-change="pageOrder"
align="center"
header-align="center" row-key="pblaId">
<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
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='proposalName'">
<el-link @click="openView(row)" type="primary">{{ row.proposalName }}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='determineTypeCode'">
{{row.determineTypeCode === 'emphasis' ? '重点' :row.determineTypeCode === 'ordinary'?
'普通':'否'}}
</template>
<template scope="{row}" v-else-if="column.prop=='isConjoin'">
{{row.isConjoin?'是':'否'}}
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="200px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini">
查看
</el-button>
<el-button @click="openAudit(row)" size="mini"
type="primary"
v-if="!row.isAudit">
审核
</el-button>
<el-button @click="rollback(row)" 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 handle label="分管校领导审批立案" ref="audit">
<template #handle>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm">
<vi-title :title="proTableData && proTableData.length > 1 ? '并案信息' : '提案信息'"></vi-title>
<el-form-item>
<el-table :data="proTableData" style="width: 100%"
tooltip-effect="dark">
<el-table-column align="left" header-align="left" label="提案编号"
prop="proposalCode"></el-table-column>
<el-table-column align="left" header-align="left" label="提案人"
prop="username"
show-overflow-tooltip></el-table-column>
<el-table-column align="left" header-align="left" label="提案名称" prop="proposalName"
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 label="审核人" prop="username">
<el-input disabled v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<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="1000" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="sign" v-if="isSign()">
<sign :qz.sync="formData.sign" prefix="proposal" ref="sign"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button @click="doAudit" type="primary">提 交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
<el-dialog :visible.syn="msgDialog" title="发送消息提醒">
<el-table :data="receiverSmsUserList" max-height="600">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="姓名" prop="username"></el-table-column>
<el-table-column label="工号" prop="loginname"></el-table-column>
<el-table-column label="手机号" prop="mobile"></el-table-column>
</el-table>
<el-row class="mt20" justify="end" type="flex">
<el-button @click="msgDialog=false">取消</el-button>
<el-button :disabled="receiverSmsUserList.length===0" @click="doSend" type="primary">确定</el-button>
</el-row>
</el-dialog>
</guava>
</div>
<script>
<!--#include("/platform/proposal/include/proposal_include.js"){}#-->
const 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: 'oldProposalCode', label: '草案编号', width: "120", checked: 0, sortable: true,},
{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: 'underTakeNameUser', label: '分管校领导'},
{prop: 'stateName', label: '提案状态', sortable: true},
{prop: 'underTakeNames', label: '承办单位', sortable: true},
{prop: 'undertakeType', label: '承办类型', sortable: true},
],
// tableColumns: proposal_include.tableColumns.concat([{prop:'underTakeNames',label:'承办单位'}]),
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(320)
},
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',
proposalName: '',
proposalCode: '',
createUser: ''
},
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,
nextStateCode: null,
msgDialog: false,
receiverSmsUserList: []
}
},
methods: {
async openSendMsg() {
this.msgDialog = true
const resp = await $.post(loc() + "/findReceiverSmsUserList", {meetingId: this.pageForm.meetingId})
if (resp.code === 0) {
this.msgDialog = true
this.receiverSmsUserList = resp.data
} else {
this.$notify.error({title: '失败', message: resp.msg});
}
},
async doSend() {
const confirm = await this.$confirm('此操作将会给承办单位分管领导发送消息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + "/doSend", {meetingId: this.pageForm.meetingId})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
})
}
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openAudit(row) {
this.formData.proposalId = row.id
this.formData.underTakeId = row.underTakeId
this.formData.proposalName = row.proposalName
this.formData.createUser = row.username
this.formData.proposalCode = row.proposalCode
const branchLeaderAuditList = await this.getBranchLeaderAuditList(row.underTakeId, row.id)
const auditUnderTakeIdList = branchLeaderAuditList.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 opinion = await this.getUnderTakeOpinion(row.underTakeId)
this.$set(this.formData, "opinion", "同意该提案,请" + auditUnderTakeName + "认真研究办理该提案!")
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 getBranchLeaderAuditList(replyUnitId, proposalId) {
const {data} = await $.get(loc() + "/getBranchLeaderAuditList", {
replyUnitId: replyUnitId,
proposalId: proposalId
})
return data
},
async getUnderTakeOpinion(underTakeId) {
const resp = await $.get(loc() + '/getUnderTakeName', {underTakeId})
return "同意该提案,请" + resp.data + "认真研究办理该提案!"
},
async batchAudit() {
if (this.batchSelection.length === 0) {
this.$notify.warning('请选择需要批量审核的记录')
return
}
this.formData.opinion = null
this.batchDialog = true
},
async doAudit() {
this.submitDisabled = true
const valid = await this.$refs["auditForm"].validate()
if (valid) {
let a = this.formData.auditUnderTakeList.length > 1 ? '该提案的承办单位【' + this.formData.auditUnderTakeName + '】是由您来分管的,只需要审批一次即可' : '您是否提交审核意见?'
const confirm = await this.$confirm(a, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + "/putSuggestion", {
audit: JSON.stringify(this.formData),
sign: this.formData.sign,
underTakeId: this.formData.underTakeId
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
})
}
}
},
async doBatchAudit() {
const valid = await this.$refs["auditForm"].validate()
if (valid) {
const confirm = await this.$confirm('您是否提交审核意见?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm) {
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() + "/putSuggestion", {
audit: JSON.stringify(this.formData),
proposalIds: JSON.stringify(proposalIds),
sign: this.formData.sign,
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.batchDialog = false
this.batchSelection = []
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
this.submitDisabled = false
})
}
}
},
async rollback(row) {
const confirm = await this.$confirm('您确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.post(loc() + '/rollback', {proposalId: row.id, underTakeId: row.underTakeId})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyError(resp.msg)
}
}
},
canRollBack(row) {
if (this.isNode) {
return row.isAudit && [this.nextStateCode, proposal.BRANCHLEADERREAD].includes(row.stateCode)
} else {
return row.isAudit && row.stateCode < proposal.CASEUNIT && row.resultCode !== 'notGive'
}
},
},
async created() {
this.isNode = await proposal.getProposalIsNodeState(proposal.BRANCHLEADERREAD)
this.nextStateCode = await proposal.getProposalNextNode(proposal.BRANCHLEADERREAD)
await proposal.initData(this)
this.resultOptions = await getDictByCode("proposal_result")
}
})
</script>
<!--#
}
#-->