| | |
| | | <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> |
| | | <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> |
| | |
| | | <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> |
| | | <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=>{ |
| | | item.insProduct.forEach((a,i)=>{ |
| | | this.newUserInfo.forEach(b=>{ |
| | | let obj = { |
| | | inspectionItem:a.inspectionItem, |
| | | outputWorkTime:a.outputWorkTime, |
| | | outputWorkTime:b.timeArr[i], |
| | | inspectionItemSubclass:a.inspectionItemSubclass, |
| | | sample:item.sampleCode, |
| | | insProductId:a.id, |
| | | num:item.num1 |
| | | 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 |