This commit is contained in:
2025-09-08 09:47:21 +08:00
parent dd60d1bb24
commit 4144492ad3
3 changed files with 7 additions and 42 deletions

View File

@@ -93,16 +93,6 @@
currentData: {},
options: [],
index: '',
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10,
disabled: false
};
},
@@ -116,6 +106,7 @@
this.dataList.map((item) => {
if (this.pkObj.mid === item.mid) {
item.material_name = this.currentData.material_name
item.material_code = this.currentData.material_code
item.measure_unit_id = this.currentData.measure_unit_id
}
})
@@ -242,38 +233,6 @@
this.dataList = []
this.disabled = false
},
searchList () {
this.dataList = []
this.pageNum = 1
this._selectMaterials()
},
async _selectMaterials () {
let res = await selectMaterials(this.val1)
this.dataList = res.data
// this.totalCount = res.totalElements
// if (res.totalElements > 0) {
// const dataMap = res.data
// this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
// this.reload = false
// } else {
// this.dataList = []
// }
// if (this.totalCount == this.dataList.length) {
// this.reload = false
// this.status = 'noMore'
// }
},
onReachBottom () {
if (this.totalCount > this.dataList.length) {
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._selectMaterials()
}, 1000)
} else { //停止加载
this.status = 'noMore'
}
},
async _blanking () {
this.disabled = true
if (!this.val1 || !this.dataList.length || !this.index) {