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 +}