<style scoped>
.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;
}
.zhuiClass {
  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;
}
._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: 10px;
}
tr._item_list {
  border-bottom: 1px solid #e5e5e5;
  height: 78px;
}
tr._item_list td {
  border-bottom: 1px solid #e5e5e5;
  padding: 10px;
}
/* tr._t_head th{border-top: 1px solid #e5e5e5;} */
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: 190px;
}
._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: 28px;
  height: 28px;
  display: inline-block;
  color: white !important;
  border-radius: 50%;
  text-align: center;
  line-height: 28px;
  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,
.icon-zhuanhuan1 {
  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,
._icon_btn i.icon-cuishou {
  background-color: #e6a014;
  font-size: 16px;
}
._icon_btn i.icon-zhuanjiao1:hover,
._icon_btn i.icon-cuishou:hover {
  background-color: rgb(235, 184, 84);
}
._icon_btn i.icon-zhuanjiao1:active,
._icon_btn i.icon-cuishou:active {
  background-color: rgb(223, 150, 6);
}
._tag_span {
  background-color: rgba(64, 158, 255, 0.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, 0.2);
  white-space: nowrap;
  margin-bottom: 4px;
}
._tag_span._tag_warr {
  background-color: rgba(103, 194, 58, 0.1);
  border-color: rgba(103, 194, 58, 0.2);
  color: #67c23a;
}
._fex_cen {
  display: flex;
  align-items: center;
}
._pad5 {
  padding: 5px 10px;
}
._color_gar {
  color: gray;
}
.page_fnDm .query-box li:last-child {
  top: 97px !important;
}
._TCIDAndTCNUMList {
  display: flex;
}
.w216 {
  width: 216px;
}
._icon_btn i.icon-tiaozheng {
  background-color: #1296db;
  font-size: 16px;
}
._icon_btn i.icon-zhifupeizhiguanli {
  background-color: #1296db;
  font-size: 16px;
}

.boss_btn_tips,
.boss_btn {
  text-align: center;
}
.boss_btn_tips {
  padding-bottom: 25px;
}
.boss_btn span {
  color: #2bb87c;
}
.cdForm .el-form-item {
  display: inline-block;
}
.leaderPayTable {
  width: 100%;
  margin: 10px auto;
  text-align: center;
  font-size: 12px;
  color: #333;
  border-collapse: collapse;
  background-color: #fff;
  border: 1px solid #d1d1d1;
}

.leaderPayTable th {
  background: #e6e6e6;
  padding: 8px 0;
  color: #333;
  border: 1px solid #d1d1d1;
  font-weight: bold;
}

.leaderPayTable tr td {
  background-color: #fff;
  padding: 8px 0;
  height: 32px;
  border: 1px solid #d1d1d1;
  text-align: center;
}

.leaderPayTable2 tr td {
  border: 1px solid #ccc;
  line-height: 17px;
  height: 25px;
  font-size: 12px;
  background: #fff;
  text-align: center;
  padding: 0;
  margin: 0;
}
.Myquery-box li {
  float: left;
  font-size: 12px;
  color: #666;
  margin: 20px 30px 20px 0;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}
</style>

<template >
    <div class="page_fnDm" @keyup.enter="resetPageIndex(),getPageList()">
        <ul class="_nav clearfix">
            <!-- <li :class="active==5?'_active':''" @click="active=5,msg.Conditon=5,getPageList()">全部</li> -->
            <li :class="active==1?'_active':''" @click="active=1, msg.Conditon=1, BOSSBtn = false, getPageList()">{{$t('ios.wfqide')}}</li>
            <li :class="active==3?'_active':''" @click="active=3, msg.Conditon=3, getPageList()">{{$t('ios.dwspide')}}</li>
            <li :class="active==2?'_active':''" @click="active=2, msg.Conditon=2, BOSSBtn = false, getPageList()" >{{$t('ios.wspide')}}</li>
            <li :class="active==6?'_active':''" @click="active=6, msg.Conditon=6, BOSSBtn = false, getPageList()">{{$t('ios.wzfeide')}}</li>
            <li :class="active==7?'_active':''" @click="active=7, msg.Conditon=7, BOSSBtn = false, getPageList()">{{$t('ios.bbhuide')}} <span v-if="rejectNum !=='' && rejectNum>=0" style="color:red">({{rejectNum}})</span></li>
            <li :class="active==4?'_active':''" @click="active=4, msg.Conditon=4, BOSSBtn = false, getPageList()">{{$t('ios.csgwode')}}</li>

            <li class="hight_query" style="float:right;">
                <span>
                    <em @click.stop="heightQueryBox=!heightQueryBox">{{$t('fnc.gjchaxun')}} <i class="iconfont icon-gengduo"></i></em>
                </span>
                <button class="hollowFixedBtn" @click="resetPageIndex(),getPageList()">{{$t('pub.searchBtn')}}</button>
                <button class="normalBtn" @click="goUrlAdd('ChoiceAddFinancialDocuments')">{{$t('pub.addBtn')}}</button>
                <button class="normalBtn" v-if="checkboxShow" @click="Financial_post_SetBatch">{{$t('fnc.piltijiao')}}</button>
                <button class="normalBtn"  @click="method5()">{{$t('visa.v_daochu')}}</button>
                <button class="hollowFixedBtn" @click="goUrl('WorkEntrustmentMy')">{{$t('fnc.gzweituo')}}</button>
                <button v-if="active==3 && !hbState && hbShow" class="hollowFixedBtn" @click="HebingSP">合并审批</button>
                <button v-if="active==3 && hbState" class="hollowFixedBtn" @click="hbState=false,getPageList">关闭合并审批</button>
                <button v-loading="hbBtn" v-if="active==3 && hbState" class="hollowFixedBtn" @click="HebingSPLast">审批</button>
                <button v-if="HandShow" class="hollowFixedBtn" @click="Handwithfee">手配费收入</button>
                <button  class="hollowFixedBtn" @click="ZhiDanChongDi"> 预付款冲抵</button>
    <!-- v-if="F_Advance_Match" -->
                <button class="hollowFixedBtn" @click="BOSSBtn = !BOSSBtn, checkList = [], getPageList(1), BOSSBtn2 = false" v-if="msg.Conditon === 3 && userMenuCode">{{BOSSBtn ? '关闭一键审批' : '一键审批'}}</button>
                <button class="hollowFixedBtn" v-if="msg.Conditon === 3 && BOSSBtn" @click="BOSSBtnClick(1)">{{$t('ios.shenpi')}}</button>
                <button class="hollowFixedBtn" @click="BOSSBtn2 = !BOSSBtn2, checkList = [], getPageList(1), BOSSBtn = false" v-if="msg.Conditon === 3">{{BOSSBtn2 ? '关闭一键转交' : '一键转交'}}</button>
                <button class="hollowFixedBtn" v-if="msg.Conditon === 3 && BOSSBtn2" @click="BOSSBtnClick(2)">转交</button>

            </li>

        </ul>
        <div class="Myquery-box">
            <ul class="clearfix">
                <li>
                    <span>
                        <em>{{$t('fnc.danhao')}}</em>
                        <el-input placeholder="" class="w150" v-model="msg.FrID" @keyup.native="checkInteger(msg,'FrID')" maxlength="8"></el-input>
                    </span>
                </li>
                <li>
                    <span>
                        <em>{{$t('fnc.shzhuangtai')}}</em>
                        <el-select  v-model="msg.Status" filterable class="w150">
                            <el-option value="-1" :label="$t('pub.unlimitedSel')"></el-option>
                            <el-option v-for='item in StatusList'
                                :label='item.Name'
                                :value='item.ID'
                                :key='item.ID'>
                            </el-option>
                        </el-select>
                    </span>
                </li>
               <li v-if='msg.Conditon==3'>
                <span>
                    <em>{{$t('fnc.yjdanju')}}</em>
                    <el-select  v-model="msg.IsSpecial" filterable class="w150">
                        <el-option :value="0" :label="$t('pub.unlimitedSel')"></el-option>
                        <el-option :value="1" :label="$t('fnc.yes')"></el-option>
                        <el-option :value="2" :label="$t('fnc.fou')"></el-option>
                    </el-select>
                </span>
                </li>
                <li>
                    <span>
                        <em>{{$t('fnc.mbleixing')}}</em>
                        <el-select  v-model="msg.TemplateId" filterable class="w150">
                            <el-option value="0" :label="$t('pub.unlimitedSel')"></el-option>
                            <el-option v-for='item in TemplateGetList'
                                :label='item.Name'
                                :value='item.Id'
                                :key='item.Id'>
                            </el-option>
                        </el-select>
                    </span>
                </li>
                <li>
                    <span>
                        <em>{{$t('fnc.djleixing')}}</em>
                        <el-select  v-model="msg.Type" filterable class="w150">
                            <el-option key="0" value="0" :label="$t('pub.unlimitedSel')"></el-option>
                            <el-option key="1" value="1" :label="$t('restaurant.res_income')"></el-option>
                            <el-option key="2" value="2" :label="$t('restaurant.res_outcome')"></el-option>
                            <el-option key="3" value="5" :label="$t('fnc.yingshou')"></el-option>
                            <el-option key="4" value="6" :label="$t('fnc.yingfu')"></el-option>
                            <el-option key="5" value="4" :label="$t('fnc.zjdiaobo')"></el-option>
                            <el-option key="6" value="7" :label="$t('visaT.guazdanju')"></el-option>
                        </el-select>
                    </span>
                </li>
              <li>
                <span>
                  <em>{{$t('system.table_rank')}}</em>
                  <el-select  v-model="msg.Sort" filterable class="w150">
                    <el-option key="-1" value="-1" :label="$t('pub.unlimitedSel')"></el-option>
                    <el-option key="0" value="0" :label="$t('fnc.tuanqi')"></el-option>
                    <el-option key="1" value="1" :label="$t('fnc.hkriqi')"></el-option>
                    <el-option key="2" value="2" :label="$t('fnc.danhao')"></el-option>
                    <el-option key="3" value="3" :label="$t('fnc.jylshuihao')"></el-option>
                  </el-select>
                </span>
              </li>
                <template v-if="heightQueryBox">
                     <li>
                        <span>
                        <em>{{$t('system.query_company')}}</em>
                            <el-select  filterable  v-model='msg.RB_Branch_Id' @change="getDepartmentMsg.RB_Branch_Id=msg.RB_Branch_Id,msg.RB_Depart_Id='',getDepartment()"  class="w150">
                                <el-option :value="-1" :label="$t('pub.unlimitedSel')"></el-option>
                                <el-option v-for='item in CompanyList'
                                    :label='item.BName'
                                    :value='item.Id'
                                    :key='item.Id'>
                                </el-option>
                            </el-select>
                        </span>
                    </li>
                    <li>
                        <span>
                        <em>{{$t('fnc.fybumen')}}</em>
                            <el-select  filterable  v-model='msg.RB_Depart_Id' @change="employeeMsg.DepartmentId=msg.RB_Depart_Id,getEmployee(),msg.UpdateBy=''" class="w150">
                                <el-option :value="0" :label="$t('pub.unlimitedSel')"></el-option>
                                <el-option v-for='item in DepartmentList'
                                    :label='item.DepartmentName'
                                    :value='item.DepartmentID'
                                    :key='item.DepartmentID'>
                                </el-option>
                            </el-select>
                        </span>
                    </li>
                    <li>
                        <span>
                        <em>{{$t('fnc.zdrenyuan')}}</em>
                            <el-select  filterable  v-model='msg.UpdateBy'  class="w150">
                                <el-option :value="0" :label="$t('pub.unlimitedSel')"></el-option>
                                <el-option v-for='item in EmployeeList'
                                    :label='item.EmName'
                                    :value='item.EmployeeId'
                                    :key='item.EmployeeId'>
                                </el-option>
                            </el-select>
                        </span>
                    </li>
                        <li>
                            <span>
                                <em>{{$t('fnc.zhleixing')}}</em>
                                <el-select  filterable  v-model='msg.AccountType' class="w150">
                                    <el-option value="" :label="$t('pub.unlimitedSel')"></el-option>
                                    <el-option v-for='item in AccList'
                                        :label='item.Name'
                                        :value='item.ID'
                                        :key='item.ID'>
                                    </el-option>
                                </el-select>
                            </span>
                    </li>
                    <li>
                        <span>
                            <em>{{$t('tips.jiaoyifangshi')}}</em>
                            <el-select  filterable  v-model='msg.TradeWay' @change="getAccountList(msg.AccountType,msg.TradeWay),msg.ClientID=''"  class="w150">
                                <el-option :value="0" :label="$t('pub.unlimitedSel')"></el-option>
                                <el-option v-for='item in BranchAccountList'
                                    :label='item.Name'
                                    :value='item.ID'
                                    :key='item.ID'>
                                </el-option>
                            </el-select>
                        </span>
                    </li>
                    <li>
                        <span>
                            <em>{{$t('fnc.sfkzhanghu')}}</em>
                            <el-select  filterable  v-model='msg.BankID'  class="w150">
                                <el-option value="" :label="$t('pub.unlimitedSel')"></el-option>
                                <el-option v-for='item in accountList'
                                    :label='item.Name'
                                    :value='item.ID'
                                    :key='item.ID'>
                                </el-option>
                            </el-select>
                        </span>
                    </li>
                    <li v-show="msg.Type==2">
                        <span>
                            <em>{{$t('fnc.dxleixing')}}</em>
                            <el-select  filterable  v-model='msg.ClientType' @change="financeinfo_post_GetClientAccountList(msg.ClientType),msg.ClientID=''" class="w150">
                                <el-option value="" :label="$t('pub.unlimitedSel')"></el-option>
                                <el-option v-for='item in ClientTypeList'
                                    :label='item.Name'
                                    :value='item.ID'
                                    :key='item.ID'>
                                </el-option>
                            </el-select>
                        </span>
                    </li>
                    <li v-show="msg.Type==2">
                        <span>
                            <em>{{$t('fnc.fkduixiang')}}</em>
                            <el-select  filterable  v-model='msg.ClientID' class="w150">
                                <el-option value="" :label="$t('pub.unlimitedSel')"></el-option>
                                <el-option v-for='item in ClientAccountList'
                                    :label='item.Name'
                                    :value='item.ID'
                                    :key='item.ID'>
                                </el-option>
                            </el-select>
                        </span>
                    </li>
                    <li>
                        <span>
                            <em>{{$t('scen.sc_temID')}}</em>
                            <el-input v-model="msg.TCID" class="w150" @keyup.native="checkInteger(msg,'TCID')"></el-input>
                        </span>
                    </li>
                    <li>
                        <span>
                            <em>{{$t('fnc.ddbianhao')}}</em>
                            <el-input v-model="msg.OrderID" class="w150" @keyup.native="checkInteger(msg,'OrderID')"></el-input>
                        </span>
                    </li>
                    <li>
                        <span>
                            <em>{{$t('fnc.bzleixing')}}</em>
                            <el-select  filterable  v-model='msg.CurrencyId'  class="w150">
                                <el-option v-for="item in currencyTypeList" :key="item.ID" :value="item.ID" :label="item.Name"></el-option>
                            </el-select>
                        </span>
                    </li>
                    <li>
                        <span>
                            <em>{{$t('fnc.feiyongleixing')}}</em>
                            <el-select  filterable  v-model='msg.CostTypeID'  class="w150">
                                <el-option v-for="item in GetCostTypeList" :key="item.ID" :value="item.ID" :label="item.Name"></el-option>
                            </el-select>
                        </span>
                    </li>
                    <li>
                        <span>
                            <em>{{$t('fnc.djjine')}}</em>
                            <el-input v-model="msg.sMoney" class="w64d5"></el-input>-<el-input v-model="msg.eMoney" class="w64d5"></el-input>
                        </span>
                    </li>
                    <li v-if="msg.Conditon==1">
                        <span>
                            <em>{{$t('fnc.zdriqi')}}</em>
                            <el-date-picker class="h34"
                                @change="timeAdd(1)"
                                v-model="productionDate"
                                type="daterange"
                                value-format="yyyy-MM-dd"
                                :range-separator="$t('restaurant.res_To')">
                            </el-date-picker>
                        </span>
                    </li>
                    <li v-if="msg.Conditon==2">
                        <span>
                            <em>{{$t('fnc.spriqi')}}</em>
                            <el-date-picker class="h34"
                                @change="timeAdd(2)"
                                v-model="approvalDate"
                                type="daterange"
                                value-format="yyyy-MM-dd"
                                :range-separator="$t('restaurant.res_To')">
                            </el-date-picker>
                        </span>
                    </li>
                    <li v-if="msg.Conditon==2 || msg.Conditon==3">
                        <span>
                        <em>{{$t('fnc.jiaoyiriqi')}}</em>
                        <el-date-picker class="h34"
                                        v-model="transactionDate"
                                        @change="timeAdd(3)"
                                        type="daterange"
                                        value-format="yyyy-MM-dd">
                        </el-date-picker>
                        </span>
                    </li>
                    <li>
                        <span>
                            <em>{{$t('scen.sc_ftTime')}}</em>
                            <el-date-picker class="h34"
                                v-model="missionDate"
                                @change="timeAdd(4)"
                                type="daterange"
                                value-format="yyyy-MM-dd">
                            </el-date-picker>
                        </span>
                    </li>
                    <li v-if="msg.Conditon==1 || msg.Conditon==3||msg.Conditon==2||msg.Conditon==6">
                        <span>
                            <em>费用备注</em>
                            <el-input class="w200" v-model="msg.Remark"></el-input>
                        </span>
                    </li>
                </template>
            </ul>
        </div>
        <!-- <input type="text" v-model="mathNumber" @blur="mathMoney(mathNumber)">
        <input type="text" v-model="ChineseStr"> -->
        <div class="_fnDm_content" v-loading='loading' :style="{minHeight:minHeight+'px'}">
            <table border="0" cellspacing="0" cellpadding="0" class="singeRowTable" style="margin-bottom:30px;">
                <tr class="_t_head">
                   <th v-if="hbState || checkboxShow || BOSSBtn || BOSSBtn2"><input type="checkbox" v-model="isCkedAll"  @click='checkedAll()'></th>
                   <th width="90">{{$t('system.query_company')}}</th>
                   <th>{{$t('fnc.danhao')}}</th>
                   <th width="90">{{$t('fnc.djleixing')}}</th>
                   <th>{{$t('hotel.hotel_corrlelatition')}}</th>
                   <th>{{$t('fnc.feiyongleixing')}}</th>
                   <th>{{$t('tips.jiaoyifangshi')}}</th>
                   <th>{{$t('fnc.jine')}}</th>
                   <th>{{msg.Type==1? $t('fnc.shoukuan') : $t('fnc.fukuan')}}{{$t('fnc.duixiang')}}</th>
                   <th width="150">{{$t('fnc.zdrenyuan')}}</th>
                   <th>{{$t('fnc.dqzhuangtai')}}</th>
                   <th>{{$t('system.table_operation')}}</th>
                </tr>
                <tr class="_item_list" v-for="(item,index) in DataList">
                    <td v-if="hbState || checkboxShow || BOSSBtn || BOSSBtn2"><input type="checkbox" :value="item.FrID" v-model="checkList" @change="ckeckedOne"></td>
                  <td>{{item.BranchName}}</td>
                    <td class="Bill_par">
                        <el-popover
                            popper-class="detailsIT_Journal"
                            placement="bottom-start"
                            trigger="click">
                                <template v-if="item.Type!=1&&item.Type!=7&&item.modelShow&&(item.Is_Merge===0||item.Is_Merge===null)">
                                    <my-Bill :ID="item.FrID" :width="widthSon" :color="colorSon"></my-Bill>
                                </template>
                                <template v-else-if="item.Type==1&&item.modelShow&&(item.Is_Merge===0||item.Is_Merge===null)">
                                    <my-RVB-Bill :ID="item.FrID" :width="widthSon"  :color="colorSon"></my-RVB-Bill>
                                </template>
                                <template v-else-if="item.Type==7&&item.modelShow&&(item.Is_Merge===0||item.Is_Merge===null)">
                                    <my-GZ-Bill :ID="item.FrID" :width="'1000px'"  :color="colorSon"></my-GZ-Bill>
                                </template>
                                <template v-else-if="item.Is_Merge===1&&item.modelShow">
                                  <my-HB-Bill :ID="item.FrID" :width="widthSon"  :color="colorSon"></my-HB-Bill>
                                </template>
                            <span slot="reference" @click="item.modelShow = true" class="text_d PingFangSC" >{{item.FrID}}</span>
                        </el-popover>
                    </td>
                    <td>
                        <span class="_bg__" :class="item.Type==1 || item.Type==5?'_bg_green':'_bg_red'">{{item.TypeName}}</span>
                        <el-tooltip class="item" effect="dark" content="追加团款"  placement="top">
                           <span v-if="item.OtherType == 1" class="zhuiClass">追</span>
                        </el-tooltip>

                    </td>
                    <td class="_number">
                        <template v-if="item.TCIDAndTCNUMList.length>0">
                            <div class="_TCIDAndTCNUMList">
                                <span>{{$t('visa.v_tuanhao')}}：</span>
                                <template v-if="item.TCIDAndTCNUMList&&item.TCIDAndTCNUMList.length>0">
                                    <p><span v-for="(i,ix) in item.TCIDAndTCNUMList">{{i.TCNUM}}（{{i.TCID}}） <span v-if="ix!=item.TCIDAndTCNUMList.length-1">,<br/></span></span></p>
                                </template>
                                <template v-else>
                                    <span>{{$t('fnc.no')}}</span>
                                </template>
                            </div>
                            <p v-if="item.OrderID>0 && item.OrderSource==8">{{$t('fnc.danhao')}}：<span class="">{{item.OrderID}}</span></p>
                        </template>
                        <template v-else-if="item.OrderSource==8 && item.TCIDAndTCNUMList.length==0">
                             <p class="_TCIDAndTCNUMList">{{$t('tips.zwtqxinxi')}}</p>
                        </template>
                        <template v-else-if="item.OrderSource==4 && item.TCIDAndTCNUMList.length==0">
                          <p class="_TCIDAndTCNUMList text_d"  @click="goTicketPage(item)">{{$t('fnc.jpbianhao')}}：{{item.SourceID}}</p>
                          <p style="margin-top: 5px;">{{$t('advmanager.v_line')}}：<span>{{item.LineName?item.LineName:$t('tips.jpswxzxianlu')}}</span></p>
                        </template>
                        <template v-else-if="item.OrderSource==9 && item.TCIDAndTCNUMList.length==0">
                             <p class="_TCIDAndTCNUMList">{{$t('fnc.gnjpqishu')}}：{{item.Term}}</p>
                        </template>
                        <template v-else-if="item.OrderSource==10 && item.TCIDAndTCNUMList.length==0">
                             <p class="_TCIDAndTCNUMList">{{$t('fnc.qzbianhao')}}：{{item.SourceID}}</p>
                        </template>
                        <template v-else-if="item.OrderSource==11 && item.TCIDAndTCNUMList.length==0">
                             <p class="_TCIDAndTCNUMList">{{$t('fnc.tsbianhao')}}：{{item.SourceID}}</p>
                        </template>
                      <template v-else-if="item.OrderSource==12 && item.TCIDAndTCNUMList.length==0">
                             <p class="_TCIDAndTCNUMList">{{$t('fnc.smjpbianhao')}}：{{item.SourceID}}</p>
                        </template>
                        <template v-else-if="item.OrderSource==0">
                             <p class="_TCIDAndTCNUMList">{{ item.BranchName }}-{{item.DepartName}} </p>
                        </template>
                        <template v-else>
                             <p class="_TCIDAndTCNUMList">{{$t('active.cl_zanwu')}} </p>
                        </template>
                    </td>
                    <td>
                        <template v-for="(s,si) in item.CostTypeList">
                            <span  class="_tag_span">{{s}}</span><br/>
                        </template>
                    </td>
                    <td class="_number">
                        <template v-if="item.TradeWayList&&item.TradeWayList.length>0">
                            <div class="_TradeWayList"   v-for="(tw,twIn) in item.TradeWayList">
                                <p class="_fex_cen clearfix"><span class="_bold">{{tw.Alias}}</span><span class="_bank_name">{{item.TradeWayList[0].TypeName}}</span><span class="_bank_type" :class="tw.AccountType=='私'?'':'_bank_type2'">{{tw.AccountType==""?$t('fnc.no'):tw.AccountType}}</span> </p>
                                <p>{{tw.BankNo}}</p>
                            </div>
                        </template>
                        <template v-else>
                            <div class="_pad5">
                                {{$t('fnc.no')}}
                            </div>
                        </template>
                    </td>
                    <td>
                        <p>{{item.Type==1 ? $t('fnc.yingshou') : $t('fnc.yingfu') }}：<span class="">{{moneyFormat(item.Money)}}</span></p>
                        <p>{{item.Type==1 ? $t('fnc.shishou') : $t('fnc.shifu') }}：<span class="">{{moneyFormat(item.PayMoney)}}</span></p>
                    </td>
                    <td>
                        <template v-if='item.Type===1'>
                        <span class="_color_gar">{{$t('fnc.huikuanren')}}：</span><span>{{item.RemitterName}}</span>
                        </template>
                        <template v-if='item.Type===2'>
                        <span class="_color_gar">{{$t('fnc.fkduixiang')}}：</span><span>{{item.RemitterName}}</span>
                        </template>
                        <template v-if='item.Type===4'>
                        <span class="_color_gar">{{$t('fnc.no')}}</span>
                        </template>
                    </td>
                    <td valign="middle">
                        <img class="_head_img" :src="item.EmPhoto" alt="">
                        <span>{{item.EmName}}</span>
                        <div>{{item.CreateDate}}</div>
                    </td>
                    <td class="_btn_group">
                        <i v-if="item.Status==1" class="iconfont icon-daiqueren"></i>
                        <i v-if="item.Status==4" class="iconfont icon-yiquxiao"></i>
                        <i v-if="item.Status==2" class="iconfont icon-yiqueren"></i>
                        <i  v-if="item.Status==3" class="iconfont icon-shenhebohui"></i>
                        <i  v-if="item.Status==0 || item.Status==5" class="iconfont icon-zancun"></i>
                        <el-popover
                            popper-class="detailsIT_Journal"
                            width="250"
                            trigger="click">
                                <div class="InfoChangeLog" >
                                    <div class="changLog">
                                        <p class="_log_t">{{$t('fnc.lcrizhi')}}</p>
                                        <ul class="changLogList" v-if="GetFinancLogList" v-loading='LogLoading'>
                                            <li class="changLogList_l" v-for="(log,li) in GetFinancLogList">
                                                <span style="background-color: #47BF8C"  class="_radius_green"></span>
                                                <p> <span class="_color_blue">{{log.EmName}}</span>  <span class="fr changLog_time">{{log.UpdateDate}}</span> </p>
                                                <p class="_dtel">{{log.StartValue}}</p>
                                            </li>
                                        </ul>
                                        <ul v-else>
                                            <li>{{$t('hotel.hotel_zanwu')}}</li>
                                        </ul>
                                    </div>
                                </div>
                            <span slot="reference" class="text_d _font_init"  @click="Financial_post_GetFinancLogList(item.FrID)">{{item.StatusStr}}</span>
                        </el-popover>
                    </td>
                    <td class="_icon_btn">
                        <el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')"  placement="top">
                            <i v-if="((msg.Conditon==1 ||msg.Conditon==7) && (item.InOrNotProcess==1 || item.Status==3 || item.Status==0))" class="edit el-icon-edit" @click="goEit(item.Type,item.FrID,true,active,msg.pageIndex, item)"></i>
                        </el-tooltip>
                        <el-tooltip class="item" effect="dark" :content="$t('fnc.chakan')"  placement="top">
                            <i class="iconfont icon-sousuo" v-if='item.Type!==4' @click="goUrl('FinancialDocumentsDetail',item.FrID,active,msg.pageIndex)"></i>
                            <i class="iconfont icon-sousuo" v-if='item.Type===4' @click="goUrl('CapitalAllocationDetail',item.FrID,active,msg.pageIndex)"></i>
                        </el-tooltip>
                        <el-tooltip class="item"  effect="dark" :content="$t('fnc.shenhe')"   placement="top">
                            <i v-if="msg.Conditon==3 && item.Is_Self!=1" class="iconfont icon-ico_commodity_defaul" @click="goUrl('BasicDocuments',item.FrID,active,msg.pageIndex)"></i>
                        </el-tooltip>
                        <el-tooltip class="item"  effect="dark" content="催审"   placement="top">
                            <i v-if="msg.Conditon==1 && item.IsFinancePushOn==1" class="iconfont icon-cuishou" @click="cuishen('Financial_post_SetFinancePushOn', item.FrID)"></i>
                        </el-tooltip>
                        <el-tooltip class="item"  effect="dark" :content="$t('fnc.zhuanjiao')"   placement="top">
                            <i v-if="msg.Conditon==3 && !BOSSBtn2" class="iconfont icon-zhuanjiao1" @click="zhuanBox = true,zhuanMsg.WorkFlowId = item.FrID"></i>
                        </el-tooltip>
                        <el-tooltip  class="item" effect="dark" content="转交"  placement="top">
                            <i v-if="msg.Conditon==7" class="iconfont icon-zhuanhuan1" @click="getExchange(item.FrID)"></i>
                        </el-tooltip>
                        <el-tooltip  class="item" effect="dark" :content="$t('active.cl_zuofei')"  placement="top">
                            <i v-if="((msg.Conditon==1 ||msg.Conditon==7)  && (item.InOrNotProcess==1 || item.Status==3 || item.Status==0))" class="iconfont icon-quxiao1" @click="financeRemove(item.FrID)"></i>
                        </el-tooltip>
                         <el-tooltip v-if="ActionMenuCode.indexOf('F_Update_TradeDate')!=-1"  class="item" :content="$t('fnc.tzjyriqi')"  placement="top">
                            <i v-if="msg.Conditon==2 && item.TradeDate" class="iconfont icon-tiaozheng" @click="dialogFormVisible=true,updateMsg.FrID=item.FrID,updateMsg.OTradeDate=item.TradeDate" ></i>
                        </el-tooltip>
                        <el-tooltip class="item" content="交易方式" placement="top" v-if="active==2 && istransaction == true">
                            <i v-if="active==2" class="iconfont icon-zhifupeizhiguanli"
                              @click="showjiaoyi(item.FrID)"></i>
                          </el-tooltip>
                        <el-tooltip class="item" content="手续费设置" placement="top" v-if="active==2 && istransaction == true && item.Type==1">
                          <i class="iconfont icon-zhifupeizhiguanli"
                            @click="showTranTax(item.FrID,'1')"></i>
                        </el-tooltip>
                        <el-tooltip class="item" content="付款对象设置" placement="top" v-if="(active==2 || active==3)&& istransaction == true && item.Type==2">
                          <i class="iconfont icon-zhifupeizhiguanli"
                            @click="showTranTax(item.FrID,'2')"></i>
                        </el-tooltip>
                        <el-tooltip class="item" content="修改汇率" placement="top" v-if="(active==2 || active==3) && F_Update_CurrencyRate == true">
                          <i class="iconfont icon-money" style="background-color: #47BF8C;color: white;"
                            @click="showhuilv(item)"></i>
                        </el-tooltip>
                    </td>
                </tr>
            </table>
        </div>
        <div class="noData" v-show="noData">
            {{$t('system.content_noData')}}
        </div>
        <div v-if="!BOSSBtn && !BOSSBtn2">
            <el-pagination
                background
                @current-change="handleCurrentChange"
                :current-page.sync="currentPage"
                layout="total,prev, pager, next, jumper"
                :page-size='msg.pageSize'
                :total='total'>
            </el-pagination>
        </div>
        <el-dialog custom-class='addCompany' :title="$t('fnc.xzzjiaoren')" width="400px" :visible.sync="zhuanBox" center :before-close="closeChangeMachie">
            <template v-if="!BOSSDialogText">
                <el-form label-width="100px">
                    <el-form-item :label="$t('fnc.zhuanjiaoren')">
                        <el-select
                            v-model="zhuanMsg.AuditEmId"
                            filterable
                            remote
                            reserve-keyword
                            :placeholder="$t('pub.pleaseImport')"
                            :remote-method="remoteMethod"
                            @change="$forceUpdate()"
                            :loading="loading2">
                            <el-option
                                v-for="item in searchList"
                                :key="item.empId"
                                :label="item.name"
                                :value="item.empId">
                                <span style="float: left">{{ item.name }}</span>
                                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.postName }}</span>
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item :label="$t('hotel.hotel_remark')">
                        <el-input type="textarea" v-model="zhuanMsg.Description" class="w216"></el-input>
                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <button class="normalBtn" type="primary" @click="bossLen = 1, zhuanBtn()">{{$t('pub.saveBtn')}}</button>
                    <button class="hollowFixedBtn" @click="zhuanBox=false">{{$t('pub.cancelBtn')}}</button>
                </div>
            </template>
            <template v-else>
                <p class="boss_btn">{{$t('ios.gongji')}} {{checkList.length}} {{$t('ios.tdqdi')}} <span>{{bossLen}}</span> {{$t('ios.tiao')}}</p>
                <p class="boss_btn_tips">{{$t('ios.yjzjzqbyjxqtcz')}}</p>
            </template>
        </el-dialog>
        <el-dialog :title=" $t('fnc.danhao') + '：' + updateMsg.FrID + $t('fnc.tzjyriqi')" width="400px" :visible.sync="dialogFormVisible" center :before-close="closeChangeMachie" >
            <el-form label-width="110px">
                <el-form-item :label="$t('fnc.yjyriqi')">
                    <el-date-picker
                        v-model="updateMsg.OTradeDate"
                        type="date"
                        :disabled='true'>
                    </el-date-picker>
                </el-form-item>
                <el-form-item :label="$t('fnc.jiaoyiriqi')">
                    <el-date-picker
                        v-model="updateMsg.TradeDate"
                        type="date"
                        value-format="yyyy-MM-dd"
                        :placeholder="$t('admin.admin_choDate')">
                    </el-date-picker>
                </el-form-item>
                 <el-form-item :label="$t('fnc.shuoming')">
                    <el-input type="textarea" v-model="updateMsg.Description" class="w216"></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button class="hollowFixedBtn" @click="dialogFormVisible=false">{{$t('pub.cancelBtn')}}</el-button>
                <el-button class="normalBtn" type="primary" @click="UpdateTradeDate()">{{$t('pub.sureBtn')}}</el-button>
            </div>
        </el-dialog>
         <!-- 修改交易方式 -->
        <el-dialog title="修改交易方式" width="600px"
            :visible.sync="transactionmode" center :before-close="closeChangeMachie">
            <el-form label-width="110px">
            <div class="rb_top_row _r_mb5" v-for='(x,y) in trabeList' :key='y'>
                <p>收款账户：
                <el-select filterable v-model='x.AccountTypeId' placeholder="" @change="getAccountList2(x.AccountTypeId,y)"
                    class="w150 _border_b_1">
                    <el-option v-for='item in AccList' :label='item.Name' :value='item.ID' :key='item.ID'>
                    </el-option>
                </el-select>

                <el-select filterable v-model='x.AccountId' placeholder="" @change="getAccountList3(x,y)"
                    class="w250 _border_b_1" >
                    <el-option v-for='item in x.list' :label='item.Name' :value='item.ID' :key='item.ID'>
                    </el-option>
                </el-select>
                </p>
            </div>

            </el-form>
            <div slot="footer" class="dialog-footer">
            <el-button class="hollowFixedBtn" @click="transactionmode=false">{{$t('pub.cancelBtn')}}</el-button>
            <el-button class="normalBtn" type="primary" @click="preservetransaction()">{{$t('pub.sureBtn')}}</el-button>
            </div>
        </el-dialog>
        <el-dialog title="一键审批" width="400px" :visible.sync="BOSSDialog" center :close-on-press-escape="false" :close-on-click-modal="false" >
            <template v-if="!BOSSDialogText">
                <el-form label-width="110px">
                    <el-form-item :label="$t('fnc.shuoming')">
                        <el-input type="textarea" v-model="AuditOrRefundMsg.Description" class="w216"></el-input>
                    </el-form-item>
                </el-form>
                <el-form>
                    <div style="    text-align: center;">
                        <el-radio v-model="AuditOrRefundMsg.Status" label="5">{{$t('ios.tonggei')}}</el-radio>
                        <el-radio v-model="AuditOrRefundMsg.Status" label="3">{{$t('ios.bohui')}}</el-radio>
                    </div>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <el-button class="hollowFixedBtn" @click="BOSSDialog=false">{{$t('pub.cancelBtn')}}</el-button>
                    <el-button class="normalBtn" type="primary" @click="bossLen = 1, subBOSSBtnClick()">{{$t('pub.sureBtn')}}</el-button>
                </div>
            </template>
            <template v-else>
                <p class="boss_btn">{{$t('ios.gongji')}} {{checkList.length}} {{$t('ios.tdqdi')}} <span>{{bossLen}}</span> {{$t('ios.tiao')}}</p>
                <p class="boss_btn_tips">{{$t('ios.yjshzqbyjxqtcz')}}</p>
            </template>
        </el-dialog>

        <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="remoteMethodEx"
                            @change="$forceUpdate()"
                            >
                            <el-option
                                v-for="item in searchList"
                                :key="item.empId"
                                :label="item.name"
                                :value="item.empId">
                                <span style="float: left">{{ item.name }}</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>
        <el-dialog custom-class='w400' title="手配费" :visible.sync="HandState" center>
            <template>
                <el-form label-width="100px">
                    <el-form-item label="团号">
                        <el-input v-model="HandMsg.TCNUM" class="w200"></el-input>
                    </el-form-item>
                    <el-form-item label="相关单据">
                        <el-input v-model="HandMsg.ReFinanceId" class="w200"></el-input>
                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <button class="hollowFixedBtn" @click="HandState=false">{{$t('pub.cancelBtn')}}</button>
                    <button class="normalBtn" type="primary" @click="setHand">{{$t('pub.sureBtn')}}</button>
                </div>
            </template>
        </el-dialog>
        <el-dialog title="修改单据手续费" width="300px"
            :visible.sync="transactionTax" center :before-close="closeChangeMachie">
             <p style="font-size:12px;margin-bottom:10px;">交易手续费：</p>
              <el-input v-model="transTax.Fee" placeholder="请输入内容"></el-input>
            <div slot="footer" class="dialog-footer">
            <el-button class="hollowFixedBtn" @click="transactionTax=false">{{$t('pub.cancelBtn')}}</el-button>
            <el-button class="normalBtn" type="primary" @click="saveTransTaxMoney" :loading="transTax.loading">{{$t('pub.sureBtn')}}</el-button>
            </div>
        </el-dialog>
        <el-dialog title="修改付款对象" width="300px"
            :visible.sync="PaymentSync" center :before-close="closeChangeMachie">
            <el-form class="cdForm" label-width="90px">
              <el-form-item label="客户类型" prop="ClientType">
                <el-select filterable v-model='transTax.ClientType' :placeholder="$t('fnc.khleixing')"
                  @change="GetClientAccountList(transTax.ClientType)" class="w135 _border_b_1">
                  <el-option v-for='item in ClientTypeList' :label='item.Name' :value='item.ID' :key='item.ID'>
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="客户名称" prop="ClientID">
                <template>
                  <el-select filterable v-model='transTax.ClientID' :placeholder="$t('fnc.khmingcheng')"
                     class="w135 _border_b_1">
                    <el-option v-for='item in ClientAccountList' :label='item.Name' :value='item.ID' :key='item.ID'>
                    </el-option>
                  </el-select>
                </template>
              </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
            <el-button class="hollowFixedBtn" @click="PaymentSync=false">{{$t('pub.cancelBtn')}}</el-button>
            <el-button class="normalBtn" type="primary" @click="handlingSurePayment" :loading="transTax.loading">{{$t('pub.sureBtn')}}</el-button>
            </div>
        </el-dialog>
         <el-dialog title="预付款冲抵" width="860px" :visible.sync="yfcdState" center>
            <el-form class="cdForm" label-width="90px">
                <el-form-item label="单号" prop="FrID">
                <el-input class="w220" @keyup.native="checkInteger(czMsg,'FrID')" v-model="czMsg.FrID"></el-input>
                </el-form-item>
                <el-form-item label="费用类型">
                <el-select filterable v-model='czMsg.CostTypeID' class="">
                    <el-option label="不限" value=''></el-option>
                    <el-option v-for="(item,index) in costList" :key="index" :label="item.Name" :value='item.ID'></el-option>
                </el-select>
                </el-form-item>
                <el-form-item>
                    <input type="button" value="查询" class="hollowFixedBtn" @click="czgetList">
                </el-form-item>
                <el-form-item label="交易日期">
                <el-date-picker
                    v-model="czdateList"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期">
                </el-date-picker>
                </el-form-item>

            </el-form>
            <table class="leaderPayTable" border="0" cellspacing="1" cellpadding="0">
                <tr>
                <th></th>
                <th>单号</th>
                <th>公司</th>
                <th>费用类型</th>
                <th>币种</th>
                <th>汇率</th>
                <th>金额</th>
                <th>冲抵金额</th>
                <th>状态</th>
                <th>付款对象</th>
                <th>操作</th>
                </tr>
                <tr v-for="(item,index) in czList" :key="index">
                <td><input type="checkbox" :value="item" v-model="yfcheckList" @change="ckeckOne"></td>
                <td>{{item.FrID}}</td>
                <td>{{item.BranchName}}</td>
                <td>{{item.CostTypeName}}</td>
                <td>{{item.CurrencyName}}</td>
                <td>{{item.Rate}}</td>
                <td>{{item.Money}}</td>
                <td>{{item.MatchMoney}}</td>
                <td>{{item.StatusStr}}</td>
                <td>
                    <el-tooltip class="item" effect="dark" :content="item.ClientTypeName+':'+item.RemitterName+'('+item.AccountNumber+')'" placement="top-start">
                    <div style="width:250px;overflow:hidden">{{item.ClientTypeName}}:{{item.RemitterName}}</div>
                    </el-tooltip>
                    </td>
                <td>
                  <el-tooltip class="item" effect="dark" content="预付款退款" placement="top-start">
                    <button class="normalBtn" @click="goUrlZD(item)">
                      <i class="el-icon-right"></i>
                    </button>
                    </el-tooltip>
                </td>
                </tr>
                <tr v-if="czList.length==0">
          <td colspan="13">暂无数据</td>
        </tr>
      </table>
      <el-pagination background @current-change="handleCurrentChange2"
        layout="total,prev, pager, next, jumper" :page-size="czMsg.pageSize" :total='total2'>
      </el-pagination>
      <div slot="footer" class="dialog-footer">
        <button class="hollowFixedBtn" @click="cdState=false">{{$t('pub.cancelBtn')}}</button>
        <button class="normalBtn" type="primary" @click="goUrlZD">{{$t('pub.sureBtn')}}</button>
      </div>
    </el-dialog>
      <!-- 修改汇率 -->
      <el-dialog title="修改汇率" width="400px"
      :visible.sync="costmodeHL" center >
      <template v-for='(x,y) in trabeListHL'>
          <el-form label-width="110px" style="padding: 5px 0;">
              费用：{{x.CostTypeName}}
          </el-form>
          <el-form label-width="110px" style="padding: 5px 0;">
              币种：{{x.CurrencyName}}
          </el-form>
          <el-form label-width="110px" style="padding: 5px 0;">
              原币：{{x.OriginalMoney}}
          </el-form>
          <el-form label-width="110px" style="padding: 5px 0;">
              本位币：{{x.Money}}
          </el-form>
          <el-form label-width="110px" style="padding: 5px 0;">
              汇率：
              <!-- <span v-if="!bianjiShow">{{x.Rate}}</span> -->
              <el-input-number v-model="x.Rate" :min="0" style="width: 240px;" @change="getRate"></el-input-number>
              <!-- <span class="iconfont" :class="{'icon-bianji':!bianjiShow,'icon-quxiao1':bianjiShow}" @click="bianjiShow=!bianjiShow"
              style="cursor: pointer;color: red;margin-left: 10px;font-size: 13px;"></span> -->
          </el-form>
      </template>
      <div slot="footer" class="dialog-footer">
      <el-button class="hollowFixedBtn" @click="costmodeHL=false">{{$t('pub.cancelBtn')}}</el-button>
      <el-button class="normalBtn" type="primary" @click="preservetransactionHL()">{{$t('pub.sureBtn')}}</el-button>
      </div>
  </el-dialog>
    </div>
