| | |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <el-form :inline="true" :model="searchForm" class="form-inline" label-width="100px"> |
| | | <el-form :inline="true" :model="searchForm" class="form-inline" label-width="100px" label-position="right"> |
| | | <el-form-item label="委托编号:"> |
| | | <el-input clearable v-model="insOrder.entrustCode" disabled size="small" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="样品编号:"> |
| | | <el-input clearable v-model="currentSample.sampleCode" disabled size="small" placeholder="请输入" style="width: 100px;"></el-input> |
| | | <el-tooltip :disabled="!currentSample.sampleCode" :content="currentSample.sampleCode"> |
| | | <el-input clearable v-model="currentSample.sampleCode" disabled size="small" placeholder="请输入" ></el-input> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | <el-form-item label="样品名称:"> |
| | | <el-input clearable v-model="currentSample.sample" disabled size="small" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="样品数量:"> |
| | | <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="请输入" style="width: 70px;"></el-input> |
| | | <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="请输入" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="下发时间:"> |
| | | <el-input clearable v-model="insOrder.sendTime" disabled size="small" placeholder="请输入"></el-input> |
| | |
| | | <el-input clearable v-model="insOrder.typeName" disabled size="small" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="约定时间:"> |
| | | <el-input clearable v-model="insOrder.appointed" disabled size="small" placeholder="请输入" style="width: 100px;"></el-input> |
| | | <el-input clearable v-model="insOrder.appointed" disabled size="small" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="当前样品位数:"> |
| | | <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag> |
| | |
| | | </el-radio-group> |
| | | </div> |
| | | <div style="display: flex;align-items: center;"> |
| | | <span v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'"> 套管:</span> |
| | | <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,3)" v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='成品缆检验原始记录'" size="small"> |
| | | <span v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='成品缆检验原始记录'"> 套管:</span> |
| | | <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,3)" v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='成品缆检验原始记录'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)"> |
| | | <el-option |
| | | v-for="item in casing" |
| | | :key="item.id" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | <span v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'"> 光纤带:</span> |
| | | <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,1)" v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'" size="small"> |
| | | <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,1)" v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)"> |
| | | <el-option |
| | | v-for="item in fibers" |
| | | :key="item.value" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | <span v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'"> 光纤:</span> |
| | | <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,2)" v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'" size="small"> |
| | | <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,2)" v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)"> |
| | | <el-option |
| | | v-for="item in fiber" |
| | | :label="item.bushColor+'-'+item.color" |
| | |
| | | requiredUp: [] |
| | | }, |
| | | upIndex: 0, |
| | | changeType:null, |
| | | getReportModelLoading:false, |
| | | insOrder: {}, |
| | | sampleProduct: [], |
| | | typeList: [], |
| | |
| | | }) |
| | | }, |
| | | currentTable(val1, val0) { |
| | | if (val0 != null && val1 != val0) { |
| | | if(val0 !=null && val1 != val0){ |
| | | if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='成品缆检验原始记录')){ |
| | | if(this.casing.length>0){ |
| | | this.handleChange(this.casing[0].id,3) |
| | | } |
| | | return |
| | | } |
| | | if(this.changeType && this.changeType>0){ |
| | | return |
| | | } |
| | | this.tableLists.forEach(async (m, i) => { |
| | | if (m.templateId == val1) { |
| | | let list = await this.getCurrentProduct(this.currentSample.id,0) |
| | |
| | | } |
| | | } |
| | | }) |
| | | if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='成品缆检验原始记录')){ |
| | | if(this.casing.length>0){ |
| | | this.handleChange(this.casing[0].id,3) |
| | | } |
| | | } |
| | | this.handleCasing() |
| | | } |
| | | }, |
| | | equipForm:{ |
| | |
| | | maxNum = num |
| | | } |
| | | } |
| | | console.log('data[i][j].equipName',data[i][j].equipName,'data[i][j].equipValue',data[i][j].equipValue,'m.v',m.v,'m.v.ps',m.v.ps,'m.v.ps.value',m.v.ps.value,'str0',str0,'str',str,'m.v.v',m.v.v) |
| | | if(data[i][j].equipName&&data[i][j].equipValue&&m.v&&m.v.ps&&m.v.ps.value=='设备编码'&&str0==str){ |
| | | if(!m.v.v){ |
| | | this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName) |
| | |
| | | this.currentSample = this.HaveJson(row) |
| | | let list = await this.getCurrentProduct(row.id,0) |
| | | this.currentSample.insProduct = this.HaveJson(list) |
| | | this.handleCasing() |
| | | this.currentSample.insProduct.forEach(a => { |
| | | this.param[a.id] = { |
| | | insValue: [], |
| | |
| | | currentTable:this.currentTable |
| | | })); |
| | | }, |
| | | handleCasing(){ |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName!='成品缆检验原始记录')){ |
| | | this.currentSample.insProduct = this.currentSample.insProduct.filter(m=>!m.inspectionItem.includes('松套管')) |
| | | } |
| | | }, |
| | | getReportModel(id){ |
| | | if(this.PROJECT!='检测中心'){ |
| | | return |
| | | } |
| | | this.getReportModelLoading = true |
| | | this.$axios.post(this.$api.insOrderPlan.getReportModel+'?sampleId='+id, {}).then(res => { |
| | | this.getReportModelLoading = false |
| | | this.fibers = res.data['光纤带'] |
| | | this.fiber = res.data['光纤'] |
| | | this.casing = res.data['套管'] |
| | | console.log(this.casing) |
| | | }) |
| | | }, |
| | | async handleChange(m,type){ |
| | | this.changeType = type; |
| | | if(m){ |
| | | let list = await this.getCurrentProduct(m,type) |
| | | if(list.length>0){ |
| | |
| | | type: 'saveData', |
| | | tableList:this.tableList, |
| | | param:this.param, |
| | | currentTable:this.currentTable |
| | | currentTable:this.currentTable, |
| | | bushing:m |
| | | })); |
| | | }else{ |
| | | this.tableLists = [] |
| | |
| | | this.currentSample = this.HaveJson(this.sampleProduct[index - 1]) |
| | | let list = await this.getCurrentProduct(this.currentSample.id,0) |
| | | this.currentSample.insProduct = this.HaveJson(list) |
| | | this.handleCasing() |
| | | this.param = {} |
| | | this.currentSample.insProduct.forEach(a => { |
| | | this.param[a.id] = { |