| | |
| | | // } |
| | | // } |
| | | 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('检验项目为空,是否确认提交?', "提示", { |
| | |
| | | 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 => { |
| | |
| | | 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 |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="试验信息" :visible.sync="experimentDia" width="50%"> |
| | | <div class="body" style="display: flex;padding: 10px;align-items: center;" v-if="experimentDia0"> |
| | | <div class="search_label" style="width: 150px;"><span class="required-span">*</span>实验阶段</div> |
| | | <div class="search_input" style="width: 100%;"> |
| | | <el-input clearable v-model="experimentInfo.term" size="small" placeholder=""></el-input> |
| | | <div style="height: 80vh;overflow-y: auto;"> |
| | | <div class="body" style="display: flex;padding: 10px;align-items: center;" v-if="experimentDia0"> |
| | | <div class="search_label" style="width: 150px;"><span class="required-span">*</span>实验阶段</div> |
| | | <div class="search_input" style="width: 100%;"> |
| | | <el-input clearable v-model="experimentInfo.term" size="small" placeholder=""></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="body" style="display: flex;padding: 10px;align-items: center;" v-if="experimentDia0"> |
| | | <div class="search_label" style="width: 150px;"><span class="required-span">*</span>实验操作</div> |
| | | <div class="search_input" style="width: 100%;"> |
| | | <el-input clearable v-model="experimentInfo.note" size="small" placeholder="" type="textarea" |
| | | :rows="2"></el-input> |
| | | <div class="body" style="display: flex;padding: 10px;align-items: center;" v-if="experimentDia0"> |
| | | <div class="search_label" style="width: 150px;"><span class="required-span">*</span>实验操作</div> |
| | | <div class="search_input" style="width: 100%;"> |
| | | <el-input clearable v-model="experimentInfo.note" size="small" placeholder="" type="textarea" |
| | | :rows="2"></el-input> |
| | | </div> |
| | | </div> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;"> |
| | | <td>样品</td> |
| | | <td>样品编号</td> |
| | | <td>型号</td> |
| | | <td>检验项</td> |
| | | <td>检验子项</td> |
| | | <td>工时</td> |
| | | </tr> |
| | | <template v-for="(item,index) in sampleProduct"> |
| | | <tr> |
| | | <td :rowspan="item.insProduct.length+1">{{ item.sample }}</td> |
| | | <td :rowspan="item.insProduct.length+1">{{ item.sampleCode }}</td> |
| | | <td :rowspan="item.insProduct.length+1">{{ item.model }}</td> |
| | | </tr> |
| | | <tr v-for="(m,i) in item.insProduct" :key="item.id+i"> |
| | | <td>{{ m.inspectionItem }}</td> |
| | | <td>{{ m.inspectionItemSubclass }}</td> |
| | | <td><el-input-number v-model="m.outputWorkTime" :min="0" :max="100" label="工时" size="small"></el-input-number></td> |
| | | </tr> |
| | | </template> |
| | | </table> |
| | | </div> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;"> |
| | | <td>样品</td> |
| | | <td>样品编号</td> |
| | | <td>型号</td> |
| | | <td>检验项</td> |
| | | <td>检验子项</td> |
| | | <td>工时</td> |
| | | </tr> |
| | | <template v-for="(item,index) in sampleProduct"> |
| | | <tr> |
| | | <td :rowspan="item.insProduct.length+1">{{ item.sample }}</td> |
| | | <td :rowspan="item.insProduct.length+1">{{ item.sampleCode }}</td> |
| | | <td :rowspan="item.insProduct.length+1">{{ item.model }}</td> |
| | | </tr> |
| | | <tr v-for="(m,i) in item.insProduct" :key="item.id+i"> |
| | | <td>{{ m.inspectionItem }}</td> |
| | | <td>{{ m.inspectionItemSubclass }}</td> |
| | | <td><el-input-number v-model="m.outputWorkTime" :min="0" :max="100" label="工时" size="small"></el-input-number></td> |
| | | </tr> |
| | | </template> |
| | | </table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="experimentDia = false">取 消</el-button> |
| | | <el-button type="primary" @click="submit0">确 定</el-button> |
| | |
| | | this.lookFileVisible = true |
| | | }, |
| | | handleBack(){ |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('电路试验')){ |
| | | try { |
| | | if(!this.isLook&&this.state==1&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('电路试验')){ |
| | | this.$confirm('请确认当前数据是否全部保存,是否返回?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | }else{ |
| | | this.$emit('goback') |
| | | } |
| | | } catch (error) { |
| | | this.$emit('goback') |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }} |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':(n.result===3?'不判定':'待定'))) }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }} |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':(n.result===3?'不判定':'待定'))) }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }} |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':'待定')) }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }} |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':'待定')) }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | }, |
| | | insProduct:{ |
| | | deep:true, |
| | | handler:()=>{ |
| | | handler:function(val){ |
| | | // console.log('更新页面啦') |
| | | this.initData() |
| | | } |
| | | } |
| | |
| | | }, |
| | | // 初始化数据 |
| | | initData(){ |
| | | this.allBandList = [] |
| | | // 处理项目 |
| | | this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)).filter(m=>m.inspectionItem.includes('电路试验')) |
| | | this.insProductNew.forEach(async item => { |
| | |
| | | this.intermodulationNum++ |
| | | } |
| | | // 获取设备列表 |
| | | item.equipOptions = await this.getEquipOptions(item) |
| | | item.equipOptions = [] |
| | | }) |
| | | if(this.insProductNew[0].insProductResult2&&this.insProductNew[0].insProductResult2.length>0){ |
| | | // 已经存在值时,赋值 |
| | |
| | | }) |
| | | } |
| | | }else{ |
| | | console.log(2222) |
| | | // 没有值时,初始化页面 |
| | | this.insProductNew.forEach(async item => { |
| | | // 赋值设备 |
| | | item.equipName = '' |
| | | item.equipValue = '' |
| | | // 赋值端口和角度 |
| | | this.portList = [ |
| | | { |
| | | value:'1', |
| | | }, |
| | | { |
| | | value:'2', |
| | | }, |
| | | { |
| | | value:'3', |
| | | }, |
| | | { |
| | | value:'4', |
| | | }, |
| | | ] |
| | | this.angleList = [ |
| | | { |
| | | value:'' |
| | | } |
| | | ] |
| | | item.portList = JSON.parse(JSON.stringify(this.portList)) |
| | | item.angleList = JSON.parse(JSON.stringify(this.angleList)) |
| | | // 赋值结论 |
| | |
| | | projectList: JSON.parse(JSON.stringify(this.insProductNew)) |
| | | } |
| | | ) |
| | | console.log(this.allBandList) |
| | | } |
| | | }, |
| | | // 删除数组 |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }} |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':'待定')) }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }} |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':'待定')) }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | }, |
| | | insProduct:{ |
| | | deep:true, |
| | | handler:()=>{ |
| | | handler:function(val){ |
| | | this.initData() |
| | | } |
| | | } |
| | |
| | | mounted() { |
| | | this.getTypeDicts() |
| | | this.initData() |
| | | console.log(2222,this.currentNum) |
| | | }, |
| | | methods: { |
| | | // 字典获取数据 |
| | |
| | | }, |
| | | // 初始化数据 |
| | | initData(){ |
| | | this.allBandList = [] |
| | | // 处理项目 |
| | | this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)).filter(m=>m.inspectionItem.includes('电路试验')) |
| | | this.insProductNew.forEach(async item => { |
| | | // 获取设备列表 |
| | | item.equipOptions = await this.getEquipOptions(item) |
| | | item.equipOptions = [] |
| | | }) |
| | | if(this.insProductNew[0].insProductResult2&&this.insProductNew[0].insProductResult2.length>0){ |
| | | // 已经存在值时,赋值 |
| | |
| | | // 赋值设备 |
| | | item.equipName = '' |
| | | item.equipValue = '' |
| | | this.portList = [ |
| | | { |
| | | value:'1', |
| | | }, |
| | | { |
| | | value:'2', |
| | | }, |
| | | { |
| | | value:'3', |
| | | }, |
| | | { |
| | | value:'4', |
| | | }, |
| | | ] |
| | | this.angleList = [ |
| | | { |
| | | value:'' |
| | | } |
| | | ] |
| | | // 赋值端口和角度 |
| | | item.portList = JSON.parse(JSON.stringify(this.portList)) |
| | | item.angleList = JSON.parse(JSON.stringify(this.angleList)) |
| | |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label" style="width: 90px"><span class="required-span">* </span>样品编号:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="sampleCode" size="small"></el-input> |
| | | <el-input v-model="sampleCode" size="small" clearable></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | keyup(e){ |
| | | var code = '' |
| | | try{ |
| | | code = JSON.parse(this.codeInfo) |
| | | // console.log(2222,this.codeInfo) |
| | | code = this.codeInfo.substring() |
| | | if(code==null||code==undefined||code==''){ |
| | | this.$message.error('该二维码有误') |
| | | }else{ |
| | |
| | | } |
| | | }catch(e){ |
| | | this.$message.error('请调至英文键盘') |
| | | console.log(e) |
| | | } |
| | | this.codeInfo = null |
| | | }, |
| | |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <div class="el-dialog__body" style="overflow-y: auto;position: fixed;top:0;right: 20px;z-index: 9999;"> |
| | | <div class="el-dialog__body" style="overflow-y: auto;position: fixed;top:60px;right: 20px;z-index: 9999;"> |
| | | <div id="printMOrder" class="printMOrder" ref="printMOrder"> |
| | | <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i+'uuuuu'" style="font-size: 16px !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;"> |
| | | <div> |
| | |
| | | a.item = [...new Set(arr1)].join(',') |
| | | }) |
| | | this.qrData = arr |
| | | // console.log(this.qrData) |
| | | }) |
| | | }, |
| | | //选择要打印的二维码 |
| | |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label"><span class="required-span">* </span>样品编号:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="sampleCode" size="small" @change="sampleCodeChange"></el-input> |
| | | <el-input v-model="sampleCode" size="small" @change="sampleCodeChange" clearable></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | keyup(e){ |
| | | var code = '' |
| | | try{ |
| | | code = JSON.parse(this.codeInfo) |
| | | code = this.codeInfo.substring() |
| | | if(code==null||code==undefined||code==''){ |
| | | this.$message.error('该二维码有误') |
| | | }else{ |