This commit is contained in:
2025-08-07 14:21:35 +08:00
parent 5a8f25b428
commit 0afe526283
3 changed files with 84 additions and 21 deletions

View File

@@ -61,7 +61,7 @@
title: '',
val1: '',
dataList: [],
// dataList: [{material_name: 'name1', checked: false, qty:1, pcsn:'p001'},{material_name: 'name2', checked: false},{material_name: 'name3', checked: false}],
// dataList: [{material_id: 'n1', material_name: 'name1', checked: false, qty:1, pcsn:'p001'},{material_id: 'n2', material_name: 'name2', qty:2, checked: false},{material_id: 'n3', material_name: 'name3', qty:1, checked: false}],
pkId: '',
pkObj: {},
allCheck: false,
@@ -92,10 +92,10 @@
e.qty = e.qty.replace(/^0+/, '') || '0'
}
} else {
uni.showToast({
title: '数量必填',
icon: 'none'
})
// uni.showToast({
// title: '数量必填',
// icon: 'none'
// })
}
},
searchList () {
@@ -154,16 +154,8 @@
if (!this.checkedArr.length) {
return
}
const allValid = this.checkedArr.every(item => item.qty !== '');
if (allValid) {
this.$store.dispatch('setPublicArr', this.checkedArr)
uni.navigateBack()
} else {
uni.showToast({
title: '数量必填',
icon: 'none'
})
}
this.$store.dispatch('setPublicArr', this.checkedArr)
uni.navigateBack()
}
}
}