yyb
3 天以前 a7d23db4e3bcf4c44b7f8b37e79699a7660a399e
pages/wareHouse/moveWareHouse/index.vue
@@ -16,13 +16,17 @@
            <text class="item-one">库位</text>
          </view>
          <view class="packing-registration-param-item-right">
            <text class="item-one item-two">{{ registerInfo.storageLocation == '' ? "请扫描库位" : registerInfo.storageLocation }}</text>
            <text class="item-one item-two">{{
              registerInfo.toLocationNo == ""
                ? "请扫描库位"
                : registerInfo.toLocationNo
            }}</text>
          </view>
        </view>
        <view class="packing-registration-param-item param-extra">
          <view class="packing-registration-param-item-left">
            <text class="item-one">{{
              `移库记录(${registerInfo.num}条):`
              `移库记录(${hasScanSnList.length}条):`
            }}</text>
          </view>
        </view>
@@ -34,7 +38,6 @@
          class="packing-registration-scroll-list-group"
          :border="false"
        >
          <!-- <div class="tip" style="text-align: center;" v-if="hasScanSnList.length==0">-请扫码-</div> -->
          <view
            class="content"
            v-for="(item, index) in hasScanSnList"
@@ -50,7 +53,7 @@
                  <view class="_label-name">零件号:</view>
                </view>
                <view class="_content">
                  {{ item.value0 }}
                  {{ item.partNo }}
                </view>
              </view>
              <view class="row-list">
@@ -58,7 +61,7 @@
                  <view class="_label-name">批次号:</view>
                </view>
                <view class="_content">
                  {{ item.value1 }}
                  {{ item.outBatchNo }}
                </view>
              </view>
              <view class="row-list">
@@ -66,7 +69,7 @@
                  <view class="_label-name">库位号:</view>
                </view>
                <view class="_content">
                  {{ item.value0 }}
                  {{ item.locationNo }}
                </view>
              </view>
              <view class="row-list">
@@ -74,7 +77,7 @@
                  <view class="_label-name">盘点数量:</view>
                </view>
                <view class="_content">
                  {{ item.value1 }}
                  {{ item.qtyAvailable }}
                </view>
              </view>
            </view>
@@ -98,7 +101,9 @@
                <text class="item-one">批号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one item-two">{{ 111 }}</text>
                <text class="item-one item-two">{{
                  detailedList.outBatchNo
                }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
@@ -106,7 +111,9 @@
                <text class="item-one">零件描述</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one item-two">{{ 111 }}</text>
                <text class="item-one item-two">{{
                  detailedList.partName
                }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
@@ -114,7 +121,9 @@
                <text class="item-one">WDR</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one item-two">{{ 111 }}</text>
                <text class="item-one item-two">{{
                  detailedList.waivDevRejNo
                }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
@@ -122,7 +131,9 @@
                <text class="item-one">现有数量</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one item-two">{{ 111 }}</text>
                <text class="item-one item-two">{{
                  detailedList.qtyAvailable
                }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
@@ -130,7 +141,9 @@
                <text class="item-one">当前库位</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one item-two">{{ 111 }}</text>
                <text class="item-one item-two">{{
                  detailedList.locationNo
                }}</text>
              </view>
            </view>
          </view>
@@ -157,42 +170,13 @@
        backgroundRepeat: "no-repeat",
      },
      registerInfo: {
        storageLocation: "",
        toLocationNo: "",
        num: 0,
      },
      showModal: true, // 控制弹窗显示隐藏的变量
      hasScanSnList: [
        {
          value0: "11111111111111111111111",
          value1: "111",
          value2: "111",
          value3: "111",
        },
        {
          value0: "111",
          value1: "111",
          value2: "111",
          value3: "111",
        },
        {
          value0: "111",
          value1: "111",
          value2: "111",
          value3: "111",
        },
        {
          value0: "111",
          value1: "111",
          value2: "111",
          value3: "111",
        },
        {
          value0: "111",
          value1: "111",
          value2: "111",
          value3: "111",
        },
      ],
      showModal: false, // 控制弹窗显示隐藏的变量
      hasScanSnList: [],
      detailedList: {},
      codeInfoId: "",
    };
  },
  onLoad() {},
@@ -205,28 +189,75 @@
      console.log("页面扫码结果:", data.code);
      if (data.code) {
        let codeInfo = JSON.parse(data.code);
        if (codeInfo.WorkNo) {
          // 扫描报工单二维码
        // 扫描报工单二维码
        // 判断扫描的是库位码还是流转码
        if (codeInfo.LN) {
          that.saveForm(codeInfo);
        } else {
          if (!that.registerInfo.toLocationNo) {
            that.$u.toast("请先扫描库位");
            return;
          }
          that.hasScanSnList = [];
          that.codeInfoId = codeInfo.id;
          that.saveModalForm(codeInfo);
          //   that.getHandelList();
        }
      }
    });
  },
  methods: {
    // getHandelList() {
    //   this.$u.api.workReporting
    //     .getProductMainV1({
    //       current: 1,
    //       size: -1,
    //       id: this.codeInfoId,
    //     })
    //     .then((res) => {
    //       this.hasScanSnList = res.data.productOutputList;
    //     });
    // },
    confirm() {
      // 点击确认移库
      if (this.registerInfo.toLocationNo == this.detailedList.locationNo) {
        uni.showToast({
          icon: "none",
          title: "你无法将零件移到相同位置",
          duration: 2 * 1000,
        });
        return;
      }
      // 处理确认逻辑
      this.show = false;
      this.$u.api.shiftingParking
        .moveHousePDA({
          ...this.detailedList,
          toLocationNo: this.registerInfo.toLocationNo,
        })
        .then((res) => {
          console.log("移库记录", res);
          this.hasScanSnList.push(res.data);
          console.log("移库记录", this.hasScanSnList);
          this.$u.toast("移库成功");
        });
    },
    cancel() {
      this.show = false; // 关闭弹窗
      this.showModal = false; // 关闭弹窗
    },
        // 回显扫码的信息-报工单
    // 回显扫码的信息
    saveForm(val) {
      let { WorkNo, ProcessName, ORDER_NO } = val
      this.form.value1 = WorkNo
      this.form.value2 = ProcessName
      this.form.value3 = ORDER_NO
    }
      this.registerInfo.toLocationNo = val.LN;
    },
    saveModalForm(val) {
      this.$u.api.shiftingParking
        .selPartInfoPDA({
          outBatchNo: val.outBatchNo,
        })
        .then((res) => {
          this.detailedList = res.data;
          this.showModal = true;
        });
    },
  },
};
</script>
@@ -329,6 +360,7 @@
    }
  }
}
.wrap .packing-registration-scroll-list {
  height: calc(100vh - var(--window-top) - var(--window-bottom) - 360rpx);
  width: 100%;