king
2024-11-07 a02fc6a77fa1b35c6516b2d37108d80e260c6c85
src/menu/datasource/verifycard/customscript/index.jsx
@@ -34,14 +34,14 @@
    const { searches } = this.props
    this.setState({
      usefulfields: getSearchFields(searches)
      usefulFields: getSearchFields(searches)
    })
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!is(fromJS(this.props.searches), fromJS(nextProps.searches))) {
      this.setState({
        usefulfields: getSearchFields(nextProps.searches)
        usefulFields: getSearchFields(nextProps.searches)
      })
    }
  }
@@ -85,7 +85,7 @@
        let pass = checkSQL(values.sql, 'customscript')
        if (!pass) return
        if (!pass && !skip) return
        if (skip) {
          this.setState({
@@ -142,11 +142,11 @@
    if (value === 'defaultsql') {
      value = this.props.defaultsql
    } else if (value === 'flowstart') {
      value = `/* select a.*, w.remark as remark_w, w.statusname  as statusname_w,w.status as status_w,w.works_flow_param,w.modifydate as modifydate_w  from (select * from ${setting.tableName} where status=0 and deleted=0 $@ and createuserid=@userid@ @$) a
      value = `/* select a.*, w.remark as remark_w, w.statusname  as statusname_w,w.status as status_w,w.works_flow_param,w.works_flow_detail_id,w.modifydate as modifydate_w  from (select * from ${setting.tableName} where status=0 and deleted=0 $@ and createuserid=@userid@ @$) a
      inner join (select * from  s_my_works_flow  where works_flow_code=@works_flow_code@ and status=0 and deleted=0) w on a.id=w.works_flow_id */`
      this.props.addProcess()
    } else if (value === 'flowcheck') {
      value = `/* select a.*, w.remark as remark_w, w.statusname  as statusname_w,w.status as status_w,w.works_flow_param,w.modifydate as modifydate_w
      value = `/* select a.*, w.remark as remark_w, w.statusname  as statusname_w,w.status as status_w,w.works_flow_param,w.works_flow_detail_id,w.modifydate as modifydate_w
      from (select * from ${setting.tableName} where status=0 and deleted=0 ) a
      inner join (select * from  s_my_works_flow  where works_flow_code=@works_flow_code@ and status>0 and status<888 and deleted=0) w 
      on a.id=w.works_flow_id 
@@ -210,7 +210,7 @@
  }
  render() {
    const { systemScripts, setting, type } = this.props
    const { systemScripts, setting, type, hasExtend } = this.props
    const { getFieldDecorator } = this.props.form
    const { usefulFields, skip } = this.state
@@ -226,7 +226,7 @@
          </Col> : null}
          <Col span={18}>
            <Form.Item label="报错字段" style={{margin: 0}}>
              ErrorCode, retmsg
              errorcode, retmsg
              <span style={{marginLeft: 25}}>
                成功:
                <span className="error-val" onClick={() => {this.showError('S')}}> S </span>、
@@ -243,9 +243,9 @@
          </Col>
          <Col span={24}>
            <Form.Item label="可用字段" className="field-able">
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, lang, time_id, typename, datam{window.GLOB.getLocation ? ', mk_longitude, mk_latitude' : ''}</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。使用@pageSize@或@orderBy@代表自定义分页,总数请以mk_total返回。'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{type === 'calendar' ? ', mk_year' : ''}</Tooltip>
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。使用@pageSize@、@orderBy@ 或脚本中存在 @mk_total 代表自定义分页,总数请以mk_total返回。'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{type === 'calendar' ? ', mk_year' : ''}{hasExtend ? ', mk_time' : ''}</Tooltip>
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url变量,请按照@xxx@格式使用。'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip>
              {window.GLOB.process ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'工作流变量,请按照@xxx@格式使用。'}>, <span style={{color: 'purple'}}>works_flow_code</span></Tooltip> : null}
            </Form.Item>