From 427cab3a87b0d83ae47b28784461d0914e56131c Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期一, 01 七月 2024 16:32:24 +0800
Subject: [PATCH] 下单页面—检验项目的支持模糊搜索查询
---
src/components/do/b1-ins-order/add.vue | 63 ++++++++++++++++++++++++++++---
1 files changed, 56 insertions(+), 7 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 7836aad..8c77e2a 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -420,16 +420,38 @@
<span>妫�楠岄」</span>
<el-input
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>
+ 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-model="inspectionItemSubclass"
+ @input="searchFilterList"
+ size="mini"
+ placeholder="璇疯緭鍏�"/>
+ </div>
+ </template>
+ </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="methodS" label="璇曢獙鏂规硶" min-width="120" 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-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>
@@ -716,12 +738,13 @@
</template>
<script>
- import ValueTable from '../../tool/value-table.vue'
- import fiberOpticConfig from './fiberoptic-config.vue'
- import equipConfig from './equip-config.vue'
- import cableConfig from './cable-config.vue'
- import Vue from 'vue'
- export default {
+import ValueTable from '../../tool/value-table.vue'
+import fiberOpticConfig from './fiberoptic-config.vue'
+import equipConfig from './equip-config.vue'
+import cableConfig from './cable-config.vue'
+import Vue from 'vue'
+
+export default {
components: {
ValueTable,
fiberOpticConfig,
@@ -826,6 +849,7 @@
addSampleDia: false,
count: 1,
productList: [],
+ productList0: [],
bsm1DiaList: [],
productIds: [],
getProductLoad: false,
@@ -877,6 +901,8 @@
symbolList:[
'RTS','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'],
inspectionItem:null,
+ inspectionItemSubclass:null,
+ methodS:null,
}
},
watch: {
@@ -951,6 +977,28 @@
}
},
methods: {
+ searchFilterList () {
+ const vtw = {
+ inspectionItem: this.inspectionItem, // 妫�楠岄」
+ inspectionItemSubclass: this.inspectionItemSubclass, // 妫�楠岄」瀛愰」
+ methodS: this.methodS, // 璇曢獙鏂规硶
+ }
+ const isHaveValue = Object.values(vtw).some(item => {
+ return item
+ })
+ if (isHaveValue) {
+ for(let i in vtw) {
+ if (vtw[i]) {
+ this.productList = this.productList0.filter((item) => {
+ return item[i] && item[i].includes(vtw[i])
+ })
+ }
+ }
+ } else {
+ // 娌℃湁鏌ヨ鏉′欢鏃舵覆鏌撴墍鏈夋暟鎹�
+ this.productList = this.productList0
+ }
+ },
getAuthorizedPerson() {
this.$axios.get(this.$api.user.getUserMenu).then(res => {
let data = []
@@ -1769,6 +1817,7 @@
row.insProduct = this.HaveJson(res.data)
this.getProductLoad = false
this.productList = row.insProduct
+ this.productList0 = JSON.parse(JSON.stringify(this.productList))
this.$refs.sampleTable.setCurrentRow(row)
setTimeout(() => {
this.productList.forEach(a => {
--
Gitblit v1.9.3