first commit
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="附议提案" fixed placeholder :left-arrow="leftArrow" safe-area-inset-top
|
||||
@click-left="history.back()"></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">
|
||||
<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>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
leftArrow: false,
|
||||
proposalId: GetQueryString('proposal_id'),
|
||||
secondedInfo: {
|
||||
isAgree: false
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'proposal-info': httpVueLoader('/components/proposal/wechat/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.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
loading.close()
|
||||
this.$refs.pi.openView(this.proposalId)
|
||||
this.getSecondedCount()
|
||||
}, 1200)
|
||||
} else {
|
||||
loading.type = 'fail'
|
||||
loading.message = '提交失败,请联系管理员'
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
getSecondedCount() {
|
||||
const biz_key = GetQueryString("biz_key")
|
||||
$.post("/public/wechat/getSecondedCount", {
|
||||
proposalId: this.proposalId,
|
||||
id: biz_key
|
||||
}).then(res => {
|
||||
this.secondedInfo = res
|
||||
})
|
||||
}
|
||||
},
|
||||
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();
|
||||
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