<style scoped>
  @import "../css/cssReset.css";

  .page_fnDm {
    background-color: white
  }

  .query-box {
    overflow: inherit
  }

  ._nav {
    margin: 20px 0 0 0;
    background-color: #f5f5f5;
  }

  ._nav li {
    float: left;
    font-size: 14px;
    color: #666666;
    padding: 15px 20px;
    cursor: pointer;
    position: relative;
    background-color: #f1f1f1;
    margin-right: 5px
  }

  ._nav li._active {
    background-color: #FFFFFF;
    color: #333333
  }

  ._nav li._active::after {
    content: "";
    width: 20px;
    height: 3px;
    background-color: #E95252;
    display: inline-block;
    position: absolute;
    bottom: 0;
    left: 38%;
  }

  .el-range-editor.el-input__inner {
    border-radius: 0
  }

  .query-box {
    border: none
  }

  .hight_query {
    position: relative;
  }

  .hight_query span {
    height: 34px;
    line-height: 34px;
    color: #E95252
  }

  .hight_query span .icon-gengduo {
    font-size: 12px
  }

  .hight_query span em {
    text-decoration: underline;
    cursor: pointer;
  }

  .hight_query_box {
    position: absolute;
    background-color: white;
    z-index: 2000;
    right: 200px;
    width: 800px;
  }

  ._hqb_shadow {
    box-shadow: 3px 2px 10px rgb(204, 203, 203);
    border: 1px solid #ececec;
  }

  .query-box ul {
    overflow: initial;
  }

  .hqb_t {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #E95252;
    border: 1px solid #E95252;
    color: #fff;
    text-align: center;
    margin-bottom: 15px
  }

  .query-box li:last-child {
    float: left
  }

  .query-box>ul>li:last-child {
    float: right;
  }

  .query-box .hight_query ul .el-input {
    width: inherit
  }

  .hight_query_box ul li {
    margin-top: 0;
    float: left;
    margin-right: 15px
  }

  .hight_query_box ul li label {
    font-size: 14px
  }

  .hight_query_box .el-form {
    padding: 0 20px
  }

  .hight_query_box ul li._hqb_btn {
    float: right;
    margin-right: 25px;
    padding-top: 5px;
    position: inherit
  }

  .Receipt_box {
    padding: 15px;
    color: #c94052;
    width: 614px;
    background-color: rgba(242, 242, 242, 1);
    border: 1px solid rgba(228, 228, 228, 1)
  }

  .Receipt_box.color_blur {
    color: #106BAF;
  }

  .Receipt_box.color_blur .rb_stit span {
    display: inline-block;
    border-bottom: 2px solid #106BAF;
    padding: 0 20px
  }

  .rb_tit {
    font-size: 18px;
    text-align: center
  }

  .rb_stit {
    font-size: 14px;
    text-align: center
  }

  .rb_stit span {
    display: inline-block;
    border-bottom: 2px solid #C94052;
    padding: 0 20px
  }

  .rb_top_row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
  }

  .rb_top_row span._r_name {
    color: #333333
  }

  .rb_top_row span._r_bold {
    font-weight: bold
  }

  .rb_top_row ._r_time span {
    color: #333333
  }

  ._r_mb5 {
    margin-bottom: 5px;
  }

  .Receipt_table {
    width: 100%;
    font-size: 14px;
    text-align: center
  }

  .Receipt_table .th {
    font-weight: 200 !important
  }

  ._r_mt10 {
    margin-top: 10px;
  }

  ._bg__ {
    display: inline-block;
    padding: 2px 8px;
    color: white;
    border-radius: 4px
  }

  ._bg_red {
    background-color: #E95252;
  }

  ._bg_green {
    background-color: #2BB87C
  }

  .text_d {
    text-decoration: underline;
    cursor: pointer;
  }

  .PingFangSC {
    font-weight: bold
  }

  .Bill_par {
    position: relative;
  }

  tr th,
  tr td {
    text-align: left;
    padding-left: 20px;
  }

  tr._item_list {
    border-bottom: 1px solid #E5E5E5;
    height: 78px;
  }

  tr._item_list td {
    border-bottom: 1px solid #e5e5e5;
    padding: 10px;
  }

  tr._item_list td:first-child {
    border-left: 1px solid #e5e5e5;
  }

  tr._item_list td:last-child {
    border-right: 1px solid #e5e5e5;
  }

  ._head_img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    vertical-align: middle;
  }

  ._btn_group {
    font-size: 14px;
  }

  .icon-daiqueren {
    color: #4BCA81
  }

  .icon-yiqueren {
    color: #4BCA81
  }

  .icon-yiquxiao {
    color: #959595
  }

  .icon-shenhebohui {
    color: #E95252
  }

  .icon-icon-zancun {
    color: #FF9C01
  }

  .singeRowTable tr:hover {
    background-color: white
  }

  ._TradeWayList {
    padding: 5px 10px;
    background-color: #EEEEEE;
    border-radius: 4px;
    margin: 10px 0;
    width: 230px
  }

  ._bold {
    font-weight: bold
  }

  ._bank_name,
  ._bank_type {
    display: inline-block;
    background-color: #333333;
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 10px;
  }

  ._bank_name {
    margin-left: 10px;
  }

  ._bank_type {
    background-color: #2AAEF2
  }

  ._bank_type2 {
    background-color: #FF9C01
  }

  ._font_init {
    color: #333333;
    font-size: 12px;
    vertical-align: top;
  }

  .InfoChangeLog {
    height: auto;
    max-height: 220px;
    background-color: #FFFFFF;
  }

  .changLogList {
    padding-left: 20px;
    max-height: 180px;
    overflow: auto;
  }

  .changLogList_l {
    border-left: 1px solid #E9E9E9;
    position: relative;
    padding-bottom: 10px;
    padding-left: 20px;
    padding-top: 10px;
  }

  ._radius_green {
    background-color: #47BF8C;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    position: absolute;
    left: -4px;
    top: 19px;
  }

  .changLog_time {
    color: #666666;
    font-size: 12px;
    display: inline-block;
    padding-right: 10px
  }

  ._icon_btn i {
    width: 30px;
    height: 30px;
    display: inline-block;
    color: white !important;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 10px;
    cursor: pointer;
    outline: none;
  }

  ._icon_btn i.edit {
    background-color: #00C6FF;
    font-size: 16px;
  }

  ._icon_btn i.edit:hover {
    background-color: #59daff
  }

  ._icon_btn i.edit:active {
    background-color: #00b8ec
  }

  ._icon_btn i.icon-sousuo {
    background-color: #47BF8C;
  }

  ._icon_btn i.icon-sousuo:hover {
    background-color: #66bb97
  }

  ._icon_btn i.icon-sousuo:active {
    background-color: #35ab79
  }

  ._icon_btn i.icon-ico_commodity_defaul {
    background-color: #F16C3C;
  }

  ._icon_btn i.icon-ico_commodity_defaul:hover {
    background-color: #e87c54
  }

  ._icon_btn i.icon-ico_commodity_defaul:active {
    background-color: #f76630
  }

  ._icon_btn i.icon-quxiao1 {
    background-color: #E95252;
  }

  ._icon_btn i.icon-quxiao1:hover {
    background-color: #ea6d6d
  }

  ._icon_btn i.icon-quxiao1:active {
    background-color: #e42d2d
  }

  ._icon_btn i.icon-zhuanjiao1 {
    background-color: #E6A014;
    font-size: 16px;
  }

  ._icon_btn i.icon-zhuanjiao1:hover {
    background-color: rgb(235, 184, 84)
  }

  ._icon_btn i.icon-zhuanjiao1:active {
    background-color: rgb(223, 150, 6)
  }

  ._tag_span {
    background-color: rgba(64, 158, 255, .1);
    display: inline-block;
    padding: 0 5px;
    height: 22px;
    line-height: 20px;
    font-size: 12px;
    color: #409eff;
    border-radius: 4px;
    box-sizing: border-box;
    border: 1px solid rgba(64, 158, 255, .2);
    white-space: nowrap;
    margin-bottom: 4px;
  }

  ._tag_span._tag_warr {
    background-color: rgba(103, 194, 58, .1);
    border-color: rgba(103, 194, 58, .2);
    color: #67c23a;
  }

  ._fex_cen {
    display: flex;
    align-items: center
  }

  ._pad5 {
    padding: 5px 10px;
  }

  ._color_gar {
    color: gray
  }

  ._TCIDAndTCNUMList {
    display: flex;
  }

