<style>
.PT_teamTable {
  width: 800px;
  border-collapse: collapse;
}
.PT_teamTable td,
.PT_teamTable th {
  border: 1px solid #dcdcdc;
  padding: 5px;
  height: 30px;
}
.PT_teamTable tr th {
	background: #eee;
  height: 30px;
  border: 1px solid #dcdcdc;
}
.PT_teamTable tr td{background: #fff;}
.travelpassengerlist{font-size: 12px; background: #dcdcdc;margin-top: 20px;}
.travelpassengerlist tr th {
  height: 30px;
}
.travelpassengerlist tr td{background: #fff; text-align: center;height:40px;}
</style>

<template>
  <div class="flexOne PassengerList">
    <table
      class="travelpassengerlist"
      border="0"
      cellspacing="1"
      cellpadding="0"
      v-loading="loading"
    >
      <tr>
        <th width="50">ID</th>
        <th width="130">旅客姓名</th>
        <th width="110">英文姓</th>
        <th width="145">英文名</th>
        <th width="45">性别</th>
        <th width="155">出生日期</th>
        <th width="120">年龄类型</th>
        <th width="80">出生地</th>
        <th width="155">护照号</th>
        <th width="80">签发地</th>
        <th width="155">签发日期</th>
        <th width="155">护照有效期</th>
        <th width="175">客户手机</th>
        <th width="240">身份证</th>
        <th width="180">业务员</th>
      </tr>
      <tr>
        <td v-show="dataList.Length==0" colspan="12" align="center">暂无数据</td>
      </tr>
        <tr v-for="(subItem,subIndex) in dataList">
          <td>{{subItem.Number}}</td>     
          <td>{{subItem.SurName}}{{subItem.Name}}</td>
          <td>{{subItem.ESurName}}</td>
          <td>{{subItem.EName}}</td>
          <td>{{getSexStr(subItem)}}</td>
          <td>{{subItem.Birthday}}</td>
          <td>{{subItem.PeopleType}}</td>
          <td>{{subItem.BirthdayAddress}}</td>
          <td>{{subItem.PassportNo}}</td>
          <td>{{subItem.PassportAddress}}</td>
          <td>{{subItem.PassportIssued}}</td>
          <td>{{subItem.PassportExpiry}}</td>
          <td>{{subItem.MobilePhone}}</td>
          <td>{{subItem.IdCard}}</td>
          <td>{{subItem.CreateBy}}</td>
        </tr>
    </table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      //请求数据
      msg: {
        OrderId: 0
      },
      dataList: [],
      loading: true
    };
  },
  methods: {
    //获取性别字符串
    getSexStr(item) {
      var str = "";
      if (item.Sex == 1) {
        str = "男";
      } else {
        str = "女";
      }
      return str;
    },
    //获取数据
    getList() {
      this.loading = true;
      this.apipost(
        "dmc_get_visa_GetVisaOrderGuestListForOrder",
        this.msg,
        res => {
          this.loading = false;
          if (res.data.resultCode == 1) {
            this.dataList = res.data.data;
          }
        },
        err => {}
      );
    }
  },
  mounted() {
    this.msg.OrderId = this.$route.query.id;
    this.getList();
  }
};
</script>