Browse Source

修改货架打印

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

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

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

Loading…
Cancel
Save