Commit 3c2a558a authored by qipeng's avatar qipeng

Merge branch 'develop' into chargeback

parents bf4400a5 7a7e3a5b
......@@ -80,16 +80,7 @@ export default {
<style lang="scss">
@import "uview-ui/index.scss";
/*
1.页面背景颜色#f7f7f7
2.分隔线颜色#DBDBDB
3.正常字体颜色#333333
4.灰色字体颜色#666666或者#999999
5.主题颜色#3688FF
6.正常字体大小28rpx,偏小一点的24rpx
8.页面最外层与里面的第一层为padding:0 12px;
9.css单位为rpx
*/
page {
font-size: 28rpx;
color: #333333;
......@@ -110,14 +101,42 @@ export default {
textarea {
box-sizing: border-box;
}
.btn {
background: linear-gradient(132deg, #ED400C 0%, #FB862C 100%);
//小按钮
.btn{
background:#3688FF;
display: inline-block;
color: #FFFFFF;
font-size: 28rpx;
border-radius: 8rpx;
width: 135rpx;
height: 70rpx;
line-height: 70rpx;
font-size:28rpx;
border-radius:16rpx;
text-align: center;
}
//中等按钮
.middle-btn{
background:linear-gradient(132deg, #ED400C 0%, #FB862C 100%);
display: inline-block;
color: #FFFFFF;
width: 180rpx;
height: 80rpx;
line-height: 80rpx;
font-size:32rpx;
border-radius:20rpx;
text-align: center;
}
//大按钮
.big-btn{
background:linear-gradient(132deg, #ED400C 0%, #FB862C 100%);
display: inline-block;
color: #FFFFFF;
width: 240rpx;
height: 100rpx;
line-height:100rpx;
font-size:36rpx;
border-radius:28rpx;
text-align: center;
padding: 10rpx 20rpx;
font-weight: bold;
}
/*单行溢出*/
......
......@@ -96,11 +96,14 @@ export default{
return d*(1 + fl*(h1*sf*(1-sg) - h2*(1-sf)*sg))
},
phoneReg:function(){//手机正则
return /^(13[0-9]|14[0-9]|15[0-9]|18[0-9]|17[0-9]|19[0-9]|16[0-9])\d{8}$/
return /^(13[0-9]|14[0-9]|15[0-9]|18[0-9]|17[0-9]|19[0-9]|16[0-9]|12[0-9])\d{8}$/
},
idReg:function(){//身份证正则
return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/
},
nameReg:function(){//中文名字正则
return /^[\u4E00-\u9FA5]{2,40}$/
},
getUrlKey:function(name,url){//通过连接地址获取参数值
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(url)) || [, ''])[1].replace(/\+/g, '%20') || ''
},
......
<template>
<u-popup :show="showPop" :round="20" @close="showPop=false">
<u-popup :show="showPop" :round="20" @close="showPop=false" closeable>
<view class="son-wrap">
<view class="head">
<view class="head1">
<view style="flex: 1;text-align: center;">
购买须知
</view>
<u-icon name="close" @click="showPop=false"></u-icon>
</view>
<view class="head2">
{{buyKnowData.name}}
......@@ -20,7 +17,7 @@
<view style="flex: 1;overflow-y: scroll;">
<view class="middle">
<view class="middle-list" v-for="(item,a) of buyKnowData.productTitleResVos" :key="a">
<view class="middle-list" v-for="(item,a) of buyKnowData.productTitleData" :key="a">
<view class="middle-title">
{{item.title}}
</view>
......@@ -45,7 +42,7 @@
¥ <text>{{buyKnowData.sellingPrice}}</text>
</text>
<view class="bottom-right">
<text class="btn" @click="showPop=false">
<text class="middle-btn" @click="showPop=false">
去预订
</text>
</view>
......@@ -71,8 +68,7 @@ export default {
<style scoped="scoped">
.son-wrap{
position: relative;
height:85vh;
height:80vh;
display: flex;
flex-direction:column;
}
......@@ -80,7 +76,7 @@ export default {
padding: 0 24rpx;
}
.head1{
display: flex;
text-align: center;
font-size: 32rpx;
font-weight: bold;
padding: 30rpx 0;
......@@ -113,8 +109,9 @@ export default {
}
.middle-content {
display: flex;
margin-top: 30rpx;
margin-top: 20rpx;
position: relative;
line-height: 52rpx;
}
.middle-content>text {
color: #666666;
......@@ -160,9 +157,4 @@ export default {
display: flex;
align-items: center;
}
.btn{
padding: 16rpx 48rpx;
border-radius: 20rpx;
font-size: 32rpx;
}
</style>
<template>
<!-- 客服 -->
<u-popup :show="showPop" :round="20" @close="showPop = false">
<u-popup :show="showPop" :round="20" @close="showPop = false" closeable>
<view class="son-wrap">
<view class="title">
<view style="flex: 1; text-align: center"> 客服电话 </view>
<u-icon name="close" @click="showPop = false"></u-icon>
客服电话
</view>
<view class="middle">
<view class="list" v-for="(item, index) in scenicList" :key="index" @click="makePhone(item.phone)">
......@@ -45,7 +44,7 @@ export default {
flex-direction: column;
}
.title {
display: flex;
text-align: center;
font-size: 32rpx;
font-weight: bold;
padding: 30rpx;
......
<template>
<!-- 商家详情弹窗 -->
<u-popup :show="showPop" :round="20" @close="showPop=false">
<u-popup :show="showPop" :round="20" @close="showPop=false" closeable>
<view class="son-wrap">
<view class="head">
<view class="head-name">
{{detailData.name}}
</view>
<u-icon name="close" @click="showPop=false"></u-icon>
{{detailData.name}}
</view>
<view style="flex: 1;overflow-y: scroll;">
<view v-if="detailData.imgList&&detailData.imgList.length>0">
......@@ -166,7 +163,7 @@ export default {
flex-direction:column;
}
.head{
display: flex;
text-align: center;
font-size: 32rpx;
font-weight: bold;
padding: 30rpx;
......
<template>
<!----------------适用于订单选择券的时候展示券列表-------------------------->
<u-popup :show="show" :round="20" closeable @close="show=false">
<view class="title">
<view class="titleContent" v-for="(item,index) of navTitle" :key="index" :class="{on:active==index}" @click="navClick(index)">
<view style="position: relative;top:15rpx;">{{item}}</view>
<view v-show="active==index">
<text></text>
<!-- -----------------------适用于下单页面选择券的时候展示券列表-------------------------- -->
<u-popup :show="showPop" :round="20" closeable @close="showPop=false">
<view class="son-wrap">
<view class="head">
<view class="headlist" v-for="(item,index) of navTitle" :key="index" :class="{on:active==index}" @click="navClick(index)">
<text>
{{item}}
</text>
</view>
</view>
</view>
<!----------------------------------------------------可用------------------------------------------>
<view v-show="active==0">
<view class="middle">
<checkbox-group @change="checkboxChange" v-if="couponList.masterSlaveCouponList&&couponList.masterSlaveCouponList.length>0">
<view v-for="(item,index) of couponList.masterSlaveCouponList" :key="index" class="listBox">
<label class="listLabel">
<!------------------------------------可用-------------------------------------->
<view class="middle" v-if="active==0">
<checkbox-group @change="checkboxChange" v-if="masterSlaveCouponList&&masterSlaveCouponList.length>0">
<view v-for="(item,index) of masterSlaveCouponList" :key="index" class="list-box">
<label>
<view>
{{item.couponName}}
<checkbox :value="item.couponId" :checked="item.couponId==chooseCoupon.couponId" />
<checkbox :value="JSON.stringify(item)" :checked="item.couponId==chooseCoupon.couponId" class="blue" />
</view>
<view>
{{item.couponRule}}
......@@ -33,36 +31,37 @@
</label>
</view>
</checkbox-group>
<view class="empty" v-else>
空空如也...
</view>
</view>
<view class="empty" v-if="!couponList.masterSlaveCouponList||couponList.masterSlaveCouponList.length==0">
空空如也...
</view>
</view>
<!--------------------------------------不可用------------------------------------------------------------>
<view v-show="active==1">
<view class="middle" v-if="couponList.unusableCouponList&&couponList.unusableCouponList.length>0">
<view v-for="(item,index) of couponList.unusableCouponList" :key="index" class="listBox">
<view>
{{item.couponName}}
</view>
<view>
{{item.couponRule}}
<text v-if="item.savedMoney">
<text>¥</text>{{parseFloat(item.savedMoney.toFixed(2))}}
</text>
</view>
<view>
{{item.useStartDate}}-{{item.useEndDate}}
<!-- -------------------------------不可用-------------------------------- -->
<view v-if="active==1" class="middle">
<view v-if="unusableCouponList&&unusableCouponList.length>0">
<view v-for="(item,index) of unusableCouponList" :key="index" class="list-box">
<view>
{{item.couponName}}
</view>
<view>
{{item.couponRule}}
<text v-if="item.savedMoney">
<text>¥</text>{{parseFloat(item.savedMoney.toFixed(2))}}
</text>
</view>
<view>
{{item.useStartDate}}-{{item.useEndDate}}
</view>
</view>
</view>
<view class="empty" v-else>
空空如也...
</view>
</view>
<view class="empty" v-if="!couponList.unusableCouponList||couponList.unusableCouponList.length==0">
空空如也...
</view>
</view>
</view>
<view class="bottom-sure" @click="showPop=false">
确定
</view>
</u-popup>
</template>
......@@ -72,16 +71,25 @@
export default{
props:['couponData','chooseCouponObj'],
watch: {
couponData:{//
couponData:{//劵列表
handler(newValue, oldValue){
if(newValue){
this.couponList=this.couponData
//可用优惠券去重
this.masterSlaveCouponList=[]
if(newValue.masterSlaveCouponList){
newValue.masterSlaveCouponList.forEach(item=>{
if(!this.masterSlaveCouponList.find(item2=>item2.couponId==item.couponId)){
this.masterSlaveCouponList.push(item)
}
})
}
this.unusableCouponList=newValue.unusableCouponList
}
},
deep:true,
immediate:true
},
chooseCouponObj:{//
chooseCouponObj:{//选中的券
handler(newValue, oldValue){
if(newValue){
this.chooseCoupon=this.chooseCouponObj
......@@ -94,36 +102,26 @@ export default{
data(){
return{
active:0,//导航栏下标
show:false,//控制弹窗显示隐藏
current:0,//控制选项卡默认显示第几个
couponList:'',//券列表
showPop:false,//控制弹窗显示隐藏
masterSlaveCouponList:[],//可用优惠券列表
unusableCouponList:[],//不可用优惠券列表
chooseCoupon:'',//选中的劵
navTitle:['可用','不可用'],//导航标题
}
},
methods:{
navClick(index){//------------------------------------------导航栏点击
//---导航栏点击
navClick(index){
this.active=index
},
showCoupon(){//----------------------------------------展示弹窗
this.show=true
},
//---多选框值变化
checkboxChange(evt){
if(evt.detail.value.length==2){
//删除第一个
evt.detail.value.splice(0,1)
//获取选中券,传值给父组件
this.chooseCoupon=this.couponList.masterSlaveCouponList.find((item)=>{
return item.couponId==evt.detail.value[0]
})
this.$emit('couponChoose',this.chooseCoupon)
}else if(evt.detail.value.length==1){
this.chooseCoupon=this.couponList.masterSlaveCouponList.find((item)=>{
return item.couponId==evt.detail.value[0]
})
this.$emit('couponChoose',this.chooseCoupon)
}else if(evt.detail.value.length==0){
checkboxChange(e){
let value=e.detail.value
if(value.length>0){
let obj=JSON.parse(value[value.length-1])
this.$emit('couponChoose',obj)
}
if(value.length==0){
this.$emit('couponChoose','')
}
}
......@@ -133,19 +131,80 @@ export default{
</script>
<style scoped="scoped" lang="scss">
.title{display: flex;height: 80rpx;}
.titleContent{flex:1;text-align: center;font-size:30rpx;}
.titleContent.on{color: $blue;font-weight: bold;}
.titleContent view text{width: 40rpx;height: 6rpx;background:$blue;border-radius:6rpx;display:inline-block;position: relative;top:-10rpx;}
.middle{padding:24rpx;background:#f5f5f5;}
.listBox{background: #FFFFFF;padding:24rpx;border-radius:10rpx;}
.middle .listBox:not(:first-child){margin-top:20rpx;}
.middle view view:not(:first-child){margin-top:20rpx;}
.middle view view{display: flex;justify-content: space-between;}
.middle view view:first-child{font-weight: bold;}
.middle view view:nth-child(2){font-size:24rpx;}
.middle view view:last-child{color: #666666;font-size:24rpx;}
.middle view text{color:#f9690e;font-size:30rpx;font-weight: bolder;}
.middle view text text{font-size:24rpx;font-weight: 400;}
.empty{padding:100rpx 0;text-align: center;background: #f5f5f5;}
.son-wrap{
height:80vh;
display: flex;
flex-direction:column;
}
.head{
display: flex;
}
.headlist{
width: 50%;
height: 90rpx;
line-height: 90rpx;
text-align: center;
font-size:30rpx;
}
.headlist.on text{
border-bottom: 6rpx solid $theme;
color: $theme;
font-weight: bold;
}
.middle{
padding:24rpx 24rpx 100rpx 24rpx;
background:#f5f5f5;
flex: 1;
overflow-y: scroll;
}
.list-box{
background: #FFFFFF;
padding:24rpx;
border-radius:10rpx;
}
.middle .list-box:not(:first-child){
margin-top:20rpx;
}
.list-box view:not(:first-child){
margin-top:20rpx;
}
.list-box view{
display: flex;
justify-content: space-between;
}
.list-box view:first-child{
font-weight: bold;
}
.list-box view:last-child{
color: #999999;
font-size:24rpx;
}
.list-box text{
color:#f9690e;
font-size:32rpx;
font-weight: bold;
}
.list-box text text{
font-size:24rpx;
font-weight: 400;
}
.empty{
padding:160rpx 0;
text-align: center;
color: $red;
}
.bottom-sure{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
background:$theme;
font-size:32rpx;
font-weight: bold;
color: #ffffff;
}
</style>
......@@ -365,7 +365,7 @@ export default {
.button{
width: 144rpx;
height: 64rpx;
background: $blue;
background: $theme;
border-radius:8rpx;
display: inline-block;
color:#ffffff;
......@@ -411,7 +411,7 @@ export default {
display: inline-block;
width: 212rpx;
height: 80rpx;
background:$blue;
background:$theme;
border-radius: 44rpx;
text-align: center;
line-height: 80rpx;
......
......@@ -20,7 +20,7 @@
</view>
<view class="banner">
<u-swiper :list="list" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300" circular>
<u-swiper :list="list" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300" circular @click='swiperClick(currentNum)'>
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
</view>
......
......@@ -344,7 +344,7 @@ export default {
padding-right: 40rpx;
}
.search-btn {
background: $blue;
background: $theme;
color: #fff;
border-radius: 32rpx;
padding: 12rpx 24rpx;
......@@ -388,8 +388,8 @@ export default {
justify-content: space-between;
}
.right2-left text{
color: $blue;
border: 1px solid $blue;
color: $theme;
border: 1px solid $theme;
font-size: 20rpx;
padding: 2rpx 4rpx;
border-radius: 2rpx;
......
......@@ -125,7 +125,7 @@ export default {
white-space: nowrap;
}
.choose-content.on{
background: $blue;
background: $theme;
color: #ffffff;
}
.choose-name{
......
......@@ -55,7 +55,9 @@ export default {
let data={
search:this.search,//输入框的值
userId:uni.getStorageSync('openid')||'',
merchantCode:this.merchantCode
merchantCode:this.merchantCode,
startPlayDate:new Date().Format('yyyy-MM-dd')+' 00:00:00',//开始日期
endPlayDate:new Date().Format('yyyy-MM-dd')+' 23:59:59',//结束日期
}
uni.showLoading({
title:'加载中'
......@@ -258,6 +260,7 @@ export default {
}
.mark-close{
margin-top: 60rpx;
text-align: center;
display: flex;
justify-content: center;
}
</style>
<template>
<view v-show="bodyShow">
<view class="middle">
<view class="main">
<view v-if="orderList.length>0" v-for="item of orderList" :key="item.id" class="product">
<view>
<view class="middle" v-show="orderList.length>0">
<view class="middle-wrap">
<view v-for="item of orderList" :key="item.id" class="product">
<view>
<text> {{ item.merchantName }}{{ item.productName }}</text>
......@@ -15,16 +15,14 @@
<text></text> <text> <text style="font-size:24rpx;"></text>{{ item.pdDiscountMoney }} </text>
</view>
</view>
<view class="mainP3">
<text> 实际支付 </text>
<text>
<!--<i>
¥{{totalMoney}}
</i>-->
<text> <text style="font-size:28rpx;">¥</text>{{ pdOrderMoney }} </text>
</text>
<view class="middle-money">
<view> 实际支付 </view>
<view>
<text style="font-size:28rpx;">¥</text>
{{ pdOrderMoney }}
</view>
</view>
<view class="mainview">
<view class="middle-image">
<!-- #ifdef MP-WEIXIN -->
<image src="@/static/img/orderPayment/weixin.png" style="width:70rpx;height:62rpx;" /> <view> 微信支付 </view>
<!-- #endif -->
......@@ -36,16 +34,20 @@
</view>
</view>
</view>
<view v-show="errorMessage1||errorMessage2">
错误1:{{errorMessage1}}
错误2:{{errorMessage2}}
</view>
<view class="bottom">
<view class="bottomFirst">
<text> 实付款 </text>
<text> <text>¥</text>{{ pdOrderMoney }} </text>
<view class="bottom-left">
<text>实付款 </text>
<text v-show="pdOrderMoney">
<text style="font-size: 28rpx;">¥</text>
{{pdOrderMoney}}
</text>
</view>
<view class="bottomLast">
<text href="tel:400-072-0368"> <!-- <img src="@/assets/img/combination/kefu11.png" style="width: 0.31rpx;" /> --> </text>
<view class="bottom-right">
<u-icon name="chat" size="40" @click="makePhone()"></u-icon>
<text @click="goPay()" :style="{ background: background }">去支付</text>
</view>
</view>
......@@ -59,14 +61,14 @@ export default {
orderList:[], //订单列表
pdOrderMoney: '', //实际总价
totalMoney: '', //原价总价
errorMessage: '', //错误信息
bodyShow: false, //控制初始化数据成功显示
errorMessage1: '', //错误信息1,接口成功返回的错误信息
errorMessage2: '', //错误信息2,接口失败返回的错误信息
payType: '', //支付类型
timeStamp: '', //支付参数
nonceStr: '',
package: '',
signType: '',
paySign: '',
timeStamp: '', //微信支付参数
nonceStr: '',//微信支付参数
package: '',//微信支付参数
signType: '',//微信支付参数
paySign: '',//微信支付参数
orderInfo: '', //支付宝订单号
background: '', //去支付的背景颜色
orderId: '', //订单Id
......@@ -141,13 +143,22 @@ export default {
}
})
},
//---拨打电话
makePhone() {
uni.makePhoneCall({
phoneNumber:'400-072-0368'
})
},
//---初始化产品信息,以及获取支付需要的参数
initDetail() {
//---初始化产品信息,以及获取支付需要的参数
let data = {
orderId: this.orderId, //订单Id
userId: this.openid, //用户Id
payType: this.payType //支付类型
}
uni.showLoading({
mask:true
})
this.$request('orderc/order/findOrderInfo', data).then(res => {
if (res.code == '00') {
if(this.albumOrderdetail==1){
......@@ -159,8 +170,6 @@ export default {
this.afterBuyUrl='/pages/my/order/orderList/orderList'
}
}
this.bodyShow = true
//支付参数开始
this.timeStamp = res.data.timestamp
this.nonceStr = res.data.noncestr
......@@ -176,7 +185,7 @@ export default {
url: '/pages/payment/paySuccess/paySuccess?orderId=' + this.orderId+'&afterBuyUrl=' + this.afterBuyUrl + '&ifyukuaiCode=' + this.ifyukuaiCode
})
}
this.errorMessage = res.data.errorMessage
this.errorMessage1 = res.data.errorMessage
this.totalMoney = res.data.totalMoney
this.orderList = res.data.orderList||[]
if (this.orderList.length==0) {
......@@ -195,14 +204,15 @@ export default {
title: res.message,
icon: 'none'
})
this.errorMessage2=res.message
}
})
},
//----去支付
goPay() {
//-------------------------------------------------------去支付
if (this.errorMessage) {
if (this.errorMessage1) {
uni.showToast({
title: this.errorMessage,
title: this.errorMessage1,
icon: 'none'
})
return
......@@ -211,8 +221,14 @@ export default {
setTimeout(() => {
this.background = 'f9690e'
}, 1000)
// #ifdef MP-WEIXIN
if(!this.timeStamp||!this.nonceStr||!this.package||!this.signType||!this.paySign){
uni.showToast({
title: '缺少支付参数',
icon: 'none'
})
return
}
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.timeStamp,
......@@ -235,6 +251,13 @@ export default {
//#endif
// #ifdef MP-ALIPAY
if(!this.orderInfo){
uni.showToast({
title: '缺少支付参数',
icon: 'none'
})
return
}
uni.requestPayment({
provider: 'alipay', // 服务提供商 支付宝支付: alipay 微信支付: wxpay
orderInfo: this.orderInfo, // 支付宝订单号
......@@ -264,7 +287,7 @@ export default {
.middle {
padding: 30rpx 24rpx 0 24rpx;
}
.main {
.middle-wrap {
padding: 10rpx 24rpx 20rpx 24rpx;
background: #ffffff;
border-radius: 20rpx;
......@@ -296,7 +319,7 @@ export default {
.product view.coupon text {
font-size: 30rpx;
}
.mainP3 {
.middle-money {
height: 120rpx;
color: #000000;
border-bottom: 1px solid #e5e5e5;
......@@ -306,25 +329,24 @@ export default {
box-sizing: border-box;
justify-content: space-between;
}
.mainP3 text:nth-child(2) {
.middle-money view:nth-child(2) {
font-size: 24rpx;
color: #666666;
}
.mainP3 text:nth-child(2) text:nth-child(1) {
.middle-money view:nth-child(2) {
font-size: 36rpx;
color: #f9690e;
margin-left: 20rpx;
font-weight: bold;
}
.mainview {
.middle-image {
margin-top: 50rpx;
display: flex;
align-items: center;
}
.mainview > image:first-child {
.middle-image > image:first-child {
margin: 0 20rpx 0 10rpx;
}
.mainview > view {
.middle-image > view {
flex: 1;
}
.bottom {
......@@ -337,41 +359,25 @@ export default {
display: flex;
align-items: center;
}
.bottomFirst {
.bottom-left {
border-right: 1px solid #cccccc;
padding-left: 40rpx;
width: 40%;
box-sizing: border-box;
}
.bottomFirst text:nth-child(2) {
.bottom-left text:nth-child(2) {
font-size: 40rpx;
color: #f9690e;
margin-left: 10rpx;
font-weight: bold;
}
.bottomFirst text:nth-child(2) text {
font-size: 28rpx;
}
.bottomLast {
padding-left: 20rpx;
.bottom-right {
padding-left:30rpx;
display: flex;
width: 60%;
padding-right: 20rpx;
box-sizing: border-box;
padding-right:30rpx;
align-items: center;
}
.bottomLast text:first-child {
display: block;
text-align: center;
width: 60rpx;
}
.bottomLast text:first-child text {
margin-top: 10rpx;
display: inline-block;
font-size: 24rpx;
color: #666666;
}
.bottomLast text:nth-child(2) {
.bottom-right text:nth-child(2) {
flex: 1;
height: 70rpx;
display: inline-block;
......@@ -382,5 +388,6 @@ export default {
margin-left: 30rpx;
border-radius: 20rpx;
font-size: 32rpx;
font-weight: bold;
}
</style>
......@@ -84,7 +84,7 @@
</view>
</view>
</template>
<!-- 显示增加数量页面 -->
<template v-if="showNumber">
<view class="top2">
<view class="top2-name">
......@@ -100,9 +100,10 @@
v-model="buyNum"
bg-color='#3688FF'
color='#ffffff'
:input-height="60"
:min="1"
size='28'>
iconStyle='color:#ffffff;font-size:32rpx;'
buttonSize='60'
input-width="100"
:min="1">
</u-number-box>
</view>
<view class="top2-price">
......@@ -363,7 +364,7 @@ export default {
},
showCoupon() {
//---展示券列表
this.$refs.orderCoupon.showCoupon()
this.$refs.orderCoupon.showPop=true
},
//---初始化获取商家名称,大商家
initMerchant() {
......@@ -396,20 +397,21 @@ export default {
this.$request('user/newCompany/findCompanyById', data).then(res => {
uni.hideLoading()
if (res.code == '00') {
this.companyAttribute = res.data.companyAttribute
this.paydJumpUrl = res.data.paydJumpUrl
if (this.companyAttribute == 5) {
//出租车显示联系人姓名,其他显示公司名称
this.companyName = res.data.contactName
} else {
this.companyName = res.data.companyName
}
let list=res.data.companyTollPointVoList
let list=res.data.companyTollPointVoList||[]
list.forEach(item=>{
if(item.tollPoints==this.extendInfo){
this.tollPoint=item
}
})
this.companyAttribute = res.data.companyAttribute
if (this.companyAttribute == 5) {
//出租车显示联系人姓名
this.companyName = res.data.contactName
} else {
//优先取收费点名称,然后是公司名称,然后是联系人名称
this.companyName=this.tollPoint.tollPointByname||res.data.companyName||res.data.contactName
}
if(this.tollPoint.tollPointsModel==0){
//显示输入金额页面
this.showMoney=true
......@@ -426,8 +428,6 @@ export default {
icon: 'none'
})
}
//优先取收费点名称,然后是公司名称,然后是联系人名称
this.companyName=this.tollPoint.tollPointByname||res.data.companyName||res.data.contactName
}
} else {
uni.showToast({
......@@ -604,11 +604,11 @@ export default {
success:res=>{
if (this.companyAttribute == 5) {
//出租车跳转分销组合票页面
uni.navigateTo({
uni.reLaunch({
url: this.paydJumpUrl
})
} else {
uni.navigateTo({
uni.reLaunch({
url: '/pages/payment/paySuccess/paySuccess?orderId=' + this.orderId
})
}
......@@ -629,11 +629,11 @@ export default {
success:res=>{
if (this.companyAttribute == 5) {
//出租车跳转分销组合票页面
uni.navigateTo({
uni.reLaunch({
url: this.paydJumpUrl
})
} else {
uni.navigateTo({
uni.reLaunch({
url: '/pages/payment/paySuccess/paySuccess?orderId=' + this.orderId
})
}
......
......@@ -660,7 +660,7 @@ export default {
}
.tabbar .on {
// background: url('../../../static/img/scenic/tabbar.png') no-repeat;
background: $blue;
background: $theme;
background-size: 100% 100%;
color: #fff;
font-weight: bold;
......@@ -750,7 +750,7 @@ export default {
align-items: center;
}
.product-rule {
color: $blue;
color: $theme;
}
.product-rule::after {
display: inline-block;
......
<template>
<div>
<u-calendar
:show="show"
@confirm="onConfirm"
......@@ -8,51 +7,37 @@
:defaultDate="defaultDate"
:formatter='formatter'
ref="calendar2"
rowHeight='112'
round='20'
closeOnClickOverlay='true'
></u-calendar>
</div>
</template>
<script>
export default {
props: ['dateList'],
watch: {
dateList:{
handler(newValue, oldValue){
if(newValue&&newValue.length>0){
this.maxDate=newValue[newValue.length-1].startTime.substr(0,10)
}
},
deep:true,
immediate:true
}
dateList:{
handler(newValue, oldValue){
if(newValue&&newValue.length>0){
this.maxDate=newValue[newValue.length-1].startTime.substr(0,10)
}
},
deep:true,
immediate:true
}
},
data() {
return {
date: '', //选择的日期
show: false, //控制日历显示隐藏
defaultDate:'', //默认日期
maxDate:'',//最大日期
}
},
mounted() { //默认为第一天
mounted() {
this.$refs.calendar2.setFormatter(this.formatter)
},
methods: {
//---年月日转化
formatDate(date) {
let year = date.getFullYear()
let month = date.getMonth() + 1
if (month < 10) {
month = '0' + month
}
let days = date.getDate()
if (days < 10) {
days = '0' + days
}
let dates = year + '-' + month + '-' + days
return dates
},
//---日期确认事件
onConfirm(date) {
this.show = false
......@@ -73,23 +58,16 @@ export default {
//真机调试手极端报错,暂时注释
// this.dateList.forEach((item, index) => {
// if (item.startTime.substr(0, 10) == dates) {
// day.bottomInfo = "¥" + item.sellingPrice
// day.bottomInfo = '¥' + item.sellingPrice
// day.dot = true
// }
// })
// if (!day.bottomInfo) {
// day.type = "disabled"
// day.type = 'disabled'
// }
return day
},
//---设置默认日期方法
setDefaultDate(val) {
let dates = val.split('-')
let year = parseInt(dates[0])
let month = parseInt(dates[1]) - 1
let day = parseInt(dates[2])
this.defaultDate = new Date(year, month, day)
},
}
}
}
</script>
......
<template>
<view class="area-box">
<view class="top" @click="sure()">
<view class="top" @click="closeSon()">
<view class="top-left">
选择(索道)出发站点
</view>
<view>
<u-icon name="close"></u-icon>
<u-icon name="close" bold></u-icon>
</view>
</view>
<view v-if="defaultAreaCode" class="defaultArea">
<view>
<text>
当前站点:
</text>
<text>
{{areaObj.areaName}}
</text>
</view>
<view>
<text>
当前排队人数:
</text>
<text>
{{sortIfo.peopleNumber}}
</text>
</view>
<view>
<text>
预计进入排队等候区时间:
</text>
<text>
{{sortIfo.sortTotalTime}}
</text>
</view>
<view>
<text>
退票规则:
</text>
<text>
不可退
</text>
</view>
<view>
<image src="../static/scenic/chooseArea.jpg" mode="widthFix"></image>
</view>
<view>
<a class="middle-btn" @click="sure()">确定</a>
</view>
</view>
<template v-else>
</view>
<!-- 没有默认站点时-->
<template v-if="!defaultAreaCode">
<view class="bottom">
<view class="bottom1">
<view>
......@@ -72,7 +21,7 @@
</view>
<view class="bottom1-btn">
<text class="btn" @click="getSort(item)" v-for="(item,index) of areaList" :key="index">
<text class="btn" @click="chooseArea(item)" v-for="(item,index) of areaList" :key="index">
{{item.areaName}}
</text>
</view>
......@@ -121,7 +70,7 @@
</text>
</view>
</template>
<view>
<!-- <view>
<text>
退票规则:
</text>
......@@ -129,19 +78,19 @@
<text>
不可退
</text>
</view>
</view> -->
<view>
返程时,根据现场情况需重新取号
</view>
<view v-if="!sortIfo" style="font-size:32rpx;color: #ff0000;">
<view v-if="!sortIfo" style="font-size:32rpx;color:#FC6703;">
未找到本站信息,请根据现场大屏幕信息合理购票
</view>
<view style="text-align: center;">
<text class="middle-btn" @click="hidePop()" style="color: #333;margin-right: 48rpx;">
<text class="btn" @click="hidePop()" style="color: #555;margin-right: 48rpx;">
取消
</text>
<text class="middle-btn" @click="sure()">
<text class="btn" @click="sure()">
确定
</text>
</view>
......@@ -149,7 +98,56 @@
</view>
</template>
<!-- 有默认站点时 -->
<view v-else class="defaultArea">
<view>
<text>
当前站点:
</text>
<text>
{{areaObj.areaName}}
</text>
</view>
<view>
<text>
当前排队人数:
</text>
<text>
{{sortIfo.peopleNumber}}
</text>
</view>
<view>
<text>
预计进入排队等候区时间:
</text>
<text>
{{sortIfo.sortTotalTime}}
</text>
</view>
<!-- <view>
<text>
退票规则:
</text>
<text>
不可退
</text>
</view> -->
<view>
<image src="../static/scenic/chooseArea.jpg" mode="widthFix"></image>
</view>
<view>
<a class="btn" @click="closeSon()">确定</a>
</view>
</view>
</view>
</template>
......@@ -162,7 +160,7 @@ export default {
showPop: false, //控制弹窗显示隐藏
distanceIndex:0, //最小距离下标
distanceList: [], //所有距离列表
sortIfo: '', //排信息
sortIfo: '', //排信息
areaObj: {
areaCode: '', //选中的区域编码
areaName: '', //选中的区域名字
......@@ -174,18 +172,12 @@ export default {
created() {
//如果有默认站点
if(this.defaultAreaCode&&this.sortArr.length>0){
this.sortArr.forEach(item=>{
if(item.projectId==this.defaultAreaCode){
this.sortIfo=item
this.sortIfo.peopleNumber = Math.max(item.sortTotalCapacity-item.showEnd,0)
}
})
this.areaList.forEach(item=>{
if(item.areaCode==this.defaultAreaCode){
this.areaObj.areaCode=item.areaCode
this.areaObj.areaName=item.areaName
}
})
this.sortArr.forEach(item=>{
if(item.projectId==this.defaultAreaCode){
this.sortIfo=item
this.sortIfo.peopleNumber = Math.max(item.sortTotalCapacity-item.showEnd,0)
}
})
return
}
uni.getLocation({
......@@ -198,27 +190,23 @@ export default {
})
},
methods: {
//---关闭组件
closeSon(){
this.$parent.closeArea()
},
//---隐藏弹窗
hidePop() {
this.showPop = false
},
//---返回隐藏该组件
returnClose() {
this.$parent.closeArea()
},
//---隐藏该组件
//---确定选择站点
sure() {
this.showPop = false
this.$parent.closeArea()
this.$emit('areaSure', this.areaObj)
},
//---获取排号信息
getSort(item) {
//---选择站点,获取排号信息
chooseArea(item) {
this.showPop = true
let data = {
areaCode: item.areaCode,
merchantCode: this.merchantCode, //商户code
}
this.areaObj.areaCode = item.areaCode //获取选中的站点code,便于找到返回数据的下标
this.areaObj.areaName = item.areaName
this.sortArr.forEach((item)=>{
......@@ -255,7 +243,7 @@ export default {
text-align: center;
}
.defaultArea view text:last-child{
color: #e70313;
color: $red;
font-size:32rpx;
font-weight: bold;
}
......@@ -266,7 +254,7 @@ export default {
right: 0;
bottom: 0;
z-index:99;
background: #f5f5f5;
background: #ECF3FE;
}
.top{
display: flex;
......@@ -288,7 +276,7 @@ export default {
}
.bottom1-choose{
font-size: 32rpx;
color: #ff0000;
color: $red;
text{
font-weight: bold;
font-size: 36rpx;
......@@ -300,12 +288,12 @@ export default {
.bottom2{
margin-top: 60rpx;
font-size: 32rpx;
color: #ff0000;
color:$red;
text-align: center;
}
// 弹窗
.pop-wrap{
background: rgba(0,0,0,0.1);
background: rgba(0,0,0,0.4);
position: fixed;
top: 0;
left: 0;
......@@ -328,6 +316,6 @@ export default {
.pop-content view:not(:last-child) text:last-child{
font-size:36rpx;
font-weight: bolder;
color: #f40000
color:$red;
}
</style>
<template>
<view class="contact-box">
<u-popup :show="contactsShow" @close="contactsShow=false">
<view v-show="showPop">
<view class="list-box">
<view class="top">
<u-icon name="close" @click="contactsShow=false"></u-icon>
<text>
需填写{{buyNum}}位联系人
<text v-if="buyNum-chooseContact.length>0">
,还需
<text class="top-number">{{buyNum-chooseContact.length}}</text>
位出行人
<view class="top-num">
<text>
需填写{{contactNum}}位联系人
</text>
</text>
<text @click="config()" class="top-sure">
确定
</text>
</view>
<view class="bottom">
<view @click="showEdit()" class="bottom-add">
<view class="top-icon" @click="showPop=false">
<u-icon name="close" bold></u-icon>
</view>
</view>
<view @click="showEdit()" class="top-add">
<text>
+添加旅客信息
</text>
</view>
</view>
<view class="bottom">
<checkbox-group @change="chooseContactChange">
<view class="bottom-list" v-for="(item,index) of contactData" :key="item.id">
<view class="bottom-list" v-for="(item,index) of listTotal" :key="item.id">
<label>
<checkbox :value="JSON.stringify(item)" :checked="item.ifChoose" color="#3688ff" />
<checkbox class="blue" :value="JSON.stringify(item)" :checked="item.ifChoose" color="#3688ff" />
<view class="bottom-content">
<view>
{{item.name}}
</view>
</view>
<view>
<text>
身份证
</text>
{{item.credentialNumber?item.credentialNumber.substr(0,3)+"****"+item.credentialNumber.substr(14,4):"无"}}
</view>
<view>
<text>
手机号
</text>
{{item.phone?item.phone.substr(0,3)+"****"+item.phone.substr(7,4):"无"}}
</view>
</view>
</label>
<view @click="goEdit(item)" style="margin-right:20rpx;">
<u-icon name="edit-pen" color="#3688ff" size="28"></u-icon>
<u-icon name="edit-pen" color="#3688ff" size="56"></u-icon>
</view>
<view @click="clickDele(item.id)">
<u-icon name="trash-fill" color="#3688ff" size="28"></u-icon>
<u-icon name="trash-fill" color="#3688ff" size="56"></u-icon>
</view>
<u-modal :show="showModal" @confirm="confirmDele" @cancel="showModal=false" showCancelButton title="确认删除该联系人" ></u-modal>
</view>
<view style="margin: 40rpx 0;text-align: center;" v-if='listTotal&&listTotal.length>0'>
已展示所有联系人
</view>
</checkbox-group>
</view>
</u-popup>
<view class="bottom-sure" @click="config()">
确定
</view>
</view>
</view>
<u-modal :show="showModal" @confirm="confirmDele" @cancel="showModal=false" showCancelButton title="确认删除该联系人" ></u-modal>
</view>
</template>
<script>
export default {
props: ["contactData", "orderTouristList", "buyNum"],
watch: {
orderTouristList: {
handler(newValue, oldValue) {
if (newValue) {
this.chooseContact = this.orderTouristList
}
},
deep: true,
immediate: true
}
},
data() {
return {
contactsShow: false, //控制联系人弹窗显示隐藏
chooseContact: [], //选中的联系人
showModal: false, //确认弹窗显示隐藏
contactId:'',//删除联系人的Id
export default {
props: ['contactTotal', 'contactNum'],
watch: {
contactTotal: {
handler(newValue, oldValue) {
if (newValue) {
this.listTotal = this.contactTotal
}
},
deep: true,
immediate: true
}
},
data() {
return {
showPop: false, //控制联系人弹窗显示隐藏
listTotal:[],//所有联系人
showModal: false, //确认弹窗显示隐藏
contactId:'',//删除联系人的Id
}
},
methods: {
//---点击新增,展示编辑联系人弹窗,并传空值给编辑弹窗
showEdit() {
this.contactsShow=false
this.$parent.showEdit()
this.$emit("getEditContact", "")
},
//---展示编辑弹窗,并传值给编辑弹窗
goEdit(obj) {
this.contactsShow=false
this.$parent.showEdit()
this.$emit("getEditContact", obj)
},
//---确定选中的联系人
config() {
this.contactsShow = false
this.$emit("contactListConfig", this.chooseContact)
},
//---联系人姓名变化
chooseContactChange(e){
let value=e.detail.value
let arr=[]
value.forEach(item=>{
arr.push(JSON.parse(item))
})
this.chooseContact=arr
if (arr.length == this.buyNum) { //当选择的人数等于需要填的人数时关闭弹窗
this.config()
}
if (arr.length > this.buyNum) {
arr.shift()
this.config()
}
},
//---点击删除
clickDele(id) {
this.showModal = true
this.contactId=id
},
//---确认删除
confirmDele(){
let data={
id:this.contactId
}
this.$request('wechatUser/contact/deleteContact', data).then((res) => {
if (res.code == '00') {
uni.showToast({
title:'删除成功',
icon:'none'
})
this.showModal = false
this.contactsShow=false
this.$parent.getContactList()
} else {
uni.showToast({
title:res.message,
icon:'none'
})
}
}).catch(() => {
this.showModal = false
})
}
}
}
}
},
methods: {
//---点击新增,展示编辑联系人弹窗,并传空值给编辑弹窗
showEdit() {
this.$parent.showEdit()
this.$emit('getEditContact', '')
},
//---展示编辑弹窗,并传值给编辑弹窗
goEdit(obj) {
this.$parent.showEdit()
this.$emit('getEditContact', obj)
},
//---确定选中的联系人
config() {
this.showPop = false
//选中的排在前面
this.listTotal.sort(function (a, b) {
return b.ifChoose-a.ifChoose
})
this.$parent.contactTotal=this.listTotal
let chooseArr=[]
this.listTotal.forEach(item=>{
if(item.ifChoose){
chooseArr.push(item)
}
})
this.$parent.chooseContact=chooseArr
},
//---联系人姓名变化
chooseContactChange(e){
let value=e.detail.value
if (value.length > this.contactNum) {
let number=value.length-this.contactNum
value=value.slice(number)
}
let arr=[]
value.forEach(item=>{
arr.push(JSON.parse(item))
})
//先全部取消选中,后面根据选中的值来判断谁选中
this.listTotal.forEach(item=>{
item.ifChoose=false
})
arr.forEach(item=>{
this.listTotal.forEach(item2=>{
if(item.id==item2.id){
item2.ifChoose=true
}
})
})
},
//---点击删除
clickDele(id) {
this.showModal = true
this.contactId=id
},
//---确认删除
confirmDele(){
let data={
id:this.contactId
}
this.$request('wechatUser/contact/deleteContact', data).then((res) => {
if (res.code == '00') {
uni.showToast({
title:'删除成功',
icon:'none'
})
this.showModal = false
this.$parent.getContactList()
} else {
uni.showToast({
title:res.message,
icon:'none'
})
}
}).catch(() => {
this.showModal = false
})
}
}
}
</script>
<style scoped="scoped" lang="scss">
.top {
height:100rpx;
.list-box{
background: #F5F5F5;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
display: flex;
justify-content: space-between;
background: #f0f0f0;
align-items: center;
padding: 0 24rpx;
flex-direction: column;
}
.top-sure {
color: var(--main-color);
font-size: 28rpx;
}
.top-number{
color: #f9690e;
.top-num{
height: 100rpx;
display: flex;
align-items: center;
background: #FFF1E8;
color: #FC771D;
justify-content: center;
font-weight: bold;
font-size: 32rpx;
font-weight:bold;
position: relative;
}
.bottom {
padding:0 24rpx 80rpx 24rpx;
.top-icon{
position: absolute;
right: 24rpx;
}
.bottom-add {
height:130rpx;
.top-add {
height:150rpx;
display: flex;
align-items: center;
border-bottom: 1px solid #e6e6e6;
width: 100%;
justify-content: center;
border-bottom: 1px solid #e6e6e6;
padding: 0 24rpx;
background: #ECF3FE;
}
.bottom-add text{
width:280rpx;
height: 65rpx;
text-align: center;
line-height:65rpx;
border: 1px solid var(--main-color);
color:var(--main-color);
.top-add text{
display: inline-block;
width:100%;
height: 76rpx;
text-align: center;
line-height:76rpx;
border: 1px solid $theme;
color:$theme;
border-radius:5rpx;
box-shadow:0px 0px 12px 2px rgba(0,0,0,0.08);
}
.bottom {
padding:0 24rpx 100rpx 24rpx;
flex: 1;
overflow-y: scroll;
}
.bottom-list{
display: flex;
justify-content: space-between;
......@@ -198,29 +228,38 @@
border-bottom: 1px solid #E6E6E6;
padding:25rpx 0;
}
.bottom-list label {
display: flex;
flex: 1;
align-items: center;
}
.bottom-content {
flex: 1;
margin-left: 40rpx;
}
.bottom-content view {
font-size:28rpx;
color: #666666;
}
.bottom-content view:not(:first-child) {
margin-top: 10rpx;
}
.bottom-content view text {
display: inline-block;
width: 100rpx;
}
.bottom-sure{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
background:$theme;
font-size:32rpx;
font-weight: bold;
color: #ffffff;
}
</style>
<template>
<view>
<u-popup :show="show" :round="10" closeable @close="show=false">
<view class="detail">
<view class="detail-title">
费用明细
</view>
<view class="detail-content">
<view class="content-box">
<text>
{{merchantName}}({{name}})
</text>
<u-popup :show="showPop" :round="20" @close="showPop = false" closeable>
<view class="son-wrap">
<view class="detail-title">
订单明细
</view>
<view class="content-right">
<view>¥{{sellingPrice}}x{{buyNum}}</view>
<view v-if="productDepositTotal">押金:{{productDepositTotal}}</view>
</view>
</view>
<!-- ---------------------------------------额外服务------------------------------------------- -->
<view class="content-box" v-for="(item,index) of choooseServiceData" :key="index">
<text>
{{item.name}}
</text>
<view style="flex: 1; overflow-y: scroll">
<view class="content-box">
<text> {{ merchantName }}({{ name }}) </text>
<view class="content-right">
<view>¥{{item.sellingPrice}}x{{buyNum}}</view>
<view v-if="item.depositTotal">押金:{{item.depositTotal}}</view>
</view>
<view class="content-right">
<view>¥{{ sellingPrice }}x{{ buyNum }}</view>
<view v-if="productDepositTotal">押金:{{ productDepositTotal }}</view>
</view>
<view class="content-box" v-if="chooseCouponObj&&chooseCouponObj.savedMoney>0">
<text>
</text>
</view>
<!-- ---------------------------------------额外服务------------------------------------------- -->
<view class="content-box" v-for="(item, index) of chooseService" :key="index">
<text>
{{ item.name }}
</text>
<text class="content-right">
{{parseFloat(chooseCouponObj.savedMoney.toFixed(2))}}
</text>
<view class="content-right">
<view>¥{{ item.sellingPrice }}x{{ buyNum }}</view>
<view v-if="item.depositTotal">押金:{{ item.depositTotal }}</view>
</view>
</view>
<view class="content-box" v-if="chooseCouponObj && chooseCouponObj.savedMoney > 0">
<text></text>
<view class="content-box content-total">
<text>
合计
</text>
<text class="content-right">{{ parseFloat(chooseCouponObj.savedMoney.toFixed(2)) }} </text>
</view>
<text class="content-right">
¥<text style="font-size:36rpx;">{{sellTotal}}</text>
</text>
</view>
<view class="content-box content-total">
<text> 合计 </text>
<text class="content-right">
¥<text style="font-size: 36rpx">{{ sellTotal }}</text>
</text>
</view>
</view>
</u-popup>
</view>
</view>
</u-popup>
</template>
<script>
export default {
props: ["merchantName", "name", "buyNum", "sellingPrice", "productDepositTotal", "chooseCouponObj", "choooseService"],
watch: {
choooseService: {
handler(newValue, oldValue) {
if (newValue) {
this.choooseServiceData = this.choooseService
}
},
deep: false,
immediate: false
}
},
data() {
return {
show: false, //控制弹窗显示隐藏
extraPrice: 0, //额外服务价格
depositTotal: 0, //额外服务总押金
choooseServiceData: [], //选中的服务
}
},
computed: {
sellTotal() { //卖价总价
let savedMoney=0
if(this.chooseCouponObj){
savedMoney = this.chooseCouponObj.savedMoney
}
if (this.choooseServiceData.length > 0) { //额外服务价格
let singleMoney = 0 //单个产品总押金,用于算出总押金
this.extraPrice = 0
this.depositTotal = 0 //总押金
for (let i = 0; i < this.choooseServiceData.length; i++) {
this.extraPrice += parseFloat((this.choooseServiceData[i].sellingPrice * this.buyNum).toFixed(2))
if (this.choooseServiceData[i].depositType == 1) { //---------------------------------------------------------------------------等于1,押金金额跟数量没关系
singleMoney = this.choooseServiceData[i].deposit
this.choooseServiceData[i].depositTotal = this.choooseServiceData[i].deposit //单个产品总押金
} else if (this.choooseServiceData[i].depositType == 2) { //----------------------------------------------------------------------等于2,押金单价乘购买数量
singleMoney = parseFloat((this.choooseServiceData[i].deposit * this.buyNum).toFixed(2))
this.choooseServiceData[i].depositTotal = parseFloat((this.choooseServiceData[i].deposit * this.buyNum).toFixed(2)) //单个产品总押金
}
this.depositTotal += singleMoney
}
} else {
this.extraPrice = 0
this.depositTotal = 0
}
return parseFloat((this.sellingPrice * this.buyNum + this.extraPrice + this.depositTotal + this.productDepositTotal - savedMoney).toFixed(2))
}
},
export default {
props: [
'merchantName',
'name',
'buyNum',
'sellingPrice',
'productDepositTotal',
'chooseCouponObj',
'chooseService',
'sellTotal'
],
data() {
return {
showPop: false, //控制弹窗显示隐藏
}
},
methods: {
}
}
methods: {}
}
</script>
<style scoped="scoped">
.detail-title {
height:120rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
border-bottom:var(--border-bottom);
}
.content-box {
padding: 0 30rpx;
border-bottom: 1px solid #f0f0f0;
height: 120rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size:28rpx;
}
.content-right{
text-align: right;
flex-shrink: 0;
margin-left: 20rpx;
}
.content-total {
color: #f45803;
font-weight: bolder;
font-size:32rpx;
}
.son-wrap {
position: relative;
height: 65vh;
display: flex;
flex-direction: column;
}
.detail-title {
text-align: center;
font-size: 32rpx;
font-weight: bold;
padding: 30rpx 24rpx;
border-radius: 20rpx 20rpx 0 0;
}
.content-box {
padding: 0 30rpx;
border-bottom: 1px solid #f0f0f0;
height: 120rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
}
.content-right {
text-align: right;
flex-shrink: 0;
margin-left: 20rpx;
}
.content-total {
color: #f45803;
font-weight: bolder;
font-size: 32rpx;
}
</style>
<template>
<view class="editBox" v-show="showEdit">
<view @click="close()" class="return">
<u-icon name="close"></u-icon>
<view class="return">
<!-- 新增的时候 -->
<view v-if="!reviseContactId">
已新增{{contactTotal.length}}位联系人
</view>
<view @click="showEdit = false" class="return-icon">
<u-icon name="close" bold></u-icon>
</view>
</view>
<view class="editTop">
</view>
<view class="editBottom">
<view class="bottomContent">
<view>
<text>
姓名:
</text>
<input v-model.trim="name" placeholder="请输入中文姓名" />
<input v-model.trim="name" placeholder="请输入中文姓名,必填" />
</view>
<view>
<text>
身份证:
</text>
<input v-model.trim="credentialNumber" maxlength="18" placeholder="请输入身份证号码" />
<input v-model.trim="credentialNumber" maxlength="18" placeholder="请输入身份证号码,必填" />
</view>
<view>
<!--编辑-->
<a class="middle-btn" @click="keepEdit()" v-if="editBtn">完成</a>
<!--新增-->
<a class="middle-btn" @click="keepPlus()" v-else="">完成</a>
<text>
联系电话:
</text>
<input v-model.trim="phone" maxlength="11" placeholder="用于接收行程信息" />
</view>
<view>
<a class="complete" @click="keepSave()">完成</a>
</view>
</view>
......@@ -37,147 +45,123 @@
</template>
<script>
export default {
props: ["editContact"],
data() {
return {
showEdit: false, //控制组件显示隐藏
name: "", //姓名
credentialNumber: "", //身份证号
reviseContactId: "", //被修改人id
editBtn: "", //控制编辑完成按钮显示隐藏
}
},
watch: {
editContact: { //
handler(newValue, oldValue) {
if (newValue) {
this.editBtn = true
} else {
this.editBtn = false
}
this.name = newValue.name||''
this.credentialNumber = newValue.credentialNumber||''
this.reviseContactId = newValue.id||''
},
deep: false,
immediate: false
}
},
methods: {
//---关闭弹窗
close() {
this.showEdit = false
},
//---新增保存
keepPlus() {
if (!this.$commonjs.nameReg().test(this.name)) {
uni.showToast({
title:'请输入正确的中文名字',
icon:'none'
})
return
}
if (!this.$commonjs.idReg().test(this.credentialNumber)) {
uni.showToast({
title:'请输入正确身份证号',
icon:'none'
})
return
}
let data = {
name: this.name, //保存姓名
phone: "", //电话号码
credentialNumber: this.credentialNumber, //身份证号
category: "", //成人或者儿童
openid: uni.getStorageSync("openid"), //用户Id
credentialsType: "", //证件类型
merchantType: 1, //商户类型,1.景区,2.酒店,3.餐饮
}
this.$request("wechatUser/contact/saveContact", data).then((res) => {
if (res.code == "00") {
uni.showToast({
title:'保存成功',
icon:'none'
})
this.$parent.addChoose()
this.showEdit = false
this.name = "" //成功之后清空数据,防止下次新增的时候出现之前的数据
this.credentialNumber = ""
} else {
uni.showToast({
title:res.message,
icon:'none'
})
}
})
},
//---编辑保存
keepEdit() {
if (!this.$commonjs.nameReg().test(this.name)) {
uni.showToast({
title:'请输入正确的中文名字',
icon:'none'
})
return
}
if (!this.$commonjs.idReg().test(this.credentialNumber)) {
uni.showToast({
title:'请输入正确身份证号',
icon:'none'
})
return
}
let data = {
name: this.name, //保存姓名
phone: "", //电话号码
credentialNumber: this.credentialNumber, //身份证号
category: "", //成人或者儿童
openid: uni.getStorageSync("openid"), //用户Id
credentialsType: "", //证件类型
merchantType: 1, //商户类型,1.景区,2.酒店,3.餐饮
id: this.reviseContactId, //被修改人id
}
this.$request("wechatUser/contact/updateContact", data).then((res) => {
if (res.code == "00") {
uni.showToast({
title:'修改成功',
icon:'none'
})
this.$parent.getContactList()
this.showEdit = false
} else {
uni.showToast({
title:res.message,
icon:'none'
})
}
})
}
}
}
export default {
props: ['editContact','contactTotal'],
data() {
return {
showEdit: false, //控制组件显示隐藏
name: '', //姓名
credentialNumber: '', //身份证号
phone:'',//手机号码
reviseContactId: '', //被修改人id
}
},
watch: {
editContact: {
handler(newValue, oldValue) {
this.name = newValue.name||''
this.credentialNumber = newValue.credentialNumber||''
this.reviseContactId = newValue.id||''
this.phone=newValue.phone||''
},
deep: true,
immediate: true
}
},
methods: {
//---保存
keepSave() {
if (!this.$commonjs.nameReg().test(this.name)) {
uni.showToast({
title:'请输入正确的中文名字',
icon:'none'
})
return
}
if (!this.$commonjs.idReg().test(this.credentialNumber)) {
uni.showToast({
title:'请输入正确身份证号',
icon:'none'
})
return
}
if (this.phone&&!this.$commonjs.phoneReg().test(this.phone)) {
uni.showToast({
title:'请输入正确电话号码',
icon:'none'
})
return
}
let data = {
name: this.name, //保存姓名
phone:this.phone, //电话号码
credentialNumber: this.credentialNumber, //身份证号
openid: uni.getStorageSync('openid'), //用户Id
merchantType: 1, //商户类型,1.景区,2.酒店,3.餐饮
id: this.reviseContactId, //被修改人id
category: '', //成人或者儿童
credentialsType: '', //证件类型
}
let queryUrl=''
if(this.reviseContactId){
queryUrl='wechatUser/contact/updateContact'
}else{
queryUrl='wechatUser/contact/saveContact'
}
this.$request(queryUrl, data).then((res) => {
if (res.code == '00') {
uni.showToast({
title:'保存成功',
icon:'none'
})
if(!this.reviseContactId){
//新增的时候
this.$parent.addChoose()
//成功之后清空数据,防止下次新增的时候出现之前的数据
this.name = ''
this.credentialNumber = ''
this.phone=''
}
if(this.reviseContactId){
//修改的时候
this.showEdit = false
}
} else {
uni.showToast({
title:res.message,
icon:'none'
})
}
})
}
}
}
</script>
<style scoped="scoped">
<style scoped="scoped" lang="scss">
.editBox {
height: 100%;
background: #F5F5F5;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10000;
overflow-y: auto;
font-size:28rpx;
z-index: 1000;
}
.return {
height:100rpx;
padding: 0 24rpx;
background: #FFFFFF;
height: 100rpx;
display: flex;
align-items: center;
justify-content:flex-end;
background: #FFF1E8;
color: #FC771D;
justify-content: center;
font-weight: bold;
font-size: 32rpx;
position: relative;
}
.return-icon{
position: absolute;
right: 24rpx;
}
.editTop {
height:200rpx;
......@@ -201,7 +185,7 @@
}
.bottomContent view text {
display: inline-block;
width: 120rpx;
width: 140rpx;
text-align-last: justify;
margin-right: 20rpx;
}
......@@ -209,10 +193,17 @@
flex: 1;
}
.bottomContent view:last-child {
display: flex;
justify-content: center;
align-items: center;
margin-top: 60rpx;
border: none;
}
.complete{
width:100%;
height:70rpx;
border-radius:16rpx;
color: #FFFFFF;
text-align: center;
line-height:70rpx;
background:$theme;
display: inline-block;
}
</style>
<template>
<u-popup :show="show" :round="10" closeable @close="show=false">
<view class="time">
<u-popup :show="showPop" :round="20" @close="showPop=false" closeable>
<view class="son-wrap">
<view class="time-title">
时间选择
</view>
<view class="time-content" v-if="chooseTimeList&&chooseTimeList.length>0">
<!--库存大于零并且当前时间小于班次的开始时间才显示-->
<view
class='time-list'
v-for="(item,index) of chooseTimeList"
:class="{on:active==index}"
@click="chooseTime(index)"
:key="index" v-if="item.last>0"
>
<view>
{{item.startPlanTime?item.startPlanTime.substr(0,5):""}}
<text v-if="item.endPlanTime">-</text>
{{item.endPlanTime?item.endPlanTime.substr(0,5):""}}
</view>
<view>
剩余:{{item.last}}
<view style="flex: 1;overflow-y: scroll;padding: 0 30rpx;">
<view class="time-content" v-if="chooseTimeList&&chooseTimeList.length>0">
<!--库存大于零并且当前时间小于班次的开始时间才显示-->
<view class='time-list'
v-for="(item,index) of chooseTimeList"
:class="{on:active==index}"
@click="chooseTime(index)"
:key="index" v-if="item.last>0">
<view>
{{item.startPlanTime?item.startPlanTime.substr(0,5):""}}
<text v-if="item.endPlanTime">-</text>
{{item.endPlanTime?item.endPlanTime.substr(0,5):""}}
</view>
<view>
剩余:{{item.last}}
</view>
</view>
</view>
<view style="padding: 0.5rem 0rem;color: #FF0000;" v-else>
空空如也...
</view>
<view class="time-sure">
<text class="big-btn" @click="confirm()">确定</text>
</view>
</view>
<view style="padding: 0.5rem 0rem;color: #FF0000;" v-else>
空空如也...
</view>
<view class="time-sure">
<text class="big-btn" @click="confirm()">确定</text>
</view>
</view>
</u-popup>
</template>
<script>
export default {
props: ["chooseTimeList", "chooseTimeData", "timeActive"],
watch: {
timeActive: { //父组件选中的下标
handler(newValue, oldValue) {
if (newValue >= 0) {
this.active = newValue
}
},
deep: false,
immediate: false
},
},
data() {
return {
show: false, //控制该组件显示隐藏
active: 10000, //默认不选中
times: "", //时间
timeNumber: "", //当前时间转化为数字
}
},
methods: {
//---时间选择
chooseTime(i) {
this.active = i
this.times = this.chooseTimeList[i].startPlanTime
},
//---时间确认事件
confirm(date) {
this.show = false;
this.$emit("timeConfig", this.times)
},
},
mounted() {
let times = new Date().Format("yyyy-MM-dd hh:mm:ss")
this.timeNumber = parseInt(this.$commonjs.changeTime(times))
}
}
export default {
props: ['chooseTimeList', 'chooseTimeData', 'timeActive'],
watch: {
timeActive: { //父组件选中的下标
handler(newValue, oldValue) {
if (newValue >= 0) {
this.active = newValue
}
},
deep: false,
immediate: false
},
},
data() {
return {
showPop: false, //控制该组件显示隐藏
active: 10000, //默认不选中
times: '', //时间
timeNumber: '', //当前时间转化为数字
}
},
methods: {
//---时间选择
chooseTime(i) {
this.active = i
this.times = this.chooseTimeList[i].startPlanTime
},
//---时间确认事件
confirm(date) {
this.showPop = false
this.$emit('timeConfig', this.times)
},
},
mounted() {
let times = new Date().Format('yyyy-MM-dd hh:mm:ss')
this.timeNumber = parseInt(this.$commonjs.changeTime(times))
}
}
</script>
<style scoped="scoped">
.time {
padding:30rpx 20rpx 60rpx 20rpx;
text-align: center;
<style scoped="scoped" lang="scss">
.son-wrap {
position: relative;
height:65vh;
display: flex;
flex-direction:column;
}
.time-title{
font-size:32rpx;
font-weight: bolder;
text-align: center;
font-size: 32rpx;
font-weight: bold;
padding: 30rpx 24rpx;
border-radius: 20rpx 20rpx 0 0;
}
.time-content {
display: flex;
flex-wrap: wrap;
}
.time-list {
width: 30%;
height: 80rpx;
text-align: center;
width:30%;
height: 90rpx;
line-height: 30rpx;
color: #666666;
background: rgb(242, 242, 242);
border-radius: 16rpx;
margin-right: 5%;
margin-top: 30rpx;
}
.time-list view:first-child {
margin-top: 10rpx;
text-align: center;
margin-right:5%;
border-radius: 15rpx;
display: inline-block;
background:#f2f2f2;
position: relative;
padding-bottom: 8rpx;
}
.time-list view {
width: 100%;
text-align: center;
margin-top: 10rpx;
}
.time-content view:nth-child(3n) {
margin-right: 0;
}
.time-list.on {
background: none;
color: #3dbcff;
border: 1px solid #3dbcff;
box-sizing: border-box;
border: 1px solid $theme;
background: #DAE6F6;
}
.time-sure{
margin-top: 30rpx;
margin-top:60rpx;
text-align: center;
}
</style>
This diff is collapsed.
......@@ -12,74 +12,28 @@
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/*分割线颜色*/
$divider:#DBDBDB;
/*
1.页面背景颜色#f7f7f7
2.分隔线颜色#DBDBDB
3.正常字体颜色#333333
4.灰色字体颜色#666666或者#999999
5.主题颜色#3688FF
6.正常字体大小28rpx,偏小一点的24rpx
8.页面最外层与里面的第一层为padding:0 12px;
9.css单位为rpx
*/
/*主题颜色*/
$blue:#3688FF;
$theme:#3688FF;
/*红色*/
$red:#FC6703;
/*灰色*/
$grey:#999;
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$text-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:24rpx;
$uni-font-size-base:28rpx;
$uni-font-size-lg:32rpx;
/* 图片尺寸 */
$uni-img-size-sm:40rpx;
$uni-img-size-base:52rpx;
$uni-img-size-lg:80rpx;
/* Border Radius */
$uni-border-radius-sm: 4rpx;
$uni-border-radius-base: 6rpx;
$uni-border-radius-lg: 12rpx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 10px;
$uni-spacing-row-base: 20rpx;
$uni-spacing-row-lg: 30rpx;
/* 垂直间距 */
$uni-spacing-col-sm: 8rpx;
$uni-spacing-col-base: 16rpx;
$uni-spacing-col-lg: 24rpx;
// 分割线颜色
$divider:#f3f3f3;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40rpx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36rpx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30rpx;
\ No newline at end of file
......@@ -35,23 +35,23 @@
</template>
<script>
// #ifdef APP-NVUE
// nvue通过weex的dom模块引入字体,相关文档地址如下:
// https://weex.apache.org/zh/docs/modules/dom.html#addrule
const fontUrl = 'https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf'
const domModule = weex.requireModule('dom')
domModule.addRule('fontFace', {
'fontFamily': "uicon-iconfont",
'src': `url('${fontUrl}')`
})
// #endif
// 引入图标名称,已经对应的unicode
import icons from './icons'
// #ifdef APP-NVUE
// nvue通过weex的dom模块引入字体,相关文档地址如下:
// https://weex.apache.org/zh/docs/modules/dom.html#addrule
const fontUrl = 'https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf'
const domModule = weex.requireModule('dom')
domModule.addRule('fontFace', {
'fontFamily': 'uicon-iconfont',
'src': `url('${fontUrl}')`
})
// #endif
// 引入图标名称,已经对应的unicode
import icons from './icons'
import props from './props.js';;
import props from './props.js'
/**
/**
* icon 图标
* @description 基于字体的图标集,包含了大多数常见场景的图标。
* @tutorial https://www.uviewui.com/components/icon.html
......@@ -77,72 +77,72 @@
* @event {Function} touchstart 事件触摸时触发
* @example <u-icon name="photo" color="#2979ff" size="28"></u-icon>
*/
export default {
name: 'u-icon',
data() {
return {
}
},
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
computed: {
uClasses() {
let classes = []
classes.push(this.customPrefix + '-' + this.name)
// // uView的自定义图标类名为u-iconfont
// if (this.customPrefix == 'uicon') {
// classes.push('u-iconfont')
// } else {
// classes.push(this.customPrefix)
// }
// 主题色,通过类配置
if (this.color && uni.$u.config.type.includes(this.color)) classes.push('u-icon__icon--' + this.color)
// 阿里,头条,百度小程序通过数组绑定类名时,无法直接使用[a, b, c]的形式,否则无法识别
// 故需将其拆成一个字符串的形式,通过空格隔开各个类名
//#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU
classes = classes.join(' ')
//#endif
return classes
},
iconStyle() {
let style = {}
style = {
fontSize: uni.$u.addUnit(this.size),
lineHeight: uni.$u.addUnit(this.size),
fontWeight: this.bold ? 'bold' : 'normal',
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
top: uni.$u.addUnit(this.top)
}
// 非主题色值时,才当作颜色值
if (this.color && !uni.$u.config.type.includes(this.color)) style.color = this.color
return style
},
// 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
isImg() {
return this.name.indexOf('/') !== -1
},
imgStyle() {
let style = {}
// 如果设置width和height属性,则优先使用,否则使用size属性
style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size)
style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size)
return style
},
// 通过图标名,查找对应的图标
icon() {
// 如果内置的图标中找不到对应的图标,就直接返回name值,因为用户可能传入的是unicode代码
return icons['uicon-' + this.name] || this.name
}
},
methods: {
clickHandler(e) {
this.$emit('click', this.index)
// 是否阻止事件冒泡
this.stop && this.preventEvent(e)
}
}
}
export default {
name: 'u-icon',
data() {
return {
}
},
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
computed: {
uClasses() {
let classes = []
classes.push(this.customPrefix + '-' + this.name)
// // uView的自定义图标类名为u-iconfont
// if (this.customPrefix == 'uicon') {
// classes.push('u-iconfont')
// } else {
// classes.push(this.customPrefix)
// }
// 主题色,通过类配置
if (this.color && uni.$u.config.type.includes(this.color)) classes.push('u-icon__icon--' + this.color)
// 阿里,头条,百度小程序通过数组绑定类名时,无法直接使用[a, b, c]的形式,否则无法识别
// 故需将其拆成一个字符串的形式,通过空格隔开各个类名
//#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU
classes = classes.join(' ')
//#endif
return classes
},
iconStyle() {
let style = {}
style = {
fontSize: uni.$u.addUnit(this.size),
lineHeight: uni.$u.addUnit(this.size),
fontWeight: this.bold ? 'bold' : 'normal',
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
top: uni.$u.addUnit(this.top)
}
// 非主题色值时,才当作颜色值
if (this.color && !uni.$u.config.type.includes(this.color)) style.color = this.color
return style
},
// 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
isImg() {
return this.name.indexOf('/') !== -1
},
imgStyle() {
let style = {}
// 如果设置width和height属性,则优先使用,否则使用size属性
style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size)
style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size)
return style
},
// 通过图标名,查找对应的图标
icon() {
// 如果内置的图标中找不到对应的图标,就直接返回name值,因为用户可能传入的是unicode代码
return icons['uicon-' + this.name] || this.name
}
},
methods: {
clickHandler(e) {
this.$emit('click', this.index)
// 是否阻止事件冒泡
this.stop && this.preventEvent(e)
}
}
}
</script>
<style lang="scss" scoped>
......@@ -162,7 +162,6 @@
font-family: 'uicon-iconfont';
src: url('https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf') format('truetype');
}
/* #endif */
.u-icon {
......
This diff is collapsed.
This diff is collapsed.
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