刘翔宇-旅管家 3 years ago
parent 518b437958
commit db2aef8968

@ -15,7 +15,8 @@
<view class="activityBox-row"> <view class="activityBox-row">
<text class="icon-shijian iconfont"></text> <text class="icon-shijian iconfont"></text>
<text>活动时间{{timeFormat(list.start_time,"yyyy年MM月DD日")}} {{getHm(list.start_time)}}-{{getHm(list.end_time)}}</text> <text>活动时间{{timeFormat(list.start_time,"yyyy年MM月DD日")}}
{{getHm(list.start_time)}}-{{getHm(list.end_time)}}</text>
</view> </view>
<!-- <view class="activityBox-row"> <!-- <view class="activityBox-row">
@ -70,9 +71,12 @@
<view class=""> <view class="">
<view class="book-box-timerow"> <view class="book-box-timerow">
<block v-for="(item,index) in common_user" :key="index"> <block v-for="(item,index) in common_user" :key="index">
<view class="book-box-row-timeitem" :class="{'book-box-row-timeitem-on':item.checked}" @click="handleCommonUser(item)"> <view class="book-box-row-timeitem"
:class="{'book-box-row-timeitem-on':item.checked}"
@click="handleCommonUser(item)">
<view v-if="item.checked" class="book-box-row-timeitem-status"> <view v-if="item.checked" class="book-box-row-timeitem-status">
<u-icon name="checkmark" color="#fff" size="20rpx" v-if="item.checked"> <u-icon name="checkmark" color="#fff" size="20rpx"
v-if="item.checked">
</u-icon> </u-icon>
</view> </view>
<view>{{item.name}}</view> <view>{{item.name}}</view>
@ -151,7 +155,8 @@
</u-radio> </u-radio>
</u-radio-group> --> </u-radio-group> -->
<u-cell-group :border="false"> <u-cell-group :border="false">
<u-cell @click="showCards" :title="card_type_names" :isLink="true" arrow-direction="down"></u-cell> <u-cell @click="showCards" :title="card_type_names" :isLink="true"
arrow-direction="down"></u-cell>
</u-cell-group> </u-cell-group>
</u-form-item> </u-form-item>
<u-form-item label="证件号码" labelWidth="80" prop="from.idcard" required> <u-form-item label="证件号码" labelWidth="80" prop="from.idcard" required>
@ -186,7 +191,8 @@
</u-radio> </u-radio>
</u-radio-group> --> </u-radio-group> -->
<u-cell-group :border="false"> <u-cell-group :border="false">
<u-cell @click="showCard" :title="card_type_name" :isLink="true" arrow-direction="down"></u-cell> <u-cell @click="showCard" :title="card_type_name" :isLink="true" arrow-direction="down">
</u-cell>
</u-cell-group> </u-cell-group>
</u-form-item> </u-form-item>
<u-form-item label="证件号码" labelWidth="80" prop="formUser.idcard" ref="formUser.idcard" required> <u-form-item label="证件号码" labelWidth="80" prop="formUser.idcard" ref="formUser.idcard" required>
@ -201,8 +207,10 @@
</view> </view>
</u-popup> </u-popup>
<u-picker :show="cardshow" @cancel="cancel" @confirm="confirmCard" ref="uPicker" :columns="cardLists" keyName="label"></u-picker> <u-picker :show="cardshow" @cancel="cancel" @confirm="confirmCard" ref="uPicker" :columns="cardLists"
<u-picker :show="cardshows" @cancel="cancels" @confirm="confirmCards" ref="uPickers" :columns="cardLists" keyName="label"></u-picker> keyName="label"></u-picker>
<u-picker :show="cardshows" @cancel="cancels" @confirm="confirmCards" ref="uPickers" :columns="cardLists"
keyName="label"></u-picker>
<u-popup :show="showInfo" mode="bottom" @close="closeInfo" :round="10" closeable> <u-popup :show="showInfo" mode="bottom" @close="closeInfo" :round="10" closeable>
@ -219,11 +227,13 @@
</u-popup> </u-popup>
<u-popup :show="successshow" customStyle="width:600rpx;height:300rpx;text-align:center" :round="10" mode="center" width="600rpx" height="150rpx"> <u-popup :show="successshow" customStyle="width:600rpx;height:300rpx;text-align:center" :round="10"
mode="center" width="600rpx" height="150rpx">
<view class=""> <view class="">
<view class="successBox"> <view class="successBox">
<!-- <u-icon name="checkmark-circle" size="90" color="#EF9525"></u-icon> --> <!-- <u-icon name="checkmark-circle" size="90" color="#EF9525"></u-icon> -->
<view class="h3">您已经预约成功</view> <view class="h3">您已经预约成功</view>
<view class="p">报名成功后具体事宜请联系金老师65166121</view>
<view class="p">即将跳转到活动预约 {{time}} s</view> <view class="p">即将跳转到活动预约 {{time}} s</view>
</view> </view>
<view class="pinkBtn" @click="goHome"></view> <view class="pinkBtn" @click="goHome"></view>
@ -237,13 +247,13 @@
data() { data() {
return { return {
successshow: false, successshow: false,
time:3, time: 3,
showAdd: false, showAdd: false,
isEdit: false, isEdit: false,
isEditIndex: 0, isEditIndex: 0,
showInfo: false, showInfo: false,
list: {}, list: {},
common_user:[], common_user: [],
form: { form: {
unit: "", unit: "",
leader: "", leader: "",
@ -262,8 +272,8 @@
}, },
type: "user", type: "user",
rules: [], rules: [],
t:null, t: null,
timer:null, timer: null,
details_rule: { details_rule: {
name: [{ name: [{
required: true, required: true,
@ -281,12 +291,13 @@
trigger: 'change' trigger: 'change'
}] }]
}, },
cardshow:false, cardshow: false,
cardshows:false, cardshows: false,
card_type_name:"身份证", card_type_name: "身份证",
card_type_names:"身份证", card_type_names: "身份证",
// cardLists:['','','','',''], // cardLists:['','','','',''],
cardLists: [[{ cardLists: [
[{
value: 1, value: 1,
label: '身份证' label: '身份证'
}, },
@ -306,7 +317,8 @@
value: 5, value: 5,
label: '港澳证' label: '港澳证'
} }
]], ]
],
currentNotice: {}, currentNotice: {},
notice: [{ notice: [{
title: "预约须知", title: "预约须知",
@ -326,9 +338,9 @@
key: 'activityinfo', key: 'activityinfo',
success(res) { success(res) {
that.list = res.data; that.list = res.data;
if(that.form.type==2){ if (that.form.type == 2) {
that.form.total = 1 that.form.total = 1
}else if(that.form.type==1){ } else if (that.form.type == 1) {
that.form.total = res.data.team_min_count; that.form.total = res.data.team_min_count;
} }
} }
@ -358,40 +370,40 @@
timeFormat(val, format) { timeFormat(val, format) {
return this.$moment(val).format(format) return this.$moment(val).format(format)
}, },
confirmCards(e){ confirmCards(e) {
this.card_type_names = e.value[0].label this.card_type_names = e.value[0].label
this.form.card_type = e.value[0].value this.form.card_type = e.value[0].value
this.cardshows = false this.cardshows = false
}, },
cancel(){ cancel() {
this.cardshow = false this.cardshow = false
}, },
cancels(){ cancels() {
this.cardshows = false this.cardshows = false
}, },
showCards(){ showCards() {
this.cardshows = true this.cardshows = true
}, },
confirmCard(e){ confirmCard(e) {
this.card_type_name = e.value[0].label this.card_type_name = e.value[0].label
this.formUser.card_type = e.value[0].value this.formUser.card_type = e.value[0].value
this.cardshow = false this.cardshow = false
}, },
showCard(){ showCard() {
this.cardshow = true this.cardshow = true
}, },
goHome(){ goHome() {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "/pages/index/index"
}) })
}, },
loadCommonUser(){ loadCommonUser() {
var that = this; var that = this;
this.util.request({ this.util.request({
api: '/api/mobile/activity/address-book', api: '/api/mobile/activity/address-book',
utilSuccess: function(res) { utilSuccess: function(res) {
for(var m of res){ for (var m of res) {
m.checked = false m.checked = false
} }
that.common_user = res; that.common_user = res;
@ -401,14 +413,14 @@
} }
}) })
}, },
handleCommonUser(obj){ handleCommonUser(obj) {
obj.checked = !obj.checked obj.checked = !obj.checked
if(obj.checked){ if (obj.checked) {
this.form.details_list.push(obj) this.form.details_list.push(obj)
}else{ } else {
for(var i=0;i<this.form.details_list.length;i++){ for (var i = 0; i < this.form.details_list.length; i++) {
if(this.form.details_list[i].name==obj.name){ if (this.form.details_list[i].name == obj.name) {
this.form.details_list.splice(i,1) this.form.details_list.splice(i, 1)
} }
} }
@ -439,8 +451,8 @@
this.showAdd = true this.showAdd = true
}, },
delUser(index) { delUser(index) {
for(var i=0;i<this.common_user.length;i++){ for (var i = 0; i < this.common_user.length; i++) {
if(this.form.details_list[index].name == this.common_user[i].name){ if (this.form.details_list[index].name == this.common_user[i].name) {
this.common_user[i].checked = false; this.common_user[i].checked = false;
} }
} }
@ -625,16 +637,6 @@
clearInterval(that.t); clearInterval(that.t);
clearTimeout(that.timer) clearTimeout(that.timer)
}, 3000) }, 3000)
// uni.showToast({
// icon: "none",
// title: "",
// complete() {
// uni.redirectTo({
// url: "/pages/success/success?from=activity&id=" + res.id
// })
// }
// })
}, },
utilFail: function(res) { utilFail: function(res) {
uni.showToast({ uni.showToast({
@ -755,12 +757,14 @@
padding-bottom: 25rpx; padding-bottom: 25rpx;
border-bottom: 2px solid #F7F6F4; border-bottom: 2px solid #F7F6F4;
} }
.book-box-row-timeitem { .book-box-row-timeitem {
width:160rpx; width: 160rpx;
text-align: center; text-align: center;
} }
.box-card-content {} .box-card-content {}
.successBox { .successBox {
.iconfont { .iconfont {
@ -793,13 +797,15 @@
color: #FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
line-height: 70rpx; line-height: 70rpx;
margin:30rpx auto; margin: 30rpx auto;
} }
.u-radio-group{
.u-radio-group {
flex-wrap: wrap; flex-wrap: wrap;
} }
.u-radio-group .u-radio{
margin-bottom:10rpx; .u-radio-group .u-radio {
margin-right:10rpx margin-bottom: 10rpx;
margin-right: 10rpx
} }
</style> </style>

@ -100,6 +100,13 @@
}) })
}, },
onShareAppMessage() {
return {
title: this.list.name,
path: "/pages/activity/info?id=" + this.list.id,
imageUrl: this.list.cover_upload.url
}
},
methods: { methods: {
timeFormat(val, format) { timeFormat(val, format) {
return this.$moment(val).format(format) return this.$moment(val).format(format)

@ -88,13 +88,17 @@
<view class="book-box-row-timeitem-txt">{{item.start_time+'-'+item.end_time}}</view> <view class="book-box-row-timeitem-txt">{{item.start_time+'-'+item.end_time}}</view>
<block v-if="item.isCanbook"> <block v-if="item.isCanbook">
<view class="book-box-row-timeitem-txt" v-if="item.remain_count>0"> <view class="book-box-row-timeitem-txt"
v-if="item.remain_count>0&&item.remain_count<=50">
{{item.remain_count}} {{item.remain_count}}
</view> </view>
<view class="book-box-row-timeitem-txt" v-else-if="item.remain_count>50">
余票充足
</view>
<view class="book-box-row-timeitem-txt" v-else></view> <view class="book-box-row-timeitem-txt" v-else></view>
</block> </block>
<block v-else> <block v-else>
<view class="book-box-row-timeitem-txt" >不可预约</view> <view class="book-box-row-timeitem-txt">不可预约</view>
</block> </block>
</view> </view>
</view> </view>
@ -189,7 +193,7 @@
this.$refs.calendar.setFormatter(this.formatter) this.$refs.calendar.setFormatter(this.formatter)
}, },
onHide() { onHide() {
this.showBook=false; this.showBook = false;
}, },
methods: { methods: {
closePhone() { closePhone() {
@ -323,7 +327,7 @@
}, },
openInfo(e) { openInfo(e) {
this.currentNotice = this.listNotice[e]; this.currentNotice = this.listNotice[e];
this.currentNotice.content = this.currentNotice.content.replace(/\<p/gi,"<p class='richp'"); this.currentNotice.content = this.currentNotice.content.replace(/\<p/gi, "<p class='richp'");
this.showInfo = true; this.showInfo = true;
}, },
closeInfo() { closeInfo() {
@ -584,7 +588,8 @@
width: 421rpx; width: 421rpx;
height: 364rpx; height: 364rpx;
} }
.richp{
margin-bottom:10rpx; .richp {
margin-bottom: 10rpx;
} }
</style> </style>

@ -25,7 +25,7 @@
</view> </view>
<view class="mine-box-nav"> <view class="mine-box-nav">
<view class="mine-box-navtitle"> <view class="mine-box-navtitle">
我的预约 预约记录
</view> </view>
<view class="mine-box-navlist"> <view class="mine-box-navlist">
<view class="mine-box-navitem" @click="toPage(1)"> <view class="mine-box-navitem" @click="toPage(1)">

@ -54,9 +54,13 @@
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon> <u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view> </view>
<view class="book-box-row-timeitem-txt">{{item.start_time+'-'+item.end_time}}</view> <view class="book-box-row-timeitem-txt">{{item.start_time+'-'+item.end_time}}</view>
<view class="book-box-row-timeitem-txt" v-if="item.remain_count>0"> <view class="book-box-row-timeitem-txt"
v-if="item.remain_count>0&&item.remain_count<=50">
{{item.remain_count}} {{item.remain_count}}
</view> </view>
<view class="book-box-row-timeitem-txt" v-else-if="item.remain_count>50">
余票充足
</view>
<view class="book-box-row-timeitem-txt" v-else></view> <view class="book-box-row-timeitem-txt" v-else></view>
</view> </view>
</view> </view>
@ -744,9 +748,9 @@
var jsonlist = JSON.parse(res.data); var jsonlist = JSON.parse(res.data);
console.log(jsonlist); console.log(jsonlist);
_that.form.total = jsonlist.length||6; _that.form.total = jsonlist.length || 6;
for (var m of jsonlist) { for (var m of jsonlist) {
console.log("m",m); console.log("m", m);
_that.form.details_list.push({ _that.form.details_list.push({
name: m.name, name: m.name,
idcard: m.idcard, idcard: m.idcard,

Loading…
Cancel
Save