From 27a02ecc7c2b4c141e7a475589bcd259fbdcee2f Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Thu, 9 May 2024 11:54:00 +0800 Subject: [PATCH] =?UTF-8?q?MES=E2=80=94=E2=80=94>=20=E5=A2=9E=E5=8A=A0SOP?= =?UTF-8?q?=E9=A2=84=E8=A7=88PDF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/workScheduling/workScheduling.vue | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/pages/mes/workScheduling/workScheduling.vue b/src/pages/mes/workScheduling/workScheduling.vue index 547aa8b..7028151 100644 --- a/src/pages/mes/workScheduling/workScheduling.vue +++ b/src/pages/mes/workScheduling/workScheduling.vue @@ -69,6 +69,9 @@ 报工 完工 + + SOP + @@ -333,6 +336,31 @@ function addBasicItem(item){ const objString = JSON.stringify(item); proxy.$tab.navigateTo(`/pages/mes/workScheduling/addBasicItem/index?obj=${encodeURIComponent(objString)}`) } +//SOP文件预览 +function SOP(item){ + //#ifndef H5 + console.log('H5:'+item.planMasterCode) + //#endif + + //#ifndef APP-PLUS + console.log('APP-PLUS:'+item.planMasterCode) + uni.downloadFile({ + url: 'http://dev.ccwin-in.com:25310/admin-api/infra/file/0/show/4488ed218c1365755c97c18fcf576cf281eff8c81d052ea289b3ceea1eaf89d7.pdf', + // url: 'http://storage.xuetangx.com/public_assets/xuetangx/PDF/PlayerAPI_v1.0.6.pdf', + success: function (res) { + var filePath = res.tempFilePath; + uni.openDocument({ + filePath: filePath, + fileType: 'pdf', + showMenu: true, + success: function (res) { + console.log('打开文档成功'); + } + }); + } + }); + //#endif +}