From 418594d0a3e441eeb7df2abbd70e54a0c72284c6 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 30 十月 2026 16:35:46 +0800
Subject: [PATCH] feat(order): 添加送样日期校验和权限刷新机制 - 在委托单新增表单中为送样日期添加占位提示和保存校验 - 在检验审核、检验任务、报告编制、样品接收、报告结果、用印台账等页面添加送样时间列 - 加载委托模板时清空送样日期并清除校验状态
---
src/utils/inspectionValueFormat.js | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/utils/inspectionValueFormat.js b/src/utils/inspectionValueFormat.js
index f9b6b16..4a5858e 100644
--- a/src/utils/inspectionValueFormat.js
+++ b/src/utils/inspectionValueFormat.js
@@ -1,9 +1,10 @@
/**
* 瑙f瀽鍘熷璁板綍妯℃澘涓殑妫�楠屽�兼壒娉ㄣ��
- * 鍏煎鏃ф牸寮忊�滄楠屽�尖�濓紝骞舵敮鎸侊細妫�楠屽�硷紝2銆佹楠屽�硷紝2锛岀瀛﹁鏁版硶銆�
+ * 鏀寔妫�楠屽�笺�佽绠楀�笺�佹渶缁堝�肩殑鎵规敞锛屼緥濡傦細妫�楠屽�硷紝2銆佽绠楀�硷紝2锛屾渶缁堝�硷紝2锛岀瀛﹁鏁版硶銆�
*/
export function parseInspectionValueAnnotation(annotation) {
- if (typeof annotation !== 'string' || !annotation.includes('妫�楠屽��')) return null;
+ const targetNames = ['妫�楠屽��', '璁$畻鍊�', '鏈�缁堝��'];
+ if (typeof annotation !== 'string') return null;
// 鎵规敞鍏佽涓枃閫楀彿銆佽嫳鏂囬�楀彿浠ュ強鈥滃拰鈥濊繛鎺ユ牸寮忓弬鏁般��
const parts = annotation
.replace(/锛�/g, ',')
@@ -12,6 +13,7 @@
.split(',')
.map(item => item.trim())
.filter(Boolean);
+ if (!targetNames.includes(parts[0])) return null;
const decimalIndex = parts.findIndex((item, index) => index > 0 && /^\d+$/.test(item));
const decimalPlaces = decimalIndex < 0 ? null : Number(parts[decimalIndex]);
if (decimalPlaces != null && (!Number.isInteger(decimalPlaces) || decimalPlaces < 0 || decimalPlaces > 15)) {
@@ -31,9 +33,10 @@
item && index + 1 !== decimalIndex && item !== '绉戝璁℃暟娉�' && !roundingNames[item]
);
if (unsupported.length || parts.length > 4) {
- return { error: '妫�楠屽�兼壒娉ㄦ牸寮忓簲涓猴細妫�楠屽�硷紝2锛屽洓鑸嶄簲鍏� 鎴� 妫�楠屽�硷紝2锛岀瀛﹁鏁版硶锛屽洓鑸嶄簲鍏�' };
+ return { error: '鎵规敞鏍煎紡搴斾负锛氭楠屽�硷紝2锛屽洓鑸嶄簲鍏ワ紱璁$畻鍊硷紝2锛涙渶缁堝�硷紝2锛岀瀛﹁鏁版硶' };
}
return {
+ target: parts[0],
decimalPlaces,
displayMode,
// 鍙傛暟椤哄簭鍐冲畾澶勭悊椤哄簭锛氱瀛﹁鏁版硶鍦ㄥ皬鏁颁綅鍓嶈〃绀哄厛杞瀛﹁鏁版硶銆�
--
Gitblit v1.9.3