| | |
| | | <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="18" style="text-align: right;"> |
| | | <el-col :span="8" style="padding-left: 20px;text-align: left;">委托单信息 单位成本总价:<span |
| | | style="color: #3A7BFA">¥{{total.toFixed(2)}}</span></el-col> |
| | | <el-col :span="16" style="text-align: right;"> |
| | | <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;" v-show="active==1" |
| | | @change="selectInsOrderTemplateById"> |
| | | <el-option v-for="(a, ai) in templates" :key="ai" :value="a.id" :label="a.name"> |
| | |
| | | <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" |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>样品名称:</div> |
| | | <div class="search_label"><span class="required-span">* </span>样品类型:</div> |
| | | <div class="search_input"> |
| | | <el-input readonly size="small" v-model="addObj.sample"> |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectStandardTree = true" |
| | |
| | | <div class="search_label"><span class="required-span">* </span>样品数量:</div> |
| | | <div class="search_input"> |
| | | <el-input-number size="small" v-model="addObj.sampleNum" :min="1" :max="100" :precision="0" |
| | | style="width: 65%;" @change="addStandardTree" :disabled="active>1"></el-input-number> |
| | | style="width: 100%;" @change="addStandardTree" :disabled="active>1"></el-input-number> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col class="search_thing" :span="6"> |
| | |
| | | :disabled="active>1" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <el-col class="search_thing" :span="6" v-if="addObj.formType!='其他成品'&&addObj.formType"> |
| | | <div class="search_label"><span class="required-span">* </span>样机完成时间:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | |
| | | :disabled="active>1" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | |
| | | <div style="height: auto;"> |
| | | <div class="search" v-if="active==1" style="display: flex;background: transparent;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">样品型号:</div> |
| | | <div class="search_label">样品名称:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="model" :placeholder="active>1 ? '' : '请输入'" filterable allow-create default-first-option size="small" |
| | | @change="changeModel"> |
| | | <el-input size="small" v-model="allInfo.sample" @change="changeModel('sample')"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">样品类别:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="allInfo.model" :placeholder="active>1 ? '' : '请输入'" filterable allow-create default-first-option size="small" |
| | | @change="changeModel('model')"> |
| | | <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">产品型号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" v-model="allInfo.modelNum" @change="changeModel('modelNum')"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">试验标准:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="allInfo.testRequirements" :placeholder="active>1 ? '' : '请输入'" filterable allow-create default-first-option size="small" |
| | | @change="changeModel('testRequirements')"> |
| | | <el-option v-for="item in standard" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | |
| | | <el-table-column type="index" label="序号" width="65" align="center"></el-table-column> |
| | | <el-table-column prop="sample" label="样品名称" align="center" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input> |
| | | <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1" placeholder="必填"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sampleCode" label="样品编号" min-width="100" align="center"> |
| | |
| | | :readonly="active>1"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="样品型号" align="center" min-width="100"> |
| | | <el-table-column prop="model" label="样品类别" align="center" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="样品型号" |
| | | <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="样品类别" |
| | | size="small" @change="handleChangeModel" :disabled="active>1" style="width: 100%;"> |
| | | <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="modelNum" label="型号参数" min-width="100" align="center" v-if="!(active>1)"> |
| | | <el-table-column prop="modelNum" label="产品型号" min-width="100" align="center" v-if="!(active>1)"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="非必填" |
| | | <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="必填" |
| | | @keyup.enter.native="methodChange(scope.row.standardMethodListId, scope.row)" |
| | | @clear="methodChange(scope.row.standardMethodListId, scope.row)"></el-input> |
| | | </template> |
| | |
| | | <el-table-column prop="testRequirements" label="试验标准" align="center" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.testRequirements" :disabled="scope.row.model==null||active>1" |
| | | placeholder="试验标准" size="small" :readonly="active>1" style="width: 100%;" clearable> |
| | | placeholder="试验标准" size="small" :readonly="active>1" style="width: 100%;" clearable @change="changeModel0(scope.row)"> |
| | | <el-option v-for="item in standard" :key="item.id" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="要求描述" v-model="scope.row.tell" clearable type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'tell')" |
| | | v-if="active==1"></el-input> |
| | | v-if="active==1" :disabled="!!scope.row.tell&&scope.row.tell.includes('[')&&scope.row.tell.includes(']')&&scope.row.tell.includes(',')"></el-input> |
| | | <span v-else> |
| | | <template >{{ scope.row.tell }}</template> |
| | | </span> |
| | |
| | | <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&&scope.row.inspectionValueType!='5'"></el-input> |
| | | v-if="active==1&&scope.row.inspectionValueType!='5'" :disabled="!!scope.row.ask&&scope.row.ask.includes('[')&&scope.row.ask.includes(']')&&scope.row.ask.includes(',')"></el-input> |
| | | <span v-else> |
| | | <!-- <template v-if="(scope.row.ask.indexOf('D')>-1 |
| | | ||scope.row.ask.indexOf('W')>-1 |
| | |
| | | :delUrl="$api.insOrderPlan.delfile" style="height: 100%;margin-top: 16px;" v-show="currentPage==1"/> |
| | | </div> |
| | | </div> |
| | | <p style="font-size: 12px;color: red;margin-top: 20px;margin-bottom: 20px;">双方承诺:<br/> |
| | | 1、委托方承诺提供的信息与样品的真实性;<br/> |
| | | 2、委托送样检验结果仅适用于收到的样品;<br/> |
| | | 3、试验过程导致的样品损坏、配件损坏、损耗,本测试场不承担赔偿责任;<br/> |
| | | 4、实验室承诺公正开展检测活动,并承诺保守在检测活动过程中所获知的保密信息。</p> |
| | | <el-dialog title="选择单位" :visible.sync="selectUserDia" width="70%"> |
| | | <div class="body" style="height: 60vh;" v-if="selectUserDia"> |
| | | <ValueTable ref="ValueTable2" :url="$api.user.selectCustomPageList" :componentData="componentData2" /> |
| | |
| | | <el-button type="primary" @click="spliceTemperatureTest">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 功率容量--填写端口 --> |
| | | <el-dialog title="填写端口" :visible.sync="powerShow" |
| | | :close-on-click-modal="false" :close-on-press-escape="false" |
| | | width="50%"> |
| | | <el-table |
| | | :data="powerTable" |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | fixed |
| | | prop="sample" |
| | | label="样品" |
| | | min-width="150"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="model" |
| | | label="型号" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItem" |
| | | label="检验项" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ask" |
| | | label="端口" |
| | | min-width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.ask" :min="1" :max="100" label="端口" size="small"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="powerShow=false">取消</el-button> |
| | | <el-button type="primary" @click="savePowerTest">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="文件预览" |
| | | :visible.sync="lookFileVisible" |
| | |
| | | <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url" |
| | | :currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/> |
| | | </el-dialog> |
| | | <p style="font-size: 12px;color: red;margin-top: 20px;margin-bottom: 20px;">双方承诺:<br/> |
| | | 1、委托方承诺提供的信息与样品的真实性;<br/> |
| | | 2、委托送样检验结果仅适用于收到的样品;<br/> |
| | | 3、试验过程导致的样品损坏、配件损坏、损耗,本测试场不承担赔偿责任;<br/> |
| | | 4、实验室承诺公正开展检测活动,并承诺保守在检测活动过程中所获知的保密信息。 |
| | | </p> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | requiredUp: [] |
| | | }, |
| | | ruleInfo:{ |
| | | rule:null, |
| | | rule:1, |
| | | num:null, |
| | | }, |
| | | powerShow:false, |
| | | powerTable:[], |
| | | allInfo:{ |
| | | model:null, |
| | | sample:null, |
| | | modelNum:null, |
| | | testRequirements:null, |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | 'addObj.sample'(val) { |
| | | this.model = null |
| | | this.allInfo.model = null |
| | | this.allInfo.sample = null |
| | | this.allInfo.modelNum = null |
| | | this.allInfo.testRequirements = null |
| | | this.standardMethodListId = [] |
| | | }, |
| | | 'addObj.sampleNum'(val) { |
| | | this.model = null |
| | | this.allInfo.model = null |
| | | this.allInfo.sample = null |
| | | this.allInfo.modelNum = null |
| | | this.allInfo.testRequirements = null |
| | | this.standardMethodListId = [] |
| | | }, |
| | | active(val){ |
| | | this.saveLoad = false |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }) |
| | | }) |
| | | // 文件信息 |
| | | this.componentData0.entity.insOrderId = this.currentId |
| | | this.componentData0.entity.insOrderId = this.currentId; |
| | | this.$refs.fileList.selectList() |
| | | } |
| | | }, |
| | |
| | | }) |
| | | 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 () { |
| | |
| | | return |
| | | } |
| | | this.spliceTemperatureTest() |
| | | }, |
| | | savePowerTest(){ |
| | | if(!this.powerTable.every(m=>m.ask)) |
| | | { |
| | | this.$message.error('请填写完整数据') |
| | | } |
| | | let num = 0; |
| | | let sampleList = this.HaveJson(this.sampleList) |
| | | sampleList.forEach(item=>{ |
| | | item.insProduct.forEach(m=>{ |
| | | if(m.inspectionItem.includes('功率试验')&&m.state==1){ |
| | | m.ask = '端口数:'+this.powerTable[num].ask |
| | | num++ |
| | | } |
| | | }) |
| | | }) |
| | | this.saveMethod(sampleList) |
| | | this.powerShow = false; |
| | | }, |
| | | cleanTemperatureTest () { |
| | | this.temperatureTest = [] |
| | |
| | | this.$message.error('请输入样品型号') |
| | | }else if (!this.addObj.appointed) { |
| | | this.$message.error('请选择约定时间') |
| | | }else if (!this.addObj.issueTime) { |
| | | this.$message.error('请选择样机完成时间') |
| | | } else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) { |
| | | }else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) { |
| | | this.$message.error('请选择检验标准') |
| | | } else if(this.addObj.formType&&this.addObj.formType!='其他成品'&&!this.addObj.issueUser){ |
| | | this.$message.error('请选择通知至样机员') |
| | | }else if(this.addObj.formType&&this.addObj.formType!='其他成品'&&!this.addObj.issueTime){ |
| | | this.$message.error('请选择样机完成时间') |
| | | }else{ |
| | | //校验检验项的要求值和要求描述,仅委托要求 |
| | | // if(this.active==1&&this.isAskOnlyRead){ |
| | |
| | | // } |
| | | // } |
| | | 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 index0 = sampleList.findIndex(m=>!m.sample) |
| | | if(index0>-1) return this.$message.error('请填写样品名称') |
| | | let index1 = sampleList.findIndex(m=>!m.modelNum) |
| | | if(index1>-1) return this.$message.error('请填写产品型号') |
| | | |
| | | |
| | | let projectNum = this.totalArr.filter(a => a.state == 1).length |
| | | if(projectNum==0){ |
| | | this.$confirm('检验项目为空,是否确认提交?', "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.saveMethod(sampleList) |
| | | }).catch(() => {}) |
| | | // this.$confirm('检验项目为空,是否确认提交?', "提示", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning" |
| | | // }).then(() => { |
| | | // this.saveMethod(sampleList) |
| | | // }).catch(() => {}) |
| | | return this.$message.error('请添加检验项目') |
| | | }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 => { |
| | | item.value = item.modelNum |
| | | }) |
| | | this.bsm3Dia = true; |
| | | return |
| | | } |
| | | let isPower = this.totalArr.find(a => a.inspectionItem.includes('功率试验')&&a.state==1) |
| | | if (isPower) { |
| | | this.powerTable = this.totalArr.filter(a => a.inspectionItem.includes('功率试验')&&a.state==1) |
| | | this.powerTable.forEach(a => { |
| | | a.ask = null |
| | | }) |
| | | this.powerShow = true; |
| | | return |
| | | } |
| | | this.saveMethod(sampleList) |
| | |
| | | let min = Math.min(...splits) |
| | | let max = Math.max(...splits) |
| | | if(min==max){ |
| | | console.log(2222); |
| | | isTrue = false |
| | | } |
| | | //要求描述中不包含±以及区间的数字,则返回false |
| | |
| | | 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 |
| | |
| | | }, |
| | | saveMethod(sampleList){ |
| | | let isHaveAsk = this.totalArr.filter(a => (a.ask === null||a.ask=='')&&a.state==1) |
| | | let isHaveAsk0 = this.totalArr.filter(a => (a.ask=='/'||a.ask=='-'||a.ask=='——'||((/\d/.test(a.ask))&&(a.ask.includes('<')||a.ask.includes('>')||a.ask.includes('=')||a.ask.includes('>')||a.ask.includes('<')||a.ask.includes('≥')||a.ask.includes('≤'))))&&a.state==1) |
| | | let stateArr = this.totalArr.filter(a=>a.state==1) |
| | | if (isHaveAsk.length > 0) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '请填写要求值后再提交' |
| | | }) |
| | | return false; |
| | | } |
| | | if (isHaveAsk0.length <stateArr.length) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '要求值输入格式不对,可输入/、-、——代表不判定,<、=、>、≥、≤加上数字代表范围,请重新输入', |
| | | duration: 8 * 1000 |
| | | }) |
| | | return false; |
| | | } |
| | |
| | | this.models = val.children |
| | | this.getNodeParent(node) |
| | | |
| | | let flag = false |
| | | if (node.level == 3) { |
| | | if(node.data.children.length>0){ |
| | | node.data.children.forEach(a => { |
| | | let key = Object.keys(a) |
| | | if(!key.includes('level')) { |
| | | flag = true |
| | | } |
| | | }) |
| | | |
| | | } |
| | | } |
| | | this.selectTree = this.selectTree.replace(' - ', '') |
| | | if(flag) { |
| | | this.selectTree = '- - ' + this.selectTree |
| | | } |
| | | let data = this.selectTree.split(' - ') |
| | | let data2 = '' |
| | | for (let index = data.length - 1; index >= 0; index--) { |
| | |
| | | return data.label.indexOf(value) !== -1; |
| | | }, |
| | | activeStandardTree() { |
| | | let trees = this.selectTree.split(" - ") |
| | | if(this.selectTree == null || this.selectTree == '') return this.$message.error('未选择样品类型') |
| | | let trees = this.selectTree.split(" - ").filter(m=>m) |
| | | if (trees.length < 3) { |
| | | this.$message.error('未选择对象') |
| | | this.$message.error('未选择样品类别') |
| | | return |
| | | } |
| | | this.addObj.factory = trees[0] |
| | | this.addObj.laboratory = trees[1] |
| | | this.addObj.sampleType = trees[2] |
| | | if (trees[3] === undefined || trees[3] === '' || trees[3] === '- ') { |
| | | this.addObj.sample = trees[2] |
| | | } else { |
| | | this.addObj.sample = trees[3] |
| | | } |
| | | this.addObj.model = (trees[4] == undefined ? null : trees[4]) |
| | | this.addObj.factory = '中天科技检测中心' |
| | | this.addObj.laboratory = '通信产品实验室' |
| | | this.addObj.sampleType = trees[0] |
| | | this.addObj.sample = trees[1] |
| | | this.addObj.model = trees[2] |
| | | this.selectStandardTree = false |
| | | this.sampleList = [] |
| | | for (var i = 0; i < this.addObj.sampleNum; i++) { |
| | | this.sample.joinName = null |
| | | this.sample.joinModel = null |
| | | this.sample.joinNum = 1 |
| | | this.sample.sample = this.addObj.sample |
| | | // this.sample.sample = this.addObj.sample |
| | | this.sample.model = this.addObj.model |
| | | this.sample.unit = this.addObj.unit |
| | | this.sample.standardMethodListId = [] |
| | |
| | | selectsStandardMethodByFLSSM() { |
| | | this.methodLoad = true |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: this.selectTree |
| | | tree: '中天科技检测中心'+' - '+'通信产品实验室'+' - '+this.selectTree |
| | | }).then(res => { |
| | | this.methodLoad = false |
| | | try { |
| | | if (res.data.standardMethodList.length == 0 && this.selectTree.split('-').length == 5) { |
| | | let arr = this.selectTree.split('-') |
| | | let arr0 = arr.slice(0, arr.length - 1) |
| | | let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1) |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: selectTree |
| | | }).then(ress => { |
| | | this.methods = ress.data.standardMethodList |
| | | }) |
| | | } else { |
| | | this.methods = res.data.standardMethodList |
| | | } |
| | | } catch (e) {} |
| | | this.methods = res.data.standardMethodList |
| | | }) |
| | | }, |
| | | addStandardTree() { |
| | |
| | | this.sample.joinName = null |
| | | this.sample.joinModel = null |
| | | this.sample.joinNum = 1 |
| | | this.sample.sample = this.addObj.sample |
| | | // this.sample.sample = this.addObj.sample |
| | | this.sample.model = this.addObj.model |
| | | this.sample.unit = this.addObj.unit |
| | | this.sample.standardMethodListId = [] |
| | |
| | | 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) |
| | |
| | | } |
| | | return item |
| | | }) |
| | | const select = this.selectTree.split(' - ') |
| | | if (row.inspectionItem === '温度循环' && select[2] === '光缆' && row.state === 1&&this.isAskOnlyRead) { |
| | | this.circulateShow = true; |
| | | return |
| | | } else if (row.inspectionItem === '温度循环' && select[2] === '光缆' && row.state === 0) { |
| | | this.circulateShow = false; |
| | | } |
| | | if ((row.inspectionItem === '温升试验' || row.inspectionItem === '热循环') && row.state === 1) { |
| | | // console.log('row---', row) |
| | | this.temperatureTitle = `${row.inspectionItem}要求填写` |
| | | this.isShowInput = row.inspectionItem === '热循环' |
| | | this.temId = row.id |
| | | this.temperatureShow = true; |
| | | return |
| | | } else if ((row.inspectionItem === '温升试验' || row.inspectionItem === '热循环') && row.state === 0) { |
| | | this.temperatureShow = false; |
| | | } |
| | | // if (row.inspectionItem === '单根垂直燃烧' && select[2] === '光缆' && row.state === 1) { |
| | | // this.singleVerticalCombustionShow = true; |
| | | // return |
| | | // } else if (row.inspectionItem === '单根垂直燃烧' && select[2] === '光缆' && row.state === 0) { |
| | | // this.singleVerticalCombustionShow = 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() |
| | | }, |
| | | searchProject () { |
| | |
| | | // 保存模板 |
| | | addTemplateDia() { |
| | | if (this.templateName) { |
| | | this.templateLoading = true; |
| | | if(this.templates.find(m=>m.name==this.templateName)){ |
| | | this.$confirm('已存在同名模板,是否进行替换?', "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.saveTemplateDia() |
| | | }).catch(() => {}) |
| | | }else{ |
| | | this.saveTemplateDia() |
| | | } |
| | | } else { |
| | | this.$message.error('请填写模板名称') |
| | | } |
| | | }, |
| | | saveTemplateDia(){ |
| | | this.templateLoading = true; |
| | | this.$axios.post(this.$api.insOrder.addInsOrderTemplate, { |
| | | name: this.templateName, |
| | | thing: JSON.stringify({ |
| | |
| | | this.selectInsOrderTemplate() |
| | | this.templateName = '' |
| | | }) |
| | | } else { |
| | | this.$message.error('请填写模板名称') |
| | | } |
| | | }, |
| | | // 查询模板 |
| | | selectInsOrderTemplateById(e) { |
| | |
| | | }).then(res => { |
| | | this.orderType = res.data |
| | | if (res.data.length > 0) { |
| | | this.addObj.orderType = res.data[0].value |
| | | this.addObj.orderType = 'C' |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum+';'+row.testRequirements, |
| | | standardMethodListId: val.join(','), |
| | | factory: selectTreeList.join(" - "), |
| | | factory: '中天科技检测中心'+' - '+'通信产品实验室'+' - '+selectTreeList.join(" - "), |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | |
| | | } |
| | | }) |
| | | }, |
| | | changeModel() { |
| | | changeModel(type) { |
| | | this.sampleList.forEach(a => { |
| | | let obj = this.sampleIds.find(b => b == a.id) |
| | | if (obj) { |
| | | a.model = this.model |
| | | this.$set(a,type, this.allInfo[type]) |
| | | if(type=='testRequirements'&&a.standardMethodListId&&a.standardMethodListId.length>0){ |
| | | this.methodChange(a.standardMethodListId, a) |
| | | } |
| | | // a[type] = this.allInfo[type] |
| | | } |
| | | }) |
| | | }, |
| | | changeModel0(row){ |
| | | if(row.standardMethodListId&&row.standardMethodListId.length>0){ |
| | | this.methodChange(row.standardMethodListId, row) |
| | | } |
| | | }, |
| | | changeStandardMethodListId() { |
| | | this.sampleList.forEach(a => { |
| | |
| | | this.$refs.productTable.clearSelection() |
| | | return |
| | | } |
| | | const select = this.selectTree.split(' - ') |
| | | if (p.inspectionItem === '温度循环' && select[2] === '光缆' && p.state === 1&&this.isAskOnlyRead) { |
| | | this.circulateShow = true; |
| | | return |
| | | } else if (p.inspectionItem === '温度循环' && select[2] === '光缆' && p.state === 0) { |
| | | this.circulateShow = false; |
| | | } |
| | | if ((p.inspectionItem === '温升试验' || p.inspectionItem === '热循环') && p.state === 1) { |
| | | // console.log('p---', p) |
| | | this.temperatureTitle = `${p.inspectionItem}要求填写` |
| | | this.isShowInput = p.inspectionItem === '热循环' |
| | | this.temId = p.id |
| | | this.temperatureShow = true; |
| | | return |
| | | } else if ((p.inspectionItem === '温升试验' || p.inspectionItem === '热循环') && p.state === 0) { |
| | | this.temperatureShow = false; |
| | | } |
| | | /* if (p.ask.includes('RTS')&&p.state === 1) { |
| | | p.rts = '' |
| | | this.bsm3Val = '' |
| | | this.bsm3 = true |
| | | this.bsm3Dia = true |
| | | this.bsmRow3.push(p) |
| | | } */ |
| | | }) |
| | | if (e.length > 0) { |
| | | this.sampleList.map(item => { |
| | |
| | | }) |
| | | } |
| | | 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() |
| | |
| | | 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) { |
| | |
| | | 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('未选中样品') |
| | |
| | | } |
| | | } |
| | | 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) { |