选择物料

This commit is contained in:
2023-07-18 09:45:35 +08:00
parent 838ada4408
commit b04bb88782
2 changed files with 17 additions and 11 deletions

View File

@@ -97,6 +97,7 @@ export default {
next() next()
}, },
activated () { activated () {
console.log(this.$store.getters.materObj, 666)
if (this.$store.getters.materObj !== '') { if (this.$store.getters.materObj !== '') {
this.material_spec = JSON.parse(this.$store.getters.materObj).material_spec this.material_spec = JSON.parse(this.$store.getters.materObj).material_spec
this.material_code = JSON.parse(this.$store.getters.materObj).material_code this.material_code = JSON.parse(this.$store.getters.materObj).material_code

View File

@@ -49,6 +49,7 @@ export default {
dataList: [], dataList: [],
pkId: '', pkId: '',
pkObj: {}, pkObj: {},
// pkObj: {material_spec: '规格01', material_code: 'A01', material_name: '物料01'},
page: 1, page: 1,
size: '22', size: '22',
busy: false, busy: false,
@@ -65,23 +66,27 @@ export default {
this.busy = false this.busy = false
this.desc = '' this.desc = ''
let res = await washmaterialList(this.page + '', this.size, this.val1) let res = await washmaterialList(this.page + '', this.size, this.val1)
this.dataList = [] if (res.code === 200) {
this.dataList = [...res.content] this.dataList = []
if (res.content.length < 22) { this.dataList = [...res.content]
this.busy = true if (res.content.length < 22) {
this.desc = '已加载全部数据' this.busy = true
this.desc = '已加载全部数据'
}
} }
}, },
async loadMore () { async loadMore () {
this.busy = true this.busy = true
this.page++ this.page++
let res = await washmaterialList(this.page + '', this.size, this.val1) let res = await washmaterialList(this.page + '', this.size, this.val1)
this.dataList = [...this.dataList, ...res.content] if (res.code === 200) {
if (res.content.length < 22) { this.dataList = [...this.dataList, ...res.content]
this.busy = true if (res.content.length < 22) {
this.desc = '已加载全部数据' this.busy = true
} else { this.desc = '已加载全部数据'
this.busy = false } else {
this.busy = false
}
} }
}, },
colseUp () { colseUp () {