<style scoped>
@import "../css/cssReset.css";
    .page_fnDm{background-color: white}
    .query-box{overflow: inherit}
    ._nav{margin: 20px 0 0 0 ;background-color: #f5f5f5;}
    ._nav li{float: left;font-size: 14px;color: #666666;padding: 15px 20px;cursor: pointer;position: relative;background-color: #f1f1f1;margin-right: 5px}
    ._nav li._active{background-color:#FFFFFF;color: #333333 }
    ._nav li._active::after{content: "";width: 20px;height: 3px;background-color: #E95252;display: inline-block;position: absolute;bottom: 0;left: 38%;}
    .el-range-editor.el-input__inner{border-radius: 0}
    .query-box{border: none}
    .hight_query{position: relative;}
    .hight_query span{height: 34px;line-height: 34px;color: #E95252}
    .hight_query span .icon-gengduo{font-size: 12px}
    .hight_query span em{text-decoration: underline;cursor: pointer;}
    .hight_query_box{position: absolute;background-color: white;z-index: 2000;right: 200px;width: 800px;}
    ._hqb_shadow{box-shadow:3px 2px 10px rgb(204, 203, 203);border: 1px solid #ececec;}
    .query-box ul {overflow: initial;}
    .hqb_t{padding: 10px 20px;font-size: 16px;background-color: #E95252;border: 1px solid #E95252;color: #fff;text-align: center;margin-bottom: 15px}
    .query-box li:last-child{float: left}
    .query-box>ul>li:last-child{float: right;}
    .query-box .hight_query ul .el-input{width: inherit  }
    .hight_query_box ul li{margin-top: 0;float: left;margin-right: 15px}
    .hight_query_box ul li label{font-size: 14px}
    .hight_query_box .el-form{padding: 0 20px}
    .hight_query_box ul li._hqb_btn{float: right;margin-right: 25px;padding-top: 5px;position: inherit}
    .Receipt_box{padding: 15px;color: #c94052;width: 614px;background-color: rgba(242, 242, 242, 1);border: 1px solid rgba(228, 228, 228, 1)}
    .Receipt_box.color_blur{color: #106BAF;}
    .Receipt_box.color_blur .rb_stit span{display: inline-block;border-bottom: 2px solid #106BAF;padding: 0 20px}
    .rb_tit{font-size: 18px;text-align: center}
    .rb_stit{font-size: 14px;text-align: center}
    .rb_stit span{display: inline-block;border-bottom: 2px solid #C94052;padding: 0 20px}
    .rb_top_row{display: flex;justify-content: space-between;font-size: 12px;}
    .rb_top_row span._r_name{color: #333333}
    .rb_top_row span._r_bold{font-weight: bold}
    .rb_top_row ._r_time span{color: #333333}
    ._r_mb5{margin-bottom: 5px;}
    .Receipt_table{width: 100%;font-size: 14px;text-align: center}
    .Receipt_table .th{font-weight: 200 !important}
    ._r_mt10{margin-top: 10px;}
    ._bg__{display: inline-block;padding: 2px 8px;color: white;border-radius: 4px}
    ._bg_red{background-color: #E95252;}
    .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: 30px;height: 30px;display: inline-block;color: white !important;border-radius: 50%;text-align: center;line-height: 30px;margin-right: 10px;cursor: pointer;outline: none;}
    ._icon_btn i.edit{background-color: #00C6FF;font-size: 16px;}
    ._icon_btn i.edit:hover{background-color: #59daff}
    ._icon_btn i.edit:active{background-color: #00b8ec}
    ._icon_btn i.icon-sousuo,.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,.1);display: inline-block;padding: 0 5px;height: 22px;line-height: 20px;font-size: 12px;color: #409eff;border-radius: 4px;box-sizing: border-box;border: 1px solid rgba(64,158,255,.2);white-space: nowrap;margin-bottom: 4px;}
    ._tag_span._tag_warr{background-color: rgba(103,194,58,.1);border-color: rgba(103,194,58,.2);color: #67c23a;}
    ._fex_cen{display: flex;align-items: center}
    ._pad5{padding: 5px 10px;}
    ._color_gar{color: gray}
    .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;}
    .boss_btn_tips,.boss_btn{
        text-align: center;
    }
    .boss_btn_tips{
        padding-bottom: 25px;
    }
    .boss_btn span{
        color: #2BB87C;
    }
    
</style>

<template >
    <div class="GetWOrkTransferPageLis page_fnDm" @keyup.enter="resetPageIndex(),getPageList()">
        <ul class="_nav clearfix">
            <li :class="active==1?'_active':''" @click="active=1, msg.Conditon=1, BOSSBtn = false, getPageList(), checkList = []">交接人发起的</li>
            <li :class="active==3?'_active':''" @click="active=3, msg.Conditon=3, getPageList()">待交接人审批的</li>
        </ul>
        <div class="query-box">
            <ul class="clearfix">
                <li class="hight_query">
                  <button class="hollowFixedBtn" @click="goUrlWeituo('WorkEntrustmentMy')">{{$t('fnc.gzweituo')}}</button>
                  <button class="hollowFixedBtn" v-if="msg.Conditon === 3" @click="BOSSBtnClick(2)">转交</button>
                  <button class="hollowFixedBtn" v-if="msg.Conditon === 1" @click="getExchange2">批量转交</button>
                  
                </li>
            </ul>
        </div>
        <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="msg.Conditon === 1"><input type="checkbox" v-model="isCkedAll1"  @click='checkedAll1()'></th>
                   <th v-if="msg.Conditon === 3"><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="90">{{$t('fnc.zdrenyuan')}}</th>
                   <th>{{$t('fnc.dqzhuangtai')}}</th>
                   <th v-if="msg.Conditon === 1">{{$t('system.table_operation')}}</th>
                </tr>
                <tr class="_item_list" v-for="(item,index) in DataList">
                    <td v-if="msg.Conditon === 1"><input type="checkbox" :value="item.FrID" v-model="checkList1" @change="ckeckedOne1"></td>
                    <td v-if="msg.Conditon === 3"><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">
                        <span>{{item.EmName}}</span>
                    </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" v-if="msg.Conditon === 1">
                        <el-tooltip  class="item" effect="dark" content="转交"  placement="top">
                            <i class="iconfont icon-zhuanhuan1" @click="getExchange(item.FrID)"></i>
                        </el-tooltip>
                    </td>
                </tr>
            </table>
        </div>
        <div class="noData" v-show="noData">
            {{$t('system.content_noData')}}
        </div>
        <div>
            <el-pagination
                background
                @current-change="handleCurrentChange"
                :current-page.sync="currentPage"
                @size-change="handleSizeChange"
                layout="total, sizes, prev, pager, next, jumper"
                :page-sizes="[6,10,20,50,80,100]"
                :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="zhuanjiaoUpdate3"
                            :loading="loading2">
                            <el-option
                                v-for="item in searchList"
                                :key="item.Id"
                                :label="item.EmployeeName"
                                :value="item.Id">
                                <span style="float: left">{{ item.EmployeeName }}</span>
                                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.PostName }}</span>
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-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="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="zhuanjiaoUpdate"
                            >
                            <el-option
                                v-for="item in searchList"
                                :key="item.Id"
                                :label="item.EmployeeName"
                                :value="item.Id">
                                <span style="float: left">{{ item.EmployeeName }}</span>
                                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.PostName }}</span>
                            </el-option>
                        </el-select>

                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <button class="hollowFixedBtn" @click="zhuanjiaoBox=false">{{$t('pub.cancelBtn')}}</button>
                    <button class="normalBtn" type="primary" @click="setExchange()">{{$t('pub.sureBtn')}}</button>
                </div>
            </template>
        </el-dialog>
        <!-- 批量转交 -->
        <el-dialog custom-class='w400' title="制单人转交" :visible.sync="zhuanjiaoBox2" center>
            <template>
                <el-form label-width="100px">
                    <el-form-item label="制单人转交：">
                        <el-select
                            v-model="zhuanjiaoMsg2.CreateBy"
                            filterable
                            remote
                            reserve-keyword
                            :placeholder="$t('pub.pleaseImport')"
                            :remote-method="remoteMethodEx"
                            @change="zhuanjiaoUpdate2"
                            >
                            <el-option
                                v-for="item in searchList"
                                :key="item.Id"
                                :label="item.EmployeeName"
                                :value="item.Id">
                                <span style="float: left">{{ item.EmployeeName }}</span>
                                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.PostName }}</span>
                            </el-option>
                        </el-select>

                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <button class="hollowFixedBtn" @click="zhuanjiaoBox2=false">{{$t('pub.cancelBtn')}}</button>
                    <button class="normalBtn" type="primary" @click="setExchange2()">{{$t('pub.sureBtn')}}</button>
                </div>
            </template>
        </el-dialog>
        <!-- 批量转交提示 -->
        <el-dialog custom-class='w400' title="提示" :visible.sync="BoxState" center>
            <p style="color:red;margin-bottom:15px">请稍等，正在转交{{checkList1.length}}条数据，请不要进行任何操作！</p>
            <div slot="footer" class="dialog-footer">
                <button class="normalBtn" type="primary" @click="BoxState=false">{{$t('pub.sureBtn')}}</button>
            </div>
        </el-dialog>
    </div>
</template>
<script>
  import myBill from "../components/BillModule.vue";
  import myrbvBill from "../components/ReceivablesModule.vue";
  import myhrBill from "../components/MergeBillModule.vue";
  import myGZBill from "../components/GZBillModule.vue";

  import {
    queryEmployee
  } from '../../../api/users/user'
export default {
    data(){
        return{
            BoxState:false,
            widthSon:'700px',
            colorSon:"#f5f5f5",
            showID:false,
            active:1,
            userId:0,
            zhuanjiaoBox:false,
            zhuanjiaoBox2:false,
            searchList:[],
            //转交信息
            zhuanjiaoMsg:{
                CreateBy:'',
                RB_CreateByName:'',
                FrIDList:[]
            },
            zhuanjiaoMsg2:{
                CreateBy:'',
                RB_CreateByName:'',
                FrIDList:[]
            },
            msg:{
              pageIndex:1,
              pageSize:6,
              CreateBy: '',
              Conditon: 1
            },
            getCompanyMsg:{  // 公司
                RB_Group_Id:'0',
                Status:'0',
            },
            getDepartmentMsg:{// 部门
                RB_Group_Id:'',
                RB_Branch_Id:'',
                Status:0,
                ParentId:-1,
                Tier:0,
            },
            employeeMsg:{ // 员工
                GroupId:'',
                BranchId:-1,
                DepartmentId:0,
                PostId:0,
                IsLeave:0,
            },
            zhuanMsg:{
                AuditEmId:null,
                AuditEmIdName : '',
                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:[],
            checkList1:[],
            isCkedAll1: false,
            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: true,
            AuditOrRefundMsg:{
                WorkFlowId:'',
                Description:'',
                Status:'5',
                Image: '',
                TradeDate:new Date().Format("yyyy-MM-dd"),
                tradeWays:[],
                emList:[],
            },
            bossLen: null,
            BOSSDialog: false,
            userMenuCode: false,
            BOSSDialogText: false,
        }
    },
  created(){
        if(this.$route.query.returnCode){
            this.active = this.$route.query.returnCode;
            this.msg.Conditon = this.$route.query.returnCode;
        }
        if(this.$route.query.pageIndex){
            this.msg.pageIndex = this.$route.query.pageIndex;
        }
        if(this.$route.query.Conditon){
            this.msg.Conditon = this.$route.query.Conditon;
            this.active = parseInt(this.$route.query.Conditon);
        }
        if(this.$route.query.FrID){
            this.msg.FrID = this.$route.query.FrID;
        }
        if(this.$route.query.Type){
            this.msg.Type = this.$route.query.Type+'';
        }
        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;
        this.msg.CreateBy = this.$route.query.id
    },components: {
        "my-Bill": myBill,
        "my-RVB-Bill":myrbvBill,
        "my-HB-Bill":myhrBill,
        "my-GZ-Bill": myGZBill,
    },mounted(){
        let userInfo=this.getLocalStorage();
        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.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();
    },
    methods:{
        handleSizeChange(val){
            this.msg.pageSize=val;
            this.getPageList();
        },
        //批量转交
        getExchange2(){
            if(this.checkList1.length==0){
                this.Error("至少选择一条单据");
                return;
            }
            this.zhuanjiaoMsg2.CreateBy = '';
            this.zhuanjiaoMsg2.RB_CreateByName = '';
            this.zhuanjiaoMsg2.FrIDList = this.checkList1;
            this.zhuanjiaoBox2 = true;
        },
        //设置转交
        setExchange2(){
            if(this.zhuanjiaoMsg2.CreateBy==''){
                this.Error('请选择转交人');
                return;
            }
            this.zhuanjiaoBox2 = false;
            this.BoxState=true;
            this.apipost('Financial_post_SetFinanceCreateByCareOf',this.zhuanjiaoMsg2,res=>{
                this.BoxState=false;
                if(res.data.resultCode==1){
                    this.Success(res.data.message);
                    
                    this.getPageList();
                }else{
                    this.Error(res.data.message);
                }
            },err=>{})
        },
        ckeckedOne1() {  //单选
            if(this.checkList1.length < this.checkAllList.length) {
                this.isCkedAll1 = false
            } else {
                this.isCkedAll1 = true
            }
        },
        checkedAll1() {  //全选
            if(this.isCkedAll1 == true) {
                this.checkList1 = [];
            } else {
                this.checkAllList.forEach(item => {
                    this.checkList1.push(item)
                })
            }
        },
        // 催审
        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.RB_CreateByName = '';
            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=>{})
        },
        remoteMethodEx2(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 = [];
            }
        },
        remoteMethodEx(query) { //  转交人模糊查询
            if (query !== '' || this.addShow) {
            var qMsg = {
                EmployeeName: 0
            }
            qMsg.EmployeeName=query;
            queryEmployee(qMsg).then(res => {
                if(res.Code==1){
                this.searchList = res.Data;
                }
            }).catch(() => {

            })
            } else {
            this.searchList = [];
            }
        },
        zhuanjiaoUpdate(query){
            this.searchList.forEach((val)=>{
                if(val.Id==query){
                    this.zhuanjiaoMsg.RB_CreateByName=val.EmployeeName;
                }
            })
        },
        zhuanjiaoUpdate2(query){
            this.searchList.forEach((val)=>{
                if(val.Id==query){
                    this.zhuanjiaoMsg2.RB_CreateByName=val.EmployeeName;
                }
            })
        },
        zhuanjiaoUpdate3(query){
            this.searchList.forEach((val)=>{
                if(val.Id==query){
                    this.zhuanMsg.AuditEmIdName=val.EmployeeName;
                }
            })
        },
        subBOSSBtnClick: function () {
            this.loading = true;
            this.BOSSDialogText = true;
            if (this.bossLen && this.bossLen <= this.checkList.length) {
                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'));
            this.zhuanMsg.TransferEmpId = this.msg.CreateBy
            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=3;
                    this.getPageList();
                }else{
                    this.$message.error(res.data.message);
                }
            },err => {});
        },
        remoteMethod2(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;
            }
        },
        remoteMethod(query) { //  转交人模糊查询
            if (query !== '' || this.addShow) {
                this.loading2 = true;
                var qMsg = {
                    EmployeeName: 0
                }
                qMsg.EmployeeName=query;
                queryEmployee(qMsg).then(res => {
                    if(res.Code==1){
                    this.searchList = res.Data;
                    this.loading2 = false;
                    }
                }).catch(() => {

                })
            } 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;
                }else{
                    this.$message.error(res.data.message);
                }
            },err=>{})
        },
        getPageList(t){  // 获取列表数据
            this.loading= true
            this.checkAllList =[];
            this.checkList = [];
            this.checkList1 = [];
            this.isCkedAll1=false;
            // if ((t&&this.BOSSBtn)||(t&&this.BOSSBtn2)) {
            //     this.msg.pageSize = 6;
            // } else {
            //     this.msg.pageSize = 6;
            // }
            if(this.msg.Status==0){
                this.checkboxShow = true;
            }else{
                this.checkboxShow = false;
            }
            this.apipost('Financial_post_GetWOrkTransferPageList',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=>{})
        },
        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 => {})
        },
        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,
              CreateBy: this.msg.CreateBy,
              Conditon: this.msg.Conditon
            }
            this.msg = msg;
        },
        handleCurrentChange(val) { //翻页
            this.msg.pageIndex = val;
            this.getPageList();
        },
        resetPageIndex(){  // 重置页码
            this.msg.pageIndex=1;
            this.currentPage = 1;
        },
        goUrlWeituo(path) {
            let tempStr = '/financial/financalDocument/' + path+'?id='+this.msg.CreateBy;
            this.$router.push({
            path: tempStr
            });
        },
        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:'修改财务单据'} })
            }
            // this.$router.push({ name: path,query:{"type":type,"FrID":id,"edit":edit,"Conditon":Conditon,"pageIndex":pageIndex,blank:'y',tab:'修改财务单据'} })
        }
    },
    watch:{
    }
}
</script>
