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

187 lines
7.9 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_UNDERSIGN].includes(row.stateCode)"
:command="{type:'audit',data:row}">
签署
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</template>
</proposal-table>
<!--#include("/layouts/pagination.html"){}#-->
</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="签&emsp;&emsp;字">
<sign prefix="proposal" :qz.sync="formData.sign"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<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],
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
})
loading.close()
this.submitDisabled = false
if(resp.code===0){
this.notifySuccess(resp.msg)
this.pageData()
this.$refs.guava.index()
}else{
this.notifyWarning(resp.msg)
}
}
});
}
},
async created() {
await initData(proposal.SCHOOL_LEAD_UNDERSIGN, this)
}
})
</script>
<!--#
}
#-->