| | |
| | | if(this.closeForecastedDate == undefined){ |
| | | this.closeForecastedDate = ''; |
| | | }else{ |
| | | this.closeForecastedDate = new String(this.closeForecastedDate).replace("-","/"); |
| | | this.closeForecastedDate = new String(this.closeForecastedDate).replaceAll("-","/"); |
| | | } |
| | | console.log(this.closeForecastedDate); |
| | | if(this.bidPlannedDate == undefined){ |
| | | this.bidPlannedDate = ''; |
| | | }else{ |
| | | this.bidPlannedDate = new String(this.bidPlannedDate).replace("-","/"); |
| | | this.bidPlannedDate = new String(this.bidPlannedDate).replaceAll("-","/"); |
| | | } |
| | | if(this.dealerFinalPrice == undefined){ |
| | | this.dealerFinalPrice = ''; |
| | |
| | | if (this.agency1Id == undefined) { |
| | | newflag = false; |
| | | this.showToast("经销商不存在,不能转成【经销商目标询价】。","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | else if (this.agencyOpportunity != undefined) { |
| | | newflag = false; |
| | | this.showToast("已经转成过【经销商目标询价】。","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | else if (this.trade != '内貿') { |
| | | newflag = false; |
| | | this.showToast("不是内贸,不能转成【经销商目标询价】。","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | else { |
| | | var records = null; |
| | |
| | | hospitalId: this.hospitalId |
| | | }).then(result=>{ |
| | | records = result; |
| | | console.log(records.length); |
| | | if (records == null || records.length == 0) { |
| | | newflag = false; |
| | | this.showToast("没有有效的【经销商医院】。","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | if (newflag) { |
| | | console.log("5"); |
| | |
| | | var recTypeList = result; |
| | | if (recTypeList.length == 0) { |
| | | this.showToast("没有找到,经销商询价的定义。","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } else { |
| | | console.log("7"); |
| | | queryForRecords2({ |
| | |
| | | + encodeURIComponent(this.opportunityCategory); |
| | | console.log(url); |
| | | window.open(url); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } catch (error) { |
| | | console.log(error) |
| | | } |
| | |
| | | }) |
| | | } |
| | | }); |
| | | console.log("4"); |
| | | } |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |