From 5b4acf22b23079c1f689e217f55780f864ac79c6 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期二, 06 八月 2024 10:38:28 +0800 Subject: [PATCH] 完成定时更新 --- src/components/do/b1-ins-order/add.vue | 41 +++++++++++++++++++++++++++++++++++------ 1 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 82d2257..83edca8 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -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('璇峰~鍐欏畬鏁存暟鎹�') @@ -1556,10 +1572,19 @@ isHaveBushing = false } }) + console.log('isHaveBushing===', this.totalArr) + // inspectionItem + let spcialItem = this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('鏉惧绠�')) // console.log('isHaveBushing===', isHaveBushing) if (productListSelected && select[2] === '鍏夌紗' && isHaveBushing === false) { this.$message.error('鍏夌紗娓╁害寰幆椤圭洰蹇呴』杩涜鍏夌氦閰嶇疆') - + this.$refs.sampleTable.setCurrentRow(this.currentMethod, true) + this.rowClick(this.currentMethod) + this.sampleIds = [this.currentMethod.id] + this.openConfig() + return + }else if(spcialItem&& isHaveBushing === false){ + this.$message.error('鏉惧绠¢」鐩繀椤昏繘琛屽厜绾ら厤缃�') this.$refs.sampleTable.setCurrentRow(this.currentMethod, true) this.rowClick(this.currentMethod) this.sampleIds = [this.currentMethod.id] @@ -1805,7 +1830,6 @@ }, saveMethod(sampleList){ this.saveLoad = true - console.log(333333,sampleList) this.$axios.post(this.$api.insOrder.addInsOrder, { str: JSON.stringify({ insOrder: this.addObj, @@ -1939,8 +1963,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() }, @@ -2073,6 +2097,7 @@ val.forEach(a => { this.sampleIds.push(a.id) }) + this.sampleSelectionList = val }, delSample() { this.sampleIds.forEach(a => { @@ -2104,7 +2129,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