buli
2023-05-23 07390e2fcb4adf27c928335bf27ae7939c5a80ad
force-app/main/default/lwc/loanerArrangedEmailLWC/loanerArrangedEmailLWC.js
@@ -116,50 +116,52 @@
               message:"申请单内存在未分配的配套,请分配备品或分割申请单"
            });
           this.dispatchEvent(event);
      }else if(campaignStatus == '取消'){
         // alert("学会取消,不可出库指示");
         const event = new ShowToastEvent({
               title: '提示信息',
               message:"学会取消,不可出库指示"
            });
           this.dispatchEvent(event);
      }else if (this.Assigned_Not_Shipment__c == "0") {
         // alert("没有可以出库指示的明细");
         const event = new ShowToastEvent({
               title: '提示信息',
               message:"没有可以出库指示的明细"
            });
           this.dispatchEvent(event);
      } else if (RentalApply.Demo_purpose1__c == "长期借出" && RentalApply.Contract_pdf_updated__c == "0") {
         // alert("长期借出时,必须先上传契约书");
         const event = new ShowToastEvent({
               title: '提示信息',
               message:"长期借出时,必须先上传契约书"
            });
           this.dispatchEvent(event);
      } else if(RentalApply.Repair__c != '' && RentalApply.Repair__c != null && (RentalApply.Repair_Final_Inspection_Date_F__c != null && RentalApply.Repair_Final_Inspection_Date_F__c != '') || (RentalApply.RC_return_to_office__c != null && RentalApply.RC_return_to_office__c != '')) {
         // alert("修理有最终检测日或修理品返送日,不可出库指示");
         const event = new ShowToastEvent({
               title: '提示信息',
               message:"修理有最终检测日或修理品返送日,不可出库指示"
            });
           this.dispatchEvent(event);
      // 20220217 ljh add OBPM市场活动联动 start
      } else if (records != null && records[0].IF_Approved__c == "true" && (records[0].Meeting_Approved_No__c == null || records[0].Meeting_Approved_No__c == "") ) {
         // alert("没有决裁号的,暂不能出借,请更新裁决信息。");
         const event = new ShowToastEvent({
               title: '提示信息',
               message:"没有决裁号的,暂不能出借,请更新裁决信息。"
            });
           this.dispatchEvent(event);
      } else if (records != null && records[0].IF_Approved__c == "true" && records[0].Meeting_Approved_No__c != "" && statusList.indexOf(records[0].Approved_Status__c) != -1 ) {
         // alert("已申请决裁但决裁状态不符合条件。");
         const event = new ShowToastEvent({
               title: '提示信息',
               message:"已申请决裁但决裁状态不符合条件。"
            });
           this.dispatchEvent(event);
      // 20220217 ljh add OBPM市场活动联动 end
      // }else if(campaignStatus == '取消'){
      //    // alert("学会取消,不可出库指示");
      //    const event = new ShowToastEvent({
    //            title: '提示信息',
    //            message:"学会取消,不可出库指示"
  //           });
  //          this.dispatchEvent(event);
      // }
      // else if (this.Assigned_Not_Shipment__c == "0") {
      //    // alert("没有可以出库指示的明细");
      //    const event = new ShowToastEvent({
    //            title: '提示信息',
    //            message:"没有可以出库指示的明细"
  //           });
  //          this.dispatchEvent(event);
      // }
      //  else if (RentalApply.Demo_purpose1__c == "长期借出" && RentalApply.Contract_pdf_updated__c == "0") {
      //    // alert("长期借出时,必须先上传契约书");
      //    const event = new ShowToastEvent({
    //            title: '提示信息',
    //            message:"长期借出时,必须先上传契约书"
  //           });
  //          this.dispatchEvent(event);
      // } else if(RentalApply.Repair__c != '' && RentalApply.Repair__c != null && (RentalApply.Repair_Final_Inspection_Date_F__c != null && RentalApply.Repair_Final_Inspection_Date_F__c != '') || (RentalApply.RC_return_to_office__c != null && RentalApply.RC_return_to_office__c != '')) {
      //    // alert("修理有最终检测日或修理品返送日,不可出库指示");
      //    const event = new ShowToastEvent({
    //            title: '提示信息',
    //            message:"修理有最终检测日或修理品返送日,不可出库指示"
  //           });
  //          this.dispatchEvent(event);
      // // 20220217 ljh add OBPM市场活动联动 start
      // } else if (records != null && records[0].IF_Approved__c == "true" && (records[0].Meeting_Approved_No__c == null || records[0].Meeting_Approved_No__c == "") ) {
      //    // alert("没有决裁号的,暂不能出借,请更新裁决信息。");
      //    const event = new ShowToastEvent({
    //            title: '提示信息',
    //            message:"没有决裁号的,暂不能出借,请更新裁决信息。"
  //           });
  //          this.dispatchEvent(event);
      // } else if (records != null && records[0].IF_Approved__c == "true" && records[0].Meeting_Approved_No__c != "" && statusList.indexOf(records[0].Approved_Status__c) != -1 ) {
      //    // alert("已申请决裁但决裁状态不符合条件。");
      //    const event = new ShowToastEvent({
    //            title: '提示信息',
    //            message:"已申请决裁但决裁状态不符合条件。"
  //           });
  //          this.dispatchEvent(event);
      // // 20220217 ljh add OBPM市场活动联动 end
      } else {
         console.log("hhhh3");
         let t=await getSessionId();
@@ -186,6 +188,7 @@
            //bp2 alert(rs2);
            //bp2 } else {
            setShipment_requests({raid:null,raesid: this.id}).then(res=>{
               console.log(res);
               if (res == "状态更新到已出库指示") {
                  // alert("状态更新到已出库指示");
                  const event = new ShowToastEvent({
@@ -197,7 +200,7 @@
                     setTimeout(function() {location.href = "/"+this.RentalApplyC;}, 100);
                  });
               } else {
                  // alert(res);
                  console.log(res);
                  const event = new ShowToastEvent({
                        title: '提示信息',
                        message:res