| | |
| | | } |
| | | |
| | | state = { |
| | | updateloading: false, // 修改中 |
| | | verify: {}, |
| | | fields: [], |
| | | usefulfields: '', |
| | |
| | | { |
| | | 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: '凭证类型', |
| | |
| | | { |
| | | title: '关联字段', |
| | | dataIndex: 'linkFieldName', |
| | | width: '12%', |
| | | width: '10%', |
| | | render: (text, record) => (record.linkField ? `${record.linkFieldName || ''}(${record.linkField})` : '') |
| | | }, |
| | | { |
| | | title: '位数', |
| | | dataIndex: 'Type', |
| | | width: '8%' |
| | | width: '6%' |
| | | }, |
| | | { |
| | | title: '示例', |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: '标识', |
| | | dataIndex: 'mark', |
| | | width: '8%' |
| | | }, |
| | | { |
| | | title: '状态', |
| | | dataIndex: 'status', |
| | | width: '9%', |
| | | width: '8%', |
| | | render: (text, record) => record.status === 'false' ? |
| | | ( |
| | | <div> |
| | |
| | | |
| | | if (!_invalid) { // 选择行时,失效验证默认开启 |
| | | _invalid = card.Ot !== 'notRequired' ? 'true' : 'false' |
| | | } |
| | | if (card.sqlType === 'custom') { // 自定义验证时,不使用默认sql |
| | | _verify.default = 'false' |
| | | } |
| | | |
| | | _verify.default = _verify.default || 'true' |
| | |
| | | }) |
| | | } |
| | | |
| | | 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)) |
| | | |
| | |
| | | |
| | | this.setState({ |
| | | verify: verify |
| | | }, () => { |
| | | this.updateChange() |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ |
| | | verify: verify |
| | | }, () => { |
| | | this.updateChange() |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ |
| | | verify: verify |
| | | }, () => { |
| | | this.updateChange() |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ |
| | | verify: verify |
| | | }, () => { |
| | | this.updateChange() |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ |
| | | verify: verify |
| | | }, () => { |
| | | this.updateChange() |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | }, 10) |
| | | } |
| | | |
| | | this.setState({ |
| | | updateloading: true |
| | | }) |
| | | } |
| | | |
| | | handleStatus = (record, type) => { |
| | |
| | | <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'}} /> |
| | |
| | | <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')}}> |