From 681d1c2c07bc393ed43334e80c0441a16997e070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Fri, 9 Aug 2024 15:01:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=80=97=E6=9D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/invoicing/components/consumableList.vue | 9 +++++++-- src/views/invoicing/components/shopList.vue | 6 ++++-- src/views/invoicing/operation_in.vue | 2 ++ src/views/invoicing/operation_out.vue | 2 ++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/views/invoicing/components/consumableList.vue b/src/views/invoicing/components/consumableList.vue index 90ac2b6..7560558 100644 --- a/src/views/invoicing/components/consumableList.vue +++ b/src/views/invoicing/components/consumableList.vue @@ -97,11 +97,16 @@ export default { this.$refs.table.toggleRowSelection(del_row, false); } }, + // 确定选商品 confirmHandle() { // let res = this.$refs.table.selection - let res = this.stayselection - this.$emit('success', res) + // let res = this.stayselection + // this.$emit('success', res) + var uniqueArray = this.stayselection.filter(item1 => + !this.goods.some(item2 => item2.productId == item1.id) + ); + this.$emit('success', uniqueArray) this.close() }, // 重置查询 diff --git a/src/views/invoicing/components/shopList.vue b/src/views/invoicing/components/shopList.vue index 2d551ce..7b057f1 100644 --- a/src/views/invoicing/components/shopList.vue +++ b/src/views/invoicing/components/shopList.vue @@ -112,8 +112,10 @@ export default { // 确定选商品 confirmHandle() { // let res = this.$refs.table.selection - let res = this.stayselection - this.$emit('success', res) + var uniqueArray = this.stayselection.filter(item1 => + !this.goods.some(item2 => item2.productId == item1.id) + ); + this.$emit('success', uniqueArray) this.close() }, // 是否单选 diff --git a/src/views/invoicing/operation_in.vue b/src/views/invoicing/operation_in.vue index 936495d..e08ed0e 100644 --- a/src/views/invoicing/operation_in.vue +++ b/src/views/invoicing/operation_in.vue @@ -385,6 +385,8 @@ export default { this.shopTypesActive = type == 'in' ? 0 : 1 this.inTabValue = value this.resetHandle() + this.$refs.shopList.clearSelection()//清除选项 + this.$refs.ConsumableList.clearSelection()//清除选项 }, // 计算耗材总价 consCountTotal(cvalue, row, key1, key2 = undefined) { diff --git a/src/views/invoicing/operation_out.vue b/src/views/invoicing/operation_out.vue index df8e83a..266f375 100644 --- a/src/views/invoicing/operation_out.vue +++ b/src/views/invoicing/operation_out.vue @@ -350,6 +350,8 @@ export default { this.shopTypesActive = 1 this.resetHandle() this.queryForm.type = type + this.$refs.shopList.clearSelection()//清除选项 + this.$refs.ConsumableList.clearSelection()//清除选项 }, //删除计算 spliceclick() {