From 771699a2a85aecde95a4393ef6016b28f73a551e Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 28 六月 2024 14:11:46 +0800
Subject: [PATCH] 检验任务bug修复
---
src/components/do/b1-ins-order/add.vue | 45 ++++++++++++++++++++++++++++++---------------
1 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 202f3b6..7e5745c 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -551,15 +551,15 @@
:before-close="beforeClose">
<div class="body" style="max-height: 60vh;">
<el-row v-if="bsm1">
- <el-col class="search_thing" :span="22">
+ <el-col class="search_thing" :span="22" style="height: initial;margin: 5px 0;">
<div class="search_label"><span class="required-span">* </span>閫夐」锛�</div>
<div class="search_input">
<el-radio-group v-model="bsm1Val" @input="upBsm1">
- <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a"></el-radio>
+ <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" style="margin-bottom: 2px;margin-top: 2px;"></el-radio>
</el-radio-group>
</div>
</el-col>
- <el-col class="search_thing" :span="22">
+ <el-col class="search_thing" :span="22" style="height: initial;margin: 5px 0;">
<div class="search_label">瑕佹眰鍊硷細</div>
<div class="search_input" v-show="bsm1Val!==null&&bsm1Val!==''">
<el-radio-group v-model="bsm1Val" @input="upBsm1">
@@ -914,14 +914,16 @@
this.selectUserDia = false
},
containsValue(str) {
- let symbolItem = ''
- this.symbolList.some(value =>{
- if(str.includes(value)){
- symbolItem = value
- return true
- }
- })
- return symbolItem
+ if(str){
+ let symbolItem = ''
+ this.symbolList.some(value =>{
+ if(str.includes(value)){
+ symbolItem = value
+ return true
+ }
+ })
+ return symbolItem
+ }
},
handleAsk(ask,symbolItem, value) {
try{
@@ -1001,6 +1003,9 @@
let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask.includes(b)) && a.state == 1)
if (isRTS) {
this.editTable = this.handleData(sampleList,this.containsValue, 0)
+ this.editTable.forEach(item => {
+ item.value = item.modelNum
+ })
this.bsm3Dia = true;
return
}
@@ -1009,8 +1014,12 @@
}
},
save0(){
- let sampleList = this.handleData(this.HaveJson(this.sampleList),this.handleAsk,1)
- this.saveMethod(sampleList)
+ if(this.editTable.every(m=>m.value)){
+ let sampleList = this.handleData(this.HaveJson(this.sampleList),this.handleAsk,1)
+ this.saveMethod(sampleList)
+ }else{
+ this.$message.error('璇峰~鍐欒瘑鍒鍊�')
+ }
},
handleData(sampleList,calBack,type){
let editTable = []
@@ -1020,6 +1029,7 @@
model:item.model,
symbolList:[],
sampleId:item.id,
+ modelNum:item.modelNum,
}
if (item.insProduct && item.insProduct.length > 0) {
item.insProduct.forEach(a => {
@@ -1188,6 +1198,7 @@
sampleId:a.sampleId,
value:null,
inspectionItemList:b.inspectionItemList,
+ modelNum:a.modelNum,
}
editTableNew.push(obj)
})
@@ -1206,6 +1217,7 @@
a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ?
'' : (
'-' + a.modelNum))
+ a.insProduct = a.insProduct.filter(b=>b.state === 1)
return a
})),
pairing: JSON.stringify(this.bsm2Val2)
@@ -1225,7 +1237,8 @@
this.saveLoad = true
this.$axios.post(this.$api.insOrder.upInsOrderOfState, {
state,
- id: this.currentId
+ id: this.currentId,
+ companyId:this.addObj.companyId
}, {
headers: {
'Content-Type': 'application/json'
@@ -1234,6 +1247,8 @@
this.saveLoad = false
if (res.code == 201) return
this.$message.success('鎻愪氦鎴愬姛')
+ // this.$parent.multipleSelection = [{id: this.currentId}]
+ // this.$parent.print()
// 濡傛灉绱ф�ョ▼搴︿负绱ф�ワ紝闇�瑕佺洿鎺ヤ笅鍙戜汉鍛�
// if (this.addObj.type == 2) {
// this.issuedDialogVisible = true;
@@ -1342,7 +1357,7 @@
}
},
selectStandardTreeList() {
- this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => {
+ this.$axios.get(this.$api.standardTree.selectStandardTreeList2).then(res => {
this.list = res.data
this.list.forEach(a => {
this.expandedKeys.push(a.label)
--
Gitblit v1.9.3