From 8edfe5a740151978422bdba16b6b68b20f0706c7 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 24 三月 2025 13:32:29 +0800
Subject: [PATCH] 设备校准计划-新增设备赋值优化
---
src/views/business/productOrder/components/add.vue | 867 +++++++++++++++++++++++++++++----------------------------
1 files changed, 446 insertions(+), 421 deletions(-)
diff --git a/src/views/business/productOrder/components/add.vue b/src/views/business/productOrder/components/add.vue
index 4a13829..ddd4b4c 100644
--- a/src/views/business/productOrder/components/add.vue
+++ b/src/views/business/productOrder/components/add.vue
@@ -2,9 +2,7 @@
<div class="app-container">
<div v-show="!cableConfigShow&&!auxiliaryShow">
<div style="display: flex;justify-content: space-between;align-items:center;">
- <div>
- 濮旀墭鍗曚俊鎭�
- </div>
+ <div>濮旀墭鍗曚俊鎭�</div>
<div>
<el-cascader
v-model="addObj.quarterItemId"
@@ -28,9 +26,9 @@
<el-button v-if="active==1&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('鐢电紗')>-1" size="small" type="primary" @click="openAuxiliaryCore">杈呭姪绾胯姱閰嶇疆</el-button>
<el-button v-show="active==1||(tabIndex==4&&active==2)" :loading="saveLoad" size="small" type="primary" @click="save">鎻愪氦</el-button>
<!-- 瀹℃牳 -->
- <el-button v-show="active==3&&addObj.companyId" :disabled="saveLoad" :loading="saveLoad" size="small"
+ <el-button v-show="active==3" :disabled="saveLoad" :loading="saveLoad" size="small"
@click="upInsOrderOfState(2)">涓嶉�氳繃</el-button>
- <el-button v-show="active==3&&addObj.companyId" :loading="saveLoad" size="small" type="primary"
+ <el-button v-show="active==3" :loading="saveLoad" size="small" type="primary"
@click="upInsOrderOfState(1)">閫氳繃</el-button>
<el-button size="small" @click="goBack">
<span style="color: #3A7BFA;">杩斿洖</span>
@@ -41,96 +39,146 @@
<div v-show="!cableConfigShow&&!auxiliaryShow" style="margin-top: 10px">
<div class="search">
<el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px" label-position="right">
- <el-form-item label="濮旀墭缂栧彿:">
- <el-input v-model="addObj.entrustCode" clearable disabled placeholder="绯荤粺鐢熸垚" size="small"></el-input>
- </el-form-item>
- <el-form-item label="妫�楠岀被鍒�:" prop="orderType">
- <el-select v-model="addObj.orderType" :disabled="active>1&&tabIndex!=4" clearable size="small" style="width: 100%;">
- <el-option v-for="(a, ai) in dict.type.check_type1" :key="ai" :label="a.label" :value="a.value"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鍒跺崟浜�:">
- <el-input v-model="addObj.custom" disabled size="small"></el-input>
- </el-form-item>
- <el-form-item label="濮旀墭鍗曚綅:" prop="company">
- <el-input v-model="addObj.company" disabled placeholder="閫夋嫨濮旀墭鍗曚綅" size="small" style="width: 200px">
- <template slot="append">
- <el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search"
- @click="openCompanyList"></el-button>
- </template>
- </el-input>
- </el-form-item>
- <el-form-item label="鑱旂郴鏂瑰紡:" prop="phone">
- <el-input v-model="addObj.phone" :disabled="active>1&&tabIndex!=4" clearable placeholder="閫夋嫨濮旀墭瀹㈡埛" size="small"></el-input>
- </el-form-item>
- <el-form-item label="绱ф�ョ▼搴�:" prop="type">
- <el-select v-model="addObj.type" :disabled="active>1&&tabIndex!=4" clearable size="small">
- <el-option v-for="(a, ai) in dict.type.urgency_level" :key="ai" :label="a.label" :value="a.value"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鏍峰搧鍚嶇О:" prop="sample">
- <el-input v-model="addObj.sample" disabled size="small" style="width: 178px">
- <template slot="append"><el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search"
- @click="selectStandardTree = true"></el-button></template>
- </el-input>
- </el-form-item>
- <el-form-item label="鏍峰搧鏁伴噺:" prop="sampleNum">
- <el-input-number v-model="addObj.sampleNum" :disabled="active>1" :max="100" :min="1" :precision="0"
- size="small" style="width: 65%;" @change="addStandardTree"></el-input-number>
- </el-form-item>
- <el-form-item label="鏍峰搧鐘舵��:" prop="sampleStatus">
- <el-select v-model="addObj.sampleStatus" :disabled="active>1&&tabIndex!=4" size="small">
- <el-option v-for="(a,ai) in dict.type.sample_status_list" :key="ai" :label="a.label" :value="a.value"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鎶芥鏁伴噺:" prop="testQuantity">
- <el-input v-model="addObj.testQuantity" :disabled="active>1&&tabIndex!=4" clearable size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏉ユ牱鏂瑰紡:" prop="formType">
- <el-select v-model="addObj.formType" :disabled="active>1&&tabIndex!=4" size="small">
- <el-option v-for="(a,ai) in dict.type.form_type" :key="ai" :label="a.label" :value="a.value"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:">
- <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4">
- <el-radio :label="1">鑷彇</el-radio>
- <el-radio :label="0">鍏朵粬</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:">
- <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4">
- <el-radio :label="0">濮旀墭鍗曚綅鍙栧洖</el-radio>
- <el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="鐢熶骇鍗曚綅:" prop="production">
- <el-input v-model="addObj.production" :disabled="active>1&&tabIndex!=4" clearable placeholder="璇疯緭鍏�"
- size="small"></el-input>
- </el-form-item>
- <el-form-item label="鐢熶骇鍗曚綅EN:" prop="productionEn">
- <el-input v-model="addObj.productionEn" :disabled="active>1&&tabIndex!=4" clearable placeholder="璇疯緭鍏�"
- size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏄惁鐣欐牱:">
- <el-radio-group v-model="addObj.isLeave" :disabled="active>1&&tabIndex!=4">
- <el-radio :label="0">涓嶇暀鏍�</el-radio>
- <el-radio :label="1">鐣欐牱</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="濮旀墭浜�:">
- <el-input v-model="addObj.prepareUser" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
- </el-form-item>
- <el-form-item label="濮旀墭浜鸿嫳鏂�:">
- <el-input v-model="addObj.prepareUserEn" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
- </el-form-item>
- <el-form-item label="澶囨敞:">
- <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
- size="small" type="textarea"></el-input>
- </el-form-item>
- <el-form-item label="澶囨敞鑻辨枃:">
- <el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
- size="small" type="textarea"></el-input>
- </el-form-item>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="濮旀墭缂栧彿:">
+ <el-input v-model="addObj.entrustCode" clearable disabled placeholder="绯荤粺鐢熸垚" size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="妫�楠岀被鍒�:" prop="orderType">
+ <el-select v-model="addObj.orderType" :disabled="active>1&&tabIndex!=4" clearable size="small" style="width: 100%;">
+ <el-option v-for="(a, ai) in dict.type.check_type1" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鍒跺崟浜�:">
+ <el-input v-model="addObj.custom" disabled size="small" clearable></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="濮旀墭鍗曚綅:" prop="company">
+ <el-input v-model="addObj.company" disabled placeholder="閫夋嫨濮旀墭鍗曚綅" size="small" style="width: 208px">
+ <template slot="append">
+ <el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search"
+ @click="openCompanyList"></el-button>
+ </template>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鑱旂郴鏂瑰紡:" prop="phone">
+ <el-input v-model="addObj.phone" :disabled="active>1&&tabIndex!=4" clearable placeholder="閫夋嫨濮旀墭瀹㈡埛" size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="绱ф�ョ▼搴�:" prop="type">
+ <el-select v-model="addObj.type" :disabled="active>1&&tabIndex!=4" clearable size="small">
+ <el-option v-for="(a, ai) in dict.type.urgency_level" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鏍峰搧鍚嶇О:" prop="sample">
+ <el-input v-model="addObj.sample" disabled size="small" style="width: 208px">
+ <template slot="append"><el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search"
+ @click="selectStandardTree = true"></el-button></template>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鏍峰搧鏁伴噺:" prop="sampleNum" style="margin-right: 0">
+ <el-input-number v-model="addObj.sampleNum" :disabled="active>1" :max="100" :min="1" :precision="0"
+ size="small" @change="addStandardTree"></el-input-number>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鏍峰搧鐘舵��:" prop="sampleStatus">
+ <el-select v-model="addObj.sampleStatus" :disabled="active>1&&tabIndex!=4" size="small">
+ <el-option v-for="(a,ai) in dict.type.sample_status_list" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鎶芥鏁伴噺:" prop="testQuantity">
+ <el-input v-model="addObj.testQuantity" :disabled="active>1&&tabIndex!=4" clearable size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鏉ユ牱鏂瑰紡:" prop="formType">
+ <el-select v-model="addObj.formType" :disabled="active>1&&tabIndex!=4" size="small" clearable>
+ <el-option v-for="(a,ai) in dict.type.form_type" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:">
+ <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4" size="mini">
+ <el-radio :label="1" border style="margin-right: 0">鑷彇</el-radio>
+ <el-radio :label="0" border>鍏朵粬</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:">
+ <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4" size="mini" style="display: flex; flex-direction: column;">
+ <el-radio :label="0" border style="margin-right: 0">濮旀墭鍗曚綅鍙栧洖</el-radio>
+ <el-radio :label="1" border>瀹為獙瀹ゅ鐞�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鐢熶骇鍗曚綅:" prop="production">
+ <el-input v-model="addObj.production" :disabled="active>1&&tabIndex!=4" clearable placeholder="璇疯緭鍏�"
+ size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鐢熶骇鍗曚綅EN:" prop="productionEn">
+ <el-input v-model="addObj.productionEn" :disabled="active>1&&tabIndex!=4" clearable placeholder="璇疯緭鍏�"
+ size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鏄惁鐣欐牱:">
+ <el-radio-group v-model="addObj.isLeave" border :disabled="active>1&&tabIndex!=4" size="mini">
+ <el-radio :label="0" border style="margin-right: 0">涓嶇暀鏍�</el-radio>
+ <el-radio :label="1" border>鐣欐牱</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="濮旀墭浜�:">
+ <el-input v-model="addObj.prepareUser" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="濮旀墭浜鸿嫳鏂�:">
+ <el-input v-model="addObj.prepareUserEn" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="澶囨敞:">
+ <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
+ size="small" style="width: 100%" type="textarea"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="澶囨敞鑻辨枃:">
+ <el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
+ size="small" type="textarea"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
<el-row>
<el-col :span="6">
<el-form-item label="鏍峰搧鍚嶇О:">
@@ -154,10 +202,10 @@
</el-form>
</div>
<div>
- <div style="display: flex;justify-content: space-between;">
+ <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px">
<div v-if="active==1">
<el-form :inline="true" :model="addObj1" label-width="90px">
- <el-form-item label="鏍峰搧鍨嬪彿:" style="margin-bottom: 6px">
+ <el-form-item label="鏍峰搧鍨嬪彿:" style="margin-bottom: 6px;margin-top: 6px">
<el-select v-model="model" :placeholder="active>1 ? '' : '璇疯緭鍏�'"
allow-create clearable default-first-option filterable
size="small"
@@ -166,7 +214,7 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="妫�楠屾爣鍑�:">
+ <el-form-item label="妫�楠屾爣鍑�:" style="margin-bottom: 6px;margin-top: 6px">
<el-select v-model="standardMethodListId" :loading="methodLoad"
:placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"
@change="changeStandardMethodListId" @focus="methodFocus">
@@ -176,15 +224,15 @@
</el-form-item>
</el-form>
</div>
- <div style="display: flex;align-items: center">
+ <div style="display: flex;align-items: center;margin-bottom: 6px;margin-top: 6px">
<span style="width: 150px;font-size: 14px;text-align: right;">鐗规畩鏍囧噯锛�</span>
- <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable
- size="small"></el-input>
+ <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable size="small"></el-input>
<el-button v-show="active==1" size="small" style="margin-left: 10px"
type="primary" @click="editSpecial">缂栬緫</el-button>
</div>
</div>
<el-table ref="sampleTable" :data="sampleList" border class="el-table sampleTable" highlight-current-row
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
max-height="400px" tooltip-effect="dark" @selection-change="selectSample" @row-click="rowClick">
<el-table-column v-if="active==1" :selectable="selectable" type="selection" width="60"></el-table-column>
<el-table-column align="center" label="搴忓彿" type="index" width="65"></el-table-column>
@@ -248,7 +296,9 @@
</template>
</el-table-column>
</el-table>
- <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" border class="el-table"
+ <el-table ref="productTable" v-loading="getProductLoad" :data="productList"
+ :row-class-name="tableRowClassName" border class="el-table"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
max-height="400px" style="margin-bottom: 10px;" tooltip-effect="dark"
@select="selectOne" @selection-change="selectProduct" @select-all="handleAll">
<el-table-column v-if="active==1" :selectable="selectable0" type="selection" width="65"></el-table-column>
@@ -306,11 +356,6 @@
size="small" type="textarea"
@change="e=>requestChange(e,scope.row,'radius')">
</el-input>
-<!-- <el-select v-else-if="scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙') && (active==1||tabIndex==4)" v-model="scope.row.radius" clearable-->
-<!-- placeholder="鏉′欢"-->
-<!-- size="small" @change="e=>requestChange(e,scope.row,'radius')">-->
-<!-- <el-option v-for="(a,i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option>-->
-<!-- </el-select>-->
<span v-else>{{scope.row.radius}}</span>
</template>
</el-table-column>
@@ -329,16 +374,10 @@
</el-table-column>
<el-table-column label="璁¢噺鍗曚綅" prop="unit" show-overflow-tooltip width="100"></el-table-column>
<el-table-column label="鍗曚环" prop="price" show-overflow-tooltip width="100"></el-table-column>
- <!-- <el-table-column prop="manDay" label="棰勮鏃堕棿(澶�)" width="120" show-overflow-tooltip></el-table-column>
- <el-table-column prop="manHour" label="宸ユ椂绯绘暟" width="100" show-overflow-tooltip></el-table-column> -->
- <!-- <el-table-column prop="deviceGroup" label="璁惧缁�" width="120" show-overflow-tooltip></el-table-column> -->
<el-table-column label="鍖洪棿" min-width="120" prop="section" show-overflow-tooltip></el-table-column>
<el-table-column :filter-method="filterHandler" :filters="filters" label="瀛愬疄楠屽" min-width="130" prop="sonLaboratory"
show-overflow-tooltip></el-table-column>
- <el-table-column v-if="isSpecial&&active==1"
- fixed="right"
- label="鎿嶄綔"
- width="100">
+ <el-table-column v-if="isSpecial&&active==1" label="鎿嶄綔" width="100">
<template slot-scope="scope">
<el-button v-if="!scope.row.repetitionTag" size="small" type="text" @click="addProductList(productList,scope.row,scope.$index)">鎻掑叆琛�</el-button>
<el-button v-if="!!scope.row.repetitionTag&&scope.row.delete" size="small" type="text" @click="deleteProductList(scope.$index,productList)">鍒犻櫎</el-button>
@@ -432,7 +471,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-row>
- <el-button @click="issuedDialogVisible=false;goBack">鍙� 娑�</el-button>
+ <el-button @click="issuedDialogVisible=false;closeOpenPage">鍙� 娑�</el-button>
<el-button :loading="upLoad" type="primary" @click="submitForm2">纭� 瀹�</el-button>
</el-row>
</span>
@@ -547,8 +586,8 @@
selectStandardTreeList2
} from "@/api/business/rawMaterialOrder";
import {
- addInsOrder, delInsOrderTemplate,
- getQuarterOnOrder,
+ addInsOrder, addInsOrderTemplate, delInsOrderTemplate,
+ getQuarterOnOrder, selectInsOrderTemplateById,
selectOrderManDay,
updateInsOrder,
upInsOrder,
@@ -558,243 +597,259 @@
import {selectsStandardMethodByFLSSM} from "@/api/standard/standardLibrary";
import limsTable from "@/components/Table/lims-table.vue";
import {selectCustomPageList} from "@/api/system/customer";
+import {mapGetters} from "vuex";
export default {
+ name: 'Add',
components: {
limsTable,
cableConfig,
AuxiliaryWireCore
},
+ computed:{
+ ...mapGetters(["nickName"]),
+ },
dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'],
- data() {
- return {
- active: '',
- tabIndex: '',
- currentId: '',
- sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁
- editTable:[],
- template: null,
- templates: [],
- addObj: {
- entrustCode: null,
- custom: null,
- company: null,
- userId: null,
- type: '0',
- code: null,
- appointed: null,
- remark: null, // 澶囨敞
- remarkEn: null, // 澶囨敞鑻辨枃
- sample: null,
- factory: null,
- laboratory: null,
- sampleType: null,
- sampleNum: 1,
- unit: null,
- model: null,
- method: null,
- phone: null,
- processing: 1,
- isLeave: 0,
- orderType: null,
- send: 1,
- formType: '閫佹', // 鏉ユ牱鏂瑰紡
- sampleStatus: 'In good condition', // 鏍峰搧鐘舵��
- testQuantity: '', // 鏍峰搧鐘舵��
- production: null,
- productionEn: null,
- companyId: null,
- prepareUser:null, // 濮旀墭浜�
- prepareUserEn:null, // 濮旀墭浜鸿嫳鏂�
- prepareCode: '', // 濮旀墭浜哄伐鍙�
- quarterItemId: '',
- sampleView: '', // 鏍峰搧鍚嶇О锛堟姤鍛婂睍绀哄瓧娈碉級
- sampleViewEn: '', // 鏍峰搧鍚嶇О鑻辨枃锛堟姤鍛婂睍绀哄瓧娈碉級
- },
- addObjRules: { // 琛ㄥ崟鏍¢獙瑙勫垯
- orderType: [
- { required: true, message: '璇烽�夋嫨妫�楠岀被鍒�', trigger: 'change' }
- ],
- company: [
- { required: true, message: '璇烽�夋嫨濮旀墭鍗曚綅', trigger: 'change' }
- ],
- phone: [
- { required: true, message: '璇峰~鍐欒仈绯绘柟寮�', trigger: 'blur' }
- ],
- type: [
- { required: true, message: '璇烽�夋嫨绱ф�ョ▼搴�', trigger: 'change' }
- ],
- sample: [
- { required: true, message: '璇烽�夋嫨鏍峰搧鍚嶇О', trigger: 'change' }
- ],
- sampleNum: [
- { required: true, message: '璇峰~鍐欐牱鍝佹暟閲�', trigger: 'blur' }
- ],
- sampleStatus: [
- { required: true, message: '璇烽�夋嫨鏍峰搧鐘舵��', trigger: 'change' }
- ],
- formType: [
- { required: true, message: '璇烽�夋嫨鏉ユ牱鏂瑰紡', trigger: 'change' }
- ],
- testQuantity: [
- { required: true, message: '璇峰~鍐欐娊妫�鏁伴噺', trigger: 'blur' }
- ],
- production: [
- { required: true, message: '璇峰~鍐欑敓浜у崟浣�', trigger: 'blur' }
- ],
- productionEn: [
- { required: true, message: '璇峰~鍐欑敓浜у崟浣岴N', trigger: 'blur' }
- ],
- },
- sample: {
- sampleCode: null,
- laboratory: null,
- factory: null,
- sampleType: null,
- sample: null,
- model: null,
- modelNum: null,
- sampleNum: 1,
- isLeave: 0,
- unit: null
- },
- type: [],
- selectUserDia: false,
- tableData1: [],
- tableLoading1: false,
- multipleSelection: [],
- column1: [
- {label: '瀹㈡埛鍚嶇О', prop: 'company'},
- {label: '瀹㈡埛鍗曚綅EN', prop: 'companyEn'},
- {label: '鍗曚綅鍦板潃', prop: 'address'},
- {label: '鍗曚綅鍦板潃EN', prop: 'addressEn'},
- {label: '鍗曚綅鐢佃瘽', prop: 'phone'},
- {label: '鍔犳�ラ搴�', prop: 'num'},
- {label: '瀹㈡埛缂栧彿', prop: 'code2'},
- {label: '宸ュ巶鍩�', prop: 'code'}
- ],
- page1: {
- total:0,
- size:10,
- current:1
- },
- selectStandardTree: false,
- search: null,
- list: [],
- selectStandardTreeLoading: false,
- selectTree: null,
- sampleViewEn: null,
- expandedKeys: [],
- sampleList: [],
- sampleIds: [],
- methodList: [],
- addSampleDia: false,
- count: 1,
- productList: [],
- productList0: [],
- bsm1DiaList: [],
- productIds: [],
- getProductLoad: false,
- saveLoad: false,
- templateDia: false,
- templateLoading: false,
- templateName: '',
- issuedDialogVisible: false,
- distributeData: {
- appointed: '',
- userId: '',
- sonLaboratory:''
- },
- personList: [],
- upLoad: false,
- models: [],
- methods: [],
- methodLoad: false,
- noDialogVisible: false,
- tell: '',
- noLoading: false,
- orderType: [],
- filters: [],
- formType: [],
- currentMethod: null,
- isAskOnlyRead: false,
- sampleId: null,
- bsmRow: null,
- bsm1: false,
- bsm1Val: null,
- bsm1DiaAll: false,
- cableConfigShow: false,
- auxiliaryShow: false,
- bsm3Dia: false,
- // total: 0,
- RTS: '',
- totalArr: [],
- addObj1: {},
+ data() {
+ return {
+ active: '',
+ tabIndex: '',
+ currentId: '',
+ sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁
+ editTable:[],
+ template: null,
+ templates: [],
+ addObj: {
+ entrustCode: null,
+ custom: null,
+ company: null,
+ userId: null,
+ type: '0',
+ code: null,
+ appointed: null,
+ remark: null, // 澶囨敞
+ remarkEn: null, // 澶囨敞鑻辨枃
+ sample: null,
+ factory: null,
+ laboratory: null,
+ sampleType: null,
+ sampleNum: 1,
+ unit: null,
model: null,
- standardMethodListId: null,
- symbolList:['RTS'],
- inspectionItem:null,
- inspectionItemSubclass:null,
- methodS:null,
- isBsm2Val2:false,
- temperatureEngList: [],
- isShowInput: false,
- temId: '',
- sonLaboratoryList:[],
- selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃
- quarterItemOptions: [], // 鏌ヨ瀛e害淇℃伅
- specialStandardMethod: '',
- isSpecial: false,
- }
+ method: null,
+ phone: null,
+ processing: 1,
+ isLeave: 0,
+ orderType: null,
+ send: 1,
+ formType: '閫佹', // 鏉ユ牱鏂瑰紡
+ sampleStatus: 'In good condition', // 鏍峰搧鐘舵��
+ testQuantity: '', // 鏍峰搧鐘舵��
+ production: null,
+ productionEn: null,
+ companyId: null,
+ prepareUser:null, // 濮旀墭浜�
+ prepareUserEn:null, // 濮旀墭浜鸿嫳鏂�
+ prepareCode: '', // 濮旀墭浜哄伐鍙�
+ quarterItemId: '',
+ sampleView: '', // 鏍峰搧鍚嶇О锛堟姤鍛婂睍绀哄瓧娈碉級
+ sampleViewEn: '', // 鏍峰搧鍚嶇О鑻辨枃锛堟姤鍛婂睍绀哄瓧娈碉級
+ },
+ addObjRules: { // 琛ㄥ崟鏍¢獙瑙勫垯
+ orderType: [
+ { required: true, message: '璇烽�夋嫨妫�楠岀被鍒�', trigger: 'change' }
+ ],
+ company: [
+ { required: true, message: '璇烽�夋嫨濮旀墭鍗曚綅', trigger: 'change' }
+ ],
+ phone: [
+ { required: true, message: '璇峰~鍐欒仈绯绘柟寮�', trigger: 'blur' }
+ ],
+ type: [
+ { required: true, message: '璇烽�夋嫨绱ф�ョ▼搴�', trigger: 'change' }
+ ],
+ sample: [
+ { required: true, message: '璇烽�夋嫨鏍峰搧鍚嶇О', trigger: 'change' }
+ ],
+ sampleNum: [
+ { required: true, message: '璇峰~鍐欐牱鍝佹暟閲�', trigger: 'blur' }
+ ],
+ sampleStatus: [
+ { required: true, message: '璇烽�夋嫨鏍峰搧鐘舵��', trigger: 'change' }
+ ],
+ formType: [
+ { required: true, message: '璇烽�夋嫨鏉ユ牱鏂瑰紡', trigger: 'change' }
+ ],
+ testQuantity: [
+ { required: true, message: '璇峰~鍐欐娊妫�鏁伴噺', trigger: 'blur' }
+ ],
+ production: [
+ { required: true, message: '璇峰~鍐欑敓浜у崟浣�', trigger: 'blur' }
+ ],
+ productionEn: [
+ { required: true, message: '璇峰~鍐欑敓浜у崟浣岴N', trigger: 'blur' }
+ ],
+ },
+ sample: {
+ sampleCode: null,
+ laboratory: null,
+ factory: null,
+ sampleType: null,
+ sample: null,
+ model: null,
+ modelNum: null,
+ sampleNum: 1,
+ isLeave: 0,
+ unit: null
+ },
+ type: [],
+ selectUserDia: false,
+ tableData1: [],
+ tableLoading1: false,
+ multipleSelection: [],
+ column1: [
+ {label: '瀹㈡埛鍚嶇О', prop: 'company'},
+ {label: '瀹㈡埛鍗曚綅EN', prop: 'companyEn'},
+ {label: '鍗曚綅鍦板潃', prop: 'address'},
+ {label: '鍗曚綅鍦板潃EN', prop: 'addressEn'},
+ {label: '鍗曚綅鐢佃瘽', prop: 'phone'},
+ {label: '鍔犳�ラ搴�', prop: 'num'},
+ {label: '瀹㈡埛缂栧彿', prop: 'code2'},
+ {label: '宸ュ巶鍩�', prop: 'code'}
+ ],
+ page1: {
+ total:0,
+ size:10,
+ current:1
+ },
+ selectStandardTree: false,
+ search: null,
+ list: [],
+ selectStandardTreeLoading: false,
+ selectTree: null,
+ sampleViewEn: null,
+ expandedKeys: [],
+ sampleList: [],
+ upIndex: 0,
+ sampleIds: [],
+ methodList: [],
+ addSampleDia: false,
+ count: 1,
+ productList: [],
+ productList0: [],
+ bsm1DiaList: [],
+ productIds: [],
+ getProductLoad: false,
+ saveLoad: false,
+ templateDia: false,
+ templateLoading: false,
+ templateName: '',
+ issuedDialogVisible: false,
+ distributeData: {
+ appointed: '',
+ userId: '',
+ sonLaboratory:''
+ },
+ personList: [],
+ upLoad: false,
+ models: [],
+ methods: [],
+ methodLoad: false,
+ noDialogVisible: false,
+ tell: '',
+ noLoading: false,
+ orderType: [],
+ filters: [],
+ formType: [],
+ currentMethod: null,
+ isAskOnlyRead: false,
+ sampleId: null,
+ bsmRow: null,
+ bsm1: false,
+ bsm1Val: null,
+ bsm1DiaAll: false,
+ cableConfigShow: false,
+ auxiliaryShow: false,
+ bsm3Dia: false,
+ // total: 0,
+ RTS: '',
+ totalArr: [],
+ addObj1: {},
+ model: null,
+ standardMethodListId: null,
+ symbolList:['RTS'],
+ inspectionItem:null,
+ inspectionItemSubclass:null,
+ methodS:null,
+ isBsm2Val2:false,
+ temperatureEngList: [],
+ isShowInput: false,
+ temId: '',
+ sonLaboratoryList:[],
+ selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃
+ quarterItemOptions: [], // 鏌ヨ瀛e害淇℃伅
+ specialStandardMethod: '',
+ isSpecial: false,
+ }
+ },
+ watch: {
+ sampleList() {
+ this.addObj.method = null
+ this.productList = []
},
- watch: {
- sampleList() {
- this.addObj.method = null
- this.productList = []
- },
- productList: {
- deep: true,
- handler(val) {
- if (val && val.length > 0) {
- let arr = [];
- val.forEach(item => {
- if (item.sonLaboratory && !arr.find(a => a.value == item.sonLaboratory)) {
- arr.push({
- text: item.sonLaboratory,
- value: item.sonLaboratory
- })
- }
- })
- this.filters = arr
- }
- }
- },
- sampleList: {
- deep: true,
- handler(val) {
- this.getTotal()
- }
- },
- 'addObj.sample'(val) {
- this.model = null
- this.standardMethodListId = null
- },
- 'addObj.sampleNum'(val) {
- this.model = null
- this.standardMethodListId = null
- },
- tabIndex(val){
- if(val==4&&this.active==2){
- this.isSpecial = true
- }else{
- this.isSpecial = false
+ productList: {
+ deep: true,
+ handler(val) {
+ if (val && val.length > 0) {
+ let arr = [];
+ val.forEach(item => {
+ if (item.sonLaboratory && !arr.find(a => a.value == item.sonLaboratory)) {
+ arr.push({
+ text: item.sonLaboratory,
+ value: item.sonLaboratory
+ })
+ }
+ })
+ this.filters = arr
}
}
},
- mounted() {
- this.active = this.$route.query.active
- this.tabIndex = this.$route.query.tabIndex
- this.currentId = this.$route.query.currentId
+ sampleList: {
+ deep: true,
+ handler(val) {
+ this.getTotal()
+ }
+ },
+ 'addObj.sample'(val) {
+ this.model = null
+ this.standardMethodListId = null
+ },
+ 'addObj.sampleNum'(val) {
+ this.model = null
+ this.standardMethodListId = null
+ },
+ tabIndex(val){
+ if(val==4&&this.active==2){
+ this.isSpecial = true
+ }else{
+ this.isSpecial = false
+ }
+ }
+ },
+ mounted() {
+ this.active = this.$route.query.active
+ this.tabIndex = this.$route.query.tabIndex
+ this.currentId = this.$route.query.currentId
+ this.getInfo()
+ },
+ activated() {
+ this.active = this.$route.query.active
+ this.tabIndex = this.$route.query.tabIndex
+ this.currentId = this.$route.query.currentId
+ this.getInfo();
+ },
+ methods: {
+ getInfo() {
this.getUserNowData()
this.selectStandardTreeList()
this.getAuthorizedPerson();
@@ -829,15 +884,17 @@
this.isSpecial = false
}
},
- methods: {
- getPrepareUser () {
+ getPrepareUser () {
// this.addObj.prepareUser = JSON.parse(localStorage.getItem("user")).name;
// this.addObj.prepareUserEn = JSON.parse(localStorage.getItem("user")).nameEn
// this.addObj.prepareCode = JSON.parse(localStorage.getItem("user")).account
- },
+ },
// 缂栬緫瑕佹眰鍊艰〃鏍�
editSpecial () {
this.isSpecial = true
+ this.$nextTick(() => {
+ this.$refs.productTable.doLayout();
+ });
},
getQuarterOnOrderList () {
getQuarterOnOrder().then(res => {
@@ -917,7 +974,7 @@
},
// 鑾峰彇鐢ㄦ埛鍒楄〃
getAuthorizedPerson() {
- selectUserCondition().then(res => {
+ selectUserCondition({ type: 1 }).then(res => {
let data = []
res.data.forEach(a => {
data.push({
@@ -933,7 +990,7 @@
this.getCompanyList()
},
getCompanyList () {
- selectCustomPageList().then(res => {
+ selectCustomPageList({...this.page1}).then(res => {
this.tableLoading1 = false
if (res.code === 200) {
this.tableData1 = res.data.records
@@ -1062,7 +1119,9 @@
sampleList.forEach(a => {
if (a.insProduct.length > 0) {
a.insProduct.forEach(c => {
- delete c.id
+ if (this.tabIndex != 4) {
+ delete c.id
+ }
})
}
if (a.endModels) {
@@ -1100,7 +1159,9 @@
sampleList.forEach(a => {
if (a.insProduct.length > 0) {
a.insProduct.forEach(c => {
- delete c.id
+ if (this.tabIndex != 4) {
+ delete c.id
+ }
})
}
if (a.endModels) {
@@ -1199,18 +1260,20 @@
}
},
saveMethod(sampleList){
- console.log('sampleList----', sampleList)
this.saveLoad = true
if (this.addObj.quarterItemId) {
this.addObj.quarterItemId = this.addObj.quarterItemId[1]
}
if(this.tabIndex==4&&this.active==2){
+ if (this.addObj.createTime) {
+ delete this.addObj.createTime
+ }
// 閫�鍥炲悗鎻愪氦
- updateInsOrder({insOrder: this.addObj, sampleList: sampleList}).then(res => {
+ updateInsOrder({insOrder: this.addObj, sampleProduct: sampleList}).then(res => {
this.saveLoad = false
this.$message.success('宸叉彁浜�')
this.bsm3Dia = false;
- this.goBack()
+ this.closeOpenPage()
}).catch(e=>{
this.saveLoad = false
})
@@ -1220,7 +1283,7 @@
this.saveLoad = false
this.$message.success('宸叉彁浜�')
this.bsm3Dia = false;
- this.goBack()
+ this.closeOpenPage()
}).catch(e=>{
this.saveLoad = false
})
@@ -1238,7 +1301,6 @@
company: this.addObj.company
}).then(res => {
this.saveLoad = false
- if (res.code == 201) return
this.$message.success('鎻愪氦鎴愬姛')
selectOrderManDay({
id: this.currentId
@@ -1276,14 +1338,10 @@
userId: this.distributeData.userId,
sonLaboratory:this.distributeData.sonLaboratory
}).then(res => {
- if (res.code === 201) {
- this.upLoad = false
- return
- }
this.$message.success('鎻愪氦鎴愬姛')
this.upLoad = false
this.issuedDialogVisible = false
- this.goBack()
+ this.closeOpenPage()
}).catch(e => {
this.$message.error('鎻愪氦澶辫触')
this.upLoad = false
@@ -1345,7 +1403,6 @@
if (node.data.code === '[3]') {
this.sampleViewEn = val.sampleTypeEn
} else if (node.data.code === '[4]') {
- console.log('node.data---', node.data)
if (node.data.children!==null && node.data.children.length>0) {
this.sampleViewEn = val.sampleEn
}
@@ -1589,14 +1646,12 @@
backtrack([], nums);
return result;
},
- tableRowClassName({
- row,
- rowIndex
- }) {
- if (row.state === 0) {
+ tableRowClassName({row, rowIndex}) {
+ if (row.state == 1) {
+ return 'warning-row';
+ } else {
return '';
}
- return 'warning-row';
},
selectInsOrderTemplate() {
selectInsOrderTemplate({company: this.addObj.company}).then(res => {
@@ -1613,9 +1668,6 @@
delInsOrderTemplate({
id: row.id
}).then(res => {
- if (res.code === 201) {
- return
- }
this.$message.success('鍒犻櫎鎴愬姛')
this.selectInsOrderTemplate()
}).catch(e => {
@@ -1634,17 +1686,14 @@
sampleList: this.sampleList,
selectTree:this.selectTree
})
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
}).then(res => {
- if (res.code == 201) return
this.templateLoading = false;
this.templateDia = false;
this.$message.success('淇濆瓨鎴愬姛')
this.selectInsOrderTemplate()
this.templateName = ''
+ }).catch(e => {
+ this.templateLoading = false;
})
} else {
this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
@@ -1655,12 +1704,13 @@
selectInsOrderTemplateById({id: e}).then(res => {
let obj = JSON.parse(res.data)
//鍒跺崟浜鸿缃负褰撳墠鐧诲綍鐢ㄦ埛
- let user = JSON.parse(localStorage.getItem('user'))
+ let user = this.nickName
obj.addObj.custom = user.name
obj.addObj.userId = user.userId
this.addObj = obj.addObj;
this.sampleList = obj.sampleList;
this.selectTree = obj.selectTree
+ this.rowClick(this.sampleList[0])
})
},
delSampleAndProduct() {
@@ -1701,6 +1751,10 @@
this.productList = row.insProduct
this.productList0 = JSON.parse(JSON.stringify(this.productList))
this.$refs.sampleTable.setCurrentRow(row)
+ this.$nextTick(() => {
+ this.$refs.productTable.doLayout();
+ this.upIndex++
+ });
setTimeout(() => {
this.productList.forEach(a => {
if (a.state == 1) this.toggleSelection(a)
@@ -1924,16 +1978,12 @@
state: 2,
id: this.currentId,
tell: this.tell
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
}).then(res => {
this.noLoading = false;
this.tell = '';
this.$message.success('鎻愪氦鎴愬姛')
this.issuedDialogVisible = false;
- this.goBack()
+ this.closeOpenPage()
})
},
filterHandler(value, row, column) {
@@ -1947,7 +1997,7 @@
},
// 杈呭姪绾胯姱閰嶇疆
openAuxiliaryCore () {
- if (this.active === 1) {
+ if (this.active == 1) {
if (this.sampleIds.length === 0) {
this.$message.error("鏈�夋嫨鏍峰搧")
} else if (this.sampleIds.length === 1) {
@@ -1975,7 +2025,7 @@
}
},
openCableConfig() {
- if (this.active === 1) {
+ if (this.active == 1) {
if (this.sampleIds.length === 0) {
this.$message.error("鏈�夋嫨鏍峰搧")
} else if (this.sampleIds.length === 1) {
@@ -2146,51 +2196,26 @@
this.productList0.splice(index,1)
},
goBack () {
- const obj = { path: "/business/productOrder" };
- this.$tab.closeOpenPage(obj);
- }
+ if (this.active == 1) {
+ this.$router.go(-1)
+ } else {
+ this.closeOpenPage()
+ }
+ },
+ closeOpenPage() {
+ this.$router.go(-1)
+ this.$tab.closeOpenPage()
+ },
}
}
</script>
<style scoped>
-.ins_order_add .el-input-group__append,
-.el-input-group__prepend {
- padding: 0 10px;
+>>>.warning-row {
+ color: #1890FF;
}
-
-.ins_order_add .el-tree-node__content {
- height: 32px;
- font-size: 14px;
- border-radius: 2px;
-}
-
-.ins_order_add .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
- color: #3A7BFA;
-}
-
-.ins_order_add .has-gutter .el-table__cell .cell {
- line-height: 30px;
- background-color: #fafafa;
-}
-
-.ins_order_add .has-gutter .el-table__cell {
- background-color: #fafafa !important;
-}
-
-.ins_order_add .el-table__row .cell {
- font-size: 12px;
-}
-
-.ins_order_add .el-table .warning-row .cell {
- color: #3A7BFA;
-}
-
-.ins_order_add .el-select .is-disabled {
- background: transparent !important;
-}
-
-.ins_order_add .el-select .is-disabled .el-input__inner {
- background: transparent !important;
+.node_i {
+ color: orange;
+ font-size: 18px;
}
</style>
--
Gitblit v1.9.3