<template>
  <vxe-modal v-model="value" id="sendModeModal" :zIndex="9999" width="65%" height="60%" v-loading="load">
    <template #title>
      <span>订单批量发货模式选择</span>
    </template>
    <div class="mode">
      <div class="moda-item" :class="{'onModal': mode==='0'}" @click="modeHandle('0')">
        <div class="check">
          <i class="el-icon-success"></i>
        </div>
        <div class="msg">处理后形成多张物流单</div>
        <div class="moda-title">批量逐一发货</div>
      </div>
      <div class="moda-item" :class="{'onModal': mode==='1'}" @click="modeHandle('1')">
        <div class="check">
          <i class="el-icon-success"></i>
          <span>推荐</span>
        </div>
        <div class="msg">处理后形成多张物流单<br />优惠多多</div>
        <div class="moda-title">拼车/整车发货</div>
      </div>
    </div>
  </vxe-modal>
</template>

<script lang="ts">
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
@Component({components:{}})
export default class SendModeModal extends Vue {
  load=false;
  value=false;
  mode='';
  setShow(v:boolean){
    this.mode = '';
    this.value = v;
  }
  modeHandle(v:string){
    this.mode = v;
    this.value = false;
    this.$emit('modeChange',v)
  }
  show(){
    
  }
  hide(){}
}
</script>

<style lang="scss" scoped>
.mode{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  .moda-item{
    width: 244px;
    height: 268px;
    box-sizing: border-box;
    border:solid 1px #F54319;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin: 0 32px;
    cursor: pointer;
    .check{
      width: 100%;
      padding: 30px 16px 0;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      font-size: 16px;
      .el-icon-success{
        font-size: 30px;
        visibility: hidden;
      }
      span{
        padding-left: 16px;
      }
    }
    .msg{
      font-size: 12px;
      color: #999;
      text-align: center;
    }
    .moda-title{
      font-size: 20px;
      text-align: center;
      padding-bottom: 30px;
    }
  }
  .moda-item:hover,.onModal{
    .check{
      .el-icon-success{
        visibility: visible;
        color: #F54319;
      }
      span{
        color: #F54319;
      }
    }
  }
}
</style>