| | |
| | | salesAssistantName; |
| | | salesAssistantID; |
| | | profileId; |
| | | systemProfileId; |
| | | s1ProfileId; |
| | | s4ProfileId; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | console.log(111); |
| | |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.stageName = result.stageName; |
| | | this.sapSendOK = result.sapSendOK; |
| | | this.cntLostCancelReport = result.cntLostCancelReport; |
| | | this.cntLostCancelDraft = result.cntLostCancelDraft; |
| | | this.agency1 = result.agency1; |
| | | this.agency1Id = result.agency1Id; |
| | | this.name = result.name; |
| | | this.bidPlannedDate = result.bidPlannedDate; |
| | | this.salesAssistantName = result.salesAssistantName; |
| | | this.salesAssistantID = result.salesAssistantID; |
| | | this.profileId = result.profileId; |
| | | console.log(result); |
| | | this.stageName = result.stageName == undefined ? '' : result.stageName; |
| | | this.sapSendOK = result.sapSendOK == undefined ? '' : result.sapSendOK; |
| | | this.cntLostCancelReport = result.cntLostCancelReport == undefined ? '' : result.cntLostCancelReport; |
| | | this.cntLostCancelDraft = result.cntLostCancelDraft == undefined ? '' : result.cntLostCancelDraft; |
| | | this.agency1 = result.agency1 == undefined ? '' : result.agency1; |
| | | this.agency1Id = result.agency1Id == undefined ? '' : result.agency1Id; |
| | | this.name = result.name == undefined ? '' : result.name; |
| | | this.bidPlannedDate = result.bidPlannedDate == undefined ? '' : result.bidPlannedDate.replace(/-/g, '/');; |
| | | this.salesAssistantName = result.salesAssistantName == undefined ? '' : result.salesAssistantName; |
| | | this.salesAssistantID = result.salesAssistantID == undefined ? '' : result.salesAssistantID; |
| | | this.profileId = result.profileId == undefined ? '' : result.profileId; |
| | | this.systemProfileId = result.systemProfileId == undefined ? '' : result.systemProfileId; |
| | | this.s1ProfileId = result.s1ProfileId == undefined ? '' : result.s1ProfileId; |
| | | this.s4ProfileId = result.s4ProfileId == undefined ? '' : result.s4ProfileId; |
| | | this.requestDB(); |
| | | }) |
| | | } |
| | | requestDB(){ |
| | | var profileId = this.profileId; |
| | | if (profileId != '00e10000000Y3o5' && profileId != '00e10000000xnp2' && |
| | | profileId != '00e10000000xnpH') { |
| | | if (profileId != this.systemProfileId && profileId != this.s1ProfileId && |
| | | profileId != this.s4ProfileId) { |
| | | this.showToast("您没有授权委托的权限。请联系系统管理员。","error"); |
| | | } |
| | | // jsの場合、翻訳された値がでるので、要注意 |
| | | else if (this.stageName != '引合' |
| | | && this.stageName != '询价' |
| | | ) { |
| | | this.showToast("状态1:" + this.stageName + "、不能做授权申请!",""); |
| | | this.showToast("状态1:" + this.stageName + "、不能做授权申请!","error"); |
| | | } |
| | | else if (this.sapSendOK == '1') { |
| | | this.showToast("已经上传SAP、不能做授权申请了!","error"); |