| | |
| | | const { confirm } = Modal |
| | | const { Paragraph } = Typography |
| | | const EditTable = asyncComponent(() => import('@/templates/zshare/editTable')) |
| | | const FullScripts = asyncComponent(() => import('@/templates/zshare/verifycard/fullScripts')) |
| | | |
| | | class VerifyCard extends Component { |
| | | static propTpyes = { |
| | |
| | | { |
| | | 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: '逻辑验证(仅临时表)' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | changeColumns = (columns) => { |
| | | const { verify } = this.state |
| | | |
| | | let reset = false |
| | | columns = columns.map(col => { |
| | | col.type = col.type || 'Nvarchar(50)' |
| | | if (col.type === 'text' || col.type === 'image') { |
| | |
| | | col.limit = col.type.match(/\d+/) ? col.type.match(/\d+/)[0] : '20000' |
| | | } else if (/^Decimal/ig.test(col.type)) { |
| | | col.limit = col.type.match(/\d+/ig)[1] |
| | | if (col.required === 'false') { |
| | | reset = true |
| | | } |
| | | col.required = 'true' |
| | | } else if (/^int/ig.test(col.type)) { |
| | | if (col.required === 'false') { |
| | | reset = true |
| | | } |
| | | col.required = 'true' |
| | | } else { |
| | | col.limit = '' |
| | |
| | | |
| | | return col |
| | | }) |
| | | |
| | | if (reset) { |
| | | message.warning('数值类型均为必填。') |
| | | } |
| | | |
| | | this.setState({verify: {...verify, columns}}, () => { |
| | | this.resetUniqueColumns() |
| | |
| | | {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null} |
| | | </span> |
| | | } key="scripts" id="mk-exin-script"> |
| | | <FullScripts |
| | | verify={verify} |
| | | getScriptsFullForm={() => this.scriptsFullForm} |
| | | getScriptsForm={() => this.scriptsForm} |
| | | handleStatus={this.handleStatus} |
| | | handleDelete={this.handleDelete} |
| | | > |
| | | <CustomScript |
| | | type="fullscreen" |
| | | btn={this.props.card} |
| | | usefulfields={verify.columns} |
| | | scripts={verify.scripts} |
| | | systemScripts={this.state.systemScripts} |
| | | scriptsChange={this.scriptsChange} |
| | | wrappedComponentRef={(inst) => this.scriptsFullForm = inst} |
| | | /> |
| | | </FullScripts> |
| | | <CustomScript |
| | | btn={this.props.card} |
| | | usefulfields={verify.columns} |
| | |
| | | <Form {...formItemLayout}> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <Form.Item label="提示编码"> |
| | | <span className="errorval"> S </span> |
| | | <Button onClick={() => {this.showError('S')}} type="primary" size="small"> |
| | | 查看 |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item label={'停留时间'}> |
| | | <Form.Item label="停留时间"> |
| | | <InputNumber defaultValue={verify.stime || 2} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'stime')}} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <Form.Item label="提示编码"> |
| | | <span className="errorval"> Y </span> |
| | | <Button onClick={() => {this.showError('Y')}} type="primary" size="small"> |
| | | 查看 |
| | |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <Form.Item label="提示编码"> |
| | | <span className="errorval"> -1 </span> |
| | | 执行成功无提示。 |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label="提示编码"> |
| | | <span className="errorval"> N </span> |
| | | <Button onClick={() => {this.showError('N')}} type="primary" size="small"> |
| | | 查看 |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item label={'停留时间'}> |
| | | <Form.Item label="停留时间"> |
| | | <InputNumber defaultValue={verify.ntime || 10} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'ntime')}} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <Form.Item label="提示编码"> |
| | | <span className="errorval"> F </span> |
| | | <Button onClick={() => {this.showError('F')}} type="primary" size="small"> |
| | | 查看 |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item label={'停留时间'}> |
| | | <Form.Item label="停留时间"> |
| | | <InputNumber defaultValue={verify.ftime || 10} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'ftime')}} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <Form.Item label="提示编码"> |
| | | <span className="errorval"> E </span> |
| | | <Button onClick={() => {this.showError('E')}} type="primary" size="small"> |
| | | 查看 |
| | |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <Form.Item label="提示编码"> |
| | | <span className="errorval"> NM </span> |
| | | <Button onClick={() => {this.showError('NM')}} type="primary" size="small"> |
| | | 查看 |
| | |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | <Form.Item label="提示编码"> |
| | | <span className="errorval"> -2 </span> |
| | | 执行失败无提示 |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |