From 02abdc9c856da39026f26843856bf4ab302e7def Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 03 七月 2024 09:25:00 +0800
Subject: [PATCH] 修改luckysheet引用
---
src/components/do/b1-ins-order/add.vue | 124 ++++++++++++++++++++++++++++++++---------
1 files changed, 97 insertions(+), 27 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 75c755a..43ad37a 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>
@@ -738,12 +760,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,
@@ -848,6 +871,7 @@
addSampleDia: false,
count: 1,
productList: [],
+ productList0: [],
bsm1DiaList: [],
productIds: [],
getProductLoad: false,
@@ -899,8 +923,11 @@
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,
circulateShow:false,
- circulateForm:{}
+ circulateForm:{},
+ isBsm2Val2:false
}
},
watch: {
@@ -975,6 +1002,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 = []
@@ -1134,18 +1183,36 @@
})
}else if(type==1){
let arr = this.editTable.filter(b => b.sampleId == item.id)
- arr.forEach(f => {
- if(a.ask.includes(f.symbolItem)){
- let ask = calBack(a.ask, f.symbolItem,f.value)
- if (ask) {
- a.ask = ask
+ for (var i=0;i<arr.length;i++){
+ if(a.ask){
+ if(a.ask.includes(arr[i].symbolItem)){
+ let ask = calBack(a.ask, arr[i].symbolItem,arr[i].value)
+ if (ask) {
+ a.ask = ask
+ }
+ let tell = this.handleTell(a.tell, arr[i].symbolItem,arr[i].value)
+ if (tell) {
+ a.tell = tell
+ }
}
- let tell = this.handleTell(a.tell, f.symbolItem,f.value)
- if (tell) {
- a.tell = tell
- }
+ }else{
+ this.$message.error('瑕佹眰鍊间负绌猴紝闇�瑕佸幓鏍囧噯搴撶淮鎶わ紒')
}
- })
+ }
+ // arr.forEach(f => {
+ // if(a.ask){
+ // if(a.ask.includes(f.symbolItem)){
+ // let ask = calBack(a.ask, f.symbolItem,f.value)
+ // if (ask) {
+ // a.ask = ask
+ // }
+ // let tell = this.handleTell(a.tell, f.symbolItem,f.value)
+ // if (tell) {
+ // a.tell = tell
+ // }
+ // }
+ // }else{}
+ // })
}
}
})
@@ -1330,7 +1397,8 @@
this.$axios.post(this.$api.insOrder.upInsOrderOfState, {
state,
id: this.currentId,
- companyId:this.addObj.companyId
+ companyId:this.addObj.companyId,
+ laboratory:this.addObj.laboratory
}, {
headers: {
'Content-Type': 'application/json'
@@ -1601,17 +1669,17 @@
} else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) {
row.bsm1 = false
}
- if (row.bsm === '1' && row.inspectionItem === '鐔旀帴鎹熻��' && this.sampleList.length > 1 && row.state === 1) {
+ if (row.bsm === '1' && row.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && this.sampleList.length > 1 && row.state === 1&&!this.isBsm2Val2) {
+ this.bsm2 = true
+ this.bsm1Dia = true
if (this.bsm2Val2.length === 0) {
this.bsm2Val = (this.sampleList.length - 1) * this.sampleList.length / 2
this.computationalPairing(this.sampleList.length)
this.bsm2Val2 = this.HaveJson(this.bsm2Val3)
- this.bsm2 = true
- this.bsm1Dia = true
}
- } else if (row.bsm === '1' && row.inspectionItem === '鐔旀帴鎹熻��' && row.state === 1 && this.sampleList.length > 1) {
+ } else if (row.bsm === '1' && row.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && row.state === 1 && this.sampleList.length > 1) {
this.bsm2 = false
- } else if (row.bsm === '1' && row.inspectionItem === '鐔旀帴鎹熻��' && this.sampleList.length < 2) {
+ } else if (row.bsm === '1' && row.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && this.sampleList.length < 2) {
this.$message.error('鏍峰搧鏁伴噺涓嶈冻澶熻繘琛岄厤瀵规搷浣�')
row.state = row.state == 1 ? 0 : 1
this.$refs.productTable.toggleRowSelection(row, false)
@@ -1796,6 +1864,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 => {
@@ -1887,7 +1956,7 @@
} else if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 0) {
p.bsm1 = false
}
- if (p.bsm === '1' && p.inspectionItem === '鐔旀帴鎹熻��' && this.sampleList.length > 1 && p.state === 1) {
+ if (p.bsm === '1' && p.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && this.sampleList.length > 1 && p.state === 1&&!this.isBsm2Val2) {
this.bsm2 = true
this.bsm1Dia = true
if (this.bsm2Val2.length === 0) {
@@ -1895,9 +1964,9 @@
this.computationalPairing(this.sampleList.length)
this.bsm2Val2 = this.HaveJson(this.bsm2Val3)
}
- } else if (p.bsm === '1' && p.inspectionItem === '鐔旀帴鎹熻��' && p.state === 1 && this.sampleList.length > 1) {
+ } else if (p.bsm === '1' && p.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && p.state === 1 && this.sampleList.length > 1) {
this.bsm2 = false
- } else if (p.bsm === '1' && p.inspectionItem === '鐔旀帴鎹熻��' && this.sampleList.length < 2) {
+ } else if (p.bsm === '1' && p.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && this.sampleList.length < 2) {
this.$message.error('鏍峰搧鏁伴噺涓嶈冻澶熻繘琛岄厤瀵规搷浣�')
this.$refs.productTable.clearSelection()
return
@@ -2140,6 +2209,7 @@
return
}
}
+ this.isBsm2Val2 = true;
}
// if(this.bsm3){
// if(!this.bsm3Val){
--
Gitblit v1.9.3