| | |
| | | |
| | | class UniqueForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | voucherobj: PropTypes.object, // 凭证信息 |
| | | voucher: PropTypes.array, // 表单 |
| | | columns: PropTypes.array, // 表单 |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + '主类型!' |
| | | message: '请选择主类型!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={11}> |
| | | <Form.Item label={'凭证类型'}> |
| | | <Form.Item label="凭证类型"> |
| | | {getFieldDecorator('VoucherType', { |
| | | initialValue: voucherobj.VoucherType || (this.state.voucher[0] && this.state.voucher[0].ID) || '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '凭证类型!' |
| | | message: '请选择凭证类型!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={11}> |
| | | <Form.Item label={'凭证标识'}> |
| | | <Form.Item label="凭证标识"> |
| | | {getFieldDecorator('VoucherTypeOne', { |
| | | initialValue: voucherobj.VoucherTypeOne || (this.state.voucherDetail[0] && this.state.voucherDetail[0].ModularDetailCode) || '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '凭证标识!' |
| | | message: '请选择凭证标识!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={11}> |
| | | <Form.Item label={'关联字段'}> |
| | | <Form.Item label="关联字段"> |
| | | {getFieldDecorator('linkField', { |
| | | initialValue: voucherobj.linkField || (columns[0] && columns[0].field) || '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '关联字段!' |
| | | message: '请选择关联字段!' |
| | | } |
| | | ] |
| | | })( |