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: {}, currentData: {},
options: [], options: [],
index: '', index: '',
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10,
disabled: false disabled: false
}; };
}, },
@@ -116,6 +106,7 @@
this.dataList.map((item) => { this.dataList.map((item) => {
if (this.pkObj.mid === item.mid) { if (this.pkObj.mid === item.mid) {
item.material_name = this.currentData.material_name item.material_name = this.currentData.material_name
item.material_code = this.currentData.material_code
item.measure_unit_id = this.currentData.measure_unit_id item.measure_unit_id = this.currentData.measure_unit_id
} }
}) })
@@ -242,38 +233,6 @@
this.dataList = [] this.dataList = []
this.disabled = false 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 () { async _blanking () {
this.disabled = true this.disabled = true
if (!this.val1 || !this.dataList.length || !this.index) { if (!this.val1 || !this.dataList.length || !this.index) {

View File

@@ -107,6 +107,7 @@
this.dataList.map((item) => { this.dataList.map((item) => {
if (this.pkObj.mid === item.mid) { if (this.pkObj.mid === item.mid) {
item.material_name = this.currentData.material_name item.material_name = this.currentData.material_name
item.material_code = this.currentData.material_code
item.measure_unit_id = this.currentData.measure_unit_id item.measure_unit_id = this.currentData.measure_unit_id
} }
}) })

View File

@@ -41,6 +41,11 @@ export const loading = (pcode, rcode, mcode, num) => request({
}) })
// 产线下料 // 产线下料
// 1.1查询物料信息
export const selectMaterials = (blurry, page, size) => request({
url:'api/hand/selectMaterials',
data: {blurry: blurry, page: page, size: size}
})
// 1.2查询所有区域 // 1.2查询所有区域
export const getRegions = () => request({ export const getRegions = () => request({
url:'api/hand/getRegions', url:'api/hand/getRegions',