From d1feb3ca73935d14dfa5d96548d682e875aa2443 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 13 五月 2025 14:22:34 +0800
Subject: [PATCH] 预警更新
---
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d49d81fa-65e0-4032-aa26-ddf7a5143c09.vsidx | 0
代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js | 56 ++++++++++++++++++++++++++++++++++++--------------------
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1fe64147-8dfd-4ee1-8bd7-32b388f28abb.vsidx | 0
代码管理/WCS/WIDESEAWCS_Server/.vs/slnx.sqlite | 0
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d85656c6-7405-43eb-91ab-044d483b115b.vsidx | 0
5 files changed, 36 insertions(+), 20 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1fe64147-8dfd-4ee1-8bd7-32b388f28abb.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1fe64147-8dfd-4ee1-8bd7-32b388f28abb.vsidx"
new file mode 100644
index 0000000..589ad25
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1fe64147-8dfd-4ee1-8bd7-32b388f28abb.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/slnx.sqlite" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/slnx.sqlite"
new file mode 100644
index 0000000..a5f07ee
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/slnx.sqlite"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
index d4a4ff8..1b2540a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
@@ -57,27 +57,36 @@
return str = list[0] == "" ? "鏃�" : str;
}
}
- if (column.field == 'materielInfo') {
- const today = new Date()
- column.formatter = (row) => {
- if (row.details.length > 0) {
- const today = new Date();
- const closestDate = row.details
+ if (column.field == 'materielInfo') {
+ const today = new Date()
+ column.formatter = (row) => {
+ if (row.details.length > 0) {
+ const today = new Date();
+ const closestDate = row.details
.map(x => {
- const date = new Date(x.effectiveDate);
- const diffInDays = Math.ceil(Math.abs((today - date) / (1000 * 60 * 60 * 24)));
- return { date, diffInDays };
+ const date = new Date(x.effectiveDate);
+ const diffInDays = Math.ceil((date - today) / (1000 * 60 * 60 * 24)); // 鏀逛负璁$畻鍓╀綑澶╂暟
+ return { date, diffInDays };
})
.reduce((closest, current) => (current.diffInDays < closest.diffInDays ? current : closest))
.date;
- const daysSinceClosest = Math.ceil(Math.abs((today - closestDate) / (1000 * 60 * 60 * 24)));
- return '<span style="color: #F56C6C">' + daysSinceClosest + "澶�" + '</span>';
+ const daysRemaining = Math.ceil((closestDate - today) / (1000 * 60 * 60 * 24));
+
+ row.expiryDays = daysRemaining;
+
+ if (daysRemaining <= 0) {
+ return '<span style="color:rgb(30, 27, 27)">鏃犱繚璐ㄦ湡</span>';
} else {
- return '<span style="color: #F56C6C">' + "鏃犱繚璐ㄦ湡" + '</span>';
+ return '<span style="color: #F56C6C">' + daysRemaining + "澶�" + '</span>';
}
+ } else {
+ row.expiryDays = null;
+ return '<span style="color:rgb(24, 18, 18)">鏃犱繚璐ㄦ湡</span>';
+ }
+ }
- }
+
}
if (column.field == 'sumStock') {
column.formatter = (row) => {
@@ -95,14 +104,21 @@
}
}
})
- this.columns.forEach((x) => {
- if (x.field == 'materielInfo') {
- x.cellStyle = (row, rowIndex, columnIndex) => {
- if (row.palletCode == 'BCS20250225001') {
- return { background: '#E6A23C' };
- }
- };
+ this.columns.forEach((column) => {
+ column.cellStyle = (row) => {
+ // 鍙鐞嗘湁淇濊川鏈熸暟鎹殑鎯呭喌
+ if (row.expiryDays !== null && row.expiryDays !== undefined) {
+ if (row.expiryDays <= 0) {
+ return { background: 'red' }; // 绾㈣壊鑳屾櫙锛堝凡杩囨湡锛�
+ } else if (row.expiryDays <= 30) {
+ return { background: 'yellow' }; // 榛勮壊鑳屾櫙锛堜复鏈燂級
+ }
}
+ return {}; // 榛樿鏃犺儗鏅壊
+ };
+
+
+
//濡傛灉鏍规嵁琛岀殑鏌愪釜鍊艰缃暣琛岄鑹�
//璁剧疆鏁磋鑳屾櫙棰滆壊
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d49d81fa-65e0-4032-aa26-ddf7a5143c09.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d49d81fa-65e0-4032-aa26-ddf7a5143c09.vsidx"
new file mode 100644
index 0000000..2ef2e25
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d49d81fa-65e0-4032-aa26-ddf7a5143c09.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d85656c6-7405-43eb-91ab-044d483b115b.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d85656c6-7405-43eb-91ab-044d483b115b.vsidx"
new file mode 100644
index 0000000..098db04
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d85656c6-7405-43eb-91ab-044d483b115b.vsidx"
Binary files differ
--
Gitblit v1.9.3