From fdfc2c66434bdacdd539f228b51a33c8d15e71d5 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期六, 20 四月 2024 12:32:15 +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