224 lines
9.4 KiB
HTML
224 lines
9.4 KiB
HTML
<!--#
|
|
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 :loading="tableLoading" :page="pageForm" :data="tableData"
|
|
@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" header-align="center" label="操作" fixed="right" 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 v-if="[proposal.SCHOOL_LEAD_AUDIT].includes(row.stateCode)"
|
|
:command="{type:'audit',data:row}">
|
|
批示
|
|
</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 ref="audit" label="分管校领导批示" handle>
|
|
<template #handle>
|
|
<el-form :model="formData" ref="auditForm" :rules="formRules" label-width="120px">
|
|
<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" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item prop="auditTime" label="批示时间">
|
|
<el-input v-model="formData.auditTime" disabled></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="签  字">
|
|
<sign prefix="proposal" :qz.sync="formData.sign"></sign>
|
|
</el-form-item>
|
|
|
|
<el-row style="margin: 40px 0;text-align: right">
|
|
<el-button type="danger" :disabled="submitDisabled" @click="doAudit(false)">退 回</el-button>
|
|
<el-button type="primary" :disabled="submitDisabled" @click="doAudit(true)">提 交</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],
|
|
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
|
|
})
|
|
|
|
loading.close()
|
|
this.submitDisabled = false
|
|
if(resp.code===0){
|
|
this.notifySuccess(resp.msg)
|
|
this.pageData()
|
|
this.$refs.guava.index()
|
|
}else{
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
});
|
|
},
|
|
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>
|
|
|
|
<!--#
|
|
}
|
|
#--> |