first commit
This commit is contained in:
@@ -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="签  字" 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user