| | |
| | | { |
| | | title: '报错编码', |
| | | dataIndex: 'errorCode', |
| | | width: '12%', |
| | | width: '10%', |
| | | editable: true, |
| | | inputType: 'select', |
| | | options: [ |
| | |
| | | { |
| | | title: '验证类型', |
| | | dataIndex: 'verifyType', |
| | | width: '12%', |
| | | render: (text, record) => record.verifyType === 'logic' ? '逻辑验证' : '物理验证', |
| | | width: '14%', |
| | | render: (text, record) => { |
| | | let names = { |
| | | physical: '物理验证(全量验证)', |
| | | logic: '逻辑验证(全量验证)', |
| | | physical_temp: '物理验证(仅临时表)', |
| | | logic_temp: '逻辑验证(仅临时表)', |
| | | } |
| | | |
| | | return names[text] || '物理验证(全量验证)' |
| | | }, |
| | | inputType: 'select', |
| | | editable: true, |
| | | options: [ |
| | | { value: 'physical', text: '物理验证' }, |
| | | { value: 'logic', text: '逻辑验证' } |
| | | { value: 'physical', text: '物理验证(全量验证)' }, |
| | | { value: 'logic', text: '逻辑验证(全量验证)' }, |
| | | { value: 'physical_temp', text: '物理验证(仅临时表)' }, |
| | | { value: 'logic_temp', text: '逻辑验证(仅临时表)' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | col.required = col.required || 'true' |
| | | col.type = col.type || 'Nvarchar(50)' |
| | | col.import = col.import || 'true' |
| | | col.required = col.required || 'true' |
| | | |
| | | if (col.type === 'text' || col.type === 'image') { |
| | | col.type = 'Nvarchar(50)' |
| | | } else if (col.type === 'number') { |
| | | col.type = 'Decimal(18,2)' |
| | | } |
| | | |
| | | if (/^Nvarchar/ig.test(col.type)) { |
| | | col.limit = col.type.match(/\d+/)[0] |
| | |
| | | |
| | | let _columns = JSON.parse(JSON.stringify(verify.columns)) |
| | | |
| | | let _cols = _columns.map(col => col.Column ) |
| | | let _cols = _columns.map(col => col.Column) |
| | | |
| | | columns.forEach(col => { |
| | | if (col.field && !_cols.includes(col.field)) { |
| | |
| | | const { verify } = this.state |
| | | |
| | | columns = columns.map(col => { |
| | | col.type = col.type || 'Nvarchar(50)' |
| | | if (col.type === 'text' || col.type === 'image') { |
| | | col.type = 'Nvarchar(50)' |
| | | } else if (col.type === 'number') { |
| | | col.type = 'Decimal(18,2)' |
| | | } |
| | | |
| | | if (/^Nvarchar/ig.test(col.type)) { |
| | | col.limit = col.type.match(/\d+/) ? col.type.match(/\d+/)[0] : '20000' |
| | | } else if (/^Decimal/ig.test(col.type)) { |
| | |
| | | } else { |
| | | col.limit = '' |
| | | } |
| | | |
| | | col.required = col.required || 'true' |
| | | col.import = col.import || 'true' |
| | | |
| | | return col |
| | | }) |
| | |
| | | <Form {...formItemLayout}> |
| | | <Row gutter={24}> |
| | | <Col span={8}> |
| | | <Form.Item label="表名"> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title="导入时工作表名与excel中必须一致,注:工作表名为Sheet1且excel中仅有一个工作表时不进行表名验证。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 工作表 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('sheet', { |
| | | initialValue: verify.sheet || '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入表名!' |
| | | message: '请输入工作表名!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |