king
2021-01-24 d36c27e80e668b3bc1dcd687a18a2f2d125b32db
src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -162,6 +162,7 @@
  }
  selectScript = (value, option) => {
    if (!value || !option) return
    let _sql = this.props.form.getFieldValue('sql')
    if (_sql) {
      _sql = _sql + ` 
@@ -195,13 +196,13 @@
    }
    return (
      <Form {...formItemLayout} className="verify-form" id="verify-custom-scripts">
      <Form {...formItemLayout} className="verify-form" id="verify-custom-callback-scripts">
        <Row gutter={24}>
          {btn.cbTable ? <Col span={8}>
          <Col span={8}>
            <Form.Item label={'表名'} style={{whiteSpace: 'nowrap', margin: 0}}>
              {btn.cbTable}
            </Form.Item>
          </Col> : null}
          </Col>
          <Col span={16}>
            <Form.Item label={'报错字段'} style={{margin: 0}}>
              ErrorCode, retmsg
@@ -227,11 +228,13 @@
          <Col span={10}>
            <Form.Item label={'快捷添加'} style={{marginBottom: 0}}>
              <Select
                allowClear
                showSearch
                filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                onChange={this.selectScript}
                getPopupContainer={() => document.getElementById('verify-custom-scripts')}
                getPopupContainer={() => document.getElementById('verify-custom-callback-scripts')}
              >
                <Select.Option key="default" value={`declare @${btn.cbTable} table (mk_api_key nvarchar(100))`}>默认sql</Select.Option>
                {systemScripts.map((option, i) =>
                  <Select.Option key={i} value={option.value}>{option.name}</Select.Option>
                )}