Commit 54334d3c authored by 罗超's avatar 罗超

1

parent bf12641e
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wxbb033190e0ffa5db", "appid" : "wxcf0727a7c78b501e",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"minified" : false "minified" : false
......
...@@ -770,7 +770,13 @@ ...@@ -770,7 +770,13 @@
"path": "imgList" "path": "imgList"
}, },
{ {
"path": "policyDetail" "path": "policyDetail"//政策详情
},
{
"path": "fillOrder"//填写订单
},
{
"path": "addGuest"//新增旅客
} }
] ]
} }
......
<template>
<view class="add-guest">
<view class="title">
乘客姓名
</view>
<view class="item">
<input type="text" placeholder="请输入真实姓名" v-model="msg.Name" />
</view>
<view class="title">
乘客电话
</view>
<view class="item">
<input type="number" placeholder="请输入电话" v-model="msg.Mobile" />
</view>
<view class="title">
乘客身份证号码
</view>
<view class="item">
<input type="number" :maxlength="18" placeholder-class='placeholderStyle' placeholder="请输入18位身份证号码" v-model="msg.IdCard" />
</view>
<view class="btn" @click="updateInfo">
确认
</view>
</view>
</template>
<script>
export default{
data(){
return{
msg:{
ID:0,
Name:"",
Mobile:"",
IdCard:"",
}
}
},
onLoad(options) {
let Id=options.id
if(Id){
uni.setNavigationBarTitle({
title: "修改出行人",
});
this.msg.ID=Id;
this.getInfo();
}else{
uni.setNavigationBarTitle({
title: "新增出行人",
});
}
},
methods:{
getInfo(){
this.request2({
url: '/api/AppletDining//GetDMCGuest',
data: {ID:this.msg.ID}
},
res => {
if (res.resultCode == 1) {
this.msg.Name=res.data.Name;
this.msg.Mobile=res.data.Mobile;
this.msg.IdCard=res.data.IdCard;
}
}
);
},
updateInfo(){
if(!this.msg.Name){
uni.showToast({
title: '请输入真实姓名',
icon:"none",
duration: 2000
});
return
}
if(!this.msg.Mobile){
uni.showToast({
title: '请输入电话号码',
icon:"none",
duration: 2000
});
return
}
if(!this.msg.IdCard){
uni.showToast({
title: '请输入18位身份证号码',
icon:"none",
duration: 2000
});
return
}
this.request2({
url: '/api/AppletDining//SetDMCGuest',
data: this.msg
},
res => {
if (res.resultCode == 1) {
uni.showToast({
title: '操作成功',
icon:"none",
duration: 2000
});
uni.navigateBack({
delta:2
})
// uni.navigateTo({
// url:"/pages/ticketCoupons/fillOrder"
// })
}else{
uni.showToast({
title: '操作失败',
icon:"none",
duration: 2000
});
}
}
);
},
}
}
</script>
<style lang="scss" scoped>
.add-guest{
position: relative;
height: 100vh;
padding: 45rpx;
.title{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #1F1F1F;
margin-bottom: 40rpx;
}
.item{
height: 95rpx;
border-bottom: 1rpx solid #E7E7E7;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
line-height: 93rpx;
margin-bottom: 60rpx;
}
.placeholderStyle{
color: #BABABA;
}
.btn{
width: 650rpx;
height: 80rpx;
background-color: #111111;
border-radius: 20rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 100rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FFFFFF;
text-align: center;
line-height: 78rpx;
}
}
</style>
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
<text class="price-pre"></text> <text class="price-pre"></text>
{{TicketData.HPriceB}} {{TicketData.HPriceB}}
</view> </view>
<view class="btn"> <view class="btn" @click="success">
立即预订 立即预订
</view> </view>
</view> </view>
...@@ -191,7 +191,9 @@ ...@@ -191,7 +191,9 @@
delta: 1, delta: 1,
}); });
}, },
success(){
this.$emit("success")
}
} }
......
<template>
<view class="GuestList">
<view class="title">
选择出行人
</view>
<view class="guest-box">
<checkbox-group @change="changeCheck">
<view v-for="(item,index) in guestList" :key="index" class="guestList-item">
<view class="guest-info">
<view class="name">
{{item.Name}}
</view>
<view class="idcard">
{{item.showIdCard}}
</view>
</view>
<view class="right">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/edit-icon.png"
mode="aspectFit" class="edit-img" @click="goUrl(item.Id)"></image>
<label class="check-box" @click="changeCheckItem(item,index)">
<checkbox :checked="item.check" :value="item.Id" style="display: none;" />
<view class="nocheck" v-if="!item.check" >
</view>
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/checked.png"
mode="aspectFit" class="check-icon" v-if="item.check" ></image>
</label>
</view>
</view>
</checkbox-group>
</view>
<view class="btn-box">
<view class="add" @click="goUrl">
新增乘客
</view>
<view class="confirm" @click="confirm">
确认
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
guestList:[],
checkGuestList:[]
}
},
mounted() {
this.getGuestList()
},
methods: {
getGuestList(){
this.request2({
url: '/api/AppletDining/GetGuestList',
data: {}
},
res => {
if (res.resultCode == 1) {
res.data.forEach(i=>{
i.check=false
i.showIdCard=i.IdCard.slice(0,6)+"******"+i.IdCard.slice(-4)
})
this.guestList=res.data
}
}
);
},
goUrl(id) {
if (id) {
uni.navigateTo({
url: "/pages/ticketCoupons/addGuest?id=" + id
})
} else {
uni.navigateTo({
url: "/pages/ticketCoupons/addGuest"
})
}
},
changeCheck(val){
this.checkGuestList=[]
this.guestList.map(i=>{
val.detail.value.map(x=>{
if(i.Id==x){
this.checkGuestList.push(i)
}
})
})
},
confirm(){
this.$emit("confirm",this.checkGuestList)
},
changeCheckItem(item,index){
item.check=!item.check
}
}
}
</script>
<style lang="scss" scoped>
.GuestList {
height: 55vh;
padding: 45rpx;
.title {
font-size: 34rpx;
font-family: PingFang SC;
font-weight: bold;
color: #1B1D1E;
text-align: center;
}
.guest-box {
height: 35vh;
margin: 20rpx 0;
// background-color: #000000;
overflow-y: scroll;
overflow-x: hidden;
.guestList-item {
height: 145rpx;
display: flex;
align-items: center;
justify-content: space-between;
.guest-info {
width: 250rpx;
.name {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #DFBE6E;
}
.idcard {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #6E6E6E;
}
}
.right {
width: 270rpx;
height: 145rpx;
display: flex;
align-items: center;
justify-content: space-between;
.edit-img {
width: 32rpx;
height: 32rpx;
}
.check-box{
display: flex;
}
.nocheck{
width: 40rpx;
height: 40rpx;
border: 2rpx solid #D6D6D6;
border-radius: 50%;
}
.check-icon {
width: 40rpx;
height: 40rpx;
}
}
}
}
.btn-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10rpx;
.add {
width: 300rpx;
height: 80rpx;
background-color: #FFFFFF;
border: 1rpx solid #111111;
border-radius: 20rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
text-align: center;
line-height: 78rpx;
}
.confirm {
width: 300rpx;
height: 80rpx;
background: #111111;
border-radius: 20rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FFFFFF;
text-align: center;
line-height: 78rpx;
}
}
}
</style>
...@@ -9,8 +9,11 @@ ...@@ -9,8 +9,11 @@
<text class="reset" @tap="reset">重置</text> <text class="reset" @tap="reset">重置</text>
</view> </view>
<scroll-view class="calenHead" scroll-x v-if="mode=='1'"> <scroll-view class="calenHead" scroll-x v-if="mode=='1'">
<view class="headItem" v-for="(date,index) in monthList" v-bind:key="index" :class="[current==index?'active':'']" @tap="headItemTap(index)"> <view class="headItem" v-for="(date,index) in monthList" v-bind:key="index" :class="[current==index?'active':'']" @tap="headItemTap(index,date.getMonth()+1)">
<text>{{date.getMonth()+1}}</text> <text>{{date.getMonth()+1}}</text>
<text class="calen-text-orange" v-if="monthDatePrice[index].length">&yen;{{monthDatePrice[index][0].price}}</text>
<text class="calen-text-small" v-if="monthDatePrice[index].length"></text>
<text class="calen-text-orange" v-if="!monthDatePrice[index].length">暂无报价</text>
</view> </view>
</scroll-view> </scroll-view>
<view class="weekBar"> <view class="weekBar">
...@@ -19,19 +22,20 @@ ...@@ -19,19 +22,20 @@
</view> </view>
</view> </view>
<view class="dayBox"> <view class="dayBox">
<view class="day" v-for="(item,index) in space" :key="index"></view> <view class="day" v-for="(item,index) in space" v-bind:key="index+999"></view>
<view class="day" :class="[getDateStr(item.date)==getDateStr(dayActive.date)?'active':'']" v-for="(item,index) in dayList" v-bind:key="index" @tap="selectDate(item)"> <view class="day" :class="[getDateStr(item.date)==getDateStr(dayActive.date)?'active':'']" v-for="(item,index) in dayList" v-bind:key="index" @tap="selectDate(item)">
<view :class="[isToday(item.date)?'today':'']">{{isToday(item.date) ? "今天" : item.date.getDate()}}</view> <view :class="[isToday(item.date)?'today':'']">{{isToday(item.date) ? "今天" : item.date.getDate()}}</view>
<view class="calen-text-orange">{{item.price?item.price:''}}</view> <view class="calen-text-orange">{{item.price?'&yen;'+item.price:''}}</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
// import uniIcons from "../uni-icons/uni-icons.vue" import uniIcons from "./uni-icons/uni-icons.vue"
/* import {uniIcons} from "../../components/uni-icons" */
export default{ export default{
// components:{uniIcons}, components:{uniIcons},
name:"Zcalendar", name:"Zcalendar",
props:{ props:{
themeColor:{ //主题色 并没有用到 留给以后用吧 themeColor:{ //主题色 并没有用到 留给以后用吧
...@@ -53,14 +57,6 @@ ...@@ -53,14 +57,6 @@
mode:{ mode:{
type:String, type:String,
default:"1" //1:固定月份列表 2:传统日历模式(自由选择日期) default:"1" //1:固定月份列表 2:传统日历模式(自由选择日期)
},
curryear:{
type:String,
default:"" //初始年份
},
currmonth:{
type:String,
default:"" //初始月份
} }
}, },
data(){ data(){
...@@ -77,10 +73,8 @@ ...@@ -77,10 +73,8 @@
mounted() { mounted() {
this.today = new Date(); this.today = new Date();
this.nowMonth = { this.nowMonth = {
// year:this.today.getFullYear(), year:this.today.getFullYear(),
// month:(this.today.getMonth()+1<10)?"0"+(this.today.getMonth()+1) : this.today.getMonth()+1, month:(this.today.getMonth()+1<10)?"0"+(this.today.getMonth()+1) : this.today.getMonth()+1
year:this.curryear!=''?this.curryear:this.today.getFullYear(),
month:this.currmonth!=''?this.currmonth:((this.today.getMonth()+1<10)?"0"+(this.today.getMonth()+1) : this.today.getMonth()+1)
} }
this.setMonthList() this.setMonthList()
}, },
...@@ -137,9 +131,10 @@ ...@@ -137,9 +131,10 @@
} }
}, },
methods:{ methods:{
headItemTap(index){ headItemTap(index,month){
console.log(index)
this.current = index this.current = index
console.log(month)
this.$emit('changeMonth',momth)
}, },
getDefaultData(d){ //设置初始值 getDefaultData(d){ //设置初始值
let list = this.datePrice.filter(item=>item.date==d); let list = this.datePrice.filter(item=>item.date==d);
...@@ -221,7 +216,7 @@ ...@@ -221,7 +216,7 @@
price:data.price price:data.price
} }
let map = this.getSelectData() let map = this.getSelectData()
this.$emit('changeDate',map.date) this.$emit('changeDate',map)
} }
}, },
getSelectData(){ //获取最终结果 getSelectData(){ //获取最终结果
...@@ -242,7 +237,8 @@ ...@@ -242,7 +237,8 @@
this.nowMonth.year = this.today.getFullYear() this.nowMonth.year = this.today.getFullYear()
this.nowMonth.month = this.today.getMonth()+1 this.nowMonth.month = this.today.getMonth()+1
this.dayActive = {} this.dayActive = {}
this.$emit('changeDate',{}) // this.$emit('changeDate',{})
this.$emit('changeMonth',this.nowMonth)
} }
} }
} }
......
<template> <template>
<view class="subscribeTicket"> <view class="subscribeTicket">
<view class="title">
选择日期和人数
</view>
<view> <view>
<z-calendar ref="calendar" :datePrice="datePrice" :curryear='curryear' :currmonth='currmonth' <z-calendar ref="calendar" :datePrice="datePrice" :curryear='curryear' :currmonth='currmonth'
howManyMonth="6" mode="2" @changeDate="changeDate" @changeMonth="changeMonth" howManyMonth="6" mode="2" @changeDate="changeDate" @changeMonth="changeMonth"
:defaultSelect="date"></z-calendar> :defaultSelect="defaultSelect"></z-calendar>
</view>
<view class="chooseTicketAndNum">
<view class="chooseTicket">
<view class="TicketName">
{{TicketName}}
</view>
<view class="">
<u-number-box v-model="peopleNum" @change="valChange"></u-number-box>
</view>
</view>
<view class="chooseBtn-box">
<view class="btn-TicketName-box">
{{defaultSelect}}
<text class="btn-TicketName">
{{TicketName}}
</text>
</view>
<view class="btn-box">
<view class="icon-box">
<view class="kefu-iocn">
<u-icon name="service-o" color="#111111" size="24rpx"></u-icon>
</view>
<view class="">
客服
</view>
</view>
<view class="subscribe-btn" @click="nextStep">
立即预订
</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -15,27 +52,35 @@ ...@@ -15,27 +52,35 @@
zCalendar zCalendar
}, },
props: { props: {
date: { dateStr: {
type: String, type: String,
default: "" default: ""
}, },
TicketID: { TicketID: {
type: Number, type: Number,
default: 0 default: 0
},
TitekCounponId:{
type: Number,
default: 0
},
TicketName:{
type: String,
default: ""
} }
}, },
data() { data() {
return { return {
curryear: 0, curryear: 0,
currmonth: 0, currmonth: 0,
datePrice: [ defaultSelect:"",
datePrice: [],
], price:"",
peopleNum:1,
} }
}, },
watch: { watch: {
date(val, oldVal) { dateStr(val, oldVal) {
console.log(val, oldVal)
let newMonth = val.split('-')[1] let newMonth = val.split('-')[1]
let oldMonth = oldVal.split('-')[1] let oldMonth = oldVal.split('-')[1]
if(newMonth!=oldMonth&&oldMonth!=undefined){ if(newMonth!=oldMonth&&oldMonth!=undefined){
...@@ -43,6 +88,11 @@ ...@@ -43,6 +88,11 @@
this.getGoodsDateList() this.getGoodsDateList()
} }
},
TicketID(val){
if(val){
this.getGoodsDateList(this.dateStr)
}
} }
}, },
mounted() { mounted() {
...@@ -53,16 +103,20 @@ ...@@ -53,16 +103,20 @@
} }
this.curryear= year this.curryear= year
this.currmonth= month this.currmonth= month
console.log('sub') this.defaultSelect = this.dateStr;
this.getGoodsDateList()
}, },
methods: { methods: {
getGoodsDateList() { getGoodsDateList(date) {
let d = new Date();
let today = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`
if(!data){
data=today
}
this.request2({ this.request2({
url: '/api/AppletDining/GetMonthTicketList', url: '/api/AppletDining/GetMonthTicketList',
data: { data: {
TicketID: this.TicketID, TicketID: this.TicketID,
BuyDate: this.date BuyDate: date
} }
}, },
...@@ -72,22 +126,42 @@ ...@@ -72,22 +126,42 @@
data.forEach(x => { data.forEach(x => {
let obj = {} let obj = {}
obj.date = x.Year+'-'+x.Month+'-'+x.Day; obj.date = x.Year+'-'+x.Month+'-'+x.Day;
if(x.IsHavePrice===1){ // if(x.IsHavePrice==1){
obj.price = x.HPriceB; obj.price = x.HPriceB;
}else{ // }else{
obj.price = ""; // obj.price = "";
} // }
datePrice.push(obj) datePrice.push(obj)
}) })
this.datePrice = datePrice this.datePrice = datePrice
console.log(this.datePrice)
} }
); );
}, },
changeDate(data){ //选择日期事件 可以将data绑定到此页面以用来提交等操作
this.defaultSelect = data.date;
this.price=data.price
this.$forceUpdate()
},
changeMonth(nowMonth){ changeMonth(nowMonth){
let Month = nowMonth.year+'-'+nowMonth.month;
let Month = nowMonth.year+'-'+nowMonth.month+'-01';
this.getGoodsDateList(Month) this.getGoodsDateList(Month)
}, },
nextStep(){
let data={
TicketId:this.TicketID,
TitekCounponId:this.TitekCounponId,
Unit_Price:this.price,
Date:this.defaultSelect,
TicketName:this.TicketName,
PeopleNumber:this.peopleNum,
}
uni.navigateTo({
url: "/pages/ticketCoupons/fillOrder?data="+encodeURIComponent(JSON.stringify(data)),
});
}
} }
} }
...@@ -95,7 +169,90 @@ ...@@ -95,7 +169,90 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.subscribeTicket { .subscribeTicket {
height: 70vh; height: 80vh;
padding: 45rpx 45rpx 90rpx; padding-top: 45rpx;
overflow-y: scroll;
overflow-x: hidden;
.title{
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
margin-bottom: 10rpx;
}
.chooseTicketAndNum{
height: 335rpx;
padding: 30rpx;
.chooseTicket{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 100rpx;
.TicketName{
width: auto;
height: 60rpx;
padding: 0rpx 30rpx;
background-color: #111111;
text-align: center;
line-height: 58rpx;
border-radius: 10rpx;
font-size: 26rpx;
font-family: PingFang SC;
color: #FFFFFF;
}
}
.chooseBtn-box{
// width: 670px;
height: 100rpx;
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
border-radius: 16rpx;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
.btn-TicketName-box{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
.btn-TicketName{
margin-left: 10rpx;
}
}
.btn-box{
display: flex;
justify-content: space-between;
align-items: center;
.icon-box{
width: 44rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
.kefu-iocn{
width: 44rpx;
display: flex;
justify-content: center;
}
}
.subscribe-btn{
width: 190rpx;
height: 80rpx;
margin-left: 20rpx;
background-color: #111111;
border-radius: 16rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FFFFFF;
text-align: center;
line-height: 78rpx;
}
}
}
}
} }
</style> </style>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<view class="line"></view> <view class="line"></view>
<view class="info4"> <view class="info4">
<view class="mark-icon"> <view class="mark-icon">
<u-icon name="location" color="#111111" size="24rpx" class="icon"></u-icon>
</view> </view>
<view class="address"> <view class="address">
{{details.Address}} {{details.Address}}
...@@ -92,8 +92,6 @@ ...@@ -92,8 +92,6 @@
@click="changeCheckTicketNavIndex(3)"> @click="changeCheckTicketNavIndex(3)">
其他日期 其他日期
</view> </view>
<calendar ref="calendar" :insert="false" :selected="calendar" @confirm="confirm"></calendar> <calendar ref="calendar" :insert="false" :selected="calendar" @confirm="confirm"></calendar>
</view> </view>
...@@ -129,7 +127,7 @@ ...@@ -129,7 +127,7 @@
<text v-if="_item.IsWorryFreeRefund!=0">有条件退</text> <text v-if="_item.IsWorryFreeRefund!=0">有条件退</text>
</view> </view>
<!-- 预订按钮 --> <!-- 预订按钮 -->
<view class="pre-buy" @click="subscribeTicket"> <view class="pre-buy" @click="chooseSubscribeTicket(_item)">
预订 预订
</view> </view>
<!-- 已售 --> <!-- 已售 -->
...@@ -171,13 +169,13 @@ ...@@ -171,13 +169,13 @@
<view> <view>
<u-popup v-model="showPop" mode="bottom" border-radius="40"> <u-popup v-model="showPop" mode="bottom" border-radius="40">
<buyNotice :TicketData="curTicketData" :coverImg="details.AllPicList[0].TagPicList[0].Path" <buyNotice :TicketData="curTicketData" :coverImg="details.AllPicList[0].TagPicList[0].Path"
:score="details.ScoreNum"></buyNotice> :score="details.ScoreNum" @success="successBuyNotice"></buyNotice>
</u-popup> </u-popup>
</view> </view>
<!-- 填写订单弹出层 --> <!-- 填写订单弹出层 -->
<view> <view>
<u-popup v-model="showSubscribeTicketPop" mode="bottom" border-radius="40"> <u-popup v-model="showSubscribeTicketPop" mode="bottom" border-radius="40" :closeable="true">
<subscribeTicket :date="Date" :TicketID="TicketID"></subscribeTicket> <subscribeTicket :dateStr="Date" :TicketID="TicketID" :TitekCounponId="ID" :TicketName="TicketName"></subscribeTicket>
</u-popup> </u-popup>
</view> </view>
</view> </view>
...@@ -187,12 +185,12 @@ ...@@ -187,12 +185,12 @@
</template> </template>
<script> <script>
// import calendar from "./components/uni-calendar/uni-calendar.vue" import calendar from "./components/uni-calendar/uni-calendar.vue"
import buyNotice from "./components/buyNotice.vue" import buyNotice from "./components/buyNotice.vue"
import subscribeTicket from "./components/subscribeTicket.vue" import subscribeTicket from "./components/subscribeTicket.vue"
export default { export default {
components: { components: {
// calendar, calendar,
buyNotice, buyNotice,
subscribeTicket, subscribeTicket,
}, },
...@@ -226,6 +224,7 @@ ...@@ -226,6 +224,7 @@
curTicketData: {}, curTicketData: {},
showSubscribeTicketPop: false,//订单弹出层 showSubscribeTicketPop: false,//订单弹出层
TicketID:0,//门票id TicketID:0,//门票id
TicketName:"",
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -277,9 +276,11 @@ ...@@ -277,9 +276,11 @@
url: url + "?id=" + this.ID, url: url + "?id=" + this.ID,
}) })
}, },
subscribeTicket(item){ chooseSubscribeTicket(item){
this.showSubscribeTicketPop=true this.showSubscribeTicketPop=true
this.TicketID=item.Id this.TicketID=item.Id
this.TicketName=item.TicketSubName+item.TicketName
console.log(item)
}, },
//获取详情 //获取详情
getDetail() { getDetail() {
...@@ -295,16 +296,6 @@ ...@@ -295,16 +296,6 @@
res.data.ScenicSpotTag = res.data.ScenicSpotTag.split(',') res.data.ScenicSpotTag = res.data.ScenicSpotTag.split(',')
res.data.GeographicTag = res.data.GeographicTag.split(',') res.data.GeographicTag = res.data.GeographicTag.split(',')
this.details = res.data; this.details = res.data;
// if (res.data.VideoUrl == '') {
// this.active = 1
// };
// this.details.imgs = []
// this.details.BannerList.forEach(x=>{
// let obj= {
// name:x
// }
// this.details.imgs.push(obj)
// })
} }
} }
); );
...@@ -312,20 +303,7 @@ ...@@ -312,20 +303,7 @@
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
}, },
// previewImage(i) {
// console.log(i)
// uni.previewImage({
// urls: this.details.BannerList,
// current: i,
// longPressActions: {
// itemList: ["发送给朋友", "保存图片", "收藏"],
// success: function(data) {},
// fail: function(err) {
// console.log(err.errMsg);
// },
// },
// });
// },
scroll(e) { scroll(e) {
this.boxOption = Math.floor((e.detail.scrollTop - 50) / 1.5); this.boxOption = Math.floor((e.detail.scrollTop - 50) / 1.5);
this.titleStyle.opacity = ((e.detail.scrollTop - 100) < 0 ? 0 : Math.floor(e.detail.scrollTop - 100)) + this.titleStyle.opacity = ((e.detail.scrollTop - 100) < 0 ? 0 : Math.floor(e.detail.scrollTop - 100)) +
...@@ -392,11 +370,14 @@ ...@@ -392,11 +370,14 @@
this.getDetail() this.getDetail()
this.$forceUpdate() this.$forceUpdate()
} else if (i === 3) { } else if (i === 3) {
this.$refs.calendar.open(); this.$refs.calendar.open()
} }
}, },
successBuyNotice(){
this.showPop=false
this.showSubscribeTicketPop=true
}
} }
} }
......
<template>
<view class="">
<view class="ticket-info">
<view class="ticket-name">{{ticketdData.TicketName}}</view>
<view class="ticket-date">门票日期:{{ticketdData.Date}}</view>
<view class="ticket-peopleNum">人数:{{ticketdData.PeopleNumber}}</view>
<view class="line"></view>
<view class="tip">
<image class="tip-icon" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/tip-icon.png" mode="aspectFit"></image>
即时确认:本产品付款后可快速确认,放心期待您的旅行
</view>
</view>
<view class="people-info">
<!-- <view class="title">出行人
<text class="title-tip">请务必保证填写项与出游所持证件一致</text>
</view>
<view class="add-guest">
<view v-for="(item,index) in GuestList" :key="index">
<view class="guest-item">
{{item.Name}}
</view>
</view>
<view class="guest-add" @click="add">
添加
</view>
</view> -->
<view class="title">联系人</view>
<view class="item-box">
<view class="item-title">
姓名
</view>
<input class="input" type="text" placeholder="请输入真实姓名" v-model="Consignee" />
</view>
<view class="item-box">
<view class="item-title">
手机号
</view>
<input class="input" type="text" placeholder="请输入手机号" v-model="ConsigneeMobile" />
</view>
<u-popup v-model="showAddGuset" mode="bottom" border-radius="40" :closeable="true">
<guest @confirm='changeGuest'></guest>
</u-popup>
<view class="btn-box">
<view class="left">
<view class="total-price">
<text class="price-pre"></text>{{Final_Price}}
</view>
<view class="total-peoplenum">
共计{{ticketdData.PeopleNumber}}
</view>
</view>
<view class="right">
<view class="mx">
明细
</view>
<view class="btn" @click="submitOrder">
去支付
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import guest from "./components/guestList.vue"
export default {
components:{
guest
},
data() {
return {
ticketdData:{},
GuestList:[],
showAddGuset:false,
Final_Price:0,//总价
Consignee:"",
ConsigneeMobile:"",
BuyerMessage:"",
}
},
onLoad(options) {
let obj=JSON.parse(decodeURIComponent(options.data))
this.ticketdData=obj
},
created() {
uni.setNavigationBarTitle({
title: "订单填写",
});
},
methods: {
add(){
this.showAddGuset=true
},
changeGuest(val){
this.showAddGuset=false
this.GuestList=val
this.ticketdData.PeopleNumber=this.GuestList.length
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
},
submitOrder(){
this.request2({
url: '/api/AppletDining/SetAppletTicketOrderInfo',
data: {
...this.ticketdData,
Final_Price:this.Final_Price,
Consignee:this.Consignee,
ConsigneeMobile:this.ConsigneeMobile,
GuestList:this.GuestList
}
},
res => {
console.log(res)
}
);
}
},
}
</script>
<style lang="scss" scoped>
.ticket-info{
width: 750rpx;
// height: 300rpx;
padding: 60rpx 45rpx 0;
background-color: #FFFFFF;
box-shadow: 0rpx 2rpx 15rpx 0rpx rgba(76, 76, 76, 0.13);
border-radius: 0rpx 0rpx 60rpx 60rpx;
.ticket-name{
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
margin-bottom: 20rpx;
}
.ticket-date{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-bottom: 20rpx;
}
.ticket-peopleNum{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-bottom: 30rpx;
}
.line{
// width: 657px;
height: 1rpx;
background-color: #E7E7E7;
}
.tip{
display: flex;
align-items: center;
height: 85rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #DFBE6E;
.tip-icon{
width: 24rpx;
margin-right: 10rpx;
}
}
}
.people-info{
padding: 60rpx 45rpx 0;
.title{
// height: 32rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: bold;
color: #1F1F1F;
.title-tip{
font-size:24rpx;
margin-left: 10rpx;
}
}
.add-guest{
padding: 40rpx 0rpx;
// height: 150rpx;
border-bottom: 1rpx solid #E7E7E7;
display: flex;
flex-wrap: wrap;
margin-bottom: 50rpx;
.guest-item{
width: 145rpx;
height: 70rpx;
background-color: #111111;
// border: 1rpx solid #111111;
border-radius: 20rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
text-align: center;
line-height: 68rpx;
color: #ffffff;
margin-right: 25rpx;
margin-bottom: 25rpx;
}
.guest-add{
width: 145rpx;
height: 70rpx;
background-color: #FFFFFF;
border: 1rpx solid #111111;
border-radius: 20rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
text-align: center;
line-height: 68rpx;
color: #111111;
}
}
.item-box{
height: 105rpx;
position: relative;
border-bottom: 1rpx solid #E7E7E7;
display: flex;
align-items: center;
.item-title{
width: 150rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
}
.input{
height: 100%;
// padding-left: 270rpx;
}
}
.btn-box{
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 100rpx;
width: 670rpx;
height: 100rpx;
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
border-radius: 16rpx;
padding: 0 10rpx 0 35rpx;
display: flex;
justify-content: space-between;
align-items: center;
.left{
display: flex;
// align-items: flex-end;
.total-price{
// height: 80rpx;
font-size: 40rpx;
font-family: PingFang SC;
font-weight: 500;
color: #D91818;
margin-right: 20rpx;
line-height: 40rpx;
.price-pre{
font-size: 22rpx;
}
}
.total-peoplenum{
// height: 80rpx;
line-height: 50rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #6E6E6E;
}
}
.right{
display: flex;
.mx{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #6E6E6E;
line-height: 78rpx;
}
.btn{
width: 193rpx;
height: 80rpx;
background-color: #111111;
border-radius: 16rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FFFFFF;
text-align: center;
line-height: 78rpx;
margin-left: 35rpx;
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment