107 lines
3.8 KiB
HTML
107 lines
3.8 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
<div id="app" v-cloak>
|
|
<van-nav-bar title="附议提案" fixed placeholder :left-arrow="leftArrow" safe-area-inset-top
|
|
@click-left="pjaxReplace('/mobile/proposal/seconded')"></van-nav-bar>
|
|
<proposal-info :proposal_id="proposalId" ref="pi"></proposal-info>
|
|
|
|
<van-row v-if="secondedInfo.isAgree==null">
|
|
<div class="van-cell-group__title" style="padding: 5px 0 0 0 !important;">
|
|
<div class="van-sidebar-item van-sidebar-item--select">
|
|
附议提案
|
|
</div>
|
|
</div>
|
|
<div style="display: flex;justify-content: space-around;padding: 5px 0 20px 0;">
|
|
<van-button :color="themeColor" plain style="flex: 1;margin: 0 10px 0 10px" @click="openDialog(false)">拒绝
|
|
</van-button>
|
|
<van-button :color="themeColor" style="flex: 1;margin: 0 10px 0 10px" @click="openDialog(true)">同意
|
|
</van-button>
|
|
</div>
|
|
</van-row>
|
|
|
|
|
|
</div>
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [mobileMixins],
|
|
data() {
|
|
return {
|
|
leftArrow: false,
|
|
proposalId: GetQueryString('proposal_id'),
|
|
secondedInfo: {
|
|
isAgree: false
|
|
}
|
|
}
|
|
},
|
|
components: {
|
|
'proposal-info': httpVueLoader('/components/proposal/mobile/ProposalInfo.vue?v=' + new Date().getTime()),
|
|
},
|
|
methods: {
|
|
openDialog(flag) {
|
|
const res = flag === true ? '通过' : '拒绝'
|
|
vant.Dialog.confirm({
|
|
title: '提示',
|
|
message: '您确定' + res + '附议该提案吗?',
|
|
}).then(async () => {
|
|
const loading = this.$toast({
|
|
duration: 0,
|
|
message: '提交中...',
|
|
forbidClick: true,
|
|
loadingType: 'spinner',
|
|
type: 'loading',
|
|
overlay: true
|
|
});
|
|
const resp = await $.post("/platform/proposal/transact/seconded/doAudit", {
|
|
secondedId: this.secondedInfo.id,
|
|
proposalId: this.proposalId,
|
|
flag: flag
|
|
})
|
|
if (resp.code === 0) {
|
|
setTimeout(async () => {
|
|
loading.close()
|
|
this.$refs.pi.openView(this.proposalId)
|
|
this.getSecondedCount()
|
|
this.$toast.success("操作成功")
|
|
}, 1200)
|
|
} else {
|
|
loading.close()
|
|
this.$toast.fail("操作失败,请及时联系管理员")
|
|
}
|
|
|
|
})
|
|
},
|
|
getSecondedCount() {
|
|
const biz_key = GetQueryString("biz_key")
|
|
$.post("/mobile/proposal/seconded/getSecondedCount", {
|
|
proposalId: this.proposalId,
|
|
id: biz_key
|
|
}).then(res => {
|
|
this.secondedInfo = res.data
|
|
})
|
|
}
|
|
},
|
|
async created() {
|
|
if (GetQueryString("mobile")) this.leftArrow = true
|
|
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.getSecondedCount();
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|