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

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

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

@ -54,9 +54,13 @@
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</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}}
</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>
</view>
@ -744,9 +748,9 @@
var jsonlist = JSON.parse(res.data);
console.log(jsonlist);
_that.form.total = jsonlist.length||6;
_that.form.total = jsonlist.length || 6;
for (var m of jsonlist) {
console.log("m",m);
console.log("m", m);
_that.form.details_list.push({
name: m.name,
idcard: m.idcard,

Loading…
Cancel
Save