huanghongfeng
2025-11-10 234e0265fbed611b20f0903bb69fbf0bd5417c1c
ÏîÄ¿´úÂë/PDA/pages/EmptyTraycode/EmptyOperator.vue
@@ -1,21 +1,33 @@
<template>
   <view class="login__info tn-flex tn-flex-direction-column tn-flex-col-center tn-flex-row-center">
      <view
         class="login__info__item__input tn-flex tn-flex-direction-row tn-flex-nowrap tn-flex-col-center tn-flex-row-left">
         <view class="login__info__item__input__content">
            <input maxlength="500" style="height: 40px;" v-model="barcode" focus="true" placeholder-class="input-placeholder"
               @input="barcodeInput" placeholder="请扫描托盘条码" />
         </view>
      </view>
      <view
         class="login__info__item__input tn-flex tn-flex-direction-row tn-flex-nowrap tn-flex-col-center tn-flex-row-left">
         <view class="login__info__item__input__content">
            <input maxlength="500" v-model="cacheName" placeholder-class="input-placeholder" @click="cacheshow=true"
               placeholder="请选择空托" />
            <u-picker v-model="cacheshow" mode="selector" :range="selectorCache" range-key="cateName"
               placeholder="请选择托盘类型" />
            <u-picker v-model="cacheshow" mode="selector" :range="selectorCache" range-key="cateName"
               @confirm="cacheConfirm"></u-picker>
         </view>
      </view>
      <view class="login__info__item__button tn-cool-bg-color-7--reverse" @tap="submit()" hover-class="tn-hover"
         :hover-stay-time="150">呼叫空托
         :hover-stay-time="150">新增托盘
      </view>
      <u-toast ref="uToast"></u-toast>
      
   </view>
</template>
<script>
@@ -26,7 +38,9 @@
            cacheNo: '',
            cacheName: '',
            cacheshow: false,
            selectorCache: []
            selectorCache: [],
            barcode:"",
         }
      },
      mounted(){
@@ -39,36 +53,42 @@
            this.cacheName = x.cateName
            this.cacheNo = x.id
         },
         ///条码
         barcodeInput: function(e) {
            this.barcode = e.detail.value;
         },
         SetCacheList(){
            this.$u.get("/api/Sys_Traycodeinfo/SetCacheList").then(res => {
            this.$u.get("/api/Dt_pallet/SetCacheList").then(res => {
               for (let i = 0; i < res.data.length; i++) {
                   this.selectorCache.push({
                     cateName: res.data[i].traycode_name,
                     id: res.data[i].traycode_type
                     cateName: res.data[i].palletname,
                     id: res.data[i].palletnumber
                   })
                 }
            });
         },
         submit() {
            let radio = ''
            this.$u.post("/api/Task/EmptyOutbound", {
            if (this.barcode == '') {
               this.$t.message.toast('托盘条码不能为空');
               return
            }
            if (this.cacheName == '') {
               this.$t.message.toast('请选择车型');
               return
            }
            this.$u.post("/api/Sys_Traycodeinfo/AddTenantInfo", {
               MainData: {
                  cacheNo: this.cacheNo,
                  barcode:this.barcode
               }
            }).then(res => {
               console.log(res)
               if(res.status){
                  this.barcode="";
                  this.cacheName = '';
               }
               this.$t.message.toast(res.message);
            })
            // this.$u.post("/api/Task/MaintenanceStorage", {
            //    MainData: {
            //       barcode: "800010",
            //       Stationnumber:"2014"
            //    }
            // }).then(res => {
            //    console.log(res)
            //    this.$t.message.toast(res.message);
            // })
         }
      }
   }
@@ -80,7 +100,10 @@
   .rocket-sussuspension {
      animation: suspension 3s ease-in-out infinite;
   }
   .u-icon-plus, .u-icon-minus{
      width: 40px;
   }
   @keyframes suspension {
      0%,