From d2e867966539004b6b5a73ae3566a659ac6f8b6d Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 30 十月 2025 11:55:34 +0800
Subject: [PATCH] 检验任务数据分类查询问题修复
---
src/views/business/inspectionTask/inspection.vue | 1518 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 832 insertions(+), 686 deletions(-)
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index f6c7d33..780fbc4 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -1,9 +1,7 @@
<template>
- <div v-loading="loading" class="inspection">
+ <div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);">
<el-row class="title">
- <el-col :span="4" style="padding-left: 20px; text-align: left">妫�楠屽崟璇︽儏
- </el-col>
- <el-col :span="20" style="text-align: right">
+ <el-col v-if="insOrder.ifsOrderType!=='02wg'" :span="8" style="text-align: left;">
<el-form :inline="true" :model="otherForm" class="form-inline" label-width="50px"
style="text-align: right; padding-top: 0; display: inline">
<el-form-item label="娓╁害:" style="margin-bottom: 0">
@@ -17,67 +15,113 @@
<span style="margin-left: 4px">%</span>
</el-form-item>
</el-form>
+ </el-col>
+ <el-col :span="insOrder.ifsOrderType!=='02wg'?16:24" style="text-align: right">
+ <el-button v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'" size="small" type="primary" @click="showMaterialPropsDialog">IFS鐗╂枡灞炴�ф洿鏂�</el-button>
<el-button size="small" type="primary" @click="refreshView">鍒锋柊</el-button>
- <el-button v-if="typeSource === 1" size="small" type="primary" @click="openPurchase">杩涜揣楠岃瘉</el-button>
- <el-button v-if="state === 1 && typeSource === 1" size="small" type="primary"
+ <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">杩涜揣楠岃瘉</el-button>
+ <el-button v-if="state == 1 && [0,1].includes(typeSource)" size="small" type="primary"
@click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button>
- <el-button size="small" type="primary" @click="
- sampleVisible = true;
- uploadSample();
- ">鏍峰搧鍒囨崲</el-button>
- <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">浠诲姟鍒囨崲</el-button>
+ <el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">鏍峰搧鍒囨崲</el-button>
+ <!-- <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">浠诲姟鍒囨崲</el-button>-->
<el-button v-if="state == 1" size="small" type="primary" @click="addVerifyDia = true">鎻愪氦</el-button>
<!-- 澶嶆牳 -->
<el-button v-if="state == 2" size="medium" type="primary" @click="openAddCheck">閫氳繃</el-button>
<el-button v-if="state == 2" size="medium" @click="upInsReview(0)">涓嶉�氳繃</el-button>
<el-button type="primary" size="small" @click="exportTable('myTable')">涓嬭浇鍘熷璁板綍</el-button>
- <el-button size="small" @click="$emit('goback')">杩斿洖</el-button>
+ <el-button size="small" @click="goback">杩斿洖</el-button>
</el-col>
</el-row>
<div class="search">
- <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">
- <el-form-item label="濮旀墭缂栧彿:">
- <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏍峰搧缂栧彿:">
- <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">
- <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-tooltip>
- </el-form-item>
- <el-form-item label="鏍峰搧鍚嶇О:">
- <el-input v-model="currentSample.sample" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏍峰搧鏁伴噺:">
- <el-input v-model="sampleProduct.length" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏍峰搧鍨嬪彿:">
- <el-input v-model="currentSample.model" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="涓嬪彂鏃堕棿:">
- <el-input v-model="insOrder.sendTime" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="绱ф�ョ▼搴�:">
- <el-input v-model="insOrder.typeName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="绾﹀畾鏃堕棿:">
- <el-input v-model="insOrder.appointed" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item v-if="typeSource === 1" label="鎶芥鏁伴噺:">
- <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item v-if="typeSource === 1" label="鍘傚瀵嗗害:">
- <el-input v-model="supplierDensity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="褰撳墠鏍峰搧浣嶆暟:">
- <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>
- </el-form-item>
- <el-form-item label="澶囨敞:">
- <!-- <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>-->
- <el-input v-model="insOrder.remark" :disabled="state !== 1" clearable placeholder="璇疯緭鍏�" size="small"
- @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
- <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> -->
- </el-form-item>
- </el-form>
+<!-- <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">-->
+<!-- <el-form-item label="濮旀墭缂栧彿:">-->
+<!-- <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鏍峰搧缂栧彿:">-->
+<!-- <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">-->
+<!-- <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-tooltip>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鏍峰搧鍚嶇О:">-->
+<!-- <el-input v-model="currentSample.sample" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鏍峰搧鏁伴噺:">-->
+<!-- <el-input v-model="sampleProduct.length" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鏍峰搧鍨嬪彿:">-->
+<!-- <el-input v-model="currentSample.model" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="涓嬪彂鏃堕棿:">-->
+<!-- <el-input v-model="insOrder.sendTime" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="绱ф�ョ▼搴�:">-->
+<!-- <el-input v-model="insOrder.typeName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="绾﹀畾鏃堕棿:">-->
+<!-- <el-input v-model="insOrder.appointed" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item v-if="typeSource === 1" label="鎶芥鏁伴噺:">-->
+<!-- <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item v-if="typeSource === 1" label="鍘傚瀵嗗害:">-->
+<!-- <el-input v-model="supplierDensity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="褰撳墠鏍峰搧浣嶆暟:" label-width="120px">-->
+<!-- <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="澶囨敞:">-->
+<!-- <!– <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>–>-->
+<!-- <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="璇疯緭鍏�" size="small"-->
+<!-- @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>-->
+<!-- <!– <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> –>-->
+<!-- </el-form-item>-->
+<!-- <template v-if="insOrder.isSplitOrder && insOrder.isSplitOrder===1">-->
+<!-- <el-form-item label="澶栨姢棰滆壊:">-->
+<!-- <el-input v-model="insOrder.outerColor" clearable disabled placeholder="" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="缁濈紭棰滆壊:">-->
+<!-- <el-input v-model="insOrder.insulationColor" clearable disabled placeholder="" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鐩樺彿:">-->
+<!-- <el-input v-model="insOrder.drumNo" clearable disabled placeholder="" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- </template>-->
+<!-- </el-form>-->
+<!-- -->
+ <el-descriptions title="妫�楠屽崟姒傚喌" :column="4" border>
+ <template v-if="insOrder.ifsOrderType">
+ <el-descriptions-item label="闆朵欢鍙�">{{insOrder.partNo}}</el-descriptions-item>
+ <el-descriptions-item label="闆朵欢鍚嶇О">{{insOrder.partDetail}}</el-descriptions-item>
+ <el-descriptions-item label="鎵规鍙�">{{ insOrder.lotBatchNo }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鍨嬪彿" >{{currentSample.model}}</el-descriptions-item>
+ <el-descriptions-item label="鎶芥鏁伴噺">{{insOrder.testQuantity}}</el-descriptions-item>
+ <el-descriptions-item label="鍘傚瀵嗗害">{{supplierDensity}}</el-descriptions-item>
+ <template v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'">
+ <el-descriptions-item label="杞藉叿缂栧彿">{{insOrder.drumNo}}</el-descriptions-item>
+ <el-descriptions-item label="璧峰绫虫爣(km)">{{insOrder.startMeterMark}}</el-descriptions-item>
+ <el-descriptions-item label="鎴绫虫爣(km)">{{insOrder.endMeterMark}}</el-descriptions-item>
+ <el-descriptions-item label="鍏ュ簱闀垮害(km)">{{calcInbondLength(insOrder.startMeterMark,insOrder.endMeterMark)}}</el-descriptions-item>
+ <el-descriptions-item label="缁濈紭棰滆壊">{{insOrder.insulationColor}}</el-descriptions-item>
+ <el-descriptions-item label="澶栨姢棰滆壊">{{insOrder.outerColor}}</el-descriptions-item>
+ <el-descriptions-item label="鍗板瓧淇℃伅">{{insOrder.letteringInfo}}</el-descriptions-item>
+ </template>
+ </template>
+ <template v-else>
+ <el-descriptions-item label="濮旀墭缂栧彿">{{ insOrder.entrustCode }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧缂栧彿">{{ currentSample.sampleCode }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鍚嶇О">{{ currentSample.sample }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鏁伴噺">{{ sampleProduct.length }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鍨嬪彿">{{ currentSample.model }}</el-descriptions-item>
+ <el-descriptions-item label="涓嬪彂鏃堕棿">{{ insOrder.sendTime }}</el-descriptions-item>
+ <el-descriptions-item label="绱ф�ョ▼搴�">{{ insOrder.typeName }}</el-descriptions-item>
+ <el-descriptions-item label="绾﹀畾鏃堕棿">{{ insOrder.appointed }}</el-descriptions-item>
+ </template>
+ <el-descriptions-item label="褰撳墠鏍峰搧浣嶆暟"><el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag></el-descriptions-item>
+ <el-descriptions-item label="澶囨敞">
+ <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="璇疯緭鍏�" size="small"
+ @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
+ </el-descriptions-item>
+ </el-descriptions>
</div>
<div class="center">
<div class="search" style="
@@ -94,8 +138,8 @@
</el-radio-group>
</div>
<div style="display: flex; align-items: center">
- <el-button v-if="state === 1" size="small" type="primary" @click="openAddUnpass">鏂板涓嶅悎鏍煎娴�</el-button>
- <el-button v-if="state === 1" size="small" type="primary" @click="unpassCheck">涓嶅悎鏍煎娴�</el-button>
+ <el-button v-if="state == 1" size="small" type="primary" @click="openAddUnpass">鏂板涓嶅悎鏍煎娴�</el-button>
+ <el-button v-if="state == 1" size="small" type="primary" @click="unpassCheck">涓嶅悎鏍煎娴�</el-button>
<el-button v-if="state > 1" size="small" type="primary" @click="viewUnpassCheck">鏌ョ湅涓嶅悎鏍煎娴�</el-button>
<span v-if="cableTagList.length > 0"> 鐢电紗閰嶇疆锛�</span>
<el-select v-if="cableTagList.length > 0" v-model="currentTab" clearable placeholder="璇烽�夋嫨" size="small"
@@ -144,79 +188,69 @@
<el-button :loading="dataAcquisitionLoading" v-if="state == 1" size="small" type="primary"
@click="getDataAcquisitionDevice">鏁版嵁閲囬泦</el-button>
<el-button :type="dataAcquisitionEidtAble ? '' : 'primary'" v-if="state == 1" size="small"
- @click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble">{{ dataAcquisitionEidtAble ? "鍏抽棴缂栬緫" : "缂栬緫鏁伴噰"
+ @click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble,disconnect()">{{ dataAcquisitionEidtAble ? "鍏抽棴缂栬緫" : "缂栬緫鏁伴噰"
}}</el-button>
</div>
</div>
<!-- 甯歌妫�楠屽師濮嬭褰� -->
- <div v-if="
- !tableLists.find((m) => m.templateId == currentTable) ||
- (tableLists.find((m) => m.templateId == currentTable).templateName !=
- '娓╁害寰幆妫�楠屽師濮嬭褰�' &&
- !tableLists
- .find((m) => m.templateId == currentTable)
- .templateName.includes('鐑惊鐜�') &&
- !tableLists
- .find((m) => m.templateId == currentTable)
- .templateName.includes('娓╁崌璇曢獙') &&
- tableLists.find((m) => m.templateId == currentTable).templateName !=
- '寮у瀭鐗规�ф楠屽師濮嬭褰�')
- " id="nav" v-loading="tableLoading" class="center-box">
- <table v-for="(item, index) in tableList" :key="index + currentTable + currentSample.id" border="1"
- cellpadding="10" class="tables" id="myTable">
- <tbody>
- <tr style="white-space: nowrap">
- 濮旀墭缂栧彿锛歿{
- insOrder.entrustCode
- }}
- </tr>
- <tr v-for="(m, i) in item.arr" :key="i">
- <td v-for="(n, j) in m" v-if="n.v.mc == undefined || Object.keys(n.v.mc).length === 4"
- :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c" :key="j"
- :colspan="n.v.mc && n.v.mc.cs ? n.v.mc.cs : 1" :rowspan="n.v.mc && n.v.mc.rs ? n.v.mc.rs : 1" :style="`background:${n.v.bg ? n.v.bg : ''};color:${n.v.fc
- };font-size:${n.v.fs}px;width:${handleWidth(
- n
- )}px !important;height:${item.style.rowlen[n.r]}px;font-wight:${n.v.bl ? 'bold' : ''
- };`">
- <div :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]
- }px;`" class="content">
- <template v-if="
- n.v.ps != undefined &&
- typeof n.v.ps.value === 'string' &&
- n.v.ps.value.includes('妫�楠屽��') &&
- state == 1
- ">
- <el-input v-if="getInspectionValueType(n.i) == 1"
- :key="'abc-' + '000' + index + '000' + i + '000' + j" v-model="n.v.v" :disabled="(getInspectionItemType(n.i) == 1 &&
- !dataAcquisitionEidtAble) ||
+ <div id="nav" v-loading="tableLoading" class="center-box">
+ <template v-if="
+ tableLists.find((m) => m.templateId == currentTable)">
+ <table v-for="(item, index) in tableList" :key="index + currentTable + currentSample.id" border="1"
+ cellpadding="10" class="tables" id="myTable">
+ <tbody>
+ <tr style="white-space: nowrap">
+ 濮旀墭缂栧彿锛歿{
+ insOrder.entrustCode
+ }}
+ </tr>
+ <tr v-for="(m, i) in item.arr" :key="i">
+ <td v-for="(n, j) in m" v-if="n.v.mc == undefined || Object.keys(n.v.mc).length === 4"
+ :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c" :key="j"
+ :colspan="n.v.mc && n.v.mc.cs ? n.v.mc.cs : 1" :rowspan="n.v.mc && n.v.mc.rs ? n.v.mc.rs : 1" :style="`background:${n.v.bg ? n.v.bg : ''};color:${n.v.fc
+ };font-size:${n.v.fs}px;width:${handleWidth(
+ n
+ )}px !important;height:${item.style.rowlen[n.r]}px;font-wight:${n.v.bl ? 'bold' : ''
+ };`">
+ <div :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]
+ }px;`" class="content">
+ <template v-if="
+ n.v.ps != undefined &&
+ typeof n.v.ps.value === 'string' &&
+ n.v.ps.value.includes('妫�楠屽��') &&
+ state == 1
+ ">
+ <el-input v-if="getInspectionValueType(n.i) == 1"
+ :key="'abc-' + '000' + index + '000' + i + '000' + j" v-model="n.v.v" :disabled="(getInspectionItemType(n.i) == 1 &&
+ !dataAcquisitionEidtAble) ||
+ (n.u != userId && n.u != undefined && n.u != '')
+ " class="table_input" @change="(m) =>
+ changeInput(
+ m,
+ `${item.templateId}-${n.r}-${n.c}-${n.i}`,
+ n,
+ 'getDataType'
+ )
+ " @input="handleInput(n)" @mousewheel.native.prevent @keydown.enter="
+ changeInput(
+ '',
+ `${item.templateId}-${n.r}-${n.c}-${n.i}`,
+ n,
+ 'getDataType'
+ )
+ ">
+ </el-input>
+ <el-input v-else-if="getInspectionValueType(n.i) == 2" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 ||
(n.u != userId && n.u != undefined && n.u != '')
- " class="table_input" @change="(m) =>
+ " class="table_input" type="textarea" @change="(m) =>
changeInput(
m,
`${item.templateId}-${n.r}-${n.c}-${n.i}`,
n,
'getDataType'
)
- " @input="handleInput(n)" @mousewheel.native.prevent @keydown.enter="
- changeInput(
- '',
- `${item.templateId}-${n.r}-${n.c}-${n.i}`,
- n,
- 'getDataType'
- )
- ">
- </el-input>
- <el-input v-else-if="getInspectionValueType(n.i) == 2" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 ||
- (n.u != userId && n.u != undefined && n.u != '')
- " class="table_input" type="textarea" @change="(m) =>
- changeInput(
- m,
- `${item.templateId}-${n.r}-${n.c}-${n.i}`,
- n,
- 'getDataType'
- )
- " />
- <!-- <el-select v-else-if="getInspectionValueType(n.i) == 5" v-model="n.v.v" :disabled="state > 1 ||
+ " />
+ <!-- <el-select v-else-if="getInspectionValueType(n.i) == 5" v-model="n.v.v" :disabled="state > 1 ||
getInspectionItemType(n.i) == 1 ||
(n.u != userId && n.u != undefined && n.u != '')
" class="table_input" @change="(m) =>
@@ -229,139 +263,135 @@
" @visible-change="(e) => getDic(e, n.i)">
<el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option>
</el-select> -->
- <span v-else-if="getInspectionValueType(n.i) == 4"
- :style="`font-family:${n.v.ff} !important;`">/</span>
- </template>
- <template v-else-if="n.v.ps != undefined && n.v.ps.value === '缁撹'">
- <el-select v-if="
- (getInspectionValueType(n.i) == 2 ||
- getInspectionValueType(n.i) == 5) &&
+ <span v-else-if="getInspectionValueType(n.i) == 4"
+ :style="`font-family:${n.v.ff} !important;`">/</span>
+ </template>
+ <template v-else-if="n.v.ps != undefined && n.v.ps.value === '缁撹'">
+ <el-select v-if="
+ (getInspectionValueType(n.i) == 2 ||
+ getInspectionValueType(n.i) == 5) &&
+ state == 1
+ " v-model="n.v.v" class="table_input" @change="(m) =>
+ changeInput(
+ m,
+ `${item.templateId}-${n.r}-${n.c}-${n.i}`,
+ n,
+ 'getDataType',
+ 'changeSelect'
+ )
+ ">
+ <el-option :value="1" label="鍚堟牸"></el-option>
+ <el-option :value="0" label="涓嶅悎鏍�"></el-option>
+ <el-option :value="3" label="涓嶅垽瀹�"></el-option>
+ <el-option :value="2" label="寰呭畾"></el-option>
+ </el-select>
+ <template v-if="state > 1">
+ <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;`">鍚堟牸</span>
+ <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">涓嶅悎鏍�</span>
+ <span v-else-if="n.v.v === 3"
+ :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">涓嶅垽瀹�</span>
+ <span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span>
+ </template>
+ <template v-if="getInspectionValueType(n.i) != 2 &&
+ state == 1">
+ <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;`">鍚堟牸</span>
+ <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">涓嶅悎鏍�</span>
+ <span v-else-if="n.v.v === 3"
+ :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">涓嶅垽瀹�</span>
+ <span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span>
+ </template>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined &&
+ n.v.ps.value === '璁惧缂栫爜' &&
state == 1
- " v-model="n.v.v" class="table_input" @change="(m) =>
- changeInput(
- m,
- `${item.templateId}-${n.r}-${n.c}-${n.i}`,
- n,
- 'getDataType',
- 'changeSelect'
- )
- ">
- <el-option :value="1" label="鍚堟牸"></el-option>
- <el-option :value="0" label="涓嶅悎鏍�"></el-option>
- <el-option :value="3" label="涓嶅垽瀹�"></el-option>
- <el-option :value="2" label="寰呭畾"></el-option>
- </el-select>
- <template v-if="state > 1">
- <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;`">鍚堟牸</span>
- <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">涓嶅悎鏍�</span>
- <span v-else-if="n.v.v === 3"
- :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">涓嶅垽瀹�</span>
- <span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span>
- </template>
- <template v-if="
- PROJECT == '妫�娴嬩腑蹇�' ||
- (PROJECT == '瑁呭鐢电紗' &&
- getInspectionValueType(n.i) != 2 &&
- state == 1)
">
- <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;`">鍚堟牸</span>
- <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">涓嶅悎鏍�</span>
- <span v-else-if="n.v.v === 3"
- :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">涓嶅垽瀹�</span>
- <span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span>
+ <span>{{ n.v.v }}</span>
</template>
- </template>
- <template v-else-if="
- n.v.ps != undefined &&
- n.v.ps.value === '璁惧缂栫爜' &&
- state == 1
- ">
- <span>{{ n.v.v }}</span>
- </template>
- <template v-else-if="
- n.v.ps != undefined && n.v.ps.value === '璁惧鍚嶇О'
- ">
- <el-select v-model="n.v.v" :disabled="state > 1" class="table_input" filterable multiple
- placeholder="璁惧" remote @change="(val) => changeEquip(val, n)"
- @visible-change="(e) => getEquipOptions(e, n.i)">
- <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value">
- {{ item.label + "--" + item.value }}
- </el-option>
- </el-select>
- </template>
- <template v-else-if="
- n.v.ps != undefined &&
- n.v.ps.value === '瑕佹眰鍊�' &&
- state == 1
- ">
- <span :style="`font-family:${n.v.ff} !important;`">{{
- getTell(n.i)
- }}</span>
- </template>
- <template v-else-if="
- n.v.ps != undefined &&
- n.v.ps.value === '璁$畻鍊�' &&
- state == 1
- "><span :style="`font-family:${n.v.ff} !important;`">{{
- toFixed(n.v.v, n.v.ct)
- }}</span></template>
- <template v-else-if="
- n.v.ps != undefined &&
- n.v.ps.value === '鏈�缁堝��' &&
- state == 1
- ">
- <span :style="`font-family:${n.v.ff} !important;`">{{
+ <template v-else-if="
+ n.v.ps != undefined && n.v.ps.value === '璁惧鍚嶇О'
+ ">
+ <el-select v-model="n.v.v" :disabled="state > 1" class="table_input" filterable multiple
+ placeholder="璁惧" remote @change="(val) => changeEquip(val, n)"
+ @visible-change="(e) => getEquipOptions(e, n.i)">
+ <el-option v-for="item in equipOptions" :key="item.value" :label="item.label"
+ :value="item.value">
+ {{ item.label + "--" + item.value }}
+ </el-option>
+ </el-select>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined &&
+ n.v.ps.value === '瑕佹眰鍊�' &&
+ state == 1
+ ">
+ <span :style="`font-family:${n.v.ff} !important;`">{{
+ getTell(n.i)
+ }}</span>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined &&
+ n.v.ps.value === '璁$畻鍊�' &&
+ state == 1
+ "><span :style="`font-family:${n.v.ff} !important;`">{{
toFixed(n.v.v, n.v.ct)
- }}</span>
- </template>
- <template v-else-if="
- n.v.ps != undefined && n.v.ps.value === '鏍峰搧缂栧彿'
- ">
- <div :title="currentSample.sampleCode" style="
+ }}</span></template>
+ <template v-else-if="
+ n.v.ps != undefined &&
+ n.v.ps.value === '鏈�缁堝��' &&
+ state == 1
+ ">
+ <span :style="`font-family:${n.v.ff} !important;`">{{
+ toFixed(n.v.v, n.v.ct)
+ }}</span>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined && n.v.ps.value === '鏍峰搧缂栧彿'
+ ">
+ <div :title="currentSample.sampleCode" style="
display: flex;
flex-wrap: nowrap;
align-items: center;
width: 100%;
">
- <i v-if="!currentFiberOpticTape && !currentFiberOptic" class="el-icon-caret-left table_caret"
- style="width: 16px" @click="caretSample(-1)"></i>
- <div
- :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`">
- {{ currentSample.sampleCode }}
+ <i class="el-icon-caret-left table_caret" style="width: 16px" @click="caretSample(-1)"></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" @click="caretSample(1)"></i>
</div>
- <i v-if="!currentFiberOpticTape && !currentFiberOptic" class="el-icon-caret-right table_caret"
- style="width: 16px" @click="caretSample(1)"></i>
- </div>
- </template>
- <template v-else-if="
- n.v.ps != undefined && n.v.ps.value === '鏍峰搧鍨嬪彿'
- ">
- <div v-if="
- currentSample.model !== undefined &&
- currentSample.model !== null
- " :style="`font-family:${n.v.ff} !important;`">
- {{ currentSample.model }}
- </div>
- </template>
- <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)"></span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined && n.v.ps.value === '鏍峰搧鍨嬪彿'
+ ">
+ <div v-if="
+ currentSample.model !== undefined &&
+ currentSample.model !== null
+ " :style="`font-family:${n.v.ff} !important;`">
+ {{ currentSample.model }}
+ </div>
+ </template>
+ <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)"></span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </template>
</div>
<el-upload v-if="state == 1" ref="upload" :action="action" :before-upload="beforeUpload" :data="{
orderId: id,
- }" :headers="headers" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
- accept=".jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar" style="width: 80px !important">
+ }" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
+ accept=".jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar"
+ style="width: 80px !important;margin-top: 10px;">
<el-button v-if="state == 1" size="small" type="primary">闄勪欢涓婁紶</el-button></el-upload>
<lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
- :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
- <!-- <ValueTable :key="upIndex" ref="fileList" :componentData="componentData0" :delUrl="$api.insOrderPlan.delfile"
- :url="$api.insOrderPlan.getFileList" class="value-table" style="height: 100%; margin-top: 16px" /> -->
+ :height="'calc(100vh - 290px)'" @pagination="pagination" style="height: 100%; margin-top: 16px"></lims-table>
</div>
<el-drawer :size="550" :visible.sync="sampleVisible" title="鏍峰搧鍒囨崲">
<el-table v-if="sampleVisible" ref="productTable" :current-row-key="currentKey" :data="sampleProduct"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
:row-class-name="tableRowClassName" :row-key="(record) => record.index" border class="el-table" height="100%"
highlight-current-row tooltip-effect="dark" @row-click="handleChangeSample">
<el-table-column :key="Math.random()" align="center" label="搴忓彿" type="index" width="70px">
@@ -374,7 +404,6 @@
size="medium" style="margin-right: 5px">{{ item.label }}</el-tag>
</template>
</el-table-column>
- <el-table-column label="妫�楠屼汉" min-width="80px" prop="checkName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" label="鏄惁鐣欐牱" prop="isLeave" show-overflow-tooltip width="95px">
<template slot-scope="scope">
<span>{{ scope.row.isLeave == 0 ? "鍚�" : "鏄�" }}</span>
@@ -390,8 +419,8 @@
</el-table>
</el-drawer>
<el-drawer :size="500" :visible.sync="taskVisible" title="浠诲姟鍒囨崲">
- <!-- <ValueTable :key="upIndex" ref="insOrderPlan" :componentData="componentData"
- :url="$api.insOrderPlan.inspectionOrderDetailsTaskSwitching" class="value-table" style="height: 100%" /> -->
+ <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0"
+ :height="'calc(100vh - 90px)'" :currentChange="handleChangeTask"></lims-table>
</el-drawer>
<el-dialog :visible.sync="reviewDia" title="妫�楠屽鏍�" width="500px">
<div v-if="reviewDia" class="body" style="display: flex; padding: 10px">
@@ -440,67 +469,76 @@
<td :rowspan="item.child.length">{{ item.faName }}</td>
<td>{{ item.child[0].name }}</td>
<td style="text-align: left">
+ <!-- 娣诲姞瀹瑰櫒 div -->
+ <div class="data-collection-items">
<el-select v-if="item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1"
:multiple-limit="item.child[0].maxNum" clearable filterable multiple placeholder="璇烽�夋嫨"
@change="setData(item)">
- <el-option v-for="(item, index) in item.child[0].arr" :key="index" :filter-method="filterMethod"
- :label="index + 1 + '^' + item.result" :value="index + '^' + item.result">
+ <el-option v-for="(subItem, subIndex) in item.child[0].arr" :key="index + '-' + subIndex" :filter-method="filterMethod"
+ :label="subIndex + 1 + '^' + subItem.result" :value="subIndex + '^' + subItem.result">
<span>{{
"搴忓彿锛�" +
- (index + 1) +
+ (subIndex + 1) +
"锛�" +
"缁撴灉锛�" +
- item.result +
+ subItem.result +
"锛�" +
"鍘氬害锛�" +
- item.thickness +
+ subItem.thickness +
"锛�" +
"鏃堕棿锛�" +
- item.mergedDateTime
+ subItem.mergedDateTime
}}</span>
</el-option>
</el-select>
<el-checkbox-group v-if="!item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1"
:max="item.child[0].maxNum">
- <el-checkbox v-for="(n, j) in item.child[0].arr" :key="j" :label="j + '^' + n">{{ n }}</el-checkbox>
+ <el-checkbox v-for="(n, j) in item.child[0].arr" :key="index + '-' + j + 'aaaaaa'" :label="j + '^' + n"
+ @change="handleGroupSelect(item.child[0], j, item.child[0].arr.length)" >{{ n }}</el-checkbox>
</el-checkbox-group>
- </td>
- </tr>
- <tr v-for="(m, i) in item.child" v-show="i > 0" :key="i + 'bbbbbbbbbbbbbb'">
- <td>{{ m.name }}</td>
- <td style="text-align: left">
+ </div>
+ </td>
+ </tr>
+ <tr v-for="(m, i) in item.child" v-show="i > 0" :key="index + '-' + i + 'bbbbbbbbbbbbbb'">
+ <td>{{ m.name }}</td>
+ <td style="text-align: left">
+ <!-- 娣诲姞瀹瑰櫒 div -->
+ <div class="data-collection-items">
<el-select v-if="m.isShowSelect" v-model="m.getDataIndex1" :multiple-limit="m.maxNum" clearable
filterable multiple placeholder="璇烽�夋嫨">
- <el-option v-for="(item, index1) in m.arr" :key="index1" :label="index + 1 + '^' + item.result"
- :value="index1 + '^' + item.result">
+ <el-option v-for="(subItem, index1) in m.arr" :key="index + '-' + index1 + 'cccccccc'"
+ :label="index1 + 1 + '^' + subItem.result" :value="index1 + '^' + subItem.result">
<span>{{
"搴忓彿锛�" +
(index1 + 1) +
"锛�" +
"缁撴灉锛�" +
- item.result +
+ subItem.result +
"锛�" +
"鍘氬害锛�" +
- item.thickness +
+ subItem.thickness +
"锛�" +
"鏃堕棿锛�" +
- item.mergedDateTime
+ subItem.mergedDateTime
}}</span>
</el-option>
</el-select>
<el-checkbox-group v-if="!m.isShowSelect" v-model="m.getDataIndex1" :max="m.maxNum">
- <el-checkbox v-for="(n, j) in m.arr" :key="j" :label="j + '^' + n">{{ n }}</el-checkbox>
+ <el-checkbox v-for="(n, j) in m.arr" :key="index + '-' + j + 'dddddddd'" :label="j + '^' + n"
+ @change="handleGroupSelect(m, j, m.arr.length)" >{{ n }}</el-checkbox>
</el-checkbox-group>
- </td>
- </tr>
- </template>
- </table>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dataGetDia = false">鍙� 娑�</el-button>
- <el-button :loading="getDataIndexLoading" type="primary" @click="submitDataGet()">纭� 瀹�</el-button>
- </span>
- </el-dialog>
+ </div>
+ </td>
+ </tr>
+ </template>
+ </table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dataGetDia = false">鍙� 娑�</el-button>
+ <el-button :loading="getDataIndexLoading" type="primary" @click="submitDataGet()">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+
<el-dialog :close-on-click-modal="false" :visible.sync="addCheck" title="鎸囧畾鎶ュ憡瀹℃牳浜哄憳" width="400px"
@close="closeAddVerifyDia">
<div class="body" style="display: flex; padding: 10px; align-items: center">
@@ -519,44 +557,75 @@
<el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <!-- 娣诲姞涓嶅悎鏍煎娴嬪脊妗�-->
<add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog"
@resetAddUnPass="resetAddUnPass"></add-un-pass>
- <!-- <UnPassDialog
- v-if="unPassDialog"
- ref="unPassDialog"
- :orderId="orderId"
- :unPassDialog="unPassDialog"
- @resetForm="resetForm"
- ></UnPassDialog> -->
- <!-- <InspectionWord
- v-if="unPassCheck"
- :inspectorList="inspectorList"
- :orderId="orderId"
- :rawMaterialTag="rawMaterialTag"
- :sonLaboratory="sonLaboratory"
- :state="state"
- :typeSource="typeSource"
- :unPassCheck="unPassCheck"
- @closeUnPassCheckDialog="closeUnPassCheckDialog"
- @refreshView="refreshView"
- /> -->
- <!-- <purchase-verification
- v-if="purchaseDialog"
- ref="purchaseDialog"
- :orderId="orderId"
- :purchaseDialog="purchaseDialog"
- @resetPurchaseDialog="resetPurchaseDialog"
- ></purchase-verification> -->
+ <!-- 涓嶅悎鏍煎鐞嗗脊妗�-->
+ <UnPassDialog v-if="unPassDialog" ref="unPassDialog" :orderId="orderId" :unPassDialog="unPassDialog"
+ @resetForm="resetForm"></UnPassDialog>
+ <!-- 涓嶅悎鏍煎娴嬪脊妗�-->
+ <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId"
+ :cableTag="temCableTag" :repetitionTag="repetitionTag"
+ :rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource"
+ :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" />
+ <!-- 杩涜揣楠岃瘉寮规-->
+ <purchase-verification v-if="purchaseDialog" ref="purchaseDialog" :orderId="orderId"
+ :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
+ <!--鏌ョ湅宸ユ椂寮规-->
+ <viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia>
+<!-- IFS鐗╂枡灞炴�х紪杈戝脊妗�-->
+ <el-dialog
+ title="鏇存柊IFS搴撳瓨鐗╂枡鎵规灞炴��"
+ :visible.sync="ifsMaterialPropsVisible"
+ width="20%">
+ <el-form style="width:100%" :model="ifsMaterialPropsForm">
+ <el-form-item label="杞藉叿缂栧彿(Attr1):">
+ <el-input placeholder="杞藉叿缂栧彿" size="small" v-model="ifsMaterialPropsForm.drumNo"></el-input>
+ </el-form-item>
+ <el-form-item label="璧峰绫虫爣(Attr2):">
+ <el-input @blur="validateQuality()" placeholder="璧峰绫虫爣" size="small" v-model="ifsMaterialPropsForm.startMeterMark">
+ <span slot="suffix">km</span>
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鎴绫虫爣(Attr3):">
+ <el-input @blur="validateQuality()" placeholder="鎴绫虫爣" size="small" v-model="ifsMaterialPropsForm.endMeterMark">
+ <span slot="suffix">km</span>
+ </el-input>
+ </el-form-item>
+<!-- <el-form-item label="鍏ュ簱闀垮害">-->
+<!-- <el-input v-model="ifsMaterialPropsForm.inboundLength"></el-input>-->
+<!-- </el-form-item>-->
+ <el-form-item label="澶栨姢棰滆壊(Attr4):">
+ <el-select size="small" v-model="ifsMaterialPropsForm.outerColor">
+ <el-option v-for="(item,index) in outerColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="缁濈紭棰滆壊(Attr5):">
+ <el-select size="small" v-model="ifsMaterialPropsForm.insulationColor">
+ <el-option v-for="(item,index) in insulationColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鍗板瓧淇℃伅(Attr8):">
+ <el-select size="small" v-model="ifsMaterialPropsForm.letteringInfo" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item,index) in letteringInfoList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closePartPropDialog()">鍙� 娑�</el-button>
+ <el-button type="primary" @click="saveOrUpdatePartProp()">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
<script>
import excelFunction from "@/utils/excelFountion";
import limsTable from "@/components/Table/lims-table.vue";
-// import UnPassDialog from "../b1-unpass-manage/unPassDialog.vue";
-// import AddUnPass from "../b1-unpass-manage/addUnPass.vue";
-// import InspectionWord from "./InspectionWord.vue";
-// import PurchaseVerification from "../b1-unpass-manage/PurchaseVerification.vue";
+import UnPassDialog from "../unpass/components/unPassDialog.vue";
+import AddUnPass from "../unpass/components/addUnPass.vue";
+import InspectionWord from "./components/InspectionWord.vue";
+import PurchaseVerification from "../unpass/components/PurchaseVerification.vue";
import {
doInsOrder,
getCableTag,
@@ -565,8 +634,6 @@
dataCollection,
write,
getInsProduct,
- getReportModel,
- determineWhetherToCollectData,
search,
verifyPlan,
checkSubmitPlan,
@@ -575,21 +642,44 @@
selectUserCondition,
downFile,
getFileList,
- delfile
+ delfile,
+ inspectionOrderDetailsTaskSwitching
} from "@/api/business/inspectionTask.js";
+import InspectionWorker from '@/workers/InspectionWorker.worker.js';
+import DataWorker from '@/workers/DataWorker.worker.js';
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
+import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
+import {connect,disconnect,weightList} from "@/utils/connect";
+import {getOneByIfsId,saveOrUpdateProps} from "@/api/business/ifsPartProps.js";
+import {getDicts} from "@/api/system/dict/data";
export default {
- // props: ["sonLaboratory", "orderId", "state", "inspectorList", "typeSource"],
+ name: 'Inspection',
components: {
- // PurchaseVerification,
- // AddUnPass,
+ viewManHourDia,
+ PurchaseVerification,
+ AddUnPass,
limsTable,
- // UnPassDialog,
- // InspectionWord,
+ UnPassDialog,
+ InspectionWord,
},
data() {
return {
+ outerColorList:[],
+ insulationColorList:[],
+ letteringInfoList: [],
+ ifsMaterialPropsForm:{
+ id:null,
+ ifsInventoryId: null,
+ drumNo: '', // 杞藉叿缂栧彿
+ startMeterMark: '', // 璧峰绫虫爣
+ endMeterMark: '', // 鎴绫虫爣
+ insulationColor: '', // 缁濈紭棰滆壊
+ outerColor: '', // 澶栨姢棰滆壊
+ inboundLength: '', // 鍏ュ簱闀垮害
+ letteringInfo: '', // 鍗板瓧淇℃伅
+ },
+ ifsMaterialPropsVisible:false,
sonLaboratory: null,
orderId: null,
state: null,
@@ -606,7 +696,6 @@
load: null,
},
dataGetDia: false,
- wareTableDataLoading: false,
fileAdd: false,
sampleVisible: false,
taskVisible: false,
@@ -615,35 +704,10 @@
sampleName: null,
state: null,
},
+ isSerialConnected: false, // 鏂板鐘舵�佸彉閲忥紝涓插彛杩炴帴鐘舵��
+ serialPort: null, // 瀛樺偍涓插彛瀵硅薄
id: null,
- componentData: {
- entity: {
- sonLaboratory: null,
- userId: 0,
- },
- isIndex: false,
- showSelect: false,
- select: false,
- selectMethod: "handleChangeTask",
- sort: false,
- do: [],
- isPage: false,
- linkEvent: {},
- tagField: {
- type: {
- select: [],
- },
- insState: {
- select: [],
- },
- },
- currentId: "",
- selectField: {},
- requiredAdd: [],
- requiredUp: [],
- },
changeType: null,
- getReportModelLoading: false,
insOrder: {},
sampleProduct: [],
supplierDensity: "", // 鍘傚瀵嗗害
@@ -672,30 +736,14 @@
verifyUser: null,
personList: [],
enumList: [],
- fiberOpticVisible: false,
- fiberOpticTapeVisible: false,
- bushingVisible: false,
- fiberOpticTape: [], //鍏夌氦甯﹀垪琛�
- fiberOptic: [], //鍏夌氦鍒楄〃
- bushing: [], //濂楃鍒楄〃
- currentFiberOpticTape: null, //褰撳墠鍏夌氦甯�
- currentFiberOptic: null, //褰撳墠鍏夌氦
- currentBushing: null, //褰撳墠濂楃
tableLoading: false,
upLoading: false,
temptList: null,
- fiber: [],
- fibers: [],
- casing: [],
currentTab: null,
wareForm: {
inspectionItem: 1,
inspectionItemSubclass: "20(甯告俯)",
},
- wareForm0: {},
- numOptions: [],
- temperatureOptions: [],
- wareTableData: [],
otherForm: {
humidity: null,
temperature: null,
@@ -713,18 +761,8 @@
dataAcquisitionInfo: {},
dataAcquisitionInfoNew: {},
dataAcquisitionEidtAble: false,
- isGet: false,
dataAcquisitionLoading: false,
collected: false,
- // 鐑惊鐜�---寮�濮�
- thermalCyclingInfo: {
- max: 0,
- inspectionItem: 1,
- arr: [],
- length: 1,
- inspectionItemClass: null,
- },
- thermalCyclingLoading: false,
temDataAcquisition: false,
getData: [
{
@@ -781,7 +819,7 @@
} else {
return '鏂囦欢'
}
- },
+ }
},
{ label: "闄勪欢鍚嶇О", prop: "fileName" },
{ label: "涓婁紶浜�", prop: "name" },
@@ -816,26 +854,52 @@
size: 10,
current: 0,
},
- tableLoading: false,
// 鏂囦欢鍒楄〃鐩稿叧--缁撴潫
+ // 浠诲姟鍒囨崲鍒楄〃--寮�濮�
+ tableData0: [],
+ column0: [
+ { label: "濮旀墭缂栧彿", prop: "entrustCode", width: '160px' },
+ { label: "妫�楠屽璞�", prop: "sampleType", width: '140px' },
+ {
+ label: "绱ф�ョ▼搴�", prop: "type", dataType: "tag",
+ formatData: (params) => {
+ return this.urgentList.find(m => m.value == params).label
+ },
+ formatType: (params) => {
+ return this.urgentList.find(m => m.value == params).type
+ }
+ },
+ {
+ label: "鐘舵��", prop: "insState", dataType: "tag",
+ formatData: (params) => {
+ return this.typeList.find(m => m.value == params).label
+ },
+ formatType: (params) => {
+ return this.typeList.find(m => m.value == params).type
+ }
+ },
+ { label: "绾﹀畾鏃堕棿", prop: "appointed", width: '140px' },
+ { label: "涓嬪彂鏃堕棿", prop: "sendTime", width: '140px' },
+ ],
+ page0: {
+ total: 0,
+ size: -1,
+ current: -1,
+ },
+ tableLoading0: false,
+ // 浠诲姟鍒囨崲鍒楄〃--缁撴潫
+ isSplit: 0, // 鏄惁鏄媶鍗曡繃鏉ョ殑
};
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
computed: {
...mapGetters(["userId"]),
- headers() {
- return {
- token: sessionStorage.getItem("token"),
- };
- },
action() {
return this.javaApi + "/insOrderPlan/uploadFile";
},
},
created() {
- this.componentData.entity.sonLaboratory = this.sonLaboratory;
- this.getUserInfo();
- let { sonLaboratory, orderId, state, inspectorList, typeSource } =
+ let { sonLaboratory, orderId, state, inspectorList, typeSource,isSplit } =
this.$route.query;
this.sonLaboratory = sonLaboratory;
this.orderId = orderId;
@@ -843,95 +907,30 @@
this.state = state;
this.inspectorList = inspectorList;
this.typeSource = typeSource;
+ this.isSplit = isSplit;
},
mounted() {
this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
this.getInsStateDicts();
this.getComparisonList();
this.getAuthorizedPerson();
- this.scrollInit();
- // this.getPower();
this.startWorker();
+ // this.getList0() // 浠诲姟鍒囨崲
+ this.scrollInit();
+ },
+ activated() {
+ this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
+ this.getInsStateDicts();
+ this.getComparisonList();
+ this.getAuthorizedPerson();
+ this.startWorker();
+ // this.getList0() // 浠诲姟鍒囨崲
+ this.scrollInit();
},
watch: {
// 鐩戝惉浠诲姟id锛岃幏鍙栦换鍔′俊鎭�
id(val) {
- this.loading = true;
- doInsOrder({
- id: val,
- laboratory: this.sonLaboratory,
- }).then(async (res) => {
- this.insOrder = res.data.insOrder;
- this.supplierDensity = res.data.supplierDensity;
- this.getList()
- this.urgentList.forEach((m) => {
- if (m.value == this.insOrder.type) {
- this.insOrder.typeName = m.label;
- }
- });
- this.loading = false;
- if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) {
- this.$emit("goback");
- return this.$message.error("璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�");
- }
- // 璧嬪�煎綋鍓嶆牱鍝佸垪琛�
- this.sampleProduct = res.data.sampleProduct;
- this.currentSample = this.HaveJson(this.sampleProduct[0]);
- let insProduct = this.HaveJson(this.currentSample.insProduct);
- // 娓╁害銆佹箍搴﹁祴鍊�
- this.otherForm = {
- temperature: this.insOrder.temperature
- ? this.insOrder.temperature
- : null,
- humidity: this.insOrder.humidity ? this.insOrder.humidity : null,
- };
- if (this.typeSource == "1") {
- this.getRawMaterialTag(this.currentSample.id); // 鍘熸潗鏂欑殑妫�楠屼换鍔℃煡璇㈡壒鏁�
- this.rawMaterialTag = "1";
- }
- this.getEquipOptions(1);
- // 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」
- let list = await this.getCurrentProduct(this.currentSample.id, 0);
- this.currentSample.insProduct = this.HaveJson(list);
- // 鍒濆鍖栦紶閫掑埌鍚庣鐨勫弬鏁�
- this.param = {};
- this.changeType = 0;
- this.currentSample.insProduct.forEach((a) => {
- // 鏄惁涓烘垚鍝佺數缂嗕笅鐨勬澗濂楃椤圭洰锛屼笉鏄垯鎵ц鍒濆鍖�
- if (this.handleCasing(a.inspectionItem)) {
- this.param[a.id] = {
- insValue: [],
- comValue: [],
- resValue: null,
- equipValue: [],
- equipName: [],
- insResult: null,
- };
- }
- });
- this.determineWhetherToCollectData(); //鏄惁闇�瑕佹暟閲�
- this.getReportModel(this.currentSample.id); //鑾峰彇濂楃銆佸厜绾ゅ甫銆佸厜绾や俊鎭�
- if (this.currentSample.index == undefined)
- this.currentSample["index"] = 1;
- let bushing = this.currentSample.bushing;
- this.getTableLists(); //澶勭悊妯℃澘鍒楄〃淇℃伅
-
- this.componentData.currentId = val;
- this.currentKey = 1;
- this.getCableTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎澶氭妫�楠岀殑鐢电紗閰嶇疆
- this.getRepetitionTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎閲嶅妫�楠岄」
- // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁---涓嬮潰淇℃伅鏆傛椂鍙拷鐣�
- this.fiberOpticTape = [];
- this.currentFiberOpticTape = null;
- this.fiberOptic = [];
- this.currentFiberOptic = null;
- this.bushing = [];
- this.currentBushing = null;
- this.currentTab = null;
- if (bushing && bushing.length > 0) {
- this.bushing = bushing;
- }
- });
+ this.refreshView()
},
// 鐩戝惉褰撳墠妯℃澘鍙樺寲
currentTable(val1, val0) {
@@ -946,18 +945,15 @@
this.currentSample.insProduct = this.HaveJson(list); //璧嬪�煎綋鍓嶆牱鍝佺殑妫�楠岄」
this.param = {}; //鍒濆鍖栦紶鍒板悗绔殑鍙傛暟
this.currentSample.insProduct.forEach((a, j) => {
- if (this.handleCasing(a.inspectionItem)) {
- this.param[a.id] = {
- insValue: [],
- comValue: [],
- resValue: null,
- equipValue: [],
- equipName: [],
- insResult: null,
- };
- }
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
});
- this.getReportModel(this.currentSample.id); //鑾峰彇濂楃銆佸厜绾ゅ甫銆佸厜绾や俊鎭�
// 鍘婚噸妯℃澘锛岃繑鍥炴湁鍑犱釜妯℃澘
const mySet1 = new Set();
this.tableLists = this.currentSample.insProduct.filter((m) => {
@@ -1000,8 +996,95 @@
beforeDestroy() {
// 鍦ㄧ粍浠堕攢姣佸墠纭繚鍋滄 Worker锛岄伩鍏嶅唴瀛樻硠婕�
this.stopWorker();
+ disconnect();
+ // 璋冪敤鍓嶅厛鍒ゆ柇鏂规硶鏄惁瀛樺湪锛岄伩鍏嶆姤閿�
+ if (this.closeSerialPort) {
+ this.closeSerialPort();// 缁勪欢閿�姣佸墠鍏抽棴涓插彛
+ }
},
methods: {
+ validateQuality(){
+ let inboundLength = Number(this.calcInbondLength(this.ifsMaterialPropsForm.startMeterMark,this.ifsMaterialPropsForm.endMeterMark));
+ let testQuantity = Number(this.insOrder.testQuantity);
+ if(inboundLength!=null && testQuantity!==inboundLength){
+ this.$message.warning(`鍏ュ簱闀垮害(${inboundLength}km)涓庢楠屾暟閲�(${testQuantity}km)涓嶇锛岃纭锛乣);
+ }
+ },
+ calcInbondLength(startMeterMark,endMeterMark){
+ let inboundLength = null;
+ if((startMeterMark!=null && startMeterMark!=='') && (endMeterMark!=null&&endMeterMark!=='')){
+ inboundLength = Math.abs(endMeterMark - startMeterMark)
+ }
+ return inboundLength;
+ },
+ getLetteringInfoDicts(){
+ getDicts("lettering_info_type").then(res=>{
+ if(res.code==200){
+ this.letteringInfoList = res.data
+ }
+ })
+ },
+ getInsulationColorDicts(){
+ getDicts("insulation_color_type").then(res=>{
+ if(res.code==200){
+ this.insulationColorList = res.data
+ }
+ })
+ },
+ getOuterColorDicts(){
+ getDicts("outer_color_type").then(res=>{
+ if(res.code==200){
+ this.outerColorList = res.data
+ }
+ })
+ },
+ closePartPropDialog(){
+ this.ifsMaterialPropsForm = {
+ id:null,
+ ifsInventoryId: null,
+ drumNo: '', // 杞藉叿缂栧彿
+ startMeterMark: '', // 璧峰绫虫爣
+ endMeterMark: '', // 鎴绫虫爣
+ insulationColor: '', // 缁濈紭棰滆壊
+ outerColor: '', // 澶栨姢棰滆壊
+ inboundLength: '', // 鍏ュ簱闀垮害
+ letteringInfo: '', // 鍗板瓧淇℃伅
+ }
+ this.ifsMaterialPropsVisible = false;
+ },
+ getPartProps(ifsId){
+ getOneByIfsId(ifsId).then((res)=>{
+ if(res.code==200 && res.data){
+ this.ifsMaterialPropsForm = res.data;
+ }
+ })
+ },
+ saveOrUpdatePartProp(){
+ this.ifsMaterialPropsForm.ifsInventoryId = this.insOrder.ifsInventoryId
+ saveOrUpdateProps({
+ ...this.ifsMaterialPropsForm,
+ partNo: this.insOrder.partNo,
+ lotBatchNo: this.insOrder.lotBatchNo,
+ }).then((res)=>{
+ if(res.code==200){
+ this.$message.success("淇濆瓨鎴愬姛");
+ this.ifsMaterialPropsVisible = false;
+ }
+ })
+ },
+ //鎵撳紑IFS鐗╂枡灞炴�у脊妗�
+ showMaterialPropsDialog(){
+ this.getPartProps(this.insOrder.ifsInventoryId)
+ this.getOuterColorDicts()
+ this.getInsulationColorDicts()
+ this.getLetteringInfoDicts()
+ this.$nextTick(()=>{
+ this.ifsMaterialPropsVisible = true;
+ })
+ },
+ disconnect() {
+ return disconnect
+ },
// 鏂囦欢绠$悊--寮�濮�
getList() {
this.tableLoading = true;
@@ -1029,17 +1112,48 @@
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
type: "warning",
- })
- .then(() => {
- delfile({ id: row.id }).then((res) => {
- if (res.code == 201) return;
- this.$message.success("鍒犻櫎鎴愬姛");
- this.refresh();
- });
- })
- .catch(() => { });
+ }).then(() => {
+ delfile({ id: row.id }).then((res) => {
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.getList();
+ });
+ }).catch(() => { });
},
// 鏂囦欢绠$悊--缁撴潫
+ // 澶勭悊鏁寸粍鍕鹃�夐�昏緫鐨勬柟娉�
+ handleGroupSelect(childItem, clickedIndex, groupSize = 5) {
+ if(groupSize == 6){
+ groupSize = 6;
+ }else{
+ groupSize = 5;
+ }
+ // 璁$畻鎵�鍦ㄧ粍鐨勮捣濮嬬储寮�
+ const groupStartIndex = Math.floor(clickedIndex / groupSize) * groupSize;
+ // 娓呯┖褰撳墠宸查��
+ childItem.getDataIndex1 = [];
+ // 閬嶅巻褰撳墠缁勭殑 groupSize 涓厓绱狅紝娣诲姞鍒伴�変腑鍒楄〃
+ for (let i = groupStartIndex; i < groupStartIndex + groupSize && i < childItem.arr.length; i++) {
+ childItem.getDataIndex1.push(i + '^' + childItem.arr[i]);
+ }
+ },
+
+ // 浠诲姟鍒囨崲--寮�濮�
+ getList0() {
+ this.tableLoading0 = true;
+ let param = { userId: this.userId, sonLaboratory: this.sonLaboratory, ...this.page0 };
+ delete param.total;
+ inspectionOrderDetailsTaskSwitching({ ...param })
+ .then((res) => {
+ this.tableLoading0 = false;
+ if (res.code === 200) {
+ this.tableData0 = res.data.records;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading0 = false;
+ });
+ },
+ // 浠诲姟鍒囨崲--缁撴潫
closeAddVerifyDia() {
this.addCheck = false;
@@ -1047,7 +1161,69 @@
},
// 鍒锋柊椤甸潰
refreshView() {
- this.$emit("refreshView");
+ this.loading = true;
+ doInsOrder({
+ id: this.id,
+ laboratory: this.sonLaboratory,
+ }).then(async (res) => {
+ this.insOrder = res.data.insOrder;
+ if(res.data.insOrder.ifsOrderType){
+ //鏌ヨ闆朵欢灞炴��
+ this.getPartProps(res.data.insOrder.ifsInventoryId)
+ }
+ this.supplierDensity = res.data.supplierDensity;
+ this.getList()
+ this.urgentList.forEach((m) => {
+ if (m.value == this.insOrder.type) {
+ this.insOrder.typeName = m.label;
+ }
+ });
+ this.loading = false;
+ if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) {
+ this.goback();
+ return this.$message.error("璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�");
+ }
+ // 璧嬪�煎綋鍓嶆牱鍝佸垪琛�
+ this.sampleProduct = res.data.sampleProduct;
+ this.currentSample = this.HaveJson(this.sampleProduct[0]);
+ let insProduct = this.HaveJson(this.currentSample.insProduct);
+ // 娓╁害銆佹箍搴﹁祴鍊�
+ this.otherForm = {
+ temperature: this.insOrder.temperature
+ ? this.insOrder.temperature
+ : null,
+ humidity: this.insOrder.humidity ? this.insOrder.humidity : null,
+ };
+ if (this.typeSource == "1") {
+ this.getRawMaterialTag(this.currentSample.id); // 鍘熸潗鏂欑殑妫�楠屼换鍔℃煡璇㈡壒鏁�
+ this.rawMaterialTag = "1";
+ }
+ this.getEquipOptions(1);
+ // 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」
+ let list = await this.getCurrentProduct(this.currentSample.id, 0);
+ this.currentSample.insProduct = this.HaveJson(list);
+ // 鍒濆鍖栦紶閫掑埌鍚庣鐨勫弬鏁�
+ this.param = {};
+ this.changeType = 0;
+ this.currentSample.insProduct.forEach((a) => {
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
+ });
+ if (this.currentSample.index == undefined)
+ this.currentSample["index"] = 1;
+ let bushing = this.currentSample.bushing;
+ this.getTableLists(); //澶勭悊妯℃澘鍒楄〃淇℃伅
+
+ this.currentKey = 1;
+ this.getCableTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎澶氭妫�楠岀殑鐢电紗閰嶇疆
+ this.getRepetitionTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎閲嶅妫�楠岄」
+ });
},
closeUnPassCheckDialog() {
this.unPassCheck = false;
@@ -1094,8 +1270,9 @@
id: this.currentSample.id,
type: this.type,
laboratory: this.sonLaboratory,
- cableTag: "",
+ cableTag: this.temCableTag,
rawMaterialTag: this.rawMaterialTag,
+ repetitionTag: this.repetitionTag,
};
this.$nextTick(() => {
this.$refs.addUnPassDialog.getInsOrder(info);
@@ -1127,7 +1304,7 @@
},
// 鎵撳紑杩涜揣楠岃瘉寮规
openPurchase() {
- const operationType = this.state === 1 ? "add" : "view";
+ const operationType = this.state == 1 ? "add" : "view";
this.purchaseDialog = true;
const item = {
id: this.currentSample.id,
@@ -1144,29 +1321,59 @@
this.$refs.purchaseDialog.$refs["purchaseForm"].resetFields();
this.purchaseDialog = false;
},
+
// 鏁版嵁閲囬泦
- getDataAcquisitionDevice() {
- let itemIds = [];
- this.currentSample.insProduct.forEach((item) => {
- if (item.inspectionItemType === "1") {
- itemIds.push(item.id);
+
+ getDataAcquisitionDevice() {
+ (async () => {
+ try {
+ // 妫�鏌ラ〉闈腑妫�娴嬮」鏄惁鍖呭惈瀵嗗害
+ const hasDensityItem = this.currentSample.insProduct.some(item => {
+ // 鍋囪瀵嗗害鐩稿叧鐨勬娴嬮」鍚嶇О鍖呭惈 "瀵嗗害" 鍏抽敭瀛楋紝鍙寜闇�淇敼
+ return item.inspectionItem && item.inspectionItem.includes('瀵嗗害');
+ });
+ if (hasDensityItem) {
+ // 妫�鏌ユ槸鍚︽敮鎸� Web Serial API
+ if ('serial' in navigator) {
+ // 璇锋眰鍙敤涓插彛
+ const ports = await navigator.serial.getPorts();
+ if (ports.length > 0) {
+ await connect();
+ } else {
+ console.log('娌℃湁鍙敤鐨勪覆鍙�');
+ }
+ } else {
+ console.log('褰撳墠娴忚鍣ㄤ笉鏀寔 Web Serial API');
+ }
+ }
+ } catch (error) {
+ console.error('妫�娴嬩覆鍙f椂鍑洪敊:', error);
}
- });
- const params = {
- entrustCode: this.insOrder.entrustCode,
- sampleCode: this.currentSample.sampleCode,
- id: this.currentSample.id,
- itemIds: itemIds,
- };
- this.dataAcquisitionLoading = true;
- dataCollection(params).then((res) => {
- this.dataAcquisitionLoading = false;
- if (res.code != 200) {
- return;
- }
- this.dataAcquisitionInfoNew = this.HaveJson(res.data);
- // 瀵规暟閲囧洖鏉ョ殑鍊艰繘琛屽鐞�
- this.handleDataAcquisition(res.data);
+ })().then(() => {
+ let itemIds = [];
+ this.currentSample.insProduct.forEach((item) => {
+ if (item.inspectionItemType === "1") {
+ itemIds.push(item.id);
+ }
+ });
+ const params = {
+ entrustCode: this.insOrder.entrustCode,
+ sampleCode: this.currentSample.sampleCode,
+ id: this.currentSample.id,
+ itemIds: itemIds,
+ };
+ this.dataAcquisitionLoading = true;
+ dataCollection(params).then((res) => {
+ this.dataAcquisitionLoading = false;
+ if (res.code != 200) {
+ return;
+ }
+ this.dataAcquisitionInfoNew = this.HaveJson(res.data);
+ // 瀵规暟閲囧洖鏉ョ殑鍊艰繘琛屽鐞�
+ this.handleDataAcquisition(res.data);
+ }).catch(err => {
+ this.dataAcquisitionLoading = false;
+ });
});
},
objectOrder(obj) {
@@ -1187,7 +1394,6 @@
this.dataAcquisitionInfo = {};
this.getData = [];
for (let i in this.objectOrder(data)) {
- console.log("i---", i);
let obj = {};
if (i.includes("@")) {
obj = {
@@ -1296,7 +1502,7 @@
} else {
str0 = i + "," + j;
}
- }
+ };
let list = this.tableList[0].arr;
let maxNum = 0;
list.forEach((item, index) => {
@@ -1336,11 +1542,11 @@
n.v.ps.value.includes("妫�楠屽��")
) {
num++;
+ if (str0 == str) {
+ maxNum = num;
+ }
}
});
- if (str0 == str) {
- maxNum = num;
- }
}
// 缁戝畾璁惧
if (
@@ -1510,12 +1716,12 @@
this.stopWorker(); // 纭繚涔嬪墠鐨� Worker 宸插仠姝�
}
// 鍒涘缓 Worker 瀹炰緥
- this.worker = new Worker("/static/js/worker.js");
+ this.worker = new InspectionWorker();
if (this.worker0) {
this.stopWorker(); // 纭繚涔嬪墠鐨� Worker 宸插仠姝�
}
// 鍒涘缓 Worker 瀹炰緥
- this.worker0 = new Worker("/static/js/worker0.js");
+ this.worker0 = new DataWorker();
},
// 鍋滄澶氱嚎绋�
stopWorker() {
@@ -1528,15 +1734,12 @@
this.worker0 = null;
}
},
- // 鐑惊鐜�---缁撴潫
// 淇濆瓨婀垮害銆佹俯搴︽暟鎹�
subOtherForm(m, type) {
- console.log("m---", m);
write({
[type]: type === "remark" ? m : Number(m),
id: this.insOrder.id,
}).then((res) => {
- if (res.code == 201) return;
this.$message.success("淇濆瓨鎴愬姛");
});
},
@@ -1555,34 +1758,6 @@
a.download = "table.png";
a.click();
});
- },
- // 鏉冮檺鑾峰彇
- getPower() {
- let power = JSON.parse(sessionStorage.getItem("power"));
- let fileDel = false;
- let fileAdd = false;
- let collected = false;
- let temDataAcquisition = false;
- for (var i = 0; i < power.length; i++) {
- if (power[i].menuMethod == "uploadFile") {
- fileAdd = true;
- }
- if (power[i].menuMethod == "delfile") {
- fileDel = true;
- }
- if (power[i].menuMethod == "isItAllowedToModifyTheCollectedValues") {
- collected = true;
- }
- if (power[i].menuMethod == "temDataAcquisition") {
- temDataAcquisition = true;
- }
- }
- if (!fileDel) {
- // this.componentData0.do.splice(1, 1);
- }
- this.fileAdd = fileAdd;
- this.collected = collected;
- this.temDataAcquisition = temDataAcquisition;
},
uploadSample() {
doInsOrder({
@@ -1617,13 +1792,6 @@
async handleChangeSample(row, column, event) {
// 鍒濆鍖栨暟鎹�
this.param = {};
- // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁
- this.fiberOpticTape = [];
- this.currentFiberOpticTape = null;
- this.fiberOptic = [];
- this.currentFiberOptic = null;
- this.bushing = [];
- this.currentBushing = null;
this.sampleVisible = false;
// 璧嬪�兼牱鍝�
this.currentSample = this.HaveJson(row);
@@ -1634,23 +1802,15 @@
this.param = {};
this.changeType = 0;
this.currentSample.insProduct.forEach((a, j) => {
- if (this.handleCasing(a.inspectionItem)) {
- this.param[a.id] = {
- insValue: [],
- comValue: [],
- resValue: null,
- equipValue: [],
- equipName: [],
- insResult: null,
- };
- }
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
});
- // 鑾峰彇濂楃,鍏夌氦甯�,鍏夌氦鏁版嵁
- this.getReportModel(row.id);
- let bushing = this.currentSample.bushing;
- if (bushing && bushing.length > 0) {
- this.bushing = bushing;
- }
// 澶勭悊椤甸潰鍒楄〃鏁版嵁
this.getTableLists();
this.currentKey = row.index;
@@ -1665,33 +1825,6 @@
currentTable: this.currentTable,
})
);
- },
- // 鏉惧绠$殑鍒ゆ柇\濡傛灉changeType涓嶇瓑浜�3閭d箞椤甸潰涓嶅睍绀烘澗濂楃妫�楠岄」
- handleCasing(inspectionItem) {
- if (this.changeType != 3) {
- if (inspectionItem.includes("鏉惧绠�")) {
- return false;
- } else {
- return true;
- }
- } else {
- return true;
- }
- },
- // 鑾峰彇濂楃,鍏夌氦甯�,鍏夌氦鏁版嵁
- getReportModel(id) {
- if (this.PROJECT != "妫�娴嬩腑蹇�") {
- return;
- }
- this.getReportModelLoading = true;
- getReportModel({
- sampleId: id
- }).then((res) => {
- this.getReportModelLoading = false;
- this.fibers = res.data["鍏夌氦甯�"];
- this.fiber = res.data["鍏夌氦"];
- this.casing = res.data["濂楃"];
- });
},
async handleChangeCableTag(m, type, num, m2) {
let cableTag = "";
@@ -1724,7 +1857,6 @@
};
});
this.getTableLists0(list);
- this.getReportModel(this.currentSample.id);
this.worker.postMessage(
JSON.stringify({
type: "saveData",
@@ -1743,21 +1875,19 @@
},
// 鏀瑰彉浠诲姟
handleChangeTask(row) {
- if (row.length > 0) this.id = row[0].id;
+ if (row) this.id = row.id;
this.taskVisible = false;
},
// 瀛楀吀鑾峰彇淇℃伅
getTypeDicts() {
this.getDicts("urgency_level").then((response) => {
this.urgentList = this.dictToValue(response.data);
- this.componentData.tagField.type.select = this.urgentList;
});
},
// 瀛楀吀鑾峰彇淇℃伅
getInsStateDicts() {
this.getDicts("inspection_task_state").then((response) => {
this.typeList = this.dictToValue(response.data);
- this.componentData.tagField.insState.select = this.typeList;
});
},
// 瀛楀吀鑾峰彇淇℃伅
@@ -1766,20 +1896,6 @@
this.comparisonList = this.dictToValue(response.data);
});
},
- // 鑾峰彇妫�楠屽�间负涓嬫媺鏃剁殑涓嬫媺鍒楄〃
- // selectEnumByCategoryOfSelect(val) {
- // this.enumList = [];
- // if (val === undefined || val === null) {
- // return;
- // }
- // this.$axios
- // .post(this.$api.enums.selectEnumByCategory, {
- // category: val,
- // })
- // .then((res) => {
- // this.enumList = res.data;
- // });
- // },
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex + 1;
},
@@ -1919,7 +2035,7 @@
if (c.v.ps != undefined && c.v.ps.value === "妫�楠岄」") {
if (count4 === 0) {
if (c.v.v) {
- c.v.v = c.v.v.replace(/\s*/g, "");
+ c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
}
str += c.v.v;
count4 += 1;
@@ -1930,7 +2046,7 @@
) {
if (count4 === 1) {
if (c.v.v) {
- c.v.v = c.v.v.replace(/\s*/g, "");
+ c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
}
str += c.v.v;
count4 += 1;
@@ -1940,7 +2056,7 @@
if (c.v.ps != undefined && c.v.ps.value === "妫�楠岄」鍒嗙被") {
if (count4 === 0) {
if (c.v.v) {
- c.v.v = c.v.v.replace(/\s*/g, "");
+ c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
}
str += c.v.v;
count4 += 1;
@@ -1948,7 +2064,7 @@
} else if (c.v.ps != undefined && c.v.ps.value === "妫�楠岄」") {
if (count4 === 1) {
if (c.v.v) {
- c.v.v = c.v.v.replace(/\s*/g, "");
+ c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
}
str += c.v.v;
count4 += 1;
@@ -1959,7 +2075,7 @@
) {
if (count4 === 2) {
if (c.v.v) {
- c.v.v = c.v.v.replace(/\s*/g, "");
+ c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
}
str += c.v.v;
count4 += 1;
@@ -1969,7 +2085,7 @@
if (str === "鏈烘鎬ц兘骞叉�佹媺浼稿己搴�(绾靛悜)") {
if (c.v.ps != undefined && c.v.ps.value === "鍗曚綅") {
if (c.v.v) {
- c.v.v = c.v.v.replace(/\s*/g, "");
+ c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
}
str2 = str + c.v.v;
unit2 = c.v.v;
@@ -1987,13 +2103,13 @@
undefined
? ""
: this.currentSample.insProduct[i].inspectionItemClass;
- inspectionItemClass = inspectionItemClass.replace(/\s*/g, "");
+ inspectionItemClass = inspectionItemClass.replace(/[\n\r\s]*/g, "");
let inspectionItem =
this.currentSample.insProduct[i].inspectionItem == null ||
this.currentSample.insProduct[i].inspectionItem == undefined
? ""
: this.currentSample.insProduct[i].inspectionItem;
- inspectionItem = inspectionItem.replace(/\s*/g, "");
+ inspectionItem = inspectionItem.replace(/[\n\r\s]*/g, "");
let inspectionItemSubclass =
this.currentSample.insProduct[i].inspectionItemSubclass ==
null ||
@@ -2002,7 +2118,7 @@
? ""
: this.currentSample.insProduct[i].inspectionItemSubclass;
inspectionItemSubclass = inspectionItemSubclass.replace(
- /\s*/g,
+ /[\n\r\s]*/g,
""
);
if (inspectionItemSubclass === "骞叉�佹媺浼稿己搴�(绾靛悜)") {
@@ -2033,6 +2149,9 @@
}
} else {
// 濡傛灉鐩哥瓑,閭d箞璇存槑鎵惧埌浜�,骞朵笖鎶奿d瀛樿捣鏉�,鍚庣画妫�楠岄」涔熶細鍦ㄩ〉闈腑鏄剧ず鍑烘潵
+ let aa = inspectionItemClass +
+ inspectionItem +
+ inspectionItemSubclass;
if (
this.currentSample.insProduct[i].templateId ===
a.templateId &&
@@ -2196,7 +2315,8 @@
}
});
// 浠ヤ笅鏄牱寮忓鐞嗛�昏緫
- set = Array.sort(set);
+ set = [...set]
+ // set = set.sort();
set.forEach((b) => {
let arr = [];
a.template.forEach((c) => {
@@ -2406,11 +2526,6 @@
this.saveInsContext(currentInsItemId);
}
}, 200);
- },
- // 鏄惁闇�瑕佹暟閲�
- async determineWhetherToCollectData() {
- let res = await determineWhetherToCollectData({ managementNumber: '' })
- this.isGet = res.data;
},
// 鏍规嵁鍚庣浼犲弬鏇存柊椤甸潰鏁版嵁 param => this.tableList[0].insProductResult
getCurrentInsProduct(pId) {
@@ -2635,9 +2750,6 @@
// }
// }
// },
- getUserInfo() {
- this.componentData.entity.userId = this.userId;
- },
openAddCheck() {
this.addCheck = true;
},
@@ -2655,7 +2767,7 @@
}).then((res) => {
if (res.code === 200) {
this.$message.success("鎿嶄綔鎴愬姛");
- this.$emit("goback");
+ this.goback();
this.addCheck = false;
}
this.reviewLoading = false;
@@ -2680,7 +2792,7 @@
}).then((res) => {
if (res.code === 200) {
this.$message.success("鎿嶄綔鎴愬姛");
- this.$emit("goback");
+ this.goback();
}
this.reviewLoading = false;
})
@@ -2692,17 +2804,48 @@
this.$message.error("鏈緭鍏ヤ笉閫氳繃鍘熷洜");
}
},
+ // 鏌ョ湅宸ユ椂
+ viewManHour() {
+ this.$refs.viewManHourDia.showDialog(this.id, 99);
+ },
+ openAddVerifyDia() {
+ this.addVerifyDia = true;
+ },
+ confirmSubmit(registerInsResults){
+ submitPlan({
+ orderId: this.orderId,
+ laboratory: this.sonLaboratory,
+ verifyUser: this.verifyUser,
+ entrustCode: this.insOrder.entrustCode,
+ registerInsResults: registerInsResults
+ }).then((res) => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.goback();
+ this.submitLoading = false;
+ this.addVerifyDia = false;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ this.submitLoading = false;
+ });
+ },
submit() {
if (this.verifyUser === null || this.verifyUser === "") {
this.$message.error("璇锋寚瀹氬鏍镐汉鍛�");
return;
}
- if (!this.otherForm.humidity) {
+ if (!this.otherForm.humidity && this.insOrder.ifsOrderType!=='02wg') {
this.$message.error("璇疯緭鍏ユ箍搴�");
return;
}
- if (!this.otherForm.temperature) {
+ if (!this.otherForm.temperature && this.insOrder.ifsOrderType!=='02wg') {
this.$message.error("璇疯緭鍏ユ俯搴�");
+ return;
+ }
+ if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType==='02wg') {
+ this.$message.error("璇峰~鍐橧FS搴撳瓨鐗╂枡鎵规灞炴��");
return;
}
this.submitLoading = true;
@@ -2711,38 +2854,37 @@
laboratory: this.sonLaboratory,
}).then((res) => {
if (res.code === 200) {
- if (!res.data || res.data.length == 0) {
+ if (!res.data || res.data.errorMsg.length == 0) {
this.submitLoading = true;
- submitPlan({
- orderId: this.orderId,
- laboratory: this.sonLaboratory,
- verifyUser: this.verifyUser,
- entrustCode: this.insOrder.entrustCode,
- }).then((res) => {
- if (res.code === 200) {
- this.$message.success("鎿嶄綔鎴愬姛");
- this.$emit("goback");
- this.submitLoading = false;
- this.addVerifyDia = false;
- }
- })
- .catch((error) => {
- console.error(error);
- this.submitLoading = false;
+ //妫�楠岀被鍨嬩负鍘熸潗鏂�
+ if(this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){
+ const htmlStr = "鏄惁鐧昏IFS閲囪喘妫�楠岀粨鏋滃苟绉诲簱锛熻鎿嶄綔浼氱櫥璁�<span style='color:#ff4949'>鍚屼竴闆朵欢鍚屼竴璁㈠崟鐨勬墍鏈夋媶鍒嗘壒娆�</span>锛岃璋ㄦ厧閫夋嫨銆�"
+ this.$confirm(htmlStr, '鎻愮ず', {
+ confirmButtonText: '鏄�',
+ cancelButtonText: '鍚�',
+ type: 'warning',
+ dangerouslyUseHTMLString: true
+ }).then(() => {
+ this.confirmSubmit(true)
+ }).catch(() => {
+ this.confirmSubmit(false)
});
+ }else{
+ this.confirmSubmit(true)
+ }
} else {
let newData = [];
const h = this.$createElement;
- for (let i in res.data) {
- const lastChar = res.data[i].slice(-1);
+ for (let i in res.data.errorMsg) {
+ const lastChar = res.data.errorMsg[i].slice(-1);
if (lastChar == "-") {
- res.data[i] = res.data[i].slice(0, -1);
+ res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1);
}
newData.push(
h(
"p",
{ style: "font-size: 14px;color: red;" },
- Number(i) + 1 + "銆�" + res.data[i]
+ Number(i) + 1 + "銆�" + res.data.errorMsg[i]
)
);
}
@@ -2765,22 +2907,7 @@
})
.then(() => {
this.submitLoading = true;
- submitPlan({
- orderId: this.orderId,
- laboratory: this.sonLaboratory,
- verifyUser: this.verifyUser,
- }).then((res) => {
- if (res.code === 200) {
- this.$message.success("鎿嶄綔鎴愬姛");
- this.addVerifyDia = false;
- this.$emit("goback");
- }
- this.submitLoading = false;
- })
- .catch((error) => {
- console.error(error);
- this.submitLoading = false;
- });
+ this.confirmSubmit(false)
})
.catch(() => { });
}
@@ -2802,15 +2929,24 @@
} else {
param = this.param;
}
+ let isNoTestValue = ''
+ for (let key in param) {
+ if (param[key]) {
+ if (param[key].insValue?.length === 0) {
+ isNoTestValue = 1
+ } else {
+ isNoTestValue = ''
+ }
+ }
+ }
saveInsContext({
param: JSON.stringify(param),
currentTable: this.currentTable,
sampleId: this.currentSample.id,
+ orderId: this.orderId,
+ sonLaboratory: this.sonLaboratory,
+ isNoTestValue: isNoTestValue
}).then((res) => {
- if (res.code == 201) {
- this.$message.error("淇濆瓨澶辫触");
- return;
- }
this.$message.success("宸蹭繚瀛�");
});
// 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
@@ -2878,7 +3014,7 @@
}
},
getAuthorizedPerson() {
- selectUserCondition({ type: 0 }).then((res) => {
+ selectUserCondition({ type: 1 }).then((res) => {
let data = [];
res.data.forEach((a) => {
data.push({
@@ -2936,16 +3072,14 @@
this.param = {};
this.changeType = 0;
this.currentSample.insProduct.forEach((a, j) => {
- if (this.handleCasing(a.inspectionItem)) {
- this.param[a.id] = {
- insValue: [],
- comValue: [],
- resValue: null,
- equipValue: [],
- equipName: [],
- insResult: null,
- };
- }
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
});
// 椤甸潰鏁版嵁澶勭悊
this.getTableLists();
@@ -2964,7 +3098,7 @@
this.upLoading = false;
if (response.code == 200) {
this.$message.success("涓婁紶鎴愬姛");
- this.$refs.fileList.selectList();
+ this.getList();
}
},
beforeUpload(file) {
@@ -2983,16 +3117,7 @@
},
handleDown(row) {
downFile({ id: row.id }).then((res) => {
- if (res.code === 200) {
- let url = "";
- if (res.data.type == 1) {
- url = this.javaApi + "/img/" + res.data.fileUrl;
- this.$download.saveAs(url, row.fileName)
- } else {
- url = this.javaApi + "/word/" + res.data.fileUrl;
- this.$download.saveAs(url, row.fileName)
- }
- }
+ this.$download.saveAs(res.data.fileUrl, row.fileName)
})
.catch((error) => { });
},
@@ -3016,6 +3141,12 @@
return v;
}
},
+ goback() {
+ this.$router.go(-1)
+ }
+ },
+ destroyed() {
+ disconnect()
},
};
</script>
@@ -3048,13 +3179,15 @@
.title {
height: 60px;
line-height: 60px;
+ padding: 0 16px;
}
.search {
width: 100%;
- margin-bottom: 10px;
background-color: #fff;
border-radius: 3px;
+ margin-bottom: 10px;
+ padding: 10px;
}
.search .form-inline {
@@ -3064,7 +3197,7 @@
}
.center {
- width: calc(100% - 40px);
+ width: 100%;
/* max-height: 580px; */
background-color: #fff;
border-radius: 3px;
@@ -3091,6 +3224,7 @@
.tables {
table-layout: fixed;
margin: 5px 5px 16px;
+ border-collapse: collapse;
}
.tables td {
@@ -3149,7 +3283,7 @@
}
.content-h-2 {
- justify-content: end;
+ justify-content: flex-end;
}
.content-v-0 {
@@ -3220,10 +3354,10 @@
align-items: center;
}
</style>
-<style>
-.inspection .el-form-item__label {
+<style scoped>
+/* .inspection .el-form-item__label {
color: #000;
-}
+} */
.inspection .el-drawer__header::before {
content: "";
@@ -3287,4 +3421,16 @@
max-width: 1000px;
/* 璁剧疆鏈�澶у搴� */
}
+
+
+.data-collection-items {
+ display: flex;
+ flex-wrap: wrap;
+}
+.data-collection-items .el-select,
+.data-collection-items .el-checkbox {
+ flex-basis: 20% ;
+ box-sizing: border-box;
+ padding: 5px 2%;
+}
</style>
--
Gitblit v1.9.3