From 7051e15582aee4163b3c8dd13dc85f4f1e2ce6eb Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 二月 2020 02:11:43 +0800
Subject: [PATCH] 2020-02-07

---
 src/templates/subtableconfig/index.jsx |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index 3c345ab..89bffe5 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -1162,6 +1162,13 @@
       let _LongParam = ''
       let _config = {...config, tables: this.state.selectedTables, ...res}
 
+      // 鏈缃暟鎹簮鎴栦富閿椂锛屽惎鐢ㄧ姸鎬佷负false
+      if (_config.setting.interType === 'inner' && !_config.setting.innerFunc && !_config.setting.dataresource) {
+        _config.enabled = false
+      } else if (!_config.setting.primaryKey) {
+        _config.enabled = false
+      }
+
       // 淇濆瓨鏃跺垹闄ら厤缃被鍨嬶紝system 銆乽ser
       delete _config.type
       delete _config.isAdd
@@ -1830,7 +1837,13 @@
     if (config.setting.interType === 'inner' && !config.setting.innerFunc && !config.setting.dataresource) {
       notification.warning({
         top: 92,
-        message: '鑿滃崟灏氭湭璁剧疆鏁版嵁婧愶紝涓嶅彲鍚敤锛�',
+        message: '灏氭湭璁剧疆鏁版嵁婧愶紝涓嶅彲鍚敤锛�',
+        duration: 10
+      })
+    } else if (!config.setting.primaryKey) {
+      notification.warning({
+        top: 92,
+        message: '灏氭湭璁剧疆涓婚敭锛屼笉鍙惎鐢紒',
         duration: 10
       })
     } else {

--
Gitblit v1.8.0