|
|
|
@ -8,7 +8,7 @@ |
|
|
|
|
<view class="item-left"> |
|
|
|
|
<view class="person-text">自取时间</view> |
|
|
|
|
<view class="area-text ss-flex ss-col-center"> |
|
|
|
|
<uni-datetime-picker v-model="state.zititime" type="daterange" @change="onChangeTime" :end="state.today"> |
|
|
|
|
<uni-datetime-picker v-model="state.selffetch_time" type="datetime" @change="onChangeTime" :end="state.today" style="z-index: 201;"> |
|
|
|
|
<button class="ss-reset-button date-btn"> |
|
|
|
|
<text>{{ !dateFilterText || dateFilterText.length === 0 ? '请选择自取时间' : dateFilterText }}</text> |
|
|
|
|
<text class="cicon-drop-down ss-seldate-icon"></text> |
|
|
|
@ -21,8 +21,10 @@ |
|
|
|
|
<view class="item-right-value"> |
|
|
|
|
<uni-easyinput |
|
|
|
|
placeholder="请输入预留电话" |
|
|
|
|
v-model="state.mobile" |
|
|
|
|
v-model="state.phone" |
|
|
|
|
:inputBorder="false" |
|
|
|
|
placeholderStyle="font-size:26rpx !important;line-height:normal;" |
|
|
|
|
@blur="onInput($event)" |
|
|
|
|
type="text"> |
|
|
|
|
</uni-easyinput> |
|
|
|
|
</view> |
|
|
|
@ -39,11 +41,7 @@ |
|
|
|
|
import { isEmpty } from 'lodash'; |
|
|
|
|
const userInfo = computed(() => sheep.$store('user').userInfo); |
|
|
|
|
const dateFilterText = computed(() => { |
|
|
|
|
if (state.zititime[0] === state.zititime[1]) { |
|
|
|
|
return state.zititime[0]; |
|
|
|
|
} else { |
|
|
|
|
return state.zititime.join('~'); |
|
|
|
|
} |
|
|
|
|
return state.selffetch_time; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
@ -54,21 +52,28 @@ |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const state = reactive({ |
|
|
|
|
zititime: [], |
|
|
|
|
selffetch_time: '', |
|
|
|
|
today: '', |
|
|
|
|
mobile: '', |
|
|
|
|
phone: '', |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function onChangeTime(e) { |
|
|
|
|
console.log(e, 'onChangeTime'); |
|
|
|
|
state.zititime[0] = e[0]; |
|
|
|
|
state.zititime[1] = e[e.length - 1]; |
|
|
|
|
state.selffetch_time = e; |
|
|
|
|
uni.$emit('zitiinfo', { |
|
|
|
|
selffetch_time: e, |
|
|
|
|
phone: state.phone, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function onInput(e) { |
|
|
|
|
uni.$emit('zitiinfo', { |
|
|
|
|
selffetch_time: state.selffetch_time, |
|
|
|
|
phone: e.target.value, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onLoad(async (options) => { |
|
|
|
|
state.today = dayjs().format('YYYY-MM-DD'); |
|
|
|
|
state.zititime = [state.today, state.today]; |
|
|
|
|
state.mobile = userInfo.mobile; |
|
|
|
|
state.phone = userInfo.mobile; |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
@ -148,8 +153,8 @@ |
|
|
|
|
background-color: $white; |
|
|
|
|
line-height: 54rpx; |
|
|
|
|
border-radius: 27rpx; |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
font-weight: 500; |
|
|
|
|
font-size: 26rpx; |
|
|
|
|
font-weight: 400; |
|
|
|
|
color: $dark-6; |
|
|
|
|
|
|
|
|
|
.ss-seldate-icon { |
|
|
|
|