yyb
4 天以前 b8a2d6da97b148e661997a97fa46d75bdea961e5
移库功能点逻辑编写
已修改1个文件
65 ■■■■ 文件已修改
pages/wareHouse/moveWareHouse/index.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/wareHouse/moveWareHouse/index.vue
@@ -1,14 +1,8 @@
<template>
  <view class="page">
    <view class="movewarehouse-index-bg" />
    <u-navbar
      title="移库"
      :background="background"
      :border-bottom="false"
      :title-bold="true"
      title-color="#000"
      back-icon-color="#000"
    />
        <u-navbar title="移库" :background="background" :border-bottom="false" :title-bold="true" title-color="#000"
            back-icon-color="#000" />
    <view class="packing-registration-param">
      <view class="packing-registration-param-view">
        <view class="packing-registration-param-item param-extra">
@@ -16,7 +10,8 @@
            <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.storageLocation == '' ? "请扫描库位" : registerInfo.storageLocation }}</text>
          </view>
        </view>
        <view class="packing-registration-param-item param-extra">
@@ -30,17 +25,9 @@
    </view>
    <view class="wrap">
      <scroll-view class="packing-registration-scroll-list" scroll-y="true">
        <u-cell-group
          class="packing-registration-scroll-list-group"
          :border="false"
        >
                <u-cell-group 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"
            :key="index"
            :index="index"
          >
                    <view class="content" v-for="(item, index) in hasScanSnList" :key="index" :index="index">
            <view class="content-header">
              <view class="content-header-title">{{ index + 1 }}</view>
            </view>
@@ -82,14 +69,8 @@
        </u-cell-group>
      </scroll-view>
    </view>
    <u-modal
      v-model="showModal"
      title=""
      :show-cancel-button="true"
      :show-confirm-button="true"
      @confirm="confirm"
      @cancel="cancel"
    >
        <u-modal v-model="showModal" title="" :show-cancel-button="true" :show-confirm-button="true" @confirm="confirm"
            @cancel="cancel">
      <view class="popup-content">
        <view class="packing-registration-param">
          <view class="packing-registration-param-view">
@@ -161,8 +142,7 @@
        num: 0,
      },
      showModal: true, // 控制弹窗显示隐藏的变量
      hasScanSnList: [
        {
                hasScanSnList: [{
          value0: "11111111111111111111111",
          value1: "111",
          value2: "111",
@@ -205,10 +185,8 @@
      console.log("页面扫码结果:", data.code);
      if (data.code) {
        let codeInfo = JSON.parse(data.code);
        if (codeInfo.WorkNo) {
          // 扫描报工单二维码
          that.saveForm(codeInfo);
        }
      }
    });
  },
@@ -219,13 +197,29 @@
    },
    cancel() {
      this.show = false; // 关闭弹窗
                // 点击确认移库
                if (_) {
                    uni.showToast({
                        icon: "none",
                        title: "你无法将零件移到相同位置",
                        duration: 2 * 1000,
                    });
                    return
                }
                this.$u.api.workReporting._({}).then((res) => {
                    console.log("res", res);
                    this.hasScanSnList = res.data.records;
                });
    },
        // 回显扫码的信息-报工单
    saveForm(val) {
      let { WorkNo, ProcessName, ORDER_NO } = val
      this.form.value1 = WorkNo
      this.form.value2 = ProcessName
      this.form.value3 = ORDER_NO
                // 判断扫描的是库位码还是流转码
                if (_) {
                    this.registerInfo.storageLocation = val.storageLocation
                }
                if (_) {
                    this.show = true;
                }
    }
  },
};
@@ -329,6 +323,7 @@
    }
  }
}
.wrap .packing-registration-scroll-list {
  height: calc(100vh - var(--window-top) - var(--window-bottom) - 360rpx);
  width: 100%;