Commit 098abee70f0bea915a12ddc947848531fb433353

Authored by 史婷婷
1 parent 044f43fe

feat:订货单-筛选-日期、办事处交互优化

Showing 1 changed file with 9 additions and 2 deletions
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 <view class="form-item"> 43 <view class="form-item">
44 <view class="label">办事处</view> 44 <view class="label">办事处</view>
45 <uni-easyinput v-model="model.deptName" placeholder="请输入办事处" :inputBorder="false" 45 <uni-easyinput v-model="model.deptName" placeholder="请输入办事处" :inputBorder="false"
46 - placeholderStyle="font-size:14px" /> 46 + placeholderStyle="font-size:14px" @input="onDeptNameInput" />
47 </view> 47 </view>
48 48
49 <view class="form-item"> 49 <view class="form-item">
@@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
66 66
67 <view class="form-item"> 67 <view class="form-item">
68 <view class="label">订货日期</view> 68 <view class="label">订货日期</view>
69 - <uni-datetime-picker type="daterange" v-model="model.dateRange" start="2023-01-01" /> 69 + <uni-datetime-picker type="daterange" v-model="model.dateRange" start="2023-01-01" @change="onDateChange($event, model)" />
70 </view> 70 </view>
71 </view> 71 </view>
72 </template> 72 </template>
@@ -215,6 +215,13 @@ export default { @@ -215,6 +215,13 @@ export default {
215 type: this.tabValue || '' 215 type: this.tabValue || ''
216 } 216 }
217 }, 217 },
  218 + onDateChange(e, model) {
  219 + // 确保同步更新 filterForm,避免数据不同步
  220 + this.filterForm.dateRange = e
  221 + },
  222 + onDeptNameInput(val) {
  223 + this.filterForm.deptName = val
  224 + },
218 onLoaded({ items }) { this.currentItems = items || [] }, 225 onLoaded({ items }) { this.currentItems = items || [] },
219 onError() { uni.showToast({ title: '列表加载失败', icon: 'none' }) }, 226 onError() { uni.showToast({ title: '列表加载失败', icon: 'none' }) },
220 fetchList({ pageIndex, pageSize, query, extra }) { 227 fetchList({ pageIndex, pageSize, query, extra }) {