黄千龙
2023-08-09 626f3c3bb25e204568019e8d568e2d7547d1037a
force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
@@ -175,7 +175,6 @@
          return;
        }
      }
      if (
        this.numberofEffectiveContract == "无" && this.newProductGuaranteTxt != "2: 多年保修" &&
        this.newProductGuaranteTxt != "2: 服务多年保修" && this.newProductGuaranteTxt != "8: 市场多年保修" &&
@@ -185,7 +184,6 @@
          return;
        }
      }
      if ((this.maintenanceContract != undefined || this.VMMaintenanceContract != undefined) &&
        this.onSiteRepair == "RC修理" && this.FSEState == "山东省"
      ) {
@@ -193,7 +191,6 @@
          return;
        }
      }
      var today = Date.now();
      var dateReceiptQuestions = Date.parse(this.dateReceiptQuestions);
      var dates = (today - dateReceiptQuestions) / (24 * 60 * 60 * 1000);
@@ -204,7 +201,6 @@
        alert("申请修理时SAP修理申请日超过问题联络收到日1天,必须填写问超时报告的理由");
        return;
      }
      if (this.quickRepairSign == true && (this.numberofEffectiveContract == "有" || this.newProductGuaranteTxt == "2: 多年保修" ||
          this.newProductGuaranteTxt == "2: 服务多年保修" || this.newProductGuaranteTxt == "8: 市场多年保修") &&
        (this.onSiteRepair == "RC修理" || this.onSiteRepair == "办事处修理" || this.onSiteRepair == "现场修理")) {
@@ -218,14 +214,12 @@
          }
        }
      }
      var returnsProductWay = this.returnsProductway;
      if (returnsProductWay == undefined) {
        if (!confirm("返品方式为空,是否继续申请修理!")) {
          return;
        }
      }
      var DetailedAddress = this.detailedAddress;
      if (this.assetOwner != "Olympus") {
        if (DetailedAddress != undefined) {
@@ -238,7 +232,6 @@
          return;
        }
      }
      queryForEquipments({
        deliveredProductId: this.deliveredProductId,
      }).then(equipments => {
@@ -250,12 +243,10 @@
          }
        }
      });
      if (this.FSEApplyForRepairTime != undefined) {
        alert("已修理申请,不再修理申请了");
        return;
      }
      var surplusCount = 0;
      if (this.URFReapir == false) {
        queryForUrfAsset({
@@ -270,7 +261,6 @@
            surplusCount = seriesMaxRepairCount - seriesRepairCount;
          }
        });
        queryForUrfSeriesInfo({
          URFLimitSerial: this.URFLimitSerial,
        }).then(urfSeriesInfo => {
@@ -278,7 +268,6 @@
          if (urfSeriesInfo != null && urfSeriesInfo.length > 0) {
            urfSeries = urfSeriesInfo[0].URFLimitSerial__c;
          }
          queryForRepairCount({
            maintenanceContractId: this.maintenanceContractId,
            status1: "1.受理完毕",
@@ -291,7 +280,6 @@
          });
        });
      }
      if (this.status != "草案中" && this.status != "1.受理完毕(SAP待发送)" && this.status != "4.修理品返送阶段") {
        alert("不是草案中不能申请");
      } else {
@@ -308,25 +296,20 @@
          });
        }
      }
      if (this.ifDeadHurt == "有") {
        if (!confirm("是否确认AE要提交?")) {
          return;
        }
      }
      if (this.dayLater30 == "是") {
        alert("创建后超过30天,不能申请了");
        return;
      }
      var prompt11 = "合同内大修次数已用完,当前修理为合同外的修理,是否继续?";
      if (this.URFReapir == false && surplusCount == 0) {
        if (!confirm(prompt11)) {
          return;
        }
      }
      updateForRepair1({
        recordId: this.Id
@@ -359,7 +342,6 @@
                  }
                }
              });
              queryForRds({
                recordId: this.Id,
              }).then(rds => {
@@ -370,7 +352,6 @@
                  }
                }
              });
            } else {
              alert("没有找到 修理委托者");
            }
@@ -388,14 +369,25 @@
      console.log(result);
      staticResource = JSON.parse(result);
      AWSService.query(staticResource.queryUrl, this.AWSDataId, function (data) {
        console.log(123);
        console.log(data);
        if (data && data.object) {
          DetailedAddress = data.object.detailedAddress;
        }
        this.foo();
      }, staticResource.token);
      Promise.all([
        loadScript(this, AWSService + '/AWSService.js'),
        loadScript(this, jqueryurl),
        loadScript(this, jq + "/dist/jquery.js"),
        loadScript(this, con),
        loadScript(this, apex),
        loadScript(this, common)
      ]).then(() => {
        window.AWSService.query(staticResource.queryUrl,
          this.AWSDataId,
          function (data) {
            console.log(data);
            if (data && data.object) {
               DetailedAddress = data.object.detailedAddress;
            }
            this.foo();
          },
          staticResource.token);
      });
    })
  }