From bd1ac66da57267b6a244016fec355a6408e735d9 Mon Sep 17 00:00:00 2001
From: 叶松 <2217086471@qq.com>
Date: 星期三, 29 十一月 2023 16:11:54 +0800
Subject: [PATCH] 增加打印功能
---
web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue b/web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue
index d41604e..b7b1952 100644
--- a/web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue
+++ b/web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue
@@ -22,6 +22,7 @@
<div class="main_item_header">
<div class="main_item_title">项目名称:</div>
<div class="main_item_datas">{{item.proName}}</div>
+ <el-button class="table_btn" style="margin-right:15px" size="mini" v-if="showButton('print')" @click="printProp(item)">打印</el-button>
</div>
<div class="main_item_contents">
<div class="main_item_left">
@@ -73,7 +74,7 @@
@current-change="changePageNum"
@size-change="changePageSize"
:current-page="pageNum"
- :page-sizes="[9, 18, 45, 90]"
+ :page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
@@ -126,6 +127,17 @@
that.searchButtonInfo(true)
},
methods: {
+ //打印按钮
+ printProp(item){
+ this.gopPrints(item.produceNumber)
+ },
+ //执行去打印
+ gopPrints(numbers){
+ const link = document.createElement('a');
+ link.id = `link`;
+ link.href = `printpipe://5,${numbers}`
+ link.click()
+ },
//改变项目
changeProjects(){
this.searchButtonInfo(true)
@@ -220,14 +232,14 @@
.main_items{
// width: 100%;
// max-width: calc(100%/3 - 25px);
- width: 512px;
- height: 300px;
+ width: 645px;
+ height: 378px;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
background-color: #031A46;
- margin: 30px 20px 5px 5px;
+ margin: 30px 50px 5px 5px;
box-shadow:0px 12px 5px 0px #0C4F79;
.main_item_header{
--
Gitblit v1.9.3