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 @@