Files
UNION_NSI/target/classes/views/platform/proposal/transact/reply.html
T
2026-09-08 19:49:21 +08:00

554 lines
28 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<proposal-search :page="pageForm" @search="doSearch" title="办理"></proposal-search>
<el-card shadow="never" class="mt20">
<table-tool label="办理列表" :app="this">
<template #tips>
<!-- <span>温馨提醒:协</span>-->
</template>
<template #func>
<!-- <el-button @click="forwardReply" size="small" type="primary"-->
<!-- v-if="${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')}"-->
<!-- :disabled="proTableSelection.length===0">转交办理-->
<!-- </el-button>-->
<!-- <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 ref="proTable"
:data="tableData" align="center" header-align="center" row-key="replyId"
:tree-props="{children: 'children'}"
@selection-change="handleSelectionChange"
:size="tableSize" @sort-change="pageOrder">
<el-table-column
v-if="${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')}"
:selectable="(row)=>{return !row.isReply}"
reserve-selection
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="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=='isReply'" scope="{row}">
<span v-if="row.isReply" 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>
<template v-else-if="column.prop==='isForward'" scope="{row}">
<span v-if="row.isForward" class="text-primary">是({{row.proxyReplyUserName}}</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column :width="200" align="center" fixed="right"
header-align="center"
label="操作">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<!-- <el-button @click="doHandleExport(row)" type="primary" size="mini"-->
<!-- v-if="pageForm.isAudit==null">-->
<!-- 导出办理单-->
<!-- </el-button>-->
<el-button v-if="!row.isReply" type="primary" @click="openAudit(row)" size="mini">办理
</el-button>
<!-- <el-button @click="doReplyExport(row)" type="primary" size="mini"-->
<!-- v-if="!pageForm.isAudit&&row.isReply">导出回复书-->
<!-- </el-button>-->
<el-button
v-if="row.isReply && ([proposal.LEADERAUDIT, proposal.UNITREPLY].includes(row.stateCode)) && row.leaderId == null"
type="danger" @click="doRollBack(row)"
size="mini">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<!-- <template #edit_func>-->
<!-- <el-button :disabled="submitDisabled" @click="doReply(true)" type="primary">保 存</el-button>-->
<!-- <el-button :disabled="submitDisabled" @click="doReply(false)" type="primary">提 交</el-button>-->
<!-- </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" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="replyTime" label="办理时间">
<el-input v-model="formData.replyTime" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="implementState" label="落实情况">
<el-radio-group v-model="formData.implementState">
<!-- <el-radio label="已经落实" border>已经落实</el-radio>-->
<!-- <el-radio label="列入年度工作计划" border>列入年度工作计划</el-radio>-->
<!-- <el-radio label="暂缓落实" border>暂缓落实</el-radio>-->
<!-- <el-radio label="不能落实" border>不能落实</el-radio>-->
<el-radio v-for="item in implementStateOptions"
border
:label="item.code">
{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="replyContent" label="办理内容" class="is-required">
<div id="replyContentEditor"></div>
</el-form-item>
<el-form-item prop="files" label="附件上传">
<file-upload :files.sync="formData.replyFiles" card></file-upload>
</el-form-item>
<el-form-item v-if="isSign()" prop="replySign" label="签&emsp;&emsp;字">
<sign prefix="proposal" :qz.sync="formData.replySign"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doReply(true)" type="primary">保 存
</el-button>
<el-button :disabled="submitDisabled" @click="doReply(false)" type="primary">提 交
</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
<el-dialog :visible.sync="forwardDialog" title="转交办理" width="60%" :close-on-click-modal="false" top="50px">
<vi-title title="已选提案"></vi-title>
<el-table :data="proTableSelection" max-height="350">
<el-table-column prop="proposalCode" label="提案编号"></el-table-column>
<el-table-column prop="proposalName" label="提案名称"></el-table-column>
<el-table-column prop="underTakeName" label="承办单位"></el-table-column>
<el-table-column prop="undertakeType" label="承办类型"></el-table-column>
<el-table-column prop="isForward" label="转交情况">
<template scope="{row}">
<span v-if="row.isForward" class="text-primary">是({{row.proxyReplyUserName}}</span>
<span v-else></span>
</template>
</el-table-column>
</el-table>
<vi-title title="转交用户" class="mt10"></vi-title>
<el-select
v-model="forwardUserSelection"
clearable
filterable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="findSameUnitUser"
>
<el-option
v-for="item in forwardUserList"
:key="item.id"
:label="item.username+'('+item.loginname+')'"
:value="item.id">
</el-option>
</el-select>
<el-row type="flex" justify="end" class="mt20">
<el-button @click="forwardDialog = false">取消</el-button>
<el-button @click="confirmForwardReply" type="primary">确定</el-button>
</el-row>
</el-dialog>
<!-- <el-dialog :visible.sync="oneKeyRemindDialogVisible" title="一键提醒" width="60%" :close-on-click-modal="false"-->
<!-- top="50px">-->
<!-- <el-table :data="oneKeyTableData" ref="oneKeyRemindTable" size="small" max-height="500px">-->
<!-- <el-table-column type="selection" width="55"></el-table-column>-->
<!-- <el-table-column type="index" label="序号"></el-table-column>-->
<!-- <el-table-column prop="proposalCode" label="提案编号" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column prop="proposalName" label="提案名称" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column prop="unitName" label="承办单位" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column prop="unitFzrxm" label="承办单位负责人" show-overflow-tooltip></el-table-column>-->
<!-- </el-table>-->
<!-- <el-row type="flex" justify="end" class="mt20">-->
<!-- <el-button @click="oneKeyRemindDialogVisible = false">取消</el-button>-->
<!-- <el-button @click="confirmOneKeyRemind" type="primary">确定</el-button>-->
<!-- </el-row>-->
<!-- </el-dialog>-->
</div>
<script>
<!--#include("/platform/proposal/include/proposal_include.js"){}#-->
let E = window.wangEditor
let replyContentEditor = null
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'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() {
let replyContentBrief = (rule, value, callback) => {
if (!this.formData.replyContent || !dd3s.html2txt(this.formData.replyContent)) {
callback(new Error('请填写办理内容'));
} else {
callback();
}
};
return {
proTableData: [],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(500)
},
conJoinProposalName: "",
conJoinProposal: [],
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, checked: 0},
{prop: 'mannerCode', label: '提案方式编码', sortable: true, checked: 0},
{prop: 'mannerName', label: '提案方式', sortable: true, checked: 0},
{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: 'underTakeName', label: '承办单位', sortable: false},
{prop: 'undertakeType', label: '承办类型', sortable: false},
{prop: 'replyNumber', label: '办理次数', width: "80", sortable: false},
{prop: 'stateName', label: '提案状态', sortable: true},
// {prop: 'isForward', label: '转交办理', sortable: true},
// {prop: 'proxyReplyUserName', label: '转交办理人', sortable: true},
{prop: 'isReply', label: '办理状态', sortable: false},
],
submitDisabled: false,
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
replyTime: moment().format('YYYY-MM-DD'),
implementState: '',
replySign: '',
proposalName: '',
proposalCode: '',
createUser: ''
},
formRules: {
replyContent: [{validator: replyContentBrief, trigger: ['blur', 'change']}],
implementState: [{required: true, message: '请选择落实情况', trigger: ['blur', 'change']}],
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}],
replySign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}],
},
proTableSelection: [],
forwardDialog: false,
forwardUserList: [],
forwardUserSelection: null,
implementStateOptions: [],
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 {meetingId} = this.pageForm
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)
}
},
handleSelectionChange(val) {
this.proTableSelection = val
},
async findSameUnitUser(val) {
const resp = await $.get(loc() + '/findSameUnitUser/' + val)
if (resp.code === 0) {
this.forwardUserList = resp.data
// const d = resp.data.filter(x => {
// return !this.forwardUserList.map(v => v.id).includes(x.id)
// })
// this.forwardUserList = this.forwardUserList.concat(d)
}
},
forwardReply() {
this.forwardDialog = true
},
async confirmForwardReply() {
const params = this.proTableSelection.map(v => {
return {replyId: v.replyId, proposalId: v.id, proxyReplyUserId: this.forwardUserSelection}
})
const resp = await $.post(loc() + '/doForwardReply', {data: JSON.stringify(params)})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.$refs['proTable'].clearSelection()
this.doSearch()
this.forwardDialog = false
} else {
this.notifyError(resp.msg)
}
},
rollBack(row) {
if (row.isReply && ([proposal.LEADERAUDIT, proposal.UNITREPLY].includes(row.stateCode)) && row.leaderId == null) {
return true
}
},
doHandleExport(row) {
window.open(loc() + "/doHandleExport?proposalId=" + row.id)
},
doReplyExport(row) {
window.open(loc() + "/doReplyExport?proposalId=" + row.id)
},
async doRollBack(row) {
const confirm = await this.$confirm('正在撤回该提案的办理信息,请确认?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm) {
const resp = await $.post(loc() + "/doRollBack", {proposalId: row.id, replyUnitId: row.replyUnitId})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
}
}
},
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 checkCanReply(proposalId, underTakeId) {
return await $.get(loc() + '/checkCanReply', {proposalId, underTakeId})
},
async openAudit(row) {
const {id, replyNumber, replyId, replyUnitId, leaderId, resultCode, replyContent, implementState} = row
const resp = await this.checkCanReply(id, replyUnitId)
if (resp.data.valid !== 0) {
this.notifyWarning(resp.data.msg)
return
}
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)
const {data} = await $.post(loc() + "/getConJoinInfoList", {proposalId: id})
this.conJoinProposalName = data.map(v => v.proposalName).toString()
this.conJoinProposal = data
/*if (!leaderId && resultCode == "determine") {
this.$notify({
title: '警告',
message: '校领导暂未批示,领导批示后方可办理',
type: 'warning'
});
return
}*/
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
this.formData.proposalId = id
this.formData.id = replyId
this.formData.replyNumber = replyNumber
this.formData.replyContent = replyContent
this.formData.replyUnitId = replyUnitId
this.formData.proposalName = row.proposalName
this.formData.createUser = row.username
this.formData.proposalCode = row.proposalCode
this.formData.implementState = implementState
setTimeout(() => {
$("#replyContentEditor").html("")
replyContentEditor = new E("#replyContentEditor")
replyContentEditor.config.onchange = (html) => {
this.formData.replyContent = html
}
replyContentEditor.create()
if (replyContent) {
replyContentEditor.txt.html(replyContent)
}
}, 500)
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
},
async doReply(isSave) {
try {
const valid = await this.$refs["auditForm"].validate()
if (!valid) {
return
}
const msg = this.conJoinProposal.length > 1 ? '提案' + this.conJoinProposalName + '已并案您只需办理一次,请确认?' : '您是否提交该提案的办理内容,请确认?'
const confirm = await this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) {
return
}
this.submitDisabled = true
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
})
const formData = clone(this.formData)
formData.isSave = isSave
formData.replySign = formData.replySign
formData.reply = JSON.stringify(formData)
const resp = await $.post(loc() + "/audit", formData)
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 (e) {
console.log(e)
}
}
},
async created() {
await proposal.initData(this)
this.implementStateOptions = await getDictByCode('proposal_reply_result')
}
})
</script>
<!--#
}
#-->