|
|
@@ -15,7 +15,7 @@
|
|
|
<input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
|
|
|
|
|
|
<view>
|
|
|
- <u-button @click="getList" type="success" size="small" class="u-reset-button" text="搜索">
|
|
|
+ <u-button @click="doSearch" type="success" size="small" class="u-reset-button" text="搜索">
|
|
|
</u-button>
|
|
|
</view>
|
|
|
|
|
|
@@ -23,7 +23,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="list_box">
|
|
|
- <u-list>
|
|
|
+ <u-list @scrolltolower="scrolltolower">
|
|
|
|
|
|
|
|
|
<checkbox-group v-for="(item, index) in list" :key="index" @change="e => selectVal(e, item, index)">
|
|
|
@@ -108,6 +108,8 @@
|
|
|
assetPage
|
|
|
} from '@/api/pda/workOrder.js'
|
|
|
import matterPop from './matterPop.vue'
|
|
|
+
|
|
|
+ let [isEnd] = [false]
|
|
|
export default {
|
|
|
components: {
|
|
|
baTreePicker,
|
|
|
@@ -121,6 +123,7 @@
|
|
|
classificationList: [],
|
|
|
treePickerShow: false,
|
|
|
list: [],
|
|
|
+ page: 1,
|
|
|
|
|
|
|
|
|
seletedAll: false, //全选状态
|
|
|
@@ -151,20 +154,20 @@
|
|
|
this.isType = option.isType
|
|
|
if (option.storageKey) {
|
|
|
this.storageKey = option.storageKey
|
|
|
-
|
|
|
-
|
|
|
- if(this.isType == 'feed') {
|
|
|
- let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
|
- this.memoList = [ ..._arr[0].modelList, ..._arr[0].equipmentList]
|
|
|
+
|
|
|
+
|
|
|
+ if (this.isType == 'feed') {
|
|
|
+ let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
|
+ this.memoList = [..._arr[0].modelList, ..._arr[0].equipmentList]
|
|
|
this.mattList = [..._arr[0].instanceList]
|
|
|
-
|
|
|
+
|
|
|
|
|
|
} else {
|
|
|
this.memoList = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
this.getTreeList()
|
|
|
@@ -234,16 +237,27 @@
|
|
|
},
|
|
|
|
|
|
|
|
|
+ doSearch() {
|
|
|
+ this.page = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+
|
|
|
+ scrolltolower() {
|
|
|
+ if (isEnd) return
|
|
|
+ this.page++
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
|
|
|
getList() {
|
|
|
let param = {
|
|
|
categoryLevelId: this.categoryLevelId,
|
|
|
keyWord: this.keyWord,
|
|
|
- pageNum: 1,
|
|
|
- size: -1,
|
|
|
+ pageNum: this.page,
|
|
|
+ size: 100,
|
|
|
|
|
|
}
|
|
|
- this.list = []
|
|
|
+ isEnd = false
|
|
|
+
|
|
|
if (this.isType == 'pick') {
|
|
|
param.dimension = 1
|
|
|
pageeLedgerMain(param).then(res => {
|
|
|
@@ -264,6 +278,9 @@
|
|
|
}
|
|
|
})
|
|
|
)
|
|
|
+
|
|
|
+ isEnd = this.list.length >= res.count
|
|
|
+
|
|
|
})
|
|
|
|
|
|
} else if (this.isType == 'feed') {
|
|
|
@@ -289,6 +306,8 @@
|
|
|
}
|
|
|
})
|
|
|
)
|
|
|
+
|
|
|
+ isEnd = this.list.length >= res.count
|
|
|
})
|
|
|
|
|
|
}
|