|
@@ -84,8 +84,14 @@ class MySuspend extends Component {
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
- const { rowData } = this.props
|
|
|
- !!rowData && !!rowData.id && this.getLog(rowData.id)
|
|
|
+ const { rowData, type, again = false } = this.props
|
|
|
+ type == "details" && !!rowData && !!rowData.id && this.getLog(rowData.id)
|
|
|
+ if (again) {
|
|
|
+ this.setState({
|
|
|
+ reason: rowData.reason,
|
|
|
+ orgCodeUrl: splitUrl(rowData.annexUrl, ",", globalConfig.avatarHost + "/upload"),
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -143,6 +149,10 @@ class MySuspend extends Component {
|
|
|
message.warning("请填写原因!");
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.state.reason.replace(/\s+/g, '')) {
|
|
|
+ message.warning("请填写原因!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.setState({
|
|
|
loading: true,
|
|
|
});
|
|
@@ -197,6 +207,10 @@ class MySuspend extends Component {
|
|
|
message.warning("请填写原因!");
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.state.reason.replace(/\s+/g, '')) {
|
|
|
+ message.warning("请填写原因!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.setState({
|
|
|
loading: true,
|
|
|
});
|
|
@@ -246,6 +260,10 @@ class MySuspend extends Component {
|
|
|
message.warning("请填写审核说明~");
|
|
|
return;
|
|
|
}
|
|
|
+ if (!this.state.emReason.replace(/\s+/g, '')) {
|
|
|
+ message.warning("请填写审核说明~");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.setState({
|
|
|
loading: true,
|
|
|
});
|