| | |
| | | status;//状态 |
| | | profileId;//profileId id |
| | | systemProfileId; |
| | | SalesManagerId; |
| | | SalesHospitalId; |
| | | TwoS1_Sales_Hospital; |
| | | TwoS4_Sales_Manager; |
| | | IsLoading = true; |
| | | |
| | | @wire(CurrentPageReference) |
| | |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(); |
| | | this.IsLoading = false; |
| | | this.status = result.status; |
| | | this.profileId = result.profileId; |
| | | this.systemProfileId = result.systemProfileId; |
| | | this.SalesManagerId = result.SalesManagerId; |
| | | this.SalesHospitalId = result.SalesHospitalId; |
| | | this.TwoS1_Sales_Hospital = result.TwoS1_Sales_Hospital; |
| | | this.TwoS4_Sales_Manager = result.TwoS4_Sales_Manager; |
| | | this.LoseButton(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | |
| | | LoseButton(){ |
| | | sqlResult({id: this.recordId}).then(result=>{ |
| | | //简档权限 2S1_销售医院担当 2S4_销售管理者 系统管理员 |
| | | if (this.profileId != this.SalesManagerId && this.profileId != this.SalesHospitalId && this.profileId != this.systemProfileId) { |
| | | if (this.profileId != this.TwoS1_Sales_Hospital && this.profileId != this.TwoS4_Sales_Manager && this.profileId != this.systemProfileId) { |
| | | this.showToast("您没有权限,无法创建询价提交失单。","error"); |
| | | return; |
| | | } |
| | | // 判断内部确认状态 |
| | | if(this.status == '01.待确认'|| this.status == '02.不相关'){ |
| | | console.log('没走吗'); |
| | | this.showToast("状态为待确认或不相关,不可以做失单。","error"); |
| | | return; |
| | | } |