king
2020-04-09 b9a0e8541f0959db5d848f7b893c8838851ce411
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')}}>