From 063b983daaf51a7f1e8677bde1e9c0e618866c91 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 21 二月 2020 10:30:19 +0800
Subject: [PATCH] 2020-02-21

---
 src/templates/tableshare/verifycardexcelin/index.jsx |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/templates/tableshare/verifycardexcelin/index.jsx b/src/templates/tableshare/verifycardexcelin/index.jsx
index b68375f..5a5254a 100644
--- a/src/templates/tableshare/verifycardexcelin/index.jsx
+++ b/src/templates/tableshare/verifycardexcelin/index.jsx
@@ -32,17 +32,17 @@
         editable: true
       },
       {
+        title: '绫诲瀷',
+        dataIndex: 'type',
+        width: '12%',
+        editable: true
+      },
+      {
         title: '鏄惁蹇呭~',
         dataIndex: 'required',
         width: '12%',
         editable: true,
         render: (text, record) => record.required === 'true' ? '鏄�' : '鍚�'
-      },
-      {
-        title: '绫诲瀷',
-        dataIndex: 'type',
-        width: '12%',
-        editable: true
       },
       {
         title: '鏈�灏忓��',
@@ -134,6 +134,14 @@
       col.required = col.required || 'true'
       col.type = col.type || 'Nvarchar(50)'
       
+      if (/^Nvarchar/ig.test(col.type)) {
+        col.limit = col.type.match(/\d+/)[0]
+      } else if (/^Decimal/ig.test(col.type)) {
+        col.limit = col.type.match(/\d+/ig)[1]
+      } else {
+        col.limit = ''
+      }
+
       return col
     })
 

--
Gitblit v1.8.0