| | |
| | | <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 |
| | | <el-col :span="8" style="padding-left: 20px;text-align: left;">委托单信息 单位成本总价:<span |
| | | style="color: #3A7BFA">¥{{total.toFixed(2)}}</span></el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | :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> |
| | |
| | | }) |
| | | }) |
| | | // 文件信息 |
| | | this.componentData0.entity.insOrderId = this.currentId |
| | | this.componentData0.entity.insOrderId = this.currentId; |
| | | this.$refs.fileList.selectList() |
| | | } |
| | | }, |
| | |
| | | }).then(res => { |
| | | this.orderType = res.data |
| | | if (res.data.length > 0) { |
| | | this.addObj.orderType = res.data[0].value |
| | | this.addObj.orderType = 'C' |
| | | } |
| | | }) |
| | | }, |
| | |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">检验单详情 |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end"> |
| | | <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-top: 16px;"> |
| | | <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')">电调/非电调模板切换</el-button> |
| | | <el-select v-model="template" size="medium" placeholder="电路预设模板" style="margin-right: 10px;margin-left: 10px;" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')" |
| | | @change="selectInsProductTemplateById"> |
| | |
| | | <el-button size="medium" @click="templateDia=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')&&addInsProductTemplatePower"> |
| | | <span style="color: #3A7BFA;">保存模板</span> |
| | | </el-button> |
| | | <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">样品切换</el-button> |
| | | <!-- <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">样品切换</el-button> --> |
| | | <el-button size="small" type="primary" @click="taskVisible=true" v-show="!isLook">任务切换</el-button> |
| | | <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1" |
| | | :loading="submitLoading">提交</el-button> |
| | |
| | | </template> |
| | | <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='样品编号'"> |
| | | <div style="display: flex;flex-wrap: nowrap;align-items: center;width: 100%" :title="currentSample.sampleCode"> |
| | | <i class="el-icon-caret-left table_caret" style="width: 16px;" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i> |
| | | <!-- <i class="el-icon-caret-left table_caret" style="width: 16px;" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i> --> |
| | | <div :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`">{{currentSample.sampleCode}}</div> |
| | | <i class="el-icon-caret-right table_caret" style="width: 16px;" |
| | | v-if="!currentFiberOpticTape&&!currentFiberOptic" @click="caretSample(1)"></i> |
| | | <!-- <i class="el-icon-caret-right table_caret" style="width: 16px;" |
| | | v-if="!currentFiberOpticTape&&!currentFiberOptic" @click="caretSample(1)"></i> --> |
| | | </div> |
| | | </template> |
| | | <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='样品型号'"> |
| | |
| | | </div> |
| | | <el-upload :action="action" |
| | | :data="{ |
| | | orderId:id, |
| | | orderId:this.orderId0, |
| | | sampleId:id, |
| | | sonLaboratory:sonLaboratory |
| | | }" |
| | | v-if="state==1&&fileAdd" |
| | |
| | | :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> |
| | | <template v-for="(x,y) in newUserInfo"> |
| | | <p style="margin: 10px 0;"><el-tag size="small">{{x.name}}</el-tag> 工时填写</p> |
| | | <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> |
| | | <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> |
| | | <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="x.timeArr[i]" :min="0" :max="100" label="工时" size="small"></el-input-number></td> |
| | | </tr> |
| | | </template> |
| | | </table> |
| | | </template> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="experimentDia = false">取 消</el-button> |
| | |
| | | import PowerCapacity from './power-capacity.vue' |
| | | import filePreview from '../../tool/file-preview.vue' |
| | | export default { |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack'], |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack','orderId0','userInfo'], |
| | | components: { |
| | | ValueTable, |
| | | CircuitParameters1, |
| | |
| | | }, |
| | | componentData0: { |
| | | entity: { |
| | | insOrderId:'', |
| | | sonLaboratory:this.sonLaboratory |
| | | insSampleId:'', |
| | | sonLaboratory:this.sonLaboratory, |
| | | insOrderId:'' |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | |
| | | templateLoading:false, |
| | | templateName:'', |
| | | addInsProductTemplatePower:false,//配置模板权限 |
| | | newUserInfo:[] |
| | | } |
| | | }, |
| | | // 用于上传文件的信息 |
| | |
| | | id(val) { |
| | | this.loading = true |
| | | this.$axios.post(this.$api.insOrderPlan.doInsOrder, { |
| | | id: val, |
| | | sampleId: val, |
| | | laboratory: this.sonLaboratory |
| | | }).then(async res => { |
| | | this.insOrder = res.data.insOrder; |
| | | this.componentData0.entity.insOrderId = val; |
| | | this.componentData0.entity.insSampleId = val; |
| | | this.componentData0.entity.insOrderId = this.orderId0; |
| | | this.$refs.fileList.selectList() |
| | | this.urgentList.forEach(m => { |
| | | if (m.value == this.insOrder.type) { |
| | |
| | | }, |
| | | // 复核 |
| | | upInsReview(e,type) { |
| | | this.$confirm(`是否${type}?`, "提示", { |
| | | this.$confirm(type=='结束试验'?'确认结束试验?确定后此委托单停止试验,并且无法再次检验!':`是否${type}?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | |
| | | // 继续试验 |
| | | this.reviewLoading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.verifyPlan, { |
| | | orderId: this.orderId, |
| | | sampleId: this.orderId, |
| | | type: e, |
| | | laboratory: this.sonLaboratory, |
| | | tell: null |
| | |
| | | if (this.noReason) { |
| | | this.reviewLoading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.verifyPlan, { |
| | | orderId: this.orderId, |
| | | sampleId: this.orderId, |
| | | type: 0, |
| | | laboratory: this.sonLaboratory, |
| | | tell: this.noReason |
| | |
| | | return |
| | | } |
| | | } |
| | | let num =0 |
| | | this.sampleProduct.forEach(item=>{ |
| | | item.insProduct.forEach(a=>{ |
| | | if(!a.outputWorkTime){ |
| | | num++ |
| | | } |
| | | }) |
| | | }) |
| | | if(num>0){ |
| | | this.$message.error('请输入完成工时') |
| | | return |
| | | } |
| | | // let num =0 |
| | | // this.newUserInfo.forEach(item=>{ |
| | | // item.timeArr.forEach(a=>{ |
| | | // if(!a){ |
| | | // num++ |
| | | // } |
| | | // }) |
| | | // }) |
| | | // if(num>0){ |
| | | // this.$message.error('请输入完成工时') |
| | | // return |
| | | // } |
| | | this.experimentDia = false |
| | | this.experimentDia0 = false |
| | | if(this.insOrder.orderType=='C'){ |
| | |
| | | return |
| | | } |
| | | this.experimentDia = true |
| | | this.newUserInfo = [] |
| | | this.userInfo.name.forEach((item,index)=>{ |
| | | let timeArr = [] |
| | | this.sampleProduct.forEach(m=>{ |
| | | m.insProduct.forEach(a=>{ |
| | | timeArr.push(0) |
| | | }) |
| | | }) |
| | | let obj = { |
| | | name:item, |
| | | id:this.userInfo.ids[index], |
| | | timeArr:timeArr |
| | | } |
| | | this.newUserInfo.push(obj) |
| | | }) |
| | | if (this.sonLaboratory === '电路试验') { |
| | | this.experimentDia0 = true |
| | | } |
| | |
| | | this.addVerifyDia = false |
| | | this.submitLoading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.checkSubmitPlan, { |
| | | orderId: this.orderId, |
| | | sampleId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | let auxiliaryOutputWorkingHoursList = [] |
| | | this.sampleProduct.forEach(item=>{ |
| | | item.insProduct.forEach(a=>{ |
| | | let obj = { |
| | | inspectionItem:a.inspectionItem, |
| | | outputWorkTime:a.outputWorkTime, |
| | | inspectionItemSubclass:a.inspectionItemSubclass, |
| | | sample:item.sampleCode, |
| | | insProductId:a.id, |
| | | num:item.num1 |
| | | } |
| | | auxiliaryOutputWorkingHoursList.push(obj) |
| | | item.insProduct.forEach((a,i)=>{ |
| | | this.newUserInfo.forEach(b=>{ |
| | | let obj = { |
| | | inspectionItem:a.inspectionItem, |
| | | outputWorkTime:b.timeArr[i], |
| | | inspectionItemSubclass:a.inspectionItemSubclass, |
| | | sample:item.sampleCode, |
| | | insProductId:a.id, |
| | | num:item.num1, |
| | | check:b.id |
| | | } |
| | | auxiliaryOutputWorkingHoursList.push(obj) |
| | | }) |
| | | }) |
| | | }) |
| | | if(!res.data||res.data.length==0){ |
| | | this.$axios.post(this.$api.insOrderPlan.submitPlan, { |
| | | orderId: this.orderId, |
| | | sampleId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | |
| | | type: "" |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.insOrderPlan.submitPlan, { |
| | | orderId: this.orderId, |
| | | sampleId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | auxiliaryOutputWorkingHoursList:auxiliaryOutputWorkingHoursList, |
| | |
| | | async handleCType(){ |
| | | if(this.insOrder.departmentLims=='质量部'){ |
| | | await this.$axios.post(this.$api.insOrderPlan.verifyPlan, { |
| | | orderId: this.orderId, |
| | | sampleId: this.orderId, |
| | | type: 1, |
| | | laboratory: this.sonLaboratory, |
| | | tell: null |
| | |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" v-html="n.tell"></div> |
| | | <div style="text-align: center;" v-html="n.ask"></div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" v-html="n.tell"></div> |
| | | <div style="text-align: center;" v-html="n.ask"></div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" v-html="n.tell"></div> |
| | | <div style="text-align: center;" v-html="n.ask"></div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" v-html="n.tell"></div> |
| | | <div style="text-align: center;" v-html="n.ask"></div> |
| | | </el-col> |
| | | <el-col :span="17"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | |
| | | { |
| | | name:'电压驻波比', |
| | | unit:'/', |
| | | tell:'≤1.45', |
| | | ask:'≤1.45', |
| | | result:'', |
| | | conclusion:'合格', |
| | | portList:[], |
| | |
| | | { |
| | | name:'同极化隔离度', |
| | | unit:'dB', |
| | | tell:'≤1.45', |
| | | ask:'≤1.45', |
| | | result:'', |
| | | conclusion:'合格', |
| | | portList:[], |
| | |
| | | name:'互调', |
| | | band:'2100MHz', |
| | | unit:'dB', |
| | | tell:'≤1.45', |
| | | ask:'≤1.45', |
| | | result:'', |
| | | conclusion:'合格', |
| | | portList:[], |
| | |
| | | { |
| | | name:'偏差', |
| | | unit:'dB', |
| | | tell:'≤1.45', |
| | | ask:'≤1.45', |
| | | result:'', |
| | | conclusion:'合格', |
| | | portList:[], |
| | |
| | | name:'最大耦合度', |
| | | unit:'dB', |
| | | band:'2100MHz', |
| | | tell:'≤1.45', |
| | | ask:'≤1.45', |
| | | result:'', |
| | | conclusion:'合格', |
| | | portList:[], |
| | |
| | | this.angleList = angleList |
| | | this.upTemplateState = false; |
| | | } |
| | | let tell = '' |
| | | if(item.tell.includes(',')){ |
| | | item.tell.split(',').forEach((m,i)=>{ |
| | | tell = tell + m+ (i==item.tell.split(',').length-1?'':'<br/>') |
| | | let ask = '' |
| | | if(item.ask.includes(',')){ |
| | | item.ask.split(',').forEach((m,i)=>{ |
| | | ask = ask + m+ (i==item.ask.split(',').length-1?'':'<br/>') |
| | | }) |
| | | }else{ |
| | | tell = item.tell |
| | | ask = item.ask |
| | | } |
| | | console.log(tell) |
| | | console.log(ask) |
| | | let obj = { |
| | | inspectionItemSubclass: item.inspectionItemSubclass, |
| | | unit:item.unit, |
| | | tell:tell, |
| | | ask:ask, |
| | | result:n.result, |
| | | id:item.id, |
| | | often:n.often, |
| | |
| | | this.$delete(this.loading, y) |
| | | this.$set( this.loading, y, true) |
| | | this.$axios.post(this.$api.insOrderPlan.saveInsContext2, { |
| | | orderId:this.orderId, |
| | | sampleId:this.sampleId, |
| | | // orderId:this.orderId, |
| | | sampleId:this.orderId, |
| | | sonLaboratory:h.projectList[0].sonLaboratory, |
| | | frequency:h.band, |
| | | insProductResult2s:arr |
| | |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" v-html="n.tell"></div> |
| | | <div style="text-align: center;" v-html="n.ask"></div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" v-html="n.tell"></div> |
| | | <div style="text-align: center;" v-html="n.ask"></div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | |
| | | { |
| | | inspectionItemSubclass:'电压驻波比', |
| | | unit:'/', |
| | | tell:'≤1.45', |
| | | ask:'≤1.45', |
| | | result:0, |
| | | portList:[], |
| | | angleList:[], |
| | |
| | | { |
| | | inspectionItemSubclass:'同极化隔离度', |
| | | unit:'dB', |
| | | tell:'≤1.45', |
| | | ask:'≤1.45', |
| | | result:0, |
| | | portList:[], |
| | | angleList:[], |
| | |
| | | inspectionItemSubclass:'互调', |
| | | often:'',//互调特有字段 |
| | | unit:'dB', |
| | | tell:'≤1.45', |
| | | ask:'≤1.45', |
| | | result:0, |
| | | portList:[], |
| | | angleList:[], |
| | |
| | | this.angleList = angleList |
| | | this.upTemplateState = false |
| | | } |
| | | let tell = '' |
| | | if(item.tell.includes(',')){ |
| | | item.tell.split(',').forEach((m,i)=>{ |
| | | tell = tell + m+ (i==item.tell.split(',').length-1?'':'<br/>') |
| | | let ask = '' |
| | | if(item.ask.includes(',')){ |
| | | item.ask.split(',').forEach((m,i)=>{ |
| | | ask = ask + m+ (i==item.ask.split(',').length-1?'':'<br/>') |
| | | }) |
| | | }else{ |
| | | tell = item.tell |
| | | ask = item.ask |
| | | } |
| | | let obj = { |
| | | inspectionItemSubclass: item.inspectionItemSubclass, |
| | | unit:item.unit, |
| | | tell:tell, |
| | | ask:ask, |
| | | result:n.result, |
| | | id:item.id, |
| | | often:n.often, |
| | |
| | | this.$set( this.loading, y, true) |
| | | // this.loading[y] = true |
| | | this.$axios.post(this.$api.insOrderPlan.saveInsContext2, { |
| | | orderId:this.orderId, |
| | | sampleId:this.sampleId, |
| | | // orderId:this.orderId, |
| | | sampleId:this.orderId, |
| | | sonLaboratory:h.projectList[0].sonLaboratory, |
| | | frequency:h.band, |
| | | insProductResult2s:arr |
| | |
| | | :append-to-body="true" |
| | | :modal="!dialogVisible0" |
| | | > |
| | | <span>请选择委托编号为 <span style="color: #3A7BFA">{{currentInfo.entrustCode}}</span> 要生成的数据</span> |
| | | <span style="font-size: 16px;">请选择委托编号为 <span style="color: #3A7BFA">{{currentInfo.entrustCode}}</span> 要生成的数据</span> |
| | | <div style="max-height: 75vh;overflow-y: auto;"> |
| | | <el-card class="box-card" style="margin-top: 16px;" v-for="(item,index) in historyList" :key="index"> |
| | | <div slot="header" style="display: flex;justify-content: space-between;"> |
| | | <span>{{ item.laboratory }}</span> |
| | | </div> |
| | | <el-table |
| | | :data="item.insOrderUserList" |
| | | border |
| | | style="width: 100%" @selection-change="list=>handleSelectionChange(list,item.insOrderUserList)"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="submitTime" |
| | | label="提交日期" |
| | | min-width="150"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="submitUserName" |
| | | label="提交人" |
| | | min-width="90"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="term" |
| | | label="实验阶段" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="note" |
| | | label="实验操作" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="tell" |
| | | label="再次检验原因" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="lookDetail(item,scope.row.num)" type="text" size="small">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | <template v-for="(a,b) in sampleList"> |
| | | <el-divider></el-divider> |
| | | <p style="margin: 10px 0;font-weight: 700;">样品:<el-tag size="small">{{a.insSample.sample}}</el-tag> 样品编号:{{a.insSample.sampleCode}}</p> |
| | | <el-card class="box-card" style="margin-top: 16px;" v-for="(item,index) in a.historyList" :key="index"> |
| | | <div slot="header" style="display: flex;justify-content: space-between;"> |
| | | <span>{{ item.laboratory }}</span> |
| | | </div> |
| | | <el-table |
| | | :data="item.insOrderUserList" |
| | | border |
| | | style="width: 100%" @selection-change="list=>handleSelectionChange(list,item.insOrderUserList)"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="submitTime" |
| | | label="提交日期" |
| | | min-width="150"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="submitUserName" |
| | | label="提交人" |
| | | min-width="90"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="term" |
| | | label="实验阶段" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="note" |
| | | label="实验操作" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="tell" |
| | | label="再次检验原因" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="lookDetail(item,scope.row.num,a.insSample)" type="text" size="small">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | <p v-if="a.historyList.length==0" style="text-align: center;">暂无可生成的数据</p> |
| | | </template> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="loading0" @click="handleNoCreate">不生成</el-button> |
| | |
| | | :visible.sync="dialogVisible0" |
| | | width="100%" :fullscreen="true" :modal="false" :append-to-body="true"> |
| | | <Inspection v-if="dialogVisible0" |
| | | :orderId="currentInfo.id" |
| | | :orderId="sampleId" |
| | | :orderId0="orderId0" |
| | | :userInfo="{}" |
| | | :inspectorList="currentItem.inspectorList" |
| | | :sonLaboratory="currentItem.laboratory" |
| | | :state="2" |
| | |
| | | sampleModel: null, |
| | | sampleCode: null, |
| | | outEntrustCode: null, |
| | | state: 1, |
| | | state: 4, |
| | | name:null, |
| | | engineering:null, |
| | | production:null, |
| | |
| | | currentItem:{}, |
| | | loading0:false, |
| | | loading1:false, |
| | | dialogVisible0:false |
| | | dialogVisible0:false, |
| | | sampleList:[], |
| | | sampleId:null, |
| | | orderId0:null, |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | handleCreateReport(row){ |
| | | this.currentInfo = row |
| | | this.$axios.get(this.$api.insReport.getInsOrderStateCount+'?id='+row.id).then(res => { |
| | | this.historyList = res.data |
| | | this.historyList.forEach(item => { |
| | | item.arr = [] |
| | | this.$set(item,'numValue',1) |
| | | // item.checked = false; |
| | | if(item.num>0){ |
| | | for(var i=0;i<item.num;i++){ |
| | | item.arr.push({ |
| | | label:'记录'+(i+1), |
| | | value:i+1 |
| | | }) |
| | | this.sampleList = res.data |
| | | this.sampleList.forEach(a=>{ |
| | | a.historyList = a.insOrderStates |
| | | a.historyList.forEach(item => { |
| | | item.arr = [] |
| | | this.$set(item,'numValue',1) |
| | | if(item.num>0){ |
| | | for(var i=0;i<item.num;i++){ |
| | | item.arr.push({ |
| | | label:'记录'+(i+1), |
| | | value:i+1 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | // this.historyList = res.data |
| | | // this.historyList.forEach(item => { |
| | | // item.arr = [] |
| | | // this.$set(item,'numValue',1) |
| | | // // item.checked = false; |
| | | // if(item.num>0){ |
| | | // for(var i=0;i<item.num;i++){ |
| | | // item.arr.push({ |
| | | // label:'记录'+(i+1), |
| | | // value:i+1 |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | this.dialogVisible = true |
| | | }) |
| | | }, |
| | | // 生成报告 |
| | | handleCreate(){ |
| | | let arr = [] |
| | | this.historyList.forEach(item => { |
| | | item.insOrderUserList.forEach(item1 => { |
| | | if(item1.state==1){ |
| | | arr.push({ |
| | | laboratory:item.laboratory, |
| | | num:item1.num, |
| | | insOrderUsersId:item1.id |
| | | }) |
| | | } |
| | | let insReportDto1s = [] |
| | | let num = 0; |
| | | this.sampleList.forEach(a => { |
| | | let insReportDto2s = [] |
| | | a.historyList.forEach(item => { |
| | | item.insOrderUserList.forEach(item1 => { |
| | | if(item1.state==1){ |
| | | let obj0 = { |
| | | laboratory:item.laboratory, |
| | | num:item1.num, |
| | | insOrderUsersId:item1.id |
| | | } |
| | | insReportDto2s.push(obj0) |
| | | num++ |
| | | } |
| | | }) |
| | | }) |
| | | let obj0 = { |
| | | sampleId:a.insSample.id, |
| | | insReportDto2s:insReportDto2s |
| | | } |
| | | insReportDto1s.push(obj0) |
| | | }) |
| | | if(arr.length==0){ |
| | | if(num==0){ |
| | | this.$message.error("请先选择需要生成的记录!") |
| | | return |
| | | } |
| | |
| | | this.$axios.post(this.$api.insReport.isReport, { |
| | | id:this.currentInfo.id, |
| | | state:1, |
| | | insReportDto1s:arr |
| | | insReportDto1s:insReportDto1s |
| | | },{ |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | |
| | | }) |
| | | }, |
| | | // 查看检验详情 |
| | | lookDetail(row,value){ |
| | | lookDetail(row,value,insSample){ |
| | | this.dialogVisible0 = true |
| | | let inspectorList = [] |
| | | if(row.userName){ |
| | | inspectorList = row.userName.split(',') |
| | | } |
| | | this.sampleId = insSample.id |
| | | this.orderId0 = insSample.insOrderId |
| | | this.currentItem = { |
| | | num1:value, |
| | | inspectorList:inspectorList, |
| | |
| | | import VueOfficeExcel from '@vue-office/excel' |
| | | //引入相关样式 |
| | | import '@vue-office/excel/lib/index.css' |
| | | import * as XLSX from "xlsx"; |
| | | export default { |
| | | components: { |
| | | VueOfficeDocx, |
| | |
| | | return obj |
| | | }) |
| | | this.csvList = arr |
| | | // console.log(333,this.csvList) |
| | | this.csvList.forEach(m=>{ |
| | | console.log(this.calculateFormulas(m.column,m.tableData)) |
| | | m.tableData = this.calculateFormulas(m.column,m.tableData) |
| | | }) |
| | | }).catch( err => { |
| | | console.log(err) |
| | | }) |
| | |
| | | } |
| | | return result |
| | | }, |
| | | /** |
| | | * 计算表格公式 |
| | | * |
| | | * @param tableHeaders 表头数据 |
| | | * @param tableData 表格数据 |
| | | */ |
| | | calculateFormulas(tableHeaders,tableData){ |
| | | // 生成 Excel Sheet 格式 |
| | | const sheetData = [tableHeaders.map(m=>m.label), ...tableData.map((row) => Object.values(row))]; |
| | | const worksheet = XLSX.utils.aoa_to_sheet(sheetData); |
| | | // 计算公式 |
| | | XLSX.utils.sheet_add_aoa(worksheet, [], { origin: -1 }); |
| | | const newSheetData = XLSX.utils.sheet_to_json(worksheet, { header: 1 }); |
| | | // 更新表头和表格数据 |
| | | tableData = newSheetData.slice(1).map((row) => |
| | | row.reduce((obj, value, index) => { |
| | | obj[newSheetData[0][index]] = value; |
| | | return obj; |
| | | }, {}) |
| | | ); |
| | | return tableData |
| | | }, |
| | | resetStyle(){ |
| | | const elements = document.querySelectorAll('[style*="pt"]'); |
| | | for (const element of elements) { |
| | |
| | | element.setAttribute('style', style.replace(/pt/g, 'px')); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">样品编号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable |
| | | v-model="componentData.entity.sampleCOde" @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | |
| | | width="100px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="sampleCode" |
| | | label="样品编号" |
| | | width="170px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="type" |
| | | label="紧急程度" |
| | | width="100px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="typeList.find(m=>m.value==scope.row.type).type" size="small">{{ typeList.find(m=>m.value==scope.row.type).label }}</el-tag> |
| | | <el-tag :type="typeList.find(m=>m.value==scope.row.type)?typeList.find(m=>m.value==scope.row.type).type:''" size="small">{{ typeList.find(m=>m.value==scope.row.type)?typeList.find(m=>m.value==scope.row.type).label:'' }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | <div style="width: 100%;height: 100%;" v-if="activeFace >0"> |
| | | <Add :active="activeFace" :currentId="currentId" :examine="examine"/> |
| | | </div> |
| | | <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1"/> |
| | | <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1" :orderId0="orderId0" :userInfo="userInfo" /> |
| | | <el-dialog title="数据查看" :visible.sync="dataDialogVisible" width="80%"> |
| | | <div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible"> |
| | | <ValueTable ref="ValueTableDataLook" :rowKey="'insProductId'" :url="$api.insOrder.selectSampleAndProductByOrderId" |
| | |
| | | entity: { |
| | | sonLaboratory: null, |
| | | insState: null, |
| | | userId: null |
| | | userId: null, |
| | | sampleCode:null, |
| | | }, |
| | | sortable:true, |
| | | isIndex: true, |
| | |
| | | activeFace: 0, //1:下单,2:查看,3:审核,默认为0 |
| | | currentId: null, |
| | | entityCopy: {}, |
| | | orderId: 0, |
| | | orderId: null, |
| | | orderId0:null, |
| | | personList:[], |
| | | connectVisible:false, |
| | | connect:{ |
| | |
| | | upLoadStorage: false, |
| | | exportVisible: false, |
| | | upLoadExport: false, |
| | | selectWarehouse:false |
| | | selectWarehouse:false, |
| | | userInfo:{ |
| | | name:[], |
| | | ids:[] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | if (row) { |
| | | this.sampleUserForm = { |
| | | entrustCode: row.entrustCode, |
| | | insSampleId: row.id, |
| | | insSampleId: row.sampleId, |
| | | sonLaboratory: row.sonLaboratory, |
| | | } |
| | | this.claimVisible = true |
| | |
| | | }, |
| | | confirmClaim() { |
| | | this.loading = true; |
| | | // this.sampleUserForm.insSampleId = this.orderId |
| | | this.$axios.post(this.$api.insOrderPlan.claimInsOrderPlan, this.sampleUserForm, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | }, |
| | | noQs:true |
| | | },).then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.loading = false; |
| | | this.$message.success("认领成功") |
| | |
| | | inspectorList.push(user.name) |
| | | } |
| | | this.inspectorList = inspectorList |
| | | this.orderId = row.id |
| | | this.orderId = row.sampleId |
| | | this.orderId0 = row.id |
| | | this.version = row.version |
| | | this.orderStateId = row.orderStateId |
| | | this.state = 1; |
| | | this.userInfo.name = row.userName.split(',') |
| | | this.userInfo.ids = row.userNameId.split(',') |
| | | this.isLook = false |
| | | }, |
| | | handleConnect(row){ |
| | | this.orderId = row.id |
| | | this.orderId = row.sampleId |
| | | this.orderId0 = row.id |
| | | this.connect = {} |
| | | this.connectVisible=true; |
| | | // this.$axios.post(this.$api.insOrderPlan.upPlanUser2, { |
| | |
| | | // } |
| | | this.loading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.upPlanUser, { |
| | | orderId:this.orderId, |
| | | sampleId:this.orderId, |
| | | userId:this.connect.connectPerson, |
| | | sonLaboratory:this.componentData.entity.sonLaboratory, |
| | | }).then(res => { |
| | |
| | | }, |
| | | handleReview(row){ |
| | | this.state = 2; |
| | | this.orderId = row.id |
| | | this.orderId = row.sampleId |
| | | this.orderId0 = row.id |
| | | this.version = row.version |
| | | this.orderStateId = row.orderStateId |
| | | this.isLook = false |
| | |
| | | lookHistory(row){ |
| | | this.isLook = true |
| | | this.state = 2; |
| | | this.orderId = this.currentHistory.id |
| | | this.orderId = this.currentHistory.sampleId |
| | | this.orderId0 = this.currentHistory.id |
| | | this.version = this.currentHistory.version |
| | | this.orderStateId = this.currentHistory.orderStateId |
| | | this.num1 = row.num |
| | |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="报告下载" :visible.sync="downVisible" width="440px"> |
| | | <p v-for="(item,index) in downList" :key="index" style="text-align: left;">样品编号:{{item.codeUrl}} <el-button type="text" icon="el-icon-download" @click="handleDown(item)">报告下载</el-button></p> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | type: 'text', |
| | | method: 'download', |
| | | disabFun: (row, index) => { |
| | | return row.state != 4 || row.reportId == null |
| | | return !row.reportDtos||row.reportDtos.length==0 |
| | | } |
| | | }, { |
| | | id: 'verify', |
| | |
| | | currentRole:'', |
| | | BZinfo:[], |
| | | BZDialogVisible:false, |
| | | downVisible:false, |
| | | downList:[] |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | }, |
| | | // 下载报告 |
| | | download(row) { |
| | | this.downList = row.reportDtos |
| | | this.downVisible = true; |
| | | }, |
| | | handleDown(row){ |
| | | let url = row.urlS?row.urlS:row.url; |
| | | if(url){ |
| | | url = url.split('.')[0]+'.pdf' |
| | |
| | | //本地 |
| | | // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; |
| | | // const javaApi = 'http://127.0.0.1:8001'; |
| | | const javaApi = 'http://192.168.20.249:8001'; |
| | | const javaApi = 'http://172.20.10.5:8001'; |
| | | |
| | | // //通信测试库 |
| | | // Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080"; |