Browse Source

修改货架打印

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

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

@ -3,33 +3,33 @@
<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 >-->
<el-cascader <el-cascader
:options="optioner" :options="optioner"
style="width: 80%" style="width: 80%"
v-model="query.goodsAreaInfo" v-model="query.goodsAreaInfo"
placeholder="请选择货区" placeholder="请选择货区"
:show-all-levels="false" :show-all-levels="false"
clearable clearable
/> />
<!-- </el-cascader>--> <!-- </el-cascader>-->
</el-form-item> </el-form-item>
<el-form-item label="货架名称" prop="info"> <el-form-item label="货架名称" prop="info">
<el-input v-model="query.goodsShelfName" placeholder="请输入货架名称" /> <el-input v-model="query.goodsShelfName" placeholder="请输入货架名称" />
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
<el-button type="primary" icon="el-icon-search" @click="searchChange" <el-button type="primary" icon="el-icon-search" @click="searchChange"
> </el-button > </el-button
> >
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button> <el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -38,7 +38,7 @@
</el-row> </el-row>
<el-row> <el-row>
<div class="avue-crud__header"> <div class="avue-crud__header">
<!-- 头部左侧按钮模块 --> <!-- 头部左侧按钮模块 -->
<div class="avue-crud__left"> <div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button> <el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain <el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain
@ -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,23 +1363,29 @@ export default {
this.$message.warning('请选择至少一条数据'); this.$message.warning('请选择至少一条数据');
return; return;
} }
getPrintTemplate(this.ids).then(res => {
let templateData = res.data.data;
// let templateData = "res.data.data";
console.log(templateData);
LODOP.PRINT_INITA('测试预览功能');
// LODOP.PRINT_INITA("");
// LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A4');
LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Deli DL-888T');
LODOP.SET_PRINT_PAGESIZE(2, '210mm', '50mm', '');
LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1);
// // const nodeList = document.querySelectorAll('.printNode > div');
LODOP.SET_PRINT_MODE('WINDOW_DEFPAGESIZE', 1);
// // datahtml // getPrintTemplate(this.ids).then(res => {
LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', templateData); // let templateData = res.data.data;
LODOP.PREVIEW(); //() // let templateData = "res.data.data";
// console.log(templateData);
LODOP.PRINT_INITA('测试预览功能');
// LODOP.PRINT_INITA("");
// LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A4');
LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Deli DL-888T');
LODOP.SET_PRINT_PAGESIZE(2, '210mm', '50mm', '');
LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1);
// //
LODOP.SET_PRINT_MODE('WINDOW_DEFPAGESIZE', 1);
// // datahtml
nodeList.forEach(val => {
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