<style scoped>
    @import "../../../assets/css/cssReset.css";
    .singeRowTable tr th,.singeRowTable tr td{
      text-align: center;
    }
    .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;
    }
    .caoz i{
      margin-bottom: 5px;
    }
    .Remark-box{
        overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width: 100%;
    }
  </style>
  
  <template>
        <div class="dianshangannualRatio" ref="barparent" >
            <div class="el-card__header">
              <el-form class="_info_box" label-width="110px">
                <el-row style="padding:0;">
                  <!-- <el-col :span="4">
                      <el-form-item label="公司：">
                          <el-select filterable v-model='msg.KingdeeBranchId' placeholder="请选择公司" @keyup.native="checkInteger(msg,'RB_Branch_Id')">
                              <el-option v-for="(item,index) in TheAliasList" :label="item.Name" :value='item.Id' :key="index">
                              </el-option>
                            </el-select>
                      </el-form-item>
                  </el-col> -->
                  <el-col :span="4">
                      <el-form-item label="凭证字：">
                        <el-input placeholder="" class="" v-model="msg.FinanceName" clearable
                          maxlength="-1"></el-input>
                      </el-form-item>
                    </el-col>
                  <el-col :span="4">
                    <el-form-item label="单号：">
                      <el-input placeholder="" class="" v-model="msg.FrID" @keyup.native="checkInteger(msg,'FrID')"
                        maxlength="-1"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="4">
                    <el-form-item label="团队编号：">
                      <el-input v-model="msg.TCNUM" class="" clearable></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="5">
                    <el-form-item label="所属公司：">
                      <!-- multiple BranchIds-->
                      <el-select style="width: 100%;" filterable collapse-tags v-model='msg.RB_Branch_Id'
                        @change="getDepartmentMsg.RB_Branch_Id=msg.RB_Branch_Id,msg.RB_Depart_Id='',msg.UpdateBy='',getDepartment()"
                        class="">
                        <el-option :value="-1" label="不限"></el-option>
                        <el-option v-for='item in CompanyList' :label='item.BName' :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.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.DepartmentName'
                          :value='item.DepartmentID'
                          :key='item.DepartmentID'>
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="3">
                    <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.EmName'
                                          :value='item.EmployeeId'
                                          :key='item.EmployeeId'>
                        </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>
                  <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" @click="typeVisible=true">
                    <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="8" @click="typeVisible=true">
                    <el-form-item label="收付款账户：">
                      <el-row>
                        <el-col :span="9">
                          <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-col>
                        <el-col :span="13">
                          <el-button class="hollowFixedBtn" type="primary" size="mini" @click="typeVisible=true" >筛选类型/交易/账户</el-button>
                        </el-col>
                      </el-row>
                    </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-button class="hollowFixedBtn" type="primary" size="mini" @click="typeVisible=true" style="width: 85%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">筛选类型/交易/账户</el-button>
                    </el-form-item>
                  </el-col>
                  <template v-if="heightQueryBox">
                    <el-col :span="6">
                      <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="6">
                      <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" style="width: 47%;" @keyup.native="checkPrice(msg,'sMoney')" clearable></el-input>-
                        <el-input v-model="msg.eMoney" @keyup.native="checkPrice(msg,'eMoney')" class="w64d5" style="width: 47%;" clearable></el-input>
                      </el-form-item>
                    </el-col>
                    <el-col :span="6">
                      <el-form-item label="制单日期：">
                        <el-date-picker style="width: 100%;" 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" style="width: 100%;" 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" style="width: 100%;" 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" clearable></el-input>
                      </el-form-item>
                    </el-col>
                  </template>
                  <el-col :span="heightQueryBox?6:24">
                    
                  </el-col>
                </el-row>
              </el-form>
            </div>
      <div class="query-box" style="padding: 0 0 10px 0;">
        <ul class="clearfix" style="padding: 5px 0 0 0;">
          <li class="hight_query" style="text-align: right;width: 100%;">
            <span>
              <em style="cursor: pointer;" @click.stop="heightQueryBox=!heightQueryBox">高级查询 <i class="iconfont icon-gengduo q-mr-lg"></i></em>
            </span>
            <button class="hollowFixedBtn" @click="resetPageIndex(),getPageList()">{{$t('pub.searchBtn')}}</button>
            <button class="normalBtn" @click="method5()">导出</button>
          </li>
        </ul>
        <div style="text-align: right;">
          <button class="normalBtn" @click="method5(2)">长团导出</button>
          <button class="hollowFixedBtn" @click="method5(3)">短团导出</button>
          <button class="normalBtn" @click="outerVisible = true">核算项目校对导入</button>
          <button class="hollowFixedBtn" @click="method5(1)">核算项目校对导出</button>
        </div>
      </div>
      <div class="_fnDm_content" v-loading='loading'>
        <div>
            <el-table :data="DataList" border style="width: 100%;font-size: 12px;" height="550">
          <el-table-column prop="FrID" label="单号" width="100">
            <template slot-scope='scope'>
              {{scope.row.FrID}}
            </template>
          </el-table-column>
          <el-table-column prop="TradeDate" label="凭证日期" width="100"></el-table-column>
          <el-table-column prop="allName" label="科目代码" width="100">
            <template slot-scope="scope">
             {{scope.row.SubjectCode}}
            </template>
          </el-table-column>
          <el-table-column prop="SubjectName" label="科目名称"></el-table-column>
          <el-table-column prop="Money" label="原币金额" width="100"></el-table-column>
          <el-table-column prop="DebitMoney" label="借方金额" width="100"></el-table-column>
          <el-table-column prop="CreditMoney" label="贷方金额" width="100"></el-table-column>
          <el-table-column prop="Remark" label="凭证摘要">
            <template slot-scope="scope">
                <el-tooltip class="item" effect="dark" :content="scope.row.Remark" placement="bottom">
                    <p class="Remark-box">{{scope.row.Remark}}</p>
                </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column prop="OriginalName" label="系统费用/账户" width="120"></el-table-column>
          <el-table-column prop="Code" label="金蝶币种code" width="100"></el-table-column>
          <el-table-column prop="Name" label="金蝶币种别名" width="100"></el-table-column>
          <el-table-column prop="RateType" label="金蝶汇率类型" width="100"></el-table-column>
          <el-table-column prop="Type" label="收支类型" width="80">
            <template slot-scope="scope">
              {{scope.row.Type}}
          </template>
          </el-table-column>
          <el-table-column prop="RemitterName" label="收款/付款对象" width="100">
            <template slot-scope="scope">
              <el-tooltip class="item" effect="dark" :content="scope.row.RemitterName" placement="bottom">
                <p class="Remark-box">{{scope.row.RemitterName}}</p>
              </el-tooltip>
          </template>
          </el-table-column>
          <el-table-column prop="RB_BranchName" label="公司" width="100">
            <template slot-scope="scope">
              <el-tooltip class="item" effect="dark" :content="scope.row.RB_BranchName" placement="bottom">
                <p class="Remark-box">{{scope.row.RB_BranchName}}</p>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column prop="OrderID" label="关联订单" width="100">
            <template slot-scope="scope">
              {{scope.row.OrderID?scope.row.OrderID:'-'}}
            </template>
          </el-table-column>
          <el-table-column prop="TCNUM" label="关联团号" width="100">
            <template slot-scope="scope">
              <el-tooltip class="item" effect="dark" :content="scope.row.TCNUM" placement="bottom">
                <p class="Remark-box">{{scope.row.TCNUM}}</p>
              </el-tooltip>
            </template>
          </el-table-column>

          <el-table-column prop="ItemName" label="金蝶核算项目" width="200">
            <template slot-scope="scope">
                <div v-for="(item,index) in scope.row.ItemList" :key="index">
                  <el-tooltip class="item" effect="dark" :content="item" placement="bottom">
                    <p class="Remark-box">{{item}}</p>
                  </el-tooltip>
                </div>
                
            </template>
          </el-table-column>
       
        </el-table>
        </div>
        
        <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='w800' :modal="false" title="账户类型/交易方式/收款账户" :visible.sync="typeVisible" center>
        <el-form class="_info_box clearfix" label-width="80px">
          <div v-for="(i,index) in typeList" :key="index">
          <el-row class="fit row wrap" style="padding:15px 20px 0 0;">
            <el-col :span="6">
              <el-form-item label="类型：">
                <el-select filterable v-model='i.AccountType'>
                  <el-option value="" label="不限"></el-option>
                  <el-option v-for='item in i.AccList' :label='item.Name' :value='item.ID' :key='item.ID'>
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="方式：">
                <el-select filterable v-model='i.TradeWay'
                  @change="getAccountList(i.AccountType,i.TradeWay,index),msg.ClientID=''">
                  <el-option value="0" label="不限"></el-option>
                  <el-option v-for='item in i.BranchAccountList' :label='item.Name' :value='item.ID' :key='item.ID'>
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="9">
              <el-form-item label="账户：">
                <el-select style="width: 100%;" filterable multiple v-model='i.BankID'>
                  <el-option value="" label="不限"></el-option>
                  <el-option v-for='item in i.accountList' :label='item.Name' :value='item.ID' :key='item.ID'>
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="3" style="padding: 8px 0 0 10px;">
              <el-tooltip v-if="index==0" class="item" effect="dark" content="新增" placement="top-start">
                <el-button type="primary" circle @click="addType(i,index,1)" size="mini">
                  <i class="el-icon-plus"></i>
                </el-button>
              </el-tooltip>
              <el-tooltip v-else class="item" effect="dark" content="删除" placement="top-start">
                <el-button type="danger" circle @click="addType(i,index,0)" size="mini">
                  <i class="el-icon-delete"></i>
                </el-button>
              </el-tooltip>
            </el-col>
          </el-row>
          </div>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <button class="hollowFixedBtn" @click="typeCancel">{{$t('pub.cancelBtn')}}</button>
          <button class="normalBtn" type="primary" @click="determine">查询</button>
        </div>
      </el-dialog>
      <el-dialog custom-class='w700' title="导入" :visible.sync="outerVisible" center>
        <el-upload style="text-align: center;" drag class="upload-demo"
                  :action="importFileUrl2"
                  :on-success="handleAvatarSuccess"
                  :before-upload="beforeAvatarUpload">
              <i class="el-icon-upload"></i>
              <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
              <!-- <div slot="tip" class="el-upload__tip">只能上传Excel文件</div> -->
            </el-upload>
        
      </el-dialog>
    </div>
  </template>
  <script>
    import Vue from 'vue'
    export default {
      data() {
        return {
          showID: false,
          active: 1,
          userId: 0,
          zhuanjiaoBox: false,
          searchList: [],
          widthSon: '700px',
          colorSon: "#f5f5f5",
          Finance_InvoiceUpdate:false,
          Finance_ExpenseType:false,
          msg: {
            pageIndex:1,//		是	[string]		查看
            pageSize:5,//		是	[string]		查看
            FrID:'0',//		是	[string]		查看
            sDate:'',//		是	[string]		
            eDate:'',//		是	[string]		
            Status:'2',//		是	[string]		查看
            TemplateId:'0',//		是	[string]		查看
            RB_Branch_Id:'',//		是	[string]		查看
            RB_Depart_Id:'',//		是	[string]		查看
            sTradeDate:'',//		是	[string]		
            eTradeDate:'',//		是	[string]		
            ClientType:'',//		是	[string]		查看
            RemitterName:'',//		是	[string]		
            ClientID:'',//		是	[string]		查看
            sMoney:'',//		是	[string]		
            eMoney:'',//		是	[string]		
            CurrencyId:'0',//		是	[string]		查看
            CostTypeID:'',//		是	[string]		查看
            Conditon:'',//		是	[string]		查看
            TCNUM:'',//		是	[string]		
            TradeWay:'',//		是	[string]		查看
            Type:'',//		是	[string]		查看
            AccountType:'',//		是	[string]		查看
            QEndDate:'',//		是	[string]		
            QStartDate:'',//		是	[string]		
            UpdateBy:'',//		是	[string]		查看
            IsFormRecPayQuery:'1',//		是	[string]		查看
            KJCostTypeId:0,//		是	[string]		查看
            IsSelectKJSetCostType:0,//		是	[string]		查看
            Remark:'',//		是	[string]		
            Sort:'2',//		是	[string]		查看
            EmployeeId:'',//		是	[string]		查看
            TCID:'',//		是	[string]		查看
            OrderID:'',//
            KingdeeBranchId:'0',
            FinanceName:'记',
            BranchIds:'',
            AccountIdStr:'',
            ColorType:1,//和平
          },
          BranchIds:[],
          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'
          },
          modifydjfp:{
            
          },
          xgfpBox:false,
          getInvoiceList:[],
          costmode:false,//费用类型的修改弹窗
          trabeList:[],//修改费用类型的下啦数据
          TheAliasList:[],
          typeVisible: false,
          typeList:[
            {
              AccountType:'',//账户类型
              AccList:[],
              TradeWay:'0',//交易方式
              BranchAccountList:[],
              BankID:[],//收付款账户
              accountList:[]
            }
          ],
          getDepartmentMsg:{// 部门
              RB_Group_Id:'',
              RB_Branch_Id:'',
              Status:0,
              ParentId:-1,
              Tier:0,
          },
          employeeMsg:{ // 员工
                GroupId:'',
                BranchId:-1,
                DepartmentId:0,
                PostId:0,
                IsLeave:0,
            },
            importFileUrl2:'',
            outerVisible: false
        }
      },
      created() {
        
      },
      components: {
        
      },
      mounted() {
        let userInfo = this.getLocalStorage();
        this.importFileUrl2=this.domainManager().UploadFileUrl +
          "?cmd=dmc_post_LocalFileUpload&Type=15&fileType=1&fileLimit=10&EmployeeId="+userInfo.EmployeeId
          +'&RB_Group_id='+userInfo.RB_Group_id +'&KingdeeBId=' + this.msg.RB_Branch_Id
        ;
        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.Financial_post_GetEduBranchEnumList()
        this.financeinfo_post_GetList();
        this.financeinfo_post_GetCostTypeList();
        this.FinancialFlowTemplate_post_GetList();
        this.getCompanyList();
        this.Financial_post_GetConditionList();
        this.getEmployee();
        this.getDepartment();
        this.Financial_post_GetBranchAccountList();
        this.financeinfo_post_GetClientTypeList();
        this.FinancialFlowTemplate_post_GetStatusList();
        this.getPageList();
        this.AccountType_post_GetList();
        this.get_GetInvoiceTypeEnumList()
        
        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: {
        typeCancel(){
          for(let i=0;i<this.typeList.length;i++){
            this.typeList[i].AccountType = ''
            this.typeList[i].TradeWay = '0'
            this.typeList[i].BankID = []
          }
          // this.msg.TradeWay='',
          // this.msg.BankID='',
          this.msg.AccountIdStr=''
          this.typeVisible=false
        },
        determine(){
          this.msg.AccountIdStr = ''
          for(let i=0;i<this.typeList.length;i++){
            let data = (this.typeList[i].TradeWay?this.typeList[i].TradeWay:0)+'&'
            +(this.typeList[i].BankID.length>0?this.typeList[i].BankID.join(','):"''")
            this.msg.AccountIdStr = JSON.parse(JSON.stringify(this.msg.AccountIdStr))+(i==0?'':'|')+data
          }
          this.typeVisible=false
          this.getPageList()
        },
        addType(item,index,type){
          if(type){
            this.typeList.push(
              {AccountType:'',//账户类型
              AccList:JSON.parse(JSON.stringify(item.AccList)),
              TradeWay:'0',//交易方式
              BranchAccountList:JSON.parse(JSON.stringify(item.BranchAccountList)),
              BankID:[],//收付款账户
              accountList:[]}
              )
          }else{
            this.typeList.splice(index,1)
          }
        },
        Financial_post_GetEduBranchEnumList() {
          this.apipost('Financial_post_GetEduBranchEnumList', {}, res => {
            if (res.data.resultCode == 1) {
              this.TheAliasList = res.data.data;
            //   this.msg.KingdeeBranchId = this.TheAliasList[0].Id
            } else {
              this.Error(res.data.message);
            }
          }, err => {})
        },
        get_GetInvoiceTypeEnumList(){
          
          this.apipost('Financial_get_GetInvoiceTypeEnumList', {}, res => {
                if (res.data.resultCode == 1) {
                 this.getInvoiceList=res.data.data
                 this.getInvoiceList.forEach(x=>{
                   x.Id = Number(x.Id)
                 })
  
                }
              }, err => {})
        },
        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 => {})
        },
          setdaju(row){//获取发票详情
          this.apipost('Financial_get_GetFinanceInvoiceInfo', {FrId:row.FrID}, res => {
            if (res.data.resultCode == 1) {
              this.modifydjfp = res.data.data
              this.xgfpBox = true;
            } else {
              this.Error(res.data.message);
            }
          }, err => {})
        },
        //发票的修改
        setfp(){
          if(this.modifydjfp.InvoiceMoney ==null || this.modifydjfp.InvoiceMoney==''){
            this.modifydjfp.InvoiceMoney=0
          }
           if(this.modifydjfp.InvoiceRemark ==null ){
            this.modifydjfp.InvoiceRemark=''
          }
            this.apipost('Financial_get_SetFinanceInvoiceInfo', this.modifydjfp, res => {
            if (res.data.resultCode == 1) {
              this.Success(res.data.message);
              this.xgfpBox = false;
            } else {
              this.Error(res.data.message);
            }
          }, err => {})
        },
        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;
              this.typeList.forEach(item=>{
                item.AccList = this.AccList
              })
            } else {
              this.$message.error(res.data.message);
            }
          }, err => {})
        },
        getPageList() { // 获取列表数据
          this.loading = true;
          if(this.msg.FrID===''){
            this.msg.FrID = 0
          }
          // if(this.msg.FinanceName===''){
          //   this.msg.FinanceName = '记'
          // }
          if(this.BranchIds.length>0){
            let ids =  JSON.parse(JSON.stringify(this.BranchIds)).join(',')
            this.msg.BranchIds = ids
          }else{
            this.msg.BranchIds = ''
          }
          this.apipost('Financial_post_GetFinanceToKingdeePageListForHP', this.msg, res => {
            if (res.data.resultCode == 1) {
              let data = res.data.data.pageData;
              this.total = res.data.data.count;
              if (this.total == 0) {
                this.DataList = [];
              }else{
                this.DataList = data
              }
              this.loading = false;
            } else {
              this.loading = false;
              this.$message.error(res.data.message);
            }
            this.currentPage = parseInt(this.msg.pageIndex);
          }, err => {})
        },
        method5: function (type) {
          if (!this.msg.FinanceName) this.msg.FinanceName = '记';
          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;
          if(this.BranchIds.length>0){
            let ids =  JSON.parse(JSON.stringify(this.BranchIds)).join(',')
            this.msg.BranchIds = ids
          }else{
            this.msg.BranchIds = ''
          }
          if(type==1){
            this.GetLocalFile("Financial_post_DownLoadFinanceToKingdeeItem", this.msg, "核算项目校对导出.xls");
          }else if(type==2){
            this.msg.FinanceAccountantMergeType = 1
            this.GetLocalFile("Financial_post_DownLoadFinanceToTCNum", this.msg, "长团导出.xls");
          }else if(type==3){
            this.msg.FinanceAccountantMergeType = 2
            this.GetLocalFile("Financial_post_DownLoadFinanceToTCNum", this.msg, "短团导出.xls");
          }else{
            this.GetLocalFile("Financial_post_DownLoadFinanceToKingdee", this.msg, "金蝶数据导出.xls");
          }
        },
        beforeAvatarUpload(file) {
          return
        },
        //上传
        handleAvatarSuccess(res, file) {
            let that = this
          if (res.resultCode == 1) {
            this.Success(res.message);
            this.outerVisible = false;
            this.getPageList();
          }else{
            that.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
            }).then(() => {
                
            }).catch(() => {

            });
  
          }
        },
        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) {
              res.data.data.forEach(item=>{
                if(item.ID==8||item.ID==9||item.ID==10){
                  this.ClientTypeList.push(item)
                }
              })
              // 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, index) { //收款账户
          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;
                this.typeList[index].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;
                this.typeList[index].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;
                this.typeList[index].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;
                this.typeList[index].accountList = accountList
              }
            }, err => {})
          }
  
        },
        Financial_post_GetBranchAccountList() { //获取交易方式列表
          this.apipost('Financial_post_GetBranchAccountList', {}, res => {
            if (res.data.resultCode == 1) {
              this.BranchAccountList = res.data.data;
              this.typeList.forEach(item=>{
                item.BranchAccountList = JSON.parse(JSON.stringify(this.BranchAccountList))
              })
            }
          }, err => {})
        },
        getDepartment () { //部门
          this.apipost('admin_get_DepartmentGetList', this.getDepartmentMsg, res => {
            if(res.data.resultCode == 1) {
                this.DepartmentList = res.data.data;
            }
          }, err => {})
        },
        getEmployee() { //员工
          this.apipost('admin_get_EmployeeGetList', this.employeeMsg, res => {
              if(res.data.resultCode == 1) {
                  this.EmployeeList = res.data.data;
              }
          }, err => {})
        },
        getCompanyList() { //获取公司列表
          this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{
              if(res.data.resultCode==1){
                  this.CompanyList=res.data.data;
              }else{}
          },err=>{})
        },
        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: '单据详情'
          //   }
          // })
          this.OpenNewUrl("/financial/financalDocument/"+path, {
            id: rowData.FrID
          });
        },
        goEit(path, type, id, edit, Conditon, pageIndex) {
          this.$router.push({
            name: path,
            query: {
              "type": type,
              "FrID": id,
              "edit": edit,
              "Conditon": Conditon,
              "pageIndex": pageIndex
            }
          })
        },
        showfeiyong(row){
          this.apipost('Financial_get_GetFinanceCostTypeList', {FrId:row.FrID}, res => {
              if (res.data.resultCode == 1) {
                this.trabeList = res.data.data
                this.costmode = true
              }
            }, err => {})
        },
        getAccountList2(val,index){
          this.GetCostTypeList.map((x)=>{
            if(x.ID == val){
              this.trabeList[index].CostTypeName = x.Name;
              return
            }
          })
        },
        preservetransaction(){//保存费用类型的修改
          let msg = []
          this.trabeList.forEach(x=>{
            let  obj ={
              ID:x.ID,
              FinanceId:x.FinanceId,
              CostTypeId:x.CostTypeId,
              CostTypeName:x.CostTypeName,
            }
            msg.push(obj)
          })
          this.apipost('Financial_get_SetFinanceCostTypeInfo', msg, res => {
            if (res.data.resultCode == 1) {
              this.$message.success(res.data.message);
              this.costmode = false
              this.getPageList()
            }else{
              this.Error(res.data.message);
            }
          }, err => {})
        }
  
      }
    }
  
  </script>
  <style scoped>
    .dianshangannualRatio .el-card__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 18px 20px;
  }

  </style>
  
  