dengjunjie
2025-04-26 18d2f40bbf40469b033de6f07ca8a8e3bc191132
ÏîÄ¿´úÂë/ÎߺþÈýÒ»PDA/pages/stash/InEmpty.vue
@@ -2,8 +2,12 @@
   <view>
      <view class="itemstyle">
         <uni-forms label-width="180">
            <uni-forms-item label="托盘条码:">
               <uni-easyinput type="text" placeholder="请扫描托盘条码" ref='midInput' :focus="!focus" v-model="barcode"
            <uni-forms-item label="地标码:">
               <uni-easyinput type="text" placeholder="请扫描地标码" ref='midInput' :focus="!focus" v-model="Station"
                  @input="StationInput" />
            </uni-forms-item>
            <uni-forms-item label="托盘码:">
               <uni-easyinput type="text" placeholder="请扫描托盘码" ref='midInput' :focus="focus1" v-model="barcode"
                  @input="barcodeInput" />
            </uni-forms-item>
            <uni-forms-item>
@@ -21,7 +25,9 @@
      data() {
         return {
            focus: false,
            focus1: false,
            barcode: "",
            Station: "",
            address: "",
            WarehouseId: ""
         }
@@ -39,14 +45,29 @@
            innerAudioContext.src = src; // '../../static/success.mp3';
            innerAudioContext.play();
         },
         barcodeInput() {
         // barcodeInput() {
         //    this.$nextTick(function(x) {
         //       if (this.barcode.length > 0) {
         //          this.focus = true;
         //       }
         //    })
         // },
         StationInput() {
            this.$nextTick(function(x) {
               if (this.barcode.length > 0) {
               if (this.Station.length > 0) {
                  this.focus = true;
                  this.focus1=true;
               }
            })
         },
         InEmpty() {
            if (this.Station == "") {
               this.$refs.uToast.show({
                  title: "请扫描地标码",
                  type: 'error'
               })
               return;
            }
            if (this.barcode == "") {
               this.$refs.uToast.show({
                  title: "请扫描托盘码",
@@ -54,14 +75,17 @@
               })
               return;
            }
            this.$u.post('/api/PDA/InEmpty?barcode=' + this.barcode).then(
            this.$u.post('/api/PDA/InEmpty?barcode=' + this.barcode + '&station=' + this.Station).then(
               res => {
                  if (res.status) {
                     this.$refs.uToast.show({
                        title: "空托入库申请成功",
                        type: "success"
                     })
                     this.Station = "";
                     this.barcode = "";
                     this.focus = false;
                     this.focus1=false;
                  } else {
                     this.$refs.uToast.show({
                        title: res.message,