From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 八月 2022 11:42:43 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/templates/zshare/verifycard/index.jsx |  359 +++++++++++++++++++++++------------------------------------
 1 files changed, 143 insertions(+), 216 deletions(-)

diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index b98a3c2..0ae5a3a 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -1,13 +1,16 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Form, Tabs, Row, Col, Radio, Button, Select, Popconfirm, notification, Modal, message, InputNumber, Tooltip, Typography } from 'antd'
-import { QuestionCircleOutlined, CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined, ExclamationOutlined, BorderOutlined } from '@ant-design/icons'
+import { Form, Tabs, Row, Col, Button, Popconfirm, notification, Modal, message, InputNumber, Typography } from 'antd'
+import { CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined, ExclamationOutlined, BorderOutlined } from '@ant-design/icons'
+import Toast from 'antd-mobile/es/components/toast'
+import Dialog from 'antd-mobile/es/components/dialog'
 import moment from 'moment'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
 import options from '@/store/options.js'
+import BaseForm from './baseform'
 import UniqueForm from './uniqueform'
 import ContrastForm from './contrastform'
 import CustomForm from './customform'
@@ -37,6 +40,9 @@
 
   state = {
     initsql: '',            // sql楠岃瘉鏃跺彉閲忓0鏄庡強璧嬪��
+    verifyInter: 'system',  // 鎺ュ彛绫诲瀷
+    activeKey: 'base',
+    appType: sessionStorage.getItem('appType'),
     notes: [],              // 鐭俊妯℃澘
     setting: null,
     visible: false,
@@ -102,7 +108,7 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div style={{color: '#ff4d4f'}}>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopOutlined style={{marginLeft: '5px'}} />
             </div>
           ) :
@@ -138,7 +144,7 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div style={{color: '#ff4d4f'}}>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopOutlined style={{marginLeft: '5px'}} />
             </div>
           ) :
@@ -212,7 +218,7 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div style={{color: '#ff4d4f'}}>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopOutlined style={{marginLeft: '5px'}} />
             </div>
           ) :
@@ -264,7 +270,7 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div style={{color: '#ff4d4f'}}>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopOutlined style={{marginLeft: '5px'}} />
             </div>
           ) :
@@ -333,7 +339,7 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div style={{color: '#ff4d4f'}}>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopOutlined style={{marginLeft: '5px'}} />
             </div>
           ) :
@@ -400,7 +406,7 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div style={{color: '#ff4d4f'}}>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopOutlined style={{marginLeft: '5px'}} />
             </div>
           ) :
@@ -501,7 +507,7 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div style={{color: '#ff4d4f'}}>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopOutlined style={{marginLeft: '5px'}} />
             </div>
           ) :
@@ -547,6 +553,7 @@
     }
 
     _verify.default = _verify.default || 'true'
+    _verify.wxNote = _verify.wxNote || 'false'         // 鍏紬鍙锋秷鎭帹閫佹槸鍚﹀紑鍚�
     _verify.noteEnable = _verify.noteEnable || 'false' // 鐭俊鍙戦�佹槸鍚﹀紑鍚�
     _verify.noteType = _verify.noteType || 'N'         // 鐭俊鍙戦�佹ā寮忥細Y锛堝疄鏃讹級銆丯锛堝畾鏃讹級
     _verify.noteTemp = _verify.noteTemp || 'Y'         // 鐭俊鍙戦�佹ā鏉匡細Y锛堢浉鍚岋級銆丯锛堜笉鍚岋級
@@ -587,7 +594,11 @@
       item.$index = i + 1
     })
 
+    let verifyInter = card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? 'system' : 'inner'
+
     this.setState({
+      activeKey: verifyInter === 'system' || card.intertype === 'inner' ? 'base' : 'tip',
+      verifyInter: verifyInter,
       setting: config.setting || {},
       verify: _verify,
       oriVerify: fromJS(_verify).toJS()
@@ -649,11 +660,13 @@
         resolve(_fields)
       }
     }).then(_fields => {
-      let _usefulfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'login_city', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode']
-      let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(50)', '@mk_organization nvarchar(50)', '@login_city nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)']
-      let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@mk_departmentcode=\'\'', '@mk_organization=\'\'', '@login_city=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'', '@bid=\'\'']
+      let _usefulfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode']
+      let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(50)', '@mk_organization nvarchar(50)', '@mk_user_type nvarchar(20)', '@mk_nation nvarchar(50)', '@mk_province nvarchar(50)', '@mk_city nvarchar(50)', '@mk_district nvarchar(50)', '@mk_address nvarchar(100)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)']
+      let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@mk_departmentcode=\'\'', '@mk_organization=\'\'', '@mk_user_type=\'\'', '@mk_nation=\'\'', '@mk_province=\'\'', '@mk_city=\'\'', '@mk_district=\'\'', '@mk_address=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'', '@bid=\'\'']
       let fieldArr = _usefulfields.map(_f => _f.toLowerCase())
       let hasBid = false
