From c00b188a331394f5729166ffa391425713a3933b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 01 四月 2025 09:09:38 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/components/card/cardsimplecomponent/index.jsx | 3 + src/menu/datasource/verifycard/settingform/index.jsx | 15 +++++++ src/utils/utils-custom.js | 32 +++++++++++++++ src/menu/components/card/doublecardcomponent/index.jsx | 3 + src/menu/components/card/cardcomponent/index.jsx | 3 + src/utils/utils.js | 8 ++- 6 files changed, 56 insertions(+), 8 deletions(-) diff --git a/src/menu/components/card/cardcomponent/index.jsx b/src/menu/components/card/cardcomponent/index.jsx index c5d5222..798286d 100644 --- a/src/menu/components/card/cardcomponent/index.jsx +++ b/src/menu/components/card/cardcomponent/index.jsx @@ -294,7 +294,8 @@ field: item.field || '', width: item.span || 12, value: '', - style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'} + style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'}, + fixStyle: 'alone' } if (item.type === 'number') { diff --git a/src/menu/components/card/cardsimplecomponent/index.jsx b/src/menu/components/card/cardsimplecomponent/index.jsx index e22187a..78e5c31 100644 --- a/src/menu/components/card/cardsimplecomponent/index.jsx +++ b/src/menu/components/card/cardsimplecomponent/index.jsx @@ -210,7 +210,8 @@ field: item.field || '', width: item.span || 12, value: '', - style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'} + style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'}, + fixStyle: 'alone' } if (item.type === 'number') { diff --git a/src/menu/components/card/doublecardcomponent/index.jsx b/src/menu/components/card/doublecardcomponent/index.jsx index ae09b62..cb376c6 100644 --- a/src/menu/components/card/doublecardcomponent/index.jsx +++ b/src/menu/components/card/doublecardcomponent/index.jsx @@ -231,7 +231,8 @@ field: item.field || '', width: item.span || 12, value: '', - style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'} + style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'}, + fixStyle: 'alone' } if (item.type === 'number') { diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index 147c84a..7f567b1 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -38,13 +38,26 @@ const { config, setting } = this.props let menu = window.GLOB.customMenu - let modules = MenuUtils.getSupModules(menu.components, config.uuid, menu.interfaces) + let modules = [] let ismain = false if (menu.Template === 'BaseTable') { ismain = config.name === '涓昏〃' } + if (config.type === 'interface') { + menu.components.forEach(item => { + if (item.type === 'module' && item.subtype === 'account') { + modules.push({ + value: item.uuid, + label: item.name + }) + } + }) + } else { + modules = MenuUtils.getSupModules(menu.components, config.uuid, menu.interfaces) + } + modules.unshift({ value: 'empty', label: '鏃�' diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index 5c4b811..93edd21 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -3933,6 +3933,30 @@ // 鍞竴鎬ч獙璇侊紝蹇呴』瀛樺湪琛ㄥ崟锛堣〃鍗曞瓨鍦ㄦ椂锛屼富閿潎涓哄崟鍊硷級,蹇呴』濉啓鏁版嵁婧愶紝澶氳鎷兼帴鏃朵笉鍙敤 if (formdata && verify.uniques && verify.uniques.length > 0 && btn.Ot !== 'requiredOnce') { + let nFields = [] + let dataFields = [] + formdata.forEach(form => { + let _key = form.key.toLowerCase() + if (form.type === 'number' || form.type === 'rate') { + nFields.push(_key) + } else if (form.type === 'date') { + dataFields.push(_key) + } + }) + if (columns && columns.length > 0 && btn.Ot !== 'notRequired') { + columns.forEach(col => { + let _key = col.field.toLowerCase() + if (col.type === 'number') { + if (!nFields.includes(_key)) { + nFields.push(_key) + } + } else if (/^date/ig.test(col.datatype)) { + if (!dataFields.includes(_key)) { + dataFields.push(_key) + } + } + }) + } verify.uniques.forEach(item => { let _fieldValue = [] // 琛ㄥ崟閿�煎field=value let _value = [] // 琛ㄥ崟鍊硷紝鐢ㄤ簬閿欒鎻愮ず @@ -3958,7 +3982,13 @@ _val2 = `' + ${BID} + '` } else { // _val2 = `@mk_${_key}_mk@` - _val2 = `' + @${_field} + '` + if (nFields.includes(_key)) { + _val2 = `' + cast (@${_field} as nvarchar(50)) + '` + } else if (dataFields.includes(_key)) { + _val2 = `' + CONVERT(nvarchar(50), @${_field}, 23) + '` + } else { + _val2 = `' + @${_field} + '` + } } _value.push(`${_labels[index] || ''}锛�${_val2}`) diff --git a/src/utils/utils.js b/src/utils/utils.js index cc06e69..c655419 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1877,6 +1877,7 @@ let _initColfields = [] let _declarefields = [] let verifyValSql = '' + let datavars = {} // 鑾峰彇瀛楁閿�煎 formdata && formdata.forEach(form => { @@ -1891,6 +1892,7 @@ } let _key = form.key.toLowerCase() + datavars[_key] = form.value if (!_initvars.includes(_key)) { _initvars.push(_key) @@ -1945,6 +1947,8 @@ // 娣诲姞鏁版嵁涓瓧娈碉紝琛ㄥ崟鍊间紭鍏�(鎸夐挳涓嶉�夎鎴栧琛屾嫾鎺ユ椂璺宠繃) if (data && btn.Ot !== 'notRequired' && columns && columns.length > 0) { + datavars = {..._data, ...datavars} + const setField = (col) => { if (!col.field) return let _key = col.field.toLowerCase() @@ -2239,7 +2243,7 @@ item.field.split(',').forEach((_field, index) => { let _key = _field.toLowerCase() let _val = '' - let _val2 = '' + let _val2 = datavars[_key] !== undefined ? datavars[_key] : '' arr.push(_key) if (_key === 'bid') { @@ -2250,8 +2254,6 @@ if (_key === 'bid') { _val2 = BID - } else { - _val2 = `' + @${_field} + '` } _fieldValue.push(`${_key}=${_val}`) -- Gitblit v1.8.0