From 20185ab64a165df51515d9fa1c9b12a7a8c55f59 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 四月 2023 23:11:04 +0800
Subject: [PATCH] 2023-04-07

---
 src/menu/components/table/edit-table/columns/editColumn/index.jsx |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
index 88c227d..9fe0f6d 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -16,7 +16,8 @@
   text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'editable', 'initval', 'blacklist'],
   number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'editable', 'initval', 'sum', 'blacklist'],
   textarea: ['label', 'field', 'type', 'Align', 'Hide', 'Width', 'prefix', 'initval', 'postfix', 'blacklist'],
-  custom: ['label', 'type', 'Align', 'Hide', 'Width', 'blacklist'],
+  custom: ['label', 'type', 'Align', 'Width', 'blacklist'],
+  colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'],
   action: ['label', 'type', 'Align', 'Width'],
   formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
   index: ['label', 'type', 'Align', 'Width']
@@ -131,7 +132,7 @@
           return item
         })
       }, () => {
-        if (value === 'action') {
+        if (value === 'action' || value === 'colspan') {
           this.props.form.setFieldsValue({Align: 'center'})
         }
       })
@@ -349,20 +350,18 @@
   }
 
   handleSubmit = () => {
-    const { columns, column } = this.props
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (!err) {
-        values.uuid = column.uuid
-        values.marks = column.marks || []
-        
-        if (values.field && columns.filter(col => col.field && col.uuid !== values.uuid && col.field === values.field).length > 0) {
-          notification.warning({
-            top: 92,
-            message: '瀛楁宸叉坊鍔狅紒',
-            duration: 5
-          })
-          return
+        if (values.type === 'number' && values.editable === 'true') {
+          if (typeof(values.max) === 'number' && typeof(values.min) === 'number' && values.max < values.min) {
+            notification.warning({
+              top: 92,
+              message: '鏈�澶у�间笉鍙皬浜庢渶灏忓�硷紒',
+              duration: 5
+            })
+            return
+          }
         }
         this.setState({visible: false, formlist: null})
         this.props.submitCol(values)

--
Gitblit v1.8.0