| | |
| | | this.RentalApplyDiscountApproval(); |
| | | } |
| | | }) |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | |
| | | |
| | | if (power != '2B2_备品中心检测&仓库管理') { |
| | | this.ShowToastEvent("对不起,您没有权限提交此申请!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | var status = this.RentalApplyDiscountStatusC; |
| | | if (status == '审批中') { |
| | | this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (status == '批准') { |
| | | this.ShowToastEvent("审批已批准,请勿再提交!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (status == '草案中' || status == undefined || status == '驳回') { |
| | |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert("提交失败 " + split[1]); |
| | | this.ShowToastEvent("提交失败 " + split[1], "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | }else{ |
| | | this.ShowToastEvent("提交成功!", "success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | } else { |
| | | this.ShowToastEvent("提交失败", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |