From b9a0e8541f0959db5d848f7b893c8838851ce411 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 四月 2020 13:29:49 +0800
Subject: [PATCH] 2020-04-09

---
 src/templates/zshare/verifycard/index.jsx |   56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index f6c7012..c292b7b 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -27,6 +27,7 @@
   }
 
   state = {
+    updateloading: false, // 淇敼涓�
     verify: {},
     fields: [],
     usefulfields: '',
@@ -268,13 +269,13 @@
       {
         title: this.props.dict['header.form.funcvar'],
         dataIndex: 'fieldName',
-        width: '13%',
+        width: '12%',
         render: (text, record) => (`${record.fieldName || ''}(${record.field})`)
       },
       {
         title: '绫诲瀷',
         dataIndex: 'billType',
-        width: '8%',
+        width: '6%',
       },
       {
         title: '鍑瘉绫诲瀷',
@@ -289,13 +290,13 @@
       {
         title: '鍏宠仈瀛楁',
         dataIndex: 'linkFieldName',
-        width: '12%',
+        width: '10%',
         render: (text, record) => (record.linkField ? `${record.linkFieldName || ''}(${record.linkField})` : '')
       },
       {
         title: '浣嶆暟',
         dataIndex: 'Type',
-        width: '8%'
+        width: '6%'
       },
       {
         title: '绀轰緥',
@@ -324,9 +325,14 @@
         }
       },
       {
+        title: '鏍囪瘑',
+        dataIndex: 'mark',
+        width: '8%'
+      },
+      {
         title: '鐘舵��',
         dataIndex: 'status',
-        width: '9%',
+        width: '8%',
         render: (text, record) => record.status === 'false' ?
           (
             <div>
@@ -373,6 +379,9 @@
 
     if (!_invalid) { // 閫夋嫨琛屾椂锛屽け鏁堥獙璇侀粯璁ゅ紑鍚�
       _invalid = card.Ot !== 'notRequired' ? 'true' : 'false'
+    }
+    if (card.sqlType === 'custom') { // 鑷畾涔夐獙璇佹椂锛屼笉浣跨敤榛樿sql
+      _verify.default = 'false'
     }
 
     _verify.default = _verify.default || 'true'
@@ -641,6 +650,25 @@
     })
   }
 
+  updateChange = () => {
+    let _loading = false
+    if (this.customForm && this.customForm.state.editItem) {
+      _loading = true
+    } else if (this.uniqueForm && this.uniqueForm.state.editItem) {
+      _loading = true
+    } else if (this.orderForm && this.orderForm.state.editItem) {
+      _loading = true
+    } else if (this.scriptsForm && this.scriptsForm.state.editItem) {
+      _loading = true
+    } else if (this.contrastForm && this.contrastForm.state.editItem) {
+      _loading = true
+    }
+
+    this.setState({
+      updateloading: _loading
+    })
+  }
+
   uniqueChange = (values) => {
     let verify = JSON.parse(JSON.stringify(this.state.verify))
 
@@ -659,6 +687,8 @@
 
     this.setState({
       verify: verify
+    }, () => {
+      this.updateChange()
     })
   }
 
@@ -680,6 +710,8 @@
 
     this.setState({
       verify: verify
+    }, () => {
+      this.updateChange()
     })
   }
 
@@ -701,6 +733,8 @@
 
     this.setState({
       verify: verify
+    }, () => {
+      this.updateChange()
     })
   }
 
@@ -722,6 +756,8 @@
 
     this.setState({
       verify: verify
+    }, () => {
+      this.updateChange()
     })
   }
 
@@ -743,6 +779,8 @@
 
     this.setState({
       verify: verify
+    }, () => {
+      this.updateChange()
     })
   }
 
@@ -800,6 +838,10 @@
         }
       }, 10)
     }
+
+    this.setState({
+      updateloading: true
+    })
   }
 
   handleStatus = (record, type) => {
@@ -1034,7 +1076,7 @@
           <TabPane tab="鍩虹楠岃瘉" key="1">
             <Form {...formItemLayout}>
               <Row gutter={24}>
-                <Col span={8}>
+                {this.props.card.sqlType !== 'custom' ? <Col span={8}>
                   <Form.Item label={
                     <Tooltip placement="bottomLeft" title={'榛樿sql鎵ц椤哄簭涓鸿嚜瀹氫箟鑴氭湰涔嬪墠'}>
                       <Icon type="question-circle" style={{color: '#c49f47', marginRight: '5px'}} />
@@ -1046,7 +1088,7 @@
                       <Radio value="false">涓嶆墽琛�</Radio>
                     </Radio.Group>
                   </Form.Item>
-                </Col>
+                </Col> : null}
                 <Col span={8}>
                   <Form.Item label={'璐︽湡楠岃瘉'}>
                     <Radio.Group value={verify.accountdate} onChange={(e) => {this.onOptionChange(e, 'accountdate')}}>

--
Gitblit v1.8.0