Browse Source

修改货架打印

dev-xx
qb 1 year ago
parent
commit
b4cc60637b
  1. 38
      src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue

38
src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue

@ -3,11 +3,11 @@
<div class="avue-crud">
<el-row v-if="!search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" style='width:100%'>
<el-form :inline="true" :model="query" style="width: 100%">
<!-- 查询按钮 -->
<el-form-item class='el-lo'>
<el-row style='width:100%'>
<el-col class='el-ls'>
<el-form-item class="el-lo">
<el-row style="width: 100%">
<el-col class="el-ls">
<div>
<el-form-item label="货区:" prop="info">
<!-- <el-cascader :options="optioner" :show-all-levels="false" clearable >-->
@ -338,7 +338,13 @@
</template>
</el-dialog>
<el-dialog title="二维码" :visible.sync="dialogVisible" width="600px" v-model="dialogVisible">
<el-dialog
title="二维码"
class="printDialog"
:visible.sync="dialogVisible"
width="600px"
v-model="dialogVisible"
>
<div>
<!-- <div v-for="(item,index) in qrCodeObj" class="pdf-dom">-->
<!-- <el-divider></el-divider>-->
@ -350,7 +356,7 @@
<!-- </el-row>-->
<!-- </div>-->
<!--startprint1-->
<div v-html="html"></div>
<div class="printNode" v-html="html"></div>
<!--endprint1-->
</div>
<span slot="footer" class="dialog-footer">
@ -1357,10 +1363,13 @@ export default {
this.$message.warning('请选择至少一条数据');
return;
}
getPrintTemplate(this.ids).then(res => {
let templateData = res.data.data;
const nodeList = document.querySelectorAll('.printNode > div');
// getPrintTemplate(this.ids).then(res => {
// let templateData = res.data.data;
// let templateData = "res.data.data";
console.log(templateData);
// console.log(templateData);
LODOP.PRINT_INITA('测试预览功能');
// LODOP.PRINT_INITA("");
// LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A4');
@ -1371,9 +1380,12 @@ export default {
// //
LODOP.SET_PRINT_MODE('WINDOW_DEFPAGESIZE', 1);
// // datahtml
LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', templateData);
LODOP.PREVIEW(); //()
nodeList.forEach(val => {
LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', val.innerHTML);
LODOP.NewPage();
});
LODOP.PREVIEW(); //()
// });
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
@ -1479,17 +1491,15 @@ export default {
},
};
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
/*.el-cascader__dropdown .el-cascader-menu:first-child .el-cascader-node label{*/
/* display:none;*/
/*}*/
.el-lo {
width: 100%;
}
.el-ls {
display: flex;
justify-content: space-between;
}
</style>

Loading…
Cancel
Save