From 45792b3776cda2e1ada31755ffc226a663f90b48 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 19 三月 2025 15:32:23 +0800
Subject: [PATCH] 锁屏功能
---
src/views/business/inspectionOrder/add.vue | 2587 +++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 1,846 insertions(+), 741 deletions(-)
diff --git a/src/views/business/inspectionOrder/add.vue b/src/views/business/inspectionOrder/add.vue
index 68a2506..1691fcb 100644
--- a/src/views/business/inspectionOrder/add.vue
+++ b/src/views/business/inspectionOrder/add.vue
@@ -1,71 +1,159 @@
<template>
<div class="bg-1">
- <div v-show="!configShow && !equipConfigShow && !cableConfigShow">
+ <div style="margin: 5px 15px" v-show="!configShow && !equipConfigShow">
<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="6"
+ >濮旀墭鍗曚俊鎭� 鎬讳环锛�<span style="color: #3a7bfa"
+ >锟{ total }}</span
+ ></el-col
+ >
<el-col :span="18" style="text-align: right">
- <el-select v-model="template" size="medium" filterable 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">
+ <el-select
+ v-model="template"
+ size="medium"
+ filterable
+ 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"
+ >
<span style="float: left">{{ a.name }}</span>
- <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px"
- @click.stop="handleDelete(a)"></i>
+ <i
+ class="el-icon-delete"
+ style="float: right; color: #66b1ff; font-size: 16px"
+ @click.stop="handleDelete(a)"
+ ></i>
</el-option>
</el-select>
- <el-button size="medium" @click="templateDia = true" v-show="active == 1">
+ <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"
+ 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" :disabled="saveLoad">涓嶉�氳繃</el-button>
- <el-button size="medium" type="primary" @click="upInsOrderOfState(1)" :loading="saveLoad"
- v-show="active == 3 && addObj.companyId">閫氳繃</el-button>
- <el-button size="medium" @click="$parent.playOrder(0)">
+ <el-button
+ size="medium"
+ @click="upInsOrderOfState(2)"
+ :loading="saveLoad"
+ v-show="active == 3 && addObj.companyId"
+ :disabled="saveLoad"
+ >涓嶉�氳繃</el-button
+ >
+ <el-button
+ size="medium"
+ type="primary"
+ @click="upInsOrderOfState(1)"
+ :loading="saveLoad"
+ v-show="active == 3 && addObj.companyId"
+ >閫氳繃</el-button
+ >
+ <el-button size="medium" @click="goBack">
<span style="color: #3a7bfa">杩斿洖</span>
</el-button>
</el-col>
</el-row>
</div>
- <basic-container>
- <div class="search" v-show="!configShow && !equipConfigShow && !cableConfigShow">
- <el-form :model="addObj" :rules="formRule" label-position="right" inline>
+ <basic-container v-show="!configShow && !equipConfigShow">
+ <div class="search">
+ <el-form
+ :model="addObj"
+ :rules="formRule"
+ label-position="right"
+ inline
+ >
<el-row>
<el-col :span="6">
<el-form-item label="濮旀墭缂栧彿锛�" prop="entrustCode">
- <el-input v-model="addObj.entrustCode" size="small" class="search_input" placeholder="绯荤粺鐢熸垚"
- disabled></el-input>
+ <el-input
+ v-model="addObj.entrustCode"
+ size="small"
+ class="search_input"
+ placeholder="绯荤粺鐢熸垚"
+ disabled
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="妫�楠岀被鍒細" prop="orderType">
- <el-select size="small" class="search_input" clearable v-model="addObj.orderType"
- :disabled="active > 1">
- <el-option v-for="(a, ai) in orderType" :key="ai" :value="a.dictValue"
- :label="a.dictLabel"></el-option>
+ <el-select
+ size="small"
+ class="search_input"
+ clearable
+ v-model="addObj.orderType"
+ :disabled="active > 1"
+ >
+ <el-option
+ v-for="(a, ai) in orderType"
+ :key="ai"
+ :value="a.dictValue"
+ :label="a.dictLabel"
+ ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="鍒跺崟浜猴細" prop="custom">
- <el-input size="small" class="search_input" clearable disabled v-model="addObj.custom"></el-input>
+ <el-input
+ size="small"
+ class="search_input"
+ clearable
+ disabled
+ v-model="addObj.custom"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="濮旀墭鍗曚綅锛�" prop="company" class="company_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"
- :disabled="active > 1 || addObj.company != '涓ぉ绉戞妧妫�娴嬩腑蹇�'
- "></el-button></template>
+ <el-form-item
+ label="濮旀墭鍗曚綅锛�"
+ prop="company"
+ class="company_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"
+ :disabled="
+ active > 1 || addObj.company != '涓ぉ绉戞妧妫�娴嬩腑蹇�'
+ "
+ ></el-button
+ ></template>
</el-input>
</el-form-item>
</el-col>
@@ -73,53 +161,104 @@
<el-row>
<el-col :span="6">
<el-form-item label="鑱旂郴鏂瑰紡锛�" prop="phone">
- <el-input size="small" placeholder="璇疯緭鍏�" class="search_input" clearable :readonly="active > 1"
- v-model="addObj.phone"></el-input>
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ class="search_input"
+ clearable
+ :disabled="active > 1"
+ v-model="addObj.phone"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="绱ф�ョ▼搴︼細" prop="type">
- <el-select @change="changeType" size="small" class="search_input" clearable v-model="addObj.type"
- :disabled="active > 1">
- <el-option v-for="(a, ai) in type" :key="ai" :value="a.dictValue" :label="a.dictLabel"></el-option>
+ <el-select
+ @change="changeType"
+ size="small"
+ class="search_input"
+ clearable
+ v-model="addObj.type"
+ :disabled="active > 1"
+ >
+ <el-option
+ v-for="(a, ai) in type"
+ :key="ai"
+ :value="a.dictValue"
+ :label="a.dictLabel"
+ ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鏍峰搧鍚嶇О锛�" prop="sample" class="sample_input">
+ <el-form-item
+ label="鏍峰搧鍚嶇О锛�"
+ prop="sample"
+ class="sample_input"
+ >
<el-input readonly size="small" v-model="addObj.sample">
- <template slot="append"><el-button slot="append" icon="el-icon-search"
- @click="selectStandardTree = true" :disabled="active > 1"></el-button></template>
+ <template slot="append"
+ ><el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="selectStandardTree = true"
+ :disabled="active > 1"
+ ></el-button
+ ></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="鏍峰搧鏁伴噺锛�" prop="sampleNum">
- <el-input-number size="small" v-model="addObj.sampleNum" :min="1" :max="100" :precision="0"
- @change="addStandardTree" :disabled="active > 1"></el-input-number>
+ <el-input-number
+ size="small"
+ v-model="addObj.sampleNum"
+ :min="1"
+ :max="100"
+ :precision="0"
+ @change="addStandardTree"
+ :disabled="active > 1"
+ ></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="鏉ユ牱鏂瑰紡锛�" prop="formType">
- <el-select v-model="addObj.formType" size="small" class="search_input" :disabled="active > 1">
- <el-option v-for="(a, ai) in formType" :key="ai" :label="a.dictLabel"
- :value="a.dictValue"></el-option>
+ <el-select
+ v-model="addObj.formType"
+ size="small"
+ class="search_input"
+ :disabled="active > 1"
+ >
+ <el-option
+ v-for="(a, ai) in formType"
+ :key="ai"
+ :label="a.dictLabel"
+ :value="a.dictValue"
+ ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="鎶ュ憡鍙戦�佹柟寮忥細" prop="send">
- <el-radio-group v-model="addObj.send">
+ <el-radio-group v-model="addObj.send" :disabled="active > 1">
<el-radio :label="1">鑷彇</el-radio>
<el-radio :label="0">鍏朵粬</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鏍峰搧澶勭悊鏂瑰紡锛�" prop="processing" class="processing_input">
- <el-radio-group v-model="addObj.processing" size="mini">
+ <el-form-item
+ label="鏍峰搧澶勭悊鏂瑰紡锛�"
+ prop="processing"
+ class="processing_input"
+ >
+ <el-radio-group
+ v-model="addObj.processing"
+ :disabled="active > 1"
+ size="mini"
+ >
<el-radio :label="0">濮旀墭鍗曚綅鍙栧洖</el-radio>
<el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio>
</el-radio-group>
@@ -127,33 +266,64 @@
</el-col>
<el-col :span="6">
<el-form-item label="宸ョ▼鍚嶇О锛�" prop="engineering">
- <el-input size="small" class="search_input" :placeholder="active > 1 ? '' : '璇疯緭鍏�'" clearable
- v-model="addObj.engineering" :readonly="active > 1"></el-input>
+ <el-input
+ size="small"
+ class="search_input"
+ :placeholder="active > 1 ? '' : '璇疯緭鍏�'"
+ clearable
+ v-model="addObj.engineering"
+ :disabled="active > 1"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item label="宸ョ▼鍚嶇ОEN锛�" prop="engineeringEn" class="engineeringEn_input">
- <el-input size="small" :placeholder="active > 1 ? '' : '璇疯緭鍏�'" clearable v-model="addObj.engineeringEn"
- :readonly="active > 1"></el-input>
+ <el-form-item
+ label="宸ョ▼鍚嶇ОEN锛�"
+ prop="engineeringEn"
+ class="engineeringEn_input"
+ >
+ <el-input
+ size="small"
+ :placeholder="active > 1 ? '' : '璇疯緭鍏�'"
+ clearable
+ v-model="addObj.engineeringEn"
+ :disabled="active > 1"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="鐢熶骇鍗曚綅锛�" prop="production">
- <el-input size="small" class="search_input" placeholder="璇疯緭鍏�" clearable v-model="addObj.production"
- :readonly="active > 1"></el-input>
+ <el-input
+ size="small"
+ class="search_input"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="addObj.production"
+ :disabled="active > 1"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鐢熶骇鍗曚綅EN锛�" prop="productionEn" class="productionEn_input">
- <el-input size="small" class="search_input" placeholder="璇疯緭鍏�" clearable v-model="addObj.productionEn"
- :readonly="active > 1"></el-input>
+ <el-form-item
+ label="鐢熶骇鍗曚綅EN锛�"
+ prop="productionEn"
+ class="productionEn_input"
+ >
+ <el-input
+ size="small"
+ class="search_input"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="addObj.productionEn"
+ :disabled="active > 1"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="鏄惁鐣欐牱锛�" prop="isLeave">
- <el-radio-group v-model="addObj.isLeave">
+ <el-radio-group v-model="addObj.isLeave" :disabled="active > 1">
<el-radio :label="0">涓嶇暀鏍�</el-radio>
<el-radio :label="1">鐣欐牱</el-radio>
</el-radio-group>
@@ -163,244 +333,1255 @@
<el-row>
<el-col :span="6">
<el-form-item label="鏄惁娑夊強閰嶅鏍峰搧锛�" prop="mating">
- <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()">
+ <el-radio-group
+ :disabled="active > 1"
+ v-model="addObj.mating"
+ @change="$refs.sampleTable.doLayout()"
+ >
<el-radio :label="1">鏄�</el-radio>
<el-radio :label="0">鍚�</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="OTC璁㈠崟鍙凤細" prop="otcCode" class="otcCode_input">
- <el-input size="small" :placeholder="active > 1 ? '' : '璇疯緭鍏�'" clearable v-model="addObj.otcCode"
- :readonly="active > 1"></el-input>
+ <el-form-item
+ label="OTC璁㈠崟鍙凤細"
+ prop="otcCode"
+ class="otcCode_input"
+ >
+ <el-input
+ size="small"
+ :placeholder="active > 1 ? '' : '璇疯緭鍏�'"
+ clearable
+ v-model="addObj.otcCode"
+ :disabled="active > 1"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="濮旀墭浜猴細" prop="prepareUser">
- <el-input size="small" class="search_input" :placeholder="active > 1 ? '' : '璇疯緭鍏�'" clearable
- v-model="addObj.prepareUser" :readonly="active > 1"></el-input>
+ <el-input
+ size="small"
+ class="search_input"
+ :placeholder="active > 1 ? '' : '璇疯緭鍏�'"
+ clearable
+ v-model="addObj.prepareUser"
+ :disabled="active > 1"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="澶囨敞锛�" prop="remark">
- <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 2 }" size="small" clearable
- :placeholder="active > 1 ? '' : '璇疯緭鍏�'" v-model="addObj.remark" :readonly="active > 1"></el-input>
+ <el-input
+ type="textarea"
+ :autosize="{ minRows: 2, maxRows: 2 }"
+ size="small"
+ clearable
+ :placeholder="active > 1 ? '' : '璇疯緭鍏�'"
+ v-model="addObj.remark"
+ :disabled="active > 1"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</basic-container>
- <basic-container>
- <div style="height: auto">
- <div class="search" v-if="active == 1" style="display: flex; background: transparent">
- <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-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- </div>
- <div>
- <div class="search_label">妫�楠屾爣鍑嗭細</div>
- <div class="search_input">
- <el-select filterable v-model="standardMethodListId" :placeholder="active > 1 ? '' : '璇疯緭鍏�'" size="small"
- @focus="methodFocus" :loading="methodLoad" @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
+ class="search"
+ v-if="active == 1 && !configShow && !equipConfigShow"
+ style="display: flex; background: transparent"
+ >
+ <div style="display: flex; align-items: center">
+ <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-option
+ v-for="item in models"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
</div>
- <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">
- <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">
+ </div>
+ <div style="display: flex; align-items: center">
+ <div class="search_label">妫�楠屾爣鍑嗭細</div>
+ <div class="search_input">
+ <el-select
+ filterable
+ v-model="standardMethodListId"
+ :placeholder="active > 1 ? '' : '璇疯緭鍏�'"
+ size="small"
+ @focus="methodFocus"
+ :loading="methodLoad"
+ @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>
+ <basic-container v-show="!configShow && !equipConfigShow">
+ <div style="height: auto">
+ <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"
+ >
+ <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"
+ ></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="140"
+ align="center"
+ >
<template slot-scope="scope">
- <el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
- :readonly="active > 1"></el-input>
+ <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="鏍峰搧鍨嬪彿"
- 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-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="鍨嬪彿鍙傛暟"
+ width="130"
+ align="center"
+ v-if="!(active > 1)"
+ >
<template slot-scope="scope">
- <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>
+ <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="standardMethodListId" label="妫�楠屾爣鍑�" align="center" min-width="100">
+ <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="妫�楠屾爣鍑�" filterable size="small" :loading="methodLoad"
- @change="(value) => methodChange(value, scope.row)" @focus="methodFocus" :readonly="active > 1"
- style="width: 100%" clearable @clear="productList = []">
- <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
+ <el-select
+ v-model="scope.row.standardMethodListId"
+ :disabled="scope.row.model == null || active > 1"
+ placeholder="妫�楠屾爣鍑�"
+ filterable
+ size="small"
+ :loading="methodLoad"
+ @change="(value) => methodChange(value, scope.row)"
+ @focus="methodFocus"
+ :readonly="active > 1"
+ style="width: 100%"
+ clearable
+ @clear="productList = []"
+ >
+ <el-option
+ v-for="item in methods"
+ :key="item.id"
+ :label="item.code"
+ :value="item.id"
+ >
</el-option>
</el-select>
</template>
</el-table-column>
- <el-table-column prop="joinName" label="閰嶅鏍峰搧鍚嶇О" width="140" align="center" v-if="addObj.mating == 1">
+ <el-table-column
+ prop="joinName"
+ label="閰嶅鏍峰搧鍚嶇О"
+ width="140"
+ align="center"
+ v-if="addObj.mating == 1"
+ >
<template slot-scope="scope">
- <el-input size="small" type="textarea" :autosize="{ minRows: 1, maxRows: 1 }"
- v-model="scope.row.joinName"></el-input>
+ <el-input
+ size="small"
+ type="textarea"
+ :autosize="{ minRows: 1, maxRows: 1 }"
+ v-model="scope.row.joinName"
+ ></el-input>
</template>
</el-table-column>
- <el-table-column prop="joinModel" label="閰嶅鏍峰搧鍨嬪彿" width="140" align="center" v-if="addObj.mating == 1">
+ <el-table-column
+ prop="joinModel"
+ label="閰嶅鏍峰搧鍨嬪彿"
+ width="140"
+ align="center"
+ v-if="addObj.mating == 1"
+ >
<template slot-scope="scope">
- <el-input size="small" type="textarea" :autosize="{ minRows: 1, maxRows: 1 }"
- v-model="scope.row.joinModel"></el-input>
+ <el-input
+ size="small"
+ type="textarea"
+ :autosize="{ minRows: 1, maxRows: 1 }"
+ v-model="scope.row.joinModel"
+ ></el-input>
</template>
</el-table-column>
- <el-table-column prop="joinNum" label="閰嶅鏍峰搧鏁伴噺" width="140" align="center" v-if="addObj.mating == 1">
+ <el-table-column
+ prop="joinNum"
+ label="閰嶅鏍峰搧鏁伴噺"
+ width="140"
+ align="center"
+ v-if="addObj.mating == 1"
+ >
<template slot-scope="scope">
- <el-input-number size="small" v-model="scope.row.joinNum" :min="1" :max="100" :precision="0"
- :controls="false" style="width: 80%"></el-input-number>
+ <el-input-number
+ size="small"
+ v-model="scope.row.joinNum"
+ :min="1"
+ :max="100"
+ :precision="0"
+ :controls="false"
+ style="width: 80%"
+ ></el-input-number>
</template>
</el-table-column>
- <el-table-column prop="proNum" label="寰呮椤规暟閲�" width="105" align="center"></el-table-column>
+ <el-table-column
+ prop="proNum"
+ label="寰呮椤规暟閲�"
+ width="105"
+ align="center"
+ ></el-table-column>
</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="standardLoading || getProductLoad" @select-all="handleAll">
- <el-table-column type="selection" width="65" :selectable="selectable" v-if="active == 1"></el-table-column>
- <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip>
+ <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="standardLoading || getProductLoad"
+ @select-all="handleAll"
+ >
+ <el-table-column
+ type="selection"
+ width="65"
+ :selectable="selectable"
+ v-if="active == 1"
+ ></el-table-column>
+ <el-table-column
+ prop="inspectionItem"
+ label="妫�楠岄」"
+ min-width="140"
+ show-overflow-tooltip
+ >
<template slot="header" slot-scope="scope">
- <div style="
+ <div
+ style="
display: flex;
align-items: center;
flex-direction: column;
font-size: 14px;
- ">
+ "
+ >
<span>妫�楠岄」</span>
- <el-input v-if="active == 1" v-model="inspectionItem" @input="searchFilterList" size="mini"
- placeholder="璇疯緭鍏�" />
+ <el-input
+ v-if="active == 1"
+ v-model="inspectionItem"
+ @input="searchFilterList"
+ size="mini"
+ placeholder="璇疯緭鍏�"
+ />
</div>
</template>
</el-table-column>
- <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140" show-overflow-tooltip>
+ <el-table-column
+ prop="inspectionItemSubclass"
+ label="妫�楠岄」瀛愰」"
+ min-width="140"
+ show-overflow-tooltip
+ >
<template slot="header" slot-scope="scope">
- <div style="
+ <div
+ style="
display: flex;
align-items: center;
flex-direction: column;
font-size: 14px;
- ">
+ "
+ >
<span>妫�楠岄」瀛愰」</span>
- <el-input v-if="active == 1" v-model="inspectionItemSubclass" @input="searchFilterList" size="mini"
- placeholder="璇疯緭鍏�" />
+ <el-input
+ v-if="active == 1"
+ v-model="inspectionItemSubclass"
+ @input="searchFilterList"
+ size="mini"
+ placeholder="璇疯緭鍏�"
+ />
</div>
</template>
</el-table-column>
<el-table-column prop="tell" label="瑕佹眰鎻忚堪" min-width="220px">
<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>
+ <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>
<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"
+ v-if="isAskOnlyRead"
+ >
<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="
+ <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>
+ "
+ ></el-input>
<span v-else>
<template>{{ scope.row.ask }}</template>
</span>
</template>
</el-table-column>
- <el-table-column prop="methodS" label="璇曢獙鏂规硶" min-width="120" show-overflow-tooltip>
+ <el-table-column
+ prop="methodS"
+ label="璇曢獙鏂规硶"
+ min-width="120"
+ show-overflow-tooltip
+ >
<template slot="header" slot-scope="scope">
- <div style="
+ <div
+ style="
display: flex;
align-items: center;
flex-direction: column;
font-size: 14px;
- ">
+ "
+ >
<span>璇曢獙鏂规硶</span>
- <el-input v-if="active == 1" v-model="methodS" @input="searchFilterList" size="mini"
- placeholder="璇疯緭鍏�" />
+ <el-input
+ v-if="active == 1"
+ v-model="methodS"
+ @input="searchFilterList"
+ size="mini"
+ placeholder="璇疯緭鍏�"
+ />
</div>
</template>
</el-table-column>
- <el-table-column prop="unit" label="璁¢噺鍗曚綅" width="100" show-overflow-tooltip></el-table-column>
- <el-table-column prop="price" label="鍗曚环" width="100" show-overflow-tooltip></el-table-column>
- <el-table-column prop="section" label="鍖洪棿" min-width="120" show-overflow-tooltip></el-table-column>
- <el-table-column prop="sonLaboratory" label="瀛愬疄楠屽" min-width="130" show-overflow-tooltip :filters="filters"
- :filter-method="filterHandler"></el-table-column>
+ <el-table-column
+ prop="unit"
+ label="璁¢噺鍗曚綅"
+ width="100"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="price"
+ label="鍗曚环"
+ width="100"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="section"
+ label="鍖洪棿"
+ min-width="120"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="sonLaboratory"
+ label="瀛愬疄楠屽"
+ min-width="130"
+ show-overflow-tooltip
+ :filters="filters"
+ :filter-method="filterHandler"
+ ></el-table-column>
</el-table>
</div>
</basic-container>
+ <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">
+ <el-input
+ placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�"
+ suffix-icon="el-icon-search"
+ v-model="search"
+ size="small"
+ style="margin-bottom: 5px"
+ clearable
+ @blur="searchFilter"
+ @clear="searchFilter"
+ @keyup.enter.native="searchFilter"
+ ></el-input>
+ </el-col>
+ </el-row>
+ <el-tree
+ :data="list"
+ ref="tree"
+ :props="{ children: 'children', label: 'label' }"
+ node-key="label"
+ :filter-node-method="filterNode"
+ @node-click="handleNodeClick"
+ highlight-current
+ @node-expand="nodeOpen"
+ @node-collapse="nodeClose"
+ :default-expanded-keys="expandedKeys"
+ @dblclick.native="activeStandardTree"
+ >
+ <div class="custom-tree-node" slot-scope="{ node, data }">
+ <el-row>
+ <el-col :span="24">
+ <span
+ ><i
+ :class="`node_i ${
+ data.children != undefined
+ ? data.code === '[1]'
+ ? 'el-icon-folder-opened'
+ : 'el-icon-folder'
+ : 'el-icon-tickets'
+ }`"
+ ></i>
+ {{ data.code }} {{ data.label }}</span
+ >
+ </el-col>
+ </el-row>
+ </div>
+ </el-tree>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="selectStandardTree = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="activeStandardTree">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog title="閫夋嫨鍗曚綅" :visible.sync="selectUserDia" width="70%">
+ <div class="body" style="height: 60vh" v-if="selectUserDia">
+ <ValueTable
+ ref="ValueTable2"
+ :url="$api.user.selectCustomPageList"
+ :componentData="componentData2"
+ />
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="selectUserDia = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="selectUser">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog title="淇濆瓨妯℃澘" :visible.sync="templateDia" width="400px">
+ <div
+ class="body"
+ style="display: flex; align-items: center"
+ v-if="templateDia"
+ >
+ <div class="search_label" style="width: 90px">
+ <span class="required-span">* </span>妯℃澘鍚嶇О锛�
+ </div>
+ <div class="search_input">
+ <el-input size="small" clearable v-model="templateName"></el-input>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="templateDia = false">鍙� 娑�</el-button>
+ <el-button
+ type="primary"
+ @click="addTemplateDia"
+ :loading="templateLoading"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="妫�楠屼笅鍙�"
+ :visible.sync="issuedDialogVisible"
+ width="450px"
+ :close-on-click-modal="false"
+ :close-on-press-escape="false"
+ :show-close="false"
+ >
+ <div class="body" style="max-height: 60vh">
+ <el-row style="margin-bottom: 20px">
+ <el-col :span="8" style="text-align: right">
+ <div><span class="required-span">* </span>绾﹀畾鏃堕棿锛�</div>
+ </el-col>
+ <el-col :span="16">
+ <el-date-picker
+ size="small"
+ v-model="distributeData.appointed"
+ :picker-options="{ disabledDate: this.disabledDate }"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ style="width: 100%"
+ format="yyyy-MM-dd"
+ >
+ </el-date-picker>
+ </el-col>
+ </el-row>
+ <el-row style="margin-bottom: 20px">
+ <el-col :span="8" style="text-align: right">
+ <div>
+ <span class="required-span" v-if="addObj.type == 2">* </span
+ >鎸囨淳浜哄憳锛�
+ </div>
+ </el-col>
+ <el-col :span="16">
+ <el-select
+ multiple
+ v-model="distributeData.userId"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ filterable
+ style="width: 100%"
+ @change="changeUser"
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-col>
+ </el-row>
+ <el-row
+ v-if="distributeData.userId.length > 0"
+ style="margin-bottom: 20px"
+ >
+ <el-col :span="8" style="text-align: right">
+ <div><span class="required-span">* </span>璇曢獙瀹わ細</div>
+ </el-col>
+ <el-col :span="16">
+ <el-select
+ v-model="distributeData.sonLaboratory"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ filterable
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in sonLaboratoryList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-col>
+ </el-row>
+ <el-row style="margin-bottom: 20px">
+ <el-col :span="8" style="text-align: right">
+ <div><span class="required-span">* </span>鍒涘缓濮旀墭鍗曪細</div>
+ </el-col>
+ <el-col :span="16">
+ <el-select
+ v-model="distributeData.isCreate"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ filterable
+ style="width: 100%"
+ >
+ <el-option label="鏄�" :value="true"></el-option>
+ <el-option label="鍚�" :value="false"></el-option>
+ </el-select>
+ </el-col>
+ </el-row>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="issuedDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm2" :loading="upLoad"
+ >纭� 瀹�</el-button
+ >
+ </el-row>
+ </span>
+ </el-dialog>
+ <el-dialog title="涓嶉�氳繃鍘熷洜" :visible.sync="noDialogVisible" width="400px">
+ <div class="body" style="max-height: 60vh">
+ <el-row>
+ <el-col :span="8" style="text-align: right">
+ <div><span class="required-span">* </span>涓嶉�氳繃鍘熷洜锛�</div>
+ </el-col>
+ <el-col :span="16">
+ <el-input
+ v-model="tell"
+ size="small"
+ placeholder="璇疯緭鍏ヤ笉閫氳繃鍘熷洜"
+ ></el-input>
+ </el-col>
+ </el-row>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="(noDialogVisible = false), (tell = '')"
+ >鍙� 娑�</el-button
+ >
+ <el-button type="primary" @click="submitTell" :loading="noLoading"
+ >纭� 瀹�</el-button
+ >
+ </el-row>
+ </span>
+ </el-dialog>
+ <fiberOpticConfig
+ :fiberPairing="fiberPairing"
+ :currentId="currentId"
+ @saveFiberopticConfig="saveFiberConfigEvent($event)"
+ v-if="configShow && examine == 0"
+ :active="active"
+ :inspectionItemST="inspectionItemST"
+ />
+ <fiberOpticConfigReadOnly
+ :currentId="currentId"
+ v-if="configShow && examine == 1"
+ :active="active"
+ />
+ <equipConfig
+ :currentId="currentId"
+ v-if="equipConfigShow"
+ :active="active"
+ />
+ <!-- 鍗曢�夌壒娈婂�煎鐞嗘-->
+ <el-dialog
+ title="妫�娴嬪埌鐗规畩椤癸紝璇蜂綔鍑轰互涓嬮�夋嫨"
+ :visible.sync="bsm1Dia"
+ :close-on-press-escape="false"
+ :close-on-click-modal="false"
+ min-width="400px"
+ :show-close="false"
+ :before-close="beforeClose"
+ >
+ <div class="body" style="max-height: 60vh">
+ <el-row v-if="bsm1">
+ <el-col
+ class="search_thing"
+ :span="24"
+ style="height: initial; margin: 5px 0"
+ >
+ <div class="search_label" style="width: 80px">
+ <span class="required-span">* </span>閫夐」锛�
+ </div>
+ <div class="search_input">
+ <el-radio-group v-model="bsm1Val" @input="upBsm1">
+ <el-radio
+ v-for="(a, ai) in JSON.parse(bsmRow.section)"
+ :key="ai"
+ :label="a"
+ style="margin-bottom: 2px; margin-top: 2px"
+ ></el-radio>
+ </el-radio-group>
+ </div>
+ </el-col>
+ <el-col
+ class="search_thing"
+ :span="24"
+ style="height: initial; margin: 5px 0"
+ >
+ <div class="search_label" style="width: 80px">瑕佹眰鍊硷細</div>
+ <div
+ class="search_input"
+ v-show="bsm1Val !== null && bsm1Val !== ''"
+ >
+ <el-radio-group v-model="bsm1Val" @input="upBsm1">
+ <el-radio
+ v-for="(a, ai) in JSON.parse(bsmRow.section)"
+ :key="ai"
+ :label="a"
+ >{{ JSON.parse(bsmRow.ask)[ai] }}</el-radio
+ >
+ </el-radio-group>
+ </div>
+ </el-col>
+ </el-row>
+ <el-row v-if="bsm2">
+ <el-col class="search_thing" :span="22">
+ <div class="search_label" style="width: 220px">
+ <span class="required-span">* </span>鏍峰搧鐔旀帴閰嶅鏁伴噺锛�
+ </div>
+ <div class="search_input">
+ <el-input-number
+ size="medium"
+ v-model="bsm2Val"
+ :min="1"
+ :max="bsm2Val3.length"
+ :precision="0"
+ style="width: 70%"
+ :controls="false"
+ @change="bsm2Up"
+ ></el-input-number>
+ <span>MAX锛歿{ bsm2Val3.length }}</span>
+ </div>
+ </el-col>
+ <el-col style="margin-top: 6px">
+ <el-col v-for="(a, ai) in bsm2Val2" :key="ai">
+ <el-col :span="10">
+ <el-select
+ v-model="a[0]"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="(item, index) in sampleList"
+ :key="index"
+ :label="index + 1"
+ :value="index + 1"
+ >
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col
+ :span="4"
+ class="pairing"
+ style="border: 0; color: rgba(0, 0, 0, 0.2)"
+ >鈥斺��</el-col
+ >
+ <el-col :span="10">
+ <el-select
+ v-model="a[1]"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="(item, index) in sampleList"
+ :key="index"
+ :label="index + 1"
+ :value="index + 1"
+ >
+ </el-option>
+ </el-select>
+ </el-col>
+ </el-col>
+ </el-col>
+ </el-row>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button type="primary" @click="save2" :loading="saveLoad"
+ >纭� 瀹�</el-button
+ >
+ </el-row>
+ </span>
+ </el-dialog>
+ <!-- 鍏ㄩ�夌壒娈婂�煎鐞嗘-->
+ <el-dialog
+ title="妫�娴嬪埌鐗规畩椤癸紝璇蜂綔鍑轰互涓嬮�夋嫨"
+ :visible.sync="bsm1DiaAll"
+ min-width="400px"
+ :show-close="false"
+ :close-on-press-escape="false"
+ :close-on-click-modal="false"
+ :before-close="beforeClose"
+ >
+ <div
+ class="body"
+ style="max-height: 60vh"
+ v-for="(item, index) in bsm1DiaList"
+ :key="index"
+ >
+ <el-row v-if="item.bsm1">
+ <el-col
+ class="search_thing"
+ :span="24"
+ style="height: initial; margin: 5px 0"
+ >
+ <div class="search_label" style="width: 80px">
+ <span class="required-span">* </span>閫夐」锛�
+ </div>
+ <div class="search_input">
+ <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)">
+ <el-radio
+ v-for="(a, ai) in JSON.parse(item.bsmRow.section)"
+ :key="ai"
+ :label="a"
+ style="margin-bottom: 2px; margin-top: 2px"
+ ></el-radio>
+ </el-radio-group>
+ </div>
+ </el-col>
+ <el-col
+ class="search_thing"
+ :span="24"
+ style="height: initial; margin: 5px 0"
+ >
+ <div class="search_label" style="width: 80px">瑕佹眰鍊硷細</div>
+ <div
+ class="search_input"
+ v-show="item.bsm1Val !== null && item.bsm1Val !== ''"
+ >
+ <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)">
+ <el-radio
+ v-for="(a, ai) in JSON.parse(item.bsmRow.section)"
+ :key="ai"
+ :label="a"
+ >{{ JSON.parse(item.bsmRow.ask)[ai] }}</el-radio
+ >
+ </el-radio-group>
+ </div>
+ </el-col>
+ </el-row>
+ <el-row v-if="item.bsm2">
+ <el-col class="search_thing" :span="22">
+ <div class="search_label" style="width: 220px">
+ <span class="required-span">* </span>鏍峰搧鐔旀帴閰嶅鏁伴噺锛�
+ </div>
+ <div class="search_input">
+ <el-input-number
+ size="medium"
+ v-model="item.bsm2Val"
+ :min="1"
+ :max="item.bsm2Val3.length"
+ :precision="0"
+ style="width: 70%"
+ :controls="false"
+ @change="bsm2Up"
+ ></el-input-number>
+ <span>MAX锛歿{ item.bsm2Val3.length }}</span>
+ </div>
+ </el-col>
+ <el-col style="margin-top: 6px">
+ <el-col v-for="(a, ai) in item.bsm2Val2" :key="ai">
+ <el-col :span="10">
+ <el-select
+ v-model="a[0]"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="(item, index) in item.sampleList"
+ :key="index"
+ :label="index + 1"
+ :value="index + 1"
+ >
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col
+ :span="4"
+ class="pairing"
+ style="border: 0; color: rgba(0, 0, 0, 0.2)"
+ >鈥斺��</el-col
+ >
+ <el-col :span="10">
+ <el-select
+ v-model="a[1]"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="(item, index) in item.sampleList"
+ :key="index"
+ :label="index + 1"
+ :value="index + 1"
+ >
+ </el-option>
+ </el-select>
+ </el-col>
+ </el-col>
+ </el-col>
+ </el-row>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button type="primary" @click="save1" :loading="saveLoad"
+ >纭� 瀹�</el-button
+ >
+ </el-row>
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="鐗规畩鍊煎~鍐�"
+ :visible.sync="bsm3Dia"
+ top="5vh"
+ :close-on-click-modal="false"
+ :close-on-press-escape="false"
+ width="800px"
+ :show-close="false"
+ >
+ <el-table :data="editTable" style="width: 100%" height="500px">
+ <!-- inspectionItemList -->
+ <el-table-column prop="inspectionItemList" label="妫�楠岄」" width="180">
+ </el-table-column>
+ <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" width="180">
+ </el-table-column>
+ <el-table-column prop="model" label="鏍峰搧鍨嬪彿" width="180">
+ </el-table-column>
+ <el-table-column prop="symbolItem" label="璇嗗埆绗﹀彿"> </el-table-column>
+ <el-table-column prop="value" label="璇嗗埆绗﹀��">
+ <template slot-scope="scope">
+ <el-input
+ v-model="scope.row.value"
+ placeholder="璇疯緭鍏�"
+ @input="inputValueHandler(scope.row, scope.$index)"
+ size="small"
+ type="number"
+ ></el-input>
+ </template>
+ </el-table-column>
+ </el-table>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="bsm3Dia = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="save0" :loading="saveLoad"
+ >纭� 瀹�</el-button
+ >
+ </el-row>
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="娓╁害寰幆瑕佹眰濉啓"
+ :visible.sync="circulateShow"
+ width="900px"
+ :close-on-click-modal="false"
+ :close-on-press-escape="false"
+ :before-close="beforeCirculateShowClose"
+ :show-close="false"
+ >
+ <div class="search" style="display: flex; background: transparent">
+ <div class="search_thing">
+ <div class="search_label">淇濇俯鏃堕棿锛�</div>
+ <div class="search_input">
+ <el-input
+ v-model="circulateForm.entrustTime"
+ size="small"
+ placeholder=""
+ type="number"
+ ></el-input>
+ </div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">寰幆娆℃暟锛�</div>
+ <div class="search_input">
+ <el-input
+ v-model="circulateForm.entrustNum"
+ size="small"
+ placeholder=""
+ type="number"
+ ></el-input>
+ </div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">娓╁害鐐癸細</div>
+ <div class="search_input">
+ <el-input
+ @focus="() => (isFocus = true)"
+ @blur="changeTemperatureData"
+ v-model="circulateForm.entrustPoint"
+ size="small"
+ placeholder=""
+ type="number"
+ ></el-input>
+ </div>
+ </div>
+ </div>
+ <div class="circulateTable">
+ <div class="opticalProject">
+ <div style="line-height: 30px">鍏夌氦椤圭洰</div>
+ <el-divider></el-divider>
+ <div>
+ <el-table
+ ref="multipleTable"
+ border
+ :header-cell-style="{ 'text-align': 'center' }"
+ :cell-style="{ 'text-align': 'center' }"
+ :data="opticalProject"
+ tooltip-effect="dark"
+ style="width: 100%"
+ @row-click="rowClickOptical"
+ @select="selectOpticalProject"
+ @select-all="selectAllOptical"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="55"> </el-table-column>
+ <el-table-column
+ prop="value"
+ label="鍏夌氦椤圭洰"
+ show-overflow-tooltip
+ ></el-table-column>
+ </el-table>
+ </div>
+ </div>
+ <div class="temperatureList">
+ <div class="temperatureListTitle">
+ <span>娓╁害鐐归泦鍚�</span>
+ <span>
+ <el-button
+ type="primary"
+ size="mini"
+ :disabled="isFocus"
+ @click="addTemperatureData"
+ >鏂板</el-button
+ >
+ <el-button size="mini" @click="deleteTemperatureData"
+ >鍒犻櫎</el-button
+ >
+ </span>
+ </div>
+ <el-divider></el-divider>
+ <el-table
+ :data="temperatureData"
+ border
+ :header-cell-style="{ 'text-align': 'center' }"
+ :cell-style="{ 'text-align': 'center' }"
+ style="width: 100%"
+ >
+ <el-table-column prop="date" label="娓╁害鐐�(鈩�)" width="120px">
+ <template slot-scope="scope">
+ <el-input
+ size="small"
+ v-model="scope.row.temperaturePoint"
+ clearable
+ placeholder="璇疯緭鍏�"
+ @change="changeTemperature"
+ ></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="name" label="瑕佹眰(dB/Km)">
+ <template slot-scope="scope">
+ <span>x</span>
+ <el-select
+ v-model="scope.row.askSymbol"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ style="width: 120px"
+ @change="changeTemperature"
+ >
+ <el-option
+ v-for="item in temperatureDataList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ <el-input
+ size="small"
+ v-model="scope.row.askNum"
+ clearable
+ placeholder="璇疯緭鍏�"
+ style="width: 120px"
+ @change="changeTemperature"
+ ></el-input>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </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"
+ width="260px"
+ :before-close="temperatureShowClose"
+ :show-close="false"
+ >
+ <div>
+ <div v-if="isShowInput" style="margin-bottom: 6px">
+ <span>寰幆娆℃暟:</span>
+ <!-- <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input> -->
+ <el-input-number
+ v-model="temperatureTestNum"
+ :min="2"
+ :max="1000000"
+ size="small"
+ label=""
+ ></el-input-number>
+ </div>
+ <el-checkbox-group
+ v-model="temperatureTest"
+ @change="handleTemperatureTestChange"
+ style="display: flex; flex-direction: column"
+ >
+ <el-checkbox
+ v-for="item in temperatureList"
+ :label="item"
+ :key="item"
+ style="margin-bottom: 6px"
+ >{{ item }}</el-checkbox
+ >
+ </el-checkbox-group>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="cleanTemperatureTest">鍙栨秷</el-button>
+ <el-button type="primary" @click="spliceTemperatureTest"
+ >淇濆瓨</el-button
+ >
+ </span>
+ </el-dialog>
</div>
</template>
<script>
+import {
+ selectInsOrderTemplate,
+ hasSendUrgentOrder,
+ addInsOrder,
+ selectOrderManDay,
+ selectInsOrderTemplateById,
+ upInsOrderOfState,
+ upInsOrder,
+ getInsOrder,
+ addInsOrderTemplate,
+ delInsOrderTemplate,
+ labelPrinting,
+} from "@/api/business/inspectionOrder";
+import {
+ selectStandardTreeList2,
+ selectStandardMethodEnum,
+ selectsStandardMethodByFLSSM,
+ selectStandardProductList,
+} from "@/api/standard/standardLibrary";
+import { selectBushingBySampleId } from "@/api/business/insBushing";
+import { getLaboratoryPersonList } from "@/api/system/user";
import { mapGetters } from "vuex";
import fiberOpticConfig from "./fiberoptic-config.vue";
import fiberOpticConfigReadOnly from "./fiberoptic-config-readonly.vue";
import equipConfig from "./equip-config.vue";
-import cableConfig from "./cable-config.vue";
import getLodop from "@/utils/lodop";
import { bigEval } from "@/utils/bigEval";
import { getDicts } from "@/api/system/dict/data";
+import Big from "big.js";
export default {
components: {
fiberOpticConfig,
fiberOpticConfigReadOnly,
equipConfig,
- cableConfig,
},
computed: {
- ...mapGetters(["nickName", "company"]),
+ ...mapGetters(["nickName", "loginUserInfo"]),
},
- props: {
- examine: {
- type: Number,
- default: () => 0,
- },
- active: {
- type: Number,
- default: () => 0,
- },
- currentId: {
- type: Number,
- default: () => 0,
- },
- },
+ props: {},
data() {
return {
- pickerOptions: {
- disabledDate(time) {
- // 褰撳墠鏃堕棿鍔犱笂涓夊ぉ鐨勬椂闂存埑
- const threeDaysLater = Date.now() + 24 * 60 * 60 * 1000;
- // 绂佺敤涓夊ぉ鍚庝箣鍓嶇殑鎵�鏈夋棩鏈�
- return time.getTime() < threeDaysLater;
- },
- },
+ isReview: false, //鏄惁鏄煡鐪嬭鎯�
+ examine: 0,
+ active: 0,
+ currentId: 0,
fiberLoss: [],
qrDataList: [],
isFocus: false,
@@ -569,7 +1750,6 @@
bsm1Dia: false,
bsm1DiaAll: false,
equipConfigShow: false,
- cableConfigShow: false,
bsm2: false,
bsm2Val: null,
bsm2Dia: false,
@@ -686,18 +1866,20 @@
this.standardMethodListId = null;
},
},
+ created() {
+ this.active = Number(this.$route.query.active);
+ this.currentId = this.$route.query.currentId;
+ this.examine = this.$route.query.examine;
+ this.isReview = this.$route.query.isReview;
+ },
mounted() {
- if (this.addObj.custom == "" || this.addObj.custom == null) {
- this.addObj.custom = this.nickName; //璁剧疆鍒跺崟浜轰负褰撳墠鐧诲綍浜�
- }
- this.addObj.company = this.company;
+ //鏌ヨ瀛楀吀
this.selectDictForType();
this.selectDictForOrderType();
this.selectDictForUnit();
this.selectDictForSampleForm();
-
if (this.active != 3) {
- this.getUserNow();
+ this.init();
}
this.selectStandardTreeList();
this.getAuthorizedPerson();
@@ -705,29 +1887,48 @@
if (this.active != 1) {
// 鏌ョ湅/瀹℃牳娴佺▼
// 璇锋眰鎺ュ彛锛屽洖鏄炬暟鎹�
- this.$axios
- .post(this.$api.insOrder.getInsOrder, {
- orderId: this.currentId,
- })
+ getInsOrder({
+ orderId: this.currentId,
+ })
.then((res) => {
- this.addObj = {
- ...res.data.insOrder,
- };
- this.addObj.type = String(this.addObj.type);
- this.sampleList = this.HaveJson(res.data.sampleProduct);
- this.getProNum();
- this.addObj.sampleNum = this.sampleList.length;
- this.$nextTick(() => {
- this.$refs.sampleTable.doLayout();
- if (this.addObj.sampleNum > 0) {
- this.$refs.sampleTable.setCurrentRow(this.sampleList[0], true);
- this.rowClick(this.sampleList[0]);
- }
- });
+ if (res.code === 200) {
+ this.addObj = {
+ ...res.data.insOrder,
+ };
+ this.addObj.type = String(this.addObj.type);
+ this.sampleList = this.HaveJson(res.data.sampleProduct);
+ this.getProNum();
+ this.addObj.sampleNum = this.sampleList.length;
+ this.$nextTick(() => {
+ this.$refs.sampleTable.doLayout();
+ if (this.addObj.sampleNum > 0) {
+ this.$refs.sampleTable.setCurrentRow(this.sampleList[0], true);
+ this.rowClick(this.sampleList[0]);
+ }
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
}
},
methods: {
+ goBack() {
+ let path = this.$route.query.isPlan
+ ? "/business/inspectionTask"
+ : "/business/inspectionOrder";
+ this.$router.push(path);
+ },
+ //涓嬫鏍告煡鏃ユ湡:绂佺敤鍦ㄦ牳鏌ユ棩鏈熷墠鐨勬棩鏈�
+ disabledDate(time) {
+ if (time) {
+ let now = new Date();
+ now.setHours(0, 0, 0, 0);
+ return time < now.getTime();
+ }
+ return false;
+ },
changeType(type) {
this.hasSendUrgentOrder(type)
.then((res) => {
@@ -747,16 +1948,13 @@
let flag = true;
//濡傛灉鏄被鍨嬫槸绱ф�ワ紝鍒ゆ柇褰撳墠瀹㈡埛褰撳ぉ鐨勭揣鎬ラ搴︽槸鍚︾敤瀹�
if (type == 2) {
- await this.$axios
- .post(this.$api.insOrder.hasSendUrgentOrder, {})
+ await hasSendUrgentOrder()
.then((res) => {
flag = res.data;
return flag;
- // if (!res.data) {
- // this.addObj.type = "1";
- // this.$message.error("褰撳ぉ绱ф�ラ搴﹀凡鐢ㄥ畬");
- // throw "褰撳ぉ绱ф�ラ搴﹀凡鐢ㄥ畬";
- // }
+ })
+ .catch((error) => {
+ console.error(error);
});
}
return flag;
@@ -770,7 +1968,7 @@
});
},
//淇濆瓨鍗曟牴鍨傜洿鐕冪儳鐗规畩鍊�
- saveSingleVerticalCombustionData() { },
+ saveSingleVerticalCombustionData() {},
openSingleVerticalCombustionDialog() {
this.$prompt("鍗曟牴鍨傜洿鐕冪儳娆℃暟", "鐗规畩妫�娴嬮」鐩�", {
confirmButtonText: "纭畾",
@@ -788,7 +1986,7 @@
this.currentMethod.insProduct = this.productList0;
this.getProNum();
})
- .catch(() => { });
+ .catch(() => {});
},
singleVerticalData(arr, value) {
arr.forEach((ins) => {
@@ -1166,9 +2364,15 @@
}
},
getAuthorizedPerson() {
- this.$axios.get(this.$api.user.getLaboratoryPersonList).then((res) => {
- this.personList = res.data;
- });
+ getLaboratoryPersonList()
+ .then((res) => {
+ if (res.code === 200) {
+ this.personList = res.data;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
},
selectDictForType() {
getDicts("urgency_level")
@@ -1249,10 +2453,9 @@
let arr1 = [];
arr0.forEach((m) => {
let index = code.findIndex((b) => m.includes(b));
- // console.log("index--銆�", index);
if (index > -1) {
let arr = m.split(code[index]).filter((b) => !!b);
- let calcNum = this.$Big(
+ let calcNum = new Big(
bigEval(this.replaceAll(arr[0], symbolItem, value))
);
let num = calcNum.toFixed(
@@ -1271,7 +2474,7 @@
if (index > -1) {
let arr = ask.split(code[index]).filter((b) => !!b);
console.log("鐗规畩鍊兼浛鎹�--銆�", arr);
- let calcNum = this.$Big(
+ let calcNum = new Big(
bigEval(this.replaceAll(arr[0], symbolItem, value))
);
let num = calcNum.toFixed(
@@ -1289,7 +2492,7 @@
try {
let num = this.replaceAll(tell, symbolItem, value);
return num;
- } catch (e) { }
+ } catch (e) {}
},
replaceAll(str, find, value) {
if (str === undefined) {
@@ -1471,7 +2674,7 @@
.then(() => {
this.saveMethod(sampleList);
})
- .catch(() => { });
+ .catch(() => {});
} else {
let isRTS = this.totalArr.find(
(a) =>
@@ -1553,7 +2756,7 @@
.then(() => {
this.saveMethod(sampleList);
})
- .catch(() => { });
+ .catch(() => {});
} else {
let isRTS = this.totalArr.find(
(a) =>
@@ -1584,7 +2787,7 @@
});
}
},
- errorSet() { },
+ errorSet() {},
/**
* 鏍¢獙濮旀墭瑕佹眰鐨勬楠岄」鐨勮姹傛弿杩板拰瑕佹眰鍊�
*
@@ -1606,10 +2809,10 @@
console.log("ask or tell is null");
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
});
isTrue = false;
@@ -1646,10 +2849,10 @@
);
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
}
@@ -1658,10 +2861,10 @@
console.log("瑕佹眰鍊间腑娌℃湁鏁板瓧");
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
}
@@ -1672,10 +2875,10 @@
console.log("鐩村緞鍏樊涔嬪崐涓�0.5涓嶅尮閰�");
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
// if(ele.tell.indexOf(askVal[0])<0 && ele.tell.indexOf('鍗�')<0){
@@ -1726,10 +2929,10 @@
console.log("鏈�澶у�煎拰鏈�灏忓�肩浉绛�");
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
}
@@ -1738,20 +2941,20 @@
console.log("瑕佹眰鎻忚堪涓笉鍖呭惈卤浠ュ強鍖洪棿鐨勬暟瀛�");
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
} else if (ele.tell.indexOf("-") == 0) {
console.log("瑕佹眰鍊肩殑鍖洪棿鏍煎紡閿欒");
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
} else if (tell.indexOf("-") > 0 || tell.indexOf("卤") > 0) {
@@ -1770,10 +2973,10 @@
console.log("閿欒鐨勫尯闂磋缃�");
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
}
@@ -1786,10 +2989,10 @@
console.log(777777);
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
} else {
@@ -1806,10 +3009,10 @@
console.log(888888);
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
}
@@ -1823,10 +3026,10 @@
console.log(99999);
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
}
@@ -1836,10 +3039,10 @@
console.log(1010101001);
this.errorInspectionItemList.push(
ele.inspectionItem +
- " " +
- (ele.inspectionItemSubclass == null
- ? ""
- : ele.inspectionItemSubclass)
+ " " +
+ (ele.inspectionItemSubclass == null
+ ? ""
+ : ele.inspectionItemSubclass)
);
isTrue = false;
}
@@ -2112,8 +3315,23 @@
let sampleList = this.HaveJson(sampleList0);
sampleList.forEach((a) => {
a.insProduct.forEach((b) => {
+ b.id = null;
delete b.bsmRow;
});
+ if (a.bushing && a.bushing.length > 0) {
+ a.bushing.forEach((b) => {
+ b.fiber.forEach((c) => {
+ c.productList.forEach((d) => {
+ d.id = null;
+ });
+ });
+ b.fibers.forEach((c) => {
+ c.productList.forEach((d) => {
+ d.id = null;
+ });
+ });
+ });
+ }
});
this.editTable.forEach((item) => {
sampleList.forEach((a) => {
@@ -2130,141 +3348,74 @@
console.log(this.sampleList);
console.log(this.fiberPairing);
this.saveLoad = true;
- this.$axios
- .post(this.$api.insOrder.addInsOrder, {
- str: JSON.stringify({
- insOrder: this.addObj,
- list: JSON.stringify(
- sampleList.map((a) => {
- if (this.PROJECT === "瑁呭鐢电紗") {
- if (a.modelNum) {
- const index = a.modelNum.indexOf("脳");
- if (index === 0) {
- a.model = a.model + a.modelNum;
- } else if (index === -1) {
- a.model = a.model + "-" + a.modelNum;
- } else {
- a.model = a.modelNum + a.model;
- }
- } else {
- a.model =
- a.model +
- (a.modelNum == null ||
- a.modelNum == "" ||
- a.modelNum == "null"
- ? ""
- : "-" + a.modelNum);
- }
- } else {
- a.model =
- a.model +
- (a.modelNum == null ||
- a.modelNum == "" ||
- a.modelNum == "null"
- ? ""
- : "-" + a.modelNum);
- }
- a.insProduct = a.insProduct.filter((b) => b.state === 1);
- return a;
- })
- ),
- pairing: JSON.stringify(this.bsm2Val2),
- fiberPairing: JSON.stringify(this.fiberPairing),
- }),
- })
+ addInsOrder({
+ insOrder: this.addObj,
+ list: sampleList.map((a) => {
+ a.model =
+ a.model +
+ (a.modelNum == null || a.modelNum == "" || a.modelNum == "null"
+ ? ""
+ : "-" + a.modelNum);
+ a.insProduct = a.insProduct.filter((b) => b.state === 1);
+ return a;
+ }),
+ pairing: this.bsm2Val2,
+ fiberPairing: this.fiberPairing,
+ })
.then((res) => {
+ if (res.code === 200) {
+ this.$message.success("宸叉彁浜�");
+ this.bsm3Dia = false;
+ this.goBack();
+ }
this.saveLoad = false;
- if (res.code == 201) return;
- this.$message.success("宸叉彁浜�");
- this.bsm3Dia = false;
- this.$parent.playOrder(0);
})
- .catch((e) => {
+ .catch((error) => {
this.saveLoad = false;
+ console.error(error);
});
},
upInsOrderOfState(state) {
if (state == 1) {
- //this.saveLoad = true
this.issuedDialogVisible = true;
- this.$axios
- .post(this.$api.insOrder.selectOrderManDay, {
- id: this.currentId,
+ selectOrderManDay({
+ id: this.currentId,
+ })
+ .then((res) => {
+ if (res.code === 200) {
+ this.distributeData.orderId = this.currentId;
+ this.distributeData.appointed = res.data;
+ }
})
- .then((ress) => {
- this.distributeData.orderId = this.currentId;
- this.distributeData.appointed = ress.data;
- console.log("绾﹀畾鏃堕棿", this.distributeData.appointed);
+ .catch((error) => {
+ console.error(error);
});
setTimeout(() => {
this.issuedDialogVisible = true;
}, 1000);
- // this.$axios.post(this.$api.insOrder.upInsOrderOfState, {
- // state,
- // id: this.currentId,
- // companyId:this.addObj.companyId,
- // laboratory:this.addObj.laboratory,
- // company: this.addObj.company
- // }, {
- // headers: {
- // 'Content-Type': 'application/json'
- // }
- // }).then(res => {
- // this.saveLoad = false
- // if (res.code == 201) return
- // this.$message.success('鎻愪氦鎴愬姛')
-
- // this.$parent.multipleSelection = [{id: this.currentId}]
- // this.$parent.print()
- // 濡傛灉绱ф�ョ▼搴︿负绱ф�ワ紝闇�瑕佺洿鎺ヤ笅鍙戜汉鍛�
- // if (this.addObj.type == 2) {
- // this.issuedDialogVisible = true;
- // this.$axios.post(this.$api.insOrder.selectOrderManDay, {
- // id: this.currentId
- // }).then(ress => {
- // this.distributeData.orderId = this.currentId
- // this.distributeData.appointed = ress.data
- // })
- // } else {
- // this.$parent.playOrder(0)
- // }
-
- // this.$axios.post(this.$api.insOrder.selectOrderManDay, {
- // id: this.currentId
- // }).then(ress => {
- // this.distributeData.orderId = this.currentId
- // this.distributeData.appointed = ress.data
- // })
- // setTimeout(() => {
- // this.issuedDialogVisible = true;
- // }, 1000)
- // })
} else {
// 涓嶉�氳繃
this.noDialogVisible = true;
}
},
getLabelPrinting(currentId) {
- this.$axios
- .post(this.$api.insOrder.labelPrinting, {
- ids: currentId,
- })
+ labelPrinting({
+ ids: currentId,
+ })
.then((res) => {
- //瀹℃牳閫氳繃锛岄粯璁ゅ彧鎵撳嵃绗竴涓牱鍝佹爣绛�
- let firstSample = res.data[0];
- let arr1 = [];
- firstSample.insProduct.forEach((b) => {
- arr1.push(b.inspectionItem);
- });
- firstSample.item = [...new Set(arr1)].join(",");
- // arr.forEach((a) => {
- // let arr1 = [];
- // a.insProduct.forEach((b) => {
- // arr1.push(b.inspectionItem);
- // });
- // a.item = [...new Set(arr1)].join(",");
- // });
- this.beginPrint(firstSample);
+ if (res.code === 200) {
+ //瀹℃牳閫氳繃锛岄粯璁ゅ彧鎵撳嵃绗竴涓牱鍝佹爣绛�
+ let firstSample = res.data[0];
+ let arr1 = [];
+ firstSample.insProduct.forEach((b) => {
+ arr1.push(b.inspectionItem);
+ });
+ firstSample.item = [...new Set(arr1)].join(",");
+ this.beginPrint(firstSample);
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
//寮�濮嬫爣绛炬墦鍗�
@@ -2360,92 +3511,74 @@
return;
}
// let flag = true;
- this.$axios
- .post(
- this.$api.insOrder.upInsOrderOfState,
- {
- state: 1,
- id: this.currentId,
- companyId: this.addObj.companyId,
- laboratory: this.addObj.laboratory,
- company: this.addObj.company,
- isCreate: this.distributeData.isCreate,
- },
- {
- headers: {
- "Content-Type": "application/json",
- },
- }
- )
+ upInsOrderOfState({
+ state: 1,
+ id: this.currentId,
+ companyId: this.addObj.companyId,
+ laboratory: this.addObj.laboratory,
+ company: this.addObj.company,
+ isCreate: this.distributeData.isCreate,
+ })
.then((res) => {
- // flag = false;
-
- // if (flag) {
- // this.$message.error("濮旀墭缂栧彿鐢熸垚澶辫触");
- // return;
- // }
- this.upLoad = true;
- this.$axios
- .post(
- this.$api.insOrder.upInsOrder,
- {
- orderId: this.distributeData.orderId,
- appointed: this.distributeData.appointed,
- userIdList: this.distributeData.userId,
- sonLaboratory: this.distributeData.sonLaboratory,
- },
- {
- headers: {
- "Content-Type": "application/json",
- },
- }
- )
- .then((res) => {
- if (res.code === 201) {
- this.upLoad = false;
- return;
- }
- this.$message.success("鎻愪氦鎴愬姛");
- this.upLoad = false;
- this.issuedDialogVisible = false;
- this.$parent.playOrder(0);
- //瀹℃牳閫氳繃鍚庯紝鑷姩鎵撳嵃浜岀淮鐮�
- //TODO: 鐢靛姏璇曢獙瀹ゆ殏鏃朵笉鐢ㄦ爣绛炬墦鍗�
- if (
- this.sonLaboratoryList.filter((f) => f.value === "鐢靛姏璇曢獙瀹�")
- .length === 0
- ) {
- this.$nextTick(() => {
- this.getLabelPrinting(this.currentId);
- });
- }
+ if (res.code === 200) {
+ this.upLoad = true;
+ upInsOrder({
+ orderId: this.distributeData.orderId,
+ appointed: this.distributeData.appointed,
+ userIdList: this.distributeData.userId,
+ sonLaboratory: this.distributeData.sonLaboratory,
})
- .catch((e) => {
- this.$message.error("鎻愪氦澶辫触");
- this.upLoad = false;
- });
+ .then((res) => {
+ if (res.code === 201) {
+ this.upLoad = false;
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.issuedDialogVisible = false;
+ this.upLoad = false;
+ this.goBack();
+ //瀹℃牳閫氳繃鍚庯紝鑷姩鎵撳嵃浜岀淮鐮�
+ //TODO: 鐢靛姏璇曢獙瀹ゆ殏鏃朵笉鐢ㄦ爣绛炬墦鍗�
+ if (
+ this.sonLaboratoryList.filter((f) => f.value === "鐢靛姏璇曢獙瀹�")
+ .length === 0
+ ) {
+ this.$nextTick(() => {
+ this.getLabelPrinting(this.currentId);
+ });
+ }
+ })
+ .catch((error) => {
+ this.$message.error("鎻愪氦澶辫触");
+ this.upLoad = false;
+ console.error(error);
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
- getUserNow() {
- this.$axios.get(this.$api.user.getUserNow).then((res) => {
- let selects = res.data;
- if (selects == null) return;
- this.addObj.userId = selects.id;
- this.addObj.company = selects.company;
- this.addObj.custom = selects.name;
- this.addObj.code = selects.code;
- this.addObj.phone = selects.phone;
- this.addObj.companyId = selects.departId;
- this.addObj.production = "/";
- this.addObj.productionEn = "/";
- if (this.active == 1) {
- this.selectInsOrderTemplate();
- }
- });
+ init() {
+ if (this.addObj.custom == "" || this.addObj.custom == null) {
+ this.addObj.custom = this.loginUserInfo.nickName; //璁剧疆鍒跺崟浜轰负褰撳墠鐧诲綍浜�
+ } else {
+ this.addObj.custom = this.loginUserInfo.nickName;
+ }
+ this.addObj.company = this.loginUserInfo.companyName;
+ this.addObj.companyId = this.loginUserInfo.company;
+ this.addObj.userId = this.loginUserInfo.userId;
+ // this.addObj.code = this.loginUserInfo.code;
+ this.addObj.phone = this.loginUserInfo.phoneNumber;
+ this.addObj.production = "/";
+ this.addObj.productionEn = "/";
+ if (this.active == 1) {
+ this.selectInsOrderTemplate();
+ }
},
getProNum() {
this.sampleSelectionList.forEach((m, i) => {
- Vue.set(
+ this.$set(
this.sampleSelectionList[i],
"proNum",
m.insProduct.filter((a) => a.state == 1).length
@@ -2503,13 +3636,17 @@
}
},
selectStandardTreeList() {
- this.$axios
- .get(this.$api.standardTree.selectStandardTreeList2)
+ selectStandardTreeList2()
.then((res) => {
- this.list = res.data;
- this.list.forEach((a) => {
- this.expandedKeys.push(a.label);
- });
+ if (res.code === 200) {
+ this.list = res.data;
+ this.list.forEach((a) => {
+ this.expandedKeys.push(a.label);
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
filterNode(value, data) {
@@ -2554,33 +3691,50 @@
},
selectsStandardMethodByFLSSM() {
this.methodLoad = true;
- this.$axios
- .post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
- tree: this.selectTree,
- })
+ selectsStandardMethodByFLSSM({
+ 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, {
+ if (res.code === 200) {
+ 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);
+ template()
+ .then((res) => {
+ if (res.status === 200) {
+ console.log(res);
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ selectsStandardMethodByFLSSM({
tree: selectTree,
})
- .then((ress) => {
- this.methods = ress.data.standardMethodList;
- });
- } else {
- this.methods = res.data.standardMethodList;
- }
- } catch (e) { }
+ .then((res) => {
+ if (res.code === 200) {
+ this.methods = ress.data.standardMethodList;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ } else {
+ this.methods = res.data.standardMethodList;
+ }
+ } catch (e) {}
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
addStandardTree(currentValue, oldValue) {
@@ -2660,7 +3814,6 @@
val.forEach((a) => {
this.productIds.push(a.id);
});
- console.log("selectChange", this.sampleList);
},
rowClick(row, column, event) {
this.currentMethod = row;
@@ -2778,7 +3931,7 @@
// row.manHour = arr2[index];
// row.price = arr3[index];
// row.tell = arr4[index];
- } catch (e) { }
+ } catch (e) {}
}
if (
row.bsm === "1" &&
@@ -2892,12 +4045,14 @@
console.log("upProductSelect", this.sampleList);
},
searchProject() {
- this.$axios
- .post(this.$api.enums.selectEnumByCategory, {
- category: "鍏夌氦椤圭洰",
- })
+ getDicts("fiber_type")
.then((res) => {
- this.opticalProject = res.data;
+ if (res.code === 200) {
+ this.opticalProject = res.data;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
permute(nums) {
@@ -2934,15 +4089,14 @@
return "warning-row";
},
selectInsOrderTemplate() {
- this.$axios
- .get(
- this.$api.insOrder.selectInsOrderTemplate +
- "?company=" +
- this.addObj.company
- )
+ selectInsOrderTemplate({ company: this.addObj.company })
.then((res) => {
- if (res.code == 201) return;
- this.templates = res.data;
+ if (res.code === 200) {
+ this.templates = res.data;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
// 鍒犻櫎妯℃澘--璋冪敤鎺ュ彛
@@ -2953,51 +4107,45 @@
type: "warning",
})
.then(() => {
- this.$axios
- .post(this.$api.insOrder.delInsOrderTemplate, {
- id: row.id,
- })
+ delInsOrderTemplate({
+ id: row.id,
+ })
.then((res) => {
- if (res.code === 201) {
- return;
+ if (res.code === 200) {
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.selectInsOrderTemplate();
}
- this.$message.success("鍒犻櫎鎴愬姛");
- this.selectInsOrderTemplate();
})
- .catch((e) => {
+ .catch((error) => {
this.$message.error("鍒犻櫎澶辫触");
+ console.error(error);
});
})
- .catch(() => { });
+ .catch(() => {});
},
// 淇濆瓨妯℃澘
addTemplateDia() {
if (this.templateName) {
this.templateLoading = true;
- this.$axios
- .post(
- this.$api.insOrder.addInsOrderTemplate,
- {
- name: this.templateName,
- thing: JSON.stringify({
- addObj: this.addObj,
- sampleList: this.sampleList,
- selectTree: this.selectTree,
- }),
- },
- {
- headers: {
- "Content-Type": "application/json",
- },
- }
- )
+ addInsOrderTemplate({
+ name: this.templateName,
+ thing: JSON.stringify({
+ addObj: this.addObj,
+ sampleList: this.sampleList,
+ selectTree: this.selectTree,
+ }),
+ })
.then((res) => {
- if (res.code == 201) return;
- this.templateLoading = false;
- this.templateDia = false;
- this.$message.success("淇濆瓨鎴愬姛");
- this.selectInsOrderTemplate();
- this.templateName = "";
+ if (res.code === 200) {
+ this.templateLoading = false;
+ this.templateDia = false;
+ this.$message.success("淇濆瓨鎴愬姛");
+ this.selectInsOrderTemplate();
+ this.templateName = "";
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
} else {
this.$message.error("璇峰~鍐欐ā鏉垮悕绉�");
@@ -3005,26 +4153,27 @@
},
// 鏌ヨ妯℃澘
selectInsOrderTemplateById(e) {
- this.$axios
- .post(this.$api.insOrder.selectInsOrderTemplateById + "?id=" + e)
+ selectInsOrderTemplateById({ id: e })
.then((res) => {
- if (res.code == 201) return;
- // let obj = JSON.parse(res.data)
- let obj = 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;
- //榛樿閫変腑绗竴涓牱鍝�
- this.$nextTick(() => {
- if (this.sampleList.length > 0) {
- this.rowClick(this.sampleList[0]);
- }
- });
+ if (res.code === 200) {
+ let obj = res.data;
+ console.log(obj);
+ //鍒跺崟浜鸿缃负褰撳墠鐧诲綍鐢ㄦ埛
+ obj.addObj.custom = this.loginUserInfo.nickName;
+ obj.addObj.userId = this.loginUserInfo.userId;
+ this.addObj = obj.addObj;
+ this.sampleList = obj.sampleList;
+ this.selectTree = obj.selectTree;
+ //榛樿閫変腑绗竴涓牱鍝�
+ this.$nextTick(() => {
+ if (this.sampleList.length > 0) {
+ this.rowClick(this.sampleList[0]);
+ }
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
delSampleAndProduct() {
@@ -3086,43 +4235,39 @@
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(" - "),
- },
- {
- headers: {
- "Content-Type": "application/json",
- },
- }
- )
+ selectStandardProductList({
+ model:
+ (this.addObj.model ? this.addObj.model : row.model) +
+ "-" +
+ row.modelNum,
+ standardMethodListId: val,
+ factory: selectTreeList.join(" - "),
+ })
.then((res) => {
- res.data.forEach((a) => {
- a.state = 0;
- });
- row.insProduct = this.HaveJson(res.data);
- this.productList = row.insProduct;
- this.productList0 = JSON.parse(JSON.stringify(this.productList));
- // this.$refs.sampleTable.setCurrentRow(row)
- // setTimeout(() => {
- // this.productList.forEach(a => {
- // if (a.state == 1) this.toggleSelection(a)
- // })
- // }, 200)
- this.$nextTick(() => {
- this.methodCount++;
- this.getProductLoad = false;
- if (this.sampleSelectionList.length == this.methodCount) {
- this.standardLoading = false;
- }
- });
+ if (res.code === 200) {
+ res.data.forEach((a) => {
+ a.state = 0;
+ });
+ row.insProduct = this.HaveJson(res.data);
+ this.productList = row.insProduct;
+ this.productList0 = JSON.parse(JSON.stringify(this.productList));
+ // this.$refs.sampleTable.setCurrentRow(row)
+ // setTimeout(() => {
+ // this.productList.forEach(a => {
+ // if (a.state == 1) this.toggleSelection(a)
+ // })
+ // }, 200)
+ this.$nextTick(() => {
+ this.methodCount++;
+ this.getProductLoad = false;
+ if (this.sampleSelectionList.length == this.methodCount) {
+ this.standardLoading = false;
+ }
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
this.searchProject();
this.searchTemList();
@@ -3143,60 +4288,56 @@
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(" - "),
- },
- {
- headers: {
- "Content-Type": "application/json",
- },
- }
- )
+ selectStandardProductList({
+ model:
+ (this.addObj.model ? this.addObj.model : row.model) +
+ "-" +
+ row.modelNum,
+ standardMethodListId: val,
+ factory: selectTreeList.join(" - "),
+ })
.then((res) => {
- res.data.forEach((a) => {
- a.state = 0;
- });
- row.insProduct = this.HaveJson(res.data);
- this.productList = row.insProduct;
- this.productList0 = JSON.parse(JSON.stringify(this.productList));
- // this.$refs.sampleTable.setCurrentRow(row)
- // setTimeout(() => {
- // this.productList.forEach(a => {
- // if (a.state == 1) this.toggleSelection(a)
- // })
- // }, 200)
- this.$nextTick(() => {
- this.methodCount++;
- this.getProductLoad = false;
- if (this.sampleSelectionList.length == this.methodCount) {
- this.standardLoading = false;
- }
- });
+ if (res.code === 200) {
+ res.data.forEach((a) => {
+ a.state = 0;
+ });
+ row.insProduct = this.HaveJson(res.data);
+ this.productList = row.insProduct;
+ this.productList0 = JSON.parse(JSON.stringify(this.productList));
+ // this.$refs.sampleTable.setCurrentRow(row)
+ // setTimeout(() => {
+ // this.productList.forEach(a => {
+ // if (a.state == 1) this.toggleSelection(a)
+ // })
+ // }, 200)
+ this.$nextTick(() => {
+ this.methodCount++;
+ this.getProductLoad = false;
+ if (this.sampleSelectionList.length == this.methodCount) {
+ this.standardLoading = false;
+ }
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
this.searchProject();
this.searchTemList();
},
searchTemList() {
this.temperatureList = [];
- this.$axios
- .post(this.$api.enums.selectEnumByCategory, {
- category: "鐢靛姏娓╁害寰幆妫�楠�",
- })
+ getDicts("temperature_cycling_type")
.then((res) => {
- if (res.data.length > 0) {
+ if (res.code === 200) {
this.temperatureEngList = res.data;
res.data.forEach((item) => {
- this.temperatureList.push(item.label);
+ this.temperatureList.push(item.dictLabel);
});
}
+ })
+ .catch((error) => {
+ console.error(error);
});
},
changeModel() {
@@ -3286,10 +4427,14 @@
// })
},
selectStandardMethods() {
- this.$axios
- .get(this.$api.standardTree.selectStandardMethodEnum)
+ selectStandardMethodEnum()
.then((res) => {
- this.methods = res.data;
+ if (res.code === 200) {
+ this.methods = res.data;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
selectable() {
@@ -3471,42 +4616,39 @@
return;
}
this.noLoading = true;
- this.$axios
- .post(
- this.$api.insOrder.upInsOrderOfState,
- {
- state: 2,
- id: this.currentId,
- tell: this.tell,
- },
- {
- headers: {
- "Content-Type": "application/json",
- },
- }
- )
+ upInsOrderOfState({
+ state: 2,
+ id: this.currentId,
+ tell: this.tell,
+ })
.then((res) => {
- this.noLoading = false;
- this.tell = "";
- if (res.code == 201) return;
- this.$message.success("鎻愪氦鎴愬姛");
- this.issuedDialogVisible = false;
- this.$parent.playOrder(0);
+ if (res.code === 200) {
+ this.noLoading = false;
+ this.tell = "";
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.issuedDialogVisible = false;
+ this.goBack();
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
selectEnumByCategoryForSonLaboratory() {
- this.$axios
- .post(this.$api.enums.selectEnumByCategory, {
- category: "瀛愬疄楠屽",
- })
+ getDicts("sys_sub_lab")
.then((res) => {
- this.factory = [];
- res.data.forEach((a) => {
- this.filters.push({
- text: a.label,
- value: a.value,
+ if (res.code === 200) {
+ this.factory = [];
+ res.data.forEach((a) => {
+ this.filters.push({
+ text: a.dictLabel,
+ value: a.dictValue,
+ });
});
- });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
});
},
filterHandler(value, row, column) {
@@ -3526,24 +4668,28 @@
return;
}
this.sampleIds = [this.sampleId];
- this.$axios
- .post(this.$api.insBushing.selectBushingBySampleId, {
- sampleId: this.sampleId,
- })
+ 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;
+ if (res.code === 200) {
+ 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.$nextTick(() => {
+ this.configShow = true;
+ });
}
- this.$nextTick(() => {
- this.configShow = true;
- });
+ })
+ .catch((error) => {
+ console.error(error);
});
}
},
@@ -3559,50 +4705,6 @@
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("鏈�変腑鏍峰搧");
- 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
- // })
}
},
upBsm1(val) {
@@ -4032,7 +5134,10 @@
border-radius: 2px;
}
-.ins_order_add .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
+.ins_order_add
+ .el-tree--highlight-current
+ .el-tree-node.is-current
+ > .el-tree-node__content {
color: #3a7bfa;
}
@@ -4063,13 +5168,13 @@
.company_input .el-form-item__content,
.sample_input .el-form-item__content {
- width: 72%;
+ width: 70%;
}
.engineeringEn_input .el-form-item__content,
.otcCode_input .el-form-item__content,
.productionEn_input .el-form-item__content {
- width: 65%;
+ width: 63%;
}
.processing_input .el-form-item__content {
--
Gitblit v1.9.3