526 lines
19 KiB
HTML
526 lines
19 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
<style>
|
|
|
|
.van-doc-card {
|
|
margin: 10px;
|
|
padding: 12px 12px 12px 12px;
|
|
background-color: #fff;
|
|
border-radius: 6px;
|
|
box-shadow: 0 8px 12px #ebedf0;
|
|
line-height: 20px;
|
|
position: relative;
|
|
}
|
|
|
|
.van-dropdown-menu__item {
|
|
flex: auto;
|
|
}
|
|
|
|
.list-card {
|
|
position: relative;
|
|
margin: 10px;
|
|
background-color: #fff;
|
|
border-radius: 6px;
|
|
box-shadow: 0 8px 12px #ebedf0;
|
|
width: auto;
|
|
}
|
|
|
|
.list-card > .content {
|
|
padding: 16px 10px 8px;
|
|
display: flex;
|
|
max-height: 100px;
|
|
}
|
|
|
|
.content-right {
|
|
width: calc(100% - 150px);
|
|
max-width: calc(100% - 150px);
|
|
padding-left: 15px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.cr-title {
|
|
/*max-height: 40px;*/
|
|
line-height: 20px;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.van-grid-item__content {
|
|
padding: 0;
|
|
}
|
|
|
|
.choose_button .button_text {
|
|
font-size: 14px;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.concat, .mobile, .union {
|
|
font-size: 13px;
|
|
line-height: 18px;
|
|
width: 100%;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.footer {
|
|
background-color: white;
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100%;
|
|
height: 60px;
|
|
display: flex;
|
|
justify-content: space-evenly;
|
|
align-items: center;
|
|
left: 0;
|
|
}
|
|
|
|
.footer .van-button {
|
|
height: 34px;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.active {
|
|
background-color: #1867b0;
|
|
color: white;
|
|
}
|
|
|
|
.no_active {
|
|
background-color: #e7e9f0;
|
|
color: #69707a;
|
|
}
|
|
|
|
.van-row {
|
|
text-align: center;
|
|
color: #1867b0;
|
|
font-weight: bold;
|
|
padding: 0px 0px 10px 0px;
|
|
font-family: cursive;
|
|
}
|
|
|
|
.van-col {
|
|
line-height: 24px;
|
|
}
|
|
|
|
.van-list {
|
|
padding-bottom: 10px;
|
|
}
|
|
|
|
.popVisible {
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: white;
|
|
}
|
|
|
|
.pop_footer {
|
|
background-color: white;
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100%;
|
|
height: 60px;
|
|
display: flex;
|
|
justify-content: space-evenly;
|
|
align-items: center;
|
|
left: 0;
|
|
}
|
|
|
|
.pop_footer .van-button {
|
|
height: 34px;
|
|
border-radius: 6px;
|
|
width: 90%;
|
|
}
|
|
|
|
.cus_button {
|
|
background-color: #0e78c5;
|
|
color: white;
|
|
}
|
|
|
|
.van-tag {
|
|
padding: 2px 7px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.cus_content {
|
|
height: calc(100% - 40px - 46px - 60px);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.van-col {
|
|
line-height: 24px;
|
|
}
|
|
|
|
.desc_info div {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.operateDiv {
|
|
text-align: right;
|
|
padding-right: 10px;
|
|
padding-bottom: 6px;
|
|
}
|
|
|
|
.operateDiv .van-button {
|
|
height: 28px;
|
|
border-radius: 8px;
|
|
margin-left: 4px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
<van-sticky>
|
|
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder
|
|
title="我的疗休养"></van-nav-bar>
|
|
</van-sticky>
|
|
|
|
<van-dropdown-menu>
|
|
<van-dropdown-item v-model="pageForm.year" :options="yearArray"
|
|
@change="doSearch"></van-dropdown-item>
|
|
</van-dropdown-menu>
|
|
|
|
<!--按钮导航-->
|
|
<div class="choose_button van-doc-card">
|
|
<van-grid :column-num="chooseButton.length" :border="false">
|
|
<van-grid-item @click="pageForm.theRapyRecuperationType = item.value; doSearch()"
|
|
v-for="item in chooseButton">
|
|
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
|
<div :style="pageForm.theRapyRecuperationType == item.value ? 'color: #1867b0; font-weight: bold' : 'color: black; font-weight: normal'"
|
|
class="button_text">{{item.label}}
|
|
</div>
|
|
</van-grid-item>
|
|
</van-grid>
|
|
</div>
|
|
|
|
<van-list
|
|
:finished="finished"
|
|
:immediate-check="true"
|
|
finished-text="没有更多了"
|
|
v-model="loading">
|
|
<div class="list-card" v-for="o in tableData">
|
|
<div @click="findOne(o)" class="content">
|
|
|
|
<van-image
|
|
height="100"
|
|
radius="8"
|
|
:src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + o.fileId"
|
|
width="150"
|
|
></van-image>
|
|
|
|
<div v-if="pageForm.theRapyRecuperationType != '2' && pageForm.theRapyRecuperationType != '3'"
|
|
class="content-right">
|
|
<div class="cr-title">
|
|
<span>{{o.lineName}}</span>
|
|
<div>
|
|
<van-tag color="#1867b0">{{o.lotName}}</van-tag>
|
|
<van-tag color="#1867b0">{{o.signUpMode === 2 ? '校工会' :
|
|
o.signUpUnionName}}
|
|
</van-tag>
|
|
</div>
|
|
</div>
|
|
<div class="desc_info">
|
|
<!--<div class="union">
|
|
<span>分工会:</span>{{o.signUpUnionName}}
|
|
</div>-->
|
|
<!--<div class="concat">
|
|
<span>时间:</span>{{o.YEAR}}
|
|
</div>-->
|
|
<!--<div class="concat">
|
|
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' + o.signUpUserFamilyNum + '人)'}}
|
|
</div>-->
|
|
<div class="mobile">
|
|
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
|
</div>
|
|
<div class="mobile">
|
|
<span>联系方式:</span>{{o.contactMobileNumber}}
|
|
</div>
|
|
<div class="mobile" v-if="![2715,2725,2735].includes(o.stateId)">
|
|
<span>随行家属:</span>{{o.companionUserNames ? o.companionUserNames : '无'}}
|
|
</div>
|
|
<div class="mobile" v-else>
|
|
<span>审核状态:</span><span :style="'color: ' + o.stateColor">{{o.stateName}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="pageForm.theRapyRecuperationType == '2'" class="content-right">
|
|
<div class="cr-title">
|
|
<span>{{o.travelAgencyName}}</span>
|
|
</div>
|
|
<div>
|
|
|
|
<div class="concat">
|
|
<span>联系人:</span>{{o.contact}}
|
|
</div>
|
|
<div class="mobile">
|
|
<span>联系电话:</span>{{o.contactMobileNumber}}
|
|
</div>
|
|
<!--<div class="mobile">
|
|
<span>邮箱:</span>{{o.email}}
|
|
</div>-->
|
|
<div class="union" style="margin-top: 0">
|
|
<span>官网:</span><span style="color: #0e5996"
|
|
@click.stop="window.open(o.officialWebsite.indexOf('http') !== -1 ? o.officialWebsite : 'https://' + o.officialWebsite)">{{o.officialWebsite}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="pageForm.theRapyRecuperationType == '3'" class="content-right">
|
|
<div class="cr-title">
|
|
<span>{{o.baseName}}</span>
|
|
<div>
|
|
<van-tag color="#1867b0">{{o.regionalNature}}</van-tag>
|
|
<van-tag color="#1867b0">{{o.lotName}}</van-tag>
|
|
</div>
|
|
</div>
|
|
<div class="desc_info">
|
|
<div class="concat">
|
|
<span>联 系 人:</span>{{o.baseContactPerson}}
|
|
</div>
|
|
<div class="mobile">
|
|
<span>联系方式:</span>{{o.baseContactNumber}}
|
|
</div>
|
|
<div class="mobile">
|
|
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="operateDiv">
|
|
<van-button v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() < moment(o.changeEndTime).unix()
|
|
&& ![2715,2725,2735].includes(o.stateId)" @click="edit(o)"
|
|
type="info" size="small" color="#1867b0" :disabled="o.isTakePartIn == true || getDisabled(o)">
|
|
修 改
|
|
</van-button>
|
|
<van-button type="info" size="small" color="#1867b0" @click="cancel(o)"
|
|
:disabled="getDisabled(o)">
|
|
取 消
|
|
</van-button>
|
|
<van-button v-if="o.isTakePartIn == true" type="info" size="small" color="#1867b0"
|
|
@click="satisfaction(o)">满意度反馈</van-button>
|
|
</div>
|
|
|
|
</div>
|
|
</van-list>
|
|
|
|
<div class="footer">
|
|
<van-button @click="pageForm.signUpStateId = 1; getData()" :class="pageForm.signUpStateId == 1 ? 'active' : 'no_active'">已报名</van-button>
|
|
<van-button @click="pageForm.signUpStateId = 2; getData()" :class="pageForm.signUpStateId == 2 ? 'active' : 'no_active'">已参加</van-button>
|
|
<van-button @click="pageForm.signUpStateId = 3; getData()" :class="pageForm.signUpStateId == 3 ? 'active' : 'no_active'">未参加</van-button>
|
|
</div>
|
|
|
|
<van-popup class="popVisible" position="right" v-model="popVisible">
|
|
<van-nav-bar @click-left="popVisible = false" fixed left-arrow placeholder title="满意度评分"></van-nav-bar>
|
|
<div class="cus_content">
|
|
<van-field name="rate" label="旅行社评分">
|
|
<template #input>
|
|
<van-rate v-model="satisfactionForm.evaluationForTravelAgency" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
|
</template>
|
|
</van-field>
|
|
<van-field name="rate" label="路线评分">
|
|
<template #input>
|
|
<van-rate v-model="satisfactionForm.evaluationForLine" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
|
</template>
|
|
</van-field>
|
|
<van-field name="rate" label="风景评分">
|
|
<template #input>
|
|
<van-rate v-model="satisfactionForm.evaluationForJourney" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
|
</template>
|
|
</van-field>
|
|
<van-field
|
|
v-model="satisfactionForm.feedbackContent"
|
|
rows="4"
|
|
autosize
|
|
label="其他建议"
|
|
type="textarea"
|
|
maxlength="100"
|
|
placeholder="请输入其他建议"
|
|
show-word-limit>
|
|
</van-field>
|
|
</div>
|
|
|
|
<div class="pop_footer">
|
|
<van-button @click="satisfactionSubmit" class="cus_button">提交评分</van-button>
|
|
</div>
|
|
</van-popup>
|
|
|
|
</div>
|
|
<script>
|
|
|
|
function getQueryString(name) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if (r != null) return decodeURI(r[2]);
|
|
return null;
|
|
}
|
|
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [mobileMixins],
|
|
data() {
|
|
return {
|
|
yearArray: [],
|
|
popVisible: false,
|
|
chooseButton: [],
|
|
pageForm: {
|
|
theRapyRecuperationType: null,
|
|
signUpStateId: 1,
|
|
year: null,
|
|
},
|
|
loading: false,
|
|
finished: false,
|
|
refreshing: false,
|
|
satisfactionForm: {},
|
|
configData: {},
|
|
}
|
|
},
|
|
methods: {
|
|
getDisabled(o) {
|
|
if(o.regionalNature === '省内') {
|
|
return this.configData.isSnLine && o.stateId === 2750
|
|
}
|
|
if(o.regionalNature === '省外') {
|
|
return this.configData.isSwLine && o.stateId === 2750
|
|
}
|
|
return true
|
|
},
|
|
doSearch() {
|
|
this.loading = true
|
|
this.finished = false
|
|
this.getData()
|
|
},
|
|
satisfaction(o) {
|
|
this.satisfactionForm = {
|
|
id: o.id,
|
|
evaluationForJourney: o.evaluationForJourney ? o.evaluationForJourney * 1 : '',
|
|
evaluationForLine: o.evaluationForLine ? o.evaluationForLine * 1 : '',
|
|
evaluationForTravelAgency: o.evaluationForTravelAgency ? o.evaluationForTravelAgency * 1 : '',
|
|
feedbackContent: o.feedbackContent ? o.feedbackContent : '',
|
|
}
|
|
this.popVisible = true
|
|
},
|
|
async satisfactionSubmit() {
|
|
for (const key in this.satisfactionForm) {
|
|
if(key !== 'feedbackContent' && this.satisfactionForm[key] === '') {
|
|
vant.Toast('请先评分再提交')
|
|
return
|
|
}
|
|
}
|
|
const res = await $.post('/platform/theRapyRecuperation/line/enroll/doFeedBack', this.satisfactionForm)
|
|
if(res.code === 0) {
|
|
this.popVisible = false
|
|
vant.Toast('操作成功')
|
|
this.getData()
|
|
}else {
|
|
vant.Toast(res.msg)
|
|
}
|
|
},
|
|
async edit(o) {
|
|
if (this.pageForm.theRapyRecuperationType != '2' && this.pageForm.theRapyRecuperationType != '3') {
|
|
const res = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
|
enroll: JSON.stringify({
|
|
takePartInLineId: o.takePartInLineId,
|
|
id: o.id,
|
|
takePartInUnionId: o.takePartInUnionId,
|
|
takePartInBaseManagementId: o.takePartInBaseManagementId
|
|
}),
|
|
})
|
|
if (res.code === 0) {
|
|
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.takePartInLineId +
|
|
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo' +
|
|
'&takePartInUnionId=' + o.takePartInUnionId
|
|
} else {
|
|
vant.Toast(res.msg)
|
|
}
|
|
} else if (this.pageForm.theRapyRecuperationType == '3') {
|
|
location.href = '/platform/mobile/theRapyRecuperation/baseInfo?id=' + o.takePartInBaseManagementId +
|
|
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo'
|
|
}
|
|
},
|
|
async cancel(o) {
|
|
if(this.pageForm.theRapyRecuperationType != '2') {
|
|
const re = await $.post('/platform/theRapyRecuperation/line/enroll/canDelete/' + o.id)
|
|
if(re.code !== 0) {
|
|
vant.Toast(re.msg)
|
|
return
|
|
}
|
|
}
|
|
vant.Dialog.confirm({
|
|
title: '温馨提醒',
|
|
message: '您确定要取消此报名吗?',
|
|
}).then(async () => {
|
|
const res = await $.post('/platform/theRapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + o.id)
|
|
if(res.code === 0) {
|
|
vant.Toast('取消成功')
|
|
this.getData()
|
|
}else {
|
|
vant.Toast(res.msg)
|
|
}
|
|
}).catch(() => {});
|
|
},
|
|
async findOne(o) {
|
|
if(this.pageForm.theRapyRecuperationType != '2') {
|
|
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.takePartInLineId + '&fromUrlByMy=edit&takePartInUnionId=' + o.takePartInUnionId
|
|
}
|
|
},
|
|
getData() {
|
|
this.loading = true
|
|
this.pageForm.pageNumber = 1
|
|
this.tableData = []
|
|
this.onLoad()
|
|
},
|
|
async onLoad() {
|
|
const res = await $.post('/platform/theRapyRecuperation/line/enroll/mySignUpPageData', this.pageForm)
|
|
|
|
if (res.code === 0 && res.data) {
|
|
this.tableData = this.tableData.concat(res.data.list)
|
|
if (this.tableData.length === res.data.totalCount) {
|
|
this.finished = true
|
|
} else {
|
|
this.pageForm.pageNumber++
|
|
}
|
|
}
|
|
this.loading = false
|
|
},
|
|
async getType() {
|
|
const res = await $.post('/platform/theRapyRecuperation/line/enroll/getType')
|
|
return res.data
|
|
},
|
|
createYear() {
|
|
for (let i = 2023; i <= 2043; i++) {
|
|
this.yearArray.push({value: i, text: i + '年'})
|
|
}
|
|
},
|
|
async getConfigData() {
|
|
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
|
this.configData = resp.data
|
|
},
|
|
},
|
|
async created() {
|
|
this.createYear()
|
|
this.yearArray.unshift({value: null, text: '全部'})
|
|
this.pageForm.year = new Date().getFullYear()
|
|
this.pageForm.theRapyRecuperationType = getQueryString('index') ? getQueryString('index') : await this.getType()
|
|
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
|
this.chooseButton = this.chooseButton.filter(o => o.value !== 2 && o.value !== 3)
|
|
await this.getConfigData()
|
|
this.onLoad()
|
|
},
|
|
mounted() {
|
|
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|