| | |
| | | </button> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 添加搜索筛选区域 --> |
| | | <view class="filter-controls" style="margin-bottom: 5px;"> |
| | | <view class="dropdown-filter"> |
| | | <picker @change="onOptionsChange" :value="optionsIndex" :range="options"> |
| | | <view class="picker">{{options[optionsIndex]}}</view> |
| | | </picker> |
| | | </view> |
| | | <!-- 搜索框和按钮 --> |
| | | <view class="search-container"> |
| | | <input class="search-input" v-model="searchValue" :placeholder="'请输入'+options[optionsIndex]" |
| | | @confirm="handleSearch" /> |
| | | <button class="search-button" @click="handleSearch">搜索</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 头部信息 --> |
| | |
| | | searchValue: '', |
| | | userId: "", |
| | | uncheckedCount: 0, |
| | | checkedCount: 0 |
| | | checkedCount: 0, |
| | | optionsIndex: 0, // 新增:下拉选项索引 |
| | | options: ['项目', '线体', '工单号', '物料号', '物料名'] // 新增:搜索选项 |
| | | }; |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | // 新增:搜索选项改变事件 |
| | | onOptionsChange(e) { |
| | | this.optionsIndex = e.detail.value; |
| | | }, |
| | | |
| | | // 新增:搜索按钮点击事件 |
| | | handleSearch() { |
| | | this.pageIndex = 1; |
| | | this.data = []; |
| | | this.init(); |
| | | }, |
| | | |
| | | // Tab切换 |
| | | async switchTab(tabIndex) { |
| | | if (this.currentTab !== tabIndex) { |
| | |
| | | limit: this.limit, |
| | | statusUser: userName, |
| | | status: this.currentTab, // 0: 未提交, 1: 已提交 |
| | | searchValue: this.searchValue |
| | | searchValue: this.searchValue, |
| | | selectedIndex: this.optionsIndex // 新增:传递搜索选项索引 |
| | | } |
| | | }); |
| | | |