250 lines
11 KiB
HTML
250 lines
11 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
<style>
|
|
#app {
|
|
height: 100%;
|
|
}
|
|
|
|
.cell-card {
|
|
padding: 20px;
|
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
width: 90%;
|
|
margin: 20px auto;
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.text-overflow {
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.handleicon {
|
|
width: 50%;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
<div id="app" v-cloak>
|
|
<van-nav-bar title="提案列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
|
|
|
<van-search
|
|
v-model="pageForm.searchKeyWord"
|
|
shape="round"
|
|
maxlength="10"
|
|
@search="doSearch"
|
|
placeholder="请输入提案名称或者提案编号进行查询"
|
|
></van-search>
|
|
|
|
<van-dropdown-menu>
|
|
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item>
|
|
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList" @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="active" @click="onClickActive">
|
|
<van-tab title="未审核">
|
|
<div>
|
|
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
|
|
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id,o.secondedId)">
|
|
<div style="display: flex">
|
|
<div style="width: 75%">
|
|
<div class="text-overflow" style="font-weight: bold; color: #409eff">{{o.proposalName}}</div>
|
|
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
|
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
|
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
|
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
|
</div>
|
|
<div style="width: 25%; display: flex; align-items: center">
|
|
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
|
</div>
|
|
</div>
|
|
<van-divider></van-divider>
|
|
<div style="display: flex; font-size: 12px">
|
|
<div style="width: 38%">
|
|
<div style="color: gray">教代会届次</div>
|
|
<div class="text-overflow">{{o.meetingName}}</div>
|
|
</div>
|
|
<div style="width: 38%">
|
|
<div style="color: gray">提案类型</div>
|
|
<div class="text-overflow">{{o.typeName}}</div>
|
|
</div>
|
|
<div style="width: 23%">
|
|
<div style="color: gray">立案结果</div>
|
|
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
|
</div>
|
|
</div>
|
|
</van-cell>
|
|
</van-list>
|
|
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
|
</div>
|
|
</van-tab>
|
|
<van-tab title="已审核">
|
|
<div>
|
|
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
|
|
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id,o.secondedId)">
|
|
<div style="display: flex">
|
|
<div style="width: 75%">
|
|
<div class="text-overflow" style="font-weight: bold; color: #409eff">{{o.proposalName}}</div>
|
|
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
|
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
|
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
|
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
|
</div>
|
|
<div style="width: 25%; display: flex; align-items: center">
|
|
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
|
</div>
|
|
</div>
|
|
<van-divider></van-divider>
|
|
<div style="display: flex; font-size: 12px">
|
|
<div style="width: 38%">
|
|
<div style="color: gray">教代会届次</div>
|
|
<div class="text-overflow">{{o.meetingName}}</div>
|
|
</div>
|
|
<div style="width: 38%">
|
|
<div style="color: gray">提案类型</div>
|
|
<div class="text-overflow">{{o.typeName}}</div>
|
|
</div>
|
|
<div style="width: 23%">
|
|
<div style="color: gray">立案结果</div>
|
|
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
|
</div>
|
|
</div>
|
|
</van-cell>
|
|
</van-list>
|
|
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
|
</div>
|
|
</van-tab>
|
|
</van-tabs>
|
|
</div>
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el: "#app",
|
|
mixins: [mobileMixins],
|
|
data() {
|
|
return {
|
|
active: 0,
|
|
pageForm: {
|
|
isAudit: false
|
|
},
|
|
list: [],
|
|
state: "0",
|
|
loading: false,
|
|
finished: false,
|
|
refreshing: false,
|
|
sessionList: [],
|
|
delegationList: [],
|
|
proposalTypeList: [],
|
|
resultList: [],
|
|
isAuditList: [
|
|
{ text: "未审核", value: false },
|
|
{ text: "已审核", value: true }
|
|
]
|
|
}
|
|
},
|
|
methods: {
|
|
async onRefresh() {
|
|
this.tableData = []
|
|
this.pageForm = {
|
|
pageNumber: 1,
|
|
pageSize: 5,
|
|
totalCount: 0
|
|
}
|
|
await this.onLoad()
|
|
setTimeout(() => {
|
|
this.refreshing = false
|
|
}, 1000)
|
|
},
|
|
doSearch() {
|
|
this.onLoad()
|
|
},
|
|
onClickActive(name) {
|
|
this.$set(this.pageForm, "isAudit", name)
|
|
this.onLoad()
|
|
},
|
|
async onLoad() {
|
|
this.tableData = []
|
|
this.loading = true
|
|
$.post("/platform/mobile/proposal/seconded/pageData", this.pageForm).then((res) => {
|
|
this.loading = false
|
|
if (res.code === 0) {
|
|
this.tableData = this.tableData.concat(res.data.list)
|
|
if (this.tableData.length === res.data.totalCount) {
|
|
this.finished = true
|
|
} else {
|
|
this.finished = true
|
|
this.pageForm.pageNumber++
|
|
}
|
|
}
|
|
})
|
|
},
|
|
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 = '/platform/mobile/proposal/compose/detail?id=' + id
|
|
window.location.href = "/platform/mobile/proposal/seconded/view?biz_key=" + secondedId + "&proposal_id=" + id + "&mobile=" + true
|
|
}
|
|
},
|
|
async created() {
|
|
this.sessionList = await mProposal.getAllSession()
|
|
const a = await getProposalType()
|
|
if (a) {
|
|
a.forEach((v) => {
|
|
this.proposalTypeList.push({ text: v.typeName, value: v.id })
|
|
})
|
|
this.proposalTypeList.unshift({ text: "所有类型", value: null })
|
|
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
|
}
|
|
if (this.sessionList && this.sessionList.length > 0) {
|
|
this.$set(this.pageForm, "sessionId", this.sessionList[0].value)
|
|
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
|
if (this.delegationList) {
|
|
this.$set(this.pageForm, "delegationId", this.delegationList[0].value)
|
|
}
|
|
}
|
|
const aa = await getDictOptions("proposal_result")
|
|
console.log(aa)
|
|
if (a) {
|
|
aa.forEach((v) => {
|
|
this.resultList.push({ text: v.name, value: v.code })
|
|
})
|
|
this.resultList.unshift({ text: "所有结果", value: null })
|
|
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
|
}
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|