From fbf2cb72f6275f762ad3b61beaa3a558f7473b98 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 15 九月 2024 14:56:17 +0800 Subject: [PATCH] Merge branch 'develop' --- src/utils/utils-custom.js | 41 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index 968cc1c..0ab2b6b 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -1950,6 +1950,33 @@ } if (['exec', 'prompt', 'pop', 'form', 'formSubmit'].includes(cell.OpenType)) { + if (cell.Ot !== 'requiredOnce' && ['pop', 'form'].includes(cell.OpenType) && cell.verify && cell.verify.uniques && cell.verify.uniques.length > 0) { + let forms = ['BID'] + + if (cell.OpenType === 'form') { + forms.push(cell.field) + } else if (cell.modal && cell.modal.fields.length > 0) { + cell.modal.fields.forEach(n => { + if (!n.field) return + forms.push(n.field) + }) + } + let emptys = [] + cell.verify.uniques.forEach(m => { + if (m.status === 'false') return + + m.field.split(',').forEach(n => { + if (!forms.includes(n)) { + emptys.push(n) + } + }) + }) + + if (emptys.length) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濆敮涓�鎬ч獙璇佸瓧娈�${emptys.join('銆�')}锛屽湪琛ㄥ崟涓笉瀛樺湪锛乣}) + } + } + if (cell.OpenType === 'form' && cell.formType === 'count_line') return if (cell.intertype === 'system') { @@ -3698,6 +3725,7 @@ item.field.split(',').forEach((_field, index) => { let _key = _field.toLowerCase() let _val = '' + let _val2 = '' arr.push(_key) if (_key === 'bid') { // 琛ㄥ崟涓病鏈塨id鍒欎娇鐢ㄧ郴缁焍id鍙橀噺 @@ -3707,7 +3735,14 @@ } _fieldValue.push(`${_key}=${_val}`) - _value.push(`${_labels[index] || ''}锛�${_val || ''}`) + + if (_key === 'bid') { // 琛ㄥ崟涓病鏈塨id鍒欎娇鐢ㄧ郴缁焍id鍙橀噺 + _val2 = `' + ${BID} + '` + } else { + _val2 = `@mk_${_key}_mk@` + } + + _value.push(`${_labels[index] || ''}锛�${_val2}`) }) if (!arr.includes(primaryKey.toLowerCase())) { @@ -4781,7 +4816,7 @@ arr_field='${arr_field}',tabid='${tabid}',parid='${parid}',sub_name='${sub_name}',sub_field='${sub_field}' ` - _tailScript += `${_tailScript} + _tailScript = `${_tailScript} select @ErrorCode as ErrorCode,@retmsg as retmsg ${callback} ` @@ -4791,7 +4826,7 @@ arr_field='${arr_field}',tabid='${tabid}',parid='${parid}',sub_name='${sub_name}',sub_field='${sub_field}' ` - _tailScript += `${_tailScript} + _tailScript = `${_tailScript} select @ErrorCode as ErrorCode,@retmsg as retmsg ` } -- Gitblit v1.8.0