first commit
This commit is contained in:
@@ -0,0 +1,140 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="分管校领导批示" fixed placeholder safe-area-inset-top></van-nav-bar>
|
||||
<proposal-info :proposal_id="proposalId" title="分管校领导批示" :handle="handle" ref="info">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分管校领导批示
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-cell-group class="info">
|
||||
<van-cell title="审核时间" :value="formData.auditTime"></van-cell>
|
||||
<van-field
|
||||
input-align="right"
|
||||
v-model="formData.opinion"
|
||||
rows="2"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
placeholder="请输入审核意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
<van-row type="flex" :gutter="20" style="padding: 20px 0px">
|
||||
<van-col span="12" style="padding: 0 10px">
|
||||
<van-button plain :color="themeColor" block size="large" @click="doAudit(false)">退回</van-button>
|
||||
</van-col>
|
||||
<van-col span="12" style="padding: 0 10px">
|
||||
<van-button :color="themeColor" block size="large" @click="doAudit(true)">通过</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-form>
|
||||
</template>
|
||||
</proposal-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
proposalId: '',
|
||||
replyUnitId: '',
|
||||
formData: {
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
opinion: '',
|
||||
proposalId: GetQueryString('proposal_id')
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'proposal-info': httpVueLoader('/components/proposal/wechat/ProposalInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
doAudit(flag) {
|
||||
if (this.formData.opinion === '') {
|
||||
vant.Toast('请输入审核意见');
|
||||
return
|
||||
}
|
||||
const message = '您是否' + (flag ? '通过' : '退回') + '该提案?'
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: message,
|
||||
})
|
||||
.then(async () => {
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
const resp = await $.post("/platform/proposal/transact/audit/doAudit", {
|
||||
audit: JSON.stringify(this.formData),
|
||||
replyUnitId: this.replyUnitId,
|
||||
flag: flag
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(async () => {
|
||||
loading.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
loading.close()
|
||||
this.handle = await mProposal.GetProposalStateCode(this.proposalId) === 900
|
||||
this.$refs.info.openView(this.proposalId)
|
||||
}, 1200)
|
||||
} else {
|
||||
loading.type = 'fail'
|
||||
loading.message = '提交失败,请联系管理员'
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const proposal_id = GetQueryString("proposal_id")
|
||||
const biz_key = GetQueryString("biz_key")
|
||||
if (proposal_id === '' || biz_key === '') {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '非法参数',
|
||||
showConfirmButton: false
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.proposalId = GetQueryString('proposal_id')
|
||||
this.replyUnitId = GetQueryString('biz_key')
|
||||
this.handle = await mProposal.GetProposalStateCode(this.proposalId) === 900
|
||||
const lastIndex = window.location.href.lastIndexOf('&')
|
||||
if (window.location.href.substr(lastIndex + 1, 6) === 'ticket') {
|
||||
window.document.location.replace(window.location.href.substring(0, lastIndex))
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user