zjj
2025-05-07 f815627a748d2ec5f68f1579443e231acc6fd1ba
pages/listing/matnrPalletising.vue
@@ -1,5 +1,7 @@
<template>
   <view class="has-foot">
      <view>
      <form>
         <view class="cu-form-group margin-top">
            <view class="title">容器号</view>
@@ -11,15 +13,17 @@
            <input placeholder="请扫描物料编码" v-model="matnrCode"></input>
            <text class='cuIcon-search text-blue' @click="search"></text>
         </view>
         <!-- <view class="cu-form-group">
            <view class="title">批次号</view>
            <input placeholder="请输入物料批次" v-model="batch"></input>
         </view> -->
         <view class="cu-form-group">
            <view class="title">ASN单号</view>
            <input placeholder="请输入ASN单号" v-model="asnCode"></input>
         </view>
      </form>
      <view class="flex solid-bottom padding-sm justify-between">
         <view class="text-blue">物料总类:{{list.length}}</view>
         <view class="text-blue">组盘总数:{{allCount}}</view>
      </view>
      </view>
      <view class="padding-lr margin-top-sm">
@@ -139,7 +143,7 @@
            megreQty: '',
            list: [],
            range: [],
            batch: '',
            asnCode: '',
            repeatClick: false,
            isconfirm: false,            
            matnrCode:'',
@@ -153,7 +157,7 @@
         }
      },
      mounted() {},
      methods: {
      methods: {
         async search() {
            const find = this.list.find(el => el.trackCode === this.barcode);
            find ? this.scrollTo() : this.getDet();
@@ -165,9 +169,35 @@
               data,
               msg
            } = await request('/asnOrderItem/trackCode', {
               matnrCode: this.matnrCode
               matnrCode: this.matnrCode,
               asnCode: this.asnCode
            }, "post")
            if (code === 200) {
               // if(data !== [] || data !== null){
               // uni.navigateTo({
               //       url: "../listing/itemSelect",
               //       success: function(res) {
               //          // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
               //          res.eventChannel.emit('data', {
               //             item: data
               //          })
               //       },
               //       events: {
               //          // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
               //          acceptDataFromOpenedPage: function(data) {
               //             that.matnr = data.data
               //             that.findMat(that.matnr)
               //          },
               //       },
               //    });
               // }
               for (var i = 0; i < data.length; i++) {
                  data[i].receiptQty =1;
                  data[i].selected = false;
               }
               this.list = data
            } else {
               uni.showToast({
@@ -225,6 +255,7 @@
         async confirm() {
            this.repeatClick = true
            const newArr = this.list.map(item => {
               return {
                  ...item,
                  anfme: item.anfme === null ? 0 : +item.anfme,                  
@@ -237,8 +268,7 @@
               msg
            } = await request('/waitPakin/merge', {
               items: newArr,
               barcode: this.container,
               batch: this.batch,
               barcode: this.container,
            })
            if (code === 200) {
               uni.showToast({