刘翔宇-旅管家 3 years ago
parent d572a79338
commit 7dc228f46c

@ -3,7 +3,7 @@
<div class="plate" :class="{show:show}">
<div :class="['item',{active:index===0}]" @click.stop="handleChange(0)">{{plate[0]}}</div>
<div :class="['item ml10',{active:index===1}]" @click="handleChange(1)">{{plate[1]}}</div>
<div></div>
<div style=" font-size: 16rpx; padding: 0rpx 8rpx;"></div>
<div :class="['item',{active:index===2}]" @click="handleChange(2)">{{plate[2]}}</div>
<div :class="['item ml10',{active:index===3}]" @click="handleChange(3)">{{plate[3]}}</div>
<div :class="['item ml10',{active:index===4}]" @click="handleChange(4)">{{plate[4]}}</div>

@ -5,39 +5,39 @@
<view class="box-card-title">
预约的活动
</view>
<view class="box-card-content activityBox-content">
<view class="activityBox-row flex-row justify-between">
<text class="activityBox-title">{{list.name}}</text>
<view class="tag tag_green">
<text>{{list.target_name}}</text>
</view>
</view>
<view class="activityBox-row">
<text class="icon-shijian iconfont"></text>
<text>活动时间{{list.start_time}}-{{list.end_time.substring(11,list.end_time.length)}}</text>
</view>
<view class="activityBox-row">
<text class="icon-huodongfangshi iconfont"></text>
<text>活动方式{{list.area_name}}</text>
</view>
<view class="activityBox-row">
<text class="icon-huodong iconfont"></text>
<text>活动地址{{list.address}}</text>
</view>
<view class="activityBox-row">
<text class="icon-renshu iconfont"></text>
<text>人数限制{{list.total==0?'不限':list.total}}</text>
</view>
<view class="activityBox-row flex-row align-center">
<text class="icon-ditu-dibiao iconfont"></text>
<text>距离{{list.distance}}km</text>
<view class="tomap">
<text class="icon-daohang1 iconfont" style="margin-right: 0;"></text>
</view>
<view class="box-card-content activityBox-content">
<view class="activityBox-row flex-row justify-between">
<text class="activityBox-title">{{list.name}}</text>
<view class="tag tag_green">
<text>{{list.target_name}}</text>
</view>
</view>
<view class="activityBox-row">
<text class="icon-shijian iconfont"></text>
<text>活动时间{{list.start_time}}-{{list.end_time.substring(11,list.end_time.length)}}</text>
</view>
<view class="activityBox-row">
<text class="icon-huodongfangshi iconfont"></text>
<text>活动方式{{list.area_name}}</text>
</view>
<view class="activityBox-row">
<text class="icon-huodong iconfont"></text>
<text>活动地址{{list.address}}</text>
</view>
<view class="activityBox-row">
<text class="icon-renshu iconfont"></text>
<text>人数限制{{list.total==0?'不限':list.total}}</text>
</view>
<view class="activityBox-row flex-row align-center">
<text class="icon-ditu-dibiao iconfont"></text>
<text>距离{{list.distance}}km</text>
<view class="tomap">
<text class="icon-daohang1 iconfont" style="margin-right: 0;"></text>
</view>
</view>
</view>
@ -76,26 +76,26 @@
</block>
</view>
<view class="box-footer">
<view class="box-footer-left">
<view class="box-button" @click="openAdd">
<u-icon name="plus" color="#EF9525"></u-icon>
<text class="box-button-txt">添加观众</text>
</view>
</view>
<view class="box-footer-right" v-if="type=='team'">
<view class="box-button" @click="selectFile">
<u-icon name="plus" color="#EF9525"></u-icon>
<text class="box-button-txt">批量导入观众</text>
</view>
</view>
</view>
<view class="book-box-selectInfo" v-if="type=='team'" style="width: 100%; margin-top: 20rpx;">
<view class="book-box-selectInfo-right" @click="openNoticeInfo(1)">
<u-icon name="question-circle-fill" color="#EF9525" size="40rpx"></u-icon>
<text class="book-box-selectInfo-righttxt" style="margin-left: 20rpx;">批量导入说明</text>
</view>
<view class="box-footer">
<view class="box-footer-left">
<view class="box-button" @click="openAdd">
<u-icon name="plus" color="#EF9525"></u-icon>
<text class="box-button-txt">添加观众</text>
</view>
</view>
<view class="box-footer-right" v-if="type=='team'">
<view class="box-button" @click="selectFile">
<u-icon name="plus" color="#EF9525"></u-icon>
<text class="box-button-txt">批量导入观众</text>
</view>
</view>
</view>
<view class="book-box-selectInfo" v-if="type=='team'" style="width: 100%; margin-top: 20rpx;">
<view class="book-box-selectInfo-right" @click="openNoticeInfo(1)">
<u-icon name="question-circle-fill" color="#EF9525" size="40rpx"></u-icon>
<text class="book-box-selectInfo-righttxt" style="margin-left: 20rpx;">批量导入说明</text>
</view>
</view>
</view>
</view>
@ -161,19 +161,19 @@
<u-button type="primary" @click="handleAddUser"></u-button>
</view>
</view>
</u-popup>
<u-popup :show="showInfo" mode="bottom" @close="closeInfo" :round="10" closeable>
<view class="mpopup">
<view class="mpopup-title">
{{currentNotice.title}}
</view>
<view class="mpopup-content" style="margin-top: 60rpx;">
<rich-text :nodes="currentNotice.content"></rich-text>
<view style="margin-top: 80px;"></view>
<u-button type="primary" @click="closeInfo"></u-button>
</view>
</view>
</u-popup>
<u-popup :show="showInfo" mode="bottom" @close="closeInfo" :round="10" closeable>
<view class="mpopup">
<view class="mpopup-title">
{{currentNotice.title}}
</view>
<view class="mpopup-content" style="margin-top: 60rpx;">
<rich-text :nodes="currentNotice.content"></rich-text>
<view style="margin-top: 80px;"></view>
<u-button type="primary" @click="closeInfo"></u-button>
</view>
</view>
</u-popup>
</view>
</template>
@ -181,20 +181,20 @@
<script>
export default {
data() {
return {
showAdd: false,
isEdit: false,
isEditIndex: 0,
showInfo: false,
list:{},
return {
showAdd: false,
isEdit: false,
isEditIndex: 0,
showInfo: false,
list: {},
form: {
unit: "",
leader: "",
card_type: 1,
idcard: "",
total: 1,
type: "",
mobile:"",
type: "",
mobile: "",
details_list: []
},
formUser: {
@ -230,32 +230,32 @@
id: 2,
name: '护照',
}
],
currentNotice: {},
notice: [{
title: "预约须知",
content: "预约须知的内容"
}, {
title: "批量上传帮助",
content: "<p>1.批量上传EXCEL的以xlsx结尾</p><p>2.第一列为标题列 姓名 手机号 证件号</p><p>3.文件是从微信聊天记录中选取或者微信文件传输助手</p>"
],
currentNotice: {},
notice: [{
title: "预约须知",
content: "预约须知的内容"
}, {
title: "批量上传帮助",
content: "<p>1.批量上传EXCEL的以xlsx结尾</p><p>2.第一列为标题列 姓名 手机号 证件号</p><p>3.文件是从微信聊天记录中选取或者微信文件传输助手</p>"
}]
}
},
onLoad(options) {
this.type = options.type;
this.form.type = (options.type == 'user' ? 2 : 1);
this.form.activity_id = parseInt(options.activity_id);
var that = this;
wx.getStorage({
key: 'activityinfo',
success (res) {
that.list = res.data
}
})
console.log(this.list)
that.util.getUserInfo(function(r) {
that.form.mobile = r.mobile;
this.type = options.type;
this.form.type = (options.type == 'user' ? 2 : 1);
this.form.activity_id = parseInt(options.activity_id);
var that = this;
wx.getStorage({
key: 'activityinfo',
success(res) {
that.list = res.data
}
})
console.log(this.list)
that.util.getUserInfo(function(r) {
that.form.mobile = r.mobile;
}, true);
},
methods: {
@ -275,38 +275,29 @@
},
delUser(index) {
this.form.details_list.splice(index, 1);
},
closeInfo() {
this.showInfo = false;
},
openNoticeInfo(type) {
this.showInfo = true;
this.currentNotice = this.notice[type];
},
closeInfo() {
this.showInfo = false;
},
openNoticeInfo(type) {
this.showInfo = true;
this.currentNotice = this.notice[type];
},
handleAddUser() {
var that = this;
//
try {
if (this.util.isNull(this.formUser.name)) {
uni.showToast({
icon: "none",
title: "请填写观众姓名"
})
this.util.toast("请填写观众姓名");
return false;
}
if (that.formUser.card_type == 1) {
if (this.util.isNull(this.formUser.idcard)) {
uni.showToast({
icon: "none",
title: "请填写身份证号"
})
this.util.toast("请填写身份证号");
return false;
}
if (!uni.$u.test.idCard(that.formUser.idcard)) {
uni.showToast({
icon: "none",
title: "请正确输入身份证号"
})
this.util.toast("请正确输入身份证号");
return false;
}
}
@ -325,56 +316,56 @@
//TODO handle the exception
}
},
selectFile() {
let _that = this
wx.chooseMessageFile({
count: 1, // 0100
type: 'file', //
success(res) {
// tempFilePathimgsrc
const tempFilePaths = res.tempFiles[0].path
let filename = res.tempFiles[0].name; //
//
if (filename.indexOf(".xlsx") == -1) {
uni.showToast({
icon: "none",
title: "暂时仅支持xlsx格式的文件"
})
return
} else {
console.log("开始上传");
uni.showLoading({
title: "正在上传"
})
wx.uploadFile({
url: _that.util.HOST + '/api/mobile/visit/excel-analyse', //
filePath: tempFilePaths, //data
name: 'file', //
formData: { //formData
"token": uni.getStorageSync("userInfo_token").token
},
success(res) {
var jsonlist = JSON.parse(res.data)
for (var m of jsonlist) {
_that.form.details_list.push({
name: m.name,
idcard: m.idcard,
mobile: m.mobile,
card_type: 1
})
}
uni.hideLoading();
}
})
console.log('上传到服务器')
}
}
})
},
selectFile() {
let _that = this
wx.chooseMessageFile({
count: 1, // 0100
type: 'file', //
success(res) {
// tempFilePathimgsrc
const tempFilePaths = res.tempFiles[0].path
let filename = res.tempFiles[0].name; //
//
if (filename.indexOf(".xlsx") == -1) {
uni.showToast({
icon: "none",
title: "暂时仅支持xlsx格式的文件"
})
return
} else {
console.log("开始上传");
uni.showLoading({
title: "正在上传"
})
wx.uploadFile({
url: _that.util.HOST + '/api/mobile/visit/excel-analyse', //
filePath: tempFilePaths, //data
name: 'file', //
formData: { //formData
"token": uni.getStorageSync("userInfo_token").token
},
success(res) {
var jsonlist = JSON.parse(res.data)
for (var m of jsonlist) {
_that.form.details_list.push({
name: m.name,
idcard: m.idcard,
mobile: m.mobile,
card_type: 1
})
}
uni.hideLoading();
}
})
console.log('上传到服务器')
}
}
})
},
submitOrder() {
if (this.util.isNull(this.form.leader)) {
if (this.type == "user") {
uni.showToast({
@ -433,7 +424,8 @@
if (this.form.details_list.length != this.form.total) {
uni.showToast({
icon: "none",
title: "请正确添加观众数量"
title: "请正确添加观众数量",
duration: 2000
})
return false;
}
@ -470,6 +462,7 @@
<style>
@import url("@/static/css/bookbox.css");
@import url("@/static/css/activitybox.css");
.box-visitor-item {
display: flex;
justify-content: space-between;

@ -4,14 +4,13 @@
<view class="activityBox">
<view class="activityBox-top">
<!-- <image src="../../static/img/img_activity.jpg" style="width: 100%;height: 333rpx;"></image> -->
<swiper autoplay="true" :interval="4000" :duration="1000" :indicator-dots="true"
indicator-active-color="rgba(255, 255, 255, 0.7)" indicator-color="rgba(239, 149, 37, 1)"
:current="topSwiperIndex" @change="topSwiperTab">
<swiper-item v-for="(item,index) in list.banners" :key="index">
<view class="swiper-item">
<image :src="item.upload.url" mode="aspectFill"></image>
</view>
</swiper-item>
<swiper autoplay="true" :interval="4000" :duration="1000" :indicator-dots="true"
indicator-active-color="rgba(255, 255, 255, 0.7)" indicator-color="rgba(239, 149, 37, 1)" :current="topSwiperIndex" @change="topSwiperTab">
<swiper-item v-for="(item,index) in list.banners" :key="index">
<view class="swiper-item">
<image :src="item.upload.url" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
</view>
<view class="activityBox-content flex-col">
@ -24,7 +23,7 @@
<view class="activityBox-row">
<text class="icon-shijian iconfont"></text>
<text>活动时间{{list.start_time||""}}-{{list.end_time.substring(11,list.end_time.length)}}</text>
<text>活动时间{{list.start_time}}-{{list.end_time.substring(11,list.end_time.length)}}</text>
</view>
<view class="activityBox-row">
@ -47,12 +46,12 @@
<view class="tomap">
<text class="icon-daohang1 iconfont" style="margin-right: 0;"></text>
</view>
</view>
<!-- <view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;">
<text v-if="list.status==0"></text>
<text v-if="list.status==1">{{list.orders_count}}</text>
</view> -->
</view>
<!-- <view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;">
<text v-if="list.status==0"></text>
<text v-if="list.status==1">{{list.orders_count}}</text>
</view> -->
</view>
</view>
@ -80,54 +79,54 @@
export default {
data() {
return {
id: "",
latitude: "",
longitude: "",
list: {},
id:"",
latitude:"",
longitude:"",
list:{},
topSwiperIndex: 0,
}
},
onLoad(options) {
this.id = options.id;
this.latitude = options.latitude;
this.longitude = options.longitude;
this.loadActiveInfo()
},
onLoad(options){
this.id=options.id;
this.latitude=options.latitude;
this.longitude=options.longitude;
this.loadActiveInfo()
},
methods: {
tobook(type) {
tobook(type) {
uni.navigateTo({
url: "book?type=" + type + "&activity_id=" + this.id
url: "book?type=" + type + "&activity_id="+this.id
})
},
loadActiveInfo() {
var that = this;
this.util.request({
api: '/api/mobile/activity/show',
data: {
id: that.id,
latitude: that.latitude,
longitude: that.longitude
},
utilSuccess: function(res) {
that.list = res;
wx.setStorage({
key: 'activityinfo',
data: res,
success: () => {
console.log('存储成功');
}
})
},
utilFail: function(res) {
}
})
},
topSwiperTab(e) {
var that = this;
this.topSwiperIndex = Number(e.target.current);
}
},
loadActiveInfo(){
var that = this;
this.util.request({
api: '/api/mobile/activity/show',
data:{
id:that.id,
latitude:that.latitude,
longitude:that.longitude
},
utilSuccess: function(res) {
that.list = res;
wx.setStorage({
key: 'activityinfo',
data: res,
success: ()=> {
console.log('存储成功');
}
})
},
utilFail: function(res) {
}
})
},
topSwiperTab(e) {
var that = this;
this.topSwiperIndex = Number(e.target.current);
}
}
}
</script>
@ -171,14 +170,12 @@
box-shadow: 2px 3px 10px 0px rgba(107, 94, 77, 0.3);
padding: 22rpx 25rpx;
box-sizing: border-box;
}
swiper {
height: 333rpx
}
swiper image {
width: 100%;
height: 333rpx;
}
swiper{
height:333rpx
}
swiper image{
width:100%;
height:333rpx;
}
</style>

@ -227,10 +227,7 @@
let list = this.listDatePrice;
let cdate = list[index];
if (nt == cdate.date) {
uni.showToast({
icon: "none",
title: "请提前一天预约"
})
this.util.toast("请提前一天预约");
return;
}
for (var m of list) {

@ -1,7 +1,7 @@
<template>
<view>
<map style="width: 100%; height: 100vh;position: relative;" :latitude="info.latitude" :longitude="info.longitude"
:markers="covers"></map>
<map style="width: 100%; height: 100vh;position: relative;" @markertap="markertap" :latitude="info.latitude"
:longitude="info.longitude" :markers="covers"></map>
</view>
</template>
@ -14,16 +14,22 @@
}
},
onLoad() {
this.loadInfo(function(res) {
uni.openLocation({
latitude: res.latitude,
longitude: res.longitude,
name: res.name,
address: res.address
});
})
this.openlocation();
},
methods: {
markertap() {
this.openlocation();
},
openlocation() {
this.loadInfo(function(res) {
uni.openLocation({
latitude: res.latitude,
longitude: res.longitude,
name: res.name,
address: res.address
});
})
},
loadInfo(cb) {
var that = this;
this.util.request({

@ -7,18 +7,18 @@
<u-empty mode="list" :marginTop="100" v-if="isloading&&listOrder.length==0" />
<view class="orderBoxList" v-else>
<block v-for="(item,index) in listOrder" :key="index">
<view class="orderBox" @click="toinfo(item.id)">
<view class="orderBox" :class="{'cancelBox':item.status==0}" @click="toinfo(item.id)">
<view class="orderBoxTitle flex-row">
<text class="orderBoxTitleTxt">{{item.type==1?"团队预约":"个人预约"}}</text>
<view class="orderBoxStatus" :class="{'cancel':item.status==0}">{{item.status_name}}</view>
<view class="orderBoxStatus" :class="{'cancelStatus':item.status==0}">{{item.status_name}}
</view>
</view>
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt">
订单信息{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}
{{item.time}}{{item.details_count}}位观众</text>
订单信息{{$u.timeFormat(new Date(item.date), 'mm月dd日')}} {{item.time}}{{item.details_count}} 位观众</text>
</view>
<view class="orderBoxInfoRow flex-row">
@ -35,8 +35,9 @@
</view>
<view class="orderBoxFooter flex-row flex_end">
<view class="fbtn" @click.stop="toinfo(item.id)" style="margin-right: 23rpx;">查看详情</view>
<view class="fbtn cancel" @click.stop="tocancel(item.id)">取消</view>
<view class="fbtn cancel" v-if="item.status==1" style="margin-right: 23rpx;"
@click.stop="tocancel(item.id)">取消</view>
<view class="fbtn" @click.stop="toinfo(item.id)">查看详情</view>
</view>
</view>
</block>
@ -149,6 +150,15 @@
color: #828282;
}
.cancelBox .iconfont {
color: #828282;
}
.cancelBox .fbtn {
background: #CFCFCF;
color: #828282;
}
.iconfont {
color: #6EAC97;
margin-right: 20rpx;
@ -193,8 +203,8 @@
color: #351C1B;
}
.cancelstatus {
background: #828282;
.cancelStatus {
background: #CFCFCF !important;
}
.orderBoxStatus {

@ -3,85 +3,77 @@
<view class="orderBoxList">
<view class="orderBox">
<view class="orderBoxTitle flex-row">
<text class="orderBoxTitleTxt">{{info.isteam?"团队预约信息":"个人预约信息"}}</text>
<text class="orderBoxTitleTxt">{{info.type==1?"团队预约信息":"个人预约信息"}}</text>
</view>
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt">订单信息5月06日 09:00-10:00  3位观众</text>
<text class="orderBoxInfoRowTxt">订单信息{{$u.timeFormat(new Date(info.date), 'mm月dd日')}}
{{info.time||""}}{{info.total}} 位观众</text></text>
</view>
<view class="orderBoxInfoRow flex-row">
<text class="iconfont icon-iconfontgerenzhongxin"></text>
<text class="orderBoxInfoRowTxt">联系人王小华 13355634563</text>
<text class="orderBoxInfoRowTxt">联系人{{info.leader||""}} {{info.mobile||""}}</text>
</view>
<view class="orderBoxInfoRow flex-row" v-if="info.isteam" style="margin-top: 20rpx;">
<view class="orderBoxInfoRow flex-row" v-if="info.type==1" style="margin-top: 20rpx;">
<text class="iconfont icon-danwei"></text>
<text class="orderBoxInfoRowTxt">单位名称王小华 13355634563</text>
<text class="orderBoxInfoRowTxt">单位名称{{info.unit||""}}</text>
</view>
</view>
<view class="orderBoxTime">
<text>下单时间5月03日 09:30</text>
<text>下单时间{{info.created_at||""}}</text>
</view>
</view>
</view>
<view class="orderBoxList p0">
<view class="orderBox">
<view class="orderBoxTitle flex-row">
<text class="orderBoxTitleTxt">二维码</text>
</view>
<view class="orderBoxInfo flex-col ewmcode">
<text>0871 3355 6345</text>
<view>
<view :class="isuse?'imgs isuse':'imgs'">
<image :src="imgsrc" mode="aspectFill"></image>
</view>
</view>
<text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text>
</view>
</view>
</view>
<view class="orderBoxList p0">
<view class="orderBox">
<view class="orderBoxTitle flex-row" style="justify-content: space-between;">
<text class="orderBoxTitleTxt">观众信息</text>
<text :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
分享二维码
</text>
</view>
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row">
<view>
<text class="iconfont icon-iconfontgerenzhongxin iconinfo"></text>
</view>
<view class="usercard">
<text class="orderBoxInfoRowTxt">王小华</text>
<text class="orderBoxInfoRowTxt">370820201004052234</text>
</view>
</view>
</view>
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row">
<view>
<text class="iconfont icon-iconfontgerenzhongxin iconinfo"></text>
</view>
<view class="usercard">
<text class="orderBoxInfoRowTxt">王小华</text>
<text class="orderBoxInfoRowTxt">370820201004052234</text>
</view>
</view>
</view>
</view>
</view>
<view class="orderBoxList p0">
<view class="orderBoxTitle flex-row">
<text class="stars orderBoxTitleTxt">*</text>
<text class="orderBoxTitleTxt">参观须知</text>
</view>
<view class="orderBoxTitle flex-row">
<text class="orderBoxInfoRowTxt">预约时需要个人姓名联系方式和参观时间等信息预约成功后生成预约二维码可于个人中心查看当天凭有效身份证件或预约二维码核销入场</text>
</view>
</view>
<view class="orderBoxList p0">
<view class="orderBox">
<view class="orderBoxTitle flex-row">
<text class="orderBoxTitleTxt">二维码</text>
</view>
<view class="orderBoxInfo flex-col ewmcode">
<text>{{info.code}}</text>
<view>
<view :class="isuse?'imgs isuse':'imgs'">
<image :src="imgsrc" mode="aspectFill"></image>
</view>
</view>
<text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text>
</view>
</view>
</view>
<view class="orderBoxList p0">
<view class="orderBox">
<view class="orderBoxTitle flex-row" style="justify-content: space-between;">
<text class="orderBoxTitleTxt">观众信息</text>
<text :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
分享二维码
</text>
</view>
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;"
v-for="(item,index) in info.details">
<view>
<text class="iconfont icon-iconfontgerenzhongxin iconinfo"></text>
</view>
<view class="usercard">
<text class="orderBoxInfoRowTxt">{{item.name}}</text>
<text class="orderBoxInfoRowTxt">{{item.idcard}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="orderBoxList p0">
<view class="orderBoxTitle flex-row">
<text class="stars orderBoxTitleTxt">*</text>
<text class="orderBoxTitleTxt">参观须知</text>
</view>
<view class="orderBoxTitle flex-row">
<text
class="orderBoxInfoRowTxt">预约时需要个人姓名联系方式和参观时间等信息预约成功后生成预约二维码可于个人中心查看当天凭有效身份证件或预约二维码核销入场</text>
</view>
</view>
</view>
</template>
@ -91,19 +83,61 @@
return {
info: {
isteam: true
},
isuse:false,
imgsrc:'https://cdn.uviewui.com/uview/album/1.jpg'
},
imgsrc: 'https://cdn.uviewui.com/uview/album/1.jpg'
}
},
onLoad(options) {
if (!this.util.isNull(options.id)) {
this.loadInfo(options.id);
this.loadQR(options.id);
}
},
methods: {
loadQR(id) {
var that = this;
this.util.request({
api: '/api/mobile/visit/person-qrcode',
data: {
id: id
},
utilSuccess: function(res) {
//that.info = res;
console.log(res)
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res
})
}
})
},
loadInfo(id) {
var that = this;
this.util.request({
api: '/api/mobile/user/my-visit-order-show',
data: {
id: id
},
utilSuccess: function(res) {
that.info = res;
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res
})
}
})
}
}
}
</script>
<style>
.orderBoxFooter {
.orderBoxFooter {
padding: 20rpx 0 0 0;
}
@ -193,63 +227,75 @@
padding: 23rpx 0;
border-bottom: 2rpx solid #F7F6F4;
font-size: 24rpx;
}
.p0{
padding-top:0
}
.ewmcode{
text-align: center;
font-size:28rpx
}
.imgs{
width: 273rpx;
height: 273rpx;
margin: 30rpx 0 50rpx 0;
font-size: 0;
display: inline-block;
}
.imgs image{
width:273rpx;
height:273rpx;
}
.imgs.isuse{
background: url(../../static/img/used.png);
background-position: bottom right;
background-size: 161rpx;
background-repeat: no-repeat;
}
.imgs.isuse image{
opacity: .4;
}
.ewminfo{
color:#828282;
font-size: 24rpx;
}
.iconinfo{
font-size: 35rpx;
}
.usercard text{
display: block;
}
.share{
background: url(../../static/img/share.png) no-repeat left center;
background-size: 21rpx;
background-color: #EF9525;
background-position: 18rpx;
padding: 7rpx 20rpx;
padding-left: 46rpx;
border-radius: 10px;
color:#fff;
}
.shareuse{
background: url(../../static/img/share_used.png) no-repeat left center;
background-color: #F7F6F4;
color:#828282;
background-position: 18rpx;
background-size: 21rpx;
}
.stars{
color: #EF9525;
margin-right:12rpx
}
.p0 {
padding-top: 0
}
.ewmcode {
text-align: center;
font-size: 28rpx
}
.imgs {
width: 273rpx;
height: 273rpx;
margin: 30rpx 0 50rpx 0;
font-size: 0;
display: inline-block;
}
.imgs image {
width: 273rpx;
height: 273rpx;
}
.imgs.isuse {
background: url(../../static/img/used.png);
background-position: bottom right;
background-size: 161rpx;
background-repeat: no-repeat;
}
.imgs.isuse image {
opacity: .4;
}
.ewminfo {
color: #828282;
font-size: 24rpx;
}
.iconinfo {
font-size: 35rpx;
}
.usercard text {
display: block;
}
.share {
background: url(../../static/img/share.png) no-repeat left center;
background-size: 21rpx;
background-color: #EF9525;
background-position: 18rpx;
padding: 7rpx 20rpx;
padding-left: 46rpx;
border-radius: 10px;
color: #fff;
}
.shareuse {
background: url(../../static/img/share_used.png) no-repeat left center;
background-color: #F7F6F4;
color: #828282;
background-position: 18rpx;
background-size: 21rpx;
}
.stars {
color: #EF9525;
margin-right: 12rpx
}
</style>

@ -2,26 +2,23 @@
<view>
<view class="box-content">
<view class="box-card">
<view class="box-tip justify-between">
<text class="box-tiptxt">已选3月31日+09:00-10:00</text>
<view class="box-tip justify-between" @click="openselectorder">
<text class="box-tiptxt">已选{{selectInfo}}</text>
<view class="box-tipbtn">选择已预约的参观 > </view>
</view>
<u--form labelPosition="top" labelWidth="120px" :model="form" ref="form">
<u-form-item label="预约入场时间" labelPosition="top" borderBottom ref="time">
<view @click="handleSelectTime" style="color: #EF9525;font-size: 24rpx;">请选择入场时间></view>
<u-datetime-picker :show="showSelecttime" closeOnClickOverlay @close="cancelTime" @cancel="cancelTime"
@confirm="confirmTime" v-model="form.time" mode="datetime">
<u-form-item label="预约入场时间" labelPosition="top" borderBottom>
<view @click="handleSelectTime" style="color: #EF9525;font-size: 24rpx;">
{{(form.time?$u.timeFormat(new Date(form.time), 'yyyy年mm月dd日 hh:MM'):'请选择入场时间>')}}
</view>
<u-datetime-picker :show="showSelecttime" closeOnClickOverlay @close="cancelTime"
@cancel="cancelTime" @confirm="confirmTime" v-model="form.time" mode="datetime">
</u-datetime-picker>
</u-form-item>
<u-form-item label="车牌号码" labelPosition="top" borderBottom ref="plate">
<plate @listenPlateChange="plateChange" :defaultPlate="plateNumber" />
</u-form-item>
<u-form-item label="车牌类型" labelPosition="top" borderBottom ref="car_type">
<u-radio-group v-model="form.car_type" class="justify-around">
<u-radio shape="circle" activeColor="#EF9525" :name='1' label="普通车"></u-radio>
<u-radio shape="circle" activeColor="#EF9525" :name='2' label="新能源车"></u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="手机号" labelPosition="top" borderBottom ref="mobile">
<u--input placeholder="请输入手机号" v-model="form.mobile" border="surround" clearable></u--input>
</u-form-item>
@ -35,8 +32,49 @@
</view>
</view>
<view class="page-bottom">
<u-button type="primary">确定</u-button>
<u-button type="primary" @click="submitOrder"></u-button>
</view>
<u-popup :show="showSelectorder" mode="bottom" :closeOnClickOverlay="false" @close="closeorder" :round="10">
<view class="mpopup">
<view class="mpopup-title">
选择预约的活动或者预约的参观
</view>
<view class="mpopup-content" style="padding: 40rpx 20rpx;">
<view v-if="listOrder.length!=0">
<view class="mpopup-title" style="text-align: left;padding: 20rpx 0;font-size: 14px;">
预约的参观
</view>
<block v-for="(item,index) in listOrder" :key="index">
<view class="box-tip flex-row align-center" @click="handleSelectOrder(index,1)"
style="margin-bottom: 20rpx;">
<u-icon :name="(item.checked?'checkmark-circle-fill':'checkmark-circle')"
color="#EF9525">
</u-icon>
<view class="box-tiptxt" style="margin-left: 10rpx;">
{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}
{{item.time}}{{item.details_count}} 位观众</text>
</view>
</view>
</block>
</view>
<view v-if="listActivtyOrder.length!=0">
<view class="mpopup-title" style="text-align: left;padding: 20rpx 0;font-size: 14px;">
预约的活动
</view>
<block v-for="(item,index) in listActivtyOrder" :key="index">
<view class="box-tip flex-row align-center" @click="handleSelectOrder(index,2)"
style="margin-bottom: 20rpx;">
<u-icon :name="(item.checked?'checkmark-circle-fill':'checkmark-circle')"
color="#EF9525">
</u-icon>
<view class="box-tiptxt" style="margin-left: 10rpx;">请认真阅读知悉并遵守实训基地预约停车须知</view>
</view>
</block>
</view>
<u-button type="primary" @click="handleConfirmOrder"></u-button>
</view>
</view>
</u-popup>
</view>
</template>
@ -51,41 +89,184 @@
},
data() {
return {
showSelectorder: true,
selectInfo: "--",
showSelecttime: false,
plateNumber: ['苏', 'E', '', '', '', '', ''],
form: {
plate: "",
mobile: "",
time: Number(new Date()),
time: new Date(),
car_park_id: "",
checkUser: false,
car_type: 1,
type: "1"
}
type: "1",
car_park_id: 0
},
listOrder: [],
listActivtyOrder: [],
orderType: 1,
orderid: 0,
}
},
onLoad() {
onLoad(options) {
let that = this;
if (!that.util.isNull(options.id)) {
this.form.car_park_id = options.id;
}
if (!that.util.isNull(options.currentPark)) {
this.form.type = options.currentPark;
}
this.loadOrder(function() {
that.loadactivityOrder(function() {})
});
that.util.getUserInfo(function(r) {
that.form.mobile = r.mobile;
}, true);
},
onShow() {
},
methods: {
confirmTime() {
handleConfirmOrder() {
if (this.orderid === 0) {
this.util.toast("请选择预约的活动或者预约的参观");
return false;
}
this.showSelectorder = false;
},
handleSelectOrder(index, type) {
for (var m of this.listActivtyOrder) {
m.checked = false;
}
for (var m of this.listOrder) {
m.checked = false;
}
if (type == 1) {
this.listOrder[index].checked = true;
this.selectInfo = this.$moment(this.listOrder[index].date).format("MM月DD日") + " " + this.listOrder[
index].time
this.form.time = this.$moment(this.listOrder[index].date).format("YYYY-MM-DD") + " " + this.listOrder[
index].time.split("-")[0];
this.orderid = this.listOrder[index].id;
} else {
this.listActivtyOrder[index].checked = false
this.selectInfo = this.$moment(this.listActivtyOrder[index].date).format("MM月DD日") + " " + this
.listActivtyOrder[index].time
this.orderid = this.listActivtyOrder[index].id;
}
this.orderType = type;
},
openselectorder() {
this.showSelectorder = false;
},
closeorder() {
this.showSelectorder = false;
},
loadOrder(cb) {
var that = this;
this.util.request({
api: '/api/mobile/user/my-visit-order',
data: {
status: 1
},
utilSuccess: function(res) {
for (var mod of res) {
mod.checked = false;
}
that.listOrder = res;
cb(res)
},
utilFail: function(res) {
this.util.toast(res)
}
})
},
loadactivityOrder(cb) {
var that = this;
this.util.request({
api: '/api/mobile/user/my-activity-order',
data: {
status: 1
},
utilSuccess: function(res) {
for (var mod of res) {
mod.checked = false;
}
that.listActivtyOrder = res;
cb(res);
},
utilFail: function(res) {
this.util.toast(res)
}
})
},
confirmTime(e) {
console.log(e)
this.showSelecttime = false;
},
cancelTime() {
this.showSelecttime = false;
},
plateChange(val) {
console.log(val);
this.form.plate = val.join("")
},
handleChange() {
this.form.checkUser = !this.form.checkUser;
},
handleSelectTime() {
this.showSelecttime = true;
}
},
submitOrder() {
if (this.util.isNull(this.orderid)) {
this.util.toast("请选择参观预约或者活动预约");
return false;
}
if (this.form.plate.length != 7 && this.form.plate.length != 8) {
this.util.toast("请正确填写车牌号");
return false;
}
if (this.util.isNull(this.form.mobile)) {
uni.showToast({
icon: "none",
title: "请填写手机号"
})
return false;
} else if (!uni.$u.test.mobile(this.form.mobile)) {
uni.showToast({
icon: "none",
title: "请正确填写手机号"
})
return false;
}
if (!this.form.checkUser) {
this.util.toast("请阅读预约通知");
return false;
}
var that = this;
this.util.request({
api: '/api/mobile/carpark/order',
data: this.form,
utilSuccess: function(res) {
console.log(res)
uni.showToast({
icon: "none",
title: "下单成功",
complete() {
uni.reLaunch({
url: "/pages/success/success?from=park&id=" + res.id
})
}
})
},
utilFail: function(res) {
that.util.toast(res);
}
})
},
}
}
</script>
@ -139,6 +320,6 @@
left: 0;
padding: 15rpx 25rpx;
box-sizing: border-box;
z-index: 1024;
z-index: 10;
}
</style>

@ -7,19 +7,20 @@
<view class="book-box">
<view class="activityBox-content flex-col">
<view class="activityBox-row" style="margin-bottom: 56rpx;">
<text class="activityBox-title">苏州市党性教育实训基地停车场</text>
<text class="activityBox-title">{{info.name}}</text>
</view>
<view class="activityBox-row">
<text class="icon-shijian iconfont"></text>
<text>预约可入场时间段00:00:00-23:59:59</text>
<text>预约可入场时间段{{info.start_time}}-{{info.end_time}}</text>
</view>
<view class="activityBox-row">
<text class="icon-huodong iconfont"></text>
<text>地址苏州市姑苏区体育场路4号</text>
<text>地址{{info.address}}</text>
</view>
<view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;">
<view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;"
@click="openlocation">
<text class="icon-ditu-dibiao iconfont"></text>
<text>距离11.3km</text>
<view class="tomap">
@ -30,27 +31,28 @@
<view class="parkbox-title">可预约车位</view>
<view class="parkbox-content flex-row justify-around">
<view class="parkbox-item flex-row align-center" style="margin-right: 15rpx;"
@click="handleSelectPark(1)" :class="(currentPark==1?'parkbox-item-on':'')">
<view class="parkbox-item-status" v-if="currentPark==1">
@click="handleSelectPark(2)" :class="(currentPark==2?'parkbox-item-on':'')">
<view class="parkbox-item-status" v-if="currentPark==2">
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view>
<text class="iconfont icon-tingchechang1" style="font-size: 28rpx;"></text>
<view>
<text>大中10</text>
<text>大中{{info.big_park_total}}</text>
</view>
</view>
<view class="parkbox-item flex-col align-center"
:class="(currentPark==2?'parkbox-item-on':'')" @click="handleSelectPark(2)"
:class="(currentPark==1?'parkbox-item-on':'')" @click="handleSelectPark(1)"
style="margin-left: 15rpx;">
<view class="parkbox-item-status" v-if="currentPark==2">
<view class="parkbox-item-status" v-if="currentPark==1">
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view>
<view class="flex-row align-center">
<text class="iconfont icon-tingchechang1"
style="font-size: 28rpx;"></text><text>小车10</text>
style="font-size: 28rpx;"></text><text>小车{{info.small_park_total}}</text>
</view>
<text style="font-size: 24rpx;color: #828282;">充电桩空闲0</text>
<text
style="font-size: 24rpx;color: #828282;">充电桩空闲{{info.charge_total}}</text>
</view>
</view>
</view>
@ -58,7 +60,7 @@
</view>
<view class="footer">
<u-button type="primary" @click="tobook"></u-button>
<u-button type="primary" :disabled="btnDisabled" @click="tobook"></u-button>
</view>
</map>
</view>
@ -70,27 +72,100 @@
export default {
data() {
return {
id: 0, // 使 marker id
title: 'map',
latitude: 31.299893,
longitude: 120.626022,
covers: [{
latitude: 31.302377,
longitude: 120.625826,
width: 70,
height: 70,
iconPath: '/static/img/location.png'
}],
currentPark: 1
info: {},
covers: [],
currentPark: 1,
btnDisabled: false
}
},
onLoad() {
var that = this;
this.loadInfo();
this.loadOrder(function(res) {
that.loadactivityOrder(function(r) {
if (res.length + r.length == 0) {
that.util.toast("请先预约活动或参观")
that.btnDisabled = true;
} else {
that.btnDisabled = false;
}
})
})
},
methods: {
loadOrder(cb) {
var that = this;
this.util.request({
api: '/api/mobile/user/my-visit-order',
data: {
status: 1
},
utilSuccess: function(res) {
cb(res)
},
utilFail: function(res) {
this.util.toast(res)
}
})
},
loadactivityOrder(cb) {
var that = this;
this.util.request({
api: '/api/mobile/user/my-activity-order',
data: {
status: 1
},
utilSuccess: function(res) {
cb(res);
},
utilFail: function(res) {
this.util.toast(res)
}
})
},
handleSelectPark(type) {
this.currentPark = type;
},
openlocation() {
uni.openLocation({
latitude: this.info.latitude,
longitude: this.info.longitude,
name: this.info.name,
address: this.info.address
});
},
loadInfo(cb) {
var that = this;
this.util.request({
api: '/api/mobile/carpark/index',
utilSuccess: function(r) {
var res = r[0];
res.latitude = parseFloat(res.latitude);
res.longitude = parseFloat(res.longitude);
that.info = res;
var mod = {
latitude: res.latitude,
longitude: res.longitude,
width: 70,
height: 70,
iconPath: '/static/img/location.png'
}
that.covers.push(mod);
cb(res);
},
utilFail: function(res) {
}
})
},
handleBook() {
uni.$u.throttle(this.tobook, 500)
},
tobook() {
uni.navigateTo({
url: "book"
url: "book?id=" + this.info.id + "&currentPark=" + this.currentPark
})
}
}

@ -74,7 +74,7 @@
<view class="box-card-content">
<u-form-item label="参观人数" labelWidth="120" prop="total" ref="total">
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
bgColor="#FCF6E3" :min="(type=='user'?1:8)" :max="(type=='user'?5:50)" class="plus">
bgColor="#FCF6E3" :min="minCount" :max="maxCount" class="plus">
</u-number-box>
</u-form-item>
<view class="box-tips">
@ -277,6 +277,8 @@
listCalendar: [],
type: "user",
user: {},
minCount: 1,
maxCount: 1,
cardList: [{
idx: 1,
name: '身份证'
@ -308,6 +310,9 @@
uni.setNavigationBarTitle({
title: (options.from == 'user' ? "个人预约" : "团队预约")
})
this.form.total = this.minCount = (type == 'user' ? 1 : 8);
this.maxCount = (type == 'user' ? 5 : 50);
var that = this;
that.util.getUserInfo(function(r) {
that.user = r;

@ -111,6 +111,14 @@ const alert = msg => {
});
}; // 订单状态
const toast = msg => {
uni.showToast({
icon: "none",
title: msg,
duration: 2000
})
}; // 订单状态
const orderStatusDic = {
'0': '待确认',
@ -531,5 +539,6 @@ module.exports = {
orderStatusDic: orderStatusDic,
auditStatusDic: auditStatusDic,
getUserProfile: getUserProfile,
getUserInfo: getUserInfo
getUserInfo: getUserInfo,
toast: toast
};

Loading…
Cancel
Save