xiaojiao
15 小时以前 0071cf57931792eb2357a1e67a42bcaa9603c567
ÏîÄ¿´úÂë/PDA/pages/Inbound/Inbound.vue
@@ -2,7 +2,7 @@
   <view>
      <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
      </uni-segmented-control>
      <view v-show="current === 0">
      <!-- <view v-show="current === 0">
         <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="托盘编码">
@@ -20,9 +20,9 @@
            </uni-forms>
            <button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">搬运</button>
         </view>
      </view>
      <view v-show="current === 1">
         <view style="padding: 5%;">
      </view> -->
      <view v-show="current === 0">
         <!-- <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="托盘编码">
                  <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode"
@@ -57,9 +57,24 @@
               </view>
            </uni-forms>
            <button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">组盘</button>
         </view> -->
         <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="载具编号">
                  <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode"
                     v-model="VehicleNumber" placeholder="请输入载具编号" ref='midInput' />
               </uni-forms-item>
               <uni-forms-item label="零件编号:">
                  <uni-easyinput type="text" placeholder="请扫描零件号" ref='midInput' :focus="focus" v-model="materSn" />
               </uni-forms-item>
               <uni-forms-item label="当前位置:">
                  <uni-easyinput type="text" placeholder="请输入备料点位" ref='midInput' :focus="focus2" v-model="Position"/>
               </uni-forms-item>
            </uni-forms>
            <button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">组盘</button>
         </view>
      </view>
      <view v-show="current === 2">
      <view v-show="current === 1">
         <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="托盘编码">
@@ -84,12 +99,18 @@
         return {
            barcodeFocus:true,
            focus: false,
            focus2:false,
            istrue: false,
            addressFocus:false,
            barcodefocus: false,
            range: [],
            rangethree:[],
            group: [],
            group: [{
               orderNo:1,
               warehouseName:'hello测试',
               materialNo:'123'
            }
            ],
            AreaId: 0,
            acrossFloor:0,
            quantity: "",
@@ -97,10 +118,13 @@
            TargetAddress: "",
            PalletCode1: "",
            PalletCode2: "",
            VehicleNumber:"",// è½½å…·ç¼–号
            PalletCode3: "",
            materSn: "",
            items: ['入库','物料绑定', '物料解绑'],
            current: 0
            //items: ['入库','物料绑定', '物料解绑'],
            items: ['物料绑定', '物料解绑'],
            current: 0,
            Position: '', //容器所在位置
         }
      },
      onLoad(res) {
@@ -182,19 +206,30 @@
               }
            })
         },
         GroupPlate() {
            if (this.PalletCode2.length <= 0 && this.InBoundOrder.length) {
         GroupPlate() { // ç»„盘 ç‰©æ–™ç»‘定
            // if (this.PalletCode2.length <= 0 && this.InBoundOrder.length) {
            //    this.$refs.luToast.show({
            //       title: "请输入起点站台",
            //       type: "error"
            //    })
            //    return;
            // }
            if (this.VehicleNumber.length <= 0 || this.materSn.length <= 0 || this.Position.length <= 0) {
               this.$refs.luToast.show({
                  title: "请输入起点站台",
                  title: "数据输入不完整!",
                  type: "error"
               })
               return;
            }
            var param = {
               "PalletCode": this.PalletCode2,
               "groups": this.group
               "VehicleNumber": this.VehicleNumber,
               "materSn":this.materSn,
               "Position": this.Position
            }
            this.$u.post('/api/BoxingInfo/AddGroupPlateAsync', param).then(res => {
            console.log(param)
            this.$u.post('/api/PDA/ContainerbindingAsync', param).then(res => {
               if (res.status) {
                  this.$refs.luToast.show({
                     title: res.message,
@@ -292,19 +327,20 @@
            })
         },
         inputChangebarcode() {
            this.$nextTick(() => {
               this.$u.post('/api/BoxingInfo/GetPalletCodeInfo?palletCode=' + this.PalletCode2, "").then(
                  res => {
                     if (res.status) {
                        this.group = res.data;
                        console.log(this.group);
                        setTimeout(this.updateFocus, 200);
                        setTimeout(() => {
                           this.voiceSpeech('../../static/success.mp3');
                        }, 100);
                     }
                  })
            })
            // this.$nextTick(() => {
            //    this.$u.post('/api/BoxingInfo/GetPalletCodeInfo?palletCode=' + this.PalletCode2, "").then(
            //       res => {
            //          if (res.status) {
            //             this.group = res.data;
            //             console.log(this.group);
            //             setTimeout(this.updateFocus, 200);
            //             setTimeout(() => {
            //                this.voiceSpeech('../../static/success.mp3');
            //             }, 100);
            //          }
            //       })
            // })
            setTimeout(this.updateFocus, 200);
         },
         removeScanItem(orderNo) {
            this.group = this.group.filter(item => item.orderNo !== orderNo);