+
+      _usefulfields = []
       
       fieldArr.push('bid')
 
@@ -772,6 +785,7 @@
       let _defaultsql = ''
       let _insertsql = ''
       let _updatesql = ''
+      let _primaryKey = config.setting.primaryKey || 'id'
 
       if (card.sqlType === 'insert' || card.sqlType === 'insertOrUpdate') {
         let keys = []
@@ -789,8 +803,8 @@
           }
         })
 
-        if (config.setting.primaryKey && !keys.includes(config.setting.primaryKey.toLowerCase())) {
-          keys.push(config.setting.primaryKey.toLowerCase())
+        if (!keys.includes(_primaryKey.toLowerCase())) {
+          keys.push(_primaryKey.toLowerCase())
           values.push('@ID@')
         }
         if (!keys.includes('createuserid')) {
@@ -865,7 +879,7 @@
         }
 
         _form = _form.join(', ')
-        _updatesql = `update ${card.sql} set ${_form} where ${config.setting.primaryKey || 'id'}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
+        _updatesql = `update ${card.sql} set ${_form} where ${_primaryKey}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
       }
 
       if (card.sqlType === 'insert') {
@@ -874,7 +888,7 @@
         _defaultsql = _updatesql
       } else if (card.sqlType === 'insertOrUpdate') {
         _defaultsql += `select @tbid=''
-          select @tbid='X' from ${card.sql} where ${config.setting.primaryKey || 'id'}=@ID@
+          select @tbid='X' from ${card.sql} where ${_primaryKey}=@ID@
           if @tbid=''
             begin
             ${_insertsql}
@@ -889,7 +903,7 @@
         if (_verify.voucher && _verify.voucher.enabled) {
           _voucher = ',BVoucher=@BVoucher,FIBVoucherDate=@FIBVoucherDate,FiYear=@FiYear'
         }
-        _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@${_voucher} where ${config.setting.primaryKey || 'id'}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
+        _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@${_voucher} where ${_primaryKey}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
       } else if (card.sqlType === 'delete') {
         let _msg = ''
         if (columns && columns.length > 0 && card.Ot !== 'notRequired' && card.Ot !== 'requiredOnce') {
@@ -901,7 +915,7 @@
             _index++
           })
         }
-        _defaultsql += `insert into snote (remark,createuserid,CreateUser,CreateStaff) select left('鍒犻櫎琛�:${card.sql} 鏁版嵁: ${_msg}${config.setting.primaryKey || 'id'}='+@ID@,200),@userid@,@username,@fullname delete ${card.sql} where ${config.setting.primaryKey}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
+        _defaultsql += `insert into snote (remark,createuserid,CreateUser,CreateStaff) select left('鍒犻櫎琛�:${card.sql} 鏁版嵁: ${_msg}${_primaryKey}='+@ID@,200),@userid@,@username,@fullname delete ${card.sql} where ${_primaryKey}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
       }
 
       let _columns = []
@@ -920,13 +934,13 @@
           _columns.unshift({ uuid: 'BID', field: 'BID', label: 'BID', type: 'text' })
         }
       }
-      
+
       this.setState({
         fields: _fields,
         columnsFields: _columns,
         initsql: _sql,
         defaultsql: _defaultsql,
-        usefulfields: ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', ..._usefulfields].join(', '),
+        usefulfields: _usefulfields.join(', '),
         uniqueColumns: this.state.uniqueColumns.map(col => {
           if (col.dataIndex === 'field') {
             col.options = uniqueFields
@@ -1144,39 +1158,6 @@
     this.setState({ verify })
   }
 
-  onNoteCodeChange = (val, option) => {
-    const { verify } = this.state
-
-    this.setState({
-      verify: {...verify, noteCode: val, noteId: option.props.id}
-    })
-  }
-
-  onOptionChange = (e, key) => {
-    const { verify } = this.state
-    let value = e.target.value
-
-    this.setState({
-      verify: {...verify, [key]: value}
-    })
-  }
-
-  changeAccField = (val) => {
-    const { verify } = this.state
-
-    this.setState({
-      verify: {...verify, accountfield: val}
-    })
-  }
-
-  changeAccDate = (val) => {
-    const { verify } = this.state
-
-    this.setState({
-      verify: {...verify, voucherdate: val}
-    })
-  }
-
   handleDelete = (record, type) => {
     const { verify } = this.state
 
@@ -1273,35 +1254,66 @@
   }
 
   showError = (errorType) => {
+    const { verify, appType } = this.state
+
     if (errorType === 'S') {
-      notification.success({
-        top: 92,
-        message: '鎵ц鎴愬姛锛�',
-        duration: 2
-      })
+      let time = verify.stime || 2
+      if (appType === 'mob') {
+        Toast.show({ icon: 'success', content: '鎵ц鎴愬姛锛�', duration: time * 1000 })
+      } else {
+        notification.success({
+          top: 92,
+          message: '鎵ц鎴愬姛锛�',
+          duration: time
+        })
+      }
+      
     } else if (errorType === 'Y') {
-      Modal.success({
-        title: '鎵ц鎴愬姛锛�'
-      })
+      if (appType === 'mob') {
+        Dialog.alert({content: '鎵ц鎴愬姛锛�', confirmText: '鐭ラ亾浜�'})
+      } else {
+        Modal.success({
+          title: '鎵ц鎴愬姛锛�'
+        })
+      }
     } else if (errorType === 'F') {
-      notification.error({
-        className: 'notification-custom-error',
-        top: 92,
-        message: '鎵ц澶辫触锛�',
-        duration: 10
-      })
+      if (appType === 'mob') {
+        let time = verify.ftime || 3
+        Toast.show({ icon: 'fail', content: '鎵ц澶辫触锛�', duration: time * 1000 })
+      } else {
+        notification.error({
+          className: 'notification-custom-error',
+          top: 92,
+          message: '鎵ц澶辫触锛�',
+          duration: verify.ftime || 10
+        })
+      }
     } else if (errorType === 'N') {
-      notification.error({
-        top: 92,
-        message: '鎵ц澶辫触锛�',
-        duration: 10
-      })
+      if (appType === 'mob') {
+        let time = verify.ntime || 3
+        Toast.show({ content: '鎵ц澶辫触锛�', duration: time * 1000 })
+      } else {
+        notification.error({
+          top: 92,
+          message: '鎵ц澶辫触锛�',
+          duration: verify.ntime || 10
+        })
+      }
     } else if (errorType === 'E') {
-      Modal.error({
-        title: '鎵ц澶辫触锛�'
-      })
+      if (appType === 'mob') {
+        Dialog.alert({content: '鎵ц澶辫触锛�', confirmText: '鐭ラ亾浜�'})
+      } else {
+        Modal.error({
+          title: '鎵ц澶辫触锛�'
+        })
+      }
     } else if (errorType === 'NM') {
-      message.error('鎵ц澶辫触锛�')
+      if (appType === 'mob') {
+        let time = verify.ntime || 3
+        Toast.show({ content: '鎵ц澶辫触锛�', duration: time * 1000 })
+      } else {
+        message.error('鎵ц澶辫触锛�')
+      }
     }
   }
 
@@ -1349,8 +1361,21 @@
 
   handleConfirm = () => {
     const { card } = this.props
-    const { setting } = this.state
+    const { setting, activeKey } = this.state
     let verify = fromJS(this.state.verify).toJS()
+
+    if (activeKey === 'base') {
+      let msg = this.baseForm.handleConfirm()
+
+      if (msg) {
+        notification.warning({
+          top: 92,
+          message: msg,
+          duration: 5
+        })
+        return Promise.reject()
+      }
+    }
     
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     return new Promise((resolve, reject) => {
@@ -1358,13 +1383,6 @@
         notification.warning({
           top: 92,
           message: '涓嶆墽琛岄粯璁ql鏃讹紝蹇呴』璁剧疆鑷畾涔夎剼鏈紒',
-          duration: 5
-        })
-        return
-      } else if (verify.accountdate === 'true' && !verify.accountfield) {
-        notification.warning({
-          top: 92,
-          message: '寮�鍚处鏈熸椂锛岄渶瑕侀�夋嫨楠岃瘉鍏徃锛�',
           duration: 5
         })
         return
@@ -1388,12 +1406,6 @@
         msg = '鑷畾涔夎剼鏈�'
       } else if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
         msg = '鑷畾涔夎剼鏈�'
-      }
-
-      if (verify.noteEnable === 'true' && !verify.noteCode) { // 寮�鍚煭淇℃椂锛岄渶瑕佹ā鏉跨紪鐮�
-        verify.noteEnable = 'false'
-      } else if (verify.noteEnable !== 'true' && verify.noteCode) {
-        verify.noteCode = ''
       }
 
       if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
@@ -1443,6 +1455,26 @@
     })
   }
 
+  changeTab = (val) => {
+    const { activeKey } = this.state
+
+    if (activeKey === 'base') {
+      let msg = this.baseForm.handleConfirm()
+
+      if (msg) {
+        notification.warning({
+          top: 92,
+          message: msg,
+          duration: 5
+        })
+        return
+      }
+    }
+    this.setState({
+      activeKey: val
+    })
+  }
+
   /**
    * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊
    */
@@ -1454,7 +1486,7 @@
 
   render() {
     const { card } = this.props
-    const { verify, fields, visible, uniqueFields, uniqueColumns, unionFields, onceUniqueColumns, columnsFields, contrastColumns, customColumns, orderColumns, scriptsColumns, cbScriptsColumns, orderModular, orderModularDetail, voucher, voucherDetail, notes } = this.state
+    const { activeKey, verifyInter, verify, fields, visible, uniqueFields, uniqueColumns, unionFields, onceUniqueColumns, columnsFields, contrastColumns, customColumns, orderColumns, scriptsColumns, cbScriptsColumns, orderModular, orderModularDetail, voucher, voucherDetail, notes, appType } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -1468,134 +1500,30 @@
 
     return (
       <div id="verify-card-box-tab">
-        <Tabs defaultActiveKey="1" className="verify-card-box">
-          {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab={
+        <Tabs activeKey={activeKey} className="verify-card-box" onChange={this.changeTab}>
+          {verifyInter === 'system' || card.intertype === 'inner' ? <TabPane tab={
             <span>
               鍩虹楠岃瘉
               {verify.default === 'false' ? <span className="count-tip"><ExclamationOutlined style={{color: 'orange'}}/></span> : null}
             </span>
-          } key="1">
-            <Form {...formItemLayout}>
-              <Row gutter={24}>
-                {this.props.card.sqlType !== 'custom' ? <Col span={8}>
-                  <Form.Item label={
-                    <Tooltip placement="bottomLeft" title={'榛樿sql鎵ц椤哄簭涓鸿嚜瀹氫箟鑴氭湰涔嬪墠'}>
-                      <QuestionCircleOutlined className="mk-form-tip" />
-                      榛樿sql
-                    </Tooltip>
-                  }>
-                    <Radio.Group value={verify.default} onChange={(e) => {this.onOptionChange(e, 'default')}}>
-                      <Radio value="true">鎵ц</Radio>
-                      <Radio value="false">涓嶆墽琛�</Radio>
-                    </Radio.Group>
-                  </Form.Item>
-                </Col> : null}
-                <Col span={8}>
-                  <Form.Item label={'璐︽湡楠岃瘉'}>
-                    <Radio.Group value={verify.accountdate} onChange={(e) => {this.onOptionChange(e, 'accountdate')}}>
-                      <Radio value="true">寮�鍚�</Radio>
-                      <Radio value="false">涓嶅紑鍚�</Radio>
-                    </Radio.Group>
-                  </Form.Item>
-                </Col>
-                {verify.accountdate === 'true' ? <Col span={8}>
-                  <Form.Item label={'楠岃瘉鍏徃'} required>
-                    <Select defaultValue={verify.accountfield || ''} onChange={this.changeAccField}>
-                      {unionFields.map(option =>
-                        <Select.Option key={option.uuid} value={option.field}>
-                          {option.label}
-                        </Select.Option>
-                      )}
-                    </Select>
-                  </Form.Item>
-                </Col> : null}
-                {verify.accountdate === 'true' ? <Col span={8}>
-                  <Form.Item label={
-                    <Tooltip placement="bottomLeft" title={'楠岃瘉鏃ユ湡涓虹┖鏃讹紝榛樿涓哄綋澶┿��'}>
-                      <QuestionCircleOutlined className="mk-form-tip" />
-                      楠岃瘉鏃ユ湡
-                    </Tooltip>
-                  }>
-                    <Select allowClear defaultValue={verify.voucherdate || ''} onChange={this.changeAccDate}>
-                      {unionFields.map(option =>
-                        <Select.Option key={option.uuid} value={option.field}>
-                          {option.label}
-                        </Select.Option>
-                      )}
-                    </Select>
-                  </Form.Item>
-                </Col> : null}
-                <Col span={8}>
-                  <Form.Item label={'澶辨晥楠岃瘉'}>
-                    <Radio.Group value={verify.invalid} onChange={(e) => {this.onOptionChange(e, 'invalid')}}>
-                      <Radio value="true">寮�鍚�</Radio>
-                      <Radio value="false">涓嶅紑鍚�</Radio>
-                    </Radio.Group>
-                  </Form.Item>
-                </Col>
-                <Col span={8}>
-                  <Form.Item label={
-                    <Tooltip placement="bottomLeft" title={'閫夋嫨鍙戦�佺煭淇℃椂锛岄渶瀹屽杽鐭俊璁剧疆銆�'}>
-                      <QuestionCircleOutlined className="mk-form-tip" />
-                      鍙戦�佺煭淇�
-                    </Tooltip>
-                  }>
-                    <Radio.Group value={verify.noteEnable} onChange={(e) => {this.onOptionChange(e, 'noteEnable')}}>
-                      <Radio value="true">寮�鍚�</Radio>
-                      <Radio value="false">涓嶅紑鍚�</Radio>
-                    </Radio.Group>
-                  </Form.Item>
-                </Col>
-                {verify.noteEnable === 'true' ? <Col span={8}>
-                  <Form.Item label="鐭俊妯℃澘">
-                    <Select value={verify.noteCode} onSelect={this.onNoteCodeChange}>
-                      {notes.map(option =>
-                        <Select.Option key={option.value} id={option.id} value={option.value}>
-                          {option.name}
-                        </Select.Option>
-                      )}
-                    </Select>
-                  </Form.Item>
-                </Col> : null}
-                {verify.noteEnable === 'true' ? <Col span={8}>
-                  <Form.Item label={
-                    <Tooltip placement="bottomLeft" title={'瀹炴椂鍙戦�佹渶澶氬悓鏃跺彂閫�5涓敤鎴凤紝瀹氭椂鍙戦�佹渶澶氬悓鏃跺彂閫�100涓敤鎴枫��'}>
-                      <QuestionCircleOutlined className="mk-form-tip" />
-                      鍙戦�佹柟寮�
-                    </Tooltip>
-                  }>
-                    <Radio.Group value={verify.noteType} onChange={(e) => {this.onOptionChange(e, 'noteType')}}>
-                      <Radio value="Y">瀹炴椂</Radio>
-                      <Radio value="N">瀹氭椂</Radio>
-                    </Radio.Group>
-                  </Form.Item>
-                </Col> : null}
-                {verify.noteEnable === 'true' ? <Col span={8}>
-                  <Form.Item label="鐭俊鍐呭">
-                    <Radio.Group value={verify.noteTemp} onChange={(e) => {this.onOptionChange(e, 'noteTemp')}}>
-                      <Radio value="Y">鐩稿悓</Radio>
-                      <Radio value="N">涓嶅悓</Radio>
-                    </Radio.Group>
-                  </Form.Item>
-                </Col> : null}
-              </Row>
-            </Form>
+          } key="base">
+            <BaseForm card={card} unionFields={unionFields} verify={verify} notes={notes} onChange={(verify) => this.setState({verify})} wrappedComponentRef={(inst) => this.baseForm = inst}/>
           </TabPane> : null}
-          {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab={
+          {verifyInter === 'system' ? <TabPane tab={
             <span>
               姣旇緝楠岃瘉
               {verify.contrasts.length ? <span className="count-tip">{verify.contrasts.length}</span> : null}
             </span>
-          } key="2x">
+          } key="contrasts">
             <ContrastForm dict={this.props.dict} contrastChange={this.contrastChange}/>
             <EditTable actions={['edit', 'move', 'copy', 'del', 'status']} type="contrastverify" data={verify.contrasts} columns={contrastColumns} onChange={(contrasts) => this.setState({verify: {...verify, contrasts}})}/>
           </TabPane> : null}
-          {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab={
+          {verifyInter === 'system' ? <TabPane tab={
             <span>
               鑷畾涔夐獙璇�
               {verify.customverifys.length ? <span className="count-tip">{verify.customverifys.length}</span> : null}
             </span>
-          } key="3">
+          } key="customverifys">
             <CustomForm
               dict={this.props.dict}
               btn={this.props.card}
@@ -1606,12 +1534,12 @@
             />
             <EditTable actions={['move']} data={verify.customverifys} columns={customColumns} onChange={(customverifys) => {this.setState({verify: {...verify, customverifys}})}}/>
           </TabPane> : null}
-          {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab={
+          {verifyInter === 'system' ? <TabPane tab={
             <span>
               鍗曞彿鐢熸垚
               {verify.billcodes.length ? <span className="count-tip">{verify.billcodes.length}</span> : null}
             </span>
-          } key="4">
+          } key="billcodes">
             <BillcodeForm
               fields={fields}
               btn={this.props.card}
@@ -1625,12 +1553,12 @@
             />
             <EditTable actions={['move']} data={verify.billcodes} columns={orderColumns} onChange={(billcodes) => {this.setState({verify: {...verify, billcodes}})}}/>
           </TabPane> : null}
-          {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab={
+          {verifyInter === 'system' ? <TabPane tab={
             <span>
               {card.Ot !== 'requiredOnce' ? '鍞竴鎬ч獙璇�' : '鍚岀被鏁版嵁楠岃瘉'}
               {verify.uniques.length ? <span className="count-tip">{verify.uniques.length}</span> : null}
             </span>
-          } key="2">
+          } key="uniques">
             <UniqueForm
               btn={card}
               fields={card.Ot !== 'requiredOnce' ? uniqueFields : columnsFields}
@@ -1639,12 +1567,12 @@
             />
             <EditTable actions={['edit', 'move', 'del', 'status']} data={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} onChange={this.changeUniques}/>
           </TabPane> : null}
-          {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab={
+          {verifyInter === 'system' ? <TabPane tab={
             <span>
               鍒涘缓鍑瘉
               {verify.voucher && verify.voucher.enabled ? <span className="count-tip">1</span> : null}
             </span>
-          } key="5">
+          } key="voucher">
             <VoucherForm
               dict={this.props.dict}
               voucher={voucher}
@@ -1655,13 +1583,12 @@
               wrappedComponentRef={(inst) => this.voucherForm = inst}
             />
           </TabPane> : null}
-          {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab={
+          {verifyInter === 'system' ? <TabPane tab={
             <span>
               鑷畾涔夎剼鏈�
               {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null}
             </span>
-          } key="6">
-            
+          } key="scripts">
             <BorderOutlined className="full-scripts" onClick={() => {
               if (this.scriptsForm && (this.scriptsForm.state.editItem || (this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))))) {
                 notification.warning({
@@ -1691,7 +1618,7 @@
               鍥炶皟鑴氭湰
               {verify.cbScripts.length ? <span className="count-tip">{verify.cbScripts.length}</span> : null}
             </span>
-          } key="6a">
+          } key="cbScripts">
             <CallBackCustomScript
               btn={this.props.card}
               dict={this.props.dict}
@@ -1704,7 +1631,7 @@
             />
             <EditTable actions={['move']} data={verify.cbScripts} columns={cbScriptsColumns} onChange={(cbScripts) => {this.setState({verify: {...verify, cbScripts}})}}/>
           </TabPane> : null}
-          <TabPane tab="淇℃伅鎻愮ず" key="7">
+          <TabPane tab="淇℃伅鎻愮ず" key="tip">
             <Form {...formItemLayout}>
               <Row gutter={24}>
                 <Col offset={6} span={6}>
@@ -1742,7 +1669,7 @@
                 </Col>
                 <Col span={8}>
                   <Form.Item label={'鍋滅暀鏃堕棿'}>
-                    <InputNumber defaultValue={verify.ntime || 10} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'ntime')}} />
+                    <InputNumber defaultValue={verify.ntime || (appType === 'mob' ? 3 : 10)} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'ntime')}} />
                   </Form.Item>
                 </Col>
               </Row>
@@ -1757,7 +1684,7 @@
                 </Col>
                 <Col span={8}>
                   <Form.Item label={'鍋滅暀鏃堕棿'}>
-                    <InputNumber defaultValue={verify.ftime || 10} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'ftime')}} />
+                    <InputNumber defaultValue={verify.ftime || (appType === 'mob' ? 3 : 10)} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'ftime')}} />
                   </Form.Item>
                 </Col>
               </Row>

--
Gitblit v1.8.0