From 103d02733dba8942af2df34bcab948a10773b6be Mon Sep 17 00:00:00 2001 From: lxp <1928192722@qq.com> Date: 星期四, 08 八月 2024 21:22:02 +0800 Subject: [PATCH] 光纤配置完善 --- src/components/do/b1-ins-order/add.vue | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 42690c4..f62bcb6 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -475,7 +475,7 @@ <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,'ask')" - v-if="active==1&&isAskOnlyRead&&/[0-9]/.test(scope.row.ask)"></el-input> + v-if="active==1&&isAskOnlyRead&&scope.row.inspectionValueType!='5'"></el-input> <span v-else> <!-- <template v-if="(scope.row.ask.indexOf('D')>-1 ||scope.row.ask.indexOf('W')>-1 @@ -620,7 +620,8 @@ </el-row> </span> </el-dialog> - <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow" :active="active" /> + <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow && examine == 0" :active="active" /> + <fiberOpticConfigTwo :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow && examine == 1" :active="active" /> <equipConfig :currentId="currentId" v-if="equipConfigShow" :active="active" /> <cableConfig v-if="cableConfigShow" :active="active" /> <!-- 鍗曢�夌壒娈婂�煎鐞嗘--> @@ -906,6 +907,7 @@ <script> import ValueTable from '../../tool/value-table.vue' import fiberOpticConfig from './fiberoptic-config.vue' +import fiberOpticConfigTwo from './fiberoptic-config-two.vue' import equipConfig from './equip-config.vue' import cableConfig from './cable-config.vue' import Vue from 'vue' @@ -915,10 +917,15 @@ components: { ValueTable, fiberOpticConfig, + fiberOpticConfigTwo, equipConfig, cableConfig }, props: { + examine: { + type: Number, + default: () => 0 + }, active: { type: Number, default: () => 0 @@ -1573,7 +1580,7 @@ isHaveBushing = false } }) - //杩囨护妫�娴嬮」锛氬幓闄ょ壒娈婇」(bsm=1), + //杩囨护妫�娴嬮」锛氬幓闄ょ壒娈婇」 let filterProductList = this.productListSelected.filter(ele=>ele.bsm==0&&/[0-9]/.test(ele.ask)).filter(ele=>{ if(select[1].indexOf('閫氫俊')>=0 && ['鍏夌紗','鍏夌氦'].includes(select[2])){ return !['娓╁害寰幆','鍏夌氦鎺ュご鎹熻��'].includes(ele.inspectionItem) @@ -1594,8 +1601,8 @@ console.log('isHaveBushing===', this.totalArr) // inspectionItem - let spcialItem = this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('鏉惧绠�')) - console.log('isHaveBushing===', isHaveBushing) + let spcialItem = null//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) @@ -1646,11 +1653,15 @@ } } if(ele.ask.indexOf('-')>0 && ele.ask.length>1){ + let tell = ele.tell + if(ele.tell.indexOf('~')>0){ + tell = ele.tell.replace('~','-') + } const splits = ele.ask.split('-') if(splits.length==2 && !isNaN(splits[0]) && !isNaN(splits[1])){ let min = Math.min(...splits) let max = Math.max(...splits) - if(ele.tell.indexOf('卤')<0&&ele.tell!=ele.ask){ + if(ele.tell.indexOf('卤')<0&&tell.indexOf(ele.ask)<0){ isTrue = false }else if(ele.tell.indexOf('卤')>0&&ele.tell!=ele.ask){ let splitNums = ele.tell.split('卤') @@ -2956,9 +2967,8 @@ getTotal() { this.totalArr = [] this.total = 0; - // console.log(this.sampleList) this.sampleList.forEach(item => { - if (item.insProduct && item.insProduct.length > 0) { + if (item.insProduct && item.insProduct.length > 0) { item.insProduct.forEach(a => { this.totalArr.push(a) }) -- Gitblit v1.9.3