<style>

</style>
<template>
  <div class="commonPriceHotelInfo">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="singeRowTable" v-loading="loading">
      <tr>
        <th width="100">日期</th>
        <th width="135">占房时间</th>
        <th width="120">团期</th>
        <th width="80">总库存</th>
        <th width="80">使用库存</th>
        <th width="80">状态</th>
      </tr>
      <template v-if="HotelPriceList.length>0">
        <tr v-for="(item,index) in  HotelPriceList">
          <td>
            {{item.UseTimeStr}}
          </td>
          <td>
            {{item.CreateTimeStr}}
          </td>
          <td>
            {{item.TCNUM}}
          </td>
          <td>
            {{item.Inventory}}
          </td>
          <td>
            {{item.LastUseNum}}
          </td>
          <td>
            <template v-if="item.Status==1"><span style="color:green;">OK</span></template>
            <template v-else><span style="color:red;">暂定</span></template>
          </td>
        </tr>
      </template>
      <template v-else>
        <tr>
          <td colspan="6">
            <span style="color:red;"> 暂无库存使用记录.</span>
          </td>
        </tr>
      </template>
    </table>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        loading: false,
        HotelPriceList: [],
        queryMsg: {
          HotelId: 0,
          UseTime: "",
        }
      };
    },
    methods: {
      //获取日志
      getHotelPriceList(HotelId, timeStr) {
        this.HotelPriceList = [];
        this.loading = true;
        if (HotelId) {
          this.queryMsg.HotelId = HotelId;
        }
        if (timeStr) {
          this.queryMsg.UseTime = timeStr;
        }

        this.apipost('travel_get_GetHotelUsePriceListService', this.queryMsg, res => {
          this.loading = false;
          if (res.data.resultCode == 1) {
            this.HotelPriceList = res.data.data;
          }
        }, err => {})
      },
    },
    mounted() {}
  };

</script>
