From 7c0eaf011a06a3b5578fef0ae7b61c8c923e0c97 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期一, 28 十月 2024 11:23:54 +0800
Subject: [PATCH] 正式库配置
---
src/components/do/b1-ins-order/add.vue | 122 ++++++++++++++++------------------------
1 files changed, 50 insertions(+), 72 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index c235e47..4fbf10a 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -134,8 +134,8 @@
<div class="ins_order_add" style=" display: block; ">
<div v-show="!configShow&&!equipConfigShow&&!cableConfigShow">
<el-row class="title">
- <el-col :span="6" style="padding-left: 20px;text-align: left;">濮旀墭鍗曚俊鎭� 鎬讳环锛�<span
- style="color: #3A7BFA">锟{total}}</span></el-col>
+ <el-col :span="6" style="padding-left: 20px;text-align: left;">濮旀墭鍗曚俊鎭� 鍗曚綅鎴愭湰鎬讳环锛�<span
+ style="color: #3A7BFA">锟{total.toFixed(2)}}</span></el-col>
<el-col :span="18" style="text-align: right;">
<el-select v-model="template" size="medium" placeholder="涓嬪崟妯℃澘" style="margin-right: 10px;" v-show="active==1"
@change="selectInsOrderTemplateById">
@@ -148,10 +148,7 @@
<el-button size="medium" @click="templateDia=true" v-show="active==1">
<span style="color: #3A7BFA;">淇濆瓨妯℃澘</span>
</el-button>
- <el-button size="medium" type="primary" @click="openCableConfig"
- v-if="active==1&&PROJECT=='瑁呭鐢电紗'&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('鐢电紗')>-1">鐢电紗閰嶇疆</el-button>
<el-button size="medium" type="primary" @click="openEquipConfig" v-if="active==1">瀛愭牱鍝侀厤缃�</el-button>
- <el-button size="medium" type="primary" @click="openConfig" v-if="addObj.sampleType==='鍏夌紗'">鍏夌氦閰嶇疆</el-button>
<el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active==1">鎻愪氦</el-button>
<!-- 瀹℃牳 -->
<el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3&&addObj.companyId"
@@ -1536,7 +1533,13 @@
})
this.circulateShow = false
this.changeProductList0()
- this.currentMethod.insProduct = this.productList0
+ if(this.sampleSelectionList.length>0){
+ this.sampleSelectionList.forEach(item=>{
+ item.insProduct = this.productList0
+ })
+ }else{
+ this.currentMethod.insProduct = this.productList0
+ }
this.getProNum()
},
spliceTemperatureTest () {
@@ -1906,6 +1909,22 @@
// }
// }
let sampleList = this.HaveJson(this.sampleList)
+ for (let i = 0; i < sampleList.length; i++) {
+ if (sampleList[i].insProduct.length > 0) {
+ let set = new Set()
+ for (let j = 0; j < sampleList[i].insProduct.length; j++) {
+ if(sampleList[i].insProduct[j].state == 1){
+ let num0 = set.size
+ set.add(sampleList[i].insProduct[j].inspectionItem+'-'+sampleList[i].insProduct[j].inspectionItemSubclass)
+ let num1 = set.size
+ if(num0==num1){
+ this.$message.error(sampleList[i].insProduct[j].inspectionItem+'-'+sampleList[i].insProduct[j].inspectionItemSubclass+'閲嶅')
+ return
+ }
+ }
+ }
+ }
+ }
let projectNum = this.totalArr.filter(a => a.state == 1).length
if(projectNum==0){
this.$confirm('妫�楠岄」鐩负绌猴紝鏄惁纭鎻愪氦?', "鎻愮ず", {
@@ -1916,7 +1935,7 @@
this.saveMethod(sampleList)
}).catch(() => {})
}else{
- let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask.includes(b)) && a.state == 1)
+ let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask&&a.ask.includes(b)) && a.state == 1)
if (isRTS&&this.PROJECT=='妫�娴嬩腑蹇�') {
this.editTable = this.handleData(sampleList,this.containsValue, 0)
this.editTable.forEach(item => {
@@ -1978,7 +1997,6 @@
let min = Math.min(...splits)
let max = Math.max(...splits)
if(min==max){
- console.log(2222);
isTrue = false
}
//瑕佹眰鎻忚堪涓笉鍖呭惈卤浠ュ強鍖洪棿鐨勬暟瀛楋紝鍒欒繑鍥瀎alse
@@ -2075,7 +2093,7 @@
let arr = this.editTable.filter(b => b.sampleId == item.id)
for (var i=0;i<arr.length;i++){
if(a.ask){
- if(a.ask.includes(arr[i].symbolItem)){
+ if(a.ask&&a.ask.includes(arr[i].symbolItem)){
let ask = calBack(a.ask, arr[i].symbolItem,arr[i].value)
if (ask) {
a.ask = ask
@@ -2641,7 +2659,8 @@
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)
+ // console.log(row,this.productList)
+ let arr = this.productList.filter(m=>m.state==1&&m.bsmRow&&m.bsmRow.section==row.section&&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)
@@ -2729,7 +2748,13 @@
// }
this.changeProductList0()
- this.currentMethod.insProduct = this.productList0
+ if(this.sampleSelectionList.length>0){
+ this.sampleSelectionList.forEach(item=>{
+ item.insProduct = this.productList0
+ })
+ }else{
+ this.currentMethod.insProduct = this.productList0
+ }
this.getProNum()
},
searchProject () {
@@ -3087,7 +3112,13 @@
})
}
this.changeProductList0()
- this.currentMethod.insProduct = this.productList0
+ if(this.sampleSelectionList.length>0){
+ this.sampleSelectionList.forEach(item=>{
+ item.insProduct = this.productList0
+ })
+ }else{
+ this.currentMethod.insProduct = this.productList0
+ }
this.getProNum()
this.$nextTick(() => {
this.$refs.productTable.doLayout()
@@ -3133,36 +3164,6 @@
const property = column['property'];
return row[property] === value;
},
- openConfig() {
- 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.sampleIds = [this.sampleId]
- 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
- })
- }
- },
openEquipConfig() {
if (this.active === 1) {
if (this.sampleIds.length === 0) {
@@ -3170,35 +3171,6 @@
return
}
this.equipConfigShow = 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
- // })
- }
- },
- openCableConfig() {
- if (this.active === 1) {
- if (this.sampleIds.length === 0) {
- this.$message.error("鏈�夋嫨鏍峰搧")
- return
- }
- this.cableConfigShow = true
} else {
if (this.sampleId === null) {
this.$message.error('鏈�変腑鏍峰搧')
@@ -3267,7 +3239,13 @@
}
}
this.changeProductList0()
- this.currentMethod.insProduct = this.productList0
+ if(this.sampleSelectionList.length>0){
+ this.sampleSelectionList.forEach(item=>{
+ item.insProduct = this.productList0
+ })
+ }else{
+ this.currentMethod.insProduct = this.productList0
+ }
},
save1 () {
if (this.bsm1DiaList.length > 0) {
--
Gitblit v1.9.3