176 lines
6.6 KiB
HTML
176 lines
6.6 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.van-radio--horizontal{
|
|
width: 45%;
|
|
margin-top: 12px;
|
|
}
|
|
</style>
|
|
|
|
<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="undertakeName"></van-cell>
|
|
<van-cell title="答复时间" :value="formData.replyTime"></van-cell>
|
|
|
|
<van-cell title="落实情况"></van-cell>
|
|
|
|
<van-radio-group v-model="formData.implementState" direction="horizontal"
|
|
checked-color="#081776"
|
|
style="font-size: 12px;padding: 10px 0 10px 16px;box-sizing: border-box;background: #FFFFFF;
|
|
justify-content: center">
|
|
<van-radio name="已经落实" shape="square">已经落实</van-radio>
|
|
<van-radio name="正在落实" shape="square">正在落实</van-radio>
|
|
<van-radio name="暂缓落实" shape="square">暂缓落实</van-radio>
|
|
<van-radio name="不能落实" shape="square">不能落实</van-radio>
|
|
</van-radio-group>
|
|
|
|
<van-field
|
|
input-align="right"
|
|
v-model="formData.replyContent"
|
|
rows="2"
|
|
autosize
|
|
required
|
|
label="答复内容"
|
|
type="textarea"
|
|
maxlength="1000"
|
|
placeholder="请输入答复内容"
|
|
show-word-limit
|
|
></van-field>
|
|
|
|
<van-field name="files" label="附  件">
|
|
<template #input>
|
|
<upload :files.sync="formData.files"></upload>
|
|
</template>
|
|
</van-field>
|
|
</van-cell-group>
|
|
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
|
<van-col span="24">
|
|
<van-button :color="themeColor" block size="large" @click="doAudit">提 交
|
|
</van-button>
|
|
</van-col>
|
|
</van-row>
|
|
</van-form>
|
|
|
|
</template>
|
|
</proposal-info>
|
|
</div>
|
|
|
|
<script>
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [mobileMixins],
|
|
data() {
|
|
return {
|
|
undertakeId: "",
|
|
undertakeName: "",
|
|
handle: true,
|
|
isReply: true,
|
|
proposalId: GetQueryString('proposal_id'),
|
|
formData: {
|
|
username: "${@shiro.getPrincipalProperty('username')}",
|
|
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
|
replyTime: moment().format('YYYY-MM-DD'),
|
|
replyContent: '',
|
|
proposalId: GetQueryString('proposal_id'),
|
|
implementState:'已经落实'
|
|
},
|
|
show: false,
|
|
actions: [{name: '选项一'}, {name: '选项二'}, {name: '选项三'}],
|
|
}
|
|
},
|
|
components: {
|
|
'proposal-info': httpVueLoader('/components/proposal/wechat/ProposalInfo.vue?v=' + new Date().getTime()),
|
|
'upload': httpVueLoader('/components/plugins/VantFileUpload.vue'),
|
|
},
|
|
methods: {
|
|
async doAudit() {
|
|
if (this.formData.replyContent === '') {
|
|
vant.Toast('请输入审核意见');
|
|
return
|
|
}
|
|
|
|
const loading = this.$toast({
|
|
duration: 0,
|
|
message: '提交中...',
|
|
forbidClick: true,
|
|
loadingType: 'spinner',
|
|
type: 'loading',
|
|
overlay: true
|
|
});
|
|
|
|
//根据用户id和提案查询承办单位id
|
|
this.formData.replyUnitId = this.undertakeId
|
|
const resp = await $.post("/platform/proposal/transact/reply/doReply", {
|
|
reply: JSON.stringify(this.formData),
|
|
sign: ""
|
|
})
|
|
|
|
if (resp.code === 0) {
|
|
setTimeout(async () => {
|
|
loading.type = 'success'
|
|
loading.message = '提交成功'
|
|
loading.close()
|
|
this.handle = this.isReply == true
|
|
this.$refs.info.openView(this.proposalId)
|
|
}, 1200)
|
|
} else {
|
|
loading.type = 'fail'
|
|
loading.message = '提交失败,请联系管理员'
|
|
}
|
|
|
|
|
|
},
|
|
|
|
async getIsReply() {
|
|
const res = await $.post("/public/wechat/getIsReply", {
|
|
proposalId: this.proposalId,
|
|
undertakeId: this.undertakeId
|
|
})
|
|
this.isReply = res.isreply
|
|
},
|
|
async getUnderTakeName() {
|
|
this.undertakeName = await $.post("/public/wechat/getUnderTakeName", {
|
|
underTakeId: this.undertakeId
|
|
})
|
|
}
|
|
},
|
|
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.undertakeId = GetQueryString("biz_key")
|
|
this.formData.replyUnitId = this.undertakeId
|
|
await this.getIsReply()
|
|
await this.getUnderTakeName()
|
|
this.handle = this.isReply !== true
|
|
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>
|
|
|
|
|
|
<!--#
|
|
}
|
|
#--> |