yyb
3 天以前 a7d23db4e3bcf4c44b7f8b37e79699a7660a399e
移库页面
已修改2个文件
154 ■■■■■ 文件已修改
common/http.api.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/wareHouse/moveWareHouse/index.vue 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/http.api.js
@@ -503,12 +503,12 @@
        // 报工
        cancelReporting: {
            // 取消报工确认
            cancelDTAOfWorkApplication: (params = {}) => vm.$u.get('mes/product/cancelDTAOfWorkApplication', params),
            cancelDTAOfWorkApplication: (params = {}) => vm.$u.get('/mes/product/cancelDTAOfWorkApplication', params),
        },
        // 车间订单下发
        WorkshopOrderIssued: {
            // 查询子件
            manufacturingOrder: (params = {}) => vm.$u.get('mes/plan/manufacturingOrder/' + params.id),
            manufacturingOrder: (params = {}) => vm.$u.get('/mes/plan/manufacturingOrder/' + params.id),
            // 检查校验
            checkRawPart: (params = {}) => vm.$u.post('/mes/product/checkRawPart/'+ params.operationTaskId,params),
            
@@ -516,6 +516,14 @@
        // 车间订单取消下发
        WorkshopOrderCancellationIssued: {
        },
        // 移库
        shiftingParking: {
            // 零件信息
            selPartInfoPDA: (params = {}) => vm.$u.get('/mes/stock/selPartInfoPDA/' + params.outBatchNo),
            // 确认移库
            moveHousePDA: (params = {}) => vm.$u.post('/mes/applyPart/moveHousePDA', params),
        }
    };
pages/wareHouse/moveWareHouse/index.vue
@@ -1,8 +1,14 @@
<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">
@@ -11,16 +17,16 @@
                    </view>
                    <view class="packing-registration-param-item-right">
                        <text class="item-one item-two">{{
              registerInfo.proposedLocation == ""
              registerInfo.toLocationNo == ""
                ? "请扫描库位"
                : registerInfo.proposedLocation
                : registerInfo.toLocationNo
            }}</text>
                    </view>
                </view>
                <view class="packing-registration-param-item param-extra">
                    <view class="packing-registration-param-item-left">
                        <text class="item-one">{{
              `移库记录(${hasScanSnList.length + 1}条):`
              `移库记录(${hasScanSnList.length}条):`
            }}</text>
                    </view>
                </view>
@@ -28,8 +34,16 @@
        </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">
                    <view class="content" v-for="(item, index) in hasScanSnList" :key="index" :index="index">
        <u-cell-group
          class="packing-registration-scroll-list-group"
          :border="false"
        >
          <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>
@@ -47,7 +61,7 @@
                                    <view class="_label-name">批次号:</view>
                                </view>
                                <view class="_content">
                                    {{ item.moNo }}
                  {{ item.outBatchNo }}
                                </view>
                            </view>
                            <view class="row-list">
@@ -55,7 +69,7 @@
                                    <view class="_label-name">库位号:</view>
                                </view>
                                <view class="_content">
                                    {{ item.proposedLocation }}
                  {{ item.locationNo }}
                                </view>
                            </view>
                            <view class="row-list">
@@ -63,7 +77,7 @@
                                    <view class="_label-name">盘点数量:</view>
                                </view>
                                <view class="_content">
                                    {{ item.value1 }}
                  {{ item.qtyAvailable }}
                                </view>
                            </view>
                        </view>
@@ -71,8 +85,14 @@
                </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">
@@ -81,7 +101,9 @@
                                <text class="item-one">批号</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <text class="item-one item-two">{{ detailedList.moNo }}</text>
                <text class="item-one item-two">{{
                  detailedList.outBatchNo
                }}</text>
                            </view>
                        </view>
                        <view class="packing-registration-param-item param-extra">
@@ -99,7 +121,9 @@
                                <text class="item-one">WDR</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <text class="item-one item-two">{{ detailedList.WDR }}</text>
                <text class="item-one item-two">{{
                  detailedList.waivDevRejNo
                }}</text>
                            </view>
                        </view>
                        <view class="packing-registration-param-item param-extra">
@@ -107,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">
@@ -116,7 +142,7 @@
                            </view>
                            <view class="packing-registration-param-item-right">
                                <text class="item-one item-two">{{
                  detailedList.proposedLocation
                  detailedList.locationNo
                }}</text>
                            </view>
                        </view>
@@ -144,18 +170,13 @@
                    backgroundRepeat: "no-repeat",
                },
                registerInfo: {
                    storageLocation: "",
        toLocationNo: "",
                    num: 0,
                },
                showModal: false, // 控制弹窗显示隐藏的变量
                hasScanSnList: [],
                detailedList: {
                    moNo: "",
                    partNo: "",
                    proposedLocation: "",
                    WDR: "",
                },
                codeInfoId: '',
      detailedList: {},
      codeInfoId: "",
            };
        },
        onLoad() {},
@@ -171,57 +192,72 @@
                    // 扫描报工单二维码
                    // 判断扫描的是库位码还是流转码
                    if (codeInfo.LN) {
                        that.saveForm(codeInfo)
          that.saveForm(codeInfo);
                    } else {
                        that.codeInfoId = codeInfo.id
                        that.saveModalForm(codeInfo)
                        that.getHandelList();
          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;
                    });
            },
    // getHandelList() {
    //   this.$u.api.workReporting
    //     .getProductMainV1({
    //       current: 1,
    //       size: -1,
    //       id: this.codeInfoId,
    //     })
    //     .then((res) => {
    //       this.hasScanSnList = res.data.productOutputList;
    //     });
    // },
            confirm() {
                // 处理确认逻辑
                // 点击确认移库
                if (true) {
      if (this.registerInfo.toLocationNo == this.detailedList.locationNo) {
                    uni.showToast({
                        icon: "none",
                        title: "你无法将零件移到相同位置",
                        duration: 2 * 1000,
                    });
                    return
        return;
                }
                this.getHandelList()
                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) {
                this.registerInfo.proposedLocation = val.LN
      this.registerInfo.toLocationNo = val.LN;
            },
            saveModalForm(val) {
                this.detailedList = {
                        moNo: val.moNo,
                        partNo: val.partNo,
                        proposedLocation: val.proposedLocation,
                        WDR: val.WDR,
      this.$u.api.shiftingParking
        .selPartInfoPDA({
          outBatchNo: val.outBatchNo,
        })
        .then((res) => {
          this.detailedList = res.data;
          this.showModal = true;
        });
                    },
                    this.show = true;
            }
        },
    };
</script>