| | |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Form, Tabs, Row, Col, Radio, Button, Select, Popconfirm, notification, Modal, message, InputNumber, Tooltip, Typography } from 'antd' |
| | | import { QuestionCircleOutlined, CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | import { QuestionCircleOutlined, CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined, ExclamationOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | |
| | | |
| | | new Promise(resolve => { |
| | | let _fields = [] |
| | | if (config.Template === 'FormTab') { |
| | | if (card.OpenType === 'form') { |
| | | _fields.push({ |
| | | field: card.field, |
| | | label: card.label, |
| | | type: 'text' |
| | | }) |
| | | resolve(_fields) |
| | | } else if (config.Template === 'FormTab') { |
| | | config.groups.forEach(group => { |
| | | _fields.push(...group.sublist) |
| | | }) |
| | |
| | | if (!item.field || item.writein === 'false') return |
| | | |
| | | _arr.push(item.field.toLowerCase()) |
| | | _form.push(item.field + '=@' + item.field) |
| | | if (item.field.toLowerCase() === 'bid' && item.uuid === 'BID') { |
| | | _form.push(item.field + '=@BID@') |
| | | } else { |
| | | _form.push(item.field + '=@' + item.field) |
| | | } |
| | | }) |
| | | |
| | | if (this.props.card.sqlType === 'audit') { |
| | |
| | | const { verify, oriVerify } = this.state |
| | | // 表单提交时检查输入值是否正确 |
| | | return new Promise((resolve, reject) => { |
| | | let msg = '' |
| | | if (this.customForm && this.customForm.state.editItem) { |
| | | msg = '自定义验证' |
| | | } else if (this.customForm && this.customForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.customForm.props.form.getFieldValue('sql'))) { |
| | | msg = '自定义验证' |
| | | } else if (this.orderForm && this.orderForm.state.editItem) { |
| | | msg = '单号生成' |
| | | } else if (this.scriptsForm && this.scriptsForm.state.editItem) { |
| | | msg = '自定义脚本' |
| | | } else if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) { |
| | | msg = '自定义脚本' |
| | | } |
| | | |
| | | if (!is(fromJS(verify), fromJS(oriVerify))) { |
| | | confirm({ |
| | | content: '验证信息已修改,确定取消吗?', |
| | | onOk() { |
| | | resolve() |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } else if (msg) { |
| | | confirm({ |
| | | content: msg + '未保存,确定取消吗?', |
| | | onOk() { |
| | | resolve() |
| | | }, |
| | |
| | | return ( |
| | | <div id="verify-card-box-tab"> |
| | | <Tabs defaultActiveKey="1" className="verify-card-box"> |
| | | {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab="基础验证" key="1"> |
| | | {card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? <TabPane tab={ |
| | | <span> |
| | | 基础验证 |
| | | {verify.default === 'false' ? <span className="count-tip"><ExclamationOutlined style={{color: 'orange'}}/></span> : null} |
| | | </span> |
| | | } key="1"> |
| | | <Form {...formItemLayout}> |
| | | <Row gutter={24}> |
| | | {this.props.card.sqlType !== 'custom' ? <Col span={8}> |