yyb
2025-06-18 76486524892abdfd3039eedc28d83cbbfb56d042
pages/product/report/index.vue
@@ -74,13 +74,13 @@
          <u-radio name="投料">投料</u-radio>
        </u-radio-group>
      </u-form-item>
      <u-form-item label="工序" prop="value1">
      <u-form-item label="工序">
        <u-checkbox-group>
          <u-checkbox
            :name="item.name"
            v-for="(item, index) in checkboxList"
            :key="index"
            v-model="item.value1"
            v-model="item.value"
            @change="changeCheckbox"
            :disabled="subdisabled || item.disabled"
          >
@@ -243,6 +243,7 @@
      showSave: false,
      operationTaskId: "",
      subdisabled: false,
      codeInfoId: "",
    };
  },
  // 点击提交按钮的事件处理函数
@@ -278,18 +279,11 @@
      //扫码成功后的回调,你可以写自己的逻辑代码在这里
      if (data.code) {
        let codeInfo = JSON.parse(data.code);
        that.codeInfoId = codeInfo.id;
        if (codeInfo.moOn) {
          // 扫描报工单二维码
          that.saveForm(codeInfo);
          that.$u.api.workReporting
            .getProductMainV1({
              current: 1,
              size: -1,
              id: codeInfo.id,
            })
            .then((res) => {
              that.InventoryReceiptList = res.data.productOutputList;
            });
          that.getHandelList();
        }
      }
    });
@@ -297,9 +291,22 @@
  watch: {
    "form.taskNo": function (newVal, oldVal) {
      this.subdisabled = false;
      this.checkboxList[1].value = false;
      this.checkboxList[0].value = false;
    },
  },
  methods: {
    getHandelList() {
      this.$u.api.workReporting
        .getProductMainV1({
          current: 1,
          size: -1,
          id: this.codeInfoId,
        })
        .then((res) => {
          this.InventoryReceiptList = res.data.productOutputList;
        });
    },
    // 多选处理
    changeCheckbox(val) {
      if (val.name === "工序的自动报告") {
@@ -311,6 +318,7 @@
    },
    handleUpdate() {
      this.subdisabled = true;
      this.getHandelList();
    },
    // 打开弹框--后面还需要监听扫码枪扫码结果,赋值给报工单号字段,然后打开弹框选择订单号等操作
    open() {
@@ -355,6 +363,8 @@
        autoReport: false,
        simplifyMaterials: false,
      };
      this.checkboxList[1].value = false;
      this.checkboxList[0].value = false;
      if (this.form.materialcost == "倒冲") {
        this.checkboxList[1].disabled = true;
      }