From cadcd82dce38da5f999b77af9a2cdf4a35324e01 Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期三, 31 七月 2024 13:42:22 +0800
Subject: [PATCH] 检测中心-表格排序修改
---
src/components/do/b1-ins-order/add.vue | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 6ca49cf..10b3d7f 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -2063,15 +2063,32 @@
upProductSelect(selection, row) {
this.bsm1DiaList = []
row.state = row.state == 1 ? 0 : 1
- if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) {
+ let arr = this.productList.filter(m=>m.state==1&&row.section.includes(m.section)&&m.ask&&m.section.indexOf('[')==-1)
+ if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1&&arr.length==0) {
if (row.section.indexOf('[') > -1) {
row.bsmRow = this.HaveJson(row)
}
row.bsm1 = true
this.bsm1DiaList.push(row)
this.bsm1DiaAll = true
- } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) {
+ } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0&&arr.length==0) {
row.bsm1 = false
+ }else if(arr.length>0){
+ try{
+ row.bsmRow = this.HaveJson(row)
+ let section = arr[0].section
+ let arr0 = JSON.parse(row.section)
+ let arr1 = JSON.parse(row.ask)
+ let arr2 = JSON.parse(row.manHour)
+ let arr3 = JSON.parse(row.price)
+ let arr4 = JSON.parse(row.tell)
+ let index = arr0.indexOf(section)
+ row.section = section
+ row.ask = arr1[index]
+ row.manHour = arr2[index]
+ row.price = arr3[index]
+ row.tell = arr4[index]
+ } catch(e) {}
}
if (row.bsm === '1' && row.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && this.sampleList.length > 1 && row.state === 1&&!this.isBsm2Val2) {
this.bsm2 = true
--
Gitblit v1.9.3