Commit b1a97027 authored by ZJG's avatar ZJG

修改专车的滚动

parent e1a851de
......@@ -59,7 +59,7 @@
}
.box-rili-item {
// width: 50px;无效
width: 50px;//无效
height: 50px;
border-radius: 10px;
font-size: 13px;
......@@ -330,11 +330,17 @@
</view>
<view class="box-rili">
<view class="box-rili-scroll">
<view class="box-rili-item" :class="{'box-rili-item2':msg.Q_Date == x.date}"
v-for="(x,y) in topdateList" :key='y' @click="choicedatelist(x)">
<span style='width: 50px;display: inline-block;text-align: center;'>{{x.showdate}}</span>
<span>{{x.week}}</span>
</view>
<scroll-view :scroll-x='true' style="width: 100%;" @scroll='getscroll' :scroll-left="scrollleft">
<view style="display: flex;align-items: center;">
<view class="box-rili-item" :class="{'box-rili-item2':msg.Q_Date == x.date}"
v-for="(x,y) in topdateList" :key='y' @click="choicedatelist(x)">
<span style='width: 50px;display: inline-block;text-align: center;'>{{x.showdate}}</span>
<span>{{x.week}}</span>
</view>
</view>
</scroll-view>
</view>
<view class="porili" @click="showcalendar = true">
<image
......@@ -565,6 +571,7 @@
StartDate:'',
EndDate:'',
},
scrollleft:0
}
......@@ -581,7 +588,9 @@
this.msg.ArriveCityType = this.carMsg.ArriveCityType;
this.msg.Q_Date = this.carMsg.Q_Date;
}
this.$nextTick(function() {
this.scrollleft = 0
});
this.mainColor = this.$uiConfig.mainColor;
this.gettimeList()
this.init();
......@@ -591,7 +600,10 @@
});
},
methods: {
methods: {
getscroll(e){
console.log(e.detail.scrollLeft)
},
yuding(x){
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
......@@ -625,7 +637,8 @@
let nowtime = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();
let htime = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate();
this.topdateList = this.getDayAll(nowtime, htime)
this.startDate = nowtime
this.startDate = nowtime;
this.getscollwz()
},
getDayAll(starDay, endDay) { //根据2个时间段获取之间的所有日期
......@@ -695,6 +708,26 @@
this.msg.pageIndex = 1;
this.g = [];
this.init()
this.getscollwz()
},
getscollwz(){//在日历上选择了列表上滚动
let index = 0
this.topdateList.map((x,i)=>{
if(x.date == this.msg.Q_Date){
index = i;
console.log(index)
return
}
})
if(index>3){
this.$nextTick(function() {
this.scrollleft = (index-2)*58
});
}else{
this.$nextTick(function() {
this.scrollleft = 0
});
}
},
getclose() {
this.showcalendar = false;
......
......@@ -304,12 +304,12 @@
<view class="box-c-caritem-l">付款方式</view>
<view class="box-c-caritem-r">{{OrderInfo.PaymentWayName}}</view>
</view>
<view class="box-c-caritem" >
<!-- <view class="box-c-caritem" >
<view class="box-c-caritem-l">应收</view>
<view class="box-c-caritem-r">{{OrderInfo.PreferPrice}}</view>
</view>
</view> -->
<view class="box-c-caritem" >
<view class="box-c-caritem-l">实收</view>
<view class="box-c-caritem-l">金额</view>
<view class="box-c-caritem-r"><span style='color:#F20707'>{{OrderInfo.Income}}</span></view>
</view>
</view>
......
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