From d7b4cbde92aa4a6f6e68ae755f1c04477ca2127d Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期三, 31 七月 2024 17:57:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/components/do/b1-ins-order/add.vue | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 650f2f4..328cd5b 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -164,7 +164,8 @@ </el-col> </el-row> </div> - <div class="search" v-show="!configShow&&!equipConfigShow&&!cableConfigShow"> + <div style="height: (100vh - 200px);"> + <div class="search" v-show="!configShow&&!equipConfigShow&&!cableConfigShow"> <el-row> <el-col class="search_thing" :span="6"> <div class="search_label">濮旀墭缂栧彿锛�</div> @@ -428,9 +429,9 @@ <el-table-column prop="proNum" label="寰呮椤规暟閲�" width="105" align="center"></el-table-column> </el-table> <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border - @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" + @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" :row-key="rowKey" :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll"> - <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column> + <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1" :reserve-selection="true"></el-table-column> <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip> <template slot="header" slot-scope="scope"> <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px"> @@ -511,6 +512,7 @@ </template> </el-table-column> </el-table> + </div> </div> <el-dialog title="閫夋嫨鍗曚綅" :visible.sync="selectUserDia" width="70%"> <div class="body" style="height: 60vh;" v-if="selectUserDia"> @@ -1073,7 +1075,8 @@ temperatureTestNum: '', isShowInput: false, temId: '', - sonLaboratoryList:[] + sonLaboratoryList:[], + selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃 } }, watch: { @@ -1362,6 +1365,14 @@ this.temperatureData = this.temperatureData.slice(0,-deleteNum) } }, + changeProductList0(){ + this.productList0.forEach(a=>{ + let obj = this.productList.find(m => m.id == a.id) + if(obj){ + a.state = obj.state + } + }) + }, searchFilterList () { const vtw = { inspectionItem: this.inspectionItem, // 妫�楠岄」 @@ -1371,6 +1382,7 @@ const isHaveValue = Object.values(vtw).some(item => { return item }) + this.changeProductList0() if (isHaveValue) { for(let i in vtw) { if (vtw[i]) { @@ -1379,9 +1391,19 @@ }) } } + this.$nextTick(()=>{ + this.productList.forEach(a => { + if (a.state == 1) this.toggleSelection(a) + }) + }) } else { // 娌℃湁鏌ヨ鏉′欢鏃舵覆鏌撴墍鏈夋暟鎹� this.productList = this.productList0 + this.$nextTick(()=>{ + this.productList.forEach(a => { + if (a.state == 1) this.toggleSelection(a) + }) + }) } }, getAuthorizedPerson() { @@ -2030,6 +2052,9 @@ }) this.$refs.sampleTable.doLayout() }, + rowKey (row) { + return row.id; + }, selectProduct(val) { this.productListSelected = val this.productIds = [] @@ -2063,6 +2088,9 @@ upProductSelect(selection, row) { this.bsm1DiaList = [] row.state = row.state == 1 ? 0 : 1 + if(row.section === null) { + row.section = "" + } let arr = this.productList.filter(m=>m.state==1&&row.section.includes(m.section)&&m.ask&&m.section.indexOf('[')==-1) if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1&&arr.length==0) { if (row.section.indexOf('[') > -1) { @@ -2074,6 +2102,7 @@ } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0&&arr.length==0) { row.bsm1 = false }else if(arr.length>0){ + try{ row.bsmRow = this.HaveJson(row) let section = arr[0].section let arr0 = JSON.parse(row.section) @@ -2087,6 +2116,7 @@ row.manHour = arr2[index] row.price = arr3[index] row.tell = arr4[index] + } catch(e) {} } if (row.bsm === '1' && row.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && this.sampleList.length > 1 && row.state === 1&&!this.isBsm2Val2) { this.bsm2 = true @@ -2125,7 +2155,7 @@ return item }) const select = this.selectTree.split(' - ') - if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 1) { + if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 1&&this.isAskOnlyRead) { this.circulateShow = true; return } else if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 0) { @@ -2141,6 +2171,8 @@ } else if ((row.inspectionItem === '娓╁崌璇曢獙' || row.inspectionItem === '鐑惊鐜�') && row.state === 0) { this.temperatureShow = false; } + this.changeProductList0() + this.currentMethod.insProduct = this.productList0 this.getProNum() }, searchProject () { @@ -2428,7 +2460,7 @@ return } const select = this.selectTree.split(' - ') - if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 1) { + if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 1&&this.isAskOnlyRead) { this.circulateShow = true; return } else if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 0) { @@ -2473,6 +2505,8 @@ return item }) } + this.changeProductList0() + this.currentMethod.insProduct = this.productList0 this.getProNum() this.$nextTick(() => { this.$refs.productTable.doLayout() -- Gitblit v1.9.3