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