yyb
2025-10-22 c6fd16350612b8aef7a04bfbebf6ee3c591a88ae
pages/product/WorkshopOrderCancellationIssued/index.vue
@@ -29,7 +29,7 @@
            ></u-icon>
          </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>
@@ -79,7 +79,7 @@
              size="28"
            ></u-icon>
          </view>
        </view>
        </view> -->
        <view class="packing-registration-param-item param-extra">
          <view class="packing-registration-param-item-left">
            <text class="item-one">取消下发记录:</text>
@@ -114,10 +114,10 @@
              </view>
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">取消下发数量:</view>
                  <view class="_label-name">取消数量:</view>
                </view>
                <view class="_content">
                  {{ item.suppliedQuantity }}
                  {{ item.stockQuantity }}
                </view>
              </view>
            </view>
@@ -133,6 +133,7 @@
      :show-confirm-button="true"
      @confirm="confirm"
      @cancel="cancel"
    >
      <view class="popup-content">
        <view class="packing-registration-param">
@@ -181,12 +182,12 @@
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">取消下发数量</text>
                <text class="item-one">取消数量</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                  class="item-one item-two"
                  v-model="modalList.returnQuantity"
                  v-model="modalList.stockQuantity"
                />
              </view>
            </view>
@@ -246,14 +247,14 @@
    uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器
    uni.$on("scan", function (data) {
      console.log("onscan");
      if (that.registerInfo.workstationId == "") {
        uni.showToast({
          icon: "none",
          title: "请先选择机台!",
          duration: 2 * 1000,
        });
        return;
      }
      // if (that.registerInfo.workstationId == "") {
      //   uni.showToast({
      //     icon: "none",
      //     title: "请先选择机台!",
      //     duration: 2 * 1000,
      //   });
      //   return;
      // }
      if (data.code) {
        //扫码成功后的回调,你可以写自己的逻辑代码在这里
        console.log("扫码结果:", data.code);
@@ -323,22 +324,22 @@
        this.$refs.uModal.clearLoading(); // 清除加载状态
        return;
      }
      if (!this.modalList.returnQuantity) {
        this.$u.toast("请输入取消下发数量");
      if (!this.modalList.stockQuantity) {
        this.$u.toast("请输入取消数量");
        this.$refs.uModal.clearLoading(); // 清除加载状态
        return;
      }
      // 处理确认逻辑
      this.$u.api.WorkshopOrderCancellationIssued.feeding([
        this.modalList,
      ]).then((res) => {
      this.$u.api.WorkshopOrderCancellationIssued.rejectPDA(
        this.modalList
      ).then((res) => {
        console.log("res", res);
        if (res.code === 0) {
          this.$u.toast("提交成功");
          this.showModal = false;
          const obj = {
            suppliedQuantity: this.modalList.suppliedQuantity,
            outBatchNo: this.modalList.returnQuantity,
            stockQuantity: this.modalList.stockQuantity,
            outBatchNo: this.modalList.outBatchNo,
          };
          this.hasScanSnList.push(obj);
        }
@@ -406,21 +407,21 @@
    },
    // 扫码后数据回显
    scanHandle(val) {
      const { outBatchNo } = val;
      const { workstationId, operationTaskId } = this.registerInfo;
      const { BN } = val;
      const { id } = this.registerInfo;
      const obj = {
        outBatchNo: outBatchNo,
        feedingWorkstationId: workstationId,
        operationTaskId: operationTaskId,
        outBatchNo: BN,
        moId: id,
      };
      this.$u.api.WorkshopOrderCancellationIssued.checkReturnPartPDA(obj).then(
        (res) => {
          console.log("res", res);
          if (res.code === 0) {
            this.getHandymanItem(obj);
          }
        }
      );
     this.getReturnInfo(obj);
      // this.$u.api.WorkshopOrderCancellationIssued.checkReturnPartPDA(obj).then(
      //   (res) => {
      //     console.log("res", res);
      //     if (res.code === 0) {
      //       this.getHandymanItem(obj);
      //     }
      //   }
      // );
    },
    //   获取基本信息
    getReturnInfo(obj) {
@@ -482,7 +483,7 @@
  }
  .packing-registration-param-view {
    height: 450rpx;
    height: 200rpx;
    background-color: #fff;
    border-radius: 10rpx;
    padding: 0rpx 23rpx;
@@ -498,8 +499,8 @@
      .packing-registration-param-item-left {
        .item-one {
          font-size: 30rpx;
          color: #666666;
          font-size: small;
          color: #232222;
        }
      }
@@ -514,7 +515,7 @@
        }
        .item-two {
          font-size: 30rpx;
          font-size: small;
          color: #a6b4cc;
          margin-right: 6rpx;
        }
@@ -599,7 +600,7 @@
        ._label-name {
          margin-left: 11rpx;
          font-size: 26rpx;
          font-size: small;
          font-weight: 500;
          color: #666666;
        }
@@ -609,7 +610,7 @@
        flex: 1.5;
        text-align: right;
        color: #909399;
        font-size: 24rpx;
        font-size: small;
      }
      .row-list .s1 {