From 59e66a7f6137beecab6f82541cdd72452b4ea8a7 Mon Sep 17 00:00:00 2001 From: xiangxy Date: Thu, 7 Aug 2025 16:34:57 +0800 Subject: [PATCH] change --- pages/common/mater-list.vue | 10 +++++++++- pages/entry/mater-group.vue | 26 +++++++++++++------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/pages/common/mater-list.vue b/pages/common/mater-list.vue index e318ca3..ab2c207 100644 --- a/pages/common/mater-list.vue +++ b/pages/common/mater-list.vue @@ -80,7 +80,7 @@ }, onLoad (options) { this.title = options.title - // this.searchList() + this.searchList() }, methods: { handleBlur (e) { @@ -154,6 +154,14 @@ if (!this.checkedArr.length) { return } + let allValid = this.checkedArr.every(item => item.qty !== ''); + if (!allValid) { + uni.showToast({ + title: '数量必填', + icon: 'none' + }) + return + } this.$store.dispatch('setPublicArr', this.checkedArr) uni.navigateBack() } diff --git a/pages/entry/mater-group.vue b/pages/entry/mater-group.vue index daca5fd..186805c 100644 --- a/pages/entry/mater-group.vue +++ b/pages/entry/mater-group.vue @@ -44,8 +44,8 @@ {{e.material_name}} {{e.material_code}} - - + {{e.qty}} + {{e.pcsn}} @@ -155,17 +155,17 @@ this.disabled = false return } - let allValid = this.dataList.every(item => item.qty !== ''); - console.log(allValid, 666) - console.log(this.dataList, 666) - if (!allValid) { - uni.showToast({ - title: '数量必填', - icon: 'none' - }) - this.disabled = false - return - } + // let allValid = this.dataList.every(item => item.qty !== ''); + // console.log(allValid, 666) + // console.log(this.dataList, 666) + // if (!allValid) { + // uni.showToast({ + // title: '数量必填', + // icon: 'none' + // }) + // this.disabled = false + // return + // } try { let res = await groupPlate(this.dataList, this.val2, this.val1) if (res.code === '200') {