From 715fe1303217170d7597d0a24cfc1caafac8db54 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期二, 28 十月 2025 22:39:26 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue | 45 ++++++++++++++++++++++
north-glass-erp/src/main/resources/mapper/pp/Report.xml | 29 ++++++++++++--
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 3 +
3 files changed, 72 insertions(+), 5 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index c1b4cf3..72fc670 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -1125,10 +1125,11 @@
}
}).catch(err =>{
ElMessage.error(t('basicData.msg.ServerConnectionError'))
+ gridOptions.loading=false
}).finally(()=>{
-
gridOptions.toolbarConfig.buttons[0].disabled=false
gridOptions.toolbarConfig.buttons[1].disabled=false
+ gridOptions.loading=false
})
}
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
index c976809..10c0027 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
@@ -693,6 +693,50 @@
}
}
+//澶嶉�夋瑙﹀彂浜嬩欢
+const handleCheckboxChange = ({ records, checked, row }) => {
+ const $grid = xGrid.value;
+ if (!$grid) return;
+
+ // 鑾峰彇褰撳墠鎵�鏈夐�変腑鐨勮锛堣繑鍥炴暟缁勶級
+ const allCheckedRows = $grid.getCheckboxRecords();
+ // 鑾峰彇琛ㄦ牸鎵�鏈夋暟鎹紙visibleData 鏄綋鍓嶅彲瑙佹暟鎹紝fullData 鏄叏閮ㄦ暟鎹紝鏍规嵁闇�姹傞�夋嫨锛�
+ const tableData = $grid.getTableData().visibleData;
+ // 鎸夌鍙峰垎缁�
+ const boxNoGroup = groupByBoxNo(tableData);
+ // 褰撳墠琛岀殑绠卞彿
+ const currentBoxNo = row.finishedGoodsInventory?.boxNo || '';
+
+ // 閫変腑閫昏緫锛氬鏋滄槸鈥滈�変腑鈥濇搷浣滐紝鍚岀鍙风殑琛屽叏閮ㄩ�変腑
+ if (checked && currentBoxNo!="" && currentBoxNo!=null) {
+ const sameBoxRows = boxNoGroup[currentBoxNo] || [];
+ // 鎵归噺璁剧疆鍚岀鍙风殑琛屼负閫変腑鐘舵�侊紙璺宠繃宸查�変腑鐨勮锛岄伩鍏嶉噸澶嶈Е鍙戯級
+ sameBoxRows.forEach(item => {
+ const isAlreadyChecked = allCheckedRows.some(checkedRow => {
+ return checkedRow._X_ROW_KEY === item._X_ROW_KEY;
+ });
+ // 鏈�変腑鍒欒缃负閫変腑
+ if (!isAlreadyChecked) {
+ $grid.setCheckboxRow(item, true);
+ }
+ });
+ }
+};
+
+
+const groupByBoxNo = (tableData) => {
+ return tableData.reduce((group, row) => {
+ // 鑾峰彇褰撳墠琛岀殑绠卞彿锛堟敞鎰忓鐞� undefined 鎯呭喌锛�
+ const boxNo = row.finishedGoodsInventory?.boxNo || '';
+ if (!group[boxNo]) {
+ group[boxNo] = [];
+ }
+ group[boxNo].push(row);
+ return group;
+ }, {});
+};
+
+
//璁$畻閲戦挶
const countMoney = (list) => {
let countMoney = 0
@@ -877,6 +921,7 @@
v-on="gridEvents"
:edit-rules="validRules"
@edit-closed="editClosedEvent"
+ @checkbox-change="handleCheckboxChange"
>
<template #num1_filter="{ column, $panel }">
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 84b7a9d..923b539 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -285,7 +285,7 @@
and date(rw.reporting_work_time) <= #{endDate}
and rw.this_worn_quantity > 0
and dd.available = 0
- and reviewed_state != 2
+ and reviewed_state >-1
and rw.this_process != dd.responsible_process
and o.create_order>0
<if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
@@ -321,6 +321,9 @@
<if test="crossProcessBreakingDTO.creator != null and crossProcessBreakingDTO.creator != ''">
and rw.creator regexp #{crossProcessBreakingDTO.creator}
</if>
+ <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+ and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code}
+ </if>
GROUP BY dd.id
order by dd.id desc
limit #{offset},#{pageSize}
@@ -354,7 +357,7 @@
and date(rw.reporting_work_time) <= #{endDate}
and rw.this_worn_quantity > 0
and dd.available = 0
- and reviewed_state != 2
+ and reviewed_state >-1
and rw.this_process = dd.responsible_process
and o.create_order>0
<if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
@@ -390,6 +393,9 @@
<if test="crossProcessBreakingDTO.creator != null and crossProcessBreakingDTO.creator != ''">
and rw.creator regexp #{crossProcessBreakingDTO.creator}
</if>
+ <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+ and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code}
+ </if>
GROUP BY dd.id
order by dd.id desc
limit #{offset},#{pageSize}
@@ -406,6 +412,7 @@
left join sd.order_glass_detail as ogd
on ogd.order_id = o.order_id and ogd.order_number = dd.order_number
and ogd.technology_number and dd.technology_number
+ left join sd.order_detail as od on o.order_id = od.order_id and od.order_number=ogd.order_number
where date(rw.reporting_work_time) >= #{startDate}
and date(rw.reporting_work_time) <= #{endDate}
and rw.this_worn_quantity > 0
@@ -442,6 +449,9 @@
<if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''">
and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel}
</if>
+ <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+ and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code}
+ </if>
order by dd.id desc
</select>
@@ -456,6 +466,7 @@
left join sd.order_glass_detail as ogd
on ogd.order_id = o.order_id and ogd.order_number = dd.order_number
and ogd.technology_number and dd.technology_number
+ left join sd.order_detail as od on o.order_id = od.order_id and od.order_number=ogd.order_number
where date(rw.reporting_work_time) >= #{startDate}
and date(rw.reporting_work_time) <= #{endDate}
and rw.this_worn_quantity > 0
@@ -491,6 +502,9 @@
</if>
<if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''">
and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel}
+ </if>
+ <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+ and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code}
</if>
order by dd.id desc
</select>
@@ -1676,6 +1690,9 @@
<if test="teamOutputDTO.deviceName != null and teamOutputDTO.deviceName != ''">
AND rw.device_name REGEXP #{teamOutputDTO.deviceName}
</if>
+ <if test="teamOutputDTO.batch != null and teamOutputDTO.batch != ''">
+ AND o.batch REGEXP #{teamOutputDTO.batch}
+ </if>
<choose>
<when test="laminating == ''">
@@ -1823,7 +1840,9 @@
<if test="teamOutputDTO.edgingType != null and teamOutputDTO.edgingType != ''">
and od.edging_type regexp #{teamOutputDTO.edgingType}
</if>
-
+ <if test="teamOutputDTO.batch != null and teamOutputDTO.batch != ''">
+ AND o.batch REGEXP #{teamOutputDTO.batch}
+ </if>
<choose>
<when test="laminating == ''">
GROUP BY
@@ -2505,7 +2524,9 @@
<if test="teamOutputDTO.deviceName != null and teamOutputDTO.deviceName != ''">
AND rw.device_name REGEXP #{teamOutputDTO.deviceName}
</if>
-
+ <if test="teamOutputDTO.batch != null and teamOutputDTO.batch != ''">
+ AND o.batch REGEXP #{teamOutputDTO.batch}
+ </if>
<choose>
<when test="laminating == ''">
GROUP BY
--
Gitblit v1.8.0