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