<template>
  <view class="sh-content">
    <view class="" style="display: flex;justify-content:space-around;padding-top:250rpx;">
      <view style="text-align: center;">
        待拣订单
        <br>
        <span>{{dataForm.waitPickOrderNumber}}</span>
        </view>
      <view style="text-align: center;">待拣品类
      <br>
      <span>{{dataForm.waitPickTypeNumber}}</span></view>
      <view  style="text-align: center;">待拣数量
      <br>
      <span>{{dataForm.waitPickGoodsNumber}}</span></view>
    </view>

    <view style="position: absolute ;bottom:50rpx;left: 50%;transform: translateX(-50%);text-align: center;">
      <view class="confrim-btn" style="margin-bottom: 40rpx;">
        <u-button size="medium" type="primary" style="width:350rpx; margin-top: 40rpx" @click="operation">开始拣选</u-button>
      </view>
      <text>
        开始拣选后，系统自动呼叫AGV按顺序把需要拣货的 商品送至待拣区域，请及时处理！
      </text>
    </view>

  </view>
</template>

<script>
  export default{
    data(){
      return{
        dataForm:{
          //待拣订单
          waitPickOrderNumber:'',
          //待拣品类 
          waitPickTypeNumber:'',
          //待拣数量
          waitPickGoodsNumber:'',
        }
      }
    },
    onLoad() {
      this.getList()
    },
    methods:{
      /**开始拣货操作*/
      operation(){
         this.$u.api.AvgOrderPkg.startPick().then(res=>{
           if(res.code == 200){
             this.$u.toast('开始拣货操作')
             this.$u.route({
             	url: 'pages/AvgOrderPkg/picking/index',
             	type: 'navigateTo',
             })
           }else{
             this.$u.toast(res.msg)
           }
         })
      },
      getList(){
         this.$u.api.AvgOrderPkg.getAGVStatistics().then(res=>{
           if(res.code == 200){
			   console.log(res);
              this.dataForm = res.data
           }else{
             this.$u.toast(res.msg)
           }
         })
      },
    }
  }
</script>

<style>
</style>
