| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-12 14:51:44 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-04-19 09:11:02 |
| | | * @LastEditTime: 2023-05-11 13:46:32 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | isCorrosion; |
| | | profileId; |
| | | ifAuthorizingLock; |
| | | systemProfileId; |
| | | j3ProfileId; |
| | | s61ProfileId; |
| | | s62ProfileId; |
| | | m4ProfileId; |
| | | IsLoading = true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | |
| | | this.isCorrosion = result.isCorrosion; |
| | | this.profileId = result.profileId; |
| | | this.ifAuthorizingLock = result.ifAuthorizingLock; |
| | | this.systemProfileId = result.systemProfileId; |
| | | this.j3ProfileId = result.j3ProfileId; |
| | | this.s61ProfileId = result.s61ProfileId; |
| | | this.s62ProfileId = result.s62ProfileId; |
| | | this.m4ProfileId = result.m4ProfileId; |
| | | this.AgencyAuthorize(); |
| | | }) |
| | | } |
| | |
| | | var oppid = this.recordId; |
| | | var angency = this.agency1Id; |
| | | var profileId = this.profileId; |
| | | |
| | | if (profileId != '00e10000000Y3o5' && profileId != '00e10000000Nab7' && profileId != '00e10000000xnpR' && profileId != '00e10000000xyK6' && profileId != '00e10000000NbCE' |
| | | && profileId != '00e10000000xyK6' && profileId != '00e10000000Nb7i') { |
| | | //测试已锁定授权合同申请为“1” |
| | | this.estimationId = 'test'; |
| | | this.detailNum = 1; |
| | | if (profileId != this.systemProfileId && profileId != this.j3ProfileId && profileId != this.s61ProfileId && profileId != this.s62ProfileId && profileId != this.m4ProfileId) { |
| | | this.showToast("您没有授权申请的权限。请联系系统管理员。","error"); |
| | | return; |
| | | } |
| | |
| | | this.showToast("耗材不可与奥辉产品同时存在!","error"); |
| | | return; |
| | | } else if (this.cntLostCancelDraft > 0) { |
| | | if(!confirm('询价有草案中的取消/失单报告,是否继续?')){ |
| | | return ; |
| | | } |
| | | if(!confirm('询价有草案中的取消/失单报告,是否继续?')){ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return ; |
| | | } |
| | | } else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) { |
| | | this.showToast('询价有已提交的取消/失单报告。',"error"); |
| | | return; |
| | |
| | | } else if (this.salesRoot != '販売店') { |
| | | this.showToast('医院直销不需要授权申请。',"error"); |
| | | return; |
| | | } |
| | | // else if ('{!Opportunity.AcecideCntCheck__c}' != '1') { |
| | | // alert('阿西赛多询价只能包含危化品,或者,普通询价不能包含危化品。'); |
| | | // return; |
| | | // } |
| | | else if (this.ifSubmit == '1') { |
| | | }else if (this.ifSubmit == '1') { |
| | | this.showToast('上传失败,请联系系统管理员!',"error"); |
| | | return; |
| | | } |
| | | if (this.ifAuthorizingLock == 'true') { |
| | | if (this.ifAuthorizingLock == true) { |
| | | this.showToast('询价正在授权中,请不要重复提交。',"error"); |
| | | return; |
| | | } |