From f5b834e911ac20929f8f88ec4b773d9370a98621 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 14 九月 2024 21:13:00 +0800 Subject: [PATCH] 2024-09-14 --- src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 55 ++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 38 insertions(+), 17 deletions(-) diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 34edff4..5108d1c 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -586,19 +586,34 @@ const { config } = this.props const { value, err } = this.state - return ( - <InputNumber - title={err} - className={err ? 'has-error' : ''} - ref={ref => this.node = ref} - precision={config.decimal || 0} - value={value} - onChange={(value) => this.onChange(value)} - onPressEnter={this.enterPress} - onFocus={this.onFocus} - onBlur={this.onBlur} - /> - ) + if (!config.decimal && config.decimal !== 0) { + return ( + <InputNumber + title={err} + className={err ? 'has-error' : ''} + ref={ref => this.node = ref} + value={value} + onChange={(value) => this.onChange(value)} + onPressEnter={this.enterPress} + onFocus={this.onFocus} + onBlur={this.onBlur} + /> + ) + } else { + return ( + <InputNumber + title={err} + className={err ? 'has-error' : ''} + ref={ref => this.node = ref} + precision={config.decimal} + value={value} + onChange={(value) => this.onChange(value)} + onPressEnter={this.enterPress} + onFocus={this.onFocus} + onBlur={this.onBlur} + /> + ) + } } } @@ -1470,6 +1485,9 @@ } else { _item.datatype = item.datatype } + if (_item.type === 'number' && item.type === 'number') { + _item.decimal = item.decimal || 0 + } forms.push(_item) } else { @@ -2044,8 +2062,8 @@ let cell = { id: ex.id, - exps: exps, menuname: item.label + '锛堣〃鍗曪級', + exps: exps, md5_id: '' } @@ -2059,6 +2077,7 @@ if (localItems.length) { deffers.push({ $backend: true, + $type: 's_Get_SelectedList', data: localItems }) } @@ -2066,6 +2085,7 @@ if (mainItems.length) { deffers.push({ $backend: true, + $type: 's_Get_SelectedList', data: mainItems, rduri: window.GLOB.mainSystemApi }) @@ -2481,8 +2501,8 @@ loading: true }) - if (submit.intertype === 'system' && window.backend && window.GLOB.CacheData.has('sql_' + submit.$menuId)) { - let ex = window.GLOB.CacheData.get('sql_' + submit.$menuId) + if (submit.intertype === 'system' && window.backend && window.GLOB.CacheData.has('sql_submit_' + submit.$menuId)) { + let ex = window.GLOB.CacheData.get('sql_submit_' + submit.$menuId) let param = this.getExps(ex, submit, data, forms) Api.genericInterface(param).then((res) => { @@ -2614,10 +2634,11 @@ return { $backend: true, + $type: 's_TableData_InUpDe', data: [{ id: ex.id, - exps: exps, menuname: btn.logLabel || '', + exps: exps, md5_id: md5_id }] } -- Gitblit v1.8.0