</style>

<template>
  <div class="page_fnDm page_RecPayQuery page-body" @keyup.enter="resetPageIndex(),getPageList()">
    <div class="query-box">
      <el-form class="_info_box clearfix" label-width="110px">
        <el-row style="padding:15px 20px 0 0;">
          <el-col :span="4">
            <el-form-item label="单号：">
              <el-input placeholder="" class="" v-model="msg.FrID" @keyup.native="checkInteger(msg,'FrID')"
                maxlength="8"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="团队编号：">
              <el-input v-model="msg.TCNUM" class=""></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="所属校区：">
              <el-select filterable v-model='msg.RB_Branch_Id'
                @change="getDepartmentMsg.RB_Branch_Id=msg.RB_Branch_Id,msg.RB_Depart_Id='',msg.UpdateBy='',getDepartment(msg.RB_Branch_Id)"
                class="">
                <el-option :value="-1" label="不限"></el-option>
                <el-option v-for='item in CompanyList' :label='item.SName' :value='item.SId' :key='item.SId'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="费用部门：">
              <el-select filterable v-model='msg.RB_Depart_Id'
                @change="employeeMsg.DepartmentId=msg.RB_Depart_Id,getEmployee(msg.RB_Depart_Id),msg.UpdateBy=''" class="">
                <el-option :value="0" label="不限"></el-option>
                <el-option v-for='item in DepartmentList' :label='item.DeptName' :value='item.DeptId'
                  :key='item.DeptId'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="制单人员：">
              <el-select filterable v-model='msg.UpdateBy' class="">
                <el-option :value="0" label="不限"></el-option>
                <el-option v-for='item in EmployeeList' :label='item.EmployeeName' :value='item.Id'
                  :key='item.Id'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="单据类型：">
              <el-select filterable v-model='msg.Type' class="">
                <el-option key="-1" value="-1" label="不限"></el-option>
                <el-option key="1" value="1" label="收入"></el-option>
                <el-option key="2" value="2" label="支出"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <template v-if="heightQueryBox">
            <el-col :span="4">
              <el-form-item label="费用类型：">
                <el-select filterable v-model='msg.CostTypeID'>
                  <el-option :value="0" label="不限"></el-option>
                  <el-option v-for="item in GetCostTypeList" :key="item.ID" :value="item.ID" :label="item.Name">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="账户类型：">
                <el-select filterable v-model='msg.AccountType'>
                  <el-option value="" label="不限"></el-option>
                  <el-option v-for='item in AccList' :label='item.Name' :value='item.ID' :key='item.ID'>
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="交易方式：">
                <el-select filterable v-model='msg.TradeWay'
                  @change="getAccountList(msg.AccountType,msg.TradeWay),msg.ClientID=''">
                  <el-option value="0" label="不限"></el-option>
                  <el-option v-for='item in BranchAccountList' :label='item.Name' :value='item.ID' :key='item.ID'>
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="收付款账户：">
                <el-select filterable v-model='msg.BankID'>
                  <el-option value="" label="不限"></el-option>
                  <el-option v-for='item in accountList' :label='item.Name' :value='item.ID' :key='item.ID'>
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="排序：">
                <el-select filterable v-model='msg.Sort'>
                  <el-option key="-1" value="-1" label="不限"></el-option>
                  <el-option key="0" value="0" label="团期"></el-option>
                  <el-option key="1" value="1" label="汇款日期"></el-option>
                  <el-option key="2" value="2" label="单号"></el-option>
                  <el-option key="3" value="3" label="交易流水号"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="模板类型：">
                <el-select v-model="msg.TemplateId" filterable>
                  <el-option value="0" label="不限"></el-option>
                  <el-option v-for='item in TemplateGetList' :label='item.Name' :value='item.Id' :key='item.Id'>
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="审核状态：">
                <el-select filterable v-model='msg.Status' class="">
                  <el-option key="-1" value="-1" label="不限"></el-option>
                  <el-option key="0" value="0" label="暂存"></el-option>
                  <el-option key="1" value="1" label="审核中"></el-option>
                  <el-option key="2" value="2" label="通过"></el-option>
                  <el-option key="3" value="3" label="驳回"></el-option>
                  <el-option key="4" value="4" label="作废"></el-option>
                  <el-option key="5" value="5" label="出纳暂存"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="币种类型：">
                <el-select filterable v-model='msg.CurrencyId'>
                  <el-option key="0" value="0" label="不限"></el-option>
                  <el-option v-for="item in currencyTypeList" :key="item.ID" :value="item.ID" :label="item.Name">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="订单编号：">
                <el-input v-model="msg.OrderID"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="金额：">
                <el-input v-model="msg.sMoney" class="w64d5" @keyup.native="checkPrice(msg,'sMoney')"></el-input>-
                <el-input v-model="msg.eMoney" @keyup.native="checkPrice(msg,'eMoney')" class="w64d5"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="制单日期：">
                <el-date-picker class="h34" @change="timeAdd(1)" v-model="productionDate" type="daterange"
                  value-format="yyyy-MM-dd">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="交易日期：">
                <el-date-picker class="h34" v-model="transactionDate" @change="timeAdd(3)" type="daterange"
                  value-format="yyyy-MM-dd">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="发团日期：">
                <el-date-picker class="h34" v-model="missionDate" @change="timeAdd(4)" type="daterange"
                  value-format="yyyy-MM-dd">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="备注查询：">
                <el-input v-model="msg.Remark"></el-input>
              </el-form-item>
            </el-col>
          </template>
        </el-row>
      </el-form>
      <ul class="clearfix">
        <li class="hight_query">
          <span>
            <em @click.stop="heightQueryBox=!heightQueryBox">高级查询 <i class="iconfont icon-gengduo"></i></em>
          </span>
          <!-- <button class="hollowFixedBtn" @click="resetPageIndex(),getPageList()">{{$t('pub.searchBtn')}}</button> -->
          <q-btn color="primary" size="11px" :label="$t('pub.searchBtn')" @click="resetPageIndex(),getPageList()" style="marginRight:10px"/>
          <!-- <button class="normalBtn" @click="method5()">导出</button> -->
          <q-btn color="primary" size="11px" label="导出" @click="method5()"/>
        </li>
      </ul>
    </div>
    <div class="_fnDm_content" v-loading='loading'>
<!--      <v-table is-horizontal-resize column-width-drag style="width:100%" :columns="columns" :table-data="DataList"-->
<!--        :filter-method="filterMethod" :row-height='100' @on-custom-comp="customCompFunc" @sort-change="sortChange"-->
<!--        multiple-sort>-->
<!--        &lt;!&ndash; 多个排序 &ndash;&gt;-->
<!--      </v-table>-->
      <el-table
        :data="DataList"
        border
        style="width: 100%;font-size: 12px">
        <el-table-column prop="FrID" label="单号"  width="100">
          <template slot-scope='scope'>
            <el-popover
              popper-class="detailsIT_Journal"
              placement="bottom-start"
              trigger="click">
              <template v-if="(scope.row.Type==2 || scope.row.Type==6)&&scope.row.modelShow&&(scope.row.Is_Merge==0||scope.row.Is_Merge==null)">
                <my-Bill :ID="scope.row.FrID" :width="widthSon" :color="colorSon"></my-Bill>
              </template>
              <template v-else-if="(scope.row.Type==1 || scope.row.Type==5)&&scope.row.modelShow&&(scope.row.Is_Merge==0||scope.row.Is_Merge==null)">
                <my-RVB-Bill :ID="rowData.FrID" :width="widthSon" :color="colorSon"></my-RVB-Bill>
              </template>
              <template v-else-if="scope.row.Is_Merge==1&&scope.row.modelShow">
                <my-HB-Bill :ID="scope.row.FrID" :width="widthSon"  :color="colorSon"></my-HB-Bill>
              </template>
              <span slot="reference" @click="scope.row.modelShow = true" style="text-decoration: underline;cursor: pointer;font-weight: bold" >{{scope.row.FrID}}</span>
            </el-popover>
          </template>
        </el-table-column>
        <el-table-column prop="BranchName" label="所属校区"  width="100"></el-table-column>
        <el-table-column prop="allName" label="单据类型" width="150">
          <template slot-scope="scope">
            <span>
            <span v-if="scope.row.Type==2" style="display: inline-block;
                padding: 2px 8px;
                color: white;
                background-color: #E95252;
                line-height: 16px;
                border-radius: 4px;">
                支出
            </span>
            <span v-if="scope.row.Type==1" style="display: inline-block;
                padding: 2px 8px;
                color: white;
                background-color: #2BB87C;
                line-height: 16px;
                border-radius: 4px;">
                收入
            </span>
             <span v-if="scope.row.Type==5" style="display: inline-block;
                padding: 2px 8px;
                color: white;
                background-color: #2BB87C;
                line-height: 16px;
                border-radius: 4px;">
                应收
            </span>
             <span v-if="scope.row.Type==6" style="display: inline-block;
                padding: 2px 8px;
                color: white;
                background-color: #E95252;
                line-height: 16px;
                border-radius: 4px;">
                应付
            </span>
            <el-tooltip class="item" effect="dark" content="追加团款"  placement="top">
                <span v-if="scope.row.OtherType == 1" style="width: 20px;
                    height: 20px;
                    display: inline-block;
                    border-radius: 50%;
                    text-align: center;
                    line-height:  20px;
                    color: #E95252;
                    border: 1px solid #E95252;
                    font-size: 12px;" class="zhuiClass">追</span>
            </el-tooltip>
        </span>
          </template>
        </el-table-column>
        <el-table-column prop="Accountholder"  label="关联信息">
          <template slot-scope="scope">
              <div>
                <div v-if="scope.row.TCIDAndTCNUMList.length>0">
                  <div class="_TCIDAndTCNUMList" style="display: flex;">
                    <span>团号：</span>
                    <div v-if="scope.row.TCIDAndTCNUMList&&scope.row.TCIDAndTCNUMList.length>0">
                      <p><span v-for="(i,ix) in scope.row.TCIDAndTCNUMList">{{i.ClassName}}（{{i.ClassId}}） <span v-if="ix!=scope.row.TCIDAndTCNUMList.length-1">,</br></span></span></p>
                    </div>
                    <div v-else>
                      <span>无</span>
                    </div>
                  </div>
                  <p v-if="scope.row.OrderID>0 && scope.row.OrderSource==8">单号：<span class="">{{scope.row.OrderID}}</span></p>
                </div>
                <div v-else-if="scope.row.OrderSource==8 && scope.row.TCIDAndTCNUMList.length==0">
                  <p class="_TCIDAndTCNUMList">暂无团期信息</p>
                </div>
                <div v-else-if="scope.row.OrderSource==4 && scope.row.TCIDAndTCNUMList.length==0">
                  <p class="_TCIDAndTCNUMList" style="text-decoration: underline;cursor: pointer;" @click="goTicketPage(scope.row)">机票编号：{{scope.row.SourceID}}</p>
                  <p style="margin-top: 5px;">线路：<span>{{scope.row.LineName?scope.row.LineName:'机票尚未选择线路'}}</span></p>
                </div>
                <div v-else-if="scope.row.OrderSource==9 && scope.row.TCIDAndTCNUMList.length==0">
                  <p class="_TCIDAndTCNUMList">国内票务期数：{{scope.row.Term}}</p>
                </div>
                <div v-else-if="scope.row.OrderSource==10 && scope.row.TCIDAndTCNUMList.length==0">
                  <p class="_TCIDAndTCNUMList">签证产品编号：{{scope.row.SourceID}}</p>
                </div>
                <div v-else-if="scope.row.OrderSource==0 || scope.row.OrderSource==null">
                  <p class="_TCIDAndTCNUMList">{{ scope.row.BranchName }}-{{scope.row.DepartName}} </p>
                </div>
                <div v-else>
                  <p class="_TCIDAndTCNUMList">暂无</p>
                </div>
              </div>
          </template>
        </el-table-column>
        <el-table-column prop="dateRange"  label="费用类型">
          <template slot-scope="scope">
            <div>
              <div v-for="(s,si) in scope.row.CostTypeList" :index="si">
                <span  style="background-color: rgba(64,158,255,.1);display: inline-block;padding: 0 5px;height: 22px;line-height: 20px;font-size: 12px;color: #646464;border-radius: 4px;box-sizing: border-box;border: 1px solid rgba(64,158,255,.2);white-space: nowrap;margin-bottom: 4px;">{{s}}</span></br>
              </div>
            </div>
          </template>
        </el-table-column>

        <el-table-column prop="TradeWay"  label="交易方式">
          <template slot-scope="scope">
            <div>
              <div v-if="scope.row.TradeWayList&&scope.row.TradeWayList.length>0">
                <div class="_TradeWayList"   v-for="(tw,twIn) in scope.row.TradeWayList" style="line-height: normal !important;padding: 5px 10px;background-color: #EEEEEE;border-radius: 4px;margin: 10px 0;width:230px">
                  <p><span style="font-weight: bold;color:#333333">{{tw.Alias}}</span><span class="_bank_name" style="height:20px;;display: inline-block;background-color: #333333;color: white;padding: 2px 4px;border-radius: 4px;margin-left:10px;margin-letf:10px">{{scope.row.TradeWayList[0].TypeName}}</span><span style="height:20px;display: inline-block;background-color: #333333;color: white;padding: 2px 4px;border-radius: 4px;margin-left:10px;" :style="{'background-color':tw.AccountType=='私'?'#2AAEF2':'#FF9C01'}">{{tw.AccountType==""?'无':tw.AccountType}}</span> </p>
                  <p style="color:#333333">{{tw.BankNo}}</p>
                </div>
              </div>
              <div v-else>
                <div class="_pad5">
                  无
                </div>
              </div>
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="Money"  label="金额">
          <template slot-scope="scope">
             <span>
                <p style="line-height:20px">{{scope.row.Type==1?'应收':'应付'}}：<span>{{scope.row.Money}}</span></p>
                <p style="line-height:20px">{{scope.row.Type==1?'实收':'实付'}}：<span>{{scope.row.PayMoney}}</span></p>
                <p v-if="scope.row.IsAdvanceFinance==1" style="line-height:20px">冲抵：<span>{{scope.row.MatchMoney}}</span></p>
            </span>
          </template>
        </el-table-column>
        <el-table-column prop="ClientTypeName"  label="付款对象">
          <template slot-scope="scope">
            <span>
              <span style="color: gray">{{scope.row.Type==2?scope.row.ClientTypeName+'：':'汇款人：'}}</span><span>{{scope.row.RemitterName}}</span>
            </span>
          </template>
        </el-table-column>
        <el-table-column prop="EmName"  label="制单人员"></el-table-column>
        <el-table-column prop="StatusStr"  label="当前状态"></el-table-column>
        <el-table-column prop="Remark"  label="操作">
          <template slot-scope="scope">
            <div>
              <span>
                <el-tooltip class="item" effect="dark" content="查看"  placement="top">
                    <i v-if="scope.row.Type !== 4" style="width: 30px;
                        height: 30px;
                        display: inline-block;
                        color: white !important;
                        border-radius: 50%;
                        text-align: center;
                        line-height: 30px;
                        margin-right: 10px;
                        cursor: pointer;
                        background-color: #47BF8C;
                        outline: none;"
                       class="iconfont icon-sousuo" @click="goUrl('FinancialDocumentsDetail',scope.row)">
                    </i>
                    <i v-if="scope.row.Type === 4" style="width: 30px;
                        height: 30px;
                        display: inline-block;
                        color: white !important;
                        border-radius: 50%;
                        text-align: center;
                        line-height: 30px;
                        margin-right: 10px;
                        cursor: pointer;
                        background-color: #47BF8C;
                        outline: none;"
                       class="iconfont icon-sousuo" @click="goUrl('CapitalAllocationDetail',scope.row)">
                    </i>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="转交"  placement="top">
<!--                    <i v-if="scope.row.isExchange" style="width: 30px;-->
                    <i  style="width: 30px;
                        height: 30px;
                        display: inline-block;
                        color: white !important;
                        border-radius: 50%;
                        text-align: center;
                        line-height: 30px;
                        margin-right: 10px;
                        cursor: pointer;
                        background-color: #47BF8C;
                        outline: none;"
                       class="iconfont icon-zhuanhuan1" @click="getExchange(scope.row)">
                    </i>
                </el-tooltip>
            </span>
            </div>
          </template>
        </el-table-column>
      </el-table>
      <div style="padding-bottom:15px">
        <el-pagination background @current-change="handleCurrentChanges" layout="total,prev, pager, next, jumper"
          :page-size="pageSize" :total='total'>
        </el-pagination>
      </div>
    </div>

    <el-dialog custom-class='w400' title="制单人转交" :visible.sync="zhuanjiaoBox" center>
      <template>
        <el-form label-width="100px">
          <el-form-item label="制单人转交：">
            <el-select v-model="zhuanjiaoMsg.CreateBy" filterable remote reserve-keyword
              :placeholder="$t('pub.pleaseImport')" :remote-method="remoteMethod" @change="$forceUpdate(),choicereciveN(zhuanjiaoMsg.CreateBy)">
              <el-option v-for="item in searchList" :key="item.Id" :label="item.EmployeeName" :value="item.Id">
                <span style="float: left">{{ item.EmployeeName }}</span>
                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.PostName }}</span>
              </el-option>
            </el-select>

          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <button class="hollowFixedBtn" @click="zhuanjiaoBox=false">{{$t('pub.cancelBtn')}}</button>
          <button class="normalBtn" type="primary" @click="setExchange()">{{$t('pub.sureBtn')}}</button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>
