Commit 6fbb2a8ae4797d06d3880d6c0b29a27718bf0ac6
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
1 changed file
with
3 additions
and
2 deletions
src/components/Common/CommonComponent/index.js
| @@ -340,6 +340,7 @@ export default class CommonComponent extends Component { | @@ -340,6 +340,7 @@ export default class CommonComponent extends Component { | ||
| 340 | const sDateFormatTypeList = ['phone', 'mobile', 'mail', 'postcode']; | 340 | const sDateFormatTypeList = ['phone', 'mobile', 'mail', 'postcode']; |
| 341 | const { sName, showName, sDateFormat } = this.props.showConfig; | 341 | const { sName, showName, sDateFormat } = this.props.showConfig; |
| 342 | const { record } = this.props; | 342 | const { record } = this.props; |
| 343 | + const IncorrectFormat = commonFunc.showLocalMessage(this.props, 'IncorrectFormat', '格式不正确'); | ||
| 343 | const value = record[sName]; | 344 | const value = record[sName]; |
| 344 | if ( | 345 | if ( |
| 345 | value !== undefined && value !== '' && sDateFormatTypeList.includes(sDateFormat) | 346 | value !== undefined && value !== '' && sDateFormatTypeList.includes(sDateFormat) |
| @@ -372,8 +373,8 @@ export default class CommonComponent extends Component { | @@ -372,8 +373,8 @@ export default class CommonComponent extends Component { | ||
| 372 | } | 373 | } |
| 373 | 374 | ||
| 374 | if (flag) { | 375 | if (flag) { |
| 375 | - this.props.onChange(this.props.name, 'verificationFailed', { verificationFailed: true, verificationFailedMsg: `【${showName}】【${sName}】格式不正确!` }, this.props.sId, []); | ||
| 376 | - message.warning(`【${showName}】【${sName}】格式不正确!`); | 376 | + this.props.onChange(this.props.name, 'verificationFailed', { verificationFailed: true, verificationFailedMsg: `【${showName}】【${sName}】${IncorrectFormat}!` }, this.props.sId, []); |
| 377 | + message.warning(`【${showName}】【${sName}】${IncorrectFormat}!`); | ||
| 377 | } else if (record.verificationFailed) { | 378 | } else if (record.verificationFailed) { |
| 378 | record.verificationFailed = undefined; | 379 | record.verificationFailed = undefined; |
| 379 | } | 380 | } |