From c2b0842300d43cbf05619d919aa4323a855d9cfc Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Wed, 24 Apr 2024 15:12:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/technology/proroute.js | 12 +++++++++ src/views/mes/reportWork/index.vue | 34 ++++++++++++++++++++++++- src/views/technology/proroute/index.vue | 31 ++++++++++++++++++++-- 3 files changed, 74 insertions(+), 3 deletions(-) diff --git a/src/api/technology/proroute.js b/src/api/technology/proroute.js index 4f222501..18995d4c 100644 --- a/src/api/technology/proroute.js +++ b/src/api/technology/proroute.js @@ -59,3 +59,15 @@ export function syncSAP() { method: 'post' }); } + +//同步制定产品的sap工艺 +export function syncProductSAP(productCodes) { + const data = { + productCodes + } + return request({ + url: '/technology/pro/proroute/syncProductSAP', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/views/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue index aa75b327..7300f6a3 100644 --- a/src/views/mes/reportWork/index.vue +++ b/src/views/mes/reportWork/index.vue @@ -582,7 +582,7 @@ + :data="printData.workTable" border style="width: 100%" :summary-method="getRKSummaries" show-summary> @@ -1598,6 +1598,38 @@ export default { item.remark = remark; }); }, + getRKSummaries(param) { + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = ""; + return; + } + const values = data.map((item) => Number(item[column.property])); + if (!values.every((value) => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + sums[index] += ""; + if (sums[index] > 1000000) { + sums[index] = ""; + } + } else{ + sums[index] = ""; //N/A + } + if(column.label == "批次"){ + sums[index] = "合计"; + } + }); + + return sums; + }, }, }; diff --git a/src/views/technology/proroute/index.vue b/src/views/technology/proroute/index.vue index 548e0612..21cfc379 100644 --- a/src/views/technology/proroute/index.vue +++ b/src/views/technology/proroute/index.vue @@ -102,6 +102,18 @@ v-hasPermi="['mes:pro:proroute:import']" >批量上传附件 + + 同步物料工艺 + + @@ -116,7 +128,9 @@ >{{scope.row.routeCode}} - + @@ -327,7 +341,7 @@