| | |
| | | inputType: 'input', |
| | | editable: true, |
| | | unique: true, |
| | | strict: true, |
| | | searchable: true, |
| | | copy: true, |
| | | width: '16%' |
| | |
| | | inputType: 'input', |
| | | editable: true, |
| | | searchable: true, |
| | | unique: true, |
| | | width: '16%' |
| | | }, |
| | | { |
| | |
| | | val += '格式化:百分比;' |
| | | } |
| | | } |
| | | if (record.prefix) { |
| | | val += `前缀:${record.prefix};` |
| | | } |
| | | if (record.postfix) { |
| | | val += `后缀:${record.postfix};` |
| | | } |
| | | |
| | | return <div>{val}<EditOutlined className="edit-other" onClick={() => {this.setState({visible: true, line: fromJS(record).toJS()})}} /></div> |
| | | } else if (record.type === 'text') { |
| | |
| | | } else if (record.textFormat === 'YYYY-MM-DD HH:mm:ss') { |
| | | val += '格式化:YYYY-MM-DD HH:mm:ss;' |
| | | } |
| | | } |
| | | if (record.prefix) { |
| | | val += `前缀:${record.prefix};` |
| | | } |
| | | if (record.postfix) { |
| | | val += `后缀:${record.postfix};` |
| | | } |
| | | |
| | | return <div>{val}<EditOutlined className="edit-other" onClick={() => {this.setState({visible: true, line: fromJS(record).toJS()})}} /></div> |
| | |
| | | columnChange = (values, callback) => { |
| | | let verify = JSON.parse(JSON.stringify(this.state.verify)) |
| | | |
| | | let fields = verify.columns.map(item => item.Column) |
| | | if (fields.includes(values.Column)) { |
| | | let fields = verify.columns.map(item => item.Column.toLowerCase()) |
| | | if (fields.includes(values.Column.toLowerCase())) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: values.Column + '字段已存在!', |
| | |
| | | |
| | | clearField = () => { |
| | | const { verify } = this.state |
| | | const _this = this |
| | | const that = this |
| | | |
| | | confirm({ |
| | | content: `确定清空Excel列吗?`, |
| | | onOk() { |
| | | _this.setState({ |
| | | that.setState({ |
| | | verify: { |
| | | ...verify, |
| | | columns: [] |
| | |
| | | onCancel={() => {this.setState({visible: false, line: null})}} |
| | | destroyOnClose |
| | | > |
| | | <OtherForm line={line} onChange={(values) => this.setState({line: values})}/> |
| | | <OtherForm line={line} submit={this.lineSubmit} onChange={(values) => this.setState({line: values})}/> |
| | | </Modal> |
| | | </div> |
| | | ) |