Commit 098abee70f0bea915a12ddc947848531fb433353

Authored by 史婷婷
1 parent 044f43fe

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

Showing 1 changed file with 9 additions and 2 deletions
... ... @@ -43,7 +43,7 @@
43 43 <view class="form-item">
44 44 <view class="label">办事处</view>
45 45 <uni-easyinput v-model="model.deptName" placeholder="请输入办事处" :inputBorder="false"
46   - placeholderStyle="font-size:14px" />
  46 + placeholderStyle="font-size:14px" @input="onDeptNameInput" />
47 47 </view>
48 48
49 49 <view class="form-item">
... ... @@ -66,7 +66,7 @@
66 66
67 67 <view class="form-item">
68 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 70 </view>
71 71 </view>
72 72 </template>
... ... @@ -215,6 +215,13 @@ export default {
215 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 225 onLoaded({ items }) { this.currentItems = items || [] },
219 226 onError() { uni.showToast({ title: '列表加载失败', icon: 'none' }) },
220 227 fetchList({ pageIndex, pageSize, query, extra }) {
... ...