From bc0e477594c5a916c014fb20dbb3797afd037ea0 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期六, 01 六月 2024 09:48:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/components/do/b1-ins-order/add.vue | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 52 insertions(+), 6 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 57c6158..0a927ab 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -374,7 +374,8 @@
<el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px">
<template slot-scope="scope">
<el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable type="textarea"
- :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" :readonly="active>1"></el-input>
+ :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" v-if="active==1&&isAskOnlyRead"></el-input>
+ <span v-else>{{ scope.row.ask }}</span>
</template>
</el-table-column>
</el-table>
@@ -540,7 +541,7 @@
</el-row>
</span>
</el-dialog>
- <fiberOpticConfig :currentId="currentId" v-if="configShow"/>
+ <fiberOpticConfig :currentId="currentId" v-if="configShow" :active="active"/>
</div>
</template>
@@ -672,6 +673,9 @@
filters: [],
formType: [],
configShow: false,
+ currentMethod: null,
+ isAskOnlyRead:false,
+ sampleId: null
}
},
watch: {
@@ -870,6 +874,7 @@
this.addObj.custom = selects.name
this.addObj.code = selects.code
this.addObj.phone = selects.phone
+ this.addObj.companyId = selects.departId
})
},
searchFilter() {
@@ -1052,6 +1057,18 @@
})
},
rowClick(row, column, event) {
+ this.currentMethod = row
+ let obj = this.methods.find(a=>a.id==this.currentMethod.standardMethodListId)
+ if(obj&&obj.code=='濮旀墭瑕佹眰'){
+ this.isAskOnlyRead = true
+ }else{
+ this.isAskOnlyRead = false
+ }
+ this.sampleId = row.id
+ if(this.active!==1){
+ this.sampleIds = []
+ this.sampleIds.push(row.id)
+ }
this.productList = row.insProduct
setTimeout(() => {
this.productList.forEach(a => {
@@ -1179,6 +1196,13 @@
},
methodChange(val, row) {
if(val===null||val==='')return
+ this.currentMethod = row
+ let obj = this.methods.find(a=>a.id==this.currentMethod.standardMethodListId)
+ if(obj&&obj.code=='濮旀墭瑕佹眰'){
+ this.isAskOnlyRead = true
+ }else{
+ this.isAskOnlyRead = false
+ }
this.getProductLoad = true
this.$axios.post(this.$api.standardTree.selectStandardProductList, {
model: row.model + '-' + row.modelNum,
@@ -1320,11 +1344,33 @@
return row[property] === value;
},
openConfig(){
- if(this.sampleIds.length===0){
- this.$message.error("鏈�夋嫨鏍峰搧")
- return
+ if(this.active===1){
+ if(this.sampleIds.length===0){
+ this.$message.error("鏈�夋嫨鏍峰搧")
+ return
+ }
+ this.configShow = true
+ }else{
+ if(this.sampleId === null){
+ this.$message.error('鏈�変腑鏍峰搧')
+ return
+ }
+ this.$axios.post(this.$api.insBushing.selectBushingBySampleId,{
+ sampleId: this.sampleId
+ }).then(res=>{
+ if(res.data.length===0){
+ this.$message.error('璇ユ牱鍝佹病鏈夐厤缃厜绾�')
+ return
+ }
+ for(var i in this.sampleList){
+ if(this.sampleList[i].id = this.sampleId){
+ this.sampleList[i].bushing = res.data
+ break
+ }
+ }
+ this.configShow = true
+ })
}
- this.configShow = true
}
}
}
--
Gitblit v1.9.3