first commit

This commit is contained in:
2026-09-09 09:14:28 +08:00
commit 5343198112
5199 changed files with 1052895 additions and 0 deletions
@@ -0,0 +1,278 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.query-row {
height: 70px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
.query-row:not(:last-child) {
border-bottom: 1px dashed rgb(230, 230, 230);
}
.query-row-title {
width: 120px;
}
.el-table-container {
padding-top: 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">教代会:</div>
<div class="search-item-option">
<el-select @change="meetingChange" filterable placeholder="请选择教代会"
style="width: 80%" v-model="pageForm.meetingId">
<el-option
:label="item.jdhallname"
:value="item.id"
v-for="item in meetingOptions">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label"></div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 90%" v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend" style="width: 110px;"
v-model="pageForm.searchName">
<el-option label="提案名称" value="proposalName"></el-option>
<el-option label="编号" value="proposalCode"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label"></div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 90%" v-model="pageForm.searchKeyword2">
<el-select placeholder="查询类型" slot="prepend" style="width: 100px;"
v-model="pageForm.searchName2">
<el-option label="提案人" value="su.username"></el-option>
<!-- <el-option label="附议人" value="seconded.username"></el-option>-->
</el-select>
</el-input>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt20" shadow="never">
<table-tool :app="this" label="提案信息">
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" align="center"
header-align="center"
row-key="id"
>
<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'?'是':'否'}}
</template>
<template scope="{row}" v-else-if="column.prop=='isConjoin'">
{{row.isConjoin?'是':'否'}}
</template>
</el-table-column>
<el-table-column fixed="right" header-align="center" label="操作"
label="操作" width="130px">
<template scope="{row}">
<el-button @click="oneProposalExport(row.id)" icon="el-icon-printer" size="mini"
type="primary">导出提案
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
resultOptions: [],
typeOptions: [],
meetingOptions: [],
stateOptions: [],
delegationOptions: [],
unionOptions: [],
unitOptions: [],
pageForm: {
searchName: "proposalName",
searchName2: "su.username",
searchKeyword2: '',
stateCode: '',
meetingId: '',
delegationId: '',
proposalResult: [],
proposalTypes: [],
levyStates: []
},
tableColumns: [
{prop: 'oldProposalCode', label: '草案编号', width: "120", checked: 0},
{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: 'underTakeNames', label: '承办单位', sortable: true},
{prop: 'isConjoin', label: '是否并案', sortable: true},
{prop: 'determineTypeCode', label: '是否重点', sortable: true},
{prop: 'stateName', label: '提案状态', sortable: true}
],
levyAuditOptions: [
{label: '未提交', value: 0},
{label: '未附议', value: 1},
{label: '附议中', value: 2},
{label: '待团长审核', value: 3},
{label: '团长已审核', value: 4},
]
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue'),
},
methods: {
oneProposalExport(id) {
window.location.href = "/platform/proposal/statistics/summary/oneProposalExport?proposalId=" + id
},
async meetingChange(val) {
this.pageForm.delegationId = null
this.delegationOptions = await getDelegation(val)
this.doSearch()
},
async delegationChange(val) {
this.pageForm.unionId = null
this.unionOptions = await getUnions(val)
this.doSearch()
},
async unionChange(val) {
this.pageForm.unitId = null
this.unitOptions = await getUnits(val)
this.doSearch()
},
checkProposalResult(result) {
let idx = this.pageForm.proposalResult.indexOf(result)
if (idx !== -1) {
this.pageForm.proposalResult.splice(idx, 1)
} else {
this.pageForm.proposalResult.push(result)
}
this.doSearch()
},
checkProposalType(type) {
let idx = this.pageForm.proposalTypes.indexOf(type)
if (idx !== -1) {
this.pageForm.proposalTypes.splice(idx, 1)
} else {
this.pageForm.proposalTypes.push(type)
}
this.doSearch()
},
checkLevyState(type) {
this.pageForm.levyStates = [type]
// let idx = this.pageForm.levyStates.indexOf(type)
// if (idx !== -1) {
// this.pageForm.levyStates.splice(idx, 1)
// } else {
// this.pageForm.levyStates.push(type)
// }
this.doSearch()
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.proposalTypes = JSON.stringify(pageForm.proposalTypes)
pageForm.proposalResult = JSON.stringify(pageForm.proposalResult)
pageForm.levyStates = JSON.stringify(pageForm.levyStates)
$.post(loc() + "/pageData", pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code === 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
}
},
async created() {
this.meetingOptions = await getAllJdh()
this.pageForm.meetingId = this.meetingOptions.length ? this.meetingOptions[0].id : ''
this.stateOptions = await getOpenProposalState()
this.typeOptions = await getProposalType()
this.resultOptions = await getDictOptions("proposal_result")
this.delegationOptions = await getDelegation(this.pageForm.meetingId)
this.unionOptions = await getUnions(null)
this.unitOptions = await getUnits(null)
this.pageData();
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,421 @@
<!--#
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>
<!--#
}
#-->
@@ -0,0 +1,745 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
.el-dialog__body {
padding: 20px 30px 1px 30px;
}
.pro_table {
padding-left: 65px;
}
.el-table::before {
height: 0;
}
.el-table__empty-block {
background: none;
min-height: 50px;
}
.el-table__empty-text {
position: inherit;
}
.cell {
width: 100% !important;
font-size: 14px;
}
</style>
<div id="app" v-cloak>
<guava @vchange="vChange" 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 :disabled="multipleSelection && multipleSelection.length >=2 ? false : true"
@click="mergeAudit"
size="mini" type="primary" v-if="!pageForm.isAudit">并案审核
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :row-key="(row)=>{row.id}" :size="tableSize"
@selection-change="handleSelectionChange"
@sort-change="pageOrder" align="center" header-align="center"
ref="multipleTable">
<el-table-column
:selectable="(row) => { return [proposal.CASE].includes(row.stateCode) }" type="selection"
v-if="!pageForm.isAudit"
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'"
:label="column.label"
:min-width="column.width"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
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=='isConjoin'">
<span :style="row.isConjoin === 1 ? 'color: #236eb4' : ''">{{[proposal.CASE].includes(row.stateCode) ? '暂无' : row.isConjoin === 1 ? '是' : '否'}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='auditState'">
<span v-if="![proposal.CASE].includes(row.stateCode)">已审核</span>
<span v-else>待审核</span>
</template>
<template scope="{row}" v-else-if="column.prop=='resultName'">
<el-link type="primary">
{{row.resultName ? row.resultName:'暂未审核'}}
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='laLevelName'">
<span>
{{[proposal.CASE].includes(row.stateCode) ? '暂无' : !row.determineTypeCode ? '否' : row.determineTypeCode === 'emphasis' ? '重点' : '普通'}}
</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="220px">
<template scope="{row}">
<el-button @click="mergeIndex = 0; openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="mergeIndex = 0; openAudit(row.id,row)" size="mini"
type="primary"
v-if="[proposal.CASE].includes(row.stateCode)">
审核
</el-button>
<!--<el-button type="primary" size="mini"
v-if="row.resultCode=='notGive'"
@click="doExport(row)">
导出
</el-button>-->
<el-button @click="openEdit(row)" size="mini"
type="primary"
v-if="![proposal.CASE].includes(row.stateCode) && row.canEdit">
编辑
</el-button>
<el-button @click="revoke(row)" size="mini"
type="danger"
v-if="![proposal.CASE].includes(row.stateCode) && row.canEdit">
撤回
</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="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="立案结果" prop="resultCode">
<el-radio-group @change="resultCodeChange" v-model="formData.resultCode">
<el-radio :label="item.code" border v-for="item in resultOptions">
{{item.name}}
</el-radio>
</el-radio-group>
<template v-if="formData.resultCode === 'determine'">
<el-radio label="emphasis" v-model="formData.determineTypeCode">重点</el-radio>
<el-radio label="ordinary" v-model="formData.determineTypeCode">普通</el-radio>
</template>
</el-form-item>
<!-- <el-form-item prop="determineTypeCode" label=""-->
<!-- v-if="formData.resultCode === 'determine'">-->
<!-- <el-radio v-model="formData.determineTypeCode" label="emphasis">重点提案</el-radio>-->
<!-- <el-radio v-model="formData.determineTypeCode" label="ordinary">普通提案</el-radio>-->
<!-- </el-form-item>-->
</el-col>
<el-col :span="12">
<el-form-item label="提案类型" prop="typeId">
<el-select clearable filterable placeholder="提案类型"
v-model="formData.typeId">
<el-option
:key="item.id"
:label="item.typeName"
:value="item.id"
v-for="item in typeOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="理由列表" prop="noFilingReason" v-if="formData.resultCode=='notGive'">
<el-select
@change="formData.opinion = '';formData.opinion='经提案委员会审理,该提案不予立案。'+formData.noFilingReason"
clearable filterable placeholder="请选择理由列表"
v-model="formData.noFilingReason">
<el-option :key="item"
:label="item"
:value="item"
v-for="item in noFilingReason">
</el-option>
</el-select>
</el-form-item>
<el-row gutter="20" v-if="formData.resultCode!='notGive'">
<el-col :span="12">
<el-form-item label="主办单位" prop="hostUnit">
<el-select clearable filterable placeholder="请选择主办单位" v-model="formData.hostUnit">
<el-option :key="item.id"
:label="item.unitName"
:value="item.id"
v-for="item in unitOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="主办单位领导" v-if="formData.hostUnit">
<el-input readonly v-model="hostUnitLeader"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20" v-if="formData.resultCode!='notGive'">
<el-col :span="12">
<el-form-item label="协办单位" prop="helpUnit">
<el-select clearable filterable multiple placeholder="请选择协办单位"
v-model="formData.helpUnit">
<el-option :key="item.id"
:label="item.unitName"
:value="item.id"
v-for="item in unitOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="协办单位领导" v-if="formData.helpUnit && formData.helpUnit.length>0">
<el-input readonly v-model="helpUnitLeader"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="opinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<!--<el-form-item v-if="isSign()" prop="sign" label="签&emsp;&emsp;字">
<sign prefix="proposal" :qz.sync="formData.sign"></sign>
</el-form-item>-->
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doAudit(0)" type="primary">提交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
<el-dialog
:title="diatitle" :visible.sync="dialogVisible" @closed="diaClosed"
ref="dialog"
top="5.3vh" width="70%">
<!--并案信息-->
<vi-title :title="proTableData.length > 1 ? '并案信息' : '提案信息'" style="margin-bottom: 16px !important;"></vi-title>
<el-table :data="proTableData" class="pro_table" size="small" style="width: 100%" tooltip-effect="dark">
<el-table-column align="left" header-align="left" label="提案编号" prop="proposalCode"
width="200"></el-table-column>
<el-table-column align="left" header-align="left" label="提案人" prop="username" show-overflow-tooltip
width="200"></el-table-column>
<el-table-column align="left" header-align="left" label="提案名称" prop="proposalName" show-overflow-tooltip>
<template slot-scope="{row}">
<span @click="openDialog(row)" style="color: #236eb4; cursor: pointer; text-decoration: underline">{{row.proposalName}}</span>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button @click="delProposal(scope.row, scope.$index)" size="mini" type="danger"
v-if="editRow.id !== scope.row.id">移除
</el-button>
</template>
</el-table-column>
</el-table>
<!--审核信息-->
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm" style="margin-top: 20px">
<vi-title style="margin-bottom: 16px !important;" title="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="立案结果" prop="resultCode">
<el-radio-group @change="resultCodeChange" v-model="formData.resultCode">
<el-radio :label="item.code" border v-for="item in resultOptions">
{{item.name}}
</el-radio>
</el-radio-group>
<template v-if="formData.resultCode === 'determine'">
<el-radio label="emphasis" v-model="formData.determineTypeCode">重点
</el-radio>
<el-radio label="ordinary" v-model="formData.determineTypeCode">普通
</el-radio>
</template>
</el-form-item>
<!-- <el-form-item prop="determineTypeCode" label=""-->
<!-- v-if="formData.resultCode === 'determine'">-->
<!-- <el-radio v-model="formData.determineTypeCode" label="emphasis">重点提案</el-radio>-->
<!-- <el-radio v-model="formData.determineTypeCode" label="ordinary">普通提案</el-radio>-->
<!-- </el-form-item>-->
</el-col>
<el-col :span="12">
<el-form-item label="提案类型" prop="typeId">
<el-select clearable filterable placeholder="提案类型"
v-model="formData.typeId">
<el-option
:key="item.id"
:label="item.typeName"
:value="item.id"
v-for="item in typeOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="理由列表" prop="noFilingReason" v-if="formData.resultCode=='notGive'">
<el-select @change="formData.opinion = '';formData.opinion='经提案委员会审理,该提案不予立案。'+formData.noFilingReason"
clearable filterable placeholder="请选择理由列表"
v-model="formData.noFilingReason">
<el-option :key="item"
:label="item"
:value="item"
v-for="item in noFilingReason">
</el-option>
</el-select>
</el-form-item>
<el-row gutter="20" v-if="formData.resultCode!='notGive'">
<el-col :span="12">
<el-form-item label="主办单位" prop="hostUnit">
<el-select clearable filterable placeholder="请选择主办单位" v-model="formData.hostUnit">
<el-option :key="item.id"
:label="item.unitName"
:value="item.id"
v-for="item in unitOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="主办单位领导" v-if="formData.hostUnit">
<el-input readonly="" v-model="hostUnitLeader"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20" v-if="formData.resultCode!='notGive'">
<el-col :span="12">
<el-form-item label="协办单位" prop="helpUnit">
<el-select clearable filterable multiple placeholder="请选择协办单位"
v-model="formData.helpUnit">
<el-option :key="item.id"
:label="item.unitName"
:value="item.id"
v-for="item in unitOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="协办单位领导" v-if="formData.helpUnit && formData.helpUnit.length>0">
<el-input readonly="" v-model="helpUnitLeader"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="opinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<!--<el-form-item v-if="isSign()" prop="sign" label="签&emsp;&emsp;字">
<sign prefix="proposal" :qz.sync="formData.sign"></sign>
</el-form-item>-->
<el-row style="margin: 40px 0;text-align: right">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button :disabled="submitDisabled" @click="doAudit(1)" type="primary">提交</el-button>
</el-row>
</el-form>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
computed: {
hostUnitLeader() {
const hostUnit = this.unitOptions.find(v => v.id === this.formData.hostUnit)
return hostUnit ? hostUnit.leader : '无'
},
helpUnitLeader() {
const helpUnits = this.unitOptions.filter(v => this.formData.helpUnit.includes(v.id)).map(v => {
return v.leader ? v.leader : '无'
})
return helpUnits && helpUnits.length > 0 ? helpUnits.toString() : '无'
}
},
data() {
return {
buttonIndex: 0,
proTableData: [],
diatitle: '',
mergeIndex: 0,
dialogVisible: false,
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(proposal.CASE)
},
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: '是否并案', sortable: true},
{prop: 'laLevelName', label: '是否重点', sortable: true},
{prop: 'stateName', label: '提案状态', sortable: true},
{prop: 'auditState', label: '审核状态', sortable: true},
],
typeOptions: [],
noFilingReason: [],
config: {},
unitOptions: [],
resultOptions: [],
submitDisabled: false,
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
flag: true,
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
resultCode: 'determine',
hostUnit: '',
helpUnit: '',
opinion: '经提案委员会审理,该提案确定立案。',
typeId: '',
determineTypeCode: 'ordinary'
},
formRules: {
resultCode: [{required: true, message: '请选择立案结果', trigger: ['blur', 'change']}],
hostUnit: [{required: true, message: '请选择主办单位', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '请输入审核意见', trigger: ['blur', 'change']}],
typeId: [{required: true, message: '请输入提案类型', trigger: ['blur', 'change']}],
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
},
multipleSelection: [],
editRow: {},
conJoinProposal: [],
}
},
methods: {
diaClosed() {
this.editRow = ''
this.formData = {
flag: true,
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
resultCode: 'determine',
hostUnit: '',
helpUnit: '',
opinion: '经提案委员会审理,该提案确定立案。',
typeId: '',
determineTypeCode: ''
}
},
async delProposal(row, index) {
if ([proposal.CASE].includes(row.stateCode)) {
if (this.multipleSelection.length <= 2) {
this.$notify.warning({title: '警告', message: '并案审核时提案个数最少为2个'});
return
}
this.proTableData = this.multipleSelection.filter(o => o.id !== row.id)
this.$refs.multipleTable.toggleRowSelection(row);
} else {
if (this.proTableData.length <= 2) {
this.$notify.warning({title: '警告', message: '并案审核时提案个数最少为2个'});
return
}
const confirm = await this.$confirm('是否把' + row.proposalName + '移除并案,请确认!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
this.proTableData = this.proTableData.filter(o => o.id !== row.id)
}
}
},
async openEdit(row) {
this.diatitle = '编辑'
this.buttonIndex = 2
this.editRow = row
const resp = await $.get('/platform/proposal/common/findConjoinProposal', {proposalId: row.id})
this.conJoinProposal = resp.data
this.proTableData = resp.data.filter(o => {
return o.id !== row.id
})
this.proTableData.unshift(row)
const re = await $.get(loc() + '/backShow', {proposalId: row.id})
this.formData.hostUnit = re.data.hostUnitId
this.formData.helpUnit = re.data.helpUnitIds
this.formData.username = re.data.caseAuditRecord.username
this.formData.auditTime = re.data.caseAuditRecord.auditTime
if (re.data.caseAuditRecord.opinion) {
this.formData.opinion = re.data.caseAuditRecord.opinion
}
this.formData.resultCode = re.data.basic_info.resultCode
this.formData.determineTypeCode = re.data.basic_info.determineTypeCode
this.formData.typeId = re.data.basic_info.typeId
this.formData.typeId = re.data.basic_info.typeId
this.dialogVisible = true
},
async revoke(o) {
const str = o.isConjoin === 0 ? '您确定要撤销吗?' : '此操作将撤销合并的提案,您确定要撤销吗?'
const confirm = await this.$confirm(str, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.post(loc() + '/revoke', {proposalId: o.id})
if (resp.code === 0) {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
} else {
this.$notify.error({title: '失败', message: resp.msg});
}
}
},
vChange(value) {
if (value.newValue === 'index' && this.multipleSelection.length > 0 && this.mergeIndex === 1) {
this.dialogVisible = true
}
},
openDialog(item) {
this.openView(item)
this.dialogVisible = false
},
mergeAudit() {
this.diatitle = '并案审核'
this.buttonIndex = 1
if (this.multipleSelection && this.multipleSelection.length === 0) {
this.$notify.warning({title: '警告', message: '并案审核需要先在多选框中选择提案'});
return
}
this.mergeIndex = 1
this.formData.typeId = this.multipleSelection[0].typeId
this.proTableData = this.multipleSelection
this.dialogVisible = true
},
handleSelectionChange(row) {
this.multipleSelection = row;
},
resultCodeChange(code) {
if (code === "opinion") {
this.$set(this.formData, "opinion", "经提案委员会审理,该提案作为意见建议。")
} else if (code === "notGive") {
this.$set(this.formData, "opinion", "经提案委员会审理,该提案不予立案。")
} else {
this.$set(this.formData, "opinion", "经提案委员会审理,该提案确定立案。")
}
},
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data)
} else if (type === 'audit') {
this.openAudit(data.id, data)
}
},
doExport(row) {
window.open(loc() + "/doExport?proposalId=" + row.id)
},
async openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openAudit(id, pro_data) {
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
this.buttonIndex = 0
this.formData.proposalId = id
this.formData.typeId = pro_data.typeId
this.$set(this.formData, "determineTypeCode", "ordinary")
this.$refs.guava.edit()
this.$refs.audit.openView(id)
},
async doAudit() {
let formValid = true
this.$refs["auditForm"].validate(async valid => formValid = valid)
if (formValid) {
const exist = this.formData.helpUnit.find(v => {
return v === this.formData.hostUnit
})
if (exist) {
this.$notify.warning({title: '警告', message: '协办单位中存在您已选择的主办单位!请检查确认后提交'});
return
}
let msg = ''
if (this.formData.resultCode === 'notGive') {
msg = '该提案不予立案,提交后将完结,请确认!'
} else {
if (this.multipleSelection.length > 1) {
msg = '将有(' + this.multipleSelection.length + ')个提案进行并案处理,请确认!'
} else {
msg = '请确认是否提交该提案!'
}
}
// switch (this.formData.resultCode) {
// case "notGive": {
// msg = '该提案不予立案,提交后将完结,请确认!'
// break
// }
// default: {
// msg = '将有(' + this.multipleSelection.length + ')个提案进行并案处理,请确认!'
// }
// }
this.$confirm(msg, '提示', {
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 url = loc() + (this.editRow.stateCode !== undefined && this.editRow.stateCode > 300 ? '/edit' : '/audit')
let proposalIds = ''
let auditType = ''
// 0 => 进行单个审核操作
// 1 => 进行并案审核操作
// 2 => 进行编辑操作
if (this.buttonIndex === 0) {
auditType = 'one'
proposalIds = JSON.stringify([this.formData.proposalId])
} else if (this.buttonIndex === 1) {
auditType = 'many'
proposalIds = JSON.stringify(this.multipleSelection.map(o => {
return o.id
}))
} else {
auditType = this.editRow.isConjoin === 0 ? 'one' : 'many'
proposalIds = JSON.stringify(this.proTableData.map(o => o.id))
}
const resp = await $.post(url, {
audit: JSON.stringify(this.formData),
resultCode: this.formData.resultCode,
typeId: this.formData.typeId,
hostUnit: this.formData.hostUnit,
helpUnit: JSON.stringify(this.formData.helpUnit),
sign: this.formData.sign,
determineTypeCode: this.formData.determineTypeCode,
proposalIds: proposalIds,
auditType: auditType,
})
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.dialogVisible = false
this.submitDisabled = false
}).catch()
}
},
async getProposalUndertakeAndLeaderInfo() {
const resp = await $.get(loc() + '/getUnderTakeAndLeader')
return resp.code === 0 ? resp.data : []
}
},
async created() {
this.resultOptions = await getDictByCode("proposal_result")
this.unitOptions = await this.getProposalUndertakeAndLeaderInfo()
// this.unitOptions = await proposal.getProposalUndertake()
this.config = await proposal.getProposalConfig()
this.typeOptions = await proposal.getProposalType()
this.noFilingReason = this.config.noFilingReason
await proposal.initData(this)
},
watch: {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,263 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style></style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<proposal-search :page="pageForm" @search="doSearch" title="复核">
</proposal-search>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="提案委员会审查">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" :row-key="(row)=>{row.id}" :size="tableSize" @sort-change="pageOrder"
align="center"
header-align="center">
<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'?'重点':'普通'}}
</template>
<template scope="{row}" v-else-if="column.prop=='isConjoin'">
{{row.isConjoin?'是':'否'}}
</template>
<!-- <template scope="{row}" v-else-if="column.prop==='laLevelName'">
{{row.laLevelName}}
</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.stateCode===proposal.CASE_CHECK">审核
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
<template #edit>
<proposal-info handle label="提案委员会复核" ref="audit">
<template #handle>
<el-form :model="formData" :rules="formRules" label-width="150px" ref="auditForm">
<vi-title :title="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>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="二次答复" prop="caseCheckNeedSecondReply">
<el-radio-group v-model="formData.caseCheckNeedSecondReply">
<el-radio :label="false" border>
无需二次答复
</el-radio>
<el-radio :label="true" border>
需要二次答复
</el-radio>
</el-radio-group>
<span class="text-primary ml10" v-if="formData.caseCheckNeedSecondReply">
(二次答复只需要主办单位答复)
</span>
</el-form-item>
<el-form-item label="领导二次审批" prop="caseCheckNeedSecondAudit"
v-if="formData.caseCheckNeedSecondReply==true">
<el-radio-group v-model="formData.caseCheckNeedSecondAudit">
<el-radio :label="false" border>
无需二次审批
</el-radio>
<el-radio :label="true" border>
需要二次审批
</el-radio>
</el-radio-group>
</el-form-item>
<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"></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>
</guava>
</div>
<script>
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: [],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(800)
},
tableColumns: [
{prop: 'oldProposalCode', label: '草案编号', width: "120", checked: 0},
{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: 'underTakeNames', label: '承办单位', sortable: true},
{prop: 'isConjoin', label: '是否并案', sortable: true},
{prop: 'determineTypeCode', label: '是否重点', sortable: true},
{prop: 'stateName', label: '提案状态', sortable: true}
],
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
loginName: "${@shiro.getPrincipalProperty('loginname')}",
caseCheckNeedSecondReply: false,
caseCheckNeedSecondAudit: null
},
formRules: {
caseCheckNeedSecondReply: [{required: true, message: '请选择', trigger: ['blur', 'change']}],
caseCheckNeedSecondAudit: [{required: true, message: '请选择', trigger: ['blur', 'change']}],
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
}
}
},
methods: {
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openAudit(row) {
const {id} = row
this.formData.proposalId = id
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(id)
},
async doAudit() {
let formValid = true
this.$refs["auditForm"].validate(async valid => formValid = valid)
if (formValid) {
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() + "/audit", {
audit: JSON.stringify(this.formData),
caseCheckNeedSecondReply: this.formData.caseCheckNeedSecondReply,
caseCheckNeedSecondAudit: this.formData.caseCheckNeedSecondAudit,
sign: this.formData.sign
})
if (resp.code === 0) {
this.$notify.success(resp.msg)
this.doSearch()
this.$refs.guava.index()
} else {
this.$notify.error(resp.msg)
}
loading.close()
this.submitDisabled = false
}
}
}
},
async created() {
await proposal.initData(this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,295 @@
<!--#
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="doSend()" icon="el-icon-message" size="small" type="primary"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}">
发送消息
</el-button>
<el-button @click="doExport()" icon="el-icon-message" size="small" type="primary"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}">
导出
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :row-key="(row)=>{row.id}" :size="tableSize" @sort-change="pageOrder"
align="center"
header-align="center">
<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=='auditState'">
<span class="text-success" v-if="row.stateCode!=proposal.DELEGATION">已审核</span>
<span class="text-primary" v-if="row.stateCode==proposal.DELEGATION">待审核</span>
</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" type="primary">
查阅
</el-button>
<el-button @click="doRecall(row)" size="mini" type="primary" v-if="row.isOpinion">
撤回
</el-button>
<el-button @click="openAudit(row.id)" size="mini"
type="primary"
v-if="row.isOpinion==0&&[proposal.CASE].includes(row.stateCode)">
提出意见
</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="成员意见"></vi-title>
<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="other">
<el-radio-group v-model="formData.other">
<el-radio :label="item.code" border v-for="item in resultOptions">{{item.name}}
</el-radio>
</el-radio-group>
<template v-if="formData.other === 'determine'">
<el-radio label="emphasis" v-model="formData.determineTypeCode">重点
</el-radio>
<el-radio label="ordinary" v-model="formData.determineTypeCode">普通
</el-radio>
</template>
</el-form-item>
<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 v-if="isSign()" prop="sign" label="签&emsp;&emsp;字">
<sign prefix="proposal" :qz.sync="formData.sign"></sign>
</el-form-item>-->
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doAudit(false)" type="primary">提 交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
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() {
const that = this
const isShow = (e) => {
console.log(e)
}
return {
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, 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: 'stateName', label: '提案状态', sortable: true},
{prop: 'caseNum', label: '立案票数', sortable: true},
{prop: 'emphasisNum', label: '重点提案票数', sortable: true},
{prop: 'ordinaryNum', label: '普通提案票数', sortable: true},
{prop: 'opinionNum', label: '意见建议票数', sortable: true},
{prop: 'notGiveNum', label: '不予立案票数', sortable: true},
],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(proposal.CASE)
},
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: 'determine'
},
formRules: {
opinion: [{required: false, message: '请输入审核意见', trigger: ['blur', 'change']}],
other: [{required: false, message: '请选择立案意见', trigger: ['blur', 'change']}]
},
resultOptions: []
}
},
methods: {
async doRecall(row) {
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() + "/doRecall", {id: row.id})
requestLaterFun(resp, () => {
this.pageData()
this.$notify.success({title: '成功', message: resp.msg});
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
})
}
},
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()
})
}
},
doExport() {
window.open(loc() + '/doExport/' + this.pageForm.meetingId + "/" + JSON.stringify(this.tableColumns))
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
openAudit(id) {
this.formData.proposalId = id
this.$set(this.formData, "other", "determine")
this.$set(this.formData, "determineTypeCode", "ordinary")
this.$refs.guava.edit()
this.$refs.audit.openView(id)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
},
async doAudit(flag) {
this.submitDisabled = true
this.$refs["auditForm"].validate(async (valid) => {
if (valid) {
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,
proposalId: this.formData.proposalId,
flag: flag
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
this.submitDisabled = false
})
}
});
}
},
async created() {
await proposal.initData(this)
this.resultOptions = await getDictByCode("proposal_result")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,479 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
.pro_table .cell {
width: 100% !important;
font-size: 14px;
}
</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>
</template>
</table-tool>
<el-table :data="tableData" :row-key="(row)=>{row.id}" :size="tableSize" @sort-change="pageOrder"
align="center"
header-align="center">
<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=='isConjoin'">
<span :style="row.isConjoin === 1 ? 'color: #236eb4' : ''">{{row.isConjoin === 1 ? '是' : '否'}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='underTakeOpinion'">
<template v-if="row.stateCode>proposal.CASEUNIT">
<i class="fa fa-circle text-success ml5"></i>
</template>
<template v-else>
<i class="fa fa-circle text-danger ml5" v-if="row.canNotNum>0"></i>
<i class="fa fa-circle text-success ml5" v-else></i>
</template>
</template>
<template scope="{row}" v-else-if="column.prop=='auditState'">
<span v-if="row.stateCode!=proposal.CASEUNIT">已审核</span>
<span v-if="row.stateCode==proposal.CASEUNIT">待审核</span>
</template>
<template scope="{row}" v-else-if="column.prop=='laLevelName'">
<span>
{{!row.determineTypeCode ? '否' : row.determineTypeCode === 'emphasis' ? '重点' : '普通'}}
</span>
</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="[proposal.CASEUNIT].includes(row.stateCode)">审核
</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">
<div style="margin-bottom: 20px" v-if="clickRow.isConjoin === 1">
<vi-title style="margin-bottom: 16px !important;" title="并案信息"></vi-title>
<el-form-item>
<el-table :data="proTableData"
style="width: 100%">
<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 style="color: #236eb4;">{{row.proposalName}}</span>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button @click="delProposal(scope.row, scope.$index)" size="mini"
type="danger"
v-if="clickRow.id !== scope.row.id">移除
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</div>
<vi-title title="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="立案结果" prop="resultCode">
<el-radio-group @change="resultCodeChange" v-model="formData.resultCode">
<el-radio :label="item.code" border v-for="item in resultOptions">
{{item.name}}
</el-radio>
</el-radio-group>
<template v-if="formData.resultCode === 'determine'">
<el-radio label="emphasis" v-model="formData.determineTypeCode">重点</el-radio>
<el-radio label="ordinary" v-model="formData.determineTypeCode">普通</el-radio>
</template>
<!--<el-tag>
{{resultName}}
{{formData.determineTypeName?'('+formData.determineTypeName+')':''}}
</el-tag>-->
<!-- <el-tag v-if="formData.determineTypeName">-->
<!-- {{formData.determineTypeName}}-->
<!-- </el-tag>-->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="提案类型" prop="typeId">
<el-select clearable filterable placeholder="提案类型"
v-model="formData.typeId">
<el-option
:key="item.id"
:label="item.typeName"
:value="item.id"
v-for="item in typeOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="formData.resultCode!='notGive'">
<el-col :span="12">
<el-form-item label="主办单位" prop="hostUnit">
<el-select clearable filterable placeholder="请选择主办单位"
v-model="formData.hostUnit">
<el-option :key="item.id"
:label="item.unitName"
:value="item.id"
v-for="item in unitOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="主办单位领导" v-if="formData.hostUnit">
<el-input readonly v-model="hostUnitLeader"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="协办单位" prop="helpUnit">
<el-select clearable filterable multiple placeholder="请选择协办单位"
v-model="formData.helpUnit">
<el-option :key="item.id"
:label="item.unitName"
:value="item.id"
v-for="item in unitOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="协办单位领导" v-if="formData.helpUnit && formData.helpUnit.length>0">
<el-input readonly v-model="helpUnitLeader"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="理由列表" prop="noFilingReason" v-if="formData.resultCode=='notGive'">
<el-select @change="formData.opinion = '';formData.opinion=formData.noFilingReason"
clearable filterable placeholder="请选择理由列表"
v-model="formData.noFilingReason">
<el-option :key="item"
:label="item"
:value="item"
v-for="item in noFilingReason">
</el-option>
</el-select>
</el-form-item>
<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"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doAudit" type="primary">提 交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
computed: {
resultName() {
const result = this.resultOptions.find(v => v.code === this.formData.resultCode)
return result ? result.name : ''
}
},
components: {
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue'),
},
data() {
return {
noFilingReason: [],
typeOptions: [],
clickRow: {},
proTableData: [],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(400)
},
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: '是否并案', sortable: true},
{prop: 'masterUnitName', label: '主办单位', sortable: true},
{prop: 'masterLeaderUserName', label: '分管校领导', sortable: true},
{prop: 'laLevelName', label: '是否重点', sortable: true},
{prop: 'stateName', label: '提案状态', sortable: true},
{prop: 'underTakeOpinion', label: '承办意见', sortable: false},
{prop: 'auditState', label: '审核状态', sortable: true},
],
resultOptions: [],
unitOptions: [],
submitDisabled: false,
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
resultCode: 'determine',
hostUnit: '',
helpUnit: '',
opinion: '',
typeId: '',
determineTypeCode: ''
},
formRules: {
hostUnit: [{required: true, message: '请选择主办单位', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '请输入审核意见', trigger: ['blur', 'change']}],
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
}
}
},
computed: {
hostUnitLeader() {
const hostUnit = this.unitOptions.find(v => v.id === this.formData.hostUnit)
return hostUnit ? hostUnit.leader : '无'
},
helpUnitLeader() {
const helpUnits = this.unitOptions.filter(v => this.formData.helpUnit.includes(v.id)).map(v => {
return v.leader ? v.leader : '无'
})
return helpUnits && helpUnits.length > 0 ? helpUnits.toString() : '无'
}
},
methods: {
resultCodeChange(code) {
if (code === "opinion") {
this.$set(this.formData, "opinion", "经提案委员会审理,该提案作为意见建议。")
} else if (code === "notGive") {
this.$set(this.formData, "opinion", "经提案委员会审理,该提案不予立案。")
} else {
this.$set(this.formData, "opinion", "经提案委员会审理,该提案确定立案。")
}
},
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 openAudit(row) {
this.clickRow = row
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
const {id, resultCode, typeId} = row
this.formData.proposalId = id
this.formData.resultCode = resultCode
this.formData.determineTypeCode = row.determineTypeCode
this.$set(this.formData, "typeId", typeId)
if (row.laLevelName) {
this.$set(this.formData, 'determineTypeName', row.laLevelName)
}
const underTakeRes = await $.get(loc() + '/queryUnderTakeByProposalId', {proposalId: id})
const underTakes = underTakeRes.data
if (underTakes && underTakes.length > 0) {
this.$set(this.formData, 'hostUnit', underTakes.find(v => v.undertakeType === 1).replyUnitId)
this.$set(this.formData, 'helpUnit', underTakes.filter(v => v.undertakeType === 2).map(v => v.replyUnitId))
}
this.resultCodeChange(row.resultCode)
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(id)
},
async delProposal(row, index) {
if (this.proTableData.length <= 2) {
this.$notify.warning({title: '警告', message: '并案审核时提案个数最少为2个'});
return
}
const confirm = await this.$confirm('此操作将移除该提案的并案信息', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
this.proTableData = this.proTableData.filter(o => o.id !== row.id)
}
},
async doAudit() {
let formValid = true
this.$refs["auditForm"].validate(valid => {
formValid = valid
})
if (formValid) {
if (this.formData.resultCode !== 'notGive') {
if (this.formData.helpUnit.some(v => v === this.formData.hostUnit)) {
this.$alert('协办单位中存在您已选择的主办单位,请检查确认无误后再提交!', '提示', {
confirmButtonText: '确定'
})
return
}
const checkRes = await $.get(loc() + '/checkUnderTakeUser', {hostUnit: this.formData.hostUnit})
if (!checkRes.data) {
this.$alert('请先设置主办单位分管校领导或答复人后再进行提交!', '提示', {
confirmButtonText: '确定'
})
return
}
}
let proposalIds = JSON.stringify(this.proTableData.map(o => o.id))
this.$confirm('最终确定立案和承办单位,不可撤回请确认!', '提示', {
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() + '/audit', {
audit: JSON.stringify(this.formData),
resultCode: this.formData.resultCode,
typeId: this.formData.typeId,
hostUnit: this.formData.hostUnit,
helpUnit: JSON.stringify(this.formData.helpUnit),
sign: this.formData.sign,
flag: this.formData.flag,
determineTypeCode: this.formData.determineTypeCode,
proposalIds: proposalIds
})
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 getProposalUndertakeAndLeaderInfo() {
const resp = await $.get('/platform/proposal/transact/case/case/getUnderTakeAndLeader')
return resp.code === 0 ? resp.data : []
}
},
async created() {
await proposal.initData(this)
this.resultOptions = await getDictByCode("proposal_result")
// this.unitOptions = await proposal.getProposalUndertake()
this.unitOptions = await this.getProposalUndertakeAndLeaderInfo()
this.typeOptions = await proposal.getProposalType()
this.config = await proposal.getProposalConfig()
this.noFilingReason = this.config.noFilingReason
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,206 @@
<!--#
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"></proposal-search>
<proposal-table :data="tableData" :loading="tableLoading" :page="pageForm"
@order="pageOrder" @view="openView">
<template #column>
<el-table-column align="center" header-align="center" label="审核状态" width="80px">
<template scope="{row}">
<span class="text-success" v-if="row.isAllPass">已审核</span>
<span class="text-primary" v-else>待审核</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="100px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'audit',data:row}"
v-if="!row.isAllPass">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</template>
</proposal-table>
<!--#include("/layouts/pagination.html"){}#-->
</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="审核信息"></vi-title>
<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>
<template v-for="item in formData.organizers">
<el-form-item :label="item.unitName">
<el-radio-group v-model="item.isCommitteePass">
<el-radio-button :label="true">审核通过</el-radio-button>
<el-radio-button :label="false">返回修改</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="">
<el-input maxlength="1000" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="item.opinion"></el-input>
</el-form-item>
</template>
<el-form-item label="签&emsp;&emsp;字" prop="sign" v-if="isSign">
<sign :qz.sync="formData.sign" prefix="proposal"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doAudit()" type="primary">&emsp;
</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
data() {
return {
isSign: false,
submitDisabled: false,
organizerList: [],
auditUrl: base + '/platform/proposal/transact/audit',
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
organizers: [],
sign: ''
},
formRules: {
opinion: [{required: true, message: '请输入审核意见', trigger: ['blur', 'change']}]
}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data)
} else if (type === 'audit') {
this.openAudit(data)
}
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openAudit(row) {
this.formData.proposalId = row.id
let data = await proposal.findOrganizer(row.id)
data.forEach(v => {
v.isCommitteePass = true
v.opinion = ''
})
this.formData.organizers = data
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
},
async doAudit() {
this.$refs["auditForm"].validate(async (valid) => {
if (valid) {
for (let i in this.formData.organizers) {
if (!this.formData.organizers[i].opinion) {
this.$notify.warning({title: '警告', message: '请填写审核意见'});
return
}
}
this.submitDisabled = true
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(this.auditUrl + "/doAudit", {
audit: JSON.stringify(this.formData),
organizers: JSON.stringify(this.formData.organizers),
sign: this.formData.sign
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
this.submitDisabled = false
})
}
});
}
},
async created() {
await initData(proposal.COMMITTEE_REVIEW, this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,802 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.item-button .el-button {
padding: 12px 30px;
}
.el-select {
width: 100%;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<proposal-search :audit="false" :has_add="false" :page="pageForm" @add="openAdd"
@import="openImport" @search="doSearch"></proposal-search>
<el-card class="mt20" shadow="never">
<table-tool :app="this" label="我的提案">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" :loading="tableLoading" :size="tableSize" highlight-current-row
style="width: 100%;">
<el-table-column
label="序号"
type="index" width="50">
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:sortable="column.sortable"
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=='stateId'">
<vi-table-state :state="row"></vi-table-state>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="400px">
<template scope="{row}">
<el-button @click="openSeconded(row.id,row.proposalName)" size="mini" type="primary"
v-if="[proposal.UNSUBMIT,proposal.INVIRTE,proposal.DELEGATION_BACK,].includes(row.stateCode)&&row.mannerCode=='W01'">
邀请附议人
</el-button>
<el-button @click="doSubmit(row)" size="mini" type="primary"
v-if="showSubmitBtn(row)">
提交
</el-button>
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="openEdit(row.id)" size="mini" type="primary"
v-if="[proposal.UNSUBMIT].includes(row.stateCode)">
编辑
</el-button>
<el-button @click="doDelete(row)" size="mini" type="primary"
v-if="[proposal.UNSUBMIT].includes(row.stateCode)&&row.stateCode!==proposal.FINISH">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
<template #public>
<el-card shadow="never">
<div class="btn-group tool-button">
<el-input clearable placeholder="请输入姓名或者工号" v-model="pageForm2.searchKeyword">
</el-input>
</div>
<div class="btn-group tool-button">
<el-select @change="jdhChange" clearable filterable placeholder="请选择届次" v-model="pageForm2.jdhid">
<el-option
:key="item.id"
:label="item.jdhallname"
:value="item.id"
v-for="item in jdhList">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select @change="delegationChange" clearable filterable placeholder="请选择代表团"
v-model="pageForm2.dbtid">
<el-option
:key="item.id"
:label="item.dbtname"
:value="item.id"
v-for="item in delegations">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select
@change="unitList = allUnitList.filter(v => pageForm2.unionid?v.unionid === pageForm2.unionid:true)"
clearable filterable placeholder="请选择工会"
v-model="pageForm2.unionid">
<el-option
:key="item.id"
:label="item.unionname"
:value="item.id"
v-for="item in unionList">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select clearable filterable placeholder="请选择单位" v-model="pageForm2.unitid">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in unitList">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button ">
<el-radio-group @change="queryDb" v-model="pageForm2.isAudit">
<el-radio-button :label="true">已邀请 <span style="color: red">{{secondedNum}}</span>
</el-radio-button>
<el-radio-button :label="false">待邀请</el-radio-button>
</el-radio-group>
</div>
<div class="btn-group tool-button">
<el-button @click="queryDb" icon="el-icon-search" type="primary"></el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="邀请附议人">
<template #label_end>
<el-button @click="addSeconded(0)" class="ml20" plain type="primary" v-if="!pageForm2.isAudit">
批量邀请
</el-button>
</template>
<template #func>
<span>
温馨提醒:请选择
<span style="color:red;font-size: 16px;font-weight: bold">
{{config.seconderNum ? config.seconderNum : 0}}
</span>
位附议人,否则无法提交提案!
</span>
</template>
</table-tool>
<el-table :data="dBTableData" :size="tableSize" @selection-change="handleSelectionChange"
class="vi-table" ref="multipleTable" row-key="id" style="width: 100%"
v-loading="dBTableDataLoading">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope">
<span>{{ scope.$index + (pageForm2.pageNumber - 1) * pageForm2.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in dBTableColumns"
>
<template scope="{row:{isAgree}}" v-if="column.prop=='isAgree'">
<template v-if="typeof isAgree === 'undefined'">
<span class="text-success">待邀请</span>
</template>
<template v-else>
<span class="text-info" v-if="isAgree == null">未附议</span>
<span class="text-danger" v-if="isAgree == false">不通过</span>
<span class="text-success" v-if="isAgree == true">通过</span>
</template>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" v-if="!pageForm2.isAudit"
width="100">
<template slot-scope="{row}">
<el-button @click="addSeconded(row.id)" size="mini">邀请</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="el-pagination-container" style="margin-bottom: 0px">
<el-pagination
:current-page="pageForm2.pageNumber"
:page-size="pageForm2.pageSize"
:page-sizes="[5,10, 20, 30, 50]"
:total="pageForm2.totalCount"
@current-change="pageNumberChange2"
@size-change="pageSizeChange2"
layout="total, sizes, prev, pager, next">
</el-pagination>
</el-row>
</el-card>
</template>
</guava>
<el-dialog
:close-on-click-modal="false"
:visible.sync="importVisible"
title="提案导入"
width="50%"
>
<el-timeline>
<el-timeline-item placement="top" timestamp="下载模板">
<el-card>
<el-button
@click="location.href='/platform/basics/downloadTemplate?filePath=Proposal/proposal.xlsx&fileName=教职工代表大会提案表.xlsx'"
icon="el-icon-download" size="medium"
style="width: 200px"
type="">下载模板
</el-button>
</el-card>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="上传文件">
<el-card>
<el-upload
:auto-upload="false"
:file-list="importData.fileList"
:limit="1"
:on-change="(file, fileList) => {
importData.fileList = fileHandleChange(file, fileList,{type:['xlsx']})
}"
:on-remove="(file, fileList) => {
importData.fileList = fileHandleRemove(file, fileList)
}"
name="file"
ref="upload">
<el-button icon="el-icon-upload" size="medium" style="width: 200px" type="">选择文件
</el-button>
</el-upload>
</el-card>
</el-timeline-item>
</el-timeline>
<span class="dialog-footer" slot="footer">
<el-button :disabled="importLoading" @click="importVisible = false">取 消</el-button>
<el-button :loading="importLoading" @click="doImport" type="primary">确定</el-button>
</span>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:visible.sync="composeDialogVisible"
title="温馨提醒" width="30%"
>
<div v-html="tipsContent"></div>
<span class="dialog-footer" slot="footer">
<el-button @click="composeDialogVisible = false" type="primary">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
<!--#include("/platform/proposal/include/proposal_include.js"){}#-->
let E = window.wangEditor
let briefEditor, measuresEditor = null
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
let validBrief = (rule, value, callback) => {
if (!this.formData.brief || !dd3s.html2txt(this.formData.brief)) {
callback(new Error('请填写提案内容、案由和案据'));
} else {
callback();
}
};
let validMeasures = (rule, value, callback) => {
if (!this.formData.measures || !dd3s.html2txt(this.formData.measures)) {
callback(new Error('请填写提案实施的可行性建议'));
} else {
callback();
}
};
return {
composeDialogVisible: false,
importLoading: false,
importVisible: false,
importData: {},
secondedNum: 0,
jdhList: [],
delegations: [],
unitList: [],
allUnitList: [],
unionList: [],
dBTableData: [],
dbUserSelection: [],
dBTableDataLoading: false,
secondedTableData: [],
secondedDialog: false,
secondedFormData: {users: []},
delegationOptions: [],
committeeOptions: [],
unitOptions: [],
typeOptions: [],
mannerOptions: [],
meetingOptions: [],
pageForm2: {
searchName: 'u.username',
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: "",
isAudit: false,
jdhid: '',
dbtid: '',
unionid: '',
unitid: ''
},
pageForm: {searchName: 'proposalName'},
formRules: {
username: [{required: true, message: '请填写提案人', trigger: ['blur', 'change']}],
createTime: [{required: true, message: '请填写提案时间', trigger: ['blur', 'change']}],
proposalName: [{required: true, message: '请填写提案名称', trigger: ['blur', 'change']}],
mannerCode: [{required: true, message: '请选择提案方式', trigger: ['blur', 'change']}],
delegationId: [{required: true, message: '请选择所属代表团', trigger: ['blur', 'change']}],
teacherMeetingId: [{required: true, message: '请选择所属教代会', trigger: ['blur', 'change']}],
committeeId: [{required: true, message: '请选择所属委员会', trigger: ['blur', 'change']}],
typeId: [{required: true, message: '请选择提案类型', trigger: ['blur', 'change']}],
implementUnitId: [{required: true, message: '请选择建以落实部门', trigger: ['blur', 'change']}],
brief: [{validator: validBrief, trigger: ['blur', 'change']}],
measures: [{validator: validMeasures, trigger: ['blur', 'change']}],
},
subDisabled: false,
userOptions: [],
userLoading: false,
config: {},
tableColumns: [
{prop: 'oldProposalCode', label: '草案编号', width: "120", sortable: true, disabled: true},
{prop: 'proposalCode', label: '提案编号', sortable: true, disabled: true},
{prop: 'proposalName', label: '提案名称', disabled: true},
{prop: 'createTime', label: '提案时间', sortable: true},
{prop: 'typeName', label: '提案类型', sortable: true},
{prop: 'typeCode', label: '提案类型编码', sortable: true, checked: 0},
{prop: 'mannerName', label: '提案方式', sortable: true},
{prop: 'mannerCode', label: '提案方式编码', sortable: true, checked: 0},
{prop: 'meetingName', label: '届次'},
{prop: 'stateId', label: '提案状态', sortable: true},
],
dBTableColumns: [
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别', sortable: true},
{prop: 'mobile', label: '联系方式'},
{prop: 'dbUnitName', label: '所属单位'},
{prop: 'dbUnionName', label: '所属工会'},
{prop: 'jdhAllName', label: '届次', sortable: true},
{prop: 'dbtName', label: '代表团', sortable: true},
{prop: 'isAgree', label: '附议状态', sortable: true},
],
proposalConfig: {},
tipsContent: ''
}
},
components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue'),
},
methods: {
showSubmitBtn(row) {
const {alreadySecondedCount, stateCode} = row
if (row.mannerCode === 'W01') {
if (stateCode !== proposal.INVIRTE) {
return false
}
const {submitMode, seconderNum} = this.proposalConfig
if (submitMode === 'AMT' || submitMode === "manual") {
return alreadySecondedCount >= seconderNum
} else {
return false
}
} else {
return stateCode === proposal.UNSUBMIT
}
// [proposal.UNSUBMIT].includes(row.stateCode) && row.mannerCode != 'W01' || (!config.isAutoSubmit && row.mannerCode == 'W01')
},
openImport() {
this.importData = {
fileList: []
}
this.importVisible = true;
},
doImport() {
if (!this.importData.fileList.length) {
this.notifyWarning("请选择文件!")
return
}
const data = new FormData();
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name);
});
this.importLoading = true
$.ajax({
url: loc() + "/importProposal",
type: "post",
data: data,
processData: false,
contentType: false,
success: (data) => {
if (!data.code) {
this.notifySuccess(data.msg);
this.pageData();
this.importVisible = false
} else {
this.notifyWarning(data.msg)
}
this.importLoading = false
},
error: (data) => {
this.notifyWarning("导入失败")
this.importLoading = false
}
});
},
delSeconded(row) {
const {proposalId, seconderId} = row
this.$confirm('确定要删除该附议人吗?', '提示', {type: 'warning'}).then(async () => {
this.$set(row, "loading", true)
const resp = await $.post(loc() + "/deleteSeconder", {proposalId, seconderId});
requestLaterMsgFun((vue, resp, async () => {
await this.secondedData()
}))
this.$set(row, "loading", false)
}).catch(() => {
this.$set(row, "loading", false)
});
},
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data)
} else if (type === 'edit') {
this.openEdit(data.id)
} else if (type === 'delete') {
this.doDelete(data)
} else if (type === 'seconded') {
this.openSeconded(data)
} else if (type === 'submit') {
this.doSubmit(data)
}
},
async meetingChange(val) {
this.formData.delegationId = null
this.formData.committeeId = null
this.delegationOptions = await proposal.getDelegation(val)
// this.committeeOptions = await proposal.getCommittee(val)
},
async secondedData() {
const {data} = await $.get(loc() + "/getSecondedData", {proposalId: this.secondedFormData.proposalId})
this.secondedTableData = data
},
async addSeconded(id) {
const {proposalName, proposalId} = this.pageForm2
if (id === 0 && this.dbUserSelection.length === 0) {
this.$message.warning('请先选择附议人后再点击邀请按钮')
return
}
if (id != 0) this.dbUserSelection = [].concat(id)
let aa = "请确认所选代表是否作为本提案的附议人?"
if (this.secondedNum >= this.config.seconderNum) aa = "您已邀请了" + this.secondedNum + " 名附议人,是否继续邀请?"
const confirm = await this.$confirm(aa + '确定后会有信息通知!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
const resp = await $.post(loc() + "/addSeconded", {
proposalId: proposalId,
proposalName: proposalName,
users: JSON.stringify(this.dbUserSelection),
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: '邀请附议人成功'});
this.$refs.multipleTable.clearSelection();
this.pageForm2.searchKeyword = ''
this.doSearch()
this.queryDb()
this.getProposalSecondedNum()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
})
}
/* if (this.secondedFormData.users.length === 0) {
this.$message.warning('请先选择附议人后再点击邀请按钮')
return
}
this.$confirm('确认邀请吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.subDisabled = true
const {proposalId, users, proposalName} = this.secondedFormData
const resp = await $.post(loc() + "/addSeconded", {
proposalId: proposalId,
proposalName: proposalName,
users: JSON.stringify(users)
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: '邀请附议人成功'});
this.userOptions = []
this.secondedFormData.users = []
this.secondedData()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
this.subDisabled = false
})
}).catch(() => {
});*/
},
async queryUser(proposalId, query) {
const {data} = await $.get(loc() + "/queryDelegate", {proposalId, query})
return data
},
async userRemoteMethod(query) {
if (query) {
this.userLoading = true
const arr = await this.queryUser(this.secondedFormData.proposalId, query)
this.userOptions = this.userOptions.filter(v => {
return this.secondedFormData.users.includes(v.id)
}).concat(arr.filter(v => {
return !this.secondedFormData.users.includes(v.id)
}));
this.userLoading = false
}
},
pageNumberChange2(val) {
this.pageForm2.pageNumber = val;
this.queryDb();
},
pageSizeChange2(val) {
this.pageForm2.pageSize = val;
this.queryDb();
},
async delegationChange(val) {
this.unionList = await getUnions(val)
},
async jdhChange(val) {
this.delegations = await getDbt(val)
},
async queryDb() {
const {jdhid, dbtid, unionid, unitid, proposalId} = this.pageForm2
const data = await $.get(loc() + "/queryDb", {
...this.pageForm2,
pageForm2: this.pageForm2,
proposalId: proposalId,
jdhid: jdhid,
dbtid: dbtid,
unionid: unionid,
unitid: unitid
})
sublime.closeLoadingbar();
this.dBTableDataLoading = false
if (data.code == 0) {
this.dBTableData = data.data.list;
// if (data.data.list[0].secondedNum != undefined) {
// this.secondedNum = data.data.list[0].secondedNum
// }
this.pageForm2.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
},
async getProposalSecondedNum() {
const resp = await $.get(loc() + '/getProposalSecondedNum', {proposalId: this.pageForm2.proposalId})
this.secondedNum = resp.data
},
async openSeconded(id, proposalName) {
this.pageForm2.proposalId = id
this.pageForm2.proposalName = proposalName
await this.queryDb()
await this.getProposalSecondedNum()
this.$refs.guava.public()
this.composeDialogVisible = true
/* this.secondedFormData = {
proposalId: id,
proposalName: proposalName,
users: [],
}
this.secondedData()
this.userOptions = []
this.userLoading = false
this.secondedDialog = true*/
},
handleSelectionChange(val) {
this.dbUserSelection = val.map(v => v.id);
},
doDelete(row) {
this.$confirm('此操作将删除【' + row.proposalName + '】提案的所有信息!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a) => {
if ("confirm" === a) {
const resp = await $.post(loc() + "/doDelete", {id: row.id})
requestLaterFun(resp, () => {
this.pageData()
this.$notify.success({title: '成功', message: resp.msg});
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
})
}
}
});
},
async doSubmit(row) {
this.$confirm('确定要提交此提案吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'info',
callback: async (a) => {
if ("confirm" === a) {
const resp = await $.post(loc() + "/doSubmit", {id: row.id, mannerCode: row.mannerCode})
requestLaterFun(resp, () => {
this.pageData()
this.$notify.success({title: '成功', message: resp.msg});
}, () => {
this.$notify.warning({title: '警告', message: resp.msg});
})
}
}
})
},
async operation() {
let method = this.formData.id ? "/doEdit" : "/doAdd"
this.$refs["addForm"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
let data = clone(this.formData)
if (data.files) {
data.files = JSON.stringify(data.files)
}
const resp = await $.post(loc() + method, {data: JSON.stringify(data), sign: data.sign})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
})
}
});
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openEdit(id) {
window.location.href = "/platform/proposal/transact/writeproposal?proposalId=" + id
/* const resp = await $.get(loc() + "/findOne", {id})
requestLaterFun(resp, () => {
if (resp.data.files) {
resp.data.files = JSON.parse(resp.data.files)
}
this.formData = resp.data
this.$nextTick(() => {
$("#briefEditor").html("")
$("#measuresEditor").html("")
briefEditor = new E("#briefEditor")
briefEditor.config.onchange = (html) => {
this.formData.brief = html
}
measuresEditor = new E("#measuresEditor")
measuresEditor.config.onchange = (html) => {
this.formData.measures = html
}
briefEditor.create()
measuresEditor.create()
briefEditor.txt.html(resp.data.brief)
measuresEditor.txt.html(resp.data.measures)
})
this.$refs.guava.edit()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
})*/
},
async openAdd() {
sublime.jumpPagePjax('/platform/proposal/transact/writeproposal')
},
async initData() {
this.config = await proposal.getProposalConfig()
this.meetingOptions = await proposal.getOpenMeeting()
this.typeOptions = await proposal.getProposalType()
this.unitOptions = await proposal.getProposalUndertake()
this.mannerOptions = await getDictByCode("proposal_manner")
this.pageForm.teacherMeetingId = this.meetingOptions ? this.meetingOptions[0].id : null
this.delegationOptions = await proposal.getDelegation(this.pageForm.teacherMeetingId)
// this.committeeOptions = await proposal.getCommittee(this.pageForm.teacherMeetingId)
const jgName = await $.post("/platform/proposal/transact/writeproposal/getJgNameByuser")
this.committeeOptions = jgName.data
//this.jdhList = await getAllJdh()
this.jdhList = await getOpenMeeting()
if (this.jdhList.length > 0) {
this.pageForm2.jdhid = this.jdhList[0].id
this.delegations = await getDbt(this.jdhList[0].id)
}
this.unionList = await getUnion();
this.allUnitList = await getUnit();
this.unitList = clone(this.allUnitList);
},
checkOperation() {
const operation = GetQueryString("operation")
const id = GetQueryString("id")
if (operation && operation === 'invite' && id) {
this.openSeconded(id, null)
}
},
initTipsContent() {
this.tipsContent =
`<p>&nbsp;&nbsp;1)请选择<sapn style="color: red">` + this.proposalConfig.seconderNum + `</sapn>个以上附议人附议,否则,不能进入团长审核环节。</p>` +
`<p>&nbsp;&nbsp;2)如果附议人全部附议后,系统会自动提交该提案;</p>` +
`<p>&nbsp;&nbsp;3)如果该提案已经有<sapn style="color: red">` + this.proposalConfig.seconderNum + `</sapn>个附议人附议,还未全部完成附议,提案人必须手动才能<p>` +
`<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;完成提案提交!一旦邀请附议人成功,系统会发送邀请信息,不可撤销。</p>`
}
},
async created() {
await this.initData()
this.proposalConfig = await getProposalConfig()
this.pageData();
if (getLocationVariable("action") === 'add') {
this.openAdd()
}
this.checkOperation()
this.initTipsContent()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,254 @@
<!--#
layout("/layouts/platform.html"){
#-->
<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>
<!--# if(@shiro.hasRole('sysadmin')){ #-->
<el-button @click="oneClickReminder" size="small" type="primary">一键提醒</el-button>
<!--# } #-->
</template>
</table-tool>
<el-table :data="tableData" :row-key="(row)=>{row.id}" :size="tableSize" @sort-change="pageOrder"
align="center"
header-align="center">
<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=='auditState'">
<span class="text-success" v-if="row.stateCode!=proposal.DELEGATION">已审核</span>
<span class="text-primary" v-if="row.stateCode==proposal.DELEGATION">待审核</span>
</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" type="primary">查看</el-button>
<el-button @click="openAudit(row.id)"
size="mini"
type="primary" v-if="[proposal.DELEGATION].includes(row.stateCode)">审核
</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="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly 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"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<!-- <el-button type="danger" :disabled="submitDisabled" @click="doAudit(2)">未通过</el-button>-->
<el-button :disabled="submitDisabled" @click="doAudit(0)" type="danger">退回</el-button>
<el-button :disabled="submitDisabled" @click="doAudit(1)" type="primary">通 过</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
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 {
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(proposal.DELEGATION)
},
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},
{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: {
async oneClickReminder() {
const confirm = await this.$confirm('您确定要一键提醒吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm !== 'confirm') return
const resp = await $.post(loc() + '/oneClickReminder', {meetingId: this.pageForm.meetingId})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
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(proposal.auditUrl, {
audit: JSON.stringify(this.formData),
sign: this.formData.sign,
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(() => {
this.submitDisabled = false
})
} else {
this.submitDisabled = false
}
}
},
async created() {
await proposal.initData(this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,469 @@
<!--#
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="doSend()" icon="el-icon-message" size="small" type="primary"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}">发送消息
</el-button>
<el-button @click="batchAudit" icon="el-icon-s-promotion" size="small"
type="primary">批量审核
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :row-key="(row)=>{row.id}" :size="tableSize"
@selection-change="(val)=>{this.batchSelection = val}"
@sort-change="pageOrder"
align="center" header-align="center">
<el-table-column
:selectable="(row)=>{return row.executorOpinion==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
: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=='laLevelName'">
<span>
{{row.determineTypeCode === 'emphasis' ? '重点' :row.determineTypeCode === 'ordinary'? '普通':'否'}}
</span>
</template>
<template scope="{row}" v-else-if="column.prop=='isConjoin'">
<span :style="row.isConjoin ? 'color: #236eb4' : ''">{{row.isConjoin ? '是' : '否'}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="300px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="openAudit(row.id,row)" size="mini"
type="primary"
v-if="row.executorOpinion==null && row.resultCode!='notGive'">
审核
</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 handle label="执委会主任审核" ref="audit">
<template #handle>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm">
<vi-title :title="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>
<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 prop="other" label="立案建议">
<el-radio-group @change="otherChange" v-model="formData.other">
<el-radio v-for="item in resultOptions" :label="item.code" border>{{item.name}}
</el-radio>
</el-radio-group>
<template v-if="formData.other === 'determine'">
<el-radio label="emphasis" v-model="formData.determineTypeCode">重点</el-radio>
<el-radio label="ordinary" v-model="formData.determineTypeCode">普通</el-radio>
</template>
</el-form-item>-->
<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"></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 :close-on-click-modal="false" :visible.sync="batchDialog" title="批量批阅" top="50px" width="70%">
<vi-title title="已选提案"></vi-title>
<el-table :data="batchSelection" max-height="300">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="提案名称" prop="proposalName"></el-table-column>
<el-table-column label="提案人" prop="username"></el-table-column>
<el-table-column label="是否并案" prop="isConjoin">
<template scope="{row}">
<span :style="row.isConjoin ? 'color: #236eb4' : ''">{{row.isConjoin ? '是' : '否'}}</span>
</template>
</el-table-column>
<el-table-column label="立案结果" prop="resultName"></el-table-column>
<el-table-column label="是否重点" prop="laLevelName">
<template scope="{row}">
<span>
{{row.determineTypeCode === 'emphasis' ? '重点' :row.determineTypeCode === 'ordinary'? '普通':'否'}}
</span>
</template>
</el-table-column>
</el-table>
<el-form :model="formData" :rules="formRules" class="mt20" label-width="120px" ref="auditForm">
<vi-title title="执委会建议"></vi-title>
<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 prop="other" label="立案建议">
<el-radio-group @change="otherChange" v-model="formData.other">
<el-radio v-for="item in resultOptions" :label="item.code" border>{{item.name}}
</el-radio>
</el-radio-group>
<template v-if="formData.other === 'determine'">
<el-radio label="emphasis" v-model="formData.determineTypeCode">重点</el-radio>
<el-radio label="ordinary" v-model="formData.determineTypeCode">普通</el-radio>
</template>
</el-form-item>-->
<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"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button @click="doBatchAudit" type="primary">提 交</el-button>
</el-row>
</el-form>
</el-dialog>
</guava>
</div>
<script>
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: '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: '是否并案', sortable: true},
{prop: 'laLevelName', label: '是否重点', sortable: true},
{prop: 'stateName', label: '提案状态', sortable: true}
],
batchDialog: false,
batchSelection: [],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(310)
},
auditUrl: base + '/platform/proposal/transact/audit',
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
opinion: '根据教代会的管理办法之规定,同意',
proposalName: '',
sign: '',
other: '',
determineTypeCode: '',
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
}
},
methods: {
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()
})
}
},
otherChange(code) {
if (code === "opinion") {
this.$set(this.formData, "opinion", "根据教代会的管理办法之规定,该提案作为意见建议")
} else if (code === "notGive") {
this.$set(this.formData, "opinion", "根据教代会的管理办法之规定,该提案不予立案")
} else {
this.$set(this.formData, "opinion", "根据教代会的管理办法之规定,同意该提案")
}
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openAudit(id, row) {
this.$refs.guava.edit()
this.$refs.audit.openView(id)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
this.formData.proposalId = id
this.formData.proposalName = row.proposalName
this.formData.other = row.resultCode
this.formData.createUser = row.username
this.formData.proposalCode = row.proposalCode
switch (row.resultCode) {
case "notGive": {
this.formData.opinion = '根据教代会的管理办法之规定,同意不予立案。'
break
}
case "determine": {
this.formData.opinion = '根据教代会的管理办法之规定,同意立案。'
break
}
case "opinion": {
this.formData.opinion = '根据教代会的管理办法之规定,同意作为意见建议。'
break
}
}
this.$set(this.formData, 'other', row.resultCode)
this.$set(this.formData, 'determineTypeCode', row.determineTypeCode)
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)
},
async batchAudit() {
if (this.batchSelection.length === 0) {
this.$notify.warning('请选择需要批量审核的记录')
return
}
this.formData.opinion = '根据教代会的管理办法之规定,同意提案委员会意见。'
this.batchDialog = true
},
async doAudit() {
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
});
const resp = await $.post(loc() + "/audit", {
audit: JSON.stringify(this.formData),
proposalIds: this.formData.proposalId,
sign: this.formData.sign,
determineTypeCode: this.formData.determineTypeCode
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
})
}
}
},
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() + "/audit", {
audit: JSON.stringify(this.formData),
proposalIds: JSON.stringify(proposalIds),
sign: this.formData.sign,
determineTypeCode: this.formData.determineTypeCode
})
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()
})
}
}
},
async rollback(id) {
const confirm = await this.$confirm('您确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.post(loc() + '/rollback', {proposalId: id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyError(resp.msg)
}
}
},
canRollBack(row) {
if (this.isNode) {
return this.nextStateCode === row.stateCode
} else {
return row.executorOpinion && row.stateCode < proposal.CASEUNIT && row.resultCode !== 'notGive'
}
},
},
async created() {
this.isNode = await proposal.getProposalIsNodeState(proposal.EXECUTORREAD)
this.nextStateCode = await proposal.getProposalNextNode(proposal.EXECUTORREAD)
await proposal.initData(this)
this.resultOptions = await getDictByCode("proposal_result")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,292 @@
<!--#
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 class="mt20" shadow="never">
<table-tool :app="this" label="反馈评价">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" :row-key="(row)=>{row.id}" :size="tableSize" @sort-change="pageOrder"
align="center"
header-align="center">
<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="300px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini">查看</el-button>
<el-button @click="openFeedback(row)"
size="mini" type="primary"
v-if="[proposal.FEEDBACKSCORE].includes(row.stateCode)">反馈
</el-button>
<el-button @click="doExport(row)" size="mini" type="primary"
v-if="row.resultCode=='determine'&&row.stateCode==900">
导出反馈单
</el-button>
<el-button @click="doWithdraw(row)" size="mini" type="danger"
v-if="row.canRollBack">撤回
</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="150px" ref="auditForm">
<vi-title title="反馈评分信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="反馈人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="反馈时间" prop="feedbackTime">
<el-input readonly v-model="formData.feedbackTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="承办满意度" prop="feedbackCode">
<el-radio-group v-model="formData.feedbackCode">
<el-radio :label="item.code" border v-for="item in feedbackOptions">{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="is-required" label="反馈意见" prop="feedbackOpinion">
<div id="feedbackEditor"></div>
</el-form-item>
<el-form-item label="附件上传" prop="files">
<file-upload :files.sync="formData.files" card></file-upload>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="scoreSign" v-if="isSign()">
<sign :qz.sync="formData.scoreSign" prefix="proposal"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doFeedback" type="primary">提 交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
let E = window.wangEditor
let feedbackEditor = null
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
data() {
let replyContentBrief = (rule, value, callback) => {
if (!this.formData.feedbackOpinion || !dd3s.html2txt(this.formData.feedbackOpinion)) {
callback(new Error('请填写反馈意见'));
} else {
callback();
}
};
return {
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(700)
},
tableColumns: [
{prop: 'oldProposalCode', label: '草案编号', width: "120", checked: 0},
{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: 'resultName', 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: 'stateName', label: '提案状态', sortable: true},
],
organizerOptions: [],
feedbackOptions: [],
submitDisabled: false,
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
feedbackTime: moment().format('YYYY-MM-DD'),
feedbackCode: 'satisfied',
},
formRules: {
feedbackOpinion: [{validator: replyContentBrief, trigger: ['blur', 'change']}],
feedbackCode: [{required: true, message: '请选择承办满意度', trigger: ['blur', 'change']}],
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
switch (type) {
case 'view':
this.openView(data);
break;
case 'audit':
this.openFeedback(data);
break;
case 'withdraw':
this.doWithdraw(data);
break;
}
},
doExport(row) {
window.open(loc() + "/doExport?proposalId=" + row.id)
},
async doWithdraw(row) {
const confirm = await this.$confirm('您是否需要撤回该提案?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
const resp = await $.post(loc() + '/doWithdraw', {
proposalId: row.id
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
this.submitDisabled = false
})
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openFeedback(row) {
this.formData.proposalId = row.id
this.organizerOptions = await proposal.findOrganizer(row.id)
this.$nextTick(() => {
$("#feedbackEditor").html("")
feedbackEditor = new E("#feedbackEditor")
feedbackEditor.config.onchange = (html) => {
this.formData.feedbackOpinion = html
}
feedbackEditor.create()
})
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
},
async doFeedback() {
this.$refs["auditForm"].validate(async (valid) => {
if (valid) {
const confirm = await this.$confirm('您是否提交反馈?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
this.submitDisabled = true
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + '/doFeedback', {
feedback: JSON.stringify(this.formData),
scoreSign: this.formData.scoreSign
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
this.submitDisabled = false
})
}
}
});
}
},
async created() {
await proposal.initData(this)
this.feedbackOptions = await getDictByCode("proposal_feedback")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,225 @@
<!--#
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>
<proposal-table :data="tableData" :loading="tableLoading" :page="pageForm"
@order="pageOrder" @view="openView">
<template #column>
<el-table-column align="center" header-align="center" label="承办单位" width="200px">
<template scope="{row}">
<span>{{row.unitName}}({{row.undertakeType==1?'主办':'协办'}})</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="批示状态" width="80px">
<template scope="{row}">
<span class="text-success" v-if="row.isMakePass">已批示</span>
<span class="text-primary" v-else>待批示</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="100px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'audit',data:row}"
v-if="[proposal.SCHOOL_LEAD_AUDIT].includes(row.stateCode)">
批示
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</template>
<template #pagination>
<!--#include("/layouts/pagination.html"){}#-->
</template>
</proposal-table>
</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="审核信息"></vi-title>
<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"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doAudit(false)" type="danger">退 回</el-button>
<el-button :disabled="submitDisabled" @click="doAudit(true)" type="primary">提 交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
data() {
return {
isSign: false,
submitDisabled: false,
auditUrl: base + '/platform/proposal/transact/audit',
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
opinion: '',
sign: '',
isBack: false
},
formRules: {
opinion: [{required: true, message: '请输入审核意见', trigger: ['blur', 'change']}]
}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data)
} else if (type === 'audit') {
this.openAudit(data)
}
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
openAudit(row) {
this.formData.proposalId = row.id
this.formData.replyUnitId = row.undertakeId
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
},
async doAudit(flag) {
this.$refs["auditForm"].validate(async (valid) => {
if (valid) {
this.submitDisabled = true
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(this.auditUrl + "/doAudit", {
audit: JSON.stringify(this.formData),
replyUnitId: this.formData.replyUnitId,
sign: this.formData.sign,
isBack: flag
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
this.submitDisabled = false
})
}
});
},
doBack() {
this.formData.isBack = true
this.doAudit()
},
async openTask() {
const proposal_id = GetQueryString("proposal_id")
const biz_key = GetQueryString("biz_key")
if (proposal_id !== '' && biz_key !== '') {
const {data} = await $.post('/platform/proposal/common/getProposalStateCode', {proposal_id})
const loading = this.$loading({
lock: true,
text: '',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
if (data !== proposal.SCHOOL_LEAD_AUDIT) {
this.pageForm.isAudit = true
this.pageData()
setTimeout(() => {
this.openView({id: proposal_id})
loading.close()
}, 800)
} else {
setTimeout(() => {
this.openAudit({id: proposal_id, undertakeId: biz_key})
loading.close()
}, 800)
}
}
}
},
async created() {
await initData(proposal.SCHOOL_LEAD_AUDIT, this)
await this.openTask()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,412 @@
<!--#
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 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="replyId">
<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'"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
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=='isLeaderAudit'">
<template
v-if="!row.caseCheckNeedSecondAudit || (row.caseCheckNeedSecondAudit && row.replyNumber===1)">
<span class="text-success" v-if="row.isLeaderAudit">已审核</span>
<span class="text-danger" v-else>未审核</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>
</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="250px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini">查看</el-button>
<el-button
@click="openAudit(row)"
size="mini" type="primary"
v-if="(row.replyNumber===1 && !row.isLeaderAudit) || (row.caseCheckNeedSecondAudit && !row.isLeaderAudit && row.replyNumber > 1)">
审核
</el-button>
<el-button
@click="rollback(row)"
size="mini" type="primary"
v-if="[proposal.LEADERAUDIT, proposal.FEEDBACKSCORE].includes(row.stateCode)&&row.isLeaderAudit">
撤回
</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.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 readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="leaderCheckOpinion">
<el-input maxlength="1000" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.leaderCheckOpinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="leaderSign" v-if="isSign()">
<sign :qz.sync="formData.leaderSign" prefix="proposal"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doRollBack" type="danger" v-if="isNode">退回
</el-button>
<el-button :disabled="submitDisabled" @click="doAudit(true)" 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 {
prevNode: "",
proTableData: [],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(600)
},
tableColumns: [
{prop: 'oldProposalCode', label: '草案编号', width: "120", checked: 0},
{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']}]
},
isNode: false,
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()
})
}
},
async getLeaderAuditList(replyUnitId, proposalId) {
const {data} = await $.get("/platform/proposal/transact/branchLeaderRead/getBranchLeaderAuditList", {
replyUnitId: replyUnitId,
proposalId: proposalId
})
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)
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>
<!--#
}
#-->
@@ -0,0 +1,68 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<proposal-search :audit="false" :page="pageForm" @search="doSearch"></proposal-search>
<proposal-table :data="tableData" :loading="tableLoading" :page="pageForm"
@order="pageOrder" @view="openView">
<template #column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="100px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini">查看</el-button>
</template>
</el-table-column>
</template>
</proposal-table>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
data() {
return {
submitDisabled: false,
pageForm: {searchName: 'proposalName', isAudit: false}
}
},
methods: {
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
}
},
async created() {
await initData(null, this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,76 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<proposal-search :audit="false" :page="pageForm" @search="doSearch"></proposal-search>
<proposal-table :data="tableData" :loading="tableLoading" :page="pageForm"
@order="pageOrder" @view="openView">
<template #column>
<el-table-column align="center" header-align="center" label="承办单位" width="200px">
<template scope="{row}">
<span>{{row.underTakeName}}({{row.underTakeType==1?'主办':'协办'}})</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="200">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="doExport(row)" size="mini" type="primary">导出</el-button>
</template>
</el-table-column>
</template>
<template #pagination>
<!--#include("/layouts/pagination.html"){}#-->
</template>
</proposal-table>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
data() {
return {
pageForm: {searchName: 'proposalName'}
}
},
methods: {
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
doExport(row) {
window.open('/platform/proposal/transact/underTakeRead/oneProposalExport?proposalId=' + row.id)
}
},
async created() {
await proposal.initData(this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,242 @@
<!--#
layout("/layouts/platform.html"){
#-->
<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>
<!--# 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" :row-key="(row)=>{row.id}" :size="tableSize" @sort-change="pageOrder"
align="center"
header-align="center">
<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=='auditState'">
<span class="text-success" v-if="row.stateCode!=proposal.PREAUDIT">已审核</span>
<span class="text-primary" v-if="row.stateCode==proposal.PREAUDIT">待审核</span>
</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" type="primary">查看</el-button>
<el-button @click="openAudit(row.id)"
size="mini"
type="primary" v-if="[proposal.PREAUDIT].includes(row.stateCode)">审核
</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="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly 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"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doAudit(false)" type="danger">退回</el-button>
<el-button :disabled="submitDisabled" @click="doAudit(true)" type="primary">通过</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
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 {
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(proposal.DELEGATION)
},
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},
{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>
<!--#
}
#-->
@@ -0,0 +1,393 @@
<!--#
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="doSend()" icon="el-icon-message" size="small" type="primary"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}">发送消息
</el-button>
<el-button @click="batchAudit" icon="el-icon-s-promotion" size="small"
type="primary">批量审核
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :row-key="(row)=>{row.id}" :size="tableSize"
@selection-change="(val)=>{this.batchSelection = val}"
@sort-change="pageOrder"
align="center" header-align="center">
<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
: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.secretaryOpinions==null && row.resultCode!='notGive'">
审阅
</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 handle label="校长、书记审阅" ref="audit">
<template #handle>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm">
<vi-title :title="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>
<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 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 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"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @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 :close-on-click-modal="false" :visible.sync="batchDialog" title="批量批阅" top="50px" width="70%">
<vi-title title="已选提案"></vi-title>
<el-table :data="batchSelection" class="mb20" max-height="300">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="提案名称" prop="proposalName"></el-table-column>
<el-table-column label="提案人" prop="username"></el-table-column>
<el-table-column label="立案结果" prop="resultName"></el-table-column>
</el-table>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm">
<vi-title title="校长、书记意见"></vi-title>
<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 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 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"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doBatchAudit" type="primary">提 交</el-button>
</el-row>
</el-form>
</el-dialog>
</guava>
</div>
<script>
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: '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}
],
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: {
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.$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,
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
this.submitDisabled = false
})
}
},
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,
})
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(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) {
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>
<!--#
}
#-->
@@ -0,0 +1,484 @@
<!--#
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 class="mt20" shadow="never">
<table-tool :app="this" label="答复列表">
<template #tips>
<!-- <span>温馨提醒:协</span>-->
</template>
<template #func>
<el-button :disabled="proTableSelection.length===0" @click="forwardReply" size="small"
type="primary"
v-if="${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')}">转交答复
</el-button>
</template>
</table-tool>
<el-table :data="tableData"
:size="tableSize" :tree-props="{children: 'children'}"
@selection-change="handleSelectionChange" @sort-change="pageOrder"
align="center"
header-align="center"
ref="proTable" row-key="replyId">
<el-table-column
:selectable="(row)=>{return !row.isReply}"
reserve-selection
type="selection"
v-if="${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')}"
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'"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
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=='isReply'">
<span class="text-success" v-if="row.isReply">已答复</span>
<span class="text-danger" v-else>未答复</span>
</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>
<template scope="{row}" v-else-if="column.prop==='isForward'">
<span class="text-primary" v-if="row.isForward">是({{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 @click="openAudit(row)" size="mini" type="primary" v-if="!row.isReply">答复
</el-button>
<!-- <el-button @click="doReplyExport(row)" type="primary" size="mini"-->
<!-- v-if="!pageForm.isAudit&&row.isReply">导出回复书-->
<!-- </el-button>-->
<el-button
@click="doRollBack(row)"
size="mini" type="danger"
v-if="row.isReply && ([proposal.LEADERAUDIT, proposal.UNITREPLY].includes(row.stateCode)) && row.leaderId == null">
撤回
</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 handle label="答复信息" ref="audit">
<template #handle>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm">
<vi-title :title="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>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="答复人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="答复时间" prop="replyTime">
<el-input readonly v-model="formData.replyTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="currentRowResultCode==='determine'">
<el-form-item label="落实情况" prop="implementState">
<el-radio-group v-model="formData.implementState">
<el-radio :label="o.name" border v-for="o in implementStates">{{o.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item class="is-required" label="答复内容" prop="replyContent">
<div id="replyContentEditor"></div>
</el-form-item>
<el-form-item label="附件上传" prop="files">
<file-upload :files.sync="formData.replyFiles" card></file-upload>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="replySign" v-if="isSign()">
<sign :qz.sync="formData.replySign" prefix="proposal"></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 :close-on-click-modal="false" :visible.sync="forwardDialog" title="转交答复" top="50px" width="60%">
<vi-title title="已选提案"></vi-title>
<el-table :data="proTableSelection" max-height="350">
<el-table-column label="提案编号" prop="proposalCode"></el-table-column>
<el-table-column label="提案名称" prop="proposalName"></el-table-column>
<el-table-column label="承办单位" prop="underTakeName"></el-table-column>
<el-table-column label="承办类型" prop="undertakeType"></el-table-column>
<el-table-column label="转交情况" prop="isForward">
<template scope="{row}">
<span class="text-primary" v-if="row.isForward">是({{row.proxyReplyUserName}}</span>
<span v-else></span>
</template>
</el-table-column>
</el-table>
<vi-title class="mt10" title="转交用户"></vi-title>
<el-select
:remote-method="findSameUnitUser"
clearable
filterable
placeholder="请输入关键词"
remote
reserve-keyword
v-model="forwardUserSelection"
>
<el-option
:key="item.id"
:label="item.username+'('+item.loginname+')'"
:value="item.id"
v-for="item in forwardUserList">
</el-option>
</el-select>
<el-row class="mt20" justify="end" type="flex">
<el-button @click="forwardDialog = false">取消</el-button>
<el-button @click="confirmForwardReply" type="primary">确定</el-button>
</el-row>
</el-dialog>
</div>
<script>
<!--#include("/platform/proposal/include/proposal_include.js"){}#-->
let E = window.wangEditor
let replyContentEditor = null
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'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 {
implementStates: [],
proTableData: [],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(500)
},
conJoinProposalName: "",
conJoinProposal: [],
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, 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']}]
},
proTableSelection: [],
forwardDialog: false,
forwardUserList: [],
forwardUserSelection: null,
currentRowResultCode: null
}
},
methods: {
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
this.currentRowResultCode = resultCode
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
}*/
this.formData.proposalId = id
this.formData.id = replyId
this.formData.replyNumber = replyNumber
this.formData.implementState = implementState
this.formData.replyContent = replyContent
this.formData.replyUnitId = replyUnitId
this.formData.proposalName = row.proposalName
this.formData.createUser = row.username
this.formData.proposalCode = row.proposalCode
this.$nextTick(() => {
$("#replyContentEditor").html("")
replyContentEditor = new E("#replyContentEditor")
replyContentEditor.config.onchange = (html) => {
this.formData.replyContent = html
}
replyContentEditor.create()
if (replyContent) {
replyContentEditor.txt.html(replyContent)
} else {
if (resultCode === 'opinion') {
replyContentEditor.txt.html('建议已收悉,将作为相关工作的建议或参考')
this.formData.replyContent = '建议已收悉,将作为相关工作的建议或参考'
}
}
})
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
},
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 params = clone(this.formData)
params.isSave = isSave
const resp = await $.post(loc() + "/audit", params)
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() {
this.implementStates = await getDictByCode("proposal_implementState")
await proposal.initData(this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,244 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-table__expand-icon {
color: #de194f;
}
.el-table__expand-icon > .el-icon-arrow-right {
font-weight: 600;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<proposal-search :has_seconded="false" :page="pageForm" @search="doSearch" title="附议"></proposal-search>
<el-card class="mt20" shadow="never">
<table-tool :app="this" label="附议提案">
<template #func>
<!--# if(@shiro.hasRole('sysadmin')){ #-->
<el-button @click="oneClickReminder" size="small" type="primary">一键提醒</el-button>
<!--# } #-->
</template>
</table-tool>
<el-table :data="tableData" :key="tableKey" :size="tableSize" :tree-props="{children: 'children'}"
@sort-change="pageOrder"
row-key="secondedId"
style="width: 100%"
v-loading="tableLoading"
>
<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=='isAgree'">
<span class="text-primary" v-if="row.isAgree==undefined">未附议</span>
<span class="text-danger" v-if="row.isAgree==false">不同意</span>
<span class="text-success" v-if="row.isAgree==true">同意</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="openAudit(row)" size="mini" type="primary"
v-if="[proposal.UNSUBMIT,150].includes(row.stateCode) && row.isAgree==null">
附议
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<!-- <template #edit_func>
<el-button :disabled="subDis" icon="el-icon-close" @click="doAudit(false)">拒绝</el-button>
<el-button type="primary" :disabled="subDis" icon="el-icon-check" @click="doAudit(true)">同意</el-button>
</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="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="签&emsp;字" prop="seconderSign" v-if="isSign()">
<sign :qz.sync="formData.seconderSign" prefix="proposal"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="subDis" @click="doAudit(false)" icon="el-icon-close">拒绝</el-button>
<el-button :disabled="subDis" @click="doAudit(true)" icon="el-icon-check" type="primary">
同意
</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
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 {
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: 'typeName', label: '提案类型', sortable: true},
{prop: 'typeCode', label: '提案类型编码', sortable: true, checked: 0},
{prop: 'meetingName', label: '届次', sortable: true},
{prop: 'delegationName', label: '代表团', sortable: true},
{prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0},
{prop: 'stateName', label: '提案状态', sortable: true},
{prop: 'secondedUserName', label: '附议人', sortable: true},
{prop: 'isAgree', label: '附议状态', sortable: true},
],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(proposal.INVIRTE)
},
subDis: false,
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
seconderSign: ""
},
formRules: {
implementUnitId: [{required: true, message: '请选择建议落实部门', trigger: ['blur', 'change']}],
seconderSign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}],
},
}
},
methods: {
async oneClickReminder() {
const confirm = await this.$confirm('您确定要一键提醒吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm !== 'confirm') return
const resp = await $.post(loc() + '/oneClickReminder', {meetingId: this.pageForm.meetingId})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
async load(tree, treeNode, resolve) {
const {id, secondedId} = tree
const resp = await $.get(loc() + "/getSecondedList", {id: id, secondedId: secondedId})
if (resp.code === 0) {
resolve(resp.data)
} else {
resolve([])
}
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
openAudit(row) {
this.formData.secondedId = row.secondedId
this.formData.proposalId = row.id
this.formData.delegationId = row.delegationId
this.formData.proposalName = row.proposalName
this.formData.createUser = row.createUser
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
},
async doAudit(flag) {
const flagText = flag ? '同意' : '拒绝'
const msgRes = await this.$confirm('您是否要' + flagText + '该提案?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (msgRes === 'confirm') {
this.subDis = true
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + "/doAudit", {
secondedId: this.formData.secondedId,
proposalId: this.formData.proposalId,
proposalName: this.formData.proposalName,
createUser: this.formData.createUser,
flag: flag,
seconderSign: this.formData.seconderSign
})
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.subDis = false
}
}
},
async created() {
await proposal.initData(this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,271 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.query-row {
height: 70px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
.query-row:not(:last-child) {
border-bottom: 1px dashed rgb(230, 230, 230);
}
.query-row-title {
width: 120px;
}
.el-table-container {
padding-top: 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">教代会:</div>
<div class="search-item-option">
<el-select @change="meetingChange" filterable placeholder="请选择教代会"
style="width: 80%" v-model="pageForm.meetingId">
<el-option
:label="item.jdhallname"
:value="item.id"
v-for="item in meetingOptions">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label"></div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 90%" v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend" style="width: 110px;"
v-model="pageForm.searchName">
<el-option label="提案名称" value="proposalName"></el-option>
<el-option label="编号" value="proposalCode"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label"></div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 90%" v-model="pageForm.searchKeyword2">
<el-select placeholder="查询类型" slot="prepend" style="width: 100px;"
v-model="pageForm.searchName2">
<el-option label="提案人" value="su.username"></el-option>
<!-- <el-option label="附议人" value="seconded.username"></el-option>-->
</el-select>
</el-input>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt20" shadow="never">
<table-tool :app="this" label="提案信息">
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" align="center"
header-align="center"
row-key="id"
>
<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>
</el-table-column>
<el-table-column fixed="right" header-align="center" label="操作"
label="操作" width="130px">
<template scope="{row}">
<!-- <el-button @click="oneProposalExport(row.id)" icon="el-icon-printer" size="mini"
type="primary">导出提案
</el-button>-->
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
resultOptions: [],
typeOptions: [],
meetingOptions: [],
stateOptions: [],
delegationOptions: [],
unionOptions: [],
unitOptions: [],
pageForm: {
searchName: "proposalName",
searchName2: "su.username",
searchKeyword2: '',
stateCode: '',
meetingId: '',
delegationId: '',
proposalResult: [],
proposalTypes: [],
levyStates: []
},
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: 'mobile', label: '联系方式', disabled: true},
{prop: 'unitname', label: '单位', disabled: true},
{prop: 'delegationName', label: '代表团', sortable: true},
// {prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0},
{prop: 'typeName', label: '提案类型', sortable: true},
// {prop: 'typeCode', label: '提案类型编码', sortable: true, checked: 0},
{prop: 'mannerName', label: '提交方式', sortable: true},
{prop: 'secondedNum', label: '附议人数量', sortable: true},
{prop: 'secondedAgreeNum', label: '已附议', sortable: true},
{prop: 'delegationAudit', label: '团长审核', sortable: true},
],
levyAuditOptions: [
{label: '未提交', value: 0},
{label: '未附议', value: 1},
{label: '附议中', value: 2},
{label: '待团长审核', value: 3},
{label: '团长已审核', value: 4},
]
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue'),
},
methods: {
oneProposalExport(id) {
window.location.href = "/platform/proposal/statistics/summary/oneProposalExport?proposalId=" + id
},
async meetingChange(val) {
this.pageForm.delegationId = null
this.delegationOptions = await getDelegation(val)
this.doSearch()
},
async delegationChange(val) {
this.pageForm.unionId = null
this.unionOptions = await getUnions(val)
this.doSearch()
},
async unionChange(val) {
this.pageForm.unitId = null
this.unitOptions = await getUnits(val)
this.doSearch()
},
checkProposalResult(result) {
let idx = this.pageForm.proposalResult.indexOf(result)
if (idx !== -1) {
this.pageForm.proposalResult.splice(idx, 1)
} else {
this.pageForm.proposalResult.push(result)
}
this.doSearch()
},
checkProposalType(type) {
let idx = this.pageForm.proposalTypes.indexOf(type)
if (idx !== -1) {
this.pageForm.proposalTypes.splice(idx, 1)
} else {
this.pageForm.proposalTypes.push(type)
}
this.doSearch()
},
checkLevyState(type) {
this.pageForm.levyStates = [type]
// let idx = this.pageForm.levyStates.indexOf(type)
// if (idx !== -1) {
// this.pageForm.levyStates.splice(idx, 1)
// } else {
// this.pageForm.levyStates.push(type)
// }
this.doSearch()
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.proposalTypes = JSON.stringify(pageForm.proposalTypes)
pageForm.proposalResult = JSON.stringify(pageForm.proposalResult)
pageForm.levyStates = JSON.stringify(pageForm.levyStates)
$.post(loc() + "/pageData", pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code === 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
}
},
async created() {
this.meetingOptions = await getAllJdh()
this.pageForm.meetingId = this.meetingOptions.length ? this.meetingOptions[0].id : ''
this.stateOptions = await getOpenProposalState()
this.typeOptions = await getProposalType()
this.resultOptions = await getDictOptions("proposal_result")
this.delegationOptions = await getDelegation(this.pageForm.meetingId)
this.unionOptions = await getUnions(null)
this.unitOptions = await getUnits(null)
this.pageData();
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,232 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<proposal-search :audit="false" :page="pageForm" @search="doSearch"></proposal-search>
<el-card class="mt20" shadow="never">
<table-tool :app="this" label="承办单位阅览">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" :key="tableKey" :load="load"
:size="tableSize"
:tree-props="{hasChildren: 'hasUnderTakeRead'}"
@sort-change="pageOrder"
lazy
row-key="prId"
style="width: 100%"
v-loading="tableLoading"
>
<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=='underTakeOpinion'">
<i class="fa fa-circle text-danger ml5" v-if="row.canTake==0"></i>
<i class="fa fa-circle text-success ml5" v-else></i>
</template>
<template scope="{row}" v-else-if="column.prop=='underTakeName'">
<span>{{row.underTakeName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='underTakeType'">
<span>{{row.underTakeType==1?'主办':'协办'}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='isConjoin'">
<span :style="row.isConjoin ? 'color: #236eb4' : ''">{{[proposal.CASE].includes(row.stateCode) ? '暂无' : row.isConjoin ? '是' : '否'}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='determineTypeCode'">
<span>
{{[proposal.CASE].includes(row.stateCode) ? '暂无' : !row.determineTypeCode ? '否' : row.determineTypeCode === 'emphasis' ? '重点' : '普通'}}
</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" fixed header-align="center" label="操作" width="250">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary" v-if="row.stateCode <= 400">
承办意见
</el-button>
<el-button @click="doExport(row)" size="mini" type="primary">导出</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</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="审核信息"></vi-title>
<el-form-item label="承办单位">
<el-input readonly v-model="formData.underTakeName"></el-input>
</el-form-item>
<el-form-item label="承办意向" prop="resultCode">
<el-radio-group @change="resultCodeChange" v-model="formData.resultCode">
<el-radio :label="true" border>可以承办</el-radio>
<el-radio :label="false" border>无法承办</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="理由" prop="opinion">
<el-input maxlength="500" placeholder="请填写您的理由" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button @click="$refs.guava.index()">返回</el-button>
<el-button @click="doAudit" type="primary">提交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
data() {
return {
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: '是否并案', sortable: true},
{prop: 'determineTypeCode', label: '是否重点', sortable: true},
{prop: 'stateName', label: '提案状态', sortable: true},
{prop: 'underTakeName', label: '承办单位', sortable: false},
{prop: 'underTakeType', label: '承办类型', sortable: false},
{prop: 'underTakeOpinion', label: '承办意见', sortable: false},
],
pageForm: {searchName: 'proposalName'},
formData: {},
formRules: {
resultCode: [{required: true, message: '请选择承办意向', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '请输入承办意见', trigger: ['blur', 'change']}],
}
}
},
methods: {
async load(tree, treeNode, resolve) {
const {id, prId} = tree
const resp = await $.get(loc() + "/getUnderTakeReadList", {id: id, prId: prId})
requestLaterFun(resp, (data) => {
resolve(data)
}, () => {
resolve([])
})
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openEdit(row) {
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
this.formData.id = row.id
this.formData.underTakeId = row.underTakeId
this.formData.underTakeName = row.underTakeName
const opinionData = await $.get(loc() + '/getUnderTakeFirstOpinion', {
proposalId: row.id,
underTakeId: row.underTakeId
})
if (opinionData.data) {
this.$set(this.formData, 'opinion', opinionData.data.opinion)
this.$set(this.formData, 'resultCode', opinionData.data.canTake)
} else {
this.$set(this.formData, 'opinion', null)
this.$set(this.formData, 'resultCode', null)
}
},
async resultCodeChange() {
if (this.formData.resultCode) {
this.formRules.opinion[0].required = false
} else {
this.formRules.opinion[0].required = true
}
const valid = await this.$refs['auditForm'].validate()
},
async doAudit() {
const valid = await this.$refs['auditForm'].validate()
if (valid) {
const confirm = await this.$confirm('您确定要提交吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.post(loc() + '/doAudit', this.formData)
if (resp.code === 0) {
this.$refs.guava.index()
this.notifySuccess(resp.msg)
this.pageData()
}
}
}
},
doExport(row) {
window.open('/platform/proposal/statistics/summary/oneProposalExport?proposalId=' + row.id)
}
},
async created() {
await proposal.initData(this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,189 @@
<!--#
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>
<proposal-table :data="tableData" :loading="tableLoading" :page="pageForm"
@order="pageOrder" @view="openView">
<template #column>
<el-table-column align="center" header-align="center" label="承办单位" width="200px">
<template scope="{row}">
<span>{{row.unitName}}({{row.undertakeType==1?'主办':'协办'}})</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="签署状态" width="80px">
<template scope="{row}">
<span class="text-success" v-if="row.isMakePass">已签署</span>
<span class="text-primary" v-else>待签署</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="100px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item
:command="{type:'audit',data:row}"
v-if="[proposal.SCHOOL_LEAD_UNDERSIGN].includes(row.stateCode)">
签署
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</template>
</proposal-table>
<!--#include("/layouts/pagination.html"){}#-->
</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="审核信息"></vi-title>
<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"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doAudit" type="primary">提 交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
data() {
return {
isSign: false,
submitDisabled: false,
auditUrl: base + '/platform/proposal/transact/audit',
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
opinion: '',
sign: ''
},
formRules: {
opinion: [{required: true, message: '请输入审核意见', trigger: ['blur', 'change']}]
}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data)
} else if (type === 'audit') {
this.openAudit(data)
}
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
openAudit(row) {
this.formData.proposalId = row.id
this.formData.replyUnitId = row.undertakeId
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
},
async doAudit() {
this.$refs["auditForm"].validate(async (valid) => {
if (valid) {
this.submitDisabled = true
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(this.auditUrl + "/doAudit", {
audit: JSON.stringify(this.formData),
replyUnitId: this.formData.replyUnitId,
sign: this.formData.sign
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
loading.close()
this.submitDisabled = false
})
}
});
}
},
async created() {
await initData(proposal.SCHOOL_LEAD_UNDERSIGN, this)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,783 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
.remindTextArea textarea {
resize: none;
}
.remindClass {
width: 100%;
white-space: break-spaces;
font-size: 14px;
line-height: 25px;
background-color: white;
max-height: 600px;
overflow-y: scroll;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<template #header>
<h3 style="color: #1867b0">撰写提案</h3>
</template>
<template>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm">
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="代表姓名" prop="username">
<el-input readonly type="text" v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="提案时间" prop="createTime">
<el-input readonly type="text" v-model="formData.createTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="提案名称" prop="proposalName">
<el-input maxlength="100" placeholder="提案名称"
v-model="formData.proposalName"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="撰写提案方式" prop="mannerCode">
<el-radio :key="item.id" :label="item.code" border
size="medium"
v-for="item in mannerList" v-model="formData.mannerCode">
{{item.name}}
</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex" v-if="false">
<el-col :span="12">
<el-form-item label="所属教代会" prop="teacherMeetingId">
<el-select @change="meetingChange" clearable filterable
placeholder="所属教代会"
v-model="formData.teacherMeetingId">
<el-option :key="item.id" :label="item.jdhallname"
:value="item.id"
v-for="item in meetingOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属代表团" prop="delegationId" v-if="formData.mannerCode!='W03'">
<el-select clearable filterable placeholder="所属代表团" v-model="formData.delegationId">
<el-option :key="item.id" :label="item.dbtname"
:value="item.id"
v-for="item in delegationOptions">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属委员会" prop="committeeId" v-if="formData.mannerCode=='W03'">
<el-select clearable filterable placeholder="所属委员会" v-model="formData.committeeId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in committeeOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="提案类型" prop="typeId">
<el-select clearable filterable placeholder="提案类型"
v-model="formData.typeId">
<el-option
:key="item.id"
:label="item.typeName"
:value="item.id"
v-for="item in typeOptions">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-form-item label="建议落实部门" prop="implementUnitId">-->
<!-- <el-select clearable filterable placeholder="建议落实部门"-->
<!-- v-model="formData.implementUnitId">-->
<!-- <el-option-->
<!-- :key="item.id"-->
<!-- :label="item.unitName"-->
<!-- :value="item.id"-->
<!-- v-for="item in unitOptions">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
</el-col>
</el-row>
<el-form-item class="is-required" label="案&emsp;&emsp;由" prop="brief">
<div id="briefEditor"></div>
</el-form-item>
<el-form-item class="is-required" label="建议措施" prop="measures">
<div id="measuresEditor"></div>
</el-form-item>
<el-form-item label="附件上传" prop="files">
<file-upload :files.sync="formData.files" card></file-upload>
</el-form-item>
<el-form-item label="签&emsp;字" prop="sign" v-if="isSign()">
<sign :qz.sync="formData.sign" prefix="proposal"></sign>
</el-form-item>
<el-form-item>
<el-row justify="center" type="flex">
<el-button @click="doAdd" type="primary" v-throttle>保存到我的提案</el-button>
<el-button @click="openSeconded" type="primary" v-if="formData.mannerCode=='W01'">邀请附议人
</el-button>
<el-button @click="doSubmit" type="primary" v-if="formData.mannerCode!='W01'">提交
</el-button>
</el-row>
</el-form-item>
</el-form>
</template>
</el-card>
</template>
<!-- <template #public>
<el-card shadow="never">
<div class="btn-group tool-button">
<el-input clearable placeholder="请输入内容" v-model="pageForm2.searchKeyword">
<el-select placeholder="查询" slot="prepend" style="width: 100px;"
v-model="pageForm2.searchName">
<el-option label="工号" value="u.loginname"></el-option>
<el-option label="姓名" value="u.username"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button">
<el-select @change="jdhChange" clearable filterable placeholder="请选择届次" v-model="pageForm2.jdhid">
<el-option
:key="item.id"
:label="item.jdhallname"
:value="item.id"
v-for="item in jdhList">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select @change="delegationChange" clearable filterable placeholder="请选择代表团"
v-model="pageForm2.dbtid">
<el-option
:key="item.id"
:label="item.dbtname"
:value="item.id"
v-for="item in delegations">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select
@change="unitList = allUnitList.filter(v => pageForm2.unionid?v.unionid === pageForm2.unionid:true)"
clearable filterable placeholder="请选择工会"
v-model="pageForm2.unionid">
<el-option
:key="item.id"
:label="item.unionname"
:value="item.id"
v-for="item in unionList">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select clearable filterable placeholder="请选择单位" v-model="pageForm2.unitid">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in unitList">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-button @click="queryDb" icon="el-icon-search" type="primary"></el-button>
</div>
<div class="btn-group tool-button mt5">
<el-radio-group @change="queryDb" v-model="pageForm2.isAudit">
<el-radio-button :label="true">已邀请({{secondedNum}}</el-radio-button>
<el-radio-button :label="false">待邀请</el-radio-button>
</el-radio-group>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="邀请附议人">
<template #label_end>
<el-button @click="addSeconded(0)" class="ml20" plain type="primary" v-if="!pageForm2.isAudit">
批量邀请
</el-button>
</template>
<template #func>
<span>
温馨提醒:请选择
<span style="color:red;font-size: 16px;font-weight: bold">
{{config.seconderNum ? config.seconderNum : 0}}
</span>
位附议人,否则无法提交提案!
</span>
</template>
</table-tool>
<el-table :data="dBTableData" :size="tableSize" @selection-change="handleSelectionChange"
class="vi-table" ref="multipleTable" row-key="id" style="width: 100%"
v-loading="dBTableDataLoading">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope">
<span>{{ scope.$index + (pageForm2.pageNumber - 1) * pageForm2.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in dBTableColumns"
>
<template scope="{row:{isAgree}}" v-if="column.prop=='isAgree'">
<template v-if="typeof isAgree === 'undefined'">
<span class="text-success">待邀请</span>
</template>
<template v-else>
<span class="text-info" v-if="isAgree == null">未附议</span>
<span class="text-danger" v-if="isAgree == false">不通过</span>
<span class="text-success" v-if="isAgree == true">通过</span>
</template>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" v-if="!pageForm2.isAudit"
width="100">
<template slot-scope="{row}">
<el-button @click="addSeconded(row.id)" size="mini">邀请</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="el-pagination-container" style="margin-bottom: 0px">
<el-pagination
:current-page="pageForm2.pageNumber"
:page-size="pageForm2.pageSize"
:page-sizes="[5,10, 20, 30, 50]"
:total="pageForm2.totalCount"
@current-change="pageNumberChange2"
@size-change="pageSizeChange2"
layout="total, sizes, prev, pager, next">
</el-pagination>
</el-row>
</el-card>
</template>-->
</guava>
<el-dialog :close-on-click-modal="false" :visible.sync="writeRemindDialog" title="撰写须知" top="50px" width="60%">
<!-- <pre class="remindClass">-->
<!-- {{config.writeRemind}}-->
<!-- </pre>-->
<el-input
:autosize="{ minRows: 10, maxRows: 30}"
class="remindTextArea"
readonly
type="textarea"
v-model="config.writeRemind">
</el-input>
<!-- <div v-html="config.writeRemind"></div>-->
<div class="text-center" slot="footer">
<el-button @click="writeRemindDialog = false" type="primary">我已知晓</el-button>
</div>
</el-dialog>
</div>
<script>
const E = window.wangEditor
let briefEditor, measuresEditor = null
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
const validBrief = (rule, value, callback) => {
if (!this.formData.brief || !dd3s.html2txt(this.formData.brief)) {
callback(new Error('请填写提案内容、案由和案据'));
} else if (dd3s.html2txt(this.formData.brief).length < this.config.words) {
callback(new Error('提案内容至少需要' + this.config.words + '字'));
// callback();
} else {
callback();
}
};
const validMeasures = (rule, value, callback) => {
if (!this.formData.measures || !dd3s.html2txt(this.formData.measures)) {
callback(new Error('请填写提案实施的可行性建议'));
} else {
callback();
}
};
return {
pageForm2: {
searchName: 'u.username',
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: "",
isAudit: false,
jdhid: '',
dbtid: '',
unionid: '',
unitid: ''
},
jdhList: [],
delegations: [],
userOptions: [],
unionList: [],
unitList: [],
secondedNum: 0,
dBTableDataLoading: false,
dBTableData: [],
secondedFormData: {users: []},
secondedDialog: false,
userLoading: false,
subDisabled: false,
secondedTableData: [],
config: {},
formData: {
sign: ''
},
meetingOptions: [],
typeOptions: [],
unitOptions: [],
allMannerList: [],
mannerList: [],
delegationOptions: [],
committeeOptions: [],
formRules: {
username: [{required: true, message: '请填写提案人', trigger: ['blur', 'change']}],
createTime: [{required: true, message: '请填写提案时间', trigger: ['blur', 'change']}],
proposalName: [{required: true, message: '请填写提案名称', trigger: ['blur', 'change']}],
mannerCode: [{required: true, message: '请选择提案方式', trigger: ['blur', 'change']}],
delegationId: [{required: true, message: '请选择所属代表团', trigger: ['blur', 'change']}],
teacherMeetingId: [{required: true, message: '请选择所属教代会', trigger: ['blur', 'change']}],
committeeId: [{required: true, message: '请选择所属委员会', trigger: ['blur', 'change']}],
/*typeId: [{required: true, message: '请选择提案类型', trigger: ['blur', 'change']}],*/
implementUnitId: [{required: false, message: '请选择建以落实部门', trigger: ['blur', 'change']}],
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}],
brief: [{validator: validBrief, trigger: ['blur', 'change']}],
measures: [{validator: validMeasures, trigger: ['blur', 'change']}],
},
dBTableColumns: [
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别', sortable: true},
{prop: 'mobile', label: '联系方式'},
{prop: 'dbUnitName', label: '所属单位'},
{prop: 'dbUnionName', label: '所属工会'},
{prop: 'jdhAllName', label: '届次', sortable: true},
{prop: 'dbtName', label: '代表团', sortable: true},
{prop: 'isAgree', label: '附议状态', sortable: true},
],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(proposal.UNSUBMIT)
},
writeRemindDialog: false
}
},
components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue')
},
methods: {
async doAdd() {
let method = this.formData.id ? "/doEdit" : "/doAdd"
this.$refs["addForm"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
let data = clone(this.formData)
if (data.files) {
data.files = JSON.stringify(data.files)
}
$.post('/platform/proposal/transact/compose' + method, {
data: JSON.stringify(data),
sign: data.sign
}).then(res => {
if (res.code == 0) {
loading.close()
this.$notify.success({title: '成功', message: res.msg});
sublime.jumpPagePjax('/platform/proposal/transact/compose')
} else {
this.$notify.error({title: '失败', message: res.msg});
}
})
loading.close()
}
});
},
async doSubmit() {
const valid = await this.$refs["addForm"].validate()
if (valid) {
const confirm = await this.$confirm('确定要提交此提案吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'info',
})
if ("confirm" === confirm) {
let data = clone(this.formData)
if (data.files) {
data.files = JSON.stringify(data.files)
}
const resp = await $.post(loc() + "/doSubmit", {
data: JSON.stringify(data)
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: resp.msg})
sublime.jumpPagePjax('/platform/proposal/transact/compose')
}, () => {
this.$notify.warning({title: '警告', message: resp.msg})
})
}
}
},
handleSelectionChange(val) {
this.dbUserSelection = val.map(v => v.id);
},
pageNumberChange2(val) {
this.pageForm2.pageNumber = val;
this.queryDb();
},
pageSizeChange2(val) {
this.pageForm2.pageSize = val;
this.queryDb();
},
async delegationChange(val) {
this.unionList = await getUnions(val)
},
async jdhChange(val) {
this.delegations = await getDbt(val)
},
async queryDb() {
const {jdhid, dbtid, unionid, unitid, proposalId} = this.pageForm2
const data = await $.get("/platform/proposal/transact/compose/queryDb", {
...this.pageForm2,
pageForm2: this.pageForm2,
proposalId: proposalId,
jdhid: jdhid,
dbtid: dbtid,
unionid: unionid,
unitid: unitid
})
sublime.closeLoadingbar();
this.dBTableDataLoading = false
if (data.code == 0) {
this.dBTableData = data.data.list;
if (data.data.list[0].secondedNum != undefined) {
this.secondedNum = data.data.list[0].secondedNum
}
this.pageForm2.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
},
async openSeconded() {
let method = this.formData.id ? "/doEdit" : "/doAdd"
const valid = await this.$refs["addForm"].validate()
if (valid) {
let data = clone(this.formData)
if (data.files) {
data.files = JSON.stringify(data.files)
}
const resp = await $.post('/platform/proposal/transact/compose' + method, {
data: JSON.stringify(data),
sign: data.sign
})
sublime.jumpPagePjax('/platform/proposal/transact/compose?operation=invite&id=' + resp.data)
}
// if (this.formData.id == "") {
// this.$notify.warning({title: '警告', message: "请先保存后在邀请附议人"});
// return
// }
// this.pageForm2.proposalId = this.formData.id
// this.pageForm2.proposalName = this.formData.proposalName
// await this.queryDb()
// this.$refs.guava.public()
/* this.secondedFormData = {
proposalId: this.formData.id,
users: [],
}
this.secondedData()
this.userOptions = []
this.userLoading = false
this.secondedDialog = true*/
},
async secondedData() {
const {data} = await $.get("/platform/proposal/transact/compose/getSecondedData", {proposalId: this.secondedFormData.proposalId})
this.secondedTableData = data
},
async userRemoteMethod(query) {
if (query) {
this.userLoading = true
const arr = await this.queryUser(this.secondedFormData.proposalId, query)
this.userOptions = this.userOptions.filter(v => {
return this.secondedFormData.users.includes(v.id)
}).concat(arr.filter(v => {
return !this.secondedFormData.users.includes(v.id)
}));
this.userLoading = false
}
},
async queryUser(proposalId, query) {
const {data} = await $.get("/platform/proposal/transact/compose/queryDelegate", {proposalId, query})
return data
},
async addSeconded(id) {
const {proposalName, proposalId} = this.pageForm2
if (id === 0 && this.dbUserSelection.length === 0) {
this.$message.warning('请先选择附议人后再点击邀请按钮')
return
}
if (id != 0) this.dbUserSelection = [].concat(id)
let aa = "请确认所选代表是否作为本提案的附议人?"
if (this.dBTableData[0].secondedNum >= this.config.seconderNum) aa = "您已邀请了" + this.dBTableData[0].secondedNum + " 名附议人,是否继续邀请?"
const confirm = await this.$confirm(aa + '确定后会有信息通知!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
const resp = await $.post("/platform/proposal/transact/compose/addSeconded", {
proposalId: proposalId,
proposalName: proposalName,
users: JSON.stringify(this.dbUserSelection),
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: '邀请附议人成功'});
this.$refs.multipleTable.clearSelection();
this.queryDb()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
})
}
/* if (this.secondedFormData.users.length === 0) {
this.$message.warning('请先选择附议人后再点击邀请按钮')
return
}
this.$confirm('确认邀请吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.subDisabled = true
const {proposalId, users, proposalName} = this.secondedFormData
const resp = await $.post(loc() + "/addSeconded", {
proposalId: proposalId,
proposalName: proposalName,
users: JSON.stringify(users)
})
requestLaterFun(resp, () => {
this.$notify.success({title: '成功', message: '邀请附议人成功'});
this.userOptions = []
this.secondedFormData.users = []
this.secondedData()
}, () => {
this.$notify.error({title: '失败', message: resp.msg});
}, () => {
this.subDisabled = false
})
}).catch(() => {
});*/
},
async getDictByCode() {
const {data} = await $.get("/platform/proposal/basics/config/getDictByCode", {code: "proposal_manner"})
return data
},
async initData() {
this.config = await proposal.getProposalConfig()
this.meetingOptions = await proposal.getOpenMeeting()
this.typeOptions = await proposal.getProposalType()
this.unitOptions = await proposal.getProposalUndertake()
this.allMannerList = await this.getDictByCode("proposal_manner");
this.pageForm.teacherMeetingId = this.meetingOptions ? this.meetingOptions[0].id : null
this.jdhList = await getAllJdh()
if (this.jdhList.length > 0) {
this.pageForm2.jdhid = this.jdhList[0].id
this.delegations = await getDbt(this.jdhList[0].id)
}
this.unionList = await getUnion();
this.allUnitList = await getUnit();
this.unitList = clone(this.allUnitList);
if (this.meetingOptions.length === 0) {
this.notifyWarning('当前没有开启的教代会,无法撰写提案!')
return
}
this.delegationOptions = await proposal.getDelegation(this.pageForm.teacherMeetingId)
// this.committeeOptions = await proposal.getCommittee(this.pageForm.teacherMeetingId)
const {teacherMeetingId} = this.pageForm
const data = await proposal.getDelegationId(teacherMeetingId)
const jgcy = await $.post(loc() + "/getJdhJgcy", {jdhid: teacherMeetingId})
const cbdwFzr = await $.post(loc() + "/getCbdwFzr")
if (jgcy.data > 0) {
const jgName = await $.post(loc() + "/getJgNameByuser")
this.committeeOptions = jgName.data
}
if (this.allMannerList.length > 0) {
this.config.manner.forEach(v => {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W01") {
this.mannerList.push(this.allMannerList.find(z => z.code == v))
}
if ("${@shiro.hasRole('sysadmin')||(@shiro.hasRole('jdhdb01')&&@shiro.hasRole('jdhdbt01'))}" === 'true' && v === "W02") {
this.mannerList.push(this.allMannerList.find(z => z.code == v))
}
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W03" && jgcy.data > 0) {
this.mannerList.push(this.allMannerList.find(z => z.code == v))
}
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W04" && cbdwFzr.data > 0) {
this.mannerList.push(this.allMannerList.find(z => z.code == v))
}
})
}
this.formData = {
username: '${@shiro.getPrincipalProperty("username")}',
createTime: moment().format('YYYY-MM-DD'),
teacherMeetingId: teacherMeetingId,
delegationId: data ? data.dbtid : '',
id: '',
sign: '',
mannerCode: 'W01'
}
this.$nextTick(() => {
$("#briefEditor").html("")
$("#measuresEditor").html("")
briefEditor = new E("#briefEditor")
briefEditor.config.onchange = (html) => {
this.formData.brief = html
}
measuresEditor = new E("#measuresEditor")
measuresEditor.config.onchange = (html) => {
this.formData.measures = html
}
briefEditor.create()
measuresEditor.create()
})
if (this.$refs["addForm"])
this.$refs["addForm"].resetFields();
const id = GetQueryString("proposalId")
if (id) {
await this.editProposal()
} else {
if (this.config.writeRemind) {
this.writeRemindDialog = true
}
}
// await this.editProposal()
},
async editProposal() {
const id = GetQueryString("proposalId")
if (id) {
const resp = await $.get("/platform/proposal/transact/compose/findOne", {id})
if (resp.data.files) {
resp.data.files = JSON.parse(resp.data.files)
}
this.formData = resp.data
this.$nextTick(() => {
briefEditor.txt.html(resp.data.brief)
measuresEditor.txt.html(resp.data.measures)
})
}
},
async meetingChange(val) {
this.formData.delegationId = null
this.formData.committeeId = null
this.delegationOptions = await proposal.getDelegation(val)
// this.committeeOptions = await proposal.getCommittee(val)
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->