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

459 lines
23 KiB
HTML

<!--#
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 shadow="never" class="mt20">
<table-tool label="提案委员会秘书分类整理" :app="this">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" align="center" header-align="center" :row-key="(row)=>{row.id}"
:size="tableSize"
@sort-change="pageOrder">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
:label="column.label"
:width="column.width"
:prop="column.prop"
:sortable="column.sortable"
>
<template v-if="column.prop=='proposalName'" scope="{row}">
<el-link type="primary" @click="openView(row)">{{row.proposalName}}</el-link>
</template>
<template v-else-if="column.prop=='isConjoin'" scope="{row}">
<span :style="row.isConjoin === 1 ? 'color: #236eb4' : ''">{{row.isConjoin === 1 ? '是' : '否'}}</span>
</template>
<template v-else-if="column.prop=='underTakeOpinion'" scope="{row}">
<template v-if="row.stateCode>proposal.CASEUNIT">
<i class="fa fa-circle text-success ml5"></i>
</template>
<template v-else>
<i v-if="row.canNotNum>0" class="fa fa-circle text-danger ml5"></i>
<i v-else class="fa fa-circle text-success ml5"></i>
</template>
</template>
<template v-else-if="column.prop=='auditState'" scope="{row}">
<span v-if="row.stateCode!=proposal.CASEUNIT">已审核</span>
<span v-if="row.stateCode==proposal.CASEUNIT">待审核</span>
</template>
<template v-else-if="column.prop=='laLevelName'" scope="{row}">
<span>
{{!row.determineTypeCode ? '否' : row.determineTypeCode === 'emphasis' ? '重点' : '普通'}}
</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right" 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 ref="audit" label="提案工作委员会秘书分类整理" handle>
<template #handle>
<el-form :model="formData" ref="auditForm" :rules="formRules" label-width="120px">
<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" prop="proposalCode"
label="提案编号"></el-table-column>
<el-table-column align="left" header-align="left" prop="username"
label="提案人"
show-overflow-tooltip></el-table-column>
<el-table-column align="left" header-align="left" prop="proposalName" label="提案名称"
show-overflow-tooltip>
<template slot-scope="{row}">
<span style="color: #236eb4;">{{row.proposalName}}</span>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button v-if="clickRow.id !== scope.row.id" size="mini" type="danger"
@click="delProposal(scope.row, scope.$index)">移除
</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 prop="username" label="审核人">
<el-input v-model="formData.username" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item prop="resultCode" label="立案结果">
<el-radio-group @change="resultCodeChange" v-model="formData.resultCode">
<el-radio v-for="item in resultOptions" :label="item.code" border>
{{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 prop="typeId" label="提案类型">
<el-select v-model="formData.typeId" filterable clearable
placeholder="提案类型">
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.typeName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" v-if="formData.resultCode!='notGive'">
<el-col :span="12">
<el-form-item prop="hostUnit" label="主办单位">
<el-select v-model="formData.hostUnit" filterable clearable
placeholder="请选择主办单位">
<el-option v-for="item in unitOptions"
:key="item.id"
:label="item.unitName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="主办单位领导" v-if="formData.hostUnit">
<el-input v-model="hostUnitLeader" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item prop="helpUnit" label="协办单位">
<el-select v-model="formData.helpUnit" multiple filterable clearable
placeholder="请选择协办单位">
<el-option v-for="item in unitOptions"
:key="item.id"
:label="item.unitName"
:value="item.id">
</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 v-model="helpUnitLeader" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="意见">
<el-input type="textarea" v-model="formData.opinion" rows="4" maxlength="1000"
placeholder="请填写工作会的审核意见"></el-input>
</el-form-item>
<el-form-item v-if="isSign()" prop="sign" label="签&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="$refs.guava.index()">取 消</el-button>
<el-button type="primary" :disabled="submitDisabled" @click="doAudit">提 交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
var 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 {
typeOptions: [],
clickRow: {},
proTableData: [],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(400)
},
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},
{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.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()
}
})
</script>
<!--#
}
#-->