From d909ca171564419745daf3bf730f119802873833 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 02 二月 2026 10:39:10 +0800
Subject: [PATCH] 计算核磅重量总和去除分订单的计算
---
pages/wareHouse/nuclearScale/nuclearscalerecord.vue | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 1 deletions(-)
diff --git a/pages/wareHouse/nuclearScale/nuclearscalerecord.vue b/pages/wareHouse/nuclearScale/nuclearscalerecord.vue
index c70221d..d121f93 100644
--- a/pages/wareHouse/nuclearScale/nuclearscalerecord.vue
+++ b/pages/wareHouse/nuclearScale/nuclearscalerecord.vue
@@ -31,6 +31,13 @@
>- {{ getPrintStatusText() }}</text
>
</view>
+
+ <!-- 鏍哥閲嶉噺鎬诲拰灞曠ず -->
+ <view class="total-weight-indicator">
+ <text class="total-weight-label">鏍哥閲嶉噺鎬诲拰锛�</text>
+ <text class="total-weight-value">{{ totalVerificationWeight.toFixed(2) }}</text>
+ </view>
+
<scroll-view
class="finishProductIn-locno-scroll-list"
scroll-y="true"
@@ -226,7 +233,7 @@
// 5锛氶�忔槑绾�
printMode: 2, // 榛樿鎵撳嵃妯″紡
// 1锛氱儹鏁�
- // 2锛氱儹杞嵃
+ // 2锛氱儹杞嵃
connectedDevice: null,
connectionStatus: "disconnected",
printStatus: "idle", // 鎵撳嵃鐘舵��: idle, printing, error
@@ -234,6 +241,26 @@
verificationNo: "",
failedPrintJobs: [],
};
+ },
+ computed: {
+ // 璁$畻鏍哥閲嶉噺鎬诲拰
+totalVerificationWeight() {
+ const processedBatches = new Set(); // 鐢ㄤ簬璁板綍宸茬粡澶勭悊杩囩殑batchNo
+
+ return this.list.reduce((sum, item) => {
+ // 濡傛灉杩欎釜batchNo宸茬粡澶勭悊杩囷紝鐩存帴杩斿洖褰撳墠鎬诲拰锛堣烦杩囷級
+ if (processedBatches.has(item.batchNo)) {
+ return sum;
+ }
+
+ // 鏍囪杩欎釜batchNo涓哄凡澶勭悊
+ processedBatches.add(item.batchNo);
+
+ // 璁$畻鏉冮噸骞剁疮鍔�
+ const weight = parseFloat(item.verificationWeight) || 0;
+ return sum + weight;
+ }, 0);
+}
},
onLoad(options) {
this.verificationNo = JSON.parse(
@@ -1171,4 +1198,26 @@
font-size: 22rpx;
}
}
+
+/* 鏍哥閲嶉噺鎬诲拰灞曠ず */
+.total-weight-indicator {
+ padding: 12rpx 20rpx;
+ font-size: 26rpx;
+ text-align: center;
+ background-color: #e8f3ff;
+ border-bottom: 1rpx solid #d1e5ff;
+ margin-bottom: 16rpx;
+
+ .total-weight-label {
+ font-weight: 500;
+ color: #333;
+ margin-right: 8rpx;
+ }
+
+ .total-weight-value {
+ font-weight: bold;
+ color: #07c160;
+ font-size: 28rpx;
+ }
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3