Commit a99f36c31686ea07337ff23a1a1b5d78dc517e12

Authored by 史婷婷
1 parent ffdab129

feat: 客户开发-筛选-日期交互优化

Showing 1 changed file with 8 additions and 2 deletions
@@ -84,7 +84,8 @@ @@ -84,7 +84,8 @@
84 </view> 84 </view>
85 <view class="form-item"> 85 <view class="form-item">
86 <view class="label">创建时间</view> 86 <view class="label">创建时间</view>
87 - <uni-datetime-picker type="daterange" v-model="model.dateRange" start="2023-01-01" /> 87 + <uni-datetime-picker type="daterange" :value="model.dateRange" start="2023-01-01"
  88 + @change="onDateChange($event, model)" />
88 </view> 89 </view>
89 </view> 90 </view>
90 </template> 91 </template>
@@ -299,11 +300,16 @@ @@ -299,11 +300,16 @@
299 this.officeSelectVisible = true 300 this.officeSelectVisible = true
300 }, 301 },
301 onOfficeConfirm(payload) { 302 onOfficeConfirm(payload) {
  303 + console.log('onOfficeConfirm__this.filterForm', this.filterForm)
302 const val = payload && payload.value != null ? payload.value : '' 304 const val = payload && payload.value != null ? payload.value : ''
303 const label = payload && payload.label != null ? payload.label : '' 305 const label = payload && payload.label != null ? payload.label : ''
304 this.filterForm.officeId = val 306 this.filterForm.officeId = val
305 this.filterForm.officeName = label 307 this.filterForm.officeName = label
306 }, 308 },
  309 + onDateChange(e, model) {
  310 + // 确保同步更新 filterForm,避免数据不同步
  311 + this.filterForm.dateRange = e
  312 + },
307 toggleBatch() { 313 toggleBatch() {
308 this.batchMode = !this.batchMode 314 this.batchMode = !this.batchMode
309 if (!this.batchMode) this.selectedKeys = [] 315 if (!this.batchMode) this.selectedKeys = []
@@ -456,7 +462,7 @@ @@ -456,7 +462,7 @@
456 const query = '?id=' + encodeURIComponent(id) + '&todoType=' + encodeURIComponent(this.todoType || '') 462 const query = '?id=' + encodeURIComponent(id) + '&todoType=' + encodeURIComponent(this.todoType || '')
457 uni.navigateTo({ url: '/pages/dev_manage/detail' + query }) 463 uni.navigateTo({ url: '/pages/dev_manage/detail' + query })
458 }, 464 },
459 - 465 +
460 } 466 }
461 } 467 }
462 </script> 468 </script>