From 1ba245c2c69e7a70d44c950bb15bf92dcfaabdc5 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 07 八月 2025 16:40:36 +0800
Subject: [PATCH] 生产终止功能添加,添加相关代码,补充报工删除代码
---
north-glass-erp/northglass-erp/src/lang/en.js | 5 +++++
north-glass-erp/northglass-erp/src/lang/ar.js | 5 +++++
north-glass-erp/northglass-erp/src/lang/ru.js | 5 +++++
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue | 4 ++--
north-glass-erp/src/main/resources/mapper/pp/Report.xml | 16 ++++++++--------
north-glass-erp/northglass-erp/src/lang/zh.js | 1 +
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java | 12 ++++++------
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java | 2 +-
north-glass-erp/northglass-erp/src/lang/kr.js | 5 +++++
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 3 ++-
10 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/lang/ar.js b/north-glass-erp/northglass-erp/src/lang/ar.js
index cfe584a..edec0a6 100644
--- a/north-glass-erp/northglass-erp/src/lang/ar.js
+++ b/north-glass-erp/northglass-erp/src/lang/ar.js
@@ -533,6 +533,11 @@
addFlowCardMsg2:'璇烽�夋嫨鏈垎鏋惰鍗曟墦鍗�',
okFlowCard:'宸插垎鏋�',
noFlowCard:'鏈垎鏋�',
+ mainWidth:'瀹介珮',
+ mainHeight:'楂樺',
+ terminationQuantity:'鐢熶骇缁堟鏁伴噺',
+ terminationMsg:'璇疯緭鍏ユ纭殑鍙慨鏀规暟閲�',
+ maxCompleted:'鏈�澶у凡瀹屽伐鏁伴噺',
},
reportingWorks:{
page:{
diff --git a/north-glass-erp/northglass-erp/src/lang/en.js b/north-glass-erp/northglass-erp/src/lang/en.js
index c7eb807..ab10272 100644
--- a/north-glass-erp/northglass-erp/src/lang/en.js
+++ b/north-glass-erp/northglass-erp/src/lang/en.js
@@ -535,6 +535,11 @@
addFlowCardMsg2:'璇烽�夋嫨鏈垎鏋惰鍗曟墦鍗�',
okFlowCard:'宸插垎鏋�',
noFlowCard:'鏈垎鏋�',
+ mainWidth:'瀹介珮',
+ mainHeight:'楂樺',
+ terminationQuantity:'鐢熶骇缁堟鏁伴噺',
+ terminationMsg:'璇疯緭鍏ユ纭殑鍙慨鏀规暟閲�',
+ maxCompleted:'鏈�澶у凡瀹屽伐鏁伴噺',
},
reportingWorks:{
page:{
diff --git a/north-glass-erp/northglass-erp/src/lang/kr.js b/north-glass-erp/northglass-erp/src/lang/kr.js
index dea1a11..16f6eff 100644
--- a/north-glass-erp/northglass-erp/src/lang/kr.js
+++ b/north-glass-erp/northglass-erp/src/lang/kr.js
@@ -542,6 +542,11 @@
addFlowCardMsg2:'璇烽�夋嫨鏈垎鏋惰鍗曟墦鍗�',
okFlowCard:'宸插垎鏋�',
noFlowCard:'鏈垎鏋�',
+ mainWidth:'瀹介珮',
+ mainHeight:'楂樺',
+ terminationQuantity:'鐢熶骇缁堟鏁伴噺',
+ terminationMsg:'璇疯緭鍏ユ纭殑鍙慨鏀规暟閲�',
+ maxCompleted:'鏈�澶у凡瀹屽伐鏁伴噺',
},
reportingWorks:{
page:{
diff --git a/north-glass-erp/northglass-erp/src/lang/ru.js b/north-glass-erp/northglass-erp/src/lang/ru.js
index 6212b3d..70e6306 100644
--- a/north-glass-erp/northglass-erp/src/lang/ru.js
+++ b/north-glass-erp/northglass-erp/src/lang/ru.js
@@ -531,6 +531,11 @@
addFlowCardMsg2:'璇烽�夋嫨鏈垎鏋惰鍗曟墦鍗�',
okFlowCard:'宸插垎鏋�',
noFlowCard:'鏈垎鏋�',
+ mainWidth:'瀹介珮',
+ mainHeight:'楂樺',
+ terminationQuantity:'鐢熶骇缁堟鏁伴噺',
+ terminationMsg:'璇疯緭鍏ユ纭殑鍙慨鏀规暟閲�',
+ maxCompleted:'鏈�澶у凡瀹屽伐鏁伴噺',
},
reportingWorks:{
page:{
diff --git a/north-glass-erp/northglass-erp/src/lang/zh.js b/north-glass-erp/northglass-erp/src/lang/zh.js
index e2d93ec..b30c6ce 100644
--- a/north-glass-erp/northglass-erp/src/lang/zh.js
+++ b/north-glass-erp/northglass-erp/src/lang/zh.js
@@ -547,6 +547,7 @@
mainHeight:'楂樺',
terminationQuantity:'鐢熶骇缁堟鏁伴噺',
terminationMsg:'璇疯緭鍏ユ纭殑鍙慨鏀规暟閲�',
+ maxCompleted:'鏈�澶у凡瀹屽伐鏁伴噺',
},
reportingWorks:{
page:{
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
index bf78e21..7c2486a 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
@@ -129,14 +129,13 @@
completed.value=res.data.data
completedOk.value = row.quantity*1 - completed.value*1
//寮圭獥
- ElMessageBox.prompt( '鏈�澶у凡瀹屽伐鏁伴噺锛�'+completed.value, {
+ ElMessageBox.prompt( t('processCard.maxCompleted')+completed.value, {
confirmButtonText: t('basicData.save'),
cancelButtonText: t('basicData.cancelButtonText'),
inputPattern:/^(\d+|)$/,
inputErrorMessage: t('processCard.terminationMsg'),
inputValue:row.quantity
}).then(({ value }) => {
- console.log(completedOk.value, value)
if (completedOk.value < value ) {
ElMessage.warning(t('processCard.terminationMsg'))
return
@@ -244,6 +243,7 @@
{field: 'order_number', title: t('order.OrderNum') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },width: 100},
{field: 'technology_number', title: t('processCard.technologyNumber') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },width: 100},
{field: 'quantity', title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 80},
+ {field: 'termination_quantity', title: t('processCard.terminationQuantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 80},
{field: 'child_width', title: t('order.width'),width: 80 },
{field: 'child_height', title: t('order.height'),width: 80 },
{field: 'area', title: t('order.area') ,showOverflow:"ellipsis",width: 70},
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java
index 2123a09..4f46d27 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java
@@ -20,7 +20,7 @@
List<Map<String,String>> filterOrderProcess(String orderId);
- List<Map<String,Integer>> getGlassLRow(String orderId);
+ List<Map<String,Object>> getGlassLRow(String orderId);
List<Map<String, String>> filterLastProcess(String orderId, String orderNumber, String technologyNumber,String id);
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
index 15d7608..53f6dca 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -165,15 +165,15 @@
}
- List<Map<String, Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
+ List<Map<String, Object>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
List<Map<String, Integer>> rowCount = new ArrayList<>();
columns.forEach(col -> {
getRowCount.forEach(row -> {
Map<String, Integer> getRow = new HashMap<>();
// { row: 0, col: 1, rowspan: 3, colspan: 0},
- getRow.put("row", row.get("RowNum"));
+ getRow.put("row", ((Number) row.get("RowNum")).intValue());
getRow.put("col", col);
- getRow.put("rowspan", row.get("rowCount"));
+ getRow.put("rowspan", ((Number) row.get("rowCount")).intValue());
getRow.put("colspan", 0);
rowCount.add(getRow);
});
@@ -389,15 +389,15 @@
map.put("title", uniqueList);
- List<Map<String, Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
+ List<Map<String, Object>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
List<Map<String, Integer>> rowCount = new ArrayList<>();
columns.forEach(col -> {
getRowCount.forEach(row -> {
Map<String, Integer> getRow = new HashMap<>();
// { row: 0, col: 1, rowspan: 3, colspan: 0},
- getRow.put("row", row.get("RowNum"));
+ getRow.put("row", ((Number) row.get("RowNum")).intValue());
getRow.put("col", col);
- getRow.put("rowspan", row.get("rowCount"));
+ getRow.put("rowspan", ((Number) row.get("rowCount")).intValue());
getRow.put("colspan", 0);
rowCount.add(getRow);
});
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index 8696b28..44696eb 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -484,7 +484,8 @@
fc.founder,
date(fc.splitFrame_time) as splitFrame_time,
ogd.process,
- c.concatNumber
+ c.concatNumber,
+ ifnull(fc.termination_quantity,0) as termination_quantity
from flow_card as fc
left join sd.order_glass_detail as ogd
on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index dd59044..f990b5a 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -174,18 +174,18 @@
c.technology_number,
b.child_width,
b.child_height,
- if(c.technology_number=1,c.quantity,0) as quantity,
+ if(c.technology_number=1,c.quantity-ifnull(c.termination_quantity,0),0) as quantity,
- c.quantity as thisQuantity,/*鐢ㄤ簬鍒ゆ柇鏄惁鏀瑰彉棰滆壊*/
+ c.quantity-ifnull(c.termination_quantity,0) as thisQuantity,/*鐢ㄤ簬鍒ゆ柇鏄惁鏀瑰彉棰滆壊*/
e.reportWorkQuantity,
e.reportWorkQuantityShow,
e.reportWorkQuantityCount,
e.reportWorkTime,
e.broken_num,
- c.quantity as glassQuantity,
+ c.quantity-ifnull(c.termination_quantity,0) as glassQuantity,
- c.quantity as quantityShow,
- c.quantity*a.area as grossAreaShow,
+ c.quantity-ifnull(c.termination_quantity,0) as quantityShow,
+ (c.quantity-ifnull(c.termination_quantity,0))*a.area as grossAreaShow,
ifnull(f.inventory, 0) as inventoryShow,
round(ifnull(f.inventory, 0) * a.area, 2) as inventoryAreaShow,
ifnull(dd.quantity, 0) as shippedQuantityShow,
@@ -244,7 +244,7 @@
on e.process_id = c.process_id
and e.technology_number = c.technology_number
and e.order_number = c.order_number
- where a.order_id = #{orderId} and d.create_order>0
+ where a.order_id = #{orderId} and d.create_order>0 and c.quantity-ifnull(c.termination_quantity,0)>0
group by c.order_number,
c.technology_number,
c.process_id
@@ -819,7 +819,7 @@
a.product_name,
b.child_width,
b.child_height,
- c.quantity,
+ c.quantity - ifnull(c.termination_quantity,0) as quantity,
c.technology_number,
b.glass_child,
ifnull(e.reportWorkQuantity, 0) as reportWorkQuantity,
@@ -862,7 +862,7 @@
and e.order_number=c.order_number
and e.technology_number = c.technology_number
left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number
- where a.order_id = #{orderId} and d.create_order>0
+ where a.order_id = #{orderId} and d.create_order>0 and c.quantity - ifnull(c.termination_quantity,0)>0
group by c.order_number,c.technology_number
ORDER BY a.order_number
</select>
--
Gitblit v1.8.0