配送增加时分选择

This commit is contained in:
TOP糯米 2023-03-22 22:21:17 +08:00
parent 84920310a8
commit 5413116392
1 changed files with 23 additions and 14 deletions

View File

@ -34,7 +34,18 @@
<picker mode="date" @change="bindDateChange" class="picker">
<text class="title">
<text class="limit-line clamp-1">
{{ datetime ? datetime : "选择期望取货时间" }}
{{ date ? date : "选择期望取货日期" }}
</text>
</text>
</picker>
<text class="iconfont icon-jinru more"></text>
</view>
<view class="widget-item">
<text class="iconfont icon-shijian icon"></text>
<picker mode="time" @change="bindTimeChange" class="picker">
<text class="title">
<text class="limit-line clamp-1">
{{ time ? time : "选择期望取货时间" }}
</text>
</text>
</picker>
@ -94,16 +105,7 @@ export default {
return {
utils: this.$utils,
pageConfig: {},
carTypeList: [
{
id: 1,
name: "营运",
},
{
id: 2,
name: "非营运",
},
],
carTypeList: [],
unitPrice: 0,
minDistance: 0,
carTypeId: 0,
@ -112,7 +114,8 @@ export default {
pickupAddressText: "",
unloadAddressId: 0,
unloadAddressText: "",
datetime: "",
date: "",
time: "",
distance: null,
content: "",
total: 0,
@ -176,7 +179,13 @@ export default {
* 选择日期
*/
bindDateChange(e) {
this.datetime = e.detail.value;
this.date = e.detail.value;
},
/**
* 选择时分
*/
bindTimeChange(e) {
this.time = e.detail.value;
},
/**
* 计算价格
@ -197,7 +206,7 @@ export default {
car: this.carTypeId,
address: this.pickupAddressId,
addressb: this.unloadAddressId,
starttime: this.datetime,
starttime: this.date + " " + this.time,
sendtime: 0,
distance: this.distance,
})