| | |
| | | <template> |
| | | <u-popup :show="show" :round="10" closeable @close="show = false"> |
| | | <view class="material-content bbox p30 rp"> |
| | | <view class="tc b f24 c2 mb20">选择物料</view> |
| | | <view class="tc b f32 c2 mb20">选择物料</view> |
| | | <v-Search @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="搜索物料名称/编码" /> |
| | | <div class="content_total">共{{form.total}}条数据</div> |
| | | <view class="scroll-content"> |
| | | <!-- refresher-enabled="true" |
| | | :refresher-triggered="refreshing" |
| | | @refresherrefresh="onRefresh" --> |
| | | <scroll-view |
| | | scroll-y="true" |
| | | @scrolltolower="loadMore"> |
| | | <view v-for="(item1, index) in list" :key="index" class="flex mb20" @click="jump(index)"> |
| | | <view class="img36 mr20 pt10"> |
| | | <u-checkbox-group style="display: block;" name=""> |
| | | <view class="img36 mr20 pt10" style="position: relative;"> |
| | | <u-checkbox-group style="display: block;" name="" @change="jump(index)"> |
| | | <u-checkbox :checked="item1.isActive"></u-checkbox> |
| | | </u-checkbox-group> |
| | | <view style="width: 18px; height: 18px; position: absolute; top: 0; left: 0; z-index: 99;"></view> |
| | | </view> |
| | | <view class="fx1"> |
| | | <div class="page_content_title_top"> |
| | |
| | | item.isActive = !item.isActive |
| | | } |
| | | }) |
| | | for (let i = 0; i < this.list.length; i++) { |
| | | if (!this.list[i].isActive) { |
| | | this.isAll = [] |
| | | return |
| | | } |
| | | } |
| | | this.isAll = ['all'] |
| | | }, |
| | | // 搜索提交 |
| | | submit() { |
| | | this.form.page = 0 |
| | | this.finished = false |
| | | this.list = [] |
| | | this.onLoad() |
| | | this.loadData() |
| | | }, |
| | | // 搜索框 |
| | | searchInput(data) { |
| | |
| | | this.finished = false |
| | | this.list = [] |
| | | this.form.smodelLabel = data |
| | | this.onLoad() |
| | | this.loadData() |
| | | }, |
| | | loadData() { |
| | | if (!this.finished) { |
| | |
| | | model: { |
| | | warehouseId: this.warehouseId, |
| | | warehouseQualityType: this.warehouseQualityType, |
| | | ids: this.selected.length > 0 ? this.selected.join(',') : '' |
| | | ids: this.selected.length > 0 ? this.selected.join(',') : '', |
| | | materialName: this.form.smodelLabel |
| | | } |
| | | }).then(res => { |
| | | if (this.refreshing) { |
| | |
| | | this.loadData() |
| | | }, |
| | | selectAll(e) { |
| | | console.log(e) |
| | | console.log(this.isAll) |
| | | this.list.forEach(element => { |
| | | element.isActive = e.length > 0 ? true : false |
| | | }) |