king
2020-07-07 958377f8ed9ca55070da9aa319f23e3ee9d94701
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -38,7 +38,7 @@
    }
    let _sql = `Declare @${btn.sheet} table (${usefulfields.map(item => item.Column + ' ' + item.type).join(',')},jskey nvarchar(50) )
      Declare @UserName nvarchar(50),@FullName nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000)
      Declare @UserName nvarchar(50),@FullName nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512)
      Select @ErrorCode='', @retmsg=''
    `
    
@@ -125,6 +125,9 @@
          func: 's_debug_sql',
          LText: this.state.verifySql + _initsql + values.sql + tail
        }
        param.LText = param.LText.replace(/@\$|\$@/ig, '')
        param.LText = Utils.formatOptions(param.LText)
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
@@ -153,6 +156,16 @@
    })
  }
  handleCancel = () => {
    this.setState({
      editItem: null
    })
    this.props.form.setFieldsValue({
      sql: ''
    })
  }
  selectScript = (value, option) => {
    const { usefulfields, btn } = this.props
@@ -164,7 +177,7 @@
        fields = fields + ','
      }
      _value = `Insert into ${btn.sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid,@username,@fullname,@BID From @${btn.sheet}`
      _value = `Insert into ${btn.sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid@,@username,@fullname,@BID@ From @${btn.sheet}`
    } else {
      _value = value
    }
@@ -212,7 +225,7 @@
          </Col> : null}
          <Col span={16}>
            <Form.Item label={'报错字段'} style={{margin: 0}}>
              errorCode, errmsg
              ErrorCode, retmsg
            </Form.Item>
          </Col>
          {usefulfields ? <Col span={24} className="sqlfield">
@@ -228,7 +241,7 @@
              </Tooltip>
            }>
              {getFieldDecorator('position', {
                initialValue: 'back'
                initialValue: 'front'
              })(
                <Radio.Group>
                  <Radio value="init">初始化</Radio>
@@ -257,10 +270,13 @@
              </Select>
            </Form.Item>
          </Col>
          <Col span={4} className="add">
          <Col span={6} className="add">
            <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
              保存
            </Button>
            <Button onClick={this.handleCancel} style={{marginBottom: 15, marginLeft: 10}}>
              取消
            </Button>
          </Col>
          <Col span={24} className="sql">
            <Form.Item label={'sql'}>