fix: 抽取wprList
This commit is contained in:
parent
1d19527864
commit
8aa32be6dd
|
@ -24,7 +24,7 @@
|
|||
></el-button>
|
||||
</template>
|
||||
<template #default>
|
||||
<scTable ref="wprTable" id="wprTable" :data="wprList" hidePagination hideDo>
|
||||
<el-table ref="wprTable" id="wprTable" :data="wprList" :height="wprTableHeight" border highlight-current-row>
|
||||
<el-table-column label="产品编号" prop="number" min-width="100px" ></el-table-column>
|
||||
<el-table-column label="对外编号" prop="number_out" min-width="100px"
|
||||
v-if="mgroupName=='成品内外初检'||mgroupName=='成品内质复检'||mgroupName=='成品性能检测'||mgroupName=='成品尺寸检测'||mgroupName=='成品外观复检一'||mgroupName=='成品外观复检二'"
|
||||
|
@ -57,7 +57,7 @@
|
|||
<el-button @click="printMaterial(scope.row)" type="primary">打印标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-drawer>
|
||||
<el-dialog title="二维码" v-model="showQrCode" width="500px">
|
||||
|
@ -122,17 +122,22 @@ export default {
|
|||
scQr_code:'',
|
||||
wprList:[],
|
||||
digitNum:3,
|
||||
wprTableHeight: 500,
|
||||
wprTableHeight:500,
|
||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
open(mode) {
|
||||
let that = this;
|
||||
this.mode = mode;
|
||||
this.params.wm = this.wm;
|
||||
this.visible = true;
|
||||
this.getRowWpr();
|
||||
that.$nextTick(() => {
|
||||
let heights = document.getElementsByClassName("el-drawer__body")[0].clientHeight;
|
||||
that.wprTableHeight = heights-20;
|
||||
})
|
||||
return this;
|
||||
},
|
||||
getRowWpr(){
|
||||
|
@ -232,11 +237,11 @@ export default {
|
|||
let that = this;
|
||||
that.wprList.forEach((item,index)=>{
|
||||
if(item.number.indexOf(that.search) > -1){
|
||||
that.$refs.wprTable.setCurrentRow(item);
|
||||
let rows = document.querySelectorAll("#wprTable .el-table__row");
|
||||
console.log('rows',rows)
|
||||
let row = rows[index];
|
||||
let rowTop = row.offsetTop;
|
||||
this.$refs.wprTable.scrollTo({ top: rowTop });
|
||||
that.$refs.wprTable.scrollTo({ top: rowTop });
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue