<style>
  @import url('../css/TicketingModule.css');
</style>
<template>
  <div v-if="dataList.length < 1">

  </div>
  <div v-else>
    <div class="m_TicketingModule" v-if="type !== 7">
      <div class="_tit">
        <span class="_text">挂账冲抵列表</span>
        <div>
          <span class="_btn" v-if="tableShow" @click="tableShow=false">收起 <i class="iconfont icon-gengduo _rotate"></i> </span>
          <span class="_btn" v-else @click="tableShow=true">展开 <i class="iconfont icon-gengduo"></i> </span>
        </div>
      </div>
      <div v-show="tableShow" class="_padding_20_15">
        <table class="singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
          <tr>
            <th>费用类型</th>
            <th>团号</th>
            <th>财务单据</th>
            <th>收支类型</th>
            <th>冲抵金额</th>
            <th>对象名称</th>
            <th>备注</th>
            <th>制单时间</th>
            <th>制单人</th>
          </tr>
          <tr v-for="(item, index) in dataList" :key="index">
            <td>{{item.CostTypeName}}</td>
            <td>{{item.TCNUM}}</td>
            <td>{{item.FrID}}</td>
            <td>{{item.HangingAccountsTypeStr}}</td>
            <td>{{item.fmrMoney}}</td>
            <td>{{item.RemitterName}}</td>
            <td>{{item.Remark}}</td>
            <td>{{item.CreateDateStr}}</td>
            <td>{{item.createByStr}}</td>
          </tr>
        </table>
      </div>
    </div>
    <div v-else class="m_TicketingModule" >
      <div class="_tit">
        <span class="_text">挂账冲抵列表</span>
        <div>
          <span class="_btn" v-if="tableShow" @click="tableShow=false">收起 <i class="iconfont icon-gengduo _rotate"></i> </span>
          <span class="_btn" v-else @click="tableShow=true">展开 <i class="iconfont icon-gengduo"></i> </span>
        </div>
      </div>
      <div v-show="tableShow" class="_padding_20_15">
        <table class="singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
          <tr>
            <th>财务单据</th>
            <th>费用类型</th>
            <th>收支类型</th>
            <th>金额</th>
            <th>备注</th>
            <th>制单时间</th>
            <th>制单人</th>
          </tr>
          <tr v-for="(item, index) in dataList" :key="index">
            <td>{{item.FrID}}</td>
            <td>
              <span v-for="(t, index) in item.DetailList">{{t.CostTypeName}} <span v-if="index!==item.DetailList.length-1">,</span> </span>
            </td>
            <td>{{item.Type === 1 ? '收' : '支'}}</td>
            <td>{{item.Money}}</td>
            <td>{{item.Remark}}</td>
            <td>{{item.CreateDateStr}}</td>
            <td>{{item.createByStr}}</td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props:["dataList", 'type'],
    data(){
      return{
        tableShow:false,
      }
    },watch:{

    },created(){

    },mounted(){
    },methods:{
    }
  }
</script>
