From eb0482b3fc2e91a626baa6ac73e75e0b0038f552 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 03 十一月 2023 01:25:59 +0800 Subject: [PATCH] 2023-11-03 --- src/utils/utils.js | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/utils.js b/src/utils/utils.js index 2861db2..3c4adea 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -979,7 +979,11 @@ }) } } else if (/^Decimal/ig.test(col.type) || /^int/ig.test(col.type)) { - if (!val && val !== 0) { + if (col.required === 'false') { + if (!val || isNaN(val)) { + val = 0 + } + } else if (!val && val !== 0) { errors.push(_position + '鍐呭涓嶅彲涓虹┖') } else if (isNaN(val)) { // 妫�楠屾槸鍚︿负鏁板�� errors.push(_position + '鍐呭搴斾负鏁板��') @@ -2399,7 +2403,7 @@ * @description 鑾峰彇鏍囪淇℃伅 */ export function getMark (marks, record, style) { - let res = {} + let res = {signType: ''} marks.some(mark => { let originVal = record[mark.field[0]] -- Gitblit v1.8.0