Commit b1a97027 authored by ZJG's avatar ZJG

修改专车的滚动

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