| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // OCSM不要报告 |
| | |
| | | if (!confirm("不要报告后无法撤回,是否继续?")) { |
| | | return; |
| | | } |
| | | |
| | | if (this.OCSMAdministrativeReportNumberC != undefined || |
| | | this.OCSMAdministrativeReportDateC != undefined) { |
| | | this.ShowToastEvent("已经报告的QIS,不可以点击OCSM不要报告。", "error") |
| | | // alert("已经报告的QIS,不可以点击OCSM不要报告。"); |
| | | return; |
| | | } |
| | | |
| | | if (this.AwareDateC != undefined) { |
| | | updateRepair({ |
| | | recordId: this.Id |
| | | }).catch(error => { |
| | | if (error.body.pageErrors.length > 0) { |
| | | var errmsg = error.body.pageErrors[0].message.toString(); |
| | | this.ShowToastEvent(errmsg.join("\n"), "error") |
| | | // alert(errmsg.join("\n")); |
| | | return; |
| | | } |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } |
| | | window.location.reload(); |
| | | }) |
| | | window.location.reload(); |
| | | } else { |
| | | this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error") |
| | | // alert("没有AwareDate或已经OCSM行政报告,请确认。"); |
| | | return; |
| | | } |
| | | } |