From 4bf09d8c719570e9c76c41fac368c339687685ae Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期三, 31 七月 2024 16:49:10 +0800
Subject: [PATCH] 检验下单页面勾选检验项目的时候,样品的待检项数量没有变化-回显
---
src/components/do/b1-ins-order/add.vue | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 6ca49cf..efadf12 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -428,9 +428,9 @@
<el-table-column prop="proNum" label="寰呮椤规暟閲�" width="105" align="center"></el-table-column>
</el-table>
<el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border
- @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect"
+ @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" :row-key="rowKey"
:row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll">
- <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column>
+ <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1" :reserve-selection="true"></el-table-column>
<el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip>
<template slot="header" slot-scope="scope">
<div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
@@ -1073,7 +1073,8 @@
temperatureTestNum: '',
isShowInput: false,
temId: '',
- sonLaboratoryList:[]
+ sonLaboratoryList:[],
+ selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃
}
},
watch: {
@@ -2030,6 +2031,9 @@
})
this.$refs.sampleTable.doLayout()
},
+ rowKey (row) {
+ return row.id;
+ },
selectProduct(val) {
this.productListSelected = val
this.productIds = []
@@ -2063,15 +2067,35 @@
upProductSelect(selection, row) {
this.bsm1DiaList = []
row.state = row.state == 1 ? 0 : 1
- if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) {
+ if(row.section === null) {
+ row.section = ""
+ }
+ 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