From cea197ee03add9a3279bc65d005f4f56fdab43e0 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 20 三月 2024 09:37:33 +0800
Subject: [PATCH] #
---
pages/print/print.vue | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/pages/print/print.vue b/pages/print/print.vue
index 0eb7d08..7eace59 100644
--- a/pages/print/print.vue
+++ b/pages/print/print.vue
@@ -24,6 +24,9 @@
</table>
</view>
</view>
+ <view>
+ <button @click="toPrint">鎵撳嵃</button>
+ </view>
</view>
</template>
@@ -61,13 +64,34 @@
let that = this
const eventChannel = this.getOpenerEventChannel();
eventChannel.on('data', function(data) {
- console.log(data.data);
that.mat = data.data
that.qrFun(that.mat.matnr)
})
},
methods: {
+ // 鎵撳嵃
+ toPrint() {
+ let that = this
+ uni.navigateTo({
+ url: "../print/printUNI",
+ success: function(res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
+ res.eventChannel.emit('data1', {
+ data: that.mat,
+ time: that.time
+ })
+ },
+ events: {
+ // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
+ acceptDataFromOpenedPage: function(data) {
+ that.matnr = data.data
+ },
+ },
+
+
+ });
+ },
//**鐢熸垚浜岀淮鐮�**//
qrFun(text) {
this.qrShow = true
--
Gitblit v1.9.1