From 8a6ce370f1aa1c061b76fa3e9d2d4d1df53ca4c5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:38:09 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/zshare/mutilform/index.jsx | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 309cff6..483d428 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -154,6 +154,17 @@ let key = item.field.toLowerCase() + // positecgroup 琛ㄥ崟闅愯棌 + if (item.tooltip && /@[a-z0-9_]+@/.test(item.tooltip)) { + let field = item.tooltip.replace(/@|\s/ig, '').toLowerCase() + + if (data[field] === 'N') { + item.hidden = true + } + + item.tooltip = '' + } + if (item.type === 'funcvar') { readin = false item.readin = false @@ -393,11 +404,13 @@ message: item.label + '涓嶅彲涓虹┖!' }] - if (typeof(item.min) === 'number' || typeof(item.max) === 'number') { + if (typeof(item.min) === 'number' || typeof(item.max) === 'number' || item.notZero === 'true') { item.rules.push({ validator: (rule, value, callback) => { if (isNaN(value)) { callback() + } else if (item.notZero === 'true' && value === 0) { + callback(item.label + '涓嶅彲涓�0') } else if (typeof(item.min) === 'number' && value < item.min) { if (item.min < 1e-6) { if (item.min === 1e-6) { @@ -617,7 +630,11 @@ item.supInitVal = '' if (fieldMap.has(item.linkField)) { - item.supInitVal = fieldMap.get(item.linkField).initval || '' + let supitem = fieldMap.get(item.linkField) + item.supInitVal = supitem.initval || '' + if (supitem.$first) { + item.$resetSup = true + } } else if (data.hasOwnProperty(item.linkField.toLowerCase())) { item.supInitVal = data[item.linkField.toLowerCase()] } @@ -1087,7 +1104,11 @@ // if (item.type === 'link') { if (item.linkField) { - item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.value === '') + let supInitVal = item.supInitVal + if (item.$resetSup) { + supInitVal = this.record[item.linkField] + } + item.options = item.oriOptions.filter(option => option.ParentID === supInitVal || option.value === '') // } else if (['select', 'radio', 'checkbox', 'checkcard', 'multiselect'].includes(item.type)) { } else { item.options = item.oriOptions -- Gitblit v1.8.0