From 06c4496d3117bf14ea431f02558ad7d74dee774d Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 26 十二月 2024 14:33:09 +0800
Subject: [PATCH] 人员测试联调
---
src/components/do/b1-ins-order/add.vue | 1106 ++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 735 insertions(+), 371 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index dee5543..7794127 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -134,9 +134,9 @@
<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
- style="color: #3A7BFA">锟{total}}</span></el-col>
- <el-col :span="18" style="text-align: right;">
+ <el-col :span="8" style="padding-left: 20px;text-align: left;">濮旀墭鍗曚俊鎭� 鍗曚綅鎴愭湰鎬讳环锛�<span
+ style="color: #3A7BFA">锟{total.toFixed(2)}}</span></el-col>
+ <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">
@@ -148,10 +148,7 @@
<el-button size="medium" @click="templateDia=true" v-show="active==1">
<span style="color: #3A7BFA;">淇濆瓨妯℃澘</span>
</el-button>
- <el-button size="medium" type="primary" @click="openCableConfig"
- v-if="active==1&&PROJECT=='瑁呭鐢电紗'&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('鐢电紗')>-1">鐢电紗閰嶇疆</el-button>
<el-button size="medium" type="primary" @click="openEquipConfig" v-if="active==1">瀛愭牱鍝侀厤缃�</el-button>
- <el-button size="medium" type="primary" @click="openConfig" v-if="addObj.sampleType==='鍏夌紗'">鍏夌氦閰嶇疆</el-button>
<el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active==1">鎻愪氦</el-button>
<!-- 瀹℃牳 -->
<el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3&&addObj.companyId"
@@ -185,18 +182,13 @@
<div class="search_label"><span class="required-span">* </span>鍒跺崟浜猴細</div>
<div class="search_input">
<el-input size="small" clearable disabled v-model="addObj.custom"></el-input>
- <!-- <el-input readonly size="small" v-model="addObj.custom">
- <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true"
- :disabled="active>1"></el-button></template>
- </el-input> -->
</div>
</el-col>
<el-col class="search_thing" :span="6">
<div class="search_label"><span class="required-span">* </span>濮旀墭鍗曚綅锛�</div>
<div class="search_input">
- <!-- <el-input size="small" placeholder="鈫愰�夋嫨濮旀墭瀹㈡埛" clearable disabled v-model="addObj.company"></el-input> -->
<el-input readonly size="small" v-model="addObj.company" placeholder="閫夋嫨濮旀墭鍗曚綅">
- <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true"
+ <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true,createState=1"
:disabled="active>1"></el-button></template>
</el-input>
</div>
@@ -205,6 +197,14 @@
<div class="search_label"><span class="required-span">* </span>鑱旂郴鏂瑰紡锛�</div>
<div class="search_input">
<el-input size="small" placeholder="閫夋嫨濮旀墭瀹㈡埛" clearable :readonly="active>1" v-model="addObj.phone"></el-input>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="6" v-if="addObj.orderType=='C'">
+ <div class="search_label"><span class="required-span">* </span>涓嬪崟鑷筹細</div>
+ <div class="search_input">
+ <el-select size="small" style="width: 100%;" clearable v-model="addObj.departmentLimsId" :disabled="active>1" placeholder="閮ㄩ棬">
+ <el-option v-for="(a, ai) in deaprtEnum" :key="ai" :value="a.id" :label="a.name"></el-option>
+ </el-select>
</div>
</el-col>
<el-col class="search_thing" :span="6">
@@ -216,7 +216,7 @@
</div>
</el-col>
<el-col class="search_thing" :span="6">
- <div class="search_label"><span class="required-span">* </span>鏍峰搧鍚嶇О锛�</div>
+ <div class="search_label"><span class="required-span">* </span>鏍峰搧绫诲瀷锛�</div>
<div class="search_input">
<el-input readonly size="small" v-model="addObj.sample">
<template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectStandardTree = true"
@@ -234,7 +234,7 @@
<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">
@@ -246,14 +246,29 @@
</div>
</el-col> -->
<el-col class="search_thing" :span="6">
- <div class="search_label"><span class="required-span">* </span>鏉ユ牱鏂瑰紡锛�</div>
+ <div class="search_label"><span class="required-span">* </span>璁㈠崟绫诲瀷锛�</div>
<div class="search_input">
<el-select v-model="addObj.formType" size="small" :disabled="active>1" style="width: 100%;">
<el-option v-for="(a,ai) in formType" :key="ai" :label="a.label" :value="a.value"></el-option>
</el-select>
</div>
</el-col>
- <el-col class="search_thing" :span="6">
+ <el-col class="search_thing" :span="6" v-if="addObj.formType==='鍏朵粬鎴愬搧'">
+ <div class="search_label">闆朵欢鍙凤細</div>
+ <div class="search_input">
+ <el-input size="small" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable v-model="addObj.partNo"
+ :readonly="active>1"></el-input>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="6" v-if="addObj.formType!='鍏朵粬鎴愬搧'&&addObj.formType">
+ <div class="search_label"><span class="required-span">* </span>閫氱煡鑷虫牱鏈哄憳锛�</div>
+ <div class="search_input">
+ <el-select v-model="addObj.issueUser" size="small" :disabled="active>1" style="width: 100%;">
+ <el-option v-for="(a,ai) in personList" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
+ </div>
+ </el-col>
+ <!-- <el-col class="search_thing" :span="6">
<div class="search_label">鎶ュ憡鍙戦�佹柟寮忥細</div>
<div class="search_input">
<el-radio-group v-model="addObj.send">
@@ -261,8 +276,8 @@
<el-radio :label="0">鍏朵粬</el-radio>
</el-radio-group>
</div>
- </el-col>
- <el-col class="search_thing" :span="6">
+ </el-col> -->
+ <!-- <el-col class="search_thing" :span="6">
<div class="search_label">鏍峰搧澶勭悊鏂瑰紡锛�</div>
<div class="search_input">
<el-radio-group v-model="addObj.processing">
@@ -270,7 +285,7 @@
<el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio>
</el-radio-group>
</div>
- </el-col>
+ </el-col> -->
<el-col class="search_thing" :span="6">
<div class="search_label">宸ョ▼鍚嶇О锛�</div>
<div class="search_input">
@@ -288,8 +303,12 @@
<el-col class="search_thing" :span="6">
<div class="search_label"><span class="required-span">* </span>鐢熶骇鍗曚綅锛�</div>
<div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.production"
- :readonly="active>1"></el-input>
+ <!-- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.production"
+ :readonly="active>1"></el-input> -->
+ <el-input size="small" v-model="addObj.production" placeholder="閫夋嫨鐢熶骇鍗曚綅" :readonly="active>1">
+ <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true,createState=2"
+ :disabled="active>1"></el-button></template>
+ </el-input>
</div>
</el-col>
<el-col class="search_thing" :span="6">
@@ -299,7 +318,7 @@
:readonly="active>1"></el-input>
</div>
</el-col>
- <el-col class="search_thing" :span="6">
+ <!-- <el-col class="search_thing" :span="6">
<div class="search_label">鏄惁鐣欐牱锛�</div>
<div class="search_input">
<el-radio-group v-model="addObj.isLeave">
@@ -307,26 +326,69 @@
<el-radio :label="1">鐣欐牱</el-radio>
</el-radio-group>
</div>
- </el-col>
+ </el-col> -->
<el-col class="search_thing" :span="6">
<div class="search_label" style="width: 175px;">鏄惁娑夊強閰嶅鏍峰搧锛�</div>
<div class="search_input" style="width: calc(100% - 175px);">
- <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()">
+ <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()" :disabled="active>1">
<el-radio :label="1">鏄�</el-radio>
<el-radio :label="0">鍚�</el-radio>
</el-radio-group>
</div>
</el-col>
- <el-col class="search_thing" :span="6">
+ <!-- <el-col class="search_thing" :span="6">
<div class="search_label">OTC璁㈠崟鍙凤細</div>
<div class="search_input">
<el-input size="small" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable v-model="addObj.otcCode" :readonly="active>1"></el-input>
</div>
- </el-col>
+ </el-col> -->
<el-col class="search_thing" :span="6">
<div class="search_label">濮旀墭浜猴細</div>
<div class="search_input">
<el-input size="small" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable v-model="addObj.prepareUser" :readonly="active>1"></el-input>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="6">
+ <div class="search_label"><span class="required-span">* </span>绾﹀畾鏃堕棿锛�</div>
+ <div class="search_input">
+ <el-date-picker
+ v-model="addObj.appointed"
+ :disabled="active>1"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="6" v-if="addObj.formType!='鍏朵粬鎴愬搧'&&addObj.formType">
+ <div class="search_label"><span class="required-span">* </span>鏍锋満瀹屾垚鏃堕棿锛�</div>
+ <div class="search_input">
+ <el-date-picker
+ v-model="addObj.issueTime"
+ :disabled="active>1"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </div>
+ </el-col>
+ <el-col class="search_thing upload" :span="4" style="align-items: flex-start;height: auto" v-if="active==1">
+ <el-upload
+ style="margin: 8px 0 0px 50px;"
+ action="#"
+ :auto-upload="false"
+ accept='.jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv' :on-change="handleChangeUpload">
+ <el-button size="small" type="primary">涓婁紶闄勪欢</el-button>
+ </el-upload>
+ </el-col>
+ <el-col class="search_thing" :span="8">
+ <div class="search_input" style="width: 100%;margin-left: 40px;">
+ <el-radio-group v-model="ruleInfo.rule" @change="$refs.sampleTable.doLayout()" :disabled="active>1">
+ <el-radio :label="1">涓嶈�冭檻涓嶇‘瀹氬害</el-radio>
+ <el-radio :label="2">鑰冭檻涓嶇‘瀹氬害<el-input placeholder="" v-model="ruleInfo.num" style="width: 100px;margin-left: 10px;" size="mini" :disabled="active>1">
+ <template slot="append">%</template>
+ </el-input></el-radio>
+ </el-radio-group>
</div>
</el-col>
<el-col class="search_thing" :span="6" style="align-items: flex-start;margin: 8px 0;">
@@ -347,11 +409,33 @@
<div style="height: auto;">
<div class="search" v-if="active==1" style="display: flex;background: transparent;">
<div class="search_thing">
- <div class="search_label">鏍峰搧鍨嬪彿锛�</div>
+ <div class="search_label">鏍峰搧鍚嶇О锛�</div>
<div class="search_input">
- <el-select v-model="model" :placeholder="active>1 ? '' : '璇疯緭鍏�'" filterable allow-create default-first-option size="small"
- @change="changeModel">
+ <el-input size="small" v-model="allInfo.sample" @change="changeModel('sample')"></el-input>
+ </div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">鏍峰搧绫诲埆锛�</div>
+ <div class="search_input">
+ <el-select v-model="allInfo.model" :placeholder="active>1 ? '' : '璇疯緭鍏�'" filterable allow-create default-first-option size="small"
+ @change="changeModel('model')">
<el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">浜у搧鍨嬪彿锛�</div>
+ <div class="search_input">
+ <el-input size="small" v-model="allInfo.modelNum" @change="changeModel('modelNum')"></el-input>
+ </div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">璇曢獙鏍囧噯锛�</div>
+ <div class="search_input">
+ <el-select v-model="allInfo.testRequirements" :placeholder="active>1 ? '' : '璇疯緭鍏�'" filterable allow-create default-first-option size="small"
+ @change="changeModel('testRequirements')">
+ <el-option v-for="item in standard" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
@@ -359,50 +443,63 @@
<div class="search_thing">
<div class="search_label">妫�楠屾爣鍑嗭細</div>
<div class="search_input">
- <el-select v-model="standardMethodListId" :placeholder="active>1 ? '' : '璇疯緭鍏�'" size="small" @focus="methodFocus"
- :loading="methodLoad" @change="changeStandardMethodListId">
+ <el-select v-model="standardMethodListId" :placeholder="active>1 ? '' : '璇疯緭閫夋嫨'" size="small" @focus="methodFocus"
+ :loading="methodLoad" multiple @change="changeStandardMethodListId">
<el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</div>
+ <el-radio-group v-model="currentPage" v-if="active>1" size="small" style="margin-top: 20px;">
+ <el-radio-button :label="0">鏍峰搧</el-radio-button>
+ <el-radio-button :label="1">闄勪欢</el-radio-button>
+ </el-radio-group>
<el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" max-height="400px" tooltip-effect="dark"
- border @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;">
+ border @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;" v-show="currentPage==0">
<el-table-column type="selection" width="60" :selectable="selectable" v-if="active==1"></el-table-column>
<el-table-column type="index" label="搴忓彿" width="65" align="center"></el-table-column>
<el-table-column prop="sample" label="鏍峰搧鍚嶇О" align="center" min-width="100">
<template slot-scope="scope">
- <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input>
+ <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1" placeholder="蹇呭~"></el-input>
</template>
</el-table-column>
- <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" min-width="140" align="center">
+ <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" min-width="100" align="center">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
:readonly="active>1"></el-input>
</template>
</el-table-column>
- <el-table-column prop="model" label="鏍峰搧鍨嬪彿" align="center" min-width="100">
+ <el-table-column prop="model" label="鏍峰搧绫诲埆" align="center" min-width="100">
<template slot-scope="scope">
- <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="鏍峰搧鍨嬪彿"
+ <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="鏍峰搧绫诲埆"
size="small" @change="handleChangeModel" :disabled="active>1" style="width: 100%;">
<el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
- <el-table-column prop="modelNum" label="鍨嬪彿鍙傛暟" width="130" align="center" v-if="!(active>1)">
+ <el-table-column prop="modelNum" label="浜у搧鍨嬪彿" min-width="100" align="center" v-if="!(active>1)">
<template slot-scope="scope">
- <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="闈炲繀濉�"
+ <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="蹇呭~"
@keyup.enter.native="methodChange(scope.row.standardMethodListId, scope.row)"
@clear="methodChange(scope.row.standardMethodListId, scope.row)"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="testRequirements" label="璇曢獙鏍囧噯" align="center" min-width="100">
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.testRequirements" :disabled="scope.row.model==null||active>1"
+ placeholder="璇曢獙鏍囧噯" size="small" :readonly="active>1" style="width: 100%;" clearable @change="changeModel0(scope.row)">
+ <el-option v-for="item in standard" :key="item.id" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
</template>
</el-table-column>
<el-table-column prop="standardMethodListId" label="妫�楠屾爣鍑�" align="center" min-width="100">
<template slot-scope="scope">
<el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1"
placeholder="妫�楠屾爣鍑�" size="small" :loading="methodLoad" @change="(value)=>methodChange(value, scope.row)"
- @focus="methodFocus" :readonly="active>1" style="width: 100%;" clearable @clear="productList = []">
+ @focus="methodFocus" :readonly="active>1" style="width: 100%;" clearable @clear="productList = []" multiple>
<el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
</el-option>
</el-select>
@@ -430,7 +527,7 @@
</el-table>
<el-table class="el-table" ref="productTable" :data="productList" max-height="400px" tooltip-effect="dark" border
@selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect"
- :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll">
+ :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll" v-show="currentPage==0">
<el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column>
<el-table-column prop="inspectionItemClass" v-if="PROJECT === '瑁呭鐢电紗'" label="妫�楠岄」鍒嗙被" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="inspectionItemClassEn" v-if="PROJECT === '瑁呭鐢电紗'" label="妫�楠岄」鍒嗙被(EN)" min-width="140" show-overflow-tooltip></el-table-column>
@@ -465,17 +562,17 @@
<template slot-scope="scope">
<el-input size="small" placeholder="瑕佹眰鎻忚堪" v-model="scope.row.tell" clearable type="textarea"
:autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'tell')"
- v-if="active==1&&isAskOnlyRead"></el-input>
+ v-if="active==1" :disabled="!!scope.row.tell&&scope.row.tell.includes('[')&&scope.row.tell.includes(']')&&scope.row.tell.includes(',')"></el-input>
<span v-else>
<template >{{ scope.row.tell }}</template>
</span>
</template>
</el-table-column>
- <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px" v-if="isAskOnlyRead">
+ <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px" >
<template slot-scope="scope">
<el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable type="textarea"
:autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'ask')"
- v-if="active==1&&isAskOnlyRead&&scope.row.inspectionValueType!='5'"></el-input>
+ v-if="active==1&&scope.row.inspectionValueType!='5'" :disabled="!!scope.row.ask&&scope.row.ask.includes('[')&&scope.row.ask.includes(']')&&scope.row.ask.includes(',')"></el-input>
<span v-else>
<!-- <template v-if="(scope.row.ask.indexOf('D')>-1
||scope.row.ask.indexOf('W')>-1
@@ -512,6 +609,9 @@
<el-table-column prop="sonLaboratory" label="瀛愬疄楠屽" min-width="130" show-overflow-tooltip :filters="filters"
:filter-method="filterHandler"></el-table-column>
</el-table>
+ <ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList"
+ :componentData="componentData0"
+ :delUrl="$api.insOrderPlan.delfile" style="height: 100%;margin-top: 16px;" v-show="currentPage==1"/>
</div>
</div>
<el-dialog title="閫夋嫨鍗曚綅" :visible.sync="selectUserDia" width="70%">
@@ -523,7 +623,7 @@
<el-button type="primary" @click="selectUser">纭� 瀹�</el-button>
</span>
</el-dialog>
- <el-dialog title="閫夋嫨鏍峰搧" :visible.sync="selectStandardTree" width="400px">
+ <el-dialog title="閫夋嫨鏍峰搧" :visible.sync="selectStandardTree" width="500px">
<div class="body" style="height: 60vh;overflow-y: auto;user-select: none;" v-if="selectStandardTree">
<el-row>
<el-col :span="24">
@@ -620,7 +720,8 @@
</el-row>
</span>
</el-dialog>
- <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow" :active="active" />
+ <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow && examine==0" :active="active" :inspectionItemST='inspectionItemST' />
+ <fiberOpticConfigTwo :currentId="currentId" v-if="configShow && examine==1" :active="active" />
<equipConfig :currentId="currentId" v-if="equipConfigShow" :active="active" />
<cableConfig v-if="cableConfigShow" :active="active" />
<!-- 鍗曢�夌壒娈婂�煎鐞嗘-->
@@ -759,7 +860,7 @@
width="800px" :show-close="false">
<el-table
:data="editTable"
- style="width: 100%">
+ style="width: 100%" height="80vh">
<!-- inspectionItemList -->
<el-table-column
prop="inspectionItemList"
@@ -881,6 +982,15 @@
<el-button type="primary" @click="spliceData">淇濆瓨</el-button>
</span>
</el-dialog>
+ <el-dialog title="鍗曟牴鍨傜洿鐕冪儳妫�娴嬫鏁板~鍐�" :visible.sync="singleVerticalCombustionShow" width="900px"
+ :close-on-click-modal="false" :close-on-press-escape="false"
+ :before-close="beforeCirculateShowClose" :show-close="false">
+ <div>111</div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="cleanSpliceData">鍙栨秷</el-button>
+ <el-button type="primary" @click="spliceData">淇濆瓨</el-button>
+ </span>
+ </el-dialog>
<!-- 鐢靛姏璇曢獙瀹�---娓╁崌璇曢獙/鐑惊鐜� -->
<el-dialog :title="temperatureTitle" :visible.sync="temperatureShow"
:close-on-click-modal="false" :close-on-press-escape="false"
@@ -900,25 +1010,83 @@
<el-button type="primary" @click="spliceTemperatureTest">淇濆瓨</el-button>
</span>
</el-dialog>
+ <!-- 鍔熺巼瀹归噺--濉啓绔彛 -->
+ <el-dialog title="濉啓绔彛" :visible.sync="powerShow"
+ :close-on-click-modal="false" :close-on-press-escape="false"
+ width="50%">
+ <el-table
+ :data="powerTable"
+ border
+ style="width: 100%">
+ <el-table-column
+ fixed
+ prop="sample"
+ label="鏍峰搧"
+ min-width="150">
+ </el-table-column>
+ <el-table-column
+ prop="model"
+ label="鍨嬪彿"
+ min-width="120">
+ </el-table-column>
+ <el-table-column
+ prop="inspectionItem"
+ label="妫�楠岄」"
+ min-width="120">
+ </el-table-column>
+ <el-table-column
+ prop="ask"
+ label="绔彛"
+ min-width="120">
+ <template slot-scope="scope">
+ <el-input-number v-model="scope.row.ask" :min="1" :max="100" label="绔彛" size="small"></el-input-number>
+ </template>
+ </el-table-column>
+ </el-table>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="powerShow=false">鍙栨秷</el-button>
+ <el-button type="primary" @click="savePowerTest">淇濆瓨</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="鏂囦欢棰勮"
+ :visible.sync="lookFileVisible"
+ width="60%" fullscreen>
+ <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url"
+ :currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/>
+ </el-dialog>
+ <p style="font-size: 12px;color: red;margin-top: 20px;margin-bottom: 20px;">鍙屾柟鎵胯:<br/>
+ 1銆佸鎵樻柟鎵胯鎻愪緵鐨勪俊鎭笌鏍峰搧鐨勭湡瀹炴��;<br/>
+ 2銆佸鎵橀�佹牱妫�楠岀粨鏋滀粎閫傜敤浜庢敹鍒扮殑鏍峰搧;<br/>
+ 3銆佽瘯楠岃繃绋嬪鑷寸殑鏍峰搧鎹熷潖銆侀厤浠舵崯鍧忋�佹崯鑰楋紝鏈祴璇曞満涓嶆壙鎷呰禂鍋胯矗浠�;<br/>
+ 4銆佸疄楠屽鎵胯鍏寮�灞曟娴嬫椿鍔紝骞舵壙璇轰繚瀹堝湪妫�娴嬫椿鍔ㄨ繃绋嬩腑鎵�鑾风煡鐨勪繚瀵嗕俊鎭��
+ </p>
</div>
</template>
<script>
import ValueTable from '../../tool/value-table.vue'
import fiberOpticConfig from './fiberoptic-config.vue'
+import fiberOpticConfigTwo from './fiberoptic-config-two.vue'
import equipConfig from './equip-config.vue'
import cableConfig from './cable-config.vue'
import Vue from 'vue'
-import {iuCharts} from "../../../util/echarts";
+import filePreview from '../../tool/file-preview.vue'
export default {
components: {
ValueTable,
fiberOpticConfig,
+ fiberOpticConfigTwo,
equipConfig,
- cableConfig
+ cableConfig,
+ filePreview
},
props: {
+ examine: {
+ type: Number,
+ default: () => 0
+ },
active: {
type: Number,
default: () => 0
@@ -930,6 +1098,9 @@
},
data() {
return {
+ currentFile:{},
+ lookFileVisible:false,
+ inspectionItemST: null,
sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁
editTable:[],
template: null,
@@ -942,6 +1113,7 @@
type: '0',
code: null,
appointed: null,
+ issueTime:null,
remark: null,
otcCode: null,
mating: 0,
@@ -964,7 +1136,10 @@
production: null,
productionEn: null,
companyId: null,
- prepareUser:null
+ prepareUser:null,
+ departmentLimsId:null,
+ departmentLims:null,
+ partNo: null, // 闆朵欢鍙�
},
sample: {
sampleCode: null,
@@ -1067,7 +1242,7 @@
RTS: '',
totalArr: [],
model: null,
- standardMethodListId: null,
+ standardMethodListId: [],
symbolList:[
'RTS','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'],
inspectionItem:null,
@@ -1079,6 +1254,7 @@
entrustNum: '',
entrustPoint: ''
},
+ singleVerticalCombustionShow: false,
isBsm2Val2:false,
opticalProject: [], // 娓╁害寰幆寮规鍏夌氦椤圭洰鍒楄〃
opticalProjectList: [], // 娓╁害寰幆寮规鍏夌氦椤圭洰閫変腑鐨勬暟缁�
@@ -1100,6 +1276,67 @@
temId: '',
sonLaboratoryList:[],
selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃
+ deaprtEnum:[],
+ standard:[],
+ createState:1,//1:閫夋嫨濮旀墭鍗曚綅锛�2锛氶�夋嫨鐢熶骇鍗曚綅
+ fileList:[],
+ currentPage:0,//0:鏍峰搧淇℃伅锛�1锛氶檮浠�
+ componentData0: {
+ entity: {
+ insOrderId:''
+ },
+ isIndex: true,
+ showSelect: false,
+ select: false,
+ sort: false,
+ init:false,
+ do: [
+ {
+ id: 'handleDown',
+ font: '涓嬭浇',
+ type: 'text',
+ method: 'handleDown'
+ },
+ {
+ id: '1',
+ font: '棰勮',
+ type: 'text',
+ method: 'lookFile',
+ }
+ ],
+ isPage: false,
+ linkEvent: {},
+ tagField: {
+ type:{
+ select:[
+ {
+ value: 1,
+ label: '鍥剧墖'
+ },
+ {
+ value: 2,
+ label: '鏂囦欢'
+ }
+ ]
+ }
+ },
+ currentId: '',
+ selectField: {},
+ requiredAdd: [],
+ requiredUp: []
+ },
+ ruleInfo:{
+ rule:1,
+ num:null,
+ },
+ powerShow:false,
+ powerTable:[],
+ allInfo:{
+ model:null,
+ sample:null,
+ modelNum:null,
+ testRequirements:null,
+ }
}
},
watch: {
@@ -1124,6 +1361,25 @@
}
}
},
+ productListSelected: {
+ deep: true,
+ handler(val) {
+ if(val.length>0){
+ for(let i =0 ; i< val.length; i++){
+ if(val[i].inspectionItem.includes('鏉惧绠�')){
+ this.inspectionItemST = 1
+ break;
+ }else{
+ this.inspectionItemST = 0
+ }
+ }
+ }else{
+ this.inspectionItemST = 0
+ }
+
+ console.log('0000',this.inspectionItemST);
+ }
+ },
sampleList: {
deep: true,
handler(val) {
@@ -1131,12 +1387,21 @@
}
},
'addObj.sample'(val) {
- this.model = null
- this.standardMethodListId = null
+ this.allInfo.model = null
+ this.allInfo.sample = null
+ this.allInfo.modelNum = null
+ this.allInfo.testRequirements = null
+ this.standardMethodListId = []
},
'addObj.sampleNum'(val) {
- this.model = null
- this.standardMethodListId = null
+ this.allInfo.model = null
+ this.allInfo.sample = null
+ this.allInfo.modelNum = null
+ this.allInfo.testRequirements = null
+ this.standardMethodListId = []
+ },
+ active(val){
+ this.saveLoad = false
}
},
mounted() {
@@ -1146,8 +1411,10 @@
// this.selectInsOrderTemplate()
this.getAuthorizedPerson();
this.selectEnumByCategoryForUnit()
+ this.selectEnumByCategoryForStandard()
this.selectStandardMethods()
this.selectEnumByCategoryForOrderType()
+ this.selectDepartmentEnum()
// this.selectEnumByCategoryForSonLaboratory()
this.selectEnumByCategoryForSampleForm()
if (this.active != 1) {
@@ -1159,8 +1426,19 @@
this.addObj = {
...res.data.insOrder
};
+ if(this.addObj.rule){
+ if(this.addObj.rule=='涓嶈�冭檻涓嶇‘瀹氬害'){
+ this.ruleInfo.rule = 1
+ }else{
+ this.ruleInfo.rule = 2
+ this.ruleInfo.num = this.addObj.rule.split('-')[1]
+ }
+ }
this.addObj.type = String(this.addObj.type)
- this.sampleList = this.HaveJson(res.data.sampleProduct);
+ this.sampleList = this.HaveJson(res.data.sampleProduct)
+ this.sampleList.forEach(m=>{
+ m.standardMethodListId = JSON.parse(m.standardMethodListId)
+ });
this.getProNum()
this.addObj.sampleNum = this.sampleList.length
this.$nextTick(() => {
@@ -1171,19 +1449,54 @@
}
})
})
+ // 鏂囦欢淇℃伅
+ this.componentData0.entity.insOrderId = this.currentId;
+ this.$refs.fileList.selectList()
}
},
methods: {
+ lookFile(row){
+ this.currentFile = row;
+ if(row.type==1){
+ this.currentFile.url = this.javaApi+'/img/'+row.fileUrl
+ }else{
+ this.currentFile.url = this.javaApi+'/word/'+row.fileUrl
+ }
+ this.lookFileVisible = true
+ },
+ handleDown(row){
+ this.$axios.post(this.$api.insOrderPlan.downFile, {
+ id: row.id,
+ }).then(res => {
+ if (res.code === 200) {
+ let url = '';
+ if(res.data.type==1){
+ url = this.javaApi+'/img/'+res.data.fileUrl
+ file.downloadIamge(url,row.fileName)
+ }else{
+ url = this.javaApi+'/word/'+res.data.fileUrl
+ const link = document.createElement('a');
+ link.href = url;
+ link.download = row.fileName;
+ link.click();
+ }
+ }
+ }).catch(error => {
+
+ })
+ },
+ handleChangeUpload(file, fileLists){
+ this.fileList = fileLists
+ },
//鐗规畩鍊煎~鍐欏鐞�
inputValueHandler(row,index){
if(row){
const nextIndex = index+1
+ console.log(nextIndex, this.editTable)
for (let i = nextIndex; i < this.editTable.length; i++) {
const element = this.editTable[i];
- if(element.model==row.model){
+ if(element.model==row.model&&row.symbolItem==element.symbolItem){
this.editTable[i].value = row.value
- }else{
- break;
}
}
}
@@ -1258,7 +1571,13 @@
})
this.circulateShow = false
this.changeProductList0()
- this.currentMethod.insProduct = this.productList0
+ if(this.sampleSelectionList.length>0){
+ this.sampleSelectionList.forEach(item=>{
+ item.insProduct = this.productList0
+ })
+ }else{
+ this.currentMethod.insProduct = this.productList0
+ }
this.getProNum()
},
spliceTemperatureTest () {
@@ -1309,6 +1628,24 @@
return
}
this.spliceTemperatureTest()
+ },
+ savePowerTest(){
+ if(!this.powerTable.every(m=>m.ask))
+ {
+ this.$message.error('璇峰~鍐欏畬鏁存暟鎹�')
+ }
+ let num = 0;
+ let sampleList = this.HaveJson(this.sampleList)
+ sampleList.forEach(item=>{
+ item.insProduct.forEach(m=>{
+ if(m.inspectionItem.includes('鍔熺巼璇曢獙')&&m.state==1){
+ m.ask = '绔彛鏁�:'+this.powerTable[num].ask
+ num++
+ }
+ })
+ })
+ this.saveMethod(sampleList)
+ this.powerShow = false;
},
cleanTemperatureTest () {
this.temperatureTest = []
@@ -1480,14 +1817,23 @@
this.$message.error('鏈�夋嫨鏁版嵁')
return
}
- this.addObj.company = selects.company
- this.addObj.code = selects.code
- this.addObj.companyId = selects.id
- this.selectUserDia = false
- if(this.active==1){
- // TODO
- this.selectInsOrderTemplate()
+ if(this.createState==1){
+ this.addObj.company = selects.company
+ this.addObj.code = selects.code
+ this.addObj.companyId = selects.id
+ if(this.active==1){
+ this.selectInsOrderTemplate()
+ }
+ }else if(this.createState==2){
+ this.addObj.production = selects.company
+ // 濡傛灉閫夋嫨鐨勫崟浣嶆槸娌℃湁瀵瑰簲鐨勮嫳鏂囧悕绉板氨鐢�'/'浠f浛
+ if (!selects.companyEn) {
+ this.addObj.productionEn = '/'
+ } else {
+ this.addObj.productionEn = selects.companyEn
+ }
}
+ this.selectUserDia = false
},
containsValue(str) {
if(str){
@@ -1542,95 +1888,100 @@
return str.replace(find, value);
},
save() {
+ if(this.addObj.orderType=='C'&&this.addObj.departmentLimsId){
+ this.addObj.departmentLims = this.deaprtEnum.find(m=>m.id==this.addObj.departmentLimsId).name
+ }else if(this.addObj.orderType&&this.addObj.orderType!='C'&&!this.addObj.departmentLimsId){
+ this.addObj.departmentLims = '妫�娴嬩腑蹇�'
+ this.addObj.departmentLimsId = this.deaprtEnum.find(m=>m.name=='妫�娴嬩腑蹇�').id
+ }
+ // else{
+ // this.$message.error('璇烽�夋嫨妫�楠岀被鍒�')
+ // return
+ // }
if (!this.addObj.companyId) {
this.$message.error('鏈�夋嫨瀹㈡埛鍗曚綅')
+ return
+ }
+ let noLaboratory = this.totalArr.filter(a => a.state == 1&&!a.sonLaboratory)
+ if(noLaboratory.length>0){
+ let str = ''
+ noLaboratory.forEach((m,j)=>{
+ str += j==noLaboratory.length-1?m.inspectionItem+'-'+m.inspectionItemSubclass:m.inspectionItem+'-'+m.inspectionItemSubclass+','
+ })
+ this.$message.error(str+'娌℃湁鍏宠仈瀹為獙瀹ゅ锛岃鑱旂郴绠$悊鍛�')
return
}
if (!this.addObj.type) {
this.$message.error('鏈�夋嫨绱ф�ョ▼搴�')
} else if (!this.addObj.formType) {
- this.$message.error('璇疯緭鍏ユ潵鏍锋柟寮�')
+ this.$message.error('璇疯緭鍏ヨ鍗曠被鍨�')
} else if (!this.addObj.orderType) {
this.$message.error('璇烽�夋嫨妫�楠岀被鍒�')
} else if (!this.addObj.production) {
this.$message.error('璇疯緭鍏ョ敓浜у崟浣�')
} else if (!this.addObj.productionEn) {
this.$message.error('璇疯緭鍏ョ敓浜у崟浣岴N')
+ }else if (!this.addObj.departmentLimsId) {
+ this.$message.error('閫夋嫨涓嬪崟鍒板摢涓儴闂�')
} else if (this.sampleList.length < 1) {
this.$message.error('璇锋坊鍔犱竴涓牱鍝�')
} else if (!this.sampleList.every(m => m.sample)) {
this.$message.error('璇疯緭鍏ユ牱鍝佸悕绉�')
} else if (!this.sampleList.every(m => m.model)) {
this.$message.error('璇疯緭鍏ユ牱鍝佸瀷鍙�')
- } else if (!this.sampleList.every(m => m.standardMethodListId)) {
+ }else if (!this.addObj.appointed) {
+ this.$message.error('璇烽�夋嫨绾﹀畾鏃堕棿')
+ }else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) {
this.$message.error('璇烽�夋嫨妫�楠屾爣鍑�')
- } else {
- const select = this.selectTree.split(' - ')
- const productListSelected = this.productListSelected.some(item => item.inspectionItem === '娓╁害寰幆')
- let isHaveBushing = ''
- this.sampleList.forEach(item => {
- if (!item.bushing || item.bushing.length === 0) {
- isHaveBushing = false
+ } else if(this.addObj.formType&&this.addObj.formType!='鍏朵粬鎴愬搧'&&!this.addObj.issueUser){
+ this.$message.error('璇烽�夋嫨閫氱煡鑷虫牱鏈哄憳')
+ }else if(this.addObj.formType&&this.addObj.formType!='鍏朵粬鎴愬搧'&&!this.addObj.issueTime){
+ this.$message.error('璇烽�夋嫨鏍锋満瀹屾垚鏃堕棿')
+ }else{
+ //鏍¢獙妫�楠岄」鐨勮姹傚�煎拰瑕佹眰鎻忚堪,浠呭鎵樿姹�
+ // if(this.active==1&&this.isAskOnlyRead){
+ // const isTrue = this.checkRequiredValueAndRemark(filterProductList)
+ // if(!isTrue){
+ // this.$message.error('妫�楠岄」鐨勮姹傚�间笌瑕佹眰鎻忚堪涓嶅尮閰嶏紝 璇锋鏌�')
+ // return
+ // }
+ // }
+ let sampleList = this.HaveJson(this.sampleList)
+ for (let i = 0; i < sampleList.length; i++) {
+ if (sampleList[i].insProduct.length > 0) {
+ let set = new Set()
+ for (let j = 0; j < sampleList[i].insProduct.length; j++) {
+ if(sampleList[i].insProduct[j].state == 1){
+ let num0 = set.size
+ set.add(sampleList[i].insProduct[j].inspectionItem+'-'+sampleList[i].insProduct[j].inspectionItemSubclass)
+ let num1 = set.size
+ if(num0==num1){
+ this.$message.error(sampleList[i].insProduct[j].inspectionItem+'-'+sampleList[i].insProduct[j].inspectionItemSubclass+'閲嶅')
+ return
+ }
+ }
+ }
}
- })
- //杩囨护妫�娴嬮」锛氬幓闄ょ壒娈婇」
- let filterProductList = this.productListSelected.filter(ele=>ele.bsm==0&&/[0-9]/.test(ele.ask)).filter(ele=>{
- if(select[1].indexOf('閫氫俊')>=0 && ['鍏夌紗','鍏夌氦'].includes(select[2])){
- return !['娓╁害寰幆','鍏夌氦鎺ュご鎹熻��'].includes(ele.inspectionItem)
- }
- return true
- }).filter(ele=>{
- if(select[1].indexOf('鐢靛姏')>=0){
- return !['娓╁崌璇曢獙','鐑惊鐜�'].includes(ele.inspectionItem)
- }
- return true
- })
- /* //鏍¢獙妫�楠岄」鐨勮姹傚�煎拰瑕佹眰鎻忚堪
- const isTrue = this.checkRequiredValueAndRemark(filterProductList)
- if(!isTrue){
- this.$message.error('妫�楠岄」鐨勮姹傚�间笌瑕佹眰鎻忚堪涓嶅尮閰嶏紝 璇锋鏌�')
- return
- } */
- //鏍¢獙妫�楠岄」鐨勮姹傚�煎拰瑕佹眰鎻忚堪,浠呭鎵樿姹�
- if(this.isAskOnlyRead){
- const isTrue = this.checkRequiredValueAndRemark(filterProductList)
- if(!isTrue){
- this.$message.error('妫�楠岄」鐨勮姹傚�间笌瑕佹眰鎻忚堪涓嶅尮閰嶏紝 璇锋鏌�')
- return
- }
}
- console.log('isHaveBushing===', this.totalArr)
- // inspectionItem
- let spcialItem = this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('鏉惧绠�'))
- // console.log('isHaveBushing===', isHaveBushing)
- if (productListSelected && select[2] === '鍏夌紗' && isHaveBushing === false) {
- this.$message.error('鍏夌紗娓╁害寰幆椤圭洰蹇呴』杩涜鍏夌氦閰嶇疆')
- this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
- this.rowClick(this.currentMethod)
- this.sampleIds = [this.currentMethod.id]
- this.openConfig()
- return
- }else if(spcialItem&& isHaveBushing === false){
- this.$message.error('鏉惧绠¢」鐩繀椤昏繘琛屽厜绾ら厤缃�')
- this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
- this.rowClick(this.currentMethod)
- this.sampleIds = [this.currentMethod.id]
- this.openConfig()
- return
- }
- let sampleList = this.HaveJson(this.sampleList)
+ let index0 = sampleList.findIndex(m=>!m.sample)
+ if(index0>-1) return this.$message.error('璇峰~鍐欐牱鍝佸悕绉�')
+ let index1 = sampleList.findIndex(m=>!m.modelNum)
+ if(index1>-1) return this.$message.error('璇峰~鍐欎骇鍝佸瀷鍙�')
+
+
let projectNum = this.totalArr.filter(a => a.state == 1).length
if(projectNum==0){
- this.$confirm('妫�楠岄」鐩负绌猴紝鏄惁纭鎻愪氦?', "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
- this.saveMethod(sampleList)
- }).catch(() => {})
+ // this.$confirm('妫�楠岄」鐩负绌猴紝鏄惁纭鎻愪氦?', "鎻愮ず", {
+ // confirmButtonText: "纭畾",
+ // cancelButtonText: "鍙栨秷",
+ // type: "warning"
+ // }).then(() => {
+ // this.saveMethod(sampleList)
+ // }).catch(() => {})
+ return this.$message.error('璇锋坊鍔犳楠岄」鐩�')
}else{
- let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask.includes(b)) && a.state == 1)
+ let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask&&a.ask.includes(b)) && a.state == 1)
if (isRTS&&this.PROJECT=='妫�娴嬩腑蹇�') {
this.editTable = this.handleData(sampleList,this.containsValue, 0)
this.editTable.forEach(item => {
@@ -1639,60 +1990,25 @@
this.bsm3Dia = true;
return
}
+ let isPower = this.totalArr.find(a => a.inspectionItem.includes('鍔熺巼璇曢獙')&&a.state==1)
+ if (isPower) {
+ this.powerTable = this.totalArr.filter(a => a.inspectionItem.includes('鍔熺巼璇曢獙')&&a.state==1)
+ this.powerTable.forEach(a => {
+ a.ask = null
+ })
+ this.powerShow = true;
+ return
+ }
this.saveMethod(sampleList)
}
}
},
- /* checkRequiredValueAndRemark(data){
- let isTrue = true
- try{
- data.forEach(ele=>{
- if(['鈮�','鈮�','>','<','='].includes(ele.ask[0])){
- const askVal = ele.ask.substring(1,ele.ask.length)
- if(isNaN(askVal) || ele.tell.indexOf(askVal)<0){
- isTrue = false
- }
- }
- if(ele.ask.indexOf('-')>0 && ele.ask.length>1){
- let tell = ele.tell
- if(ele.tell.indexOf('~')>0){
- tell = ele.tell.replace('~','-')
- }
- const splits = ele.ask.split('-')
- if(splits.length==2 && !isNaN(splits[0]) && !isNaN(splits[1])){
- let min = Math.min(...splits)
- let max = Math.max(...splits)
- if(ele.tell.indexOf('卤')<0&&tell.indexOf(ele.ask)<0){
- isTrue = false
- }else if(ele.tell.indexOf('卤')>0&&ele.tell!=ele.ask){
- let splitNums = ele.tell.split('卤')
- if(splitNums.length<2){
- isTrue = false
- }else{
- let minTell = Number(splitNums[0])-Number(splitNums[1])
- let maxTell = Number(splitNums[0])+Number(splitNums[1])
- if(minTell!=min || maxTell!=max){
- isTrue = false
- }
- }
- }
- }else{
- isTrue = false
- }
- }
- })
- }catch(error){
- console.log(error);
- isTrue = false
- }
- return isTrue
- }, */
/**
-聽 聽 聽 聽* 鏍¢獙濮旀墭瑕佹眰鐨勬楠岄」鐨勮姹傛弿杩板拰瑕佹眰鍊�
-聽 聽 聽 聽*
-聽 聽 聽 聽*/
+ * 鏍¢獙濮旀墭瑕佹眰鐨勬楠岄」鐨勮姹傛弿杩板拰瑕佹眰鍊�
+ *
+ */
checkRequiredValueAndRemark(data){
- let isTrue = true
+ let isTrue = true
try{
data.forEach(ele=>{
//鍒ゆ柇锛堚墹,鈮�,>,<,=锛夎繖鍑犵鎯呭喌
@@ -1700,40 +2016,91 @@
if(['鈮�','鈮�','>','<','='].includes(ele.ask[0])){
const askVal = ele.ask.substring(1,ele.ask.length)
if(isNaN(askVal) || ele.tell.indexOf(askVal)<0){
+ console.log(1111);
isTrue = false
}
}
//鍒ゆ柇鑼冨洿(10-25),瑕佹眰鍊煎繀椤绘槸-
if(ele.ask.indexOf('-')>0 && ele.ask.length>1){
- //瑕佹眰鎻忚堪鐨剘鍜岃姹傚�肩殑-锛岀瓑鏁�
+ //瑕佹眰鎻忚堪鐨剘鍜岃姹傚�肩殑-锛岀瓑鏁�
let tell = ele.tell
- if(ele.tell.indexOf('~')>0){
- tell = ele.tell.replace('~','-')
+ if(ele.tell.indexOf('~')>0 || ele.tell.indexOf('锛�') || ele.tell.indexOf('锛�')){
+ tell = tell.replace('~','-')
+ tell = tell.replace('锛�','(')
+ tell = tell.replace('锛�',')')
}
const splits = ele.ask.split('-')
//婊¤冻鏍煎紡瑕佹眰锛屽苟涓斾袱涓兘鏄暟瀛�
if(splits.length==2 && !isNaN(splits[0]) && !isNaN(splits[1])){
- let min = Math.min(...splits)
- let max = Math.max(...splits)
- //鍒ゆ柇卤鐨勬儏鍐�
- if(ele.tell.indexOf('卤')<0&&tell.indexOf(ele.ask)<0){
+ /**
+ * 鍒ゆ柇鎯呭喌
+ * 1.瑕佹眰鎻忚堪涓庤姹傛弿杩扮浉鍚�
+ * 2.瑕佹眰鎻忚堪鍖呭惈瑕佹眰鍊�
+ * 3.瑕佹眰鎻忚堪涓�3N-10N杩欑鎯呭喌
+ * 4.瑕佹眰鎻忚堪涓�10卤5杩欑鎯呭喌
+ * 5.
+ */
+ let min = Math.min(...splits)
+ let max = Math.max(...splits)
+ if(min==max){
isTrue = false
- }else if(ele.tell.indexOf('卤')>0&&ele.tell!=ele.ask){
- let splitNums = ele.tell.split('卤')
- if(splitNums.length<2){
- isTrue = false
+ }
+ //瑕佹眰鎻忚堪涓笉鍖呭惈卤浠ュ強鍖洪棿鐨勬暟瀛楋紝鍒欒繑鍥瀎alse
+ if(tell.indexOf('卤')<0&&tell.indexOf('-')<0){
+ console.log(3333,ele);
+ console.log(3333333,tell,tell.indexOf('卤')<0,tell.indexOf('-')<0);
+ isTrue = false
+ }else if(ele.tell.indexOf('-')==0){
+ console.log(4444);
+ isTrue = false
+ }else if(tell.indexOf('-')>0){
+ if(tell.indexOf('卤')>0){
+ ////鏍¢獙瑕佹眰鎻忚堪涓�(10-15)卤5杩欑鍐欐硶鐨勬儏鍐�
+ const num = tell.split('卤')[1]
+ const startIndex = tell.indexOf('(')
+ const endIndex = tell.indexOf(')')
+ if(startIndex>-1 && endIndex>0 ){
+ const str = tell.substring(startIndex,endIndex)
+ if(str && str.indexOf('-')>0){
+ let strList = str.split('-')
+ const minNum = Number(strList[0]-num)
+ const maxNum = Number(strList[1]+num)
+ if(minNum>min || maxNum<max){
+ console.log(555555);
+ isTrue = false
+ }
+ }
+ }else{
+ //鏍¢獙瑕佹眰鎻忚堪涓�10卤5杩欑鍐欐硶鐨勬儏鍐�
+ let splitNums = ele.tell.split('卤')
+ if(splitNums.length<2){
+ console.log(66666);
+ isTrue = false
+ }else{
+ let minTell = Number(splitNums[0])-Number(splitNums[1])
+ let maxTell = Number(splitNums[0])+Number(splitNums[1])
+ if(minTell!=min || maxTell!=max){
+ console.log(7777777);
+ isTrue = false
+ }
+ }
+ }
}else{
- let minTell = Number(splitNums[0])-Number(splitNums[1])
- let maxTell = Number(splitNums[0])+Number(splitNums[1])
- if(minTell!=min || maxTell!=max){
+ const splitTells = tell.split('-')
+ if(splitTells[0].indexOf(min)<0 || splitTells[1].indexOf(max)<0){
+ console.log(88888888);
isTrue = false
}
}
}
}else{
+ console.log(89999999);
isTrue = false
}
}
+ // else if(ele.ask.indexOf('&')>0 && ele.ask.length>1){
+ // //鍒ゆ柇
+ // }
})
}catch(error){
console.log(error);
@@ -1741,7 +2108,6 @@
}
return isTrue
},
-
save0(){
if(this.editTable.every(m=>m.value)){
let sampleList = this.handleData(this.HaveJson(this.sampleList),this.handleAsk,1)
@@ -1773,7 +2139,7 @@
let arr = this.editTable.filter(b => b.sampleId == item.id)
for (var i=0;i<arr.length;i++){
if(a.ask){
- if(a.ask.includes(arr[i].symbolItem)){
+ if(a.ask&&a.ask.includes(arr[i].symbolItem)){
let ask = calBack(a.ask, arr[i].symbolItem,arr[i].value)
if (ask) {
a.ask = ask
@@ -1784,7 +2150,7 @@
}
}
}else{
- this.$message.error('瑕佹眰鍊间负绌猴紝闇�瑕佸幓鏍囧噯搴撶淮鎶わ紒')
+ // this.$message.error('瑕佹眰鍊间负绌猴紝闇�瑕佸幓鏍囧噯搴撶淮鎶わ紒')
}
}
// arr.forEach(f => {
@@ -1956,9 +2322,51 @@
}
},
saveMethod(sampleList){
+ let isHaveAsk = this.totalArr.filter(a => (a.ask === null||a.ask=='')&&a.state==1)
+ let isHaveAsk0 = this.totalArr.filter(a => (a.ask=='/'||a.ask=='-'||a.ask=='鈥斺��'||((/\d/.test(a.ask))&&(a.ask.includes('<')||a.ask.includes('>')||a.ask.includes('=')||a.ask.includes('锛�')||a.ask.includes('锛�')||a.ask.includes('鈮�')||a.ask.includes('鈮�'))))&&a.state==1)
+ let stateArr = this.totalArr.filter(a=>a.state==1)
+ if (isHaveAsk.length > 0) {
+ this.$message({
+ type: 'error',
+ message: '璇峰~鍐欒姹傚�煎悗鍐嶆彁浜�'
+ })
+ return false;
+ }
+ if (isHaveAsk0.length <stateArr.length) {
+ this.$message({
+ type: 'error',
+ message: '瑕佹眰鍊艰緭鍏ユ牸寮忎笉瀵癸紝鍙緭鍏�/銆�-銆佲�斺�斾唬琛ㄤ笉鍒ゅ畾锛�<銆�=銆�>銆佲墺銆佲墹鍔犱笂鏁板瓧浠h〃鑼冨洿锛岃閲嶆柊杈撳叆',
+ duration: 8 * 1000
+ })
+ return false;
+ }
+ let isHaveTell = this.totalArr.filter(a => (a.tell == null||a.tell=='')&&a.state==1)
+ if (isHaveTell.length > 0) {
+ this.$message({
+ type: 'error',
+ message: '璇峰~鍐欒姹傛弿杩板悗鍐嶆彁浜�'
+ })
+ return false;
+ }
+ if(this.ruleInfo.rule==1){
+ this.addObj.rule = '涓嶈�冭檻涓嶇‘瀹氬害'
+ }else if(this.ruleInfo.rule==2){
+ if(this.ruleInfo.rule==2&&(!this.ruleInfo.num||this.ruleInfo.num<0||this.ruleInfo.num==0)){
+ this.$message({
+ type: 'error',
+ message: '璇疯緭鍏ヤ笉纭畾搴�'
+ })
+ return;
+ }
+ this.addObj.rule = '鑰冭檻涓嶇‘瀹氬害'+'-'+this.ruleInfo.num
+ }
this.saveLoad = true
- this.$axios.post(this.$api.insOrder.addInsOrder, {
- str: JSON.stringify({
+ let fd = new FormData();
+ this.fileList.forEach((item,index)=>{
+ //鏂囦欢淇℃伅涓璻aw鎵嶆槸鐪熺殑鏂囦欢
+ fd.append("files",item.raw);
+ })
+ fd.append("str",JSON.stringify({
insOrder: this.addObj,
list: JSON.stringify(sampleList.map(a => {
if (this.PROJECT === '瑁呭鐢电紗') {
@@ -1981,7 +2389,12 @@
return a
})),
pairing: JSON.stringify(this.bsm2Val2)
- })
+ }));
+ this.$axios.post(this.$api.insOrder.addInsOrder, fd,{
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ },
+ noQs:true
}).then(res => {
this.saveLoad = false
if (res.code == 201) return
@@ -2030,7 +2443,10 @@
this.distributeData.appointed = ress.data
})
setTimeout(() => {
- this.issuedDialogVisible = true;
+ // this.issuedDialogVisible = true;
+ // this.$message.success('鎻愪氦鎴愬姛')
+ this.upLoad = false
+ this.$parent.playOrder(0)
}, 1000)
})
} else {
@@ -2090,9 +2506,15 @@
})
},
getProNum() {
- this.sampleSelectionList.forEach((m, i) => {
- Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
- })
+ if (this.active != 1) {
+ this.sampleList.forEach((m, i) => {
+ Vue.set(this.sampleList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
+ })
+ }else{
+ this.sampleSelectionList.forEach((m, i) => {
+ Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
+ })
+ }
this.$refs.sampleTable.doLayout()
},
searchFilter() {
@@ -2108,7 +2530,7 @@
this.selectTree = ''
this.models = val.children
this.getNodeParent(node)
- this.selectTree = this.selectTree.replace(' - ', '')
+
let data = this.selectTree.split(' - ')
let data2 = ''
for (let index = data.length - 1; index >= 0; index--) {
@@ -2139,30 +2561,27 @@
return data.label.indexOf(value) !== -1;
},
activeStandardTree() {
- let trees = this.selectTree.split(" - ")
+ if(this.selectTree == null || this.selectTree == '') return this.$message.error('鏈�夋嫨鏍峰搧绫诲瀷')
+ let trees = this.selectTree.split(" - ").filter(m=>m)
if (trees.length < 3) {
- this.$message.error('鏈�夋嫨瀵硅薄')
+ this.$message.error('鏈�夋嫨鏍峰搧绫诲埆')
return
}
- this.addObj.factory = trees[0]
- this.addObj.laboratory = trees[1]
- this.addObj.sampleType = trees[2]
- if (trees[3] === undefined || trees[3] === '') {
- this.addObj.sample = trees[2]
- } else {
- this.addObj.sample = trees[3]
- }
- this.addObj.model = (trees[4] == undefined ? null : trees[4])
+ this.addObj.factory = '涓ぉ绉戞妧妫�娴嬩腑蹇�'
+ this.addObj.laboratory = '閫氫俊浜у搧瀹為獙瀹�'
+ this.addObj.sampleType = trees[0]
+ this.addObj.sample = trees[1]
+ this.addObj.model = trees[2]
this.selectStandardTree = false
this.sampleList = []
for (var i = 0; i < this.addObj.sampleNum; i++) {
this.sample.joinName = null
this.sample.joinModel = null
this.sample.joinNum = 1
- this.sample.sample = this.addObj.sample
+ // this.sample.sample = this.addObj.sample
this.sample.model = this.addObj.model
this.sample.unit = this.addObj.unit
- this.sample.standardMethodListId = null
+ this.sample.standardMethodListId = []
this.sample.insProduct = []
this.sample.id = this.count
this.sample.childSampleList = []
@@ -2177,23 +2596,10 @@
selectsStandardMethodByFLSSM() {
this.methodLoad = true
this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
- tree: this.selectTree
+ tree: '涓ぉ绉戞妧妫�娴嬩腑蹇�'+' - '+'閫氫俊浜у搧瀹為獙瀹�'+' - '+this.selectTree
}).then(res => {
this.methodLoad = false
- try {
- if (res.data.standardMethodList.length == 0 && this.selectTree.split('-').length == 5) {
- let arr = this.selectTree.split('-')
- let arr0 = arr.slice(0, arr.length - 1)
- let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1)
- this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
- tree: selectTree
- }).then(ress => {
- this.methods = ress.data.standardMethodList
- })
- } else {
- this.methods = res.data.standardMethodList
- }
- } catch (e) {}
+ this.methods = res.data.standardMethodList
})
},
addStandardTree() {
@@ -2204,17 +2610,17 @@
this.sample.joinName = null
this.sample.joinModel = null
this.sample.joinNum = 1
- this.sample.sample = this.addObj.sample
+ // this.sample.sample = this.addObj.sample
this.sample.model = this.addObj.model
this.sample.unit = this.addObj.unit
- this.sample.standardMethodListId = null
+ this.sample.standardMethodListId = []
this.sample.insProduct = []
- this.sample.id = this.count
+ this.sample.id = parseInt(i+1)
this.sample.childSampleList = []
this.sample.insulating = null
this.sample.sheath = null
this.sampleList.push(this.HaveJson(this.sample))
- this.count++
+ // this.count++
}
this.computationalPairing(this.sampleList.length)
this.bsm2Val2 = this.HaveJson(this.bsm2Val3)
@@ -2247,12 +2653,6 @@
},
rowClick(row, column, event) {
this.currentMethod = row
- let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId)
- if (obj && obj.code == '濮旀墭瑕佹眰') {
- this.isAskOnlyRead = true
- } else {
- this.isAskOnlyRead = false
- }
this.sampleId = row.id
if (this.active !== 1) {
this.sampleIds = []
@@ -2283,7 +2683,8 @@
if(row.section === null) {
row.section = ""
}
- let arr = this.productList.filter(m=>m.state==1&&row.section.includes(m.section)&&m.ask&&m.section.indexOf('[')==-1)
+ // console.log(row,this.productList)
+ let arr = this.productList.filter(m=>m.state==1&&m.bsmRow&&m.bsmRow.section==row.section&&row.section.includes(m.section)&&m.ask&&m.section.indexOf('[')==-1)
if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1&&arr.length==0) {
if (row.section.indexOf('[') > -1) {
row.bsmRow = this.HaveJson(row)
@@ -2346,25 +2747,15 @@
}
return item
})
- const select = this.selectTree.split(' - ')
- if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 1&&this.isAskOnlyRead) {
- this.circulateShow = true;
- return
- } else if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 0) {
- this.circulateShow = false;
- }
- if ((row.inspectionItem === '娓╁崌璇曢獙' || row.inspectionItem === '鐑惊鐜�') && row.state === 1) {
- // console.log('row---', row)
- this.temperatureTitle = `${row.inspectionItem}瑕佹眰濉啓`
- this.isShowInput = row.inspectionItem === '鐑惊鐜�'
- this.temId = row.id
- this.temperatureShow = true;
- return
- } else if ((row.inspectionItem === '娓╁崌璇曢獙' || row.inspectionItem === '鐑惊鐜�') && row.state === 0) {
- this.temperatureShow = false;
- }
+
this.changeProductList0()
- this.currentMethod.insProduct = this.productList0
+ if(this.sampleSelectionList.length>0){
+ this.sampleSelectionList.forEach(item=>{
+ item.insProduct = this.productList0
+ })
+ }else{
+ this.currentMethod.insProduct = this.productList0
+ }
this.getProNum()
},
searchProject () {
@@ -2439,7 +2830,23 @@
// 淇濆瓨妯℃澘
addTemplateDia() {
if (this.templateName) {
- this.templateLoading = true;
+ if(this.templates.find(m=>m.name==this.templateName)){
+ this.$confirm('宸插瓨鍦ㄥ悓鍚嶆ā鏉匡紝鏄惁杩涜鏇挎崲?', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ this.saveTemplateDia()
+ }).catch(() => {})
+ }else{
+ this.saveTemplateDia()
+ }
+ } else {
+ this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
+ }
+ },
+ saveTemplateDia(){
+ this.templateLoading = true;
this.$axios.post(this.$api.insOrder.addInsOrderTemplate, {
name: this.templateName,
thing: JSON.stringify({
@@ -2459,15 +2866,17 @@
this.selectInsOrderTemplate()
this.templateName = ''
})
- } else {
- this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
- }
},
// 鏌ヨ妯℃澘
selectInsOrderTemplateById(e) {
this.$axios.post(this.$api.insOrder.selectInsOrderTemplateById + '?id=' + e).then(res => {
if (res.code == 201) return
let obj = JSON.parse(res.data)
+ console.log(obj);
+ //鍒跺崟浜鸿缃负褰撳墠鐧诲綍鐢ㄦ埛
+ let user = JSON.parse(localStorage.getItem('user'))
+ obj.addObj.custom = user.name
+ obj.addObj.userId = user.userId
this.addObj = obj.addObj;
this.sampleList = obj.sampleList;
this.selectTree = obj.selectTree
@@ -2484,19 +2893,26 @@
this.units = res.data
})
},
+ selectEnumByCategoryForStandard() {
+ this.$axios.post(this.$api.enums.selectEnumByCategory, {
+ category: "璇曢獙鏍囧噯"
+ }).then(res => {
+ this.standard = res.data
+ })
+ },
selectEnumByCategoryForOrderType() {
this.$axios.post(this.$api.enums.selectEnumByCategory, {
category: "妫�楠岀被鍒�"
}).then(res => {
this.orderType = res.data
if (res.data.length > 0) {
- this.addObj.orderType = res.data[0].value
+ this.addObj.orderType = 'C'
}
})
},
selectEnumByCategoryForSampleForm() {
this.$axios.post(this.$api.enums.selectEnumByCategory, {
- category: "鏉ユ牱鏂瑰紡"
+ category: "璁㈠崟绫诲瀷"
}).then(res => {
this.formType = res.data
if (this.formType.length > 0) {
@@ -2505,31 +2921,25 @@
})
},
methodChange(val, row) {
- if (val === null || val === '') return
+ if (val === null || val === ''||val.length ==0) return
this.currentMethod = row
- let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId)
- if (obj && obj.code == '濮旀墭瑕佹眰') {
- this.isAskOnlyRead = true
- } else {
- this.isAskOnlyRead = false
- }
this.getProductLoad = true
let selectTreeList = this.selectTree.split(" - ")
this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model)
this.$axios.post(this.$api.standardTree.selectStandardProductList, {
- model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum,
- standardMethodListId: val,
- factory: selectTreeList.join(" - "),
+ model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum+';'+row.testRequirements,
+ standardMethodListId: val.join(','),
+ factory: '涓ぉ绉戞妧妫�娴嬩腑蹇�'+' - '+'閫氫俊浜у搧瀹為獙瀹�'+' - '+selectTreeList.join(" - "),
}, {
headers: {
'Content-Type': 'application/json'
}
}).then(res => {
+ this.getProductLoad = false
res.data.forEach(a => {
a.state = 0
})
row.insProduct = this.HaveJson(res.data)
- this.getProductLoad = false
this.productList = row.insProduct
this.productList0 = JSON.parse(JSON.stringify(this.productList))
this.$refs.sampleTable.setCurrentRow(row)
@@ -2538,6 +2948,8 @@
if (a.state == 1) this.toggleSelection(a)
})
}, 200)
+ }).catch(e => {
+ this.getProductLoad = false
})
this.searchProject()
this.searchTemList()
@@ -2555,13 +2967,22 @@
}
})
},
- changeModel() {
+ changeModel(type) {
this.sampleList.forEach(a => {
let obj = this.sampleIds.find(b => b == a.id)
if (obj) {
- a.model = this.model
+ this.$set(a,type, this.allInfo[type])
+ if(type=='testRequirements'&&a.standardMethodListId&&a.standardMethodListId.length>0){
+ this.methodChange(a.standardMethodListId, a)
+ }
+ // a[type] = this.allInfo[type]
}
})
+ },
+ changeModel0(row){
+ if(row.standardMethodListId&&row.standardMethodListId.length>0){
+ this.methodChange(row.standardMethodListId, row)
+ }
},
changeStandardMethodListId() {
this.sampleList.forEach(a => {
@@ -2588,17 +3009,27 @@
},
// 瑕佹眰鍊煎彉鍖栨椂
requestChange(e, row,type) {
- this.sampleList.map(item => {
- if (this.sampleIds.indexOf(item.id) > -1) {
- item.insProduct.map(m => {
- if (m.id == row.id) {
- m[type] = e;
+ //this.currentMethod 褰撳墠鏍峰搧id
+ this.sampleList.forEach(item=>{
+ if(item.id == this.currentMethod.id){
+ item.insProduct.forEach(i=>{
+ if(i.id == row.id){
+ i[type] = e
}
- return m;
})
}
- return item
})
+ // this.sampleList.map(item => {
+ // if (this.sampleIds.indexOf(item.id) > -1) {
+ // item.insProduct.map(m => {
+ // if (m.id == row.id) {
+ // m[type] = e;
+ // }
+ // return m;
+ // })
+ // }
+ // return item
+ // })
},
selectStandardMethods() {
this.$axios.get(this.$api.standardTree.selectStandardMethodEnum).then(res => {
@@ -2657,30 +3088,6 @@
this.$refs.productTable.clearSelection()
return
}
- const select = this.selectTree.split(' - ')
- if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 1&&this.isAskOnlyRead) {
- this.circulateShow = true;
- return
- } else if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 0) {
- this.circulateShow = false;
- }
- if ((p.inspectionItem === '娓╁崌璇曢獙' || p.inspectionItem === '鐑惊鐜�') && p.state === 1) {
- // console.log('p---', p)
- this.temperatureTitle = `${p.inspectionItem}瑕佹眰濉啓`
- this.isShowInput = p.inspectionItem === '鐑惊鐜�'
- this.temId = p.id
- this.temperatureShow = true;
- return
- } else if ((p.inspectionItem === '娓╁崌璇曢獙' || p.inspectionItem === '鐑惊鐜�') && p.state === 0) {
- this.temperatureShow = false;
- }
- /* if (p.ask.includes('RTS')&&p.state === 1) {
- p.rts = ''
- this.bsm3Val = ''
- this.bsm3 = true
- this.bsm3Dia = true
- this.bsmRow3.push(p)
- } */
})
if (e.length > 0) {
this.sampleList.map(item => {
@@ -2704,7 +3111,13 @@
})
}
this.changeProductList0()
- this.currentMethod.insProduct = this.productList0
+ if(this.sampleSelectionList.length>0){
+ this.sampleSelectionList.forEach(item=>{
+ item.insProduct = this.productList0
+ })
+ }else{
+ this.currentMethod.insProduct = this.productList0
+ }
this.getProNum()
this.$nextTick(() => {
this.$refs.productTable.doLayout()
@@ -2750,36 +3163,6 @@
const property = column['property'];
return row[property] === value;
},
- openConfig() {
- if (this.active === 1) {
- if (this.sampleIds.length === 0) {
- this.$message.error("鏈�夋嫨鏍峰搧")
- return
- }
- this.configShow = true
- } else {
- if (this.sampleId === null) {
- this.$message.error('鏈�変腑鏍峰搧')
- return
- }
- this.sampleIds = [this.sampleId]
- this.$axios.post(this.$api.insBushing.selectBushingBySampleId, {
- sampleId: this.sampleId
- }).then(res => {
- if (res.data.length === 0) {
- this.$message.error('璇ユ牱鍝佹病鏈夐厤缃厜绾�')
- return
- }
- for (var i in this.sampleList) {
- if (this.sampleList[i].id = this.sampleId) {
- this.sampleList[i].bushing = res.data
- break
- }
- }
- this.configShow = true
- })
- }
- },
openEquipConfig() {
if (this.active === 1) {
if (this.sampleIds.length === 0) {
@@ -2787,35 +3170,6 @@
return
}
this.equipConfigShow = true
- } else {
- if (this.sampleId === null) {
- this.$message.error('鏈�変腑鏍峰搧')
- return
- }
- // this.$axios.post(this.$api.insBushing.selectBushingBySampleId, {
- // sampleId: this.sampleId
- // }).then(res => {
- // if (res.data.length === 0) {
- // this.$message.error('璇ユ牱鍝佹病鏈夐厤缃厜绾�')
- // return
- // }
- // for (var i in this.sampleList) {
- // if (this.sampleList[i].id = this.sampleId) {
- // this.sampleList[i].bushing = res.data
- // break
- // }
- // }
- // this.configShow = true
- // })
- }
- },
- openCableConfig() {
- if (this.active === 1) {
- if (this.sampleIds.length === 0) {
- this.$message.error("鏈�夋嫨鏍峰搧")
- return
- }
- this.cableConfigShow = true
} else {
if (this.sampleId === null) {
this.$message.error('鏈�変腑鏍峰搧')
@@ -2884,7 +3238,13 @@
}
}
this.changeProductList0()
- this.currentMethod.insProduct = this.productList0
+ if(this.sampleSelectionList.length>0){
+ this.sampleSelectionList.forEach(item=>{
+ item.insProduct = this.productList0
+ })
+ }else{
+ this.currentMethod.insProduct = this.productList0
+ }
},
save1 () {
if (this.bsm1DiaList.length > 0) {
@@ -3023,7 +3383,6 @@
getTotal() {
this.totalArr = []
this.total = 0;
- // console.log(this.sampleList)
this.sampleList.forEach(item => {
if (item.insProduct && item.insProduct.length > 0) {
item.insProduct.forEach(a => {
@@ -3116,6 +3475,11 @@
if(this.sonLaboratoryList.length>0){
this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
}
+ },
+ selectDepartmentEnum(){
+ this.$axios.get(this.$api.department.selectDepartmentLimsEnum).then(res=>{
+ this.deaprtEnum = res.data.filter(item=>item.name === '璐ㄩ噺閮�' || item.name === '妫�娴嬩腑蹇�')
+ })
}
}
}
--
Gitblit v1.9.3