first commit

This commit is contained in:
=
2025-03-14 10:29:20 +08:00
commit ac92981557
3616 changed files with 907328 additions and 0 deletions
@@ -0,0 +1,648 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.container img {
background-size: contain;
width: 100%;
height: auto;
margin: 5px auto;
display: block;
}
.header {
padding: 20px;
}
.content {
line-height: 26px;
padding: 0px 20px 56px 20px;
}
.title {
font-weight: bold;
font-size: 19px;
color: #505050;
margin-bottom: 10px;
}
.van-divider {
border-color: grey;
margin: 0;
}
.van-skeleton {
padding: 20px;
}
.van-skeleton__content {
height: 600px;
padding-top: 60px;
}
.van-skeleton__row, .van-skeleton__title {
height: 30px;
}
.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;
width: 90% !important;
}
.family_join {
background-color: #ff976a;
color: white;
}
.join {
background-color: #0e78c5;
color: white;
}
.joinPopup {
width: 100%;
height: 100%;
background-color: #f6f7f9;
}
.join_content {
padding: 20px;
height: calc(100% - 40px - 46px - 60px);
overflow-y: auto;
}
.join_submit {
width: 90% !important;
}
.van-doc-card {
background-color: #fff;
border-radius: 6px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
position: relative;
}
.van-card-header {
padding: 14px 20px;
border-bottom: 1px solid #ebeef5;
box-sizing: border-box;
color: #0e78c5;
font-weight: bold;
}
.van-card-body {
padding: 0px 10px 0px 10px
}
.van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.van-cell {
padding: 8px 16px;
}
.van-tabs__wrap {
margin: 6px;
}
.van-tabs__nav--card {
border: none;
}
.van-tabs__nav--card .van-tab.van-tab--active {
border-radius: 6px;
}
.van-tabs__nav--card .van-tab {
border-right: 0 !important;
}
.top_icon {
position: fixed;
bottom: 80px;
right: 20px;
}
.van-field__control {
text-overflow: ellipsis;
}
.list-card {
width: auto;
}
.companionList_empty_text {
text-align: center;
padding: 10px 0px;
font-size: 14px;
color: grey;
}
.header div span {
color: grey;
}
.header :last-child {
font-size: 14px;
}
.van-empty {
position: relative;
transform: none;
top: 0;
left: 0;
background-color: transparent;
height: calc(100vh - 46px - 153px - 60px);
}
.submitButton {
background-color: white !important;
width: 100%;
height: 60px;
display: flex;
justify-content: space-evenly;
align-items: center;
}
.submitButton .van-button {
height: 34px;
border-radius: 6px;
width: 90% !important;
}
.van-image-preview img {
background-color: white;
}
</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-skeleton title :loading="skeLoading" :row="12">
<div class="container">
<div class="header">
<div class="title">
<van-tag size="large" color="#1867b0" style="color: white;position: relative; top: -2px">
{{baseData.lotName}}
</van-tag>
{{baseData.baseName}}
</div>
<div style="margin-top: 10px">
<div>
<span class="line_label">&emsp;&emsp;域:</span>
{{baseData.regionalNature}}
</div>
<div>
<span>创建模式:</span>
{{baseData.createMode === 1 ? '校工会' : '分工会'}}
</div>
<div>
<span>报名时间:</span>
{{moment(baseData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
moment(baseData.signUpEndTime).format('YYYY-MM-DD HH:mm')}}
</div>
<div>
<span>活动时间:</span>
{{moment(baseData.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
moment(baseData.activityEndTime).format('YYYY-MM-DD HH:mm')}}
</div>
</div>
</div>
<van-divider></van-divider>
<div v-if="baseData.content" v-html="baseData.content" class="content"></div>
<div v-else v-html="configData.notice" class="content"></div>
<!--<van-empty
v-else class="custom-image"
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
description="暂无详细信息"
></van-empty>-->
</div>
</van-skeleton>
<!--置顶图标-->
<image v-if="btnFlag" @click="backTop" src="/assets/mobile/svg/therapyRecuperation/top.svg"
class="top_icon"></image>
<!--底部报名按钮-->
<div class="footer" v-if="fromUrlByMy != 'edit'">
<template v-if="baseData.isNormal==0&&baseData.isNormalFalse>0">
<van-button @click="join"
class="join">我要报名
</van-button>
</template>
<template v-else>
<van-button v-if="moment().unix() <= moment(baseData.signUpEndTime).unix()" @click="join" class="join">我要报名
</van-button>
<van-button v-if="moment().unix() > moment(baseData.signUpEndTime).unix()" class="join">报名结束</van-button>
</template>
</div>
<!--报名弹出框-->
<van-popup v-model:show="joinPopup" position="right" class="joinPopup">
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar>
<div class="join_content">
<van-form @submit="joinSubmit">
<!--基础信息-->
<div class="van-doc-card" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header">
基础信息
</div>
<div class="van-card-body">
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
<van-field label="身份证号" name="idCard" :rules="[{ required: true }]"
placeholder="请填写身份证号" v-model="formData.idCard"></van-field>
<van-field label="手机号" name="mobile" :rules="[{ required: true }]"
placeholder="请填写手机号" v-model="formData.mobile"></van-field>
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
<van-field label="报名酒店" readonly v-model="formData.baseName"></van-field>
</div>
</div>
<!--床位信息-->
<div class="van-doc-card" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header">
床位信息
</div>
<div class="van-card-body">
<van-field @click="self = true; roomVisible = true" readonly is-link label="房间" name="bedType"
placeholder="请选择房间" v-model="formData.bedInfo.bedType"
:rules="[{ required: true }]"></van-field>
<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true"
readonly is-link label="床位"
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum"
:rules="[{ required: true }]"></van-field>
<van-field v-if="formData.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]"
label="是否拼房" name="validator">
<template #input>
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
<van-radio :name="true" shape="square"></van-radio>
<van-radio :name="false" shape="square"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
v-model="formData.bedInfo.otherSleepUser"
:rules="[{ required: true }]"></van-field>
</div>
</div>
<!--随行人信息-->
<div class="van-doc-card" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header"
style="display: flex; justify-content: space-between; align-items: center">
<span style="float:left;">随行人信息</span>
<div>
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
</div>
</div>
<div v-if="formData.companionList.length > 0" class="van-card-body">
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName"
:rules="[{ required: true }]"></van-field>
<!--<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>-->
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
type="digit" :rules="[{ required: true }]"></van-field>
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
<template #input>
<van-radio-group direction="horizontal" v-model="item.sex">
<van-radio name="男" shape="square"></van-radio>
<van-radio name="女" shape="square"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field label="身份证号" name="idCard" placeholder="请填写身份证号"
:rules="[{ required: true }]" type="digit"
v-model="item.idCard"></van-field>
<van-field label="手机号" name="mobile" placeholder="请填写手机号"
:rules="[{ required: true }]" type="digit"
v-model="item.mobile"></van-field>
<van-field @click="companionVisible = true" readonly is-link label="与本人关系"
name="relation"
placeholder="随行人与本人关系" v-model="item.relation"
:rules="[{ required: true }]"></van-field>
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间"
name="bedType" placeholder="请选择房间"
v-model="item.bedInfo.bedType"></van-field>
<div style="font-size: 8px; color:orangered; padding-left: 16px; padding-bottom: 4px">
提醒:如果跟报名人员同一房间,无须选择!
</div>
<van-field v-if="item.bedInfo.bedType == '标准间'" @click="self = false; bedVisible = true"
readonly is-link label="床位"
name="bedNum" placeholder="请选择床位" v-model="item.bedInfo.bedNum"></van-field>
<van-field v-if="item.bedInfo.bedType == '标准间'"
:rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房">
<template #input>
<van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether">
<van-radio :name="true" shape="square"></van-radio>
<van-radio :name="false" shape="square"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
v-model="item.bedInfo.otherSleepUser"></van-field>
</van-tab>
</van-tabs>
</div>
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
<span>
如有随行人出行,请添加随行人
</span>
</div>
</div>
<div class="submitButton">
<van-button class="join join_submit">提交报名</van-button>
</div>
</van-form>
</div>
</van-popup>
<!--房间类型弹出框-->
<van-popup position="bottom" round v-model="roomVisible">
<van-picker
title="入住房间" show-toolbar
:columns="roomColumns"
@confirm="roomConfirm"
@cancel="roomCancel">
</van-picker>
</van-popup>
<!--床位弹出框-->
<van-popup position="bottom" round v-model="bedVisible">
<van-picker
title="床位" show-toolbar
:columns="bedColumns"
@confirm="bedConfirm"
@cancel="bedVisible = false">
</van-picker>
</van-popup>
<!--随行人关系弹出框-->
<van-popup position="bottom" round v-model="companionVisible">
<van-picker
title="与本人关系" show-toolbar
:columns="companionColumns"
@confirm="(value, index) => {formData.companionList[active].relation = value; companionVisible = false}"
@cancel="companionVisible = false">
</van-picker>
</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;
}
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
active: 0,
roomColumns: ['大床房', '标准间'],
bedColumns: ['1', '2'],
companionColumns: ['亲属', '朋友'],
bedVisible: false,
roomVisible: false,
companionVisible: false,
joinPopup: false,
skeLoading: true,
id: '',
baseData: {},
formData: {
userName: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
idCard: "",
mobile: "${@shiro.getPrincipalProperty('mobile')}",
lineName: '',
takePartInLineId: '',
takePartInUnionId: '',
companionList: [],
bedInfo: {},
},
self: true,
btnFlag: false,
index: 0,
scrollTop: 0,
fromUrlByMy: '',
enrollId: '',
configData: {},
}
},
methods: {
roomCancel() {
if (!this.self) {
this.formData.companionList[this.active].bedInfo.bedType = ''
}
this.roomVisible = false
},
roomConfirm(value, index) {
if (this.self) {
this.formData.bedInfo.bedType = value
} else {
this.formData.companionList[this.active].bedInfo.bedType = value
}
this.roomVisible = false
},
bedConfirm(value, index) {
if (this.self) {
this.formData.bedInfo.bedNum = value
} else {
this.formData.companionList[this.active].bedInfo.bedNum = value
}
this.bedVisible = false
},
validator(value) {
return value != null
},
async joinSubmit() {
const toast = vant.Toast.loading({
duration: 0,
forbidClick: true,
overlay: true,
message: '努力提交中',
})
const cloneData = clone(this.formData)
cloneData.companionList.forEach((item, index) => {
if (item.userName === '') {
cloneData.companionList.splice(index, 1)
}
})
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForBaseManagement', {
enroll: JSON.stringify(cloneData),
})
setTimeout(() => {
if (resp.code === 0) {
toast.message = '提交成功'
toast.type = 'success'
} else {
toast.message = resp.msg
toast.type = 'fail'
}
setTimeout(() => {
toast.clear()
}, 500)
if (resp.code === 0) {
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
}
}, 1000)
},
addCompanion() {
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}})
},
delCompanion() {
this.formData.companionList.splice(this.active, 1)
},
async join() {
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
enroll: JSON.stringify({
takePartInBaseManagementId: this.baseData.id,
isNormal: this.baseData.isNormal,
id: this.enrollId
}),
})
if (re.code !== 0) {
vant.Toast(re.msg)
return
}
if (this.fromUrlByMy !== 'editDo') {
this.formData = {
userName: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
idCard: "${@shiro.getPrincipalProperty('idcard')}",
mobile: "${@shiro.getPrincipalProperty('mobile')}",
baseName: this.baseData.baseName,
takePartInBaseManagementId: this.baseData.id,
companionList: [],
bedInfo: {},
}
this.$set(this.formData.bedInfo, 'bedType', '大床房')
}
this.joinPopup = true
},
async getData() {
const res = await $.get('/platform/theRapyRecuperation/baseManagement/selectBaseAllInfo', {
id: this.id
})
if (res.code === 0) {
this.baseData = res.data
this.formData.baseName = this.baseData.baseName
this.skeLoading = false
}
},
// 点击图片回到顶部方法,加计时器是为了过渡顺滑
backTop() {
const that = this
let timer = setInterval(() => {
let speed = Math.floor(-that.scrollTop / 5)
document.documentElement.scrollTop = document.body.scrollTop = that.scrollTop + speed
if (that.scrollTop === 0) {
clearInterval(timer)
}
}, 16)
},
// 为了计算距离顶部的高度,当高度大于100显示回顶部图标,小于100则隐藏
scrollToTop() {
const that = this
that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
that.btnFlag = that.scrollTop > 100;
},
//修改时查询报名信息,进行回显
async findSignUpInfoById() {
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
if (res.code === 0) {
this.formData = res.data
if (this.formData.bedInfo === null) {
this.formData.bedInfo = {}
}
if (this.formData.companionList) {
this.formData.companionList.forEach(item => {
if (item.bedInfo === null) {
item.bedInfo = {}
}
})
}
this.$forceUpdate()
}
},
async getConfigData() {
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
this.configData = resp.data
},
},
async created() {
this.id = getQueryString('id') ? getQueryString('id') : ''
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : ''
this.index = getQueryString('index') ? getQueryString('index') : ''
await this.getConfigData()
//编辑传出来的参数
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : ''
if (this.enrollId) {
await this.findSignUpInfoById()
}
this.getData()
},
mounted() {
window.addEventListener('scroll', this.scrollToTop)
document.addEventListener('click', function (event) {
// 打印被点击的元素标签名和 class
if (event.target.tagName === 'IMG') {
vant.ImagePreview([event.target.src])
}
})
},
destroyed() {
window.removeEventListener('scroll', this.scrollToTop)
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,118 @@
<!--#
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-grid-item__content {
padding: 0;
}
.choose_button .button_text {
font-size: 14px;
margin-top: 6px;
}
.list-card {
width: auto;
}
.pre_text {
white-space: break-spaces;
padding-left: 7px;
}
</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-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item>
<van-image width="100%" height="180" src="/assets/mobile/img/therapyRecuperation/index1.jpg"></van-image>
</van-swipe-item>
<van-swipe-item>
<van-image height="180" src="/assets/mobile/img/therapyRecuperation/index2.jpg"></van-image>
</van-swipe-item>
</van-swipe>
<!--按钮导航-->
<div class="choose_button van-doc-card">
<van-grid :column-num="chooseButton.length" :border="false">
<van-grid-item @click="toLineList(item.value)" v-for="item in chooseButton">
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
<div class="button_text">{{item.label}}</div>
</van-grid-item>
</van-grid>
</div>
<!--疗休养描述-->
<div class="van-doc-card" style="margin-top: 20px;margin-bottom: 60px">
<van-image width="190" height="43" src="/assets/mobile/img/therapyRecuperation/title.png"></van-image>
<div class="pre_text" v-html="configData.notice"></div>
</div>
<div>
<van-tabbar v-model="tarBarActive">
<van-tabbar-item icon="home-o" replace url="/platform/mobile/theRapyRecuperation/index">疗休养报名
</van-tabbar-item>
<van-tabbar-item icon="manager-o" replace url="/platform/mobile/theRapyRecuperation/myRecuperation">我的疗休养
</van-tabbar-item>
</van-tabbar>
</div>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
chooseButton: [],
configData: {},
tarBarActive: 0,
}
},
methods: {
async toLineList(index) {
const isExist = await getScopeUser(this.configData.activityGroupId)
if (!isExist) {
vant.Dialog.alert({
title: '温馨提示',
message: '您不在疗休养报名范围中',
confirmButtonColor: '#1867b0'
})
return
}
localStorage.setItem("clickIndex", JSON.stringify({clickIndex: index}))
location.href = '/platform/mobile/theRapyRecuperation/mobileLineListPage'
},
async getConfigData() {
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
this.configData = resp.data
},
},
async created() {
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
this.chooseButton = this.chooseButton.filter(o => o.value !== 2 && o.value !== 3)
await this.getConfigData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,675 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.container img {
background-size: contain;
width: 100%;
height: auto;
margin: 5px auto;
display: block;
}
.header {
padding: 20px;
}
.content {
line-height: 26px;
padding: 0px 20px 56px 20px;
}
.title {
font-weight: bold;
font-size: 19px;
color: #505050;
margin-bottom: 10px;
}
.van-divider {
border-color: grey;
margin: 0;
}
.van-skeleton {
padding: 20px;
}
.van-skeleton__content {
height: 600px;
padding-top: 60px;
}
.van-skeleton__row, .van-skeleton__title {
height: 30px;
}
.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;
width: 90% !important;
}
.family_join {
background-color: #ff976a;
color: white;
}
.join {
background-color: #0e78c5;
color: white;
}
.joinPopup {
width: 100%;
height: 100%;
background-color: #f6f7f9;
}
.join_content {
padding: 20px;
height: calc(100% - 26px - 60px);
overflow-y: auto;
}
.join_submit {
width: 90% !important;
}
.van-doc-card {
background-color: #fff;
border-radius: 6px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
position: relative;
}
.van-card-header {
padding: 14px 20px;
border-bottom: 1px solid #ebeef5;
box-sizing: border-box;
color: #0e78c5;
font-weight: bold;
}
.van-card-body {
padding: 0px 10px 0px 10px
}
.van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.van-cell {
padding: 8px 16px;
}
.van-tabs__wrap {
margin: 6px;
}
.van-tabs__nav--card {
border: none;
}
.van-tabs__nav--card .van-tab.van-tab--active {
border-radius: 6px;
}
.van-tabs__nav--card .van-tab {
border-right: 0 !important;
}
.top_icon {
position: fixed;
bottom: 80px;
right: 20px;
}
.van-field__control {
text-overflow: ellipsis;
}
.list-card {
width: auto;
}
.companionList_empty_text {
text-align: center;
padding: 10px 0px;
font-size: 14px;
color: grey;
}
.header div span {
color: grey;
}
.header :last-child {
font-size: 14px;
}
.van-empty {
position: relative;
transform: none;
top: 0;
left: 0;
background-color: transparent;
height: calc(100vh - 46px - 153px - 60px);
}
.submitButton {
background-color: white !important;
width: 100%;
height: 60px;
display: flex;
justify-content: space-evenly;
align-items: center;
}
.submitButton .van-button {
height: 34px;
border-radius: 6px;
width: 90% !important;
}
.van-image-preview img {
background-color: white;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="history.go(-1)" fixed left-arrow placeholder title="职工疗休养-线路介绍"></van-nav-bar>
</van-sticky>
<!--线路详情-->
<van-skeleton title :loading="skeLoading" :row="12">
<div class="container">
<div class="header">
<div class="title">
<van-tag size="large" color="#1867b0" style="color: white;position: relative; top: -2px">
{{lineData.lotName}}
</van-tag>
{{lineData.lineName}}
</div>
<div style="margin-top: 10px">
<div>
<span class="line_label">成团人数:</span>
{{lineData.minimumGroupSize ? lineData.minimumGroupSize : 0}}人(最少)
</div>
<div>
<span>当前报名:</span>
{{lineData.signUpUserNum + lineData.signUpUserFamilyNum + '(家属' + lineData.signUpUserFamilyNum +
'人)'}}
</div>
<div>
<span>报名时间:</span>
{{moment(lineData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
moment(lineData.signUpEndTime).format('YYYY-MM-DD HH:mm')}}
</div>
<div>
<span>出行时间:</span>
{{moment(lineData.playStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
moment(lineData.playEndTime).format('YYYY-MM-DD HH:mm')}}
</div>
<div>
<span>&ensp;&ensp;社:</span>
{{lineData.travelAgencyName}}
</div>
<div>
<span>联系方式:</span>
{{lineData.contactMobileNumber}}
</div>
</div>
</div>
<van-divider></van-divider>
<div v-if="lineData.content" v-html="lineData.content" class="content"></div>
<div v-else v-html="configData.notice" class="content"></div>
<!--<van-empty
v-else class="custom-image"
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
description="暂无详细信息"
></van-empty>-->
</div>
</van-skeleton>
<!--置顶图标-->
<image v-if="btnFlag" @click="backTop" src="/assets/mobile/svg/therapyRecuperation/top.svg"
class="top_icon"></image>
<!--底部报名按钮-->
<div class="footer" v-if="fromUrlByMy != 'edit'">
<template v-if="lineData.isNormal==0&&lineData.isNormalFalse>0">
<van-button @click="join"
class="join">我要报名
</van-button>
</template>
<template v-else>
<van-button v-if="moment().unix() <= moment(lineData.signUpEndTime).unix()" @click="join"
class="join">我要报名
</van-button>
<van-button v-if="moment().unix() > moment(lineData.signUpEndTime).unix()" class="join">报名结束</van-button>
</template>
</div>
<!--报名弹出框-->
<van-popup v-model:show="joinPopup" position="right" class="joinPopup">
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar>
<div class="join_content">
<van-form @submit="joinSubmit">
<!--基础信息-->
<div class="van-doc-card" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header">
基础信息
</div>
<div class="van-card-body">
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
<van-field label="身份证号" name="idCard" :rules="[{ required: true }]"
placeholder="请填写身份证号" v-model="formData.idCard"></van-field>
<van-field label="手机号" name="mobile" :rules="[{ required: true }]"
placeholder="请填写手机号" v-model="formData.mobile"></van-field>
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
<van-field label="报名线路" readonly v-model="formData.lineName"></van-field>
</div>
</div>
<!--床位信息-->
<div class="van-doc-card" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header">
床位信息
</div>
<div class="van-card-body">
<van-field @click="self = true; roomVisible = true" readonly is-link label="房间" name="bedType"
placeholder="请选择房间" v-model="formData.bedInfo.bedType"
:rules="[{ required: true }]"></van-field>
<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true"
readonly is-link label="床位"
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum"
:rules="[{ required: true }]"></van-field>
<van-field v-if="formData.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]"
label="是否拼房" name="validator">
<template #input>
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
<van-radio :name="true" shape="square"></van-radio>
<van-radio :name="false" shape="square"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
v-model="formData.bedInfo.otherSleepUser"
:rules="[{ required: true }]"></van-field>
</div>
</div>
<!--随行人信息-->
<div class="van-doc-card" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header"
style="display: flex; justify-content: space-between; align-items: center">
<span style="float:left;">随行人信息</span>
<div>
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
</div>
</div>
<div v-if="formData.companionList.length > 0" class="van-card-body">
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName"
:rules="[{ required: true }]"></van-field>
<!--<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>-->
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
type="digit" :rules="[{ required: true }]"></van-field>
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
<template #input>
<van-radio-group direction="horizontal" v-model="item.sex">
<van-radio name="男" shape="square"></van-radio>
<van-radio name="女" shape="square"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field label="身份证号" name="idCard" placeholder="请填写身份证号"
:rules="[{ required: true }]" type="digit"
v-model="item.idCard"></van-field>
<van-field label="手机号" name="mobile" placeholder="请填写手机号"
:rules="[{ required: true }]" type="digit"
v-model="item.mobile"></van-field>
<van-field @click="companionVisible = true" readonly is-link label="与本人关系"
name="relation"
placeholder="随行人与本人关系" v-model="item.relation"
:rules="[{ required: true }]"></van-field>
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间"
name="bedType" placeholder="请选择房间"
v-model="item.bedInfo.bedType"></van-field>
<div style="font-size: 12px; color:orangered; padding-left: 16px; padding-bottom: 4px">
提醒:如果跟报名人员同一房间,无须选择!
</div>
<van-field v-if="item.bedInfo.bedType == '标准间'" @click="self = false; bedVisible = true"
readonly is-link label="床位"
name="bedNum" placeholder="请选择床位" v-model="item.bedInfo.bedNum"></van-field>
<van-field v-if="item.bedInfo.bedType == '标准间'"
:rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房">
<template #input>
<van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether">
<van-radio :name="true" shape="square"></van-radio>
<van-radio :name="false" shape="square"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
v-model="item.bedInfo.otherSleepUser"></van-field>
</van-tab>
</van-tabs>
</div>
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
<span>
如有随行人出行,请添加随行人
</span>
</div>
</div>
<div class="submitButton">
<van-button class="join join_submit">提交报名</van-button>
</div>
</van-form>
</div>
</van-popup>
<!--房间类型弹出框-->
<van-popup position="bottom" round v-model="roomVisible">
<van-picker
title="入住房间" show-toolbar
:columns="roomColumns"
@confirm="roomConfirm"
@cancel="roomCancel">
</van-picker>
</van-popup>
<!--床位弹出框-->
<van-popup position="bottom" round v-model="bedVisible">
<van-picker
title="床位" show-toolbar
:columns="bedColumns"
@confirm="bedConfirm"
@cancel="bedVisible = false">
</van-picker>
</van-popup>
<!--随行人关系弹出框-->
<van-popup position="bottom" round v-model="companionVisible">
<van-picker
title="与本人关系" show-toolbar
:columns="companionColumns"
@confirm="(value, index) => {formData.companionList[active].relation = value; companionVisible = false}"
@cancel="companionVisible = false">
</van-picker>
</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;
}
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
active: 0,
roomColumns: ['大床房', '标准间'],
bedColumns: ['1', '2'],
companionColumns: ['亲属', '朋友'],
bedVisible: false,
roomVisible: false,
companionVisible: false,
joinPopup: false,
skeLoading: true,
id: '',
lineData: {},
formData: {
userName: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
idCard: "",
mobile: "${@shiro.getPrincipalProperty('mobile')}",
lineName: '',
takePartInLineId: '',
takePartInUnionId: '',
companionList: [],
bedInfo: {},
},
self: true,
btnFlag: false,
index: 0,
scrollTop: 0,
fromUrlByMy: '',
enrollId: '',
configData: {},
}
},
methods: {
roomCancel() {
if (!this.self) {
this.formData.companionList[this.active].bedInfo.bedType = ''
}
this.roomVisible = false
},
roomConfirm(value, index) {
if (this.self) {
this.formData.bedInfo.bedType = value
} else {
this.formData.companionList[this.active].bedInfo.bedType = value
}
this.roomVisible = false
},
bedConfirm(value, index) {
if (this.self) {
this.formData.bedInfo.bedNum = value
} else {
this.formData.companionList[this.active].bedInfo.bedNum = value
}
this.bedVisible = false
},
validator(value) {
return value != null
},
async joinSubmit() {
const toast = vant.Toast.loading({
duration: 0,
forbidClick: true,
overlay: true,
message: '努力提交中',
})
const cloneData = clone(this.formData)
cloneData.companionList.forEach((item, index) => {
if (item.userName === '') {
cloneData.companionList.splice(index, 1)
}
})
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForLine', {
enroll: JSON.stringify(cloneData),
})
setTimeout(() => {
if (resp.code === 0) {
toast.message = '提交成功'
toast.type = 'success'
} else {
toast.message = resp.msg
toast.type = 'fail'
}
setTimeout(() => {
toast.clear()
}, 500)
if (resp.code === 0) {
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
}
}, 1000)
},
addCompanion() {
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}})
},
delCompanion() {
this.formData.companionList.splice(this.active, 1)
},
async join() {
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
enroll: JSON.stringify({
id: this.enrollId,
isNormal: this.lineData.isNormal,
takePartInLineId: this.lineData.usId,
takePartInUnionId: this.takePartInUnionId
}),
})
if (re.code !== 0) {
if(re.msg === '您今年已报名,如要继续报名请进入我的疗休养,取消已选择') {
vant.Dialog.confirm({
title: '温馨提示',
message: re.msg,
confirmButtonText: '跳转页面',
}).then(() => {
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
}).catch(() => {});
} else {
vant.Dialog.alert({
title: '温馨提示',
message: re.msg,
}).then(() => {})
}
return
}
if (this.fromUrlByMy !== 'editDo') {
this.formData = {
userName: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
idCard: "${@shiro.getPrincipalProperty('idcard')}",
mobile: "${@shiro.getPrincipalProperty('mobile')}",
lineName: this.lineData.lineName,
takePartInLineId: this.lineData.usId,
takePartInUnionId: this.takePartInUnionId,
companionList: [],
bedInfo: {},
}
this.$set(this.formData.bedInfo, 'bedType', '大床房')
}
this.joinPopup = true
},
async getData() {
const res = await $.get('/platform/theRapyRecuperation/line/enroll/selectLineAllInfo', {
usId: this.id,
usUnionId: this.takePartInUnionId
})
if (res.code === 0) {
this.lineData = res.data
this.formData.lineName = this.lineData.lineName
this.formData.takePartInLineId = this.lineData.usId
this.skeLoading = false
}
},
// 点击图片回到顶部方法,加计时器是为了过渡顺滑
backTop() {
const that = this
let timer = setInterval(() => {
let speed = Math.floor(-that.scrollTop / 5)
document.documentElement.scrollTop = document.body.scrollTop = that.scrollTop + speed
if (that.scrollTop === 0) {
clearInterval(timer)
}
}, 16)
},
// 为了计算距离顶部的高度,当高度大于100显示回顶部图标,小于100则隐藏
scrollToTop() {
const that = this
that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
that.btnFlag = that.scrollTop > 100;
},
//修改时查询报名信息,进行回显
async findSignUpInfoById() {
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
if (res.code === 0) {
this.formData = res.data
if (this.formData.bedInfo === null) {
this.formData.bedInfo = {}
}
if (this.formData.companionList) {
this.formData.companionList.forEach(item => {
if (item.bedInfo === null) {
item.bedInfo = {}
}
})
}
this.$forceUpdate()
}
},
async getConfigData() {
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
this.configData = resp.data
},
},
async created() {
this.id = getQueryString('id') ? getQueryString('id') : ''
this.index = getQueryString('index') ? getQueryString('index') : ''
await this.getConfigData()
//编辑传出来的参数
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : ''
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : ''
this.takePartInUnionId = getQueryString('takePartInUnionId') ? getQueryString('takePartInUnionId') : ''
if (this.enrollId) {
await this.findSignUpInfoById()
}
this.getData()
},
mounted() {
window.addEventListener('scroll', this.scrollToTop)
document.addEventListener('click', function (event) {
// 打印被点击的元素标签名和 class
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
vant.ImagePreview([event.target.src])
}
})
},
destroyed() {
window.removeEventListener('scroll', this.scrollToTop)
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,422 @@
<!--#
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;
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;
}
.van-tag {
padding: 2px 7px;
border-radius: 4px;
}
.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-list {
padding-bottom: 10px;
}
.van-row {
text-align: center;
color: #1867b0;
font-weight: bold;
padding: 0px 0px 10px 0px;
font-family: cursive;
}
.van-col {
line-height: 24px;
}
.desc_info div {
font-size: 12px;
}
</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"
@load="onLoad"
finished-text="没有更多了"
v-model="loading">
<div @click.stop="findOne(o)" class="list-card" v-for="o in tableData">
<div 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.usUnionName}}
</van-tag>
</div>
</div>
<div class="desc_info">
<!--<div class="union">
<span>组织形式:</span>{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.usUnionName}}
</div>-->
<div class="concat">
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' +
o.signUpUserFamilyNum + '人)'}}
</div>
<div class="mobile" style="color: red">
<span>出行时间:</span>{{moment(o.playStartTime).format('YYYY-MM-DD')}}
</div>
<div class="mobile">
<span>&ensp;&ensp;社:</span>{{o.travelAgencyName}}
</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>&ensp;&ensp;人:</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>&emsp;&emsp;网:</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>&ensp;&ensp;人:</span>{{o.baseContactPerson}}
</div>
<div class="mobile">
<span>联系方式:</span>{{o.baseContactNumber}}
</div>
<div class="mobile">
<span>&ensp;&ensp;社:</span>{{o.travelAgencyName}}
</div>
</div>
</div>
</div>
<div v-if="pageForm.theRapyRecuperationType == '2'">
<van-row gutter="20">
<van-col @click="" span="12" style="border-right: 1px lightgrey solid"></van-col>
<van-col span="12">
<van-button @click.stop="join(o)" plain round size="mini" type="info">我要报名</van-button>
</van-col>
</van-row>
</div>
</div>
</van-list>
<div class="footer"
v-if="['0', '1', 0 , 1].includes(pageForm.theRapyRecuperationType)">
<van-button :class="pageForm.lineUnionType == 2 ? 'active' : 'no_active'"
@click="otherUnionClick">
其他工会
</van-button>
<van-button :class="pageForm.lineUnionType == 1 ? 'active' : 'no_active'"
@click="pageForm.lineUnionType = 1; getData()">
本工会
</van-button>
<van-button :class="pageForm.lineUnionType == 3 ? 'active' : 'no_active'"
@click="pageForm.lineUnionType = 3; getData()">
校工会
</van-button>
</div>
<van-popup position="bottom" round v-model:show="unionPop">
<van-picker
title="选择分工会" show-toolbar
:columns="unionColumns"
@confirm="onConfirm"
@cancel="unionPop = false"
></van-picker>
</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;
}
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
yearArray: [],
unionColumns: [],
unionPop: false,
chooseButton: [],
pageForm: {
theRapyRecuperationType: 0,
lineUnionType: 1,
unionId: "${@shiro.getPrincipalProperty('union').getId()}",
year: new Date().getFullYear()
},
loading: false,
finished: false,
refreshing: false,
lineData: {},
}
},
methods: {
otherUnionClick() {
if(this.unionColumns.length === 0) {
vant.Toast('暂时没有工会公开线路')
return
}
this.pageForm.lineUnionType = 2
this.unionPop = true
},
doSearch() {
this.loading = true
this.finished = false
this.getData()
},
async join(o) {
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
enroll: JSON.stringify({
takePartInTravelAgencyId: o.id,
}),
})
if (re.code !== 0) {
vant.Toast(re.msg)
return
}
const toast = vant.Toast.loading({
duration: 0,
forbidClick: true,
overlay: true,
message: '努力提交中',
})
const sendData = {
takePartInTravelAgencyId: o.id,
}
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForTravelAgency', {
enroll: JSON.stringify(sendData),
})
setTimeout(() => {
if (resp.code === 0) {
toast.message = '提交成功'
toast.type = 'success'
} else {
toast.message = resp.msg
toast.type = 'fail'
}
setTimeout(() => {
toast.clear()
}, 500)
if (resp.code === 0) {
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.pageForm.theRapyRecuperationType
}
}, 1000)
},
onConfirm(value, index) {
this.pageForm.unionId = value.value
this.getData()
this.unionPop = false
},
async findOne(o) {
const type = Number(this.pageForm.theRapyRecuperationType)
localStorage.setItem("clickIndex", JSON.stringify({clickIndex: type}))
if (type !== 2 && type !== 3) {
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
+ '&takePartInUnionId=' + o.takePartInUnionId
} else if (type === 3) {
location.href = '/platform/mobile/theRapyRecuperation/baseInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
}
},
getData() {
this.loading = true
if (this.pageForm.lineUnionType === 1) {
this.pageForm.unionId = "${@shiro.getPrincipalProperty('union').getId()}"
}
this.pageForm.pageNumber = 1
this.tableData = []
this.onLoad()
},
async onLoad() {
const res = await $.post('/platform/theRapyRecuperation/line/enroll/pageData', 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
},
createYear() {
for (let i = 2023; i <= 2043; i++) {
this.yearArray.push({value: i, text: i + '年'})
}
},
async getTheRapyUnions() {
const resp = await $.get('/platform/theRapyRecuperation/line/enroll/getTheRapyUnions', {
year: this.pageForm.year
})
return resp.data
},
},
async created() {
this.createYear()
const clickIndex = localStorage.getItem('clickIndex')
this.pageForm.theRapyRecuperationType = JSON.parse(clickIndex).clickIndex
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
this.chooseButton = this.chooseButton.filter(o => o.value !== 2 && o.value !== 3)
const unions = await this.getTheRapyUnions()
unions.forEach(item => {
this.unionColumns.push({text: item.unionname, value: item.id})
})
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,535 @@
<!--#
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>&ensp;&ensp;社:</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>&ensp;&ensp;人:</span>{{o.baseContactPerson}}
</div>
<div class="mobile">
<span>联系方式:</span>{{o.baseContactNumber}}
</div>
<div class="mobile">
<span>&ensp;&ensp;社:</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)">
&ensp;
</van-button>
<van-button type="info" size="small" color="#1867b0" @click="cancel(o)"
:disabled="getDisabled(o)">
&ensp;
</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>
<van-tabbar v-model="tarBarActive">
<van-tabbar-item icon="home-o" replace url="/platform/mobile/theRapyRecuperation/index">疗休养报名
</van-tabbar-item>
<van-tabbar-item icon="manager-o" replace url="/platform/mobile/theRapyRecuperation/myRecuperation">我的疗休养
</van-tabbar-item>
</van-tabbar>
</div>
</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;
}
const 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: {},
tarBarActive: 1
}
},
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>
<!--#
}
#-->