导入参数校验
This commit is contained in:
parent
1ce692421a
commit
2adc0ee33a
|
|
@ -39,8 +39,27 @@ export default class ImportModal extends React.Component {
|
|||
this.props.setStep(step - 1);
|
||||
}
|
||||
|
||||
|
||||
validateDate() {
|
||||
const { params } = this.props;
|
||||
let flag = true
|
||||
try {
|
||||
params && Object.keys(params).forEach((key) => {
|
||||
if(!params[key] || params[key] == "") {
|
||||
message.warning("参数不完整");
|
||||
throw new Error("参数不完整")
|
||||
}
|
||||
})
|
||||
} catch(e) {
|
||||
flag = false
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
handleStep1Next() {
|
||||
if(!this.validateDate()) {
|
||||
return
|
||||
}
|
||||
if(this.state.fileId) {
|
||||
this.props.setStep(1)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export default class baseFormModal extends React.Component {
|
|||
saveBasic(params).then((id) => {
|
||||
this.props.onCancel()
|
||||
this.props.onRefresh()
|
||||
window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/calculateDetail?id=" + id)
|
||||
window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/calculateDetailz?id=" + id)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -532,6 +532,7 @@ export default class CumDeduct extends React.Component {
|
|||
init={() => {
|
||||
this.handleInitModal();
|
||||
}}
|
||||
onValidate={() => {this.handleValidate()}}
|
||||
params={modalParam}
|
||||
columns={modalColumns}
|
||||
step={step}
|
||||
|
|
|
|||
Loading…
Reference in New Issue