From 6b994d09bd7cff484174d3d11355c2e456ce6ac0 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 11 四月 2025 14:03:01 +0800
Subject: [PATCH] 配置线芯修改
---
src/views/business/materialOrder/copperOrder.vue | 19 +-
src/views/business/materialOrder/customsInspection.vue | 2
src/views/business/productOrder/components/cable-config.vue | 193 +++++++++++++++-----------------
src/views/business/productOrder/components/auxiliaryWireCore.vue | 92 ++++++---------
4 files changed, 139 insertions(+), 167 deletions(-)
diff --git a/src/views/business/materialOrder/copperOrder.vue b/src/views/business/materialOrder/copperOrder.vue
index 290383b..472155c 100644
--- a/src/views/business/materialOrder/copperOrder.vue
+++ b/src/views/business/materialOrder/copperOrder.vue
@@ -215,9 +215,9 @@
</el-table-column>
<el-table-column label="瑕佹眰鍊�" min-width="220px" prop="ask">
<template slot-scope="scope">
- <el-input v-if="active == 1 && isAskOnlyRead && scope.row.inspectionValueType != '5'" v-model="scope.row.ask"
- :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鍊�" size="small" type="textarea"
- @change="e => requestChange(e, scope.row, 'ask')"></el-input>
+ <el-input v-if="active == 1 && isAskOnlyRead && scope.row.inspectionValueType != '5'"
+ v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鍊�" size="small"
+ type="textarea" @change="e => requestChange(e, scope.row, 'ask')"></el-input>
<span v-else>
<!-- <template v-if="(scope.row.ask.indexOf('D')>-1
||scope.row.ask.indexOf('W')>-1
@@ -234,8 +234,8 @@
</el-table-column>
<el-table-column label="瑕佹眰鎻忚堪" min-width="220px" prop="tell">
<template slot-scope="scope">
- <el-input v-if="active == 1 && isAskOnlyRead" v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3 }"
- clearable placeholder="瑕佹眰鎻忚堪" size="small" type="textarea"
+ <el-input v-if="active == 1 && isAskOnlyRead" v-model="scope.row.tell"
+ :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鎻忚堪" size="small" type="textarea"
@change="e => requestChange(e, scope.row, 'tell')"></el-input>
<span v-else>
<template>{{ scope.row.tell }}</template>
@@ -247,7 +247,8 @@
<template slot="header" slot-scope="scope">
<div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
<span>璇曢獙鏂规硶</span>
- <el-input v-if="active == 1" v-model="methodS" placeholder="璇疯緭鍏�" size="mini" @input="searchFilterList" />
+ <el-input v-if="active == 1" v-model="methodS" placeholder="璇疯緭鍏�" size="mini"
+ @input="searchFilterList" />
</div>
</template>
</el-table-column>
@@ -311,8 +312,8 @@
<div class="search_label" style="width: 80px;">瑕佹眰鍊硷細</div>
<div class="search_input">
<el-radio-group v-model="item.bsm1Val" v-removeAriaHidden @input="upBsmAll(item)">
- <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai"
- :label="a">{{ JSON.parse(item.bsmRow.askCopy)[ai] }}</el-radio>
+ <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai" :label="a">{{
+ JSON.parse(item.bsmRow.askCopy)[ai] }}</el-radio>
</el-radio-group>
</div>
</el-col>
@@ -1446,7 +1447,7 @@
selectStandardProductList({
model: this.addObj.model ? this.addObj.model : row.model,
modelNum: row.modelNum,
- standardMethodListId: val,
+ standardMethodListIds: val,
factory: selectTreeList.join(" - "),
}).then(res => {
res.data.forEach(a => {
diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue
index b1ce84e..5c0657e 100644
--- a/src/views/business/materialOrder/customsInspection.vue
+++ b/src/views/business/materialOrder/customsInspection.vue
@@ -1559,7 +1559,7 @@
},
// 閫夋嫨妫�楠屾爣鍑嗗洖璋�
methodChange(val, row) {
- if (val === null || val === '') return
+ if (!val || val.length < 1) return
if (this.sampleList.length > 1) {
// 鏈変袱鏉℃牱鍝佹椂锛岀浜屾潯鏍峰搧淇℃伅鍜岀涓�鏉′繚鎸佷竴鑷�
this.sampleList.forEach(item => {
diff --git a/src/views/business/productOrder/components/auxiliaryWireCore.vue b/src/views/business/productOrder/components/auxiliaryWireCore.vue
index 5e7898e..7dfe787 100644
--- a/src/views/business/productOrder/components/auxiliaryWireCore.vue
+++ b/src/views/business/productOrder/components/auxiliaryWireCore.vue
@@ -7,19 +7,15 @@
</el-radio-group>
<el-form :model="auxiliaryWireCore" ref="entity" size="small" :inline="true">
<el-form-item label="鑺暟" prop="num">
- <el-select v-model="auxiliaryWireCore.num" allow-create
- clearable
- default-first-option
- filterable
- multiple
- size="small">
- <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+ <el-select v-model="auxiliaryWireCore.num" allow-create clearable default-first-option filterable multiple
+ size="small">
+ <el-option v-for="item in quantityList" :key="item.value" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="妫�楠屾爣鍑�" prop="standardMethodListId">
- <el-select v-model="auxiliaryWireCore.standardMethodListId" disabled placeholder="璇烽�夋嫨妫�楠屾爣鍑�"
- size="small"
- @change="(value)=>methodChange(value)">
+ <el-select v-model="auxiliaryWireCore.standardMethodListId" disabled placeholder="璇烽�夋嫨妫�楠屾爣鍑�" size="small"
+ @change="(value) => methodChange(value)" multiple>
<el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">
</el-option>
</el-select>
@@ -32,23 +28,19 @@
</div>
</div>
<div class="table">
- <el-table ref="productTable" v-loading="getProductLoad" :data="productList"
- :row-class-name="tableRowClassName" border class="el-table" :height="'calc(100vh - 200px)'"
- :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
- tooltip-effect="dark" @select="upProductSelect"
- @selection-change="selectProduct" @select-all="handleAll">
+ <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName"
+ border class="el-table" :height="'calc(100vh - 200px)'"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" tooltip-effect="dark" @select="upProductSelect"
+ @selection-change="selectProduct" @select-all="handleAll">
<el-table-column :selectable="selectable" type="selection" width="65"></el-table-column>
- <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column>
+ <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass"
+ show-overflow-tooltip></el-table-column>
<el-table-column label="妫�楠岄」" min-width="140" prop="inspectionItem" show-overflow-tooltip>
<template slot="header" slot-scope="scope">
<div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
<span>妫�楠岄」</span>
- <el-input
- v-if="active==1"
- v-model="inspectionItem"
- placeholder="璇疯緭鍏�"
- size="mini"
- @input="searchFilterList"/>
+ <el-input v-if="active == 1" v-model="inspectionItem" placeholder="璇疯緭鍏�" size="mini"
+ @input="searchFilterList" />
</div>
</template>
</el-table-column>
@@ -56,36 +48,31 @@
<template slot="header" slot-scope="scope">
<div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
<span>妫�楠岄」瀛愰」</span>
- <el-input
- v-if="active==1"
- v-model="inspectionItemSubclass"
- placeholder="璇疯緭鍏�"
- size="mini"
- @input="searchFilterList"/>
+ <el-input v-if="active == 1" v-model="inspectionItemSubclass" placeholder="璇疯緭鍏�" size="mini"
+ @input="searchFilterList" />
</div>
</template>
</el-table-column>
<el-table-column label="瑕佹眰鎻忚堪" min-width="220px" prop="tell">
<template slot-scope="scope">
- <el-input v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鎻忚堪"
- size="small" type="textarea"></el-input>
+ <el-input v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鎻忚堪"
+ size="small" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="瑕佹眰鍊�" min-width="220px" prop="ask">
<template slot-scope="scope">
- <el-input v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鍊�"
- size="small" type="textarea"></el-input>
+ <el-input v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鍊�"
+ size="small" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="鏉′欢" min-width="140" prop="radius" show-overflow-tooltip>
<template slot-scope="scope">
- <el-input v-if="!scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙')" v-model="scope.row.radius" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鎻忚堪"
- size="small" type="textarea">
+ <el-input v-if="!scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙')" v-model="scope.row.radius"
+ :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鎻忚堪" size="small" type="textarea">
</el-input>
<el-select v-if="scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙')" v-model="scope.row.radius" clearable
- placeholder="鏉′欢"
- size="small">
- <el-option v-for="(a,i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option>
+ placeholder="鏉′欢" size="small">
+ <el-option v-for="(a, i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option>
</el-select>
</template>
</el-table-column>
@@ -93,12 +80,7 @@
<template slot="header" slot-scope="scope">
<div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
<span>璇曢獙鏂规硶</span>
- <el-input
- v-if="active==1"
- v-model="methodS"
- placeholder="璇疯緭鍏�"
- size="mini"
- @input="searchFilterList"/>
+ <el-input v-if="active == 1" v-model="methodS" placeholder="璇疯緭鍏�" size="mini" @input="searchFilterList" />
</div>
</template>
</el-table-column>
@@ -113,7 +95,7 @@
<script>
import { Tree } from 'element-ui'
-import {selectsStandardMethodByFLSSM, selectStandardProductList} from "@/api/business/rawMaterialOrder";
+import { selectsStandardMethodByFLSSM, selectStandardProductList } from "@/api/business/rawMaterialOrder";
export default {
props: {
active: {
@@ -142,7 +124,7 @@
tree: '',
standards: [],
auxiliaryWireCore: {
- standardMethodListId: null,
+ standardMethodListId: [],
insProduct: [],
num: [],
modelNum: ''
@@ -201,17 +183,17 @@
}
},
// 瑕佹眰鍊煎彉鍖栨椂
- requestChange(e, row,type) {
+ requestChange(e, row, type) {
this.sampleList.map(item => {
if (this.sampleIds.indexOf(item.id) > -1) {
item.insProduct.map(i => {
- if(i.id == row.id){
- if(row.repetitionTag){
- if(row.repetitionTag==i.repetitionTag){
+ if (i.id == row.id) {
+ if (row.repetitionTag) {
+ if (row.repetitionTag == i.repetitionTag) {
i[type] = e
}
- }else{
- if(!i.repetitionTag){
+ } else {
+ if (!i.repetitionTag) {
i[type] = e
}
}
@@ -250,7 +232,7 @@
this.$refs.productTable.doLayout()
})
},
- tableRowClassName({row, rowIndex}) {
+ tableRowClassName({ row, rowIndex }) {
if (row.state === 0) {
return '';
}
@@ -298,7 +280,7 @@
}
},
methodChange(val) {
- if (val === null || val === '') return
+ if (!val || val.length < 1) return
this.getProductLoad = true
let standard = this.standards.find(a => a.id === val)
this.isAskOnlyRead = standard != null && standard.code === '鎶�鏈姹�';
@@ -312,7 +294,7 @@
selectStandardProductList({
model: this.$parent.addObj.model ? this.$parent.addObj.model : model,
modelNum: modelNum,
- standardMethodListId: val,
+ standardMethodListIds: val,
factory: selectTreeList.join(" - "),
cores: cores,
conductorMaterial: conductorMaterial,
@@ -377,10 +359,12 @@
display: flex;
justify-content: space-between;
}
+
.search_input {
display: flex;
justify-content: space-between;
}
+
.ins_order_config .has-gutter .el-table__cell .cell {
line-height: 30px;
background-color: #fafafa;
diff --git a/src/views/business/productOrder/components/cable-config.vue b/src/views/business/productOrder/components/cable-config.vue
index 3e04ae7..36fb994 100644
--- a/src/views/business/productOrder/components/cable-config.vue
+++ b/src/views/business/productOrder/components/cable-config.vue
@@ -1,25 +1,21 @@
<template>
<div>
<div class="search_form">
- <div v-if="currentTab=='缁濈紭'" style="display: flex">
+ <div v-if="currentTab == '缁濈紭'" style="display: flex">
<el-radio-group v-model="currentTab" size="small" style="margin-right: 20px;" @input="changeTab">
<el-radio-button label="缁濈紭">缁� 缂�</el-radio-button>
</el-radio-group>
<el-form :model="insulating" ref="entity" size="small" :inline="true">
<el-form-item label="鑺暟" prop="num">
- <el-select v-model="insulating.num" allow-create
- clearable
- default-first-option
- filterable
- multiple
- size="small">
- <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+ <el-select v-model="insulating.num" allow-create clearable default-first-option filterable multiple
+ size="small">
+ <el-option v-for="item in quantityList" :key="item.value" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="妫�楠屾爣鍑�" prop="standardMethodListId">
- <el-select v-model="insulating.standardMethodListId" disabled placeholder="璇烽�夋嫨妫�楠屾爣鍑�"
- size="small"
- @change="(value)=>methodChange(value)">
+ <el-select v-model="insulating.standardMethodListId" disabled placeholder="璇烽�夋嫨妫�楠屾爣鍑�" size="small"
+ @change="(value) => methodChange(value)" multiple>
<el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">
</el-option>
</el-select>
@@ -32,22 +28,19 @@
</div>
</div>
<div class="table">
- <el-table ref="productTable" :data="productList" :row-class-name="tableRowClassName" border
- class="el-table" :height="'calc(100vh - 200px)'" tooltip-effect="dark" @select="upProductSelect"
- :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
- @selection-change="selectProduct" @select-all="handleAll">
+ <el-table ref="productTable" :data="productList" :row-class-name="tableRowClassName" border class="el-table"
+ :height="'calc(100vh - 200px)'" tooltip-effect="dark" @select="upProductSelect"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" @selection-change="selectProduct"
+ @select-all="handleAll">
<el-table-column :selectable="selectable" type="selection" width="65"></el-table-column>
- <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column>
+ <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass"
+ show-overflow-tooltip></el-table-column>
<el-table-column label="妫�楠岄」" min-width="140" prop="inspectionItem" show-overflow-tooltip>
<template slot="header" slot-scope="scope">
<div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
<span>妫�楠岄」</span>
- <el-input
- v-if="active==1"
- v-model="inspectionItem"
- placeholder="璇疯緭鍏�"
- size="mini"
- @input="searchFilterList"/>
+ <el-input v-if="active == 1" v-model="inspectionItem" placeholder="璇疯緭鍏�" size="mini"
+ @input="searchFilterList" />
</div>
</template>
</el-table-column>
@@ -55,54 +48,47 @@
<template slot="header" slot-scope="scope">
<div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
<span>妫�楠岄」瀛愰」</span>
- <el-input
- v-if="active==1"
- v-model="inspectionItemSubclass"
- placeholder="璇疯緭鍏�"
- size="mini"
- @input="searchFilterList"/>
+ <el-input v-if="active == 1" v-model="inspectionItemSubclass" placeholder="璇疯緭鍏�" size="mini"
+ @input="searchFilterList" />
</div>
</template>
</el-table-column>
<el-table-column label="瑕佹眰鎻忚堪" min-width="220px" prop="tell">
<template slot-scope="scope">
- <el-input v-if="active==1&&(isAskOnlyRead || isSpecial)" v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鎻忚堪"
- size="small" type="textarea"></el-input>
+ <el-input v-if="active == 1 && (isAskOnlyRead || isSpecial)" v-model="scope.row.tell"
+ :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鎻忚堪" size="small"
+ type="textarea"></el-input>
<span v-else>
- <template >{{ scope.row.tell }}</template>
- </span>
+ <template>{{ scope.row.tell }}</template>
+ </span>
</template>
</el-table-column>
<el-table-column label="瑕佹眰鍊�" min-width="220px" prop="ask">
<template slot-scope="scope">
- <el-input v-if="active==1&&(isAskOnlyRead || isSpecial)" v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鍊�"
- size="small" type="textarea"></el-input>
+ <el-input v-if="active == 1 && (isAskOnlyRead || isSpecial)" v-model="scope.row.ask"
+ :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鍊�" size="small"
+ type="textarea"></el-input>
<span v-else>{{ scope.row.ask }}</span>
</template>
</el-table-column>
<el-table-column label="鏉′欢" min-width="140" prop="radius" show-overflow-tooltip>
<template slot-scope="scope">
- <el-input v-if="active==1&&(isAskOnlyRead || isSpecial)&&!scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙')" v-model="scope.row.radius" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鎻忚堪"
- size="small" type="textarea">
+ <el-input v-if="active == 1 && (isAskOnlyRead || isSpecial) && !scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙')"
+ v-model="scope.row.radius" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鎻忚堪"
+ size="small" type="textarea">
</el-input>
- <el-select v-if="scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙') && active == 1" v-model="scope.row.radius" clearable
- placeholder="鏉′欢"
- size="small">
- <el-option v-for="(a,i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option>
+ <el-select v-if="scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙') && active == 1" v-model="scope.row.radius"
+ clearable placeholder="鏉′欢" size="small">
+ <el-option v-for="(a, i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option>
</el-select>
- <span v-if="active != 1">{{scope.row.radius}}</span>
+ <span v-if="active != 1">{{ scope.row.radius }}</span>
</template>
</el-table-column>
<el-table-column label="璇曢獙鏂规硶" min-width="120" prop="methodS" show-overflow-tooltip>
<template slot="header" slot-scope="scope">
<div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
<span>璇曢獙鏂规硶</span>
- <el-input
- v-if="active==1"
- v-model="methodS"
- placeholder="璇疯緭鍏�"
- size="mini"
- @input="searchFilterList"/>
+ <el-input v-if="active == 1" v-model="methodS" placeholder="璇疯緭鍏�" size="mini" @input="searchFilterList" />
</div>
</template>
</el-table-column>
@@ -110,15 +96,14 @@
<el-table-column label="鍗曚环" prop="price" show-overflow-tooltip width="100"></el-table-column>
<el-table-column label="鍖洪棿" min-width="120" prop="section" show-overflow-tooltip></el-table-column>
<el-table-column label="瀛愬疄楠屽" min-width="130" prop="sonLaboratory" 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"
- fixed="right"
- label="鎿嶄綔"
- width="100">
+ <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" fixed="right" label="鎿嶄綔" width="100">
<template slot-scope="scope">
- <el-button type="text" size="small" @click="addProductList(productList,scope.row,scope.$index)" v-if="!scope.row.repetitionTag">鎻掑叆琛�</el-button>
- <el-button type="text" size="small" v-if="!!scope.row.repetitionTag&&scope.row.delete" @click="deleteProductList(scope.$index,productList)">鍒犻櫎</el-button>
+ <el-button type="text" size="small" @click="addProductList(productList, scope.row, scope.$index)"
+ v-if="!scope.row.repetitionTag">鎻掑叆琛�</el-button>
+ <el-button type="text" size="small" v-if="!!scope.row.repetitionTag && scope.row.delete"
+ @click="deleteProductList(scope.$index, productList)">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -127,7 +112,7 @@
</template>
<script>
-import {selectsStandardMethodByFLSSM, selectStandardProductList} from "@/api/business/rawMaterialOrder";
+import { selectsStandardMethodByFLSSM, selectStandardProductList } from "@/api/business/rawMaterialOrder";
export default {
props: {
@@ -145,35 +130,35 @@
},
},
data(vm) {
- return {
- standardList:[],
- vaule0:'',
- currentTab:'缁濈紭',
- upIndex:0,
- productList: [],
- productIds: [],
- sample: [],
- tree: '',
- standards: [],
- insulating: {
- standardMethodListId: null,
- insProduct: [],
- num: []
- },
- isAskOnlyRead: false,
- inspectionItem:null,
- inspectionItemSubclass:null,
- methodS:null,
- filters: [],
- quantityList: [],
- }
+ return {
+ standardList: [],
+ vaule0: '',
+ currentTab: '缁濈紭',
+ upIndex: 0,
+ productList: [],
+ productIds: [],
+ sample: [],
+ tree: '',
+ standards: [],
+ insulating: {
+ standardMethodListId: [],
+ insProduct: [],
+ num: []
+ },
+ isAskOnlyRead: false,
+ inspectionItem: null,
+ inspectionItemSubclass: null,
+ methodS: null,
+ filters: [],
+ quantityList: [],
+ }
},
mounted() {
this.$parent.sampleIds.forEach(a => {
for (var i = 0; i < this.$parent.sampleList.length; i++) {
if (this.$parent.sampleList[i].id == a) {
this.sample.push(this.$parent.sampleList[i])
- if(this.$parent.sampleList[i].insulating !== undefined && this.$parent.sampleList[i].insulating !== null){
+ if (this.$parent.sampleList[i].insulating !== undefined && this.$parent.sampleList[i].insulating !== null) {
this.insulating = this.$parent.sampleList[i].insulating
}
break
@@ -184,7 +169,7 @@
},
methods: {
// 妫�楠岄」鍒楄〃绛涢��
- searchFilterList () {
+ searchFilterList() {
const vtw = {
inspectionItem: this.inspectionItem, // 妫�楠岄」
inspectionItemSubclass: this.inspectionItemSubclass, // 妫�楠岄」瀛愰」
@@ -194,7 +179,7 @@
return item
})
if (isHaveValue) {
- for(let i in vtw) {
+ for (let i in vtw) {
if (vtw[i]) {
this.productList = this.productList0.filter((item) => {
return item[i] && item[i].includes(vtw[i])
@@ -234,7 +219,7 @@
this.$refs.productTable.doLayout()
})
},
- tableRowClassName({row, rowIndex}) {
+ tableRowClassName({ row, rowIndex }) {
if (row.state === 0) {
return '';
}
@@ -265,7 +250,7 @@
} else {
this.standards = res.data.standardMethodList
}
- } catch (e) {}
+ } catch (e) { }
})
this.insulating.standardMethodListId = this.sampleSelectionList[0].standardMethodListId
// 鏌ヨ妫�娴嬫爣鍑嗕笅鎷夋閫夐」
@@ -281,27 +266,27 @@
}
},
methodChange(val) {
- if (val === null || val === '') return
+ if (!val || val.length < 1) return
let standard = this.standards.find(a => a.id === val)
- if(standard!=null && standard.code==='鎶�鏈姹�'){
+ if (standard != null && standard.code === '鎶�鏈姹�') {
this.isAskOnlyRead = true
- }else{
+ } else {
this.isAskOnlyRead = false
}
let selectTreeList = this.$parent.selectTree.split(" - ")
- this.$parent.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.$parent.addObj.model)
+ this.$parent.addObj.model && (selectTreeList[selectTreeList.length - 1] = this.$parent.addObj.model)
const model = this.sampleSelectionList[0].model
const modelNum = this.sampleSelectionList[0].modelNum
const cores = this.sampleSelectionList[0].cores
const conductorMaterial = this.sampleSelectionList[0].conductorMaterial
const conductorType = this.sampleSelectionList[0].conductorType
selectStandardProductList({
- model: this.$parent.addObj.model?this.$parent.addObj.model:model,
+ model: this.$parent.addObj.model ? this.$parent.addObj.model : model,
modelNum: modelNum,
cores: cores,
conductorMaterial: conductorMaterial,
conductorType: conductorType,
- standardMethodListId: val,
+ standardMethodListIds: val,
factory: selectTreeList.join(" - "),
isCableTag: '1',
}, {
@@ -318,10 +303,10 @@
toggleSelection(row) {
this.$refs.productTable.toggleRowSelection(row, true);
},
- save(){
+ save() {
this.insulating.insProduct = this.HaveJson(this.productList)
- if(this.insulating.insProduct.length !== 0){
- if(this.insulating.num.length === 0){
+ if (this.insulating.insProduct.length !== 0) {
+ if (this.insulating.num.length === 0) {
this.$message.error('缂哄皯鑺暟鏃犳硶淇濆瓨')
return
}
@@ -337,8 +322,8 @@
this.$emit('goBackAdd')
this.$message.success('宸蹭繚瀛�')
},
- changeTab(val){
- if(val==='缁濈紭'){
+ changeTab(val) {
+ if (val === '缁濈紭') {
this.productList = this.insulating.insProduct
}
setTimeout(() => {
@@ -351,25 +336,25 @@
const property = column['property'];
return row[property] === value;
},
- addProductList(productList,row,index){
- let list = productList.filter(m=>{
- if(m.id==row.id){
+ addProductList(productList, row, index) {
+ let list = productList.filter(m => {
+ if (m.id == row.id) {
m.delete = false
}
- return m.id==row.id
+ return m.id == row.id
})
let num = list.length
let obj = this.HaveJson(row)
obj.repetitionTag = num
obj.delete = true
obj.state = 0
- productList.splice(index+num,0,obj)
+ productList.splice(index + num, 0, obj)
},
- deleteProductList(index,list){
- if(list[index-1]&&list[index-1].repetitionTag){
- list[index-1].delete=true
+ deleteProductList(index, list) {
+ if (list[index - 1] && list[index - 1].repetitionTag) {
+ list[index - 1].delete = true
}
- list.splice(index,1)
+ list.splice(index, 1)
},
}
}
@@ -380,10 +365,12 @@
display: flex;
justify-content: space-between;
}
+
.search_input {
display: flex;
justify-content: space-between;
}
+
>>>.warning-row {
color: #1890FF;
}
--
Gitblit v1.9.3