| | |
| | | if (this.OCSMAdministrativeReportStatusC == undefined && this.AwareDateC != undefined) { |
| | | updateRepair({ |
| | | recordId: this.Id |
| | | }).catch(error => { |
| | | if (error.body.pageErrors.length > 0) { |
| | | // alert(messages.join("\n")); |
| | | var errmsg = error.body.pageErrors[0].message.toString(); |
| | | this.ShowToastEvent(errmsg.join("\n"), "error") |
| | | return; |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } |
| | | location.reload(); |
| | | }) |
| | | window.location.reload(); |
| | | } else { |
| | | this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error") |
| | | return; |