yyb
13 小时以前 5f2221fbba40d0218e33f73489b3cdf61fa567de
pages/wareHouse/nuclearScale/index.vue
@@ -358,7 +358,11 @@
              "客户不一致:" + res.data + " || " + that.form.customerName1,
            showCancel: true,
            success: function (res) {
              that.ScanCodeRecord.unshift(ScanCodeRecordList);
              if (res.confirm) {
                that.ScanCodeRecord.unshift(ScanCodeRecordList);
              } else if (res.cancel) {
                return;
              }
            },
          });
        } else {
@@ -394,20 +398,26 @@
        });
      }
      // 使用正确的字段名suppliedQuantity,而不是voltage
      const magnetic =
      const magnetic = (
        Number(this.modalList.verificationWeight) -
        Number(this.modalList.forkliftWeight) -
        grossWeightSum;
        grossWeightSum
      ).toFixed(1);
      this.form.verificationWeight = this.modalList.verificationWeight;
      this.form.forkliftWeight = this.modalList.forkliftWeight;
      switch (this.form.productType) {
        case "DT01":
          if (magnetic >= -3 && magnetic <= 3) {
          if (Number(magnetic) >= -3 && Number(magnetic) <= 3) {
            let that = this;
            uni.showModal({
              title: "提示",
              content: "磅差:" + magnetic + ",是否确认提交?",
              success: function (res) {
                  this.allSubmit();
                if (res.confirm) {
                  that.allSubmit();
                } else if (res.cancel) {
                  return;
                }
              },
            });
          } else {
@@ -415,7 +425,7 @@
          }
          break;
        case "DT02":
          if (magnetic >= -0.5 && magnetic <= 0.5) {
          if (Number(magnetic) >= -0.5 && Number(magnetic) <= 0.5) {
            // this.ScanCodeRecord.push(this.form);
            this.allSubmit();
          } else {
@@ -425,6 +435,7 @@
      }
    },
    allSubmit() {
      console.log("进来了", this.ScanCodeRecord);
      this.ScanCodeRecord.forEach((item) => {
        item.batchNo = item.outBatchNo;
      });
@@ -482,7 +493,12 @@
        .catch(() => {
          uni.hideLoading();
          this.$refs.saveForm.cancel();
          this.$u.toast("网络异常,请重试");
          uni.showModal({
            title: "提示",
            content: err.message || "网络异常,请重试",
            showCancel: true,
            success: function (res) {},
          });
        });
    },
    // 提交按钮