From 238de511e070c23bfd87a24f33da5c507875a259 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期二, 02 七月 2024 09:53:23 +0800 Subject: [PATCH] 正式库lucksheet 优化 --- src/components/do/b1-ins-order/add.vue | 109 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 94 insertions(+), 15 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 7836aad..43b5833 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> @@ -712,16 +734,39 @@ </el-row> </span> </el-dialog> + <el-dialog title="娓╁害寰幆瑕佹眰濉啓" :visible.sync="circulateShow" width="800px" :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.entrustCode" size="small" placeholder=""></el-input> + </div> + </div> + <div class="search_thing"> + <div class="search_label">寰幆娆℃暟锛�</div> + <div class="search_input"> + <el-input v-model="circulateForm.entrustCode" size="small" placeholder=""></el-input> + </div> + </div> + <div class="search_thing"> + <div class="search_label">娓╁害鐐癸細</div> + <div class="search_input"> + <el-input v-model="circulateForm.entrustCode" size="small" placeholder=""></el-input> + </div> + </div> + </div> + </el-dialog> </div> </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 +871,7 @@ addSampleDia: false, count: 1, productList: [], + productList0: [], bsm1DiaList: [], productIds: [], getProductLoad: false, @@ -877,6 +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:{}, + isBsm2Val2:false } }, watch: { @@ -951,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 = [] @@ -1306,7 +1379,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' @@ -1565,7 +1639,6 @@ this.$refs.productTable.toggleRowSelection(row, true); }, upProductSelect(selection, row) { - console.log('danxuan', row) this.bsm1DiaList = [] row.state = row.state == 1 ? 0 : 1 if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) { @@ -1578,7 +1651,7 @@ } 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) { @@ -1586,9 +1659,9 @@ this.computationalPairing(this.sampleList.length) this.bsm2Val2 = this.HaveJson(this.bsm2Val3) } - } 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) @@ -1614,6 +1687,10 @@ } return item }) + if (row.inspectionItem === '娓╁害寰幆') { + this.circulateShow = true; + return + } this.getProNum() }, permute(nums) { @@ -1769,6 +1846,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 => { @@ -1860,7 +1938,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) { @@ -1868,9 +1946,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 @@ -2113,6 +2191,7 @@ return } } + this.isBsm2Val2 = true; } // if(this.bsm3){ // if(!this.bsm3Val){ -- Gitblit v1.9.3