活动申报+基层工会
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.container img {
|
||||
background-size: contain;
|
||||
width: 100%;
|
||||
@@ -41,7 +40,8 @@ layout("/mobile/platform.html"){
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
.van-skeleton__row, .van-skeleton__title {
|
||||
.van-skeleton__row,
|
||||
.van-skeleton__title {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
padding: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
@@ -194,11 +194,9 @@ layout("/mobile/platform.html"){
|
||||
.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>
|
||||
@@ -208,9 +206,7 @@ layout("/mobile/platform.html"){
|
||||
<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>
|
||||
<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">
|
||||
@@ -220,17 +216,17 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
<div>
|
||||
<span>创建模式:</span>
|
||||
{{baseData.createMode === 1 ? '校工会' : '分工会'}}
|
||||
{{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')}}
|
||||
{{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')}}
|
||||
{{moment(baseData.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(baseData.activityEndTime).format('YYYY-MM-DD
|
||||
HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -242,24 +238,19 @@ layout("/mobile/platform.html"){
|
||||
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>
|
||||
<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>
|
||||
<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()" @click="join" class="join">我要报名</van-button>
|
||||
<van-button v-if="moment().unix() > moment(baseData.signUpEndTime).unix()" class="join">报名结束</van-button>
|
||||
</template>
|
||||
</div>
|
||||
@@ -268,22 +259,28 @@ layout("/mobile/platform.html"){
|
||||
<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-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="身份证号"
|
||||
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>
|
||||
@@ -292,19 +289,35 @@ layout("/mobile/platform.html"){
|
||||
<!--床位信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
床位信息
|
||||
</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">
|
||||
<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>
|
||||
@@ -312,19 +325,22 @@ layout("/mobile/platform.html"){
|
||||
</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>
|
||||
<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 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>
|
||||
@@ -333,11 +349,22 @@ layout("/mobile/platform.html"){
|
||||
<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="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
|
||||
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">
|
||||
@@ -346,28 +373,60 @@ layout("/mobile/platform.html"){
|
||||
</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
|
||||
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">
|
||||
<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="是否拼房">
|
||||
<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>
|
||||
@@ -375,83 +434,72 @@ layout("/mobile/platform.html"){
|
||||
</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-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>
|
||||
<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-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-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>
|
||||
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;
|
||||
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',
|
||||
el: "#app",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
roomColumns: ['大床房', '标准间'],
|
||||
bedColumns: ['1', '2'],
|
||||
companionColumns: ['亲属', '朋友'],
|
||||
roomColumns: ["大床房", "标准间"],
|
||||
bedColumns: ["1", "2"],
|
||||
companionColumns: ["亲属", "朋友"],
|
||||
bedVisible: false,
|
||||
roomVisible: false,
|
||||
companionVisible: false,
|
||||
joinPopup: false,
|
||||
skeLoading: true,
|
||||
id: '',
|
||||
id: "",
|
||||
baseData: {},
|
||||
formData: {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
@@ -459,25 +507,25 @@ layout("/mobile/platform.html"){
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
lineName: '',
|
||||
takePartInLineId: '',
|
||||
takePartInUnionId: '',
|
||||
lineName: "",
|
||||
takePartInLineId: "",
|
||||
takePartInUnionId: "",
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
bedInfo: {}
|
||||
},
|
||||
self: true,
|
||||
btnFlag: false,
|
||||
index: 0,
|
||||
scrollTop: 0,
|
||||
fromUrlByMy: '',
|
||||
enrollId: '',
|
||||
configData: {},
|
||||
fromUrlByMy: "",
|
||||
enrollId: "",
|
||||
configData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
roomCancel() {
|
||||
if (!this.self) {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = ''
|
||||
this.formData.companionList[this.active].bedInfo.bedType = ""
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
@@ -505,52 +553,52 @@ layout("/mobile/platform.html"){
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
message: "努力提交中"
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
if (item.userName === "") {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForBaseManagement', {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
const resp = await $.post("/platform/theRapyRecuperation/line/enroll/doSignUpForBaseManagement", {
|
||||
enroll: JSON.stringify(cloneData)
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
toast.message = "提交成功"
|
||||
toast.type = "success"
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
toast.type = "fail"
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
if (resp.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
|
||||
location.href = "/platform/mobile/theRapyRecuperation/myRecuperation?index=" + this.index
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
addCompanion() {
|
||||
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}})
|
||||
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', {
|
||||
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') {
|
||||
if (this.fromUrlByMy !== "editDo") {
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
@@ -560,14 +608,14 @@ layout("/mobile/platform.html"){
|
||||
baseName: this.baseData.baseName,
|
||||
takePartInBaseManagementId: this.baseData.id,
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
bedInfo: {}
|
||||
}
|
||||
this.$set(this.formData.bedInfo, 'bedType', '大床房')
|
||||
this.$set(this.formData.bedInfo, "bedType", "大床房")
|
||||
}
|
||||
this.joinPopup = true
|
||||
},
|
||||
async getData() {
|
||||
const res = await $.get('/platform/theRapyRecuperation/baseManagement/selectBaseAllInfo', {
|
||||
const res = await $.get("/platform/theRapyRecuperation/baseManagement/selectBaseAllInfo", {
|
||||
id: this.id
|
||||
})
|
||||
if (res.code === 0) {
|
||||
@@ -591,18 +639,18 @@ layout("/mobile/platform.html"){
|
||||
scrollToTop() {
|
||||
const that = this
|
||||
that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
|
||||
that.btnFlag = that.scrollTop > 100;
|
||||
that.btnFlag = that.scrollTop > 100
|
||||
},
|
||||
//修改时查询报名信息,进行回显
|
||||
async findSignUpInfoById() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
|
||||
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 => {
|
||||
this.formData.companionList.forEach((item) => {
|
||||
if (item.bedInfo === null) {
|
||||
item.bedInfo = {}
|
||||
}
|
||||
@@ -612,34 +660,34 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
async getConfigData() {
|
||||
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
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') : ''
|
||||
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') : ''
|
||||
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) {
|
||||
window.addEventListener("scroll", this.scrollToTop)
|
||||
document.addEventListener("click", function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG') {
|
||||
if (event.target.tagName === "IMG") {
|
||||
vant.ImagePreview([event.target.src])
|
||||
}
|
||||
})
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
window.removeEventListener("scroll", this.scrollToTop)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user