<script>
  import myBill from "../components/BillModule.vue";
  import myrbvBill from "../components/ReceivablesModule.vue";
  import myhrBill from "../components/MergeBillModule.vue";
  import {getClassNameList} from '../../../api/finance/index'

  import {
    queryEmployee
  } from '../../../api/users/user'
  import {
    getDeptPage,
  } from '../../../api/system/dept'
  import Vue from 'vue'
  import {
    getSchoolPage
  } from '../../../api/school/index'
  export default {
    data() {
      return {
        showID: false,
        active: 1,
        userId: 0,
        zhuanjiaoBox: false,
        searchList: [],
        widthSon:'700px',
        colorSon:"#f5f5f5",
        msg: {
          pageIndex: 1,
          pageSize: 5,
          FrID: '',
          sDate: '',
          eDate: '',
          Status: '-1',
          TemplateId: '0',
          RB_Branch_Id: '',
          RB_Depart_Id: '',
          sTradeDate: '',
          eTradeDate: '',
          ClientType: '',
          RemitterName: '',
          ClientID: '',
          sMoney: '',
          eMoney: '',
          CurrencyId: '0',
          CostTypeID: '',
          Conditon: '',
          TCNUM: '',
          TradeWay: '',
          Type: '-1',
          AccountType: '',
          QEndDate: '',
          QStartDate: '',
          UpdateBy: '',
          IsFormRecPayQuery: '1',
          KJCostTypeId: 0,
          IsSelectKJSetCostType: 0,
          Remark: '', //备注查询
          Sort: '2',
          EmployeeId: '',
          IsSellOrderForm:1
        },
        getCompanyMsg: { // 校区
          RB_Group_Id: '0',
          Status: '0',
        },
        getDepartmentMsg: { // 部门
          RB_Group_Id: '',
          RB_Branch_Id: '',
          Status: 0,
          ParentId: -1,
          Tier: 0,
        },
        employeeMsg: { // 员工
          GroupId: '',
          BranchId: -1,
          DepartmentId: 0,
          PostId: 0,
          IsLeave: 0,
        },
        zhuanMsg: {
          AuditEmId: null,
          WorkFlowId: 0,
        },
        //转交信息
        zhuanjiaoMsg: {
          CreateBy: '',
          RB_CreateByName: '',
          FrIDList: []
        },
        DataList: [],
        GetFinancLogList: [],
        StatusList: [],
        ClientAccountList: [],
        ClientTypeList: [],
        accountList: [],
        BranchAccountList: [],
        DepartmentList: [],
        EmployeeList: [],
        ConditionList: [],
        CompanyList: [],
        productionDate: [],
        approvalDate: [],
        transactionDate: [],
        missionDate: [],
        currencyTypeList: [],
        GetCostTypeList: [],
        TemplateGetList: [],
        AccList: [],
        checkList: [],
        checkAllList: [],
        dateStart: '',
        dateEnd: '',
        dateArr: '',
        status: '1',
        type: '1',
        loading: false,
        LogLoading: false,
        isCkedAll: false,
        currentPage: 1,
        total: 0,
        ChineseStr: '',
        mathNumber: '',
        DepartIDs: '',
        loading2: false,
        tableData: [],
        columns: [],
        pageSize: 5,
        pageIndex: 1,
        heightQueryBox: false,
        schoolMsg:{
          pageIndex: 1,
          pageSize: 12,
          rowsPerPage: 12,
          SName: "",
          Status: '-1'
        }
      }
    },
    created() {
      if (this.$route.query.returnCode) {
        this.active = this.$route.query.returnCode;
        this.msg.Conditon = this.$route.query.returnCode;
      }
      if (this.$route.query.pageIndex) {
        this.msg.pageIndex = this.$route.query.pageIndex;
      }
      if (this.$route.query.Conditon) {
        this.msg.Conditon = this.$route.query.Conditon;
        this.active = parseInt(this.$route.query.Conditon);
      }
      if (this.$route.query.FrID) {
        this.msg.FrID = this.$route.query.FrID;
      }
      if (this.$route.query.Type) {
        this.msg.Type = this.$route.query.Type + '';
      }
      if (this.$route.query.rec) {
        this.msg.AccountType = 15;
        this.msg.TradeWay = 4;
        this.getAccountList(this.msg.AccountType, this.msg.TradeWay)
        this.msg.BankID = this.$route.query.BankID;
        this.transactionDate[0] = this.$route.query.StartDate;
        this.transactionDate[1] = this.$route.query.StartDate;
        this.msg.sTradeDate = this.$route.query.StartDate;
        this.msg.eTradeDate = this.$route.query.StartDate;

        if (this.$route.query.BankID == '') {
          // 费用类型：机票折让费
          this.msg.CostTypeID = 197;
        }
      }
      if (this.$route.query.air) {
        this.msg.AccountType = 17;
        this.msg.TradeWay = 4;
        this.getAccountList(this.msg.AccountType, this.msg.TradeWay)
        this.msg.BankID = 20;
        this.transactionDate[0] = this.$route.query.StartDate;
        this.transactionDate[1] = this.$route.query.StartDate;
      }
    },
    components: {
      "my-Bill": myBill,
      "my-RVB-Bill": myrbvBill,
    },
    mounted() {
      let userInfo = this.getLocalStorage();
      this.getCompanyMsg.RB_Group_Id = this.employeeMsg.GroupId = this.getDepartmentMsg.RB_Group_Id = userInfo
        .RB_Group_id; //集团ID
      this.DepartIDs = userInfo.RB_Department_Id;
      this.userId = userInfo.EmployeeId;
      this.msg.EmployeeId = userInfo.EmployeeId;
      this.financeinfo_post_GetList();
      this.financeinfo_post_GetCostTypeList();
      this.FinancialFlowTemplate_post_GetList();
      this.getCompanyList();
      this.Financial_post_GetConditionList();
      this.getEmployee(0);
      this.getDepartment(0);
      this.Financial_post_GetBranchAccountList();
      this.financeinfo_post_GetClientTypeList();
      this.FinancialFlowTemplate_post_GetStatusList();
      this.getPageList();
      this.AccountType_post_GetList();

      var that = this;
      that.MsgBus.$on('getRecQuery', function (FrID) {
        that.zhuanjiaoMsg.CreateBy = '';
        that.zhuanjiaoMsg.RB_CreateByName = '';
        that.zhuanjiaoMsg.FrIDList = [];
        that.zhuanjiaoMsg.FrIDList.push(FrID);
        that.zhuanjiaoBox = true;
      });
    },
    methods: {
      getExchange(rowData){
        this.zhuanjiaoMsg.CreateBy = '';
        this.zhuanjiaoMsg.RB_CreateByName = '';
        this.zhuanjiaoMsg.FrIDList = [];
        this.zhuanjiaoMsg.FrIDList.push(rowData.FrID);
        this.zhuanjiaoBox = true;
      },
      customCompFunc(params) {},
      sortChange(param) {
        //自己写实现
        //{gender:"",name:"asc"}
      },
      //设置转交
      setExchange() {
        if (this.zhuanjiaoMsg.CreateBy == '') {
          this.Error('请选择转交人');
          return;
        }
        this.apipost('Financial_post_SetFinanceCreateByCareOf', this.zhuanjiaoMsg, res => {
          if (res.data.resultCode == 1) {
            this.Success(res.data.message);
            this.zhuanjiaoBox = false;
          } else {
            this.Error(res.data.message);
          }
        }, err => {})
      },
      remoteMethod(query) { //  转交人模糊查询
        if (query !== '' || this.addShow) {
          var qMsg = {
            EmployeeName: 0
          }
          qMsg.EmployeeName=query;
          queryEmployee(qMsg).then(res => {
            if(res.Code==1){
              this.searchList = res.Data;
            }
          }).catch(() => {

          })
        } else {
          this.searchList = [];
        }
      },
      choicereciveN(Id){
        if(this.searchList.length>0){
          this.searchList.forEach(x=>{
            if(x.Id==Id){
              this.zhuanMsg.AuditEmIdName = x.EmployeeName;
              this.zhuanjiaoMsg.RB_CreateByName = x.EmployeeName;
            }
          })
        }
      },
      // 数据筛选
      filterMethod(filters) {},
      handleCurrentChanges(val) {
        this.pageIndex = this.msg.pageIndex = val;
        this.getPageList();
      },
      AccountType_post_GetList() { //获取账户类型下拉
        this.apipost('AccountType_post_GetList', this.queryAccMsg, res => {
          if (res.data.resultCode == 1) {
            this.AccList = res.data.data;
          } else {
            this.$message.error(res.data.message);
          }
        }, err => {})
      },
      getPageList() { // 获取列表数据
        if (!this.msg.ClientID) this.msg.ClientID = 0;
        if (!this.msg.ClientType) this.msg.ClientType = 0;
        if (!this.msg.CurrencyId) this.msg.CurrencyId = 0;
        if (!this.msg.CostTypeID) this.msg.CostTypeID = 0;
        if (!this.msg.TemplateId) this.msg.TemplateId = 0;
        if (this.msg.RB_Branch_Id === '') this.msg.RB_Branch_Id = -1;
        if (!this.msg.RB_Depart_Id) this.msg.RB_Depart_Id = 0;
        if (!this.msg.UpdateBy) this.msg.UpdateBy = 0;
        if (!this.msg.TCID) this.msg.TCID = 0;
        if (!this.msg.OrderID) this.msg.OrderID = 0;
        if (!this.msg.Status) this.msg.Status = 0;
        if (!this.msg.FrID) this.msg.FrID = 0;
        if (!this.msg.Conditon) this.msg.Conditon = 1;
        if (!this.msg.TradeWay) this.msg.TradeWay = 0;
        if (!this.msg.AccountType) this.msg.AccountType = 0;
        if (!this.msg.KJCostTypeId) this.msg.KJCostTypeId = 0;
        if (!this.msg.IsSelectKJSetCostType) this.msg.IsSelectKJSetCostType = 0;
        this.loading = true;
        this.apipost('Financial_post_GetALLPageList', this.msg, res => {
          if (res.data.resultCode == 1) {
            let data = res.data.data.pageData.list;
            let userInfo = this.getLocalStorage();
            data.forEach(x => {
              if (("," + userInfo.ActionMenuCode + ",").indexOf(',Finance_CreateByCareOf,') != -1) {
                x.isExchange = true
              } else {
                x.isExchange = false
              }
            })
            this.total = res.data.data.count;
            let da = []
            if (this.total == 0) {
              this.DataList = [];
            } else {
              data.forEach(x => {
                // this.columns[0].filters.push({label:x.FrID,value:x.FrID})
                x.modelShow = false;
                if(x.TCIDList.length>0){
                  da =da.concat(x.TCIDList)
                }

              })

              this.DataList = data;
              if(da.length>0){
                let str  = da.join(',')
                getClassNameList({ClassIds:str}).then(res => {
                  this.DataList.forEach(x=>{
                    if(x.TCIDList.length>0){
                      x.TCIDList.forEach(z=>{
                        res.Data.forEach(j=>{
                          if(z == j.ClassId){
                            x.TCIDAndTCNUMList.push(j)
                          }
                        })
                      })

                    }

                  })
                }).catch(() => {

                })
              }
            }
            this.loading = false;
          } else {
            this.loading = false;
            this.$message.error(res.data.message);
          }
          // this.msg.TCID= this.msg.TCID==0?this.msg.TCID:'';
          // this.queryInfoInit();
          this.currentPage = parseInt(this.msg.pageIndex);
        }, err => {})
      },
      method5: function () {
        if (!this.msg.ClientID) this.msg.ClientID = 0;
        if (!this.msg.ClientType) this.msg.ClientType = 0;
        if (!this.msg.CurrencyId) this.msg.CurrencyId = 0;
        if (!this.msg.CostTypeID) this.msg.CostTypeID = 0;
        if (!this.msg.TemplateId) this.msg.TemplateId = 0;
        if (this.msg.RB_Branch_Id === '') this.msg.RB_Branch_Id = -1;
        if (!this.msg.RB_Depart_Id) this.msg.RB_Depart_Id = 0;
        if (!this.msg.UpdateBy) this.msg.UpdateBy = 0;
        if (!this.msg.TCID) this.msg.TCID = 0;
        if (!this.msg.OrderID) this.msg.OrderID = 0;
        if (!this.msg.Status) this.msg.Status = 0;
        if (!this.msg.FrID) this.msg.FrID = 0;
        if (!this.msg.Conditon) this.msg.Conditon = 1;
        if (!this.msg.TradeWay) this.msg.TradeWay = 0;
        if (!this.msg.AccountType) this.msg.AccountType = 0;
        if (!this.msg.KJCostTypeId) this.msg.KJCostTypeId = 0;
        if (!this.msg.IsSelectKJSetCostType) this.msg.IsSelectKJSetCostType = 0;
        this.GetErpLocalFile("Financial_post_DownInOrOut", this.msg, "收支款.xls");
      },
      financeRemove(id) { //作废
        this.$confirm('是否对申请单进行作废操作？作废后不可恢复！', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.deletFinance(id)
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消'
          });
        });
      },
      deletFinance(id) {
        this.apipost('Financial_post_Cancel', {
          ID: id
        }, res => {
          if (res.data.resultCode == 1) {
            this.$message.success(res.data.message)
          } else {
            this.$message.error(res.data.message)
          }
          this.getPageList();
        }, err => {})
      },
      Financial_post_GetFinancLogList(id) { // 获取单据日志
        this.LogLoading = true;
        this.apipost('Financial_post_GetFinancLogList', {
          ID: id,
          Type: 2
        }, res => {
          if (res.data.resultCode == 1) {
            let data = res.data.data;
            data.forEach(x => {
              x.UpdateDate = this.$commonUtils.formatMsgTime(x.UpdateDate)
            })
            this.LogLoading = false;
            this.GetFinancLogList = data;
          }
        }, err => {})
      },
      mathMoney(n) { // 数字转中文大写 1
        this.ChineseStr = this.$commonUtils.changeMoneyToChinese(n)
      },
      FinancialFlowTemplate_post_GetStatusList() { // 获取审核状态枚举
        this.apipost('FinancialFlowTemplate_post_GetStatusList', {}, res => {
          if (res.data.resultCode == 1) {
            this.StatusList = res.data.data;
          }
        }, err => {})
      },
      financeinfo_post_GetClientTypeList() { // 获取对象类型
        this.apipost('financeinfo_post_GetClientTypeList', {}, res => {
          if (res.data.resultCode == 1) {
            this.ClientTypeList = res.data.data;
          }
        }, err => {})
      },
      financeinfo_post_GetClientAccountList(t) { // 获取对象类型
        let msg = {
          Type: t,
          ObjID: 0,
          CardNum: ''
        }
        this.apipost('financeinfo_post_GetClientAccountList', msg, res => {
          if (res.data.resultCode == 1) {
            let data = res.data.data;
            let ClientAccountList = [];
            data.forEach(x => {
              let obj = {
                ID: x.ID,
                Name: x.AccountAlias,
                Nom: x.CardNum
              }
              ClientAccountList.push(obj)
            })
            this.ClientAccountList = ClientAccountList;
          }
        }, err => {})
      },
      getAccountList(i, t) { //收款账户
        let accountList = [];
        if (t == 1) { // 银行
          this.apipost('bankaccount_post_GetList', {
            TypeId: i
          }, res => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach(x => {
                let obj = {
                  ID: x.ID,
                  Name: x.Alias,
                  Nom: 0,
                }
                accountList.push(obj)
              })
              this.accountList = accountList;
            }
          }, err => {})
        }
        if (t == 2) { //平台账户
          let msg = {
            BackId: 0,
            TypeId: i,
            BranchId: -1,
            Alias: ''
          }
          this.apipost('BankAccount_post_GetPlatformList', msg, res => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach(x => {
                let obj = {
                  ID: x.ID,
                  Name: x.Alias,
                  Nom: x.PlatformNo
                }
                accountList.push(obj)
              })
              this.accountList = accountList;
            }
          }, err => {})
        }
        if (t == 3) { //现金账户
          let msg = {
            TypeId: i,
            BranchId: -1,
            Alias: ''
          }
          this.apipost('BankAccount_post_GetCashAccountList', msg, res => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach(x => {
                let obj = {
                  ID: x.ID,
                  Name: x.Alias,
                  Nom: 0
                }
                accountList.push(obj)
              })
              this.accountList = accountList
            }
          }, err => {})
        }
        if (t == 4) { //资金池账户
          let msg = {
            TypeId: i,
            BranchId: -1,
            Alias: ''
          }
          this.apipost('BankAccount_post_GetCashPoolList', msg, res => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach(x => {
                let obj = {
                  ID: x.ID,
                  Name: x.Alias,
                  Nom: 0
                }
                accountList.push(obj)
              })
              this.accountList = accountList
            }
          }, err => {})
        }

      },
      Financial_post_GetBranchAccountList() { //获取交易方式列表
        this.apipost('Financial_post_GetBranchAccountList', {}, res => {
          if (res.data.resultCode == 1) {
            this.BranchAccountList = res.data.data;
          }
        }, err => {})
      },
      getDepartment:function(id) { //部门
        let msg={
          pageIndex: 1,
          pageSize: 999,
          rowsPerPage: 12,
          DeptName: "", //部门名称
          DeptId: 0, //部门编号
          Status: "-1",
          School_Id: 0,
          DeptTier: 0,
          ParentId: 0,
        }
        msg.School_Id = id;
        getDeptPage(msg).then(res => {
          this.DepartmentList=res.Data.PageData;
        }).catch(() => {
        })
      },
      getEmployee(id) { //员工

        var qMsg = {
          Dept_Id: 0
        }
        qMsg.Dept_Id=id;
        queryEmployee(qMsg).then(res => {
          if(res.Code==1){
            this.EmployeeList = res.Data;
          }
        }).catch(() => {

        })
      },
      getCompanyList() { //获取校区列表
        getSchoolPage(this.schoolMsg).then(res => {
          this.CompanyList = res.Data.PageData;
        }).catch(() => {

        })
      },
      Financial_post_GetConditionList() { //获取财务单据枚举列表
        this.apipost('Financial_post_GetConditionList', {}, res => {
          if (res.data.resultCode == 1) {
            this.ConditionList = res.data.data;
          } else {}
        }, err => {})
      },
      financeinfo_post_GetList() { // 币种类型
        this.apipost('financeinfo_post_GetList', {
          Name: ''
        }, res => {
          if (res.data.resultCode == 1) {
            this.currencyTypeList = res.data.data;
          } else {

          }
        }, err => {})
      },
      financeinfo_post_GetCostTypeList() { // 费用类型
        this.apipost('financeinfo_post_GetCostTypeList', {
          Name: '',
          type: 0,
          DepartIDs: this.DepartIDs,
          IsBalanceOfTheQuery: 1
        }, res => {
          if (res.data.resultCode == 1) {
            this.GetCostTypeList = res.data.data;
          } else {

          }
        }, err => {})
      },
      FinancialFlowTemplate_post_GetList() { // 单据类型
        this.apipost('Financial_post_GetList', {}, res => {
          if (res.data.resultCode == 1) {
            this.TemplateGetList = res.data.data;
          } else {

          }
        }, err => {})
      },
      timeAdd(t) { // 日期格式
        if (t == 1) { //制单日期
          if (!this.productionDate) {
            this.msg.sDate = '';
            this.msg.eDate = '';
            return
          }
          this.msg.sDate = this.productionDate[0];
          this.msg.eDate = this.productionDate[1];
        }
        if (t == 2) { //审批日期
          if (!this.approvalDate) {
            this.dateStart = '';
            this.dateEnd = '';
            return
          }
          this.dateStart = this.approvalDate[0];
          this.dateEnd = this.approvalDate[1];
        }
        if (t == 3) { //交易日期
          if (!this.transactionDate) {
            this.msg.sTradeDate = '';
            this.msg.eTradeDate = '';
            return
          }
          this.msg.sTradeDate = this.transactionDate[0];
          this.msg.eTradeDate = this.transactionDate[1];
        }
        if (t == 4) { //发团日期
          if (!this.missionDate) {
            this.dateStart = '';
            this.dateEnd = '';
            return
          }
          this.msg.QStartDate = this.missionDate[0];
          this.msg.QEndDate = this.missionDate[1];
        }
      },
      queryInfoInit() { // 初始化msg
        let msg = {
          pageIndex: this.msg.pageIndex,
          pageSize: 6,
          FrID: this.msg.FrID == 0 ? '' : this.msg.FrID,
          sDate: this.msg.sDate,
          eDate: this.msg.eDate,
          Status: this.msg.Status,
          TemplateId: this.msg.TemplateId,
          RB_Branch_Id: this.msg.RB_Branch_Id,
          RB_Depart_Id: this.msg.RB_Depart_Id,
          UpdateBy: this.msg.UpdateBy,
          sTradeDate: this.msg.sTradeDate,
          eTradeDate: this.msg.eTradeDate,
          ClientType: this.msg.ClientType,
          RemitterName: this.msg.RemitterName,
          ClientID: this.msg.ClientID,
          sMoney: this.msg.sMoney,
          eMoney: this.msg.eMoney,
          CurrencyId: this.msg.CurrencyId,
          CostTypeID: this.msg.CostTypeID,
          Conditon: this.msg.Conditon,
          TCNUM: this.msg.TCNUM == 0 ? "" : this.msg.TCNUM,
          TradeWay: this.msg.TradeWay == 0 ? "" : this.msg.TradeWay,
          Type: this.msg.Type,
          AccountType: this.msg.AccountType == 0 ? '' : this.msg.AccountType,
          QEndDate: this.msg.QEndDate,
          QStartDate: this.msg.QStartDate,
          OrderID: this.msg.OrderID == 0 ? '' : this.msg.OrderID,
          Sort: this.msg.Sort,
          EmployeeId: this.msg.EmployeeId,
          KJCostTypeId: this.msg.KJCostTypeId == 0 ? '' : this.msg.KJCostTypeId,
          IsSelectKJSetCostType: this.msg.IsSelectKJSetCostType == 0 ? '' : this.msg.IsSelectKJSetCostType,
        }
        this.msg = msg;
      },
      handleCurrentChange(val) { //翻页
        this.msg.pageIndex = val;
        this.getPageList();
      },
      resetPageIndex() { // 重置页码
        this.msg.pageIndex = 1;
        this.currentPage = 1;
      },
      goUrl(path, rowData, Conditon, pageIndex) {
        this.$router.push({
          path:'/financial/financalDocument/'+ path,
          query: {
            "id": rowData.FrID,

            blank: 'y',
            tab: '单据详情'
          }
        })
      },
      goEit(path, type, id, edit, Conditon, pageIndex) {
        this.$router.push({
          name: path,
          query: {
            "type": type,
            "FrID": id,
            "edit": edit,
            "Conditon": Conditon,
            "pageIndex": pageIndex
          }
        })
      }

    }
  }

</script>
