已修改3个文件
65 ■■■■■ 文件已修改
pages/product/report/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/wareHouse/nuclearScale/index.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/wareHouse/nuclearScale/saveForm.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/report/index.vue
@@ -711,6 +711,7 @@
          copperList.productStaffIds = this.form.productStaffIds;
          copperList.productStaffs = this.form.productStaffs;
          copperList.dutyRecordId = this.dutyId;
          copperList.proposedLocation = this.form.proposedLocation;
          this.form.productOutputList = [];
          this.form.operationTaskId = this.form.id;
          this.form.dutyRecordId = this.dutyId;
@@ -718,9 +719,14 @@
          console.log("this.form", this.form);
          this.$u.api.workReporting.submitPDA(this.form).then((res) => {
            this.subdisabled = true;
            this.form.outBatchNo = val.BN;
             this.form.netWeight = val.NW;
            this.InventoryReceiptList.unshift(this.form);
            console.log("val", val);
            // this.form.outBatchNo = val.BN;
            // this.form.netWeight = val.NW;
            console.log("this.form", this.form);
            this.InventoryReceiptList.unshift(this.form.productOutputList[0]);
            console.log("this.InventoryReceiptList", this.InventoryReceiptList);
            // this.getHandelList();
            this.$u.toast("报工成功");
          });
pages/wareHouse/nuclearScale/index.vue
@@ -337,13 +337,13 @@
        if (that.form.productType == "TG01") {
          that.$refs.saveForm.open(ScanCodeRecordList);
        } else {
          that.queryCustomName(codeInfo,ScanCodeRecordList);
          that.queryCustomName(codeInfo, ScanCodeRecordList);
        }
      }
    });
  },
  methods: {
    queryCustomName(codeInfo,ScanCodeRecordList) {
    queryCustomName(codeInfo, ScanCodeRecordList) {
      // 查询客户名称
      this.$u.api.NuclearScaleEntry.queryCustomName({
        BN: codeInfo.BN,
@@ -354,10 +354,11 @@
          // 扫描报工单二维码
          uni.showModal({
            title: "提示",
            content: "客户不一致:" + res.data + " || " + that.form.customerName1,
            content:
              "客户不一致:" + res.data + " || " + that.form.customerName1,
            showCancel: true,
            success: function (res) {
                that.ScanCodeRecord.unshift(ScanCodeRecordList);
              that.ScanCodeRecord.unshift(ScanCodeRecordList);
            },
          });
        } else {
@@ -393,22 +394,29 @@
        });
      }
      // 使用正确的字段名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) {
            this.allSubmit();
          if (Number(magnetic) >= -3 && Number(magnetic) <= 3) {
            let that = this;
            uni.showModal({
              title: "提示",
              content: "磅差:" + magnetic + ",是否确认提交?",
              success: function (res) {
                  that.allSubmit();
              },
            });
          } else {
            this.$u.toast("磅差:" + magnetic + ",请车间核查");
          }
          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 {
@@ -418,6 +426,7 @@
      }
    },
    allSubmit() {
      console.log("进来了", this.ScanCodeRecord);
      this.ScanCodeRecord.forEach((item) => {
        item.batchNo = item.outBatchNo;
      });
@@ -475,7 +484,12 @@
        .catch(() => {
          uni.hideLoading();
          this.$refs.saveForm.cancel();
          this.$u.toast("网络异常,请重试");
          uni.showModal({
            title: "提示",
            content: err.message || "网络异常,请重试",
            showCancel: true,
            success: function (res) {},
          });
        });
    },
    // 提交按钮
pages/wareHouse/nuclearScale/saveForm.vue
@@ -99,22 +99,22 @@
              <u-input class="item-one item-two" v-model="form.forkliftWeight" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
          <!-- <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">长度</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.originalLength" disabled />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
          </view> -->
          <!-- <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">盘号</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.palletNo" disabled />
            </view>
          </view>
          </view> -->
        </view>
      </scroll-view>
    </view>
@@ -133,7 +133,9 @@
  data() {
    return {
      show: false,
      form: {},
      form: {
        forkliftWeight: '0',
      },
    };
  },
  methods: {
@@ -162,7 +164,7 @@
      //    -10kg 以内
      //    核磅重量-2(新的毛重)皮重(新的毛重-净重)超过 10kg提示生产核查(不能提交)
      // (2).导体
      //    正磅差:0-3kg可直接提交
      //    正磅差:3-3kg可直接提交
      //    超过 3kg及 负磅差提示生产核查(不能提交)
      // (3).导体2.6
      //     士0.5kg 都可直接提交
@@ -293,7 +295,10 @@
    },
    open(val) {
      this.show = true;
      this.form = val;
    this.form = {
      ...val,
      forkliftWeight: val.forkliftWeight !== undefined ? val.forkliftWeight : 0
    };
    },
  },
};