first commit
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
<!--#
|
||||
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/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.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("/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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,241 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 12px 0 12px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="附议提案"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<!-- <van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
</van-dropdown-menu>
|
||||
|
||||
|
||||
<van-tabs v-model="pageForm.isAudit" @change="doSearch()">
|
||||
<van-tab title="未附议" :name="false"></van-tab>
|
||||
<van-tab title="已附议" :name="true"></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div style="margin: 170px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading" :immediate-check="false"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<div @click="openView(o.id,o.secondedId)">
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
|
||||
<span class="title_span" :style="'color:'+o.stateColor">|</span>提案名称:{{o.proposalName}}
|
||||
</div>
|
||||
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right" v-if="!o.isAgree">
|
||||
<van-tag :style="'color:'+o.stateColor" size="medium" plain round>附议
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
||||
<span style="color: grey">代 表 团:</span>{{o.delegationName}}
|
||||
</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
|
||||
</van-row>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title" style="margin-top: 11px">
|
||||
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
|
||||
<span style="color: grey;margin-left: 24%;">附 议 人:</span>{{o.secondedUserName}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- <van-cell-group inset>
|
||||
<van-cell title="提案名称" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.proposalName}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="提案编号">{{o.proposalCode}}</van-cell>
|
||||
<van-cell :border="false" title="附  议  人">{{o.secondedUserName}}</van-cell>
|
||||
<van-cell :border="false" title="提案类型">{{o.typeName}}</van-cell>
|
||||
<van-cell :border="false" title="提案状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>-->
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
auditList: [
|
||||
{text: '未附议', value: false},
|
||||
{text: '已附议', value: true},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post(loc() + '/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
doAudit(flag, row) {
|
||||
const {id, secondedId} = row
|
||||
let res = flag === true ? '通过' : '拒绝'
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定' + res + '吗?',
|
||||
}).then(() => {
|
||||
$.post('/platform/proposal/transact/seconded/doAudit', {
|
||||
secondedId: secondedId,
|
||||
proposalId: id,
|
||||
flag: flag
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('提交成功!')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
openView(id, secondedId) {
|
||||
window.location.href = '/mobile/proposal/seconded/view?biz_key=' + secondedId + '&proposal_id=' + id + '&mobile=' + true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
}
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
this.onLoad()
|
||||
},
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.onLoad()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user