From ab60d53b67f802878662aaa5a5b52580cca421b8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 26 九月 2020 08:52:46 +0800
Subject: [PATCH] 2020-09-26

---
 src/templates/zshare/verifycard/index.jsx |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index 5138724..3f19cc9 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -1166,7 +1166,7 @@
   }
 
   uniqueChange = (values) => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
+    let verify = fromJS(this.state.verify).toJS()
 
     if (values.uuid) {
       verify.uniques = verify.uniques.map(item => {
@@ -1187,7 +1187,7 @@
   }
 
   contrastChange = (values) => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
+    let verify = fromJS(this.state.verify).toJS()
 
     if (values.uuid) {
       verify.contrasts = verify.contrasts.map(item => {
@@ -1208,7 +1208,7 @@
   }
 
   customChange = (values) => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
+    let verify = fromJS(this.state.verify).toJS()
 
     if (values.uuid) {
       verify.customverifys = verify.customverifys.map(item => {
@@ -1229,7 +1229,7 @@
   }
 
   scriptsChange = (values) => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
+    let verify = fromJS(this.state.verify).toJS()
 
     if (values.uuid) {
       verify.scripts = verify.scripts.map(item => {
@@ -1250,7 +1250,7 @@
   }
 
   orderChange = (values) => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
+    let verify = fromJS(this.state.verify).toJS()
 
     if (values.uuid) {
       verify.billcodes = verify.billcodes.map(item => {
@@ -1327,7 +1327,7 @@
   }
 
   handleStatus = (record, type) => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
+    let verify = fromJS(this.state.verify).toJS()
     record.status = record.status === 'false' ? 'true' : 'false'
 
     if (type === 'customverify') {
@@ -1378,7 +1378,7 @@
   }
 
   handleUpDown = (record, type, direction) => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
+    let verify = fromJS(this.state.verify).toJS()
     let index = 0
 
     if (type === 'customverify') {
@@ -1526,11 +1526,12 @@
   }
 
   handleConfirm = () => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
+    const { card } = this.props
+    let verify = fromJS(this.state.verify).toJS()
     
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     return new Promise((resolve, reject) => {
-      if (verify.default === 'false' && verify.scripts.length === 0) {
+      if (card.sqlType !== 'custom' && verify.default === 'false' && verify.scripts.length === 0) {
         notification.warning({
           top: 92,
           message: '涓嶆墽琛岄粯璁ql鏃讹紝蹇呴』璁剧疆鑷畾涔夎剼鏈紒',

--
Gitblit v1.8.0