From 000baa046586568ec93f86bc61f087594750bcaf Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期三, 12 六月 2024 07:18:24 +0800 Subject: [PATCH] 小功能修复 --- src/components/do/b1-ins-order/add.vue | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 210ac64..7400a9b 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -1119,6 +1119,7 @@ addStandardTree() { if (this.selectTree == null) return this.sampleList = [] + this.productList = [] for (var i = 0; i < this.addObj.sampleNum; i++) { this.sample.joinName = null this.sample.joinModel = null @@ -1201,8 +1202,13 @@ this.computationalPairing(this.sampleList.length) this.bsm2Val2 = this.HaveJson(this.bsm2Val3) } - } else if (row.bsm === '1' && row.inspectionItem === '鐔旀帴鎹熻��' && row.state === 1) { + } else if (row.bsm === '1' && row.inspectionItem === '鐔旀帴鎹熻��' && row.state === 1 && this.sampleList.length > 1) { this.bsm2 = false + } else if(row.bsm === '1' && row.inspectionItem === '鐔旀帴鎹熻��' && this.sampleList.length < 2){ + this.$message.error('鏍峰搧鏁伴噺涓嶈冻澶熻繘琛岄厤瀵规搷浣�') + row.state = row.state == 1 ? 0 : 1 + this.$refs.productTable.toggleRowSelection(row, false) + return } this.sampleList.map(item => { if (this.sampleIds.indexOf(item.id) > -1) { @@ -1445,8 +1451,12 @@ this.computationalPairing(this.sampleList.length) this.bsm2Val2 = this.HaveJson(this.bsm2Val3) } - } else if (p.bsm === '1' && p.inspectionItem === '鐔旀帴鎹熻��' && p.state === 1) { + } else if (p.bsm === '1' && p.inspectionItem === '鐔旀帴鎹熻��' && p.state === 1 && this.sampleList.length > 1) { this.bsm2 = false + } else if(p.bsm === '1' && p.inspectionItem === '鐔旀帴鎹熻��' && this.sampleList.length < 2){ + this.$message.error('鏍峰搧鏁伴噺涓嶈冻澶熻繘琛岄厤瀵规搷浣�') + this.$refs.productTable.clearSelection() + return } }) if (e.length > 0) { -- Gitblit v1.9.3