<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="img-tag">
          <img src="../../../../assets/images/img2.png" />
        </div>
        <div class="moda-title">
          批量逐一发货
          <div class="check">
            <i class="el-icon-check"></i>
          </div>
        </div>
        <div class="msg">处理后形成多张物流单</div>
      </div>
      <div class="moda-item" :class="{'onModal': mode==='1'}" @click="modeHandle('1')">
        <div class="img-tag">
          <img src="../../../../assets/images/img3.png" />
        </div>
        <div class="moda-title">
         合并发货
          <div class="check">
            <i class="el-icon-check"></i>
          </div>
        </div>
        <div class="msg">同一客户同一目的地订单形成一张物流单<br />优惠多多</div>
      </div>
      <div class="moda-item" :class="{'onModal': mode==='2'}" @click="modeHandle('2')">
        <div class="img-tag">
          <img src="../../../../assets/images/img1.png" />
        </div>
        <div class="moda-title">
          快递发货
          <div class="check">
            <i class="el-icon-check"></i>
          </div>
        </div>
        <div class="msg">处理后形成新物流单</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: 300px;
    box-sizing: border-box;
    // border:solid 1px #F54319;
    display: flex;
    flex-direction: column;
    // justify-content: space-between;
    // align-items: center;
    margin: 0 32px;
    padding: 16px;
    border-radius: 5px;
    background-color: #F4F7FA;
    border:solid 1px #F4F7FA;
    cursor: pointer;
    .img-tag{
      width: 100%;
      >img{
        width: 100%;
        display: block;
      }
    }
    .check{
      // width: 100%;
      // padding: 30px 16px 0;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      font-size: 16px;
      position: absolute;
      padding: 0;
      top: 30px;
      right: 0;
      border: solid 1px #333;
      border-radius: 50%;
      .el-icon-check{
        font-size: 20px;
        visibility: hidden;
      }
      span{
        padding-left: 16px;
      }
    }
    .msg{
      font-size: 12px;
      color: #999;
      // text-align: center;
    }
    .moda-title{
      font-size: 16px;
      padding: 32px 0 8px;
      width: 100%;
      position: relative;
      color: #000;
    }
  }
  .moda-item:hover,.onModal{
    background-color: #FFF;
    border:solid 1px #0581FE;
    .check{
      border:solid 1px #0581FE;
      background-color: #0581FE;
      .el-icon-check{
        visibility: visible;
        color: #FFF;
      }
      span{
        color: #F54319;
      }
    }
  }
}
</style>