yyb
2025-11-27 24e7868d80a850bbbda953a73e2598675dc228f6
PDA增加投料菜单
已添加1个文件
已修改3个文件
446 ■■■■■ 文件已修改
common/http.api.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/feeding/index.vue 412 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/sys/home/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/http.api.js
@@ -581,7 +581,11 @@
            // é¢†æ–™ç¡®è®¤
            materialRequisition: (params = {}) => vm.$u.get('/mes/jdat_wagonBalance/materialRequisition', params),
        },
        feedingRecord: {
            // èŽ·å–æŠ•æ–™è®°å½•
            getFeedingRecord: (params = {}) => vm.$u.post('/mes/product/pdaProductInput', params),
            deleteProductInput: (params = {}) => vm.$u.delete('/mes/product/deleteProductInput/' + params.id),
        }
    };
}
pages.json
@@ -514,7 +514,7 @@
      }
    },
    // é¢†æ–™
        {
    {
      "path": "pages/storeManagement/MaterialRequisition/index",
      "style": {
        "navigationStyle": "custom",
@@ -524,7 +524,7 @@
      }
    },
    // å–消领料
        {
    {
      "path": "pages/storeManagement/CancelMaterialRequisition/index",
      "style": {
        "navigationStyle": "custom",
@@ -534,7 +534,7 @@
      }
    },
    // å¯¼ä½“备货盘点
        {
    {
      "path": "pages/wareHouse/InventoryCheckConductiveMterials/index",
      "style": {
        "navigationStyle": "custom",
@@ -792,7 +792,7 @@
        "navigationBarBackgroundColor": "#3281FF"
      }
    },
        // æŠ•料列表
    // æŠ•料列表
    {
      "path": "pages/product/report/seachPersonnelNo",
      "style": {
@@ -831,7 +831,7 @@
        "enablePullDownRefresh": false
      }
    },
        // è½¦é—´è®¢å•物料
    // è½¦é—´è®¢å•物料
    {
      "path": "pages/product/WorkshopOrderIssued/comp",
      "style": {
@@ -841,7 +841,7 @@
      }
    },
    // å·¥å•列表
        {
    {
      "path": "pages/product/WorkshopOrderIssued/WorkOrderList",
      "style": {
        "navigationStyle": "custom",
@@ -876,6 +876,15 @@
        "navigationBarTitleText": "工单列表",
        "navigationBarTextStyle": "black",
        "navigationBarBackgroundColor": "#DAE6FB"
      }
    },
    // æŠ•æ–™
    {
      "path": "pages/product/feeding/index",
      "style": {
        "navigationStyle": "custom",
        "navigationBarTitleText": "",
        "enablePullDownRefresh": false
      }
    },
    {
@@ -968,4 +977,4 @@
      }
    ]
  }
}
}
pages/product/feeding/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,412 @@
<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"
    />
    <view class="packing-registration-param">
      <view class="packing-registration-param-view">
        <view class="packing-registration-param-item param-extra">
          <view class="packing-registration-param-item-left">
            <text class="item-one">批次号:</text>
          </view>
          <view class="packing-registration-param-item-right">
            <text class="item-one item-two">{{
              registerInfo.outBatchNo == ""
                ? "请扫描批次号"
                : registerInfo.outBatchNo
            }}</text>
          </view>
        </view>
        <view class="packing-registration-param-item param-extra">
          <view class="packing-registration-param-item-left">
            <text class="item-one">{{
              `投料记录(${hasScanSnList.length}条):`
            }}</text>
          </view>
        </view>
      </view>
    </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"
            @click="cancelReport(item, index)"
          >
            <view class="content-header">
              <view class="content-header-title">{{
                hasScanSnList.length - index
              }}</view>
            </view>
            <view class="content-body">
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">批次号:</view>
                </view>
                <view class="_content">
                  {{ item.ifsBatchNo }}
                </view>
              </view>
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">零件号:</view>
                </view>
                <view class="_content">
                  {{ item.partBatchNo }}
                </view>
              </view>
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">零件描述:</view>
                </view>
                <view class="_content">
                  {{ item.partName }}
                </view>
              </view>
            </view>
          </view>
        </u-cell-group>
      </scroll-view>
    </view>
    <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">
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">批号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one item-two">{{
                  detailedList.ifsBatchNo
                }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">零件号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one item-two">{{
                  detailedList.partBatchNo
                }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">零件描述</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one item-two">{{
                  detailedList.partName
                }}</text>
              </view>
            </view>
          </view>
        </view>
      </view>
    </u-modal>
    <scan></scan>
  </view>
</template>
<script>
import scan from "@/components/scan/scan.vue";
import content_bg from "@/static/custom/moveWareHouse/locNoBg.png";
export default {
  components: {
    scan,
  },
  data() {
    return {
      background: {
        backgroundImage: `url(${content_bg})`,
        backgroundAttachment: "fixed",
        backgroundSize: "100% auto",
        backgroundRepeat: "no-repeat",
      },
      registerInfo: {
        outBatchNo: "",
      },
      showModal: false, // æŽ§åˆ¶å¼¹çª—显示隐藏的变量
      hasScanSnList: [],
      detailedList: {},
      id: "",
    };
  },
  onLoad() {},
  onShow() {
    let that = this;
    uni.$off("scan"); // æ¯æ¬¡è¿›æ¥å…ˆ ç§»é™¤å…¨å±€è‡ªå®šä¹‰äº‹ä»¶ç›‘听器
    uni.$on("scan", function (data) {
      if (data.code) {
        let codeInfo = JSON.parse(data.code);
        if (codeInfo.O) {
          that.saveForm(codeInfo);
        } else {
          if (!that.registerInfo.outBatchNo) {
            that.$u.toast("请先扫描投料二维码");
            return;
          }
          that.saveModalForm(codeInfo);
        }
      }
    });
  },
  methods: {
    cancelReport(item, index) {
      let that = this;
      uni.showModal({
        title: "提示",
        content: "是否确认取消批次" + item.ifsBatchNo + "的报工",
        success: function (res) {
          that.$u.api.feedingRecord
            .deleteProductInput({
              id: item.id,
            })
            .then((res) => {
              that.hasScanSnList.splice(index, 1);
              console.log("res", res);
              that.$u.toast("取消报工成功");
            });
        },
      });
    },
    confirm() {
      // å¤„理确认逻辑
      this.$u.api.feedingRecord
        .getFeedingRecord({
          ...this.detailedList,
          productMainId: this.id,
        })
        .then((res) => {
          this.hasScanSnList.unshift(res.data);
          this.$u.toast("投料成功");
        });
    },
    cancel() {
      this.showModal = false; // å…³é—­å¼¹çª—
    },
    // å›žæ˜¾æ‰«ç çš„信息
    saveForm(val) {
      this.registerInfo.outBatchNo = val.O;
      this.id = val.I;
    },
    saveModalForm(val) {
      let that = this;
      that.detailedList = {
        partBatchNo: val.PN,
        ifsBatchNo: val.BN,
        partName: val.ST,
        inputQuantity: val.NW,
      };
      that.showModal = true;
    },
  },
};
</script>
<style lang="scss" scoped>
.person-btn-view {
  display: flex;
  justify-content: space-between;
  margin-top: 300rpx;
}
.popup-content {
  width: 600rpx;
  height: 500rpx;
  background-color: #fff;
  border-radius: 8px;
  z-index: 10;
  /* ç¡®ä¿å†…容在蒙版之上 */
}
.movewarehouse-index-bg {
  background-color: #f6f9ff;
  background-image: url("~@/static/custom/moveWareHouse/locNoBg.png");
  // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0));
  padding: 0 20rpx;
  background-attachment: fixed;
  background-size: 100% auto;
  background-repeat: no-repeat;
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: -1;
}
.packing-registration-param {
  padding: 40rpx 30rpx 10rpx 30rpx;
  .packing-registration-param-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 30rpx;
    .title-label {
      margin-left: 14rpx;
      font-size: 34rpx;
      font-weight: bold;
      color: #283e65;
    }
  }
  .packing-registration-param-view {
    height: 177rpx;
    background-color: #fff;
    border-radius: 10rpx;
    padding: 0rpx 23rpx;
    margin-bottom: 30rpx;
    .packing-registration-param-item {
      height: 90rpx;
      border: 1px solid #adc8e4;
      line-height: 90rpx;
      display: flex;
      justify-content: space-between;
      border: none;
      .packing-registration-param-item-left {
        .item-one {
          font-size: small;
          color: #1b1a1a;
        }
      }
      .packing-registration-param-item-right {
        display: flex;
        justify-content: space-between;
        .item-one {
          font-size: 30rpx;
          color: #333333;
          margin-right: 6rpx;
        }
        .item-two {
          font-size: small;
          color: #a6b4cc;
          margin-right: 6rpx;
        }
        .item-three {
          font-size: 30rpx;
          color: #214ded;
          margin-right: 6rpx;
        }
      }
    }
    .param-extra {
      border-bottom: 1px solid #ededed;
    }
  }
}
.wrap .packing-registration-scroll-list {
  height: calc(100vh - var(--window-top) - var(--window-bottom) - 360rpx);
  width: 100%;
}
.packing-registration-scroll-list-group {
  ::v-deep .u-cell-item-box {
    background-color: rgba(250, 252, 255, 0.36) !important;
    padding: 0rpx 30rpx;
  }
  .content {
    font-size: 12px;
    background-color: #ffffff;
    box-sizing: border-box;
    border-radius: 10rpx;
    margin: 0rpx 0rpx 16rpx;
    padding: 20rpx 8rpx;
    box-shadow: none;
    display: flex;
    align-items: center;
    .content-header {
      width: 40rpx;
      height: 90rpx;
      display: flex;
      align-items: center;
      .content-header-icon {
        background-image: url("~@/static/custom/moveWareHouse/header_icon.png");
        background-size: 100% auto;
        background-repeat: no-repeat;
        height: 28rpx;
        width: 28rpx;
      }
      .content-header-title {
        margin-left: 11rpx;
        font-size: 26rpx;
        font-weight: bold;
        color: #626369;
      }
    }
    .content-body {
      flex: 1;
      background-color: #ffffff;
      border-radius: 10rpx;
      padding: 0rpx 23rpx;
      .row-list {
        height: 60rpx;
        display: flex;
        flex-direction: row;
        padding: 0px;
        align-items: center;
      }
      .row-list ._label {
        display: flex;
        flex: 0.8;
        color: #909399;
        align-items: center;
        ._label-name {
          margin-left: 11rpx;
          font-size: small;
          font-weight: 500;
          color: #1c1b1b;
        }
      }
      .row-list ._content {
        flex: 1.5;
        text-align: right;
        color: #909399;
        font-size: small;
      }
      .row-list .s1 {
        color: #d35651;
      }
    }
  }
}
</style>
pages/sys/home/index.vue
@@ -52,6 +52,11 @@
                            url: '/pages/product/WorkshopOrderCancellationIssued/index',
                            icon: 'five'
                        },
                        {
                            name: '投料',
                            url: '/pages/product/feeding/index',
                            icon: 'ten'
                        },
                    ]
                },
                {