From 9f6cfe14a2f4a296d531dbbc043d0d0fb7b5b2ae Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期四, 24 十月 2024 10:04:54 +0800 Subject: [PATCH] 检验下单多个样品bug --- src/components/do/b1-ins-order/add.vue | 95 ++++++++++++++--------------------------------- src/main.js | 4 +- src/components/view/b1-inspect-order-plan.vue | 2 3 files changed, 31 insertions(+), 70 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 42a7626..4fbf10a 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -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 () { @@ -1994,7 +1997,6 @@ let min = Math.min(...splits) let max = Math.max(...splits) if(min==max){ - console.log(2222); isTrue = false } //瑕佹眰鎻忚堪涓笉鍖呭惈卤浠ュ強鍖洪棿鐨勬暟瀛楋紝鍒欒繑鍥瀎alse @@ -2746,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 () { @@ -3104,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() @@ -3150,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) { @@ -3187,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('鏈�変腑鏍峰搧') @@ -3284,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) { diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue index ca20a17..d89c514 100644 --- a/src/components/view/b1-inspect-order-plan.vue +++ b/src/components/view/b1-inspect-order-plan.vue @@ -265,7 +265,7 @@ <el-button @click="handleConnect(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 5 || scope.row.insState == 3||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="connect">浜ゆ帴</el-button> <el-button @click="handleReview(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.checkName&&!scope.row.checkName.includes(userName))" v-if="review">澶嶆牳</el-button> <el-button @click="claimFun(scope.row)" type="text" size="small" :disabled="scope.row.userName != null || scope.row.checkName!=null" v-if="claim">璁ら</el-button> - <el-button @click="lookHistory0(scope.row)" type="text" size="small" :disabled="!scope.row.num1 || scope.row.num1<1">鏌ョ湅璁板綍</el-button> + <el-button @click="lookHistory0(scope.row)" type="text" size="small">鏌ョ湅璁板綍</el-button> </template> </el-table-column> </el-table> diff --git a/src/main.js b/src/main.js index 6984607..ab48d7d 100644 --- a/src/main.js +++ b/src/main.js @@ -21,11 +21,11 @@ //鏈湴 // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; // const javaApi = 'http://127.0.0.1:8001'; -// const javaApi = 'http://172.20.10.5:8001'; +const javaApi = 'http://172.20.10.5:8001'; // //閫氫俊娴嬭瘯搴� // Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080"; -const javaApi = 'http://10.1.13.77:8001'; +// const javaApi = 'http://10.1.13.77:8001'; //浜� // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; -- Gitblit v1.9.3