</template>
<script>
import myBill from "./FinancialSubmodule/BillModule.vue";
import myrbvBill from "./FinancialSubmodule/ReceivablesModule.vue";
import myhrBill from "./FinancialSubmodule/MergeBillModule.vue";
import myGZBill from "./FinancialSubmodule/GZBillModule.vue";
export default {
  data() {
    return {
      hbMsg: {
        FrIDList: [],
        Type: 1
      },
      hbBtn: false,
      hbState: false,
      hbShow: false,
      HandMsg: {
        TCNUM: "",
        ReFinanceId: "",
        OtherType: 6
      },
      HandState: false,
      widthSon: "700px",
      colorSon: "#f5f5f5",
      showID: false,
      active: 1,
      userId: 0,
      rejectNum: "",
      zhuanjiaoBox: false,
      searchList: [],
      //转交信息
      zhuanjiaoMsg: {
        CreateBy: "",
        FrIDList: []
      },
      msg: {
        pageIndex: 1,
        pageSize: 6,
        FrID: "",
        sDate: "",
        eDate: "",
        Status: "-1",
        TemplateId: "0",
        RB_Branch_Id: "",
        RB_Depart_Id: "",
        sTradeDate: "",
        eTradeDate: "",
        ClientType: "",
        RemitterName: "",
        ClientID: "",
        sMoney: "",
        eMoney: "",
        CurrencyId: "",
        CostTypeID: "",
        Conditon: "",
        TCID: "",
        TradeWay: "",
        Type: "0",
        AccountType: "",
        QEndDate: "",
        QStartDate: "",
        UpdateBy: "",
        Sort: "2",
        IsSpecial: 0,
        Remark: ""
      },
      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,
        Description: ""
      },
      updateMsg: {
        FrID: 0,
        OTradeDate: "",
        TradeDate: "",
        Description: ""
      },
      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",
      heightQueryBox: false,
      loading: false,
      LogLoading: false,
      noData: false,
      checkboxShow: false,
      isCkedAll: false,
      currentPage: 1,
      total: 0,
      ChineseStr: "",
      mathNumber: "",
      DepartIDs: "",
      zhuanBox: false,
      loading2: false,
      dialogFormVisible: false,
      searchList: [],
      minHeight: 400,
      //当前登录用户功能权限
      ActionMenuCode: "",
      BOSSBtn: false,
      BOSSBtn2: false,
      AuditOrRefundMsg: {
        WorkFlowId: "",
        Description: "",
        Status: "5",
        Image: "",
        TradeDate: new Date().Format("yyyy-MM-dd"),
        tradeWays: [],
        emList: []
      },
      bossLen: null,
      BOSSDialog: false,
      userMenuCode: false,
      BOSSDialogText: false,
      HandShow: false,

      F_Advance_Match: false,
      yfcdState: false,
      yfcheckList: [],
      yfOutBranchId: "",
      yfHandmsg: {
        OtherType: 7,
        ReFinanceId: 0,
        Rate: 0,
        czState: true
      },
      czList: [],
      total2: 0,
      czdateList: [],
      czMsg: {
        pageIndex: 1,
        pageSize: 8,
        FrID: "",
        CostTypeID: "",
        sTradeDate: "",
        eTradeDate: "",
        IsAdvanceFinance: 1
      },
      costList: [],
      transactionmode: false,
      transactionTax: false,
      accountList2: [],
      trabeList: [], //获取的交易方式列表
      alltransaction: [],
      istransaction: false,
      transTax: {
        FrId: 0,
        Fee: "0.0",
        loading: false,
        ClientType:'',
        ClientID:''
      },
      PaymentSync: false,
      F_Update_CurrencyRate: false,
      costmodeHL:false,
      trabeListHL:[],//修改费率下拉数据
    };
  },
  created() {
    let userinfo = this.getLocalStorage();
    let ActionMenuCode = userinfo.ActionMenuCode;
    if (ActionMenuCode.indexOf("F_AccountantFinanceMerge") != -1) {
      this.hbShow = true;
    }
    if (ActionMenuCode.indexOf("F_HandWithFee") != -1) {
      this.HandShow = true;
    }
    if (ActionMenuCode.indexOf("F_Trademodify") != -1) {
      this.istransaction = true;
    }
    if(ActionMenuCode.indexOf('F_Update_CurrencyRate')!=-1){
      this.F_Update_CurrencyRate=true;
    }
    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 + "";
    }
    let allH, allW, cH;
    allH = document.documentElement.clientHeight;
    allW = document.documentElement.clientWidth;
    cH = allH - 380; //298 = 顶部导航 50 面包屑83 查询框75 table表头41 分页49
    this.minHeight = cH;
  },
  components: {
    "my-Bill": myBill,
    "my-RVB-Bill": myrbvBill,
    "my-HB-Bill": myhrBill,
    "my-GZ-Bill": myGZBill
  },
  mounted() {
    this.GetAuth();
    this.getCostTypeList();
    let userInfo = this.getLocalStorage();
    this.yfOutBranchId = userInfo.RB_Branch_id;
    let userMenuCode = "," + userInfo.ActionMenuCode + ",";
    this.userMenuCode =
      userMenuCode.indexOf(",C_Batch_AuditFinance,") != -1 ? true : false;
    this.getCompanyMsg.RB_Group_Id = this.employeeMsg.GroupId = this.getDepartmentMsg.RB_Group_Id =
      userInfo.RB_Group_id; //集团ID
    this.ActionMenuCode = userInfo.ActionMenuCode;
    this.DepartIDs = userInfo.RB_Department_Id;
    this.userId = userInfo.EmployeeId;
    this.getMyRejectFinanceCount();
    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.czgetList();
  },
  methods: {
    getRate(value){
      return this.moneyFormatB(value)
    },
    preservetransactionHL(){//保存费率的修改
      let msg = []
      this.trabeListHL.forEach(x=>{
      let obj ={
          FrId:x.FinanceId,
          Rate:this.moneyFormatB(x.Rate),
      }
          msg = obj
      })
      this.apipost('Financial_post_UpdateFinanceCurrencyRate', msg, res => {
      if (res.data.resultCode == 1) {
          this.$message.success(res.data.message);
          this.costmodeHL = false
          this.getPageList()
      }else{
          this.Error(res.data.message);
      }
      }, err => {})
    },
    showhuilv(row){
      this.apipost('Financial_get_GetFinanceRate', {FinanceId:row.FrID}, res => {
          if (res.data.resultCode == 1) {
          this.trabeListHL = res.data.data
          this.costmodeHL = true
          }
      }, err => {})
    },
    GetAuth() {
      var actionCode = this.$AuthCode.F_Advance_Match;
      this.CheckUserAuth(actionCode, res => {
        if (res.data.resultCode == 1 && res.data.data == 1) {
          this.F_Advance_Match = true;
        }
      });
    },
    ZhiDanChongDi() {
      this.yfcdState = true;
      this.yfcheckList = [];
    },
    goUrlZD(item) {
      let that = this;
      let yfcheckList
      if(item){
        this.yfcheckList = []
        this.yfcheckList.push(item)
        that.yfHandmsg.OtherType = 65
      }else{
        that.yfHandmsg.OtherType = 7
      }
      yfcheckList = JSON.parse(JSON.stringify(this.yfcheckList));
      if (this.yfcheckList.length > 1) {
        this.Error("只能选择一项！");
        return;
      }
      if (this.yfcheckList.length == 0) {
        this.Error("至少选择一项");
        return;
      }

      let arr = [];
      // var TCArr = [this.yfHandmsg.TCNUM];
      let orderObj = {
        OrderID: 0,
        OrderSource: 8,
        Obj: {}
        // TCIDList: TCArr
      };
      that.yfHandmsg.ReFinanceId = this.yfcheckList[0].FrID;
      that.yfHandmsg.Rate = this.yfcheckList[0].Rate;
      var msg = JSON.stringify(that.yfHandmsg);
      let routeData = this.$router.resolve({
        name: "ChoiceAddFinancialDocuments",
        query: {
          czmsg: msg,
          orderObj: JSON.stringify(orderObj),
          companyID: this.OutBranchId,
          Type: 2,
          searchTitle: "分摊"
        }
      });
      window.open(routeData.href, "_blank");
    },
    ckeckOne() {
      if (this.yfcheckList.length == 2) {
        this.yfcheckList.splice(0, 1);
      }
      if (this.yfcheckList.length > 1) {
        this.Error("只能选择一项！");
      }
    },
    handleCurrentChange2(val) {
      this.czMsg.pageIndex = val;
      this.czgetList();
    },
    getCostTypeList() {
      this.apipost(
        "Financial_get_GetAdvanceCostTypeList",
        {},
        res => {
          if (res.data.resultCode === 1) {
            this.costList = res.data.data;
          } else {
            this.Error(res.data.message);
          }
        },
        null
      );
    },
    czgetList() {
      if (this.czdateList && this.czdateList.length > 0) {
        this.czMsg.sTradeDate = this.czdateList[0];
        this.czMsg.eTradeDate = this.czdateList[1];
      } else {
        this.czMsg.sTradeDate = "";
        this.czMsg.eTradeDate = "";
      }
      let msg = Object.assign({}, this.czMsg);
      if (msg.FrID == "") {
        msg.FrID = 0;
      }
      this.apipost(
        "Financial_get_GetAdvanceFinancePageList",
        msg,
        res => {
          if (res.data.resultCode === 1) {
            this.czList = res.data.data.pageData;
            this.total2 = res.data.data.count;
          }
        },
        null
      );
    },

    HebingSPLast() {
      if (this.checkList.length == 0) {
        this.Error("请选择单据！");
        return;
      }
      this.$confirm("是否合并审批？合并审批后不可取消合并", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          this.hbBtn = true;
          this.hbMsg.FrIDList = this.checkList;
          this.apipost(
            "Financial_post_SetAccountantFinanceMerge",
            this.hbMsg,
            res => {
              this.hbBtn = false;
              if (res.data.resultCode == 1) {
                this.getPageList();
              } else {
                this.Error(res.data.message);
              }
            },
            err => {}
          );
        })
        .catch(() => {});
    },
    HebingSP() {
      if (this.msg.Type == 1 || this.msg.Type == 2) {
        this.hbState = true;
        this.hbMsg.Type = this.msg.Type;
        this.getPageList();
      } else {
        this.Error("单据类型只能为收入或支出！");
      }
    },
    setHand() {
      if (this.HandMsg.TCNUM == "") {
        this.Error("请输入团号!");
        return;
      }
      if (this.HandMsg.ReFinanceId == "") {
        this.Error("请输入相关单据号!");
        return;
      }
      let msg = JSON.stringify(this.HandMsg);
      this.HandState = false;
      this.$router.push({
        name: "ChoiceAddFinancialDocuments",
        query: { Handmsg: msg, blank: "y", tab: "新增财务单据" }
      });
    },
    // 手配费
    Handwithfee() {
      this.HandMsg = {
        TCNUM: "",
        ReFinanceId: "",
        OtherType: 6
      };
      this.HandState = true;
    },
    // 催审
    cuishen: function(cmd, id) {
      this.$confirm("确定催审？", this.$t("tips.tips"), {
        confirmButtonText: this.$t("pub.sureBtn"),
        cancelButtonText: this.$t("pub.cancelBtn"),
        type: "warning"
      })
        .then(() => {
          this.loading = true;
          this.apipost(
            cmd,
            { FrId: id },
            res => {
              if (res.data.resultCode == 1) {
                this.Success(res.data.message);
                this.getPageList();
              } else {
                this.Error(res.data.message);
              }
            },
            err => {}
          );
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: this.$t("ios.yi") + this.$t("pub.cancelBtn")
          });
        });
    },
    //转交
    getExchange(FrID) {
      this.zhuanjiaoMsg.CreateBy = "";
      this.zhuanjiaoMsg.FrIDList = [];
      this.zhuanjiaoMsg.FrIDList.push(FrID);
      this.zhuanjiaoBox = true;
    },
    //设置转交
    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;
            this.getPageList();
          } else {
            this.Error(res.data.message);
          }
        },
        err => {}
      );
    },
    remoteMethodEx(query) {
      //  转交人模糊查询
      if (query !== "" || this.addShow) {
        this.apipost(
          "admin_Get_Chat_All_SelectEmpName",
          { EmName: query },
          res => {
            if (res.data.resultCode == 1) {
              this.searchList = res.data.data;
            }
          },
          err => {}
        );
      } else {
        this.searchList = [];
      }
    },
    subBOSSBtnClick: function() {
      this.loading = true;
      if (this.bossLen && this.bossLen <= this.checkList.length) {
        this.BOSSDialogText = true;
        this.AuditOrRefundMsg.WorkFlowId = this.checkList[this.bossLen - 1];
        this.apipost(
          "Financial_post_AuditOrRefund",
          this.AuditOrRefundMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.bossLen += 1;
              this.subBOSSBtnClick();
            } else {
              this.$message.error(res.data.message);
              this.loading = false;
              this.checkList = [];
              this.getPageList(1);
              this.BOSSDialogText = false;
            }
          },
          err => {}
        );
      } else {
        this.BOSSDialogText = false;
        this.BOSSDialog = false;
        this.checkList = [];
        this.$message.success(this.$t("ios.shwanbi"));
        this.loading = false;
        this.getPageList(1);
      }
    },
    BOSSBtnClick: function(t) {
      if (this.checkList.length < 1) {
        this.$message.error(this.$t("rule.qxzygxytjddanju"));
      } else {
        if (t === 2) {
          this.zhuanBox = true;
        } else {
          this.BOSSDialog = true;
        }
      }
    },
    goTicketPage(data) {
      //  跳转机票
      this.$router.push({
        name: "TicketManager",
        query: { id: data.SourceID, blank: "y", tab: "票务管理" }
      });
    },
    zhuanBtn() {
      if (!this.zhuanMsg.AuditEmId)
        return this.$message.error(this.$t("rule.qxzzjiaoren"));
      if (!this.zhuanMsg.Description)
        return this.$message.error(this.$t("rule.qtxzjbeizhu"));
      let msg = [];
      msg.push(this.zhuanMsg);
      this.BOSSDialogText = true;
      if (this.BOSSBtn2) {
        this.zhuanMsg.WorkFlowId = this.checkList[this.bossLen - 1];
        this.loading = true;
        if (this.bossLen && this.bossLen <= this.checkList.length) {
          this.apipost(
            "Financial_post_Transfer",
            msg,
            res => {
              if (res.data.resultCode == 1) {
                this.bossLen += 1;
                this.zhuanBtn();
              } else {
                this.$message.error(res.data.message);
                this.loading = false;
                this.checkList = [];
                this.getPageList(1);
              }
            },
            err => {}
          );
        } else {
          this.BOSSDialogText = false;
          this.zhuanBox = false;
          this.checkList = [];
          this.$message.success("转交完成！");
          this.loading = false;
          this.getPageList(1);
        }
      } else {
        this.apipost(
          "Financial_post_Transfer",
          msg,
          res => {
            if (res.data.resultCode == 1) {
              this.$message.success(res.data.message);
              this.zhuanBox = false;
              this.getPageList();
              this.zhuanMsg.AuditEmId = "";
            } else {
              this.$message.error(res.data.message);
            }
          },
          err => {}
        );
      }
    },
    goUrl() {
      this.dialogFormVisible = true;
    },
    UpdateTradeDate() {
      if (!this.updateMsg.TradeDate)
        return this.$message.error(this.$t("rule.qxztzhdjyriqi"));
      if (!this.updateMsg.Description)
        return this.$message.error(this.$t("rule.qtxshuoming"));
      this.apipost(
        "Financial_get_SetTradeDate",
        this.updateMsg,
        res => {
          if (res.data.resultCode == 1) {
            this.$message.success(res.data.message);
            this.dialogFormVisible = false;
            this.msg.Conditon = 2;
            this.getPageList();
          } else {
            this.$message.error(res.data.message);
          }
        },
        err => {}
      );
    },
    remoteMethod(query) {
      //  转交人模糊查询
      if (query !== "" || this.addShow) {
        this.loading2 = true;
        this.apipost(
          "admin_Get_Chat_All_SelectEmpName",
          { EmName: query },
          res => {
            if (res.data.resultCode == 1) {
              this.searchList = res.data.data;
              this.loading2 = false;
            }
          },
          err => {}
        );
      } else {
        this.searchList = [];
        this.loading2 = false;
      }
    },
    closeChangeMachie(done) {
      //  转交窗口关闭
      this.BOSSDialogText = false;
      done();
    },
    Financial_post_SetBatch() {
      // 批量提交
      let FrID = this.checkList;
      if (!FrID.length)
        return this.$message.error(this.$t("rule.qxzygxytjddanju"));
      let list = [];
      this.checkList.forEach(x => {
        list.push({ FrID: x });
      });
      this.apipost(
        "Financial_post_SetBatch",
        list,
        res => {
          if (res.data.resultCode == 1) {
            this.getPageList();
            this.$message.success(res.data.message);
          } else {
            this.$message.error(res.data.message);
          }
        },
        err => {}
      );
    },
    ckeckedOne() {
      //单选
      if (this.checkList.length < this.checkAllList.length) {
        this.isCkedAll = false;
      } else {
        this.isCkedAll = true;
      }
    },
    checkedAll() {
      //全选
      if (this.isCkedAll == true) {
        this.checkList = [];
      } else {
        this.checkAllList.forEach(item => {
          this.checkList.push(item);
        });
      }
    },
    AccountType_post_GetList() {
      //获取账户类型下拉
      this.apipost(
        "AccountType_post_GetList",
        this.queryAccMsg,
        res => {
          if (res.data.resultCode == 1) {
            this.AccList = res.data.data;
            let alltransaction = [];
            this.AccList.forEach(x => {
              let obj = {
                Id: x.ID,
                list: []
              };
              this.apipost(
                "FinancialInstitutions_post_GetALLAccountList",
                {
                  TypeId: x.ID
                },
                res => {
                  if (res.data.resultCode == 1) {
                    let data = res.data.data;
                    data.forEach(x => {
                      x.allName = x.BackNo + "(" + x.Alias + ")";
                      x.Name = x.Alias;
                    });
                    obj.list = data;
                  }
                },
                err => {}
              );

              this.alltransaction.push(obj);
            });
          } else {
            this.$message.error(res.data.message);
          }
        },
        err => {}
      );
    },
    getMyRejectFinanceCount() {
      this.apipost(
        "Financial_post_GetMyRejectFinanceCount",
        { EmployeeId: this.userId },
        res => {
          if (res.data.resultCode == 1) {
            this.rejectNum = res.data.data;
          }
        },
        err => {}
      );
    },
    getPageList(t) {
      // 获取列表数据
      this.loading = true;
      this.checkAllList = [];
      this.checkList = [];
      if ((t && this.BOSSBtn) || (t && this.BOSSBtn2)) {
        this.msg.pageSize = 1000;
      } else if (this.hbState) {
        this.msg.pageSize = 30;
      } else {
        this.msg.pageSize = 6;
      }
      if (this.msg.Status == 0) {
        this.checkboxShow = true;
      } else {
        this.checkboxShow = false;
      }
      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;
      this.apipost(
        "Financial_post_GetPageList",
        this.msg,
        res => {
          if (res.data.resultCode == 1) {
            let data = [];
            if (t == 1 && this.BOSSBtn && this.msg.Conditon == 3) {
              let dataList = res.data.data.pageData;
              let newData = [];
              dataList.forEach(x => {
                if (x.IsBatchAudit == 0 || x.Type == 1) {
                  newData.push(x);
                }
              });
              data = newData;
            } else {
              data = res.data.data.pageData;
            }
            this.total = res.data.data.count;
            if (this.total == 0) {
              this.DataList = [];
              this.noData = true;
            } else {
              data.forEach(x => {
                x.modelShow = false;
                this.checkAllList.push(x.FrID);
              });
              this.DataList = data;
              this.noData = false;
            }
            this.loading = false;
          } else {
            this.loading = false;
            this.$message.error(res.data.message);
          }
          // this.queryInfoInit();
        },
        err => {}
      );
      if (this.msg.Conditon == 7) {
        this.getMyRejectFinanceCount();
      }
    },
    financeRemove(id) {
      //作废
      this.$confirm(this.$t("tips.zuofeicaiwudan"), this.$t("tips.tips"), {
        confirmButtonText: this.$t("pub.sureBtn"),
        cancelButtonText: this.$t("pub.cancelBtn"),
        type: "warning"
      })
        .then(() => {
          this.deletFinance(id);
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: this.$t("ios.yi") + this.$t("pub.cancelBtn")
          });
        });
    },
    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) {
      // 获取单据日志
      if (this.checkboxShow) return;
      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 => {}
      );
    },
    GetClientAccountList(i) { //获取客户名称并且根据费用类型和付款对象获取客户账号
      this.msg.AccountNumber = '';
      this.transTax.ClientID = ''
      this.ClientTypeList.forEach(x => {
        if (x.ID == i) {
          // this.msg.RemitterName = x.Name;
          this.financeinfo_post_GetClientAccountList(this.transTax.ClientType);
        }
      })
    },
    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 => {}
      );
    },
    //导出
    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;
      this.msg.EmployeeId = this.userId;
      this.GetLocalFile(
        "Financial_get_OutToFinanceList",
        this.msg,
        this.$t("fnc.cwbaobiao") + ".xls"
      );
    },
    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 },
        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 === 0 ? "" : this.msg.CurrencyId,
        CostTypeID: this.msg.CostTypeID === 0 ? "" : this.msg.CostTypeID,
        Conditon: this.msg.Conditon,
        TCID: this.msg.TCID === 0 ? "" : this.msg.TCID,
        TradeWay: 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,
        IsSpecial: this.msg.IsSpecial
      };
      this.msg = msg;
    },
    handleCurrentChange(val) {
      //翻页
      this.msg.pageIndex = val;
      this.getPageList();
    },
    resetPageIndex() {
      // 重置页码
      this.msg.pageIndex = 1;
      this.currentPage = 1;
    },
    goUrl(path, id, Conditon, pageIndex) {
      this.$router.push({
        name: path,
        query: {
          id: id,
          Conditon: Conditon,
          pageIndex: pageIndex,
          blank: "y",
          tab: "单据详情"
        }
      });
    },
    goUrlAdd(path) {
      this.$router.push({
        name: path,
        query: { blank: "y", tab: "选择财务单据类型" }
      });
    },
    goEit(type, id, edit, Conditon, pageIndex, item) {
      let path = "";
      if (type === 1) {
        path = "addReceivablesDocuments";
        this.$router.push({
          name: path,
          query: {
            type: type,
            FrID: id,
            edit: edit,
            Conditon: Conditon,
            pageIndex: pageIndex,
            blank: "y",
            tab: "修改财务单据"
          }
        });
      } else if (type === 2) {
        if (item.Status == 3 && item.DMCUsePriceCount > 0) {
          return this.$message.error(
            "地接费领取被驳回单据无法修改，请到用款计划页面重新发起！"
          );
        } else {
          path = "addFinancialDocuments";
          this.$router.push({
            name: path,
            query: {
              type: type,
              FrID: id,
              edit: edit,
              Conditon: Conditon,
              pageIndex: pageIndex,
              blank: "y",
              tab: "修改财务单据"
            }
          });
        }
      } else if (type === 4) {
        path = "addCapitalAllocation";
        this.$router.push({
          name: path,
          query: { id: id, edit: 1, blank: "y", tab: "修改财务单据" }
        });
      } else if (type === 7) {
        path = "addFinancialGZDocuments";
        this.$router.push({
          name: path,
          query: { FrID: id, edit: 1, blank: "y", tab: "修改财务单据" }
        });
      }
    },
    showjiaoyi(FrId) {
      //弹出交易方式修改
      this.apipost(
        "Financial_get_GetFinanceTrabeList",
        { FrId: FrId },
        res => {
          if (res.data.resultCode == 1) {
            this.trabeList = res.data.data;
            this.trabeList.forEach(x => {
              this.alltransaction.map(j => {
                if (x.AccountTypeId == j.Id) {
                  x.list = j.list;
                  return;
                }
              });
            });
            this.transactionmode = true;
          }
        },
        err => {}
      );
    },
    // 确定付款对象
    handlingSurePayment(){
      if (this.transTax.loading) return;
      this.transTax.loading = true;
      if (this.transTax.ClientType && this.transTax.ClientType != "" && this.transTax.ClientID && this.transTax.ClientID != "") {
        this.apipost(
          "Financial_post_UpdateFinancePayClient",
          { FrId: this.transTax.FrId, ClientType: this.transTax.ClientType, ClientID: this.transTax.ClientID},
          res => {
            if (res.data.resultCode == 1) {
              this.Success("修改成功");
              this.getPageList();
              this.PaymentSync = false;
              this.transTax.FrId = ''
              this.transTax.ClientType = ''
              this.transTax.ClientID = ''
            }
            this.transTax.loading = false;
          },
          err => {
            this.transTax.loading = false;
          }
        );
      } else {
        this.transTax.loading = false;
        this.Error("请选择付款对象");
      } 
    },
    showTranTax(fid,type) {
      this.transTax.FrId = fid;
      
      this.transTax.loading = false;
      if(type==1){
        this.transTax.Fee = "0.00";
        this.transactionTax = true;
      }else{
        this.transTax.ClientType = ''
        this.transTax.ClientID = ''
        this.PaymentSync = true
      }
    },
    saveTransTaxMoney() {
      if (this.transTax.loading) return;
      this.transTax.loading = true;
      console.log(this.transTax.Fee);
      if (this.transTax.Fee && this.transTax.Fee != "") {
        this.apipost(
          "Financial_post_UpdateFinanceFee",
          { FrId: this.transTax.FrId, Fee: this.transTax.Fee },
          res => {
            if (res.data.resultCode == 1) {
              this.$message.success("修改成功");
              this.getPageList();
              this.transactionTax = false;
            }
            this.transTax.loading = false;
          },
          err => {
            this.transTax.loading = false;
          }
        );
      } else {
        this.transTax.loading = false;
        this.$message.error("请输入手续费");
      }
    },
    getAccountList2(AccountTypeId, y) {
      //获取账户类型对应下的账户列表
      this.alltransaction.map(x => {
        if (x.Id == AccountTypeId) {
          this.trabeList[y].list = x.list;
          return;
        }
      });
    },
    getAccountList3(x, y) {
      x.list.map(item => {
        if (x.AccountId == item.ID) {
          this.trabeList[y].Type = item.BankType;
          return;
        }
      });
    },
    getAccountListtype(AccountId) {
      this.accountList2.map(x => {
        if (x.ID == AccountId) {
          this.FinanceTrabeMsg.Type = x.BankType;
          return;
        }
      });
    },
    preservetransaction() {
      //保存交易方式
      let msg = [];
      this.trabeList.forEach(x => {
        let obj = {
          ID: x.ID,
          Type: x.Type,
          AccountId: x.AccountId
        };
        msg.push(obj);
      });
      this.apipost(
        "Financial_get_SetFinanceTrabeInfo",
        msg,
        res => {
          if (res.data.resultCode == 1) {
            this.$message.success(res.data.message);
            this.transactionmode = false;
            this.getPageList();
          } else {
            this.Error(res.data.message);
          }
        },
        err => {}
      );
    }
  },
  watch: {}
};
</script>
