mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-09-20 20:02:02 +08:00
feat(afterSales): 调整日历组件与发货时间选择逻辑
- 将售后物流页日历改为单选模式,并支持点击遮罩关闭。 - 兼容发货时间确认回调的多种入参格式,选中后正确回写并关闭日历。
This commit is contained in:
@@ -62,7 +62,13 @@
|
||||
</up-form>
|
||||
<u-select mode="single-column" :list="companyList" v-model:show="companySelectShow"
|
||||
@confirm="companySelectConfirm"></u-select>
|
||||
<u-calendar v-model:show="timeshow" :mode="'date'" @change="onTimeChange"></u-calendar>
|
||||
<u-calendar
|
||||
:show="timeshow"
|
||||
mode="single"
|
||||
:closeOnClickOverlay="true"
|
||||
@confirm="onTimeConfirm"
|
||||
@close="timeshow = false"
|
||||
/>
|
||||
<u-toast ref="uToast"/>
|
||||
</view>
|
||||
</template>
|
||||
@@ -119,8 +125,10 @@ function fetchLogisticsList() {
|
||||
})
|
||||
}
|
||||
|
||||
function onTimeChange(e: { result: string }) {
|
||||
form.mDeliverTime = e.result
|
||||
function onTimeConfirm(e: string[] | { date?: string } | string) {
|
||||
const first = Array.isArray(e) ? e[0] : e
|
||||
form.mDeliverTime = typeof first === 'string' ? first : (first?.date || '')
|
||||
timeshow.value = false
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
Reference in New Issue
Block a user