From f1b825f0afe70723dd7375cf7cdbef768938e13d Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期一, 05 八月 2024 20:26:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/components/do/b1-ins-order/add.vue | 39 +++++++++++++++++++++++++++++----------
1 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 69407e2..77a6e60 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -429,9 +429,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" :row-key="rowKey"
+ @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect"
:row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll">
- <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1" :reserve-selection="true"></el-table-column>
+ <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column>
<el-table-column prop="inspectionItemClass" v-if="PROJECT === '瑁呭鐢电紗'" label="妫�楠岄」鍒嗙被" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="inspectionItemClassEn" v-if="PROJECT === '瑁呭鐢电紗'" label="妫�楠岄」鍒嗙被(EN)" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip>
@@ -783,7 +783,7 @@
prop="value"
label="璇嗗埆绗﹀��">
<template slot-scope="scope">
- <el-input v-model="scope.row.value" placeholder="璇疯緭鍏�" size="small"></el-input>
+ <el-input v-model="scope.row.value" placeholder="璇疯緭鍏�" @input="inputValueHandler(scope.row,scope.$index)" size="small"></el-input>
</template>
</el-table-column>
</el-table>
@@ -929,6 +929,7 @@
},
data() {
return {
+ sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁
editTable:[],
template: null,
templates: [],
@@ -1172,6 +1173,21 @@
}
},
methods: {
+ //鐗规畩鍊煎~鍐欏鐞�
+ inputValueHandler(row,index){
+ if(row){
+ const nextIndex = index+1
+ for (let i = nextIndex; i < this.editTable.length; i++) {
+ const element = this.editTable[i];
+ if(element.model==row.model){
+ this.editTable[i].value = row.value
+ }else{
+ break;
+ }
+ }
+ }
+
+ },
spliceData () {
if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) {
this.$message.error('璇峰~鍐欏畬鏁存暟鎹�')
@@ -1848,7 +1864,8 @@
state,
id: this.currentId,
companyId:this.addObj.companyId,
- laboratory:this.addObj.laboratory
+ laboratory:this.addObj.laboratory,
+ company: this.addObj.company
}, {
headers: {
'Content-Type': 'application/json'
@@ -1938,8 +1955,8 @@
})
},
getProNum() {
- this.sampleList.forEach((m, i) => {
- Vue.set(this.sampleList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
+ this.sampleSelectionList.forEach((m, i) => {
+ Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
})
this.$refs.sampleTable.doLayout()
},
@@ -2072,6 +2089,7 @@
val.forEach(a => {
this.sampleIds.push(a.id)
})
+ this.sampleSelectionList = val
},
delSample() {
this.sampleIds.forEach(a => {
@@ -2085,9 +2103,6 @@
})
this.$refs.sampleTable.doLayout()
},
- rowKey (row) {
- return row.id;
- },
selectProduct(val) {
this.productListSelected = val
this.productIds = []
@@ -2106,7 +2121,11 @@
this.sampleId = row.id
if (this.active !== 1) {
this.sampleIds = []
- this.sampleIds.push(row.id)
+ this.sampleSelectionList.forEach(ele=>{
+ if(ele.id == row.id){
+ this.sampleIds.push(row.id)
+ }
+ })
}
this.productList = row.insProduct
this.productList0 = JSON.parse(JSON.stringify(this.productList))
--
Gitblit v1.9.3