<style>
.page_bdm .page_bdm{padding: 20px 0;}
.page_bdm ._tit{padding-left: 10px;border-left: 3px solid #E95252;font-size: 14px}
.page_bdm ._conten,._process{margin-top: 20px;width: 890px;}
.page_bdm ._conten{position: relative}
.page_bdm ._explain{padding: 20px 15px;border-top: 1px dashed #BFBFBF;background-color: white;}
.page_bdm ._explain>p{color: #1273BC;font-size: 12px;}
.page_bdm ._explain>div{display: flex;justify-content: space-between;font-size: 12px;color: #333333;margin-top: 10px;align-items: center;}
.page_bdm ._tit2{
        border:none;
        background-color: white;
        border: 1px solid #DDDDDD;
    }
.page_bdm ._tit._tit2>p{
        padding-left: 10px;
        font-size: 14px;
        color: #000;
        padding: 8px 15px;
        display: flex;
        justify-content: space-between;
    }
.page_bdm ._tit._tit2 ._rotate{
        transform:rotate(180deg);
    }
.page_bdm ._tit._tit2 ._btn{
        font-size: 12px;
        color: #333333;
        cursor: pointer;
    }
.page_bdm ._tit._tit2 ._btn:hover{
        color: #E95252;
    }
.page_bdm ._tit._tit2 ._btn .iconfont{
        font-size: 12px;
        display: inline-block;
        margin-left: 10px;
    }
.page_bdm ._tit._tit2 ._text{
        border-left: 3px solid #e95252;
        padding-left: 10px;
    }
.page_bdm ._process{background-color: white;padding: 20px 15px;position: relative;}
.page_bdm ._process_box{border-top:  1px dashed #BFBFBF;padding-top: 30px;padding-bottom: 40px;}
.page_bdm ._flow_chart{position:absolute;display: inline-block;right: 15px;top: 7px;padding:5px 25px;font-size: 12px;color: #FFFFFF;background-color: #E95252;border-radius: 14px;cursor: pointer;}
.page_bdm ._pb_son{position: relative;padding-left: 65px;min-height: 100px;margin-bottom: 30px}
.page_bdm ._left_radius{width: 40px;height: 40px;border-radius: 50%;text-align: center;line-height: 40px;background-color: #2BBB7E;color: white;font-size: 12px;position: absolute;left: 0}
.page_bdm ._left_radius_err{background-color: #E95252;}
.page_bdm ._left_radius_sus{background-color: #1273BC;}
.page_bdm ._right_content{padding-left: 0}
.page_bdm ._right_content ._name ._n{font-size: 14px;color: #333333;font-weight: bold;}
 .page_bdm ._right_content ._name ._m{color: #FFFFFF;font-size: 12px;display: inline-block;padding: 2px 5px;background-color: #E95252;margin-left: 5px;border-radius: 4px;}
.page_bdm ._right_content ._name ._sm,._huoqian{color: #FFFFFF;font-size: 12px;display: inline-block;padding: 2px 5px;background-color: #FF9600;margin-left: 5px;border-radius: 4px;font-weight: 100;}
.page_bdm ._right_content ._name ._sn{color: #FFFFFF;font-size: 12px;display: inline-block;padding: 2px 5px;background-color: #2BBB7E;margin-left: 5px;border-radius: 4px;}
.page_bdm ._right_content ._time{font-size: 12px;color: #666666;padding-top: 5px;}
.page_bdm ._right_content ._pp_info,._textarea{border-radius: 4px; border: 1px solid #E5E5E5;background:rgba(245,245,245,1);font-size: 12px;color: #333333;padding: 12px 14px;margin-top: 13px;position: relative;}
.page_bdm ._right_content ._pp_info:before{display:block;content:'';border-width:8px 8px 8px 8px;border-style:solid;border-color: transparent transparent #dedede transparent;position:absolute;left:10px;top:-16px;}
.page_bdm ._more{margin-top: 15px;}
    /* ._more ._right_content{padding: 0 0 0 10px;} */
.page_bdm ._more ._right_content .iconfont{color: #AAAAAA}
.page_bdm ._more ._right_content ._name ._n{font-size: 14px;color: #333333;font-weight: bold;padding-left: 3px;}
.page_bdm ._right_content ._name{padding: 2px 0}
.page_bdm ._name .icon-img-ren{color: #AAAAAA}
.page_bdm ._info_img ul{padding: 10px 0}
.page_bdm ._info_img ul li{float: left;position: relative;cursor: pointer}
.page_bdm ._info_img ul li:hover ._see_img{opacity: 1;}
.page_bdm ._info_img ul li img{width:88px;height:59px;}
.page_bdm ._see_img{position: absolute;top: 0;width: 100%;height: 59px;padding-top: 16px;line-height: 34px;text-align: center;background-color: rgba(2, 2, 2, 0.3);display: inherit;opacity: 0;transition: all linear .5s}
.page_bdm ._see_img i.iconfont{display: inline-block;width: 32px;height: 32px;border-radius: 50%;color: #FFFFFF !important;background-color: rgba(255, 255, 255, 0.5);}
.page_bdm ._show_img_box{position: fixed; background: rgba(0,0,0,.6); left: 0; top:0;  width: 100%; height: 100%; z-index: 999; text-align: center;overflow:auto;}
.page_bdm ._textarea{width: 685px;height: 50px;background-color: white}
.page_bdm ._textarea._mini{width: 95%;}
.page_bdm ._upload_box ul li{float: left;height:82px;width:143px;padding:20px 20px 20px 0;text-align: center;position: relative;cursor: pointer;margin-right: 10px;}
.page_bdm ._upload_box ul li img{height:82px;width:143px;}
.page_bdm ._upload_box ul li:hover ._delete_img{opacity: 1;}
.page_bdm ._delete_img{position: absolute;top: 20px;height:82px;width:143px;line-height: 34px;text-align: center;background-color: rgba(2, 2, 2, 0.6);display: inherit;opacity: 0;transition: all linear .5s}
.page_bdm ._delete_img i.iconfont{display: inline-block;width: 32px;height: 32px;border-radius: 50%;color: #E95252 !important;background-color:rgba(251, 251, 251, 0.9);   margin-top: 26px;}
.page_bdm ._radio_lsit{padding-top: 15px}
.page_bdm ._upload_tips{font-size: 12px;position: absolute;top: 66%;width: 100%;left: 0;text-align: center;color: #949494;}
.page_bdm ._log_t{padding: 10px;}
.page_bdm ._pay_box{padding: 20px 0}
.page_bdm ._pay_box table{width: 100%;border-top-left-radius: 4px;border-top-right-radius: 4px;text-align: center;}
.page_bdm ._pay_box th{border: none;background-color: #DCDCDC}
.page_bdm ._pay_box th,._pay_box td{padding: 7px;font-size: 12px;}
    /* ._border_b_1{border-bottom: 1px solid #afafaf !important;} */
.page_bdm ._now_pay{padding: 4px 10px;border-radius: 11px;color: white;font-size: 12px;background-color: #E95252;cursor: pointer;}
.page_bdm ._allMoney{text-align: left !important}
.page_bdm ._time_n{float: right;}
.page_bdm ._mgt_15{margin-top: 15px;}
.page_bdm ._padd_left_10{padding-left: 10px;}
.page_bdm ._margin_b15{margin-bottom: 15px;}
.page_bdm ._pay_box table tr td{text-align: center}
.page_bdm .w890px{width: 890px;padding: 0;margin: 0;}

.page_bdm .w600px{
        width: 600px;
        padding: 15px;
        margin: 0 auto;
    }
.page_bdm ._explain ._addUpload_box{
        display: block;
        padding-bottom: 14px;
    }
.page_bdm ._explain2>div{
        margin-top: 0;
    }
.page_bdm ._explain2{
        border: none;
        padding: 20px 0 0 14px;
        background-color: aliceblue;
    }
.page_bdm ._addUpload_box>div:hover{
        background-color: #f5f5f5;
    }
.page_bdm ._submit{height:50px;padding:10px 20px;width:890px; position: absolute;bottom: 0;left: 0; display: flex;border-top: 1px dotted #eee;}
.page_bdm ._submit .btn-box{width:216px;}
.page_bdm ._submit .chosenNextBox{flex:1;font-size: 12px;height: 30px; line-height: 30px;}
.page_bdm ._submit .chosenNextBox .red{color:#C94052;margin-right: 15px;}
.page_bdm ._submit .el-input__inner{ width:300px !important;}
.page_bdm ._addFile_name{
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 12px;
    }
.page_bdm ._fujian_box{
        position: fixed;
        left: 961px;
        top: 148px;
        width: 440px;
    }
.page_bdm ._wenjian{
        padding: 15px;
        width: 91px;
        height: 80px;
        border:1px solid rgba(221,221,221,1);
        float: left;
        cursor: pointer;
        margin-right: 10px;
        margin-top: 10px;
    }
.page_bdm ._wenjian_P{
        font-size: 30px;
        text-align: center;
        color: #41D2A1;
    }
.page_bdm .el-carousel__item{
        align-items: center;
        justify-content: center;
        display: flex;
    }
.page_bdm ._pay_box table tr td:last-child{
        text-align: left;
    }
.page_bdm ._splic{
        width: 890px;
        overflow: hidden;
        font-size: 12px;
        color: #929292;
        margin-top: 15px;
        line-height: 10px;
    }
.page_bdm ._zhuanjiao_tips{
        font-size: 12px;
        color: #C94052;
        display: inline-block;
        margin-left: 20px;
    }
.page_bdm ._jump_page{
        cursor: pointer;
        text-decoration: underline;
    }
.page_bdm ._jump_page:hover{
        color: #c94052;
    }
.page_bdm ._fujian_box_tit{
        display: flex;
        justify-content:space-between;
        font-size: 14px;
        color: #333333;
    }
.page_bdm ._fujian_box_tit .iconfont{
        font-size: 14px;
        display: inline-block;
        margin-right: 8px;
    }
.page_bdm ._fujian_box_tit .iconfont.icon-bangdingzhagnhuxinxi{
        color: #E95252;
    }
.page_bdm ._fujian_box_tit .iconfont.icon-gengduo{
        transform:rotate(90deg);
        font-size: 12px;
    }
.page_bdm ._fujian_zhankai{
        color: white;
        width: 64px;
        height: 0;
        font-size: 12px;
        border-top: 26px solid #E95252;
        border-right: 15px solid transparent;
        border-left: 15px solid transparent;
        -webkit-transform: rotate(-90deg);
        transform: rotate(-90deg);
        position: relative;
        left: -19px;
        bottom: -21px;
    }
.page_bdm ._fujian_zhankai>span{
        display: inline-block;
        height: 100%;
        width: 50%;
        position: absolute;
        left: 25px;
        bottom: 15px;
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
    }
.page_bdm ._fujian_zhankai>span:nth-child(2){
        left: 18px;
        bottom: 3px;
    }
.page_bdm ._TCIDAndTCNUMList{
        display: flex;
    }
.page_bdm ._TCIDAndTCNUMList ._TCIDAndTCNUMList_item span{
        display: inline-block;
        padding-bottom: 5px;
    }
.page_bdm ._font_bold{
        font-weight: bold;
    }
.page_bdm ._TCIDAndTCNUMList_item{
        max-width: 160px;
    }
.page_bdm ._fujiashuoming_tr td{
        font-size: 12px;
        color: #696969;
        padding: 5px 10px;
    }
.page_bdm ._zhuan_msg{
        font-size: 12px;
        margin-top:10px;
        padding-bottom: 10px;
    }
.page_bdm ._zhuan_msg span{
        display: inline-block;
        margin-right: 5px;
        color: #696969;
    }
.page_bdm ._zhuan_msg span:last-child{
        margin-left: 10px;
    }
.page_bdm ._zhuan_msg p:nth-child(2){
        color: #696969;
    }
.page_bdm ._zhuan_msg ._color_green{
        color: #2BBB7E
    }
.page_bdm .chongdi_box table{
    width: 100%;
}
.page_bdm .chongdi_box table th{
    border: none;
    background-color: #DCDCDC;
}
.page_bdm .chongdi_box table th,.page_bdm .chongdi_box table td{
    font-size: 12px;
    padding: 7px;
}
.page_bdm .chongdi_list{
    background-color: white;
    padding: 15px;
    border: 1px solid #e0e0e0;
    max-height: 400px;
    overflow: auto;
    }
.page_bdm .chongdi_list em{
        font-size: 14px;
    }
.page_bdm .chongdi_list ._kehu input{
    border: 1px solid #dcdfe6 !important;
    background-color: #fff !important;
    padding: 0 15px !important;
}
.page_bdm .chongdi_list ._kehu .normalBtn{
    float: right;
}
.page_bdm .chongdi_list>div{
    margin-bottom: 10px;
}
.page_bdm .yixuanze_money{
    float: right;
}
.FD_yijian{
    margin-left:20px;
    cursor:pointer;
    text-decoration: underline;
}
</style>

<template>
    <div class="page_bdm" v-if="GetDetail" v-loading="loading">
        <p class="_tit">{{GetDetail.FinanceName}} <span style="color: red;" v-if="GetDetail.Status==4">已作废</span></p>
       
        
        <div v-if="GetDetail.TemplateId==36 || GetDetail.TemplateId==37 || GetDetail.TemplateId==53 ||GetDetail.TemplateId==48 || (GetDetail.TemplateId==43&&GetDetail.IsPublic==4) || (GetDetail.TemplateId==56&&GetDetail.IsPublic==4)" style="width: 890px;text-align: right;font-size:12px;cursor: pointer;color: #3980C8;" @click="goUrlApplication('Application',GetDetail.FrID)">
            <span v-show="huijiShow"  @click="goPrintPageNew(GetDetail.Type,GetDetail.FrID,GetDetail.Is_Merge,OrderSource)" style="color: #3980C8;font-size:12px;text-align:right;cursor: pointer;width:830px;margin-bottom:20px">凭证打印</span>
            <span v-if="GetDetail.FApplyForNumber&&GetDetail.FApplyForNumber!=''">申请书{{GetDetail.FApplyForNumber}}下载</span>
            <span v-else>未提交申请书</span>
        </div>
        <div class="_conten">
            <template v-if="!otherTable">
                <!-- 付款 -->
                <template v-if="GetDetail.Type!==1 && GetDetail.Type!==7 && GetDetail.Type!=4  && showModel">
                    <my-Bill :ID="FrID" :GetDetail="GetDetail" v-on:headCallBack="headCall" :width="widthSon" :color="colorSon"></my-Bill>
                </template>
                <template v-else-if="GetDetail.Type===4  && showModel">
                    <new-Bill :ID="FrID" :GetDetail="GetDetail"></new-Bill>
                </template>
                <template v-else-if="GetDetail.Type===1 && GetDetail.Type!==7  && showModel">
                    <my-RVB-Bill :ID="FrID" :GetDetail="GetDetail" :width="widthSon"  :color="colorSon"></my-RVB-Bill>
                </template>
                <template v-else-if="GetDetail.Type===7  && showModel">
                    <my-GZ-Bill :ID="FrID" :GetDetail="GetDetail" :width="widthSon"  :color="colorSon"></my-GZ-Bill>
                </template>
            </template>
            <template v-else-if="showModel">
                <my-DJ-Bill :ID="FrID" :GetDetail="GetDetail" :width="widthSon"  :color="colorSon"></my-DJ-Bill>
            </template>
            <div class="_explain">
                
                <p>附加说明:<span class="fr" v-if="GetDetail.ComplainID > 0" @click="goUrl('ComplaintsDetail', GetDetail.ComplainID,GetDetail.OrderID)"> <span style="color:#000">投诉单号:</span> 
                    <span class="cursorpointer text-decoration">{{GetDetail.ComplainID}}</span></span>
                    <span v-if="GetDetail.TemplateId==28 || GetDetail.TemplateId==30" @click="Gourl(GetDetail)" style="cursor: pointer;float: right;color: #000;font-size: 14px;text-decoration: underline;">提成详情</span>
                    <span v-if="CostTypeState" @click="GourlCostType('VisitRecord',1)" style="margin:0 10px;cursor: pointer;float: right;color: #000;font-size: 14px;text-decoration: underline;">拜访记录</span>
                    <span v-if="CostTypeState" @click="GourlCostType('yingyanMap',2)" style="cursor: pointer;float: right;color: #000;font-size: 14px;text-decoration: underline;">鹰眼轨迹</span>
                    <span v-if="GetDetail.OtherType==6" style="cursor: pointer;float: right;color: #000;font-size: 12px;">
                        <span style="text-decoration: underline;margin-right:10px" @click="goHand(1,GetDetail)">团号:{{GetDetail.TCNUM}}</span>    
                        <span style="text-decoration: underline;" @click="goHand(2,GetDetail)">相关单据:{{GetDetail.ReFinanceId}}</span>    
                    </span>
                    <span v-if="GetDetail.OtherType==18&&GetDetail.ReFinanceId>0" style="cursor: pointer;float: right;color: #000;font-size: 12px;">
                        <span @click="goOrderDetails(GetDetail.ReFinanceId)">账单:{{GetDetail.ReFinanceId}}</span>
                    </span>

                </p>
                <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;margin-top:15px;" width="100%" v-if="GetDetail.TCIDAndTCNUMList.length>0">
                    <tr v-for="(o,ox) in GetDetail.TCIDAndTCNUMList" class="_fujiashuoming_tr">
                        <td :colspan="3">
                            {{o.TCNUM}}({{o.TCID}})
                            <span v-if="GetDetail.IsShowGuestUrl && GetDetail.IsShowGuestUrl === 1" @click="goInves('investigationList',o.TCID)" class="FD_yijian">旅客意见
                                <span>{{o.GuestSurveyNum?o.GuestSurveyNum:0}}</span>/
                                <span>{{o.GuestTotalNum?o.GuestTotalNum:0}}</span>份
                            </span>
                            <span v-if="GetDetail.IsShowGuestUrl && GetDetail.IsShowPlanUrl==1 && GetDetail.ClientType==7" @click="goGuideAccount('GuideAccount',GetDetail.ClientID)" class="FD_yijian">
                                领队导游往来
                            </span>
                            <span v-if="GetDetail.IsShowDiJieChargeUrl==1" style="margin-left:10px;cursor:pointer;" @click="jumpHotelContract('HotelContract',o)">手配费详情</span>
                        </td>
                        <td @click="jumpPage('TravelControlList',o.TCNUM,1)"> <span class="_jump_page _font_bold">查看团队</span> </td>
                        <td @click="jumpPage('RegistrationList',o.TCID,7)"> <span class="_jump_page _font_bold">查看报名</span> </td>
                        <td v-if="qjGroupId==userInfo.RB_Group_id || TeamShouZhi" @click="GetDetail.TCIDAndTCNUMList.length==1?jumpPage('TeamBalancePayment',o.TCID,5):jumpPage('TeamBalancePayment',o.TCID,6)"> <span class="_jump_page _font_bold">团队收支</span> </td>
                        <td v-if="OrderSource==9&&GetDetail.SourceID>0" @click="jumpPage('SettlementOrder',GetDetail.SourceID,2)"> <span class="_jump_page _font_bold">国内票务</span> </td>
                        <td v-else-if="OrderSource==10&&GetDetail.SourceID>0" @click="jumpPage('FinancialOrder',GetDetail.SourceID,3)"> <span class="_jump_page _font_bold">签证收支</span> </td>
                        <td v-else-if="OrderSource==4&&GetDetail.SourceID>0"@click="jumpPage('FinancialOrder',GetDetail,4)"> <span class="_jump_page _font_bold">机票收支</span> </td>
                        <td v-if="GetDetail.TemplateId === 43 || GetDetail.TemplateId === 48 || GetDetail.TemplateId === 53|| GetDetail.TemplateId === 56
                            || GetDetail.TemplateId === 49 || GetDetail.TemplateId === 50 || GetDetail.TemplateId === 51|| GetDetail.TemplateId === 52
                            || GetDetail.TemplateId === 54 || GetDetail.TemplateId === 55 || GetDetail.TemplateId === 57|| GetDetail.TemplateId === 58 || GetDetail.TemplateId === 98 || GetDetail.TemplateId === 99
                            || GetDetail.IsShowPlanUrl === 1 && (qjGroupId==userInfo.RB_Group_id || F_Disbursement_Schedule)" @click="jumpPlanPage('leaderReimbursement',o.TCID)"> <span class="_jump_page _font_bold">用款计划</span> </td>
                        <!-- <td v-if="GetDetail.TemplateId === 43 || GetDetail.TemplateId === 48 || GetDetail.TemplateId === 53|| GetDetail.TemplateId === 56|| GetDetail.IsShowPlanUrl === 1" @click="jumpPlanPage('leaderReimbursement',o.TCID)"> <span class="_jump_page _font_bold">用款计划</span> </td> -->
                        <td v-if="GetDetail.IsShowPlanUrl === 1 && (qjGroupId==userInfo.RB_Group_id || F_Disbursement_Schedule)" @click="jumpPlanPage('leaderPay2',o.TCID)"> <span class="_jump_page _font_bold">领队报账</span> </td>
                        <td v-if="GetDetail.TemplateId === 49 || GetDetail.TemplateId === 50 || GetDetail.TemplateId === 57 || GetDetail.TemplateId === 58" @click="jumpCheZiPage('BusApportionManagement',o.TCID)"> <span class="_jump_page _font_bold">车资分摊</span> </td>
                    </tr>
                </table>
                <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;margin-top:15px;" width="100%" v-else-if="OrderSource==10">
                    <tr class="_fujiashuoming_tr">
                        <td>签证产品编号:<span @click="jumpPage('VisaProductOrder',GetDetail,8)" class="_jump_page _font_bold">{{GetDetail.SourceID}}</span></td>
                        <td @click="jumpPage('FinancialOrder',GetDetail,3)"> <span class="_jump_page _font_bold">签证收支</span> </td>
                    </tr>
                </table>
                <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;margin-top:15px;" width="100%" v-else-if="OrderSource==9">
                    <tr class="_fujiashuoming_tr">
                        <td>国内机票编号:{{GetDetail.SourceID}}</td>
                        <td @click="jumpPage('FinancialOrder',GetDetail,2)"> <span class="_jump_page _font_bold">国内票务</span> </td>
                    </tr>
                </table>
                <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;margin-top:15px;" width="100%" v-else-if="OrderSource==4">
                    <tr class="_fujiashuoming_tr">
                      <td>机票编号:{{GetDetail.SourceID}}</td>
                      <td v-if="(GetDetail.TCIDAndTCNUMList && GetDetail.TCIDAndTCNUMList.length===0) || !GetDetail.TCIDAndTCNUMList">线路:{{GetDetail.LineName?GetDetail.LineName:'机票尚未选择线路'}}</td>
                      <td @click="jumpPage('FinancialOrder',GetDetail,4)"> <span class="_jump_page _font_bold">机票收支</span> </td>
                    </tr>
                </table>
                <!-- <p>附加说明</p> -->
                <div>
                    <p v-if="GetDetail.Type!==7">费用归属部门:<span>{{GetDetail.DepartName}}</span></p>
                  <div>
                    <el-popover
                      popper-class="detailsIT_Journal"
                      width="250"
                      trigger="click">
                      <div class="InfoChangeLog" >
                        <div class="changLog">
                          <p class="_log_t">流程日志</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>暂无修改日志</li>
                          </ul>
                        </div>
                      </div>
                      <span slot="reference" style="text-decoration: underline;cursor:  pointer;" @click="Financial_post_GetFinancLogList()">单据操作日志</span>
                    </el-popover>
                  </div>
                    <!-- <p class="_TCIDAndTCNUMList">
                        <span>
                            团队编号:
                        </span>
                        <template v-if="GetDetail.TCIDAndTCNUMList!=null&&GetDetail.TCIDAndTCNUMList.length>0">
                            <p class="_TCIDAndTCNUMList_item"><span v-for="(i,ix) in GetDetail.TCIDAndTCNUMList" class="_jump_page _font_bold" @click="jumpPage('productQuery',i.TCID,1)">{{i.TCNUM}}({{i.TCID}}) <span v-if="ix!=GetDetail.TCIDAndTCNUMList.length-1"></br></span></span></p>
                        </template>
                        <template v-else>
                            <span>无</span>
                        </template>
                    </p>
                    <p v-if="GetDetail.TCIDAndTCNUMList.length==1" @click="jumpPage('TeamBalancePayment',GetDetail.TCIDAndTCNUMList,5)" class="_jump_page _font_bold">团队收支</p>
                    <p v-if="GetDetail.TCIDAndTCNUMList.length>1" @click="jumpPage('TeamBalancePayment',GetDetail.TCIDAndTCNUMList,6)" class="_jump_page _font_bold">团队收支</p>
                    <p v-if="OrderSource==9&&GetDetail.SourceID>0">国内票务:<span class="_jump_page _font_bold" @click="jumpPage('SettlementOrder',GetDetail.SourceID,2)">{{GetDetail.SourceID}}</span></p>
                    <p v-if="OrderSource==10&&GetDetail.SourceID>0">签证:<span class="_jump_page _font_bold" @click="jumpPage('VisaProductCopy',GetDetail.SourceID,3)">{{GetDetail.SourceID}}</span></p>
                    <p v-if="OrderSource==4&&GetDetail.SourceID>0" class="_TCIDAndTCNUMList">
                        <span>机票收支:</span>
                        <span class="_TCIDAndTCNUMList_item">
                            <template v-for="(i,ix) in GetDetail.TCIDAndTCNUMList">
                                <span  class="_jump_page _font_bold" @click="jumpPage('FinancialOrder',GetDetail.orderObj,4)">{{i.TCNUM}}({{GetDetail.SourceID}}) </span>
                                <span v-if="ix!=GetDetail.TCIDAndTCNUMList.length-1"></br></span>
                            </template>
                        </span>
                    </p>
                    <p>业务单据:<span>{{GetDetail.OrderID?GetDetail.OrderID:'无'}}</span></p> -->
                </div>
            </div>
            <div class="_fujian_box" v-if="GetDetail.VorcherInos&&GetDetail.VorcherInos.length>0">
                <div class="_fujian_zhankai cursorpointer" v-if="!fujianShow" @click="fujianShow = true">
                    <span>附件</span>
                    <span>></span>
                </div>
                <p class="_fujian_box_tit" v-if="fujianShow">
                    <span>
                        <i class="iconfont icon-bangdingzhagnhuxinxi"></i>
                        <span>附件</span>
                    </span>
                    <span class="cursorpointer" @click="fujianShow = false">收起 <i class="iconfont icon-gengduo"></i></span>
                </p>
                <div class="_addUpload_box" v-if="fujianShow">
                    <div style="width:100%;" v-if="FuImgList.length>0">
                        <el-carousel trigger="click" height="293px" width="440px" :interval="5000">
                            <el-carousel-item style="height: 293px;" v-for="item in FuImgList" :key="item">
                                <img @click="showImg(item)" :src="item" alt="" style="width: 100%;">
                            </el-carousel-item>
                        </el-carousel>
                    </div>
                    <template v-for="(file,fIndex) in GetDetail.VorcherInos" v-if="file.Type===1">
                        <div class="_wenjian" @click="showUpLoadFile(file)">
                            <p v-if="file.Type==1" class="_wenjian_P iconfont icon-excel"></p>
                            <!-- <p class="_addFile_name">{{file.Content}}</p> -->
                        </div>
                    </template>
                </div>
            </div>
        </div>
        <div class="w890px">
          <my-HB-Bill v-if="GetDetail.Is_Merge===1" :ID="FrID" :FrID='FrID' :GetDetail="GetDetail" :isPrintPage="false" :width="widthSon"  :color="colorSon"></my-HB-Bill>
        </div>
        <p class="_splic">///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p>
        <div class="_tit _tit2 w890px">
            <!-- 预付款冲抵 电商商品 -->
            <czBillModule :FrID='ID' />
            <myGuanBill :ID="FrID" :FrID='FrID' :TemplateId='GetDetail.TemplateId' v-if="(((GetDetail.TemplateId === 36 || GetDetail.TemplateId === 37) && LeadState) || GetDetail.TemplateId === 63 || GetDetail.TemplateId === 59 || GetDetail.TemplateId === 43 || GetDetail.TemplateId === 48 || GetDetail.TemplateId === 53 || GetDetail.TemplateId === 56) && showModel" />
            <myJiPiaoBill :ID="FrID" :FrID='FrID'  :TemplateId='GetDetail.TemplateId' v-if="GetDetail.TemplateId === 2 || GetDetail.TemplateId === 12 && showModel" />
            <huijiBill :ID="ID" :disabled="true" :loopNumN="1" :FrID='FrID'  :TemplateId='GetDetail.TemplateId' v-if="GetDetail.AccountantMergeDetailList && GetDetail.AccountantMergeDetailList.length>0" />
            
        </div>
        <template v-if="sonTCIDList">
            <div class="w890px">
                <div class="_tit _tit2 w890px _border_bottom_none">
                    <p>
                        <span class="_text">团队</span>
                        <span class="_btn" v-if="tableShowTeam" @click="tableShowTeam=false">收起 <i class="iconfont icon-gengduo _rotate"></i> </span>
                        <span class="_btn" v-else @click="tableShowTeam=true">展开 <i class="iconfont icon-gengduo"></i> </span>
                    </p>
                    <div v-show="tableShowTeam" >
                        <div>
                            <teamProductModule :ID="sonTCIDList"></teamProductModule>
                        </div>
                    </div>
                </div>
            </div>
        </template>
        <div class="w890px">
            <SaleOrderModule v-if="OrderSource==10&&SourceID&&OrderID" :SourceID='SourceID' :orderID='OrderID'/>
            <TicketFinace v-if="OrderSource==4&&SourceID&&Callback&&ID" :SourceID='SourceID' :Callback='Callback' :id='ID'/>
            <TicketingModule v-if="OrderSource==9&&FrID&&ID" :FrID='FrID' :id='ID'/>
            <ChongDiPage v-if="GetDetail.Type === 7 || isChongDi" :dataList="ChongDiList" :type="danjuType"/>
        </div>
        <div class="_tit _tit2 w890px">
            <p>
                <span class="_text">审核流程</span>
                <span class="_btn" v-if="tableShow" @click="tableShow=false">收起 <i class="iconfont icon-gengduo _rotate"></i> </span>
                <span class="_btn" v-else @click="tableShow=true">展开 <i class="iconfont icon-gengduo"></i> </span>
            </p>
            <div v-show="tableShow">
                <div class="w600px">
                    <my-FlowChartModule :data="AuditListData"></my-FlowChartModule>
                </div>
            </div>
        </div>
        <template v-if="tuiDataList.length>0">
            <div class="w890px">
                <div class="_tit _tit2 w890px _border_bottom_none">
                    <p>
                        <span class="_text">原路退款</span>
                        <span class="_btn" v-if="tableShowTuikuan" @click="tableShowTuikuan=false">收起 <i class="iconfont icon-gengduo _rotate"></i> </span>
                        <span class="_btn" v-else @click="tableShowTuikuan=true">展开 <i class="iconfont icon-gengduo"></i> </span>
                    </p>
                    <div v-show="tableShowTuikuan" >
                        <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <th width="250">平台单号</th>
                                <th width="100">金额</th>
                                <th>支付方式</th>
                                <th>支付日期</th>
                                <th>状态</th>
                                <th>退款金额</th>
                            </tr>
                            <tr v-for="item in tuiDataList">
                                <td>{{item.Trade_Order}}</td>
                                <td>{{item.Money}}</td>
                                <td>{{item.PayWayName}}</td>
                                <td>{{item.Pay_Date}}</td>
                                <td>{{item.PayStatus}}</td>
                                <td>{{item.RefundMoney}}</td>
                            </tr>
                        </table>
                        <!-- <el-pagination background @current-change="handleCurrentChange" :current-page.sync="queryMsg.currentPage" :page-size="queryMsg.pageSize"
                            layout="total,prev, pager, next, jumper" :total="queryMsg.total"></el-pagination> -->
                    </div>
                </div>
            </div>
        </template>

        <div class="_process clearfix">
            <!-- <el-popover
                popper-class="detailsIT_Journal"
                width="600"
                placement="right"
                trigger="click">
                    <div class="InfoChangeLog" >
                        <div class="changLog">
                            <p class="_log_t">收款流程</p>
                            <my-FlowChartModule :data="AuditListData"></my-FlowChartModule>
                        </div>
                    </div>
                <span slot="reference"  class="_flow_chart">流程图</span>
            </el-popover> -->
            <div class="_process_box">
                <template v-for="(item,index) in GetDetail.AuditSteps">
                    <div class="_pb_son clearfix" v-if="item.NextStep==1 && GetDetail.Status==1 && item.AuditWay==2">
                        <div class="_left_radius _left_radius_sus" v-if="item.NextStep==1">待审</div>
                        <p class="_name">
                            <span class="_n">{{item.AuditDescription}}</span><span class="_sm _huoqian">({{item.AuditWayName}})</span>
                        </p>
                        <div class="_right_content" v-for="(son,sindex) in item.AuditRecordList" v-if="son.AuditStatus==2">
                            <template  v-if="son.CareOfRemarks">
                                <div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
                                    <p><span>由</span>{{z.BeFrom}}<span><i class="_color_green">转交</i>给</span>{{z.Target}}</p>
                                    <p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
                                </div>
                            </template>
                            <span class="_sm" >
                                <p class="_name">
                                    <span class="_n">{{son.AuditName}}</span>
                                    <span class="_sn">通过</span>
                                </p>
                            </span>
                            <div class="_pp_info _margin_b15">
                                <p>{{son.Remark?son.Remark:'无'}}</p>
                                <div class="_info_img" v-if="son.Image!=null">
                                    <ul class="clearfix">
                                        <li v-for="(img,imgI) in son.Image">
                                            <img v-if="!img" src="../../assets/img/Travelslider.png" alt="">
                                            <img v-else :src="img" alt="">
                                            <div class="_see_img" @click="showImg(img,2)">
                                                <i class="iconfont icon-sousuo"></i>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="_right_content" v-for="(son,sindex) in item.AuditRecordList"  v-if="son.AuditStatus!=2 && MsgUrl">
                            <span class="_sm" >
                                <p class="_name">
                                    <span class="_n">{{son.AuditName}}</span>
                                    <span class="_sm" v-if="son.AuditStatus==1">待审</span>
                                    <span class="_sn" v-if="son.AuditStatus==2">通过</span>
                                    <span class="_m" v-if="son.AuditStatus==4">驳回</span>
                                </p>
                            <template  v-if="son.CareOfRemarks">
                                <div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
                                    <p><span>由</span>{{z.BeFrom}}<span><i class="_color_green">转交</i>给</span>{{z.Target}}</p>
                                    <p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
                                </div>
                            </template>
                            </span>
                        </div>
                         <textarea v-if="item.SpecialNode!=2||AuditOrRefundMsg.Status=='3'" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea>
                        <div v-else-if="item.SpecialNode!==0&&AuditOrRefundMsg.Status=='5'">
                          <textarea class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea>
                        </div>
                        <div class="_radio_lsit clearfix">
                            <div style="float:left">
                                <el-radio v-model="AuditOrRefundMsg.Status" label="5">通过</el-radio>
                                <el-radio v-model="AuditOrRefundMsg.Status" label="3">驳回</el-radio>
                            </div>
                            <div style="float:right" v-if="isShowChoice&&AuditOrRefundMsg.Status=='5'">
                                <el-radio v-model="choiceMsg.Status" label="1">常规</el-radio>
                                <el-radio v-model="choiceMsg.Status" label="2">原路退款</el-radio>
                            </div>
                        </div>
                        <div v-if="chongDiShow && AuditOrRefundMsg.Status === '5'" class="chongdi_box">
                                <div style="padding: 10px 0;font-size: 14px;">
                                    是否挂账冲抵:<el-switch v-model="shifouChongDi"
                                                    @change="ChongDiMoney = 0, HangingAccountList = []"
                                                    :disabled="(HangingAccountList.length < 1 && GetDetail.Type === 2) ? true : false"
                                                    active-color="#13ce66"
                                                    inactive-color="#ff4949">
                                                </el-switch>
                                    <em v-if="HangingAccountList.length < 1 && GetDetail.Type === 2">暂无可用冲抵挂账</em>
                                    <span v-else class="yixuanze_money">已选择金额:{{(Math.round(i.allMoney * 100)) / 100}}</span>
                                </div>
                                <div v-if="shifouChongDi" class="chongdi_list">
                                    <div>
                                       <em>发团时间:</em>
                                        <el-date-picker class="h34"
                                            @change="timeAdd(1)"
                                            v-model="productionDate"
                                            type="daterange"
                                            value-format="yyyy-MM-dd"
                                            range-separator="-">
                                        </el-date-picker>
                                    </div>
                                    <div class="_kehu">
                                       <em>{{$t('fnc.khleixing')}}:</em>
                                        <el-select filterable  v-model='ChongDiMsg.ClientType' :placeholder="$t('fnc.khleixing')" @change="financeinfo_post_GetClientAccountList(ChongDiMsg.ClientType, '1')" 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-select v-if="ChongDiMsg.ClientType==7" filterable   v-model='ChongDiMsg.IsLeader' :placeholder="$t('fnc.khmingcheng')" class="w135 _border_b_1">
                                            <el-option :label='$t("fnc.zslingdui")' :value='1' :key='1'> </el-option>
                                        </el-select>
                                        <el-select filterable  v-model='ChongDiMsg.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>&nbsp;&nbsp;&nbsp;&nbsp;
                                        <em>收支类型:</em>
                                        <el-select filterable  v-model='ChongDiMsg.Types' :placeholder="$t('fnc.khleixing')"  class="w135 _border_b_1">
                                            <el-option label='不限' value='' key='0'></el-option>
                                            <el-option label='收' value='1' key='1'></el-option>
                                            <el-option label='支' value='2' key='2'></el-option>
                                        </el-select>
                                        <button class="normalBtn" @click="GetHangingAccountList(),ChongDiMoney = 0">查询</button>
                                    </div> 
                                    <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;">
                                        <tr>
                                            <th><input type="checkbox" v-model="checkedAll" @change="changeCheckedAll()">费用类型</th>
                                            <th>团号</th>
                                            <th>财务单据</th>
                                            <th>收支类型</th>
                                            <th>金额</th>
                                            <th>对象名称</th>
                                            <th>备注</th>
                                            <th>制单时间</th>
                                            <th>制单人</th>
                                        </tr>
                                        <tr v-for="(item, index) in HangingAccountList">
                                            <td style="text-align: left"><label><input type="checkbox" v-model="item.checked" @change="checkdIteam(item)"> {{item.CostTypeName}}</label></td>
                                            <td>{{item.TCNUM}}</td>
                                            <td>{{item.FrID}}</td>
                                            <td>{{item.HangingAccountsTypeStr}}</td>
                                            <td>{{item.Money}}</td>
                                            <td>{{item.RemitterName}}</td>
                                            <td>{{item.Remark}}</td>
                                            <td>{{item.CreateDateStr}}</td>
                                            <td>{{item.createByStr}}</td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        <!--<div class="_pay_box" v-if="AuditOrRefundMsg.Status=='5'&&item.SpecialNode==2">-->
                        <div class="_pay_box" v-if="choiceMsg.Status=='2'">
                            <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;" v-if="GetDetail.TradeDetailList&&GetDetail.TradeDetailList.length>0">
                                <tr>
                                    <th>账户名称</th>
                                    <th>收款总额</th>
                                    <th>收款日期</th>
                                    <th>类型</th>
                                    <th>交易流水号</th>
                                    <th>可退金额</th>
                                    <th>操作</th>
                                </tr>
                                <tr v-for="(subItem,index) in GetDetail.TradeDetailList">
                                    <td>{{subItem.AccountName}}</td>
                                    <td>{{subItem.Money}}</td>
                                    <td>{{subItem.Pay_DateStr}}</td>
                                    <td>{{subItem.Pay_WayName}}</td>
                                    <td>{{subItem.Trade_Order}}</td>
                                    <td>{{subItem.CanRefundMoney}}</td>
                                    <td>
                                        <el-checkbox v-model="subItem.isChecked" @change="changeStatus(subItem,index)"></el-checkbox>
                                        <el-input v-if="subItem.isChecked" v-model="subItem.RefundMoney" @blur="addPayList(subItem,index)" @keyup.native="checkPrice(subItem,'RefundMoney')" class="w80" placeholder="请输入退款金额"/>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <!-- 111 -->
                        <div class="_pay_box" v-if="AuditOrRefundMsg.Status=='5'&&item.SpecialNode==2">
                          <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;" v-if="GetDetail.CashierDetail&&GetDetail.CashierDetail.length<1">
                            <tr>
                              <th>账户分类</th>
                              <th>付款方式</th>
                              <th>账户</th>
                              <th>金额</th>
                              <th width="70">币种</th>
                              <th width="150px">汇率</th>
                              <th width="100px">总金额</th>
                            </tr>
                            <template v-for="(i,index) in payMsgList">
                                <tr v-if="!i.show" @click="payMsgListShow(i, index)">
                                    <td>{{i.AccName}}</td>
                                    <td>{{i.Name}}</td>
                                    <td>{{i.Account}}</td>
                                    <td>{{moneyFormat(i.OriginalMoney)}}</td>
                                    <td>{{i.CurrenName}}</td>
                                    <td>{{i.Rate}}</td>
                                    <td>{{moneyFormat(i.allMoney)}}</td>
                                </tr>
                                <tr v-else @keyup.enter="addList(2,index)">
                                    <td>
                                        <el-select  filterable  v-model='i.AccName'  @change="clearAccBank(1,index)" class=" _border_b_1">
                                            <el-option v-for='a in AccList'
                                                :label='a.Name'
                                                :value='a.Name'
                                                :key='a.ID'>
                                            </el-option>
                                        </el-select>
                                    </td>
                                    <td>
                                        <el-select  filterable  v-model='i.Type'  @change="getAccountList(i.Type,1,index)" class=" _border_b_1">
                                            <el-option v-for='a in GetAccountType'
                                                :label='a.Name'
                                                :value='a.ID'
                                                :key='a.ID'>
                                            </el-option>
                                        </el-select>
                                    </td>
                                    <td>
                                        <el-select  filterable  v-model='i.AccountId' placeholder="请选择账户" @change="setAccountName(i.AccountId,1,index)" class=" _border_b_1">
                                            <el-option v-for='a in accountList'
                                                :label='a.allName'
                                                :value='a.ID'
                                                :key='a.ID'>
                                            </el-option>
                                        </el-select>
                                    </td>
                                    <td>
                                        <el-input v-model="i.OriginalMoney" @change="Calculation(1,index)" @blur="addList(2,index)" @keyup.native="checkPrice(payMsgList[index],'OriginalMoney', true)" placeholder="请输入金额" type="text"  class=" _border_b_1"></el-input>
                                    </td>
                                    <td>
                                        <p>{{i.CurrenName}}</p>
                                    </td>
                                    <td>
                                        <el-input v-model="i.Rate" @change="Calculation(1,index)" @blur="addList(2,index)" type="number" class=" _border_b_1"></el-input>
                                    </td>
                                    <td>{{(Math.round(i.allMoney * 100)) / 100}}</td>
                                </tr>
                            </template>
                            <tr @keyup.enter="addList()" v-if="choiceMsg.Status=='1'">
                              <td>
                                <el-select  filterable  v-model='payMsg.AccName'  @change="clearAccBank()" class=" _border_b_1">
                                  <el-option v-for='i in AccList'
                                             :label='i.Name'
                                             :value='i.Name'
                                             :key='i.ID'>
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <el-select  filterable  v-model='payMsg.Type'  @change="getAccountList(payMsg.Type)" class=" _border_b_1">
                                  <el-option v-for='i in GetAccountType'
                                             :label='i.Name'
                                             :value='i.ID'
                                             :key='i.ID'>
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <el-select  filterable  v-model='payMsg.AccountId' placeholder="请选择账户" @change="setAccountName(payMsg.AccountId)" class=" _border_b_1">
                                  <el-option v-for='i in accountList'
                                             :label='i.allName'
                                             :value='i.ID'
                                             :key='i.ID'>
                                  </el-option>
                                </el-select>
                              </td>
                              <!-- <td>{{payMsg.balance}}</td> -->
                              <td>
                                <el-input v-model="payMsg.OriginalMoney" @change="Calculation()" @blur="addList()" @keyup.native="checkPrice(payMsg,'OriginalMoney', true)" placeholder="请输入金额" type="text"  class=" _border_b_1"></el-input>
                              </td>
                              <td>
                                <p>{{payMsg.CurrenName}}</p>
                              </td>
                              <td>
                                <el-input v-model="payMsg.Rate" @change="Calculation()" @blur="addList()" type="number" class=" _border_b_1"></el-input>
                              </td>
                              <!-- <td>
                                  <el-input v-model="payMsg.Fee" @change="Calculation()" type="number" class=" _border_b_1"></el-input>
                              </td> -->
                              <td>{{moneyFormat(payMsg.allMoney)}}</td>
                              <!-- <td width="120px">
                                  <span class="_now_pay" @click="payFun()">立即付款</span>
                              </td> -->
                            </tr>
                            <tr v-if="payMsgList.length<1">
                              <td height="50px"></td>
                              <td height="50px"></td>
                              <td height="50px"></td>
                              <td height="50px"></td>
                              <td height="50px"></td>
                              <td height="50px"></td>
                              <td height="50px"></td>
                              <!-- <td height="50px"></td> -->
                              <!-- <td height="50px"></td> -->
                              <!-- <td height="50px"></td> -->
                            </tr>
                            <tr>
                              <td>备注</td>
                              <td colspan="7">
                                <textarea class="_textarea _mini" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea>
                              </td>
                            </tr>
                            <tr>
                              <td height="50px">实付金额</td>
                              <td class="_allMoney" height="50px" colspan="7">{{allMoney==0?'':allMoney}}</td>
                            </tr>
                            <tr>
                              <td>交易日期</td>
                              <td colspan="7">
                                <el-date-picker
                                  v-model="AuditOrRefundMsg.TradeDate"
                                  type="date"
                                  :default-value="AuditOrRefundMsg.TradeDate"
                                  value-format="yyyy-MM-dd"
                                  placeholder="选择日期">
                                </el-date-picker>
                              </td>
                            </tr>
                          </table>
                          <div  v-else  class="jiaoyiriqi">
                            <lable>交易日期</lable>
                            <el-date-picker
                              v-model="AuditOrRefundMsg.TradeDate"
                              type="date"
                              :default-value="AuditOrRefundMsg.TradeDate"
                              value-format="yyyy-MM-dd"
                              placeholder="选择日期">
                            </el-date-picker>
                          </div>
                        </div>
                
                        <div class="_upload_box">
                            <ul class="clearfix">
                                <li v-for="(img,imgIndex) in uploadImgList">
                                    <img :src="img.src" alt="">
                                    <div class="_delete_img" @click="deleteImg(imgIndex)">
                                        <i class="iconfont icon-img_delete_small"></i>
                                    </div>
                                </li>
                                <li v-if="uploadImgList.length<10">
                                    <el-upload
                                    class="avatar-uploader"
                                    action=""
                                    :http-request="uploadFileBtn"
                                    :show-file-list="false"
                                    :multiple="true"
                                    :limit="10">
                                    <i class="el-icon-plus avatar-uploader-icon"></i>
                                    <span class="_upload_tips">最多可上传10张图片</span>
                                </el-upload>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="_pb_son clearfix" v-if="item.NextStep==1 && GetDetail.Status==1 && item.AuditWay!=2 && MsgUrl" >
                        <div class="_left_radius _left_radius_sus" v-if="item.Status==1">待审</div>
                        <p class="_name"> <span class="_n">{{item.AuditDescription}}</span><span class="_sm _huoqian" v-if="item.AuditWay==3">({{item.AuditWayName}})</span></p>
                        <div class="_right_content _padd_left_10">
                            <p class="_name _mgt_15" v-for="(son,sindex) in item.AuditRecordList">
                                <span class="_n">{{son.AuditName}}</span>
                                <span class="_sm" v-if="item.Status==1">待审</span>
                            <template  v-if="son.CareOfRemarks">
                                <div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
                                <p><span>由</span>{{z.BeFrom}}<span><i class="_color_green">转交</i>给</span>{{z.Target}}</p>
                                <p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
                                </div>
                            </template>
                            </p>
                            <textarea v-if="item.SpecialNode!=2||AuditOrRefundMsg.Status=='3'" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea>
                            <!-- <textarea v-if="AuditOrRefundMsg.Status=='3'&&item.SpecialNode!=0" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea> -->
                            <div class="_radio_lsit clearfix">
                                <div style="float:left">
                                    <el-radio v-model="AuditOrRefundMsg.Status" label="5">通过</el-radio>
                                    <el-radio v-model="AuditOrRefundMsg.Status" label="3">驳回</el-radio>
                                </div>
                                <div style="float:right" v-if="isShowChoice&&AuditOrRefundMsg.Status=='5'">
                                    <el-radio v-model="choiceMsg.Status" label="1">常规</el-radio>
                                    <el-radio v-model="choiceMsg.Status" label="2">原路退款</el-radio>
                                </div>
                            </div>
                            <div v-if="chongDiShow && AuditOrRefundMsg.Status === '5'" class="chongdi_box">
                                <div style="padding: 10px 0;font-size: 14px;">
                                    是否挂账冲抵:<el-switch v-model="shifouChongDi"
                                                    @change="ChongDiMoney = 0, HangingAccountList = []"
                                                    :disabled="(HangingAccountList.length < 1 && GetDetail.Type === 2) ? true : false"
                                                    active-color="#13ce66"
                                                    inactive-color="#ff4949">
                                                </el-switch>
                                    <em v-if="HangingAccountList.length < 1 && GetDetail.Type === 2">暂无可用冲抵挂账</em>
                                    <span v-else class="yixuanze_money">已选择金额:{{(Math.round(ChongDiMoney * 100)) / 100}}</span>
                                </div>
                                <div v-if="shifouChongDi" class="chongdi_list">
                                    <div>
                                       <em>发团时间:</em>
                                        <el-date-picker class="h34"
                                            @change="timeAdd(1)"
                                            v-model="productionDate"
                                            type="daterange"
                                            value-format="yyyy-MM-dd"
                                            range-separator="-">
                                        </el-date-picker>
                                    </div>
                                    <div class="_kehu">
                                       <em>{{$t('fnc.khleixing')}}:</em>
                                        <el-select filterable  v-model='ChongDiMsg.ClientType' :placeholder="$t('fnc.khleixing')" @change="financeinfo_post_GetClientAccountList(ChongDiMsg.ClientType, '1')" 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-select v-if="ChongDiMsg.ClientType==7" filterable   v-model='ChongDiMsg.IsLeader' :placeholder="$t('fnc.khmingcheng')" class="w135 _border_b_1">
                                            <el-option :label='$t("fnc.zslingdui")' :value='1' :key='1'> </el-option>
                                        </el-select>
                                        <el-select filterable  v-model='ChongDiMsg.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>&nbsp;&nbsp;&nbsp;&nbsp;
                                        <em>收支类型:</em>
                                        <el-select filterable  v-model='ChongDiMsg.Types' :placeholder="$t('fnc.khleixing')"  class="w135 _border_b_1">
                                            <el-option label='不限' value='' key='0'></el-option>
                                            <el-option label='收' value='1' key='1'></el-option>
                                            <el-option label='支' value='2' key='2'></el-option>
                                        </el-select>
                                        <button class="normalBtn" @click="GetHangingAccountList(),ChongDiMoney = 0">查询</button>
                                    </div> 
                                    <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;">
                                        <tr>
                                            <th><input type="checkbox" v-model="checkedAll" @change="changeCheckedAll(),ChongDiMoney = 0">费用类型</th>
                                            <th>团号</th>
                                            <th>财务单据</th>
                                            <th>收支类型</th>
                                            <th>金额</th>
                                            <th>对象名称</th>
                                            <th>备注</th>
                                            <th>制单时间</th>
                                            <th>制单人</th>
                                        </tr>
                                        <tr v-for="(item, index) in HangingAccountList">
                                            <td style="text-align: left"><label><input type="checkbox" v-model="item.checked" @change="checkdIteam(item)"> {{item.CostTypeName}}</label></td>
                                            <td>{{item.TCNUM}}</td>
                                            <td>{{item.FrID}}</td>
                                            <td>{{item.HangingAccountsTypeStr}}</td>
                                            <td>{{item.Money}}</td>
                                            <td>{{item.RemitterName}}</td>
                                            <td>{{item.Remark}}</td>
                                            <td>{{item.CreateDateStr}}</td>
                                            <td>{{item.createByStr}}</td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="_pay_box" v-if="choiceMsg.Status=='2'">
                                <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;" v-if="GetDetail.TradeDetailList&&GetDetail.TradeDetailList.length>0">
                                    <tr>
                                        <th>账户名称</th>
                                        <th>收款总额</th>
                                        <th>收款日期</th>
                                        <th>类型</th>
                                        <th>交易流水号</th>
                                        <th>可退金额</th>
                                        <th>操作</th>
                                    </tr>
                                    <tr v-for="(subItem,index) in GetDetail.TradeDetailList">
                                        <td>{{subItem.AccountName}}</td>
                                        <td>{{subItem.Money}}</td>
                                        <td>{{subItem.Pay_DateStr}}</td>
                                        <td>{{subItem.Pay_WayName}}</td>
                                        <td>{{subItem.Trade_Order}}</td>
                                        <td>{{subItem.CanRefundMoney}}</td>
                                        <td>
                                            <el-checkbox v-model="subItem.isChecked" @change="changeStatus(subItem,index)"></el-checkbox>
                                            <el-input v-if="subItem.isChecked" v-model="subItem.RefundMoney" @blur="addPayList(subItem,index)" @keyup.native="checkPrice(subItem,'RefundMoney')" class="w80" placeholder="请输入退款金额"/>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <!-- 111 -->
                             <div class="_pay_box" v-if="AuditOrRefundMsg.Status=='5'&&item.SpecialNode==2">
                                    <!-- <div class="_pay_box"> -->
                                
                                <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;">
                                    <tr>
                                        <th>账户分类</th>
                                        <th>付款方式</th>
                                        <th>账户</th> 
                                        <th>金额</th>
                                        <th width="70">币种</th>
                                        <th width="150px">汇率</th> 
                                        <th width="100px">总金额</th> 
                                    </tr>
                                    <template v-for="(i,index) in payMsgList">
                                        <tr v-if="!i.show" @click="payMsgListShow(i, index)">
                                            <td>{{i.AccName}}</td>
                                            <td>{{i.Name}}</td>
                                            <td>{{i.Account}}</td> 
                                            <td>{{moneyFormat(i.OriginalMoney)}}</td>
                                            <td>{{i.CurrenName}}</td>
                                            <td>{{i.Rate}}</td> 
                                            <td>{{moneyFormat(i.allMoney)}}</td> 
                                        </tr>
                                        <tr v-else @keyup.enter="addList(2,index)">
                                            <td>
                                                <el-select  filterable  v-model='i.AccName'  @change="clearAccBank(1,index)" class=" _border_b_1">
                                                    <el-option v-for='a in AccList'
                                                        :label='a.Name'
                                                        :value='a.Name'
                                                        :key='a.ID'>
                                                    </el-option>
                                                </el-select>
                                            </td>
                                            <td>
                                                <el-select  filterable  v-model='i.Type'  @change="getAccountList(i.Type,1,index)" class=" _border_b_1">
                                                    <el-option v-for='a in GetAccountType'
                                                        :label='a.Name'
                                                        :value='a.ID'
                                                        :key='a.ID'>
                                                    </el-option>
                                                </el-select>
                                            </td>
                                            <td>
                                                <el-select  filterable  v-model='i.AccountId' placeholder="请选择账户" @change="setAccountName(i.AccountId,1,index)" class=" _border_b_1">
                                                    <el-option v-for='a in accountList'
                                                        :label='a.allName'
                                                        :value='a.ID'
                                                        :key='a.ID'>
                                                    </el-option>
                                                </el-select>
                                            </td>
                                            <td>
                                                <el-input v-model="i.OriginalMoney" @change="Calculation(1,index)" @blur="addList(2,index)" placeholder="请输入金额" type="text"  class=" _border_b_1"></el-input>
                                            </td>
                                            <td>
                                                <p>{{i.CurrenName}}</p>
                                            </td>
                                            <td>
                                                <el-input v-model="i.Rate" @change="Calculation(1,index)" @blur="addList(2,index)" type="number" class=" _border_b_1"></el-input>
                                            </td>
                                            <td>{{i.allMoney}}</td>
                                        </tr>
                                    </template>
                                    <tr @keyup.enter="addList()" v-if="choiceMsg.Status=='1'">
                                        <td>
                                            <el-select  filterable  v-model='payMsg.AccName'  @change="clearAccBank()" class=" _border_b_1">
                                                <el-option v-for='i in AccList'
                                                    :label='i.Name'
                                                    :value='i.Name'
                                                    :key='i.ID'>
                                                </el-option>
                                            </el-select>
                                        </td>
                                        <td>
                                            <el-select  filterable  v-model='payMsg.Type'  @change="getAccountList(payMsg.Type)" class=" _border_b_1">
                                                <el-option v-for='i in GetAccountType'
                                                    :label='i.Name'
                                                    :value='i.ID'
                                                    :key='i.ID'>
                                                </el-option>
                                            </el-select>
                                        </td>
                                        <td>
                                            <el-select  filterable  v-model='payMsg.AccountId' placeholder="请选择账户" @change="setAccountName(payMsg.AccountId)" class=" _border_b_1">
                                                <el-option v-for='i in accountList'
                                                    :label='i.allName'
                                                    :value='i.ID'
                                                    :key='i.ID'>
                                                </el-option>
                                            </el-select>
                                        </td>
                                        <!-- <td>{{payMsg.balance}}</td> -->
                                        <td>
                                            <el-input v-model="payMsg.OriginalMoney" @change="Calculation()" @blur="addList()" placeholder="请输入金额" type="text"  class=" _border_b_1"></el-input>
                                        </td>
                                        <td>
                                            <p>{{payMsg.CurrenName}}</p>
                                        </td>
                                        <td>
                                            <el-input v-model="payMsg.Rate" @change="Calculation()" @blur="addList()" type="number" class=" _border_b_1"></el-input>
                                        </td>
                                        <!-- <td>
                                            <el-input v-model="payMsg.Fee" @change="Calculation()" type="number" class=" _border_b_1"></el-input>
                                        </td> -->
                                        <td>{{moneyFormat(payMsg.allMoney)}}</td>
                                        <!-- <td width="120px">
                                            <span class="_now_pay" @click="payFun()">立即付款</span>
                                        </td> -->
                                    </tr>
                                    <tr v-if="payMsgList.length<1">
                                        <td height="50px"></td>
                                        <td height="50px"></td>
                                        <td height="50px"></td>
                                        <td height="50px"></td>
                                        <td height="50px"></td>
                                        <td height="50px"></td>
                                        <td height="50px"></td>
                                        <!-- <td height="50px"></td> -->
                                        <!-- <td height="50px"></td> -->
                                        <!-- <td height="50px"></td> -->
                                    </tr>
                                    <!-- <tr>
                                        <td height="50px">手续费</td>
                                        <td class="_allMoney" height="50px" colspan="8">{{allMoney==0?'':allMoney}}</td>
                                    </tr> -->
                                    <tr>
                                        <td height="50px">实付金额</td>
                                        <td class="_allMoney" height="50px" colspan="7">{{allMoney==0?'':allMoney}}</td>
                                    </tr>
                                    <tr>
                                        <td>备注</td>
                                        <td colspan="7">
                                            <textarea class="_textarea _mini" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>交易日期</td>
                                        <td colspan="7">
                                            <el-date-picker
                                                v-model="AuditOrRefundMsg.TradeDate"
                                                type="date"
                                                :default-value="AuditOrRefundMsg.TradeDate"
                                                value-format="yyyy-MM-dd"
                                                placeholder="选择日期">
                                            </el-date-picker>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="_upload_box">
                                <ul class="clearfix">
                                    <li v-for="(img,imgIndex) in uploadImgList">
                                        <img :src="img.src" alt="">
                                        <div class="_delete_img" @click="deleteImg(imgIndex)">
                                            <i class="iconfont icon-img_delete_small"></i>
                                        </div>
                                    </li>
                                    <li v-if="uploadImgList.length<10">
                                        <el-upload
                                        action=""
                                        class="avatar-uploader"
                                        :http-request="uploadFileBtn"
                                        :show-file-list="false"
                                        :multiple="true"
                                        :limit="10">
                                        <i class="el-icon-plus avatar-uploader-icon"></i>
                                        <span class="_upload_tips">最多可上传10张图片</span>
                                    </el-upload>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="_pb_son clearfix" v-if="item.Sort==0 || (item.Status==2 && item.Sort!=0) || (item.Status==4)" >
                        <div class="_left_radius" v-if="item.Sort==0">发起</div>
                        <div class="_left_radius" v-if="item.Sort!=0 && item.Status==2">通过</div>
                        <div class="_left_radius _left_radius_err" v-if="item.Status==4">驳回</div>
                        <div class="_right_content" v-if="item.AuditWay==2">
                            <p class="_name"> <span class="_n">{{item.AuditDescription}}</span><span class="_sm">({{item.AuditWayName}})</span></p>
                            <div class="_more" v-for="(son,sindex) in item.AuditRecordList">
                                <div class="_right_content">
                                    <template  v-if="son.CareOfRemarks">
                                        <div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
                                            <p><span>由</span>{{z.BeFrom}}<span><i class="_color_green">转交</i>给</span>{{z.Target}}</p>
                                            <p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
                                        </div>
                                    </template>
                                    <p class="_name">
                                        <span class="_n">{{son.AuditName}}</span>
                                        <span class="_sm" v-if="item.Status==2 && item.Sort!=0">通过</span>
                                        <span class="_m" v-if="item.Status==4">驳回</span>
                                        <span class="_time _time_n">{{son.AduitDate}}</span>
                                    </p>
                                    <div class="_pp_info">
                                        <p>{{son.Remark?son.Remark:'无'}}</p>
                                        <div class="_info_img" v-if="son.Image!=null">
                                            <ul class="clearfix">
                                                <li v-for="(img,imgI) in son.Image">
                                                    <img v-if="!img" src="../../assets/img/Travelslider.png" alt="">
                                                    <img v-else :src="img" alt="">
                                                    <div class="_see_img" @click="showImg(img,2)">
                                                        <i class="iconfont icon-sousuo"></i>
                                                    </div>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="_right_content" v-else>
                            <div class="_more" v-for="(son,sindex) in item.AuditRecordList">
                            <p class="_name" v-if="son.AuditStatus==2">{{son.AuditName}}
                                <span class="_sm">{{item.AuditDescription}}</span>
                                <span class="_time _time_n">{{son.AduitDate}}</span>
                            </p>
                            <template  v-if="son.CareOfRemarks">
                                <div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
                                    <p><span>由</span>{{z.BeFrom}}<span><i class="_color_green">转交</i>给</span>{{z.Target}}</p>
                                    <p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
                                </div>
                            </template>                            
                                <div class="_right_content" v-if="son.AuditStatus==2">
                                    <div class="_pp_info">
                                        <p>{{son.Remark?son.Remark:'无'}}</p>
                                        <div class="_info_img" v-if="son.Image!=null">
                                            <ul class="clearfix">
                                                <li v-for="(img,imgI) in son.Image">
                                                    <img v-if="!img" src="../../assets/img/Travelslider.png" alt="">
                                                    <img v-else :src="img" alt="">
                                                    <div class="_see_img" @click="showImg(img,2)">
                                                        <i class="iconfont icon-sousuo"></i>
                                                    </div>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </template>
            </div>
            <div class="_submit" v-if="GetDetail.Is_Self!=1 && MsgUrl">
                <div class="chosenNextBox" v-if="(GetDetail.IsHave==0||resultCode==11019)&&AuditOrRefundMsg.Status=='5'">
                    <template>
                        <div>
                            <label>下一步:<span class="red">{{GetDetail.AuditDescription}}</span></label>
                            <el-select size="mini" style="width:300px" v-model="chosenPeople" multiple filterable remote reserve-keyword placeholder="请输入..." :remote-method="remoteMethod" :loading="loadingPeople">
                                <el-option v-for="item in peopleData" :key="item.empId" :label="`${item.name}`" :value="item.empId">
                                    <span style="float: left; font-size: 12px">{{ item.name }}</span>
                                    <span style="float: right; font-size: 12px; margin-right:20px;">{{ item.departmentName }}</span>
                                </el-option>
                            </el-select>
                        </div>
                    </template>
                </div>
                <p style="color: red;" v-if="GetDetail.Status==4">该单据已作废,无法审核</p>
                <div style="padding-left: 75px;" v-if="GetDetail.Status!=2 ">
                  <template v-if="GetDetail.Status!=4">
                    <button class="normalBtn" @click="AuditOrRefund()">保存</button>
                  </template>
                  <button class="hollowFixedBtn" @click="ReturnBack()">返回</button>
                  <!--<template v-if="AuditOrRefundMsg.Status !== '3'" v-for="step in GetDetail.AuditSteps">-->
                  <template v-for="step in GetDetail.AuditSteps">
                    <template v-if="step.NextStep === 1 && (step.SpecialNode === 2 || step.SpecialNode === 1 || RB_Post_Id==168) &&  GetDetail.Status!=4">
                      <button  class="normalBtn" @click="zanCun()" style="position: relative;left: 560px;">暂存</button>
                    </template>
                  </template>
                </div>
            </div>
            <div class="_submit" v-if="GetDetail.Is_Self==1" && MsgUrl>
                <div>
                    <label>转交人:</label>
                    <el-select size="mini" style="width:300px" v-model="zhuanMsg.AuditEmId" filterable remote reserve-keyword placeholder="请选择转交人" :remote-method="remoteMethod" :loading="loadingPeople">
                        <el-option v-for="item in peopleData" :key="item.empId" :label="`${item.name}`" :value="item.empId">
                            <span style="float: left; font-size: 12px">{{ item.name }}</span>
                            <span style="float: right; font-size: 12px; margin-right:20px;">{{ item.departmentName }}</span>
                        </el-option>
                    </el-select>
                </div>
                <div style="padding-left: 75px;">
                    <span class="_zhuanjiao_tips">制单人跟审核人不能相同哟,请转交</span>
                    <button class="normalBtn" @click="zhuanBtn">转交</button>
                </div>
            </div>
        </div>
        <div v-if='picIsShow' class="_show_img_box" @click="picIsShow=false,picObj=''">
			<img :src="picObj" style="margin-top: 80px"/>
		</div>
      <viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer">
        <img v-for="src in images" :src="src" :key="src">
      </viewer>
      <a id='groupTourOrder_DownLoad' target="_blank" style="display:none">1不要删除</a>
    </div>
</template>
<script>
import myFlowChartModule from "./FinancialSubmodule/FlowChartModule.vue";
import myBill from "./FinancialSubmodule/BillModule.vue";
import newBill from "./FinancialSubmodule/NewBillModule.vue";
import myGZBill from "./FinancialSubmodule/GZBillModule.vue";
import myrbvBill from "./FinancialSubmodule/ReceivablesModule.vue";
import myhrBill from "./FinancialSubmodule/MergeBillModule.vue";
import myDJBill from "./FinancialSubmodule/DjieMergeBillModule.vue";
import teamProductModule from "../commonPage/teamProductModule.vue";
import TicketFinace from "../commonPage/TicketFinace.vue";
import SaleOrderModule from "../commonPage/SaleOrderModule.vue";
import TicketingModule from "../commonPage/TicketingModule.vue";
import ChongDiPage from "../commonPage/ChongDiPage.vue";
import { truncate } from 'fs';
import myGuanBill from "./FinancialSubmodule/GuanBillModule.vue";
import myJiPiaoBill from "./FinancialSubmodule/JiPiaoBillModule.vue";
import huijiBill from "./FinancialSubmodule/huijiBill.vue";
import czBillModule from "./FinancialSubmodule/czBillModule.vue";
// import MsgBus from '../../assets/utils/msgBus.js';
export default {
    data(){
        return{
            TeamShouZhi:false,
            F_Disbursement_Schedule:false,
            userInfo:{},
            qjGroupId:-1,
            otherTable: true,
          imageOptions:{
            navbar:false,
            title:false
          },
          images: [],
            ID:0,
            GetDetail:{
                AuditSteps:[{
                    AuditRecordList:[{
                        AuditName:''
                        }]
                }],
                TCIDList:[],
                TCIDAndTCNUMList:[]
            },
            zhuanMsg:{
                AuditEmId:null,
                WorkFlowId:0,
            },
            AuditOrRefundMsg:{
                WorkFlowId:'',
                SpecialNode:1,
                Description:'',
                Status:'5',
                Image:[],
                TemplateType:'',
                TradeDate:new Date().Format("yyyy-MM-dd"),
                tradeWays:[
                    {
                        ID:0,
                        CurrencyId:0,
                        OriginalMoney:'',
                        Rate:'',
                        Type:0,
                        AccountId:0,
                    }
                ],
                emList:[],
                IsRefundAutoGoBack:0,
                TradeDetailList:[]
            },
            AuditListData:{
                AuditList:[]
            },
            payMsg: {
                ID:0,
                FinanceId:'',
                Type:'',
                AccountId:'',
                OriginalMoney:0,
                CurrencyId:'',
                Rate:0,
                Fee:0,
                Name:'',
                CurrenName:'',
                Account:'',
                balance:'',
                allMoney:0,
                show: false,
            },
            CurrencyId:'',
          
            imageUrl:'',
            uploadImgList:[],
            coinGetList:[],
            GetAccountType:[],
            GetCashPoolList:[],
            payMsgList:[],
            accountList:[],
            FuImgList:[],
            picIsShow:false,
            picObj:'',
            initialIndex:0,
            widthSon:"100%",
            colorSon:"#ffffff",
            allMoney:0,
            returnCode:'',
            AccList:[],
            pageIndex:1,
            OrderID:null,
            OrderSource:null,
            enName:null,
            TCID:null,
            FrID:null,
            chosenPeople:[],
            peopleData:[],
            loadingPeople:false,
            tableShow:false,
            resultCode:null,
            fujianShow:true,
            sonTCIDList:null,
            tableShowTeam:false,
            SourceID:null,
            Callback:null,
          loading:false,
          GetFinancLogList:[],
          LogLoading:false,
          userId:0,
          RB_Post_Id: 0,
          ISGZ: false,
          isBook: true,
          choiceMsg:{
              Status:'1'
          },
          //是否显示原路退款选项
          isShowChoice:false,
          tableShowTuikuan:false,
          queryMsg:{
              pageIndex:1,
              pageSize:10,
              FinanceId:'',
              Type:2,
              currentPage:1,
              total: 0,
          },
          tuiDataList:[],
          currentMoney:0,
          benMoney:0,
          Ststus:0,
          chongDiShow: false,
          productionDate: [],
          ChongDiMsg: {
                QStartDate: '',
                QEndDate: '',
                TCID: '',
                ClientType: '',
                ClientID: '',
                sTradeDate: '',
                eTradeDate: '',
                Types: '',
                IsLeader: '',
            },
            shifouChongDi: false,
            ClientTypeList:[],
            ClientAccountList: [],
            HangingAccountList: [],
            checkedAll: false,
            ChongDiMoney: 0,
            ChongDiList: [],
            isChongDi: false,
            danjuType: '',
            showModel: false,
            MsgUrl: true,
            CostTypeState:false,
            LeadState:false,
            huijiShow:false,
            F_PayMoney_CapitalPool:false,
        }
    },
    components:{
        "my-FlowChartModule": myFlowChartModule,
        "my-Bill": myBill,
        "new-Bill":newBill,
        "my-RVB-Bill":myrbvBill,
        "my-GZ-Bill": myGZBill,
        'my-DJ-Bill': myDJBill,
        'TicketingModule':TicketingModule,
        'teamProductModule':teamProductModule,
        'SaleOrderModule':SaleOrderModule,
        'TicketFinace':TicketFinace,
        'my-HB-Bill':myhrBill,
        'ChongDiPage': ChongDiPage,
        'myGuanBill': myGuanBill,
        'myJiPiaoBill': myJiPiaoBill,
        'huijiBill': huijiBill,
        'czBillModule':czBillModule,

    },
    methods:{
        GetAuth() {
            var actionCode = this.$AuthCode.TeamShouZhi;
            this.CheckUserAuth(actionCode, res => {
            if (res.data.resultCode == 1 && res.data.data == 1) {
                this.TeamShouZhi = true;
            }
            });
            var actionCodeNew = this.$AuthCode.F_Disbursement_Schedule;
            this.CheckUserAuth(actionCodeNew, res => {
            if (res.data.resultCode == 1 && res.data.data == 1) {
                this.F_Disbursement_Schedule = true;
            }
            });
            
        },
        goPrintPageNew(type,id,Merge,OrderSource){
            if(type===1){
                let routeData = this.$router.resolve({
                    name: 'PrintPageN',
                    query: { type: type,id:id,isKehu:0,Merge:Merge,OrderSource:OrderSource?OrderSource:-1,Capital:1}
                });
                window.open(routeData.href, "_blank");
            }else{
                let routeData = this.$router.resolve({
                    name: 'PrintPageN',
                    query: { type: type,id:id,Merge:Merge,OrderSource:OrderSource?OrderSource:-1,Capital:1}
                });
                window.open(routeData.href, "_blank");
            }
        },
        goHand(type,GetDetail){
            if(type==1){
                this.$router.push({
                    name: 'TeamBalancePayment',
                    query: { 
                        id:GetDetail.TCID,
                        IsHaveAuth:true,
                        blank: "y", 
                        tab: "团队收支明细" 
                    }
                }); 
            }
            else{
                this.$router.push({
                    name: 'FinancialDocumentsDetail',
                    query: { 
                        id:GetDetail.ReFinanceId,
                        blank: "y", 
                        tab: "单据详情" 
                    }
                }); 
            }
        },
        //跳转至电商订单详情
        goOrderDetails(id){
            this.$router.push({
                name: 'EleBillDetail',
                query: { 
                    BillId:id,
                    blank: "y", 
                    tab: "账单详情" 
                }
            }); 
        },
        GourlCostType(path,num){
            this.$router.push({
                name: path,
                query: { 
                    blank: "y", 
                    EmployeeId:this.GetDetail.CreateBy,
                }
            });
            

            },
        Gourl(GetDetail){
            this.$router.push({
                name: 'CommissionDetail',
                query: { 
                    periods:GetDetail.Periods,
                    companyID:GetDetail.RB_Branch_Id,
                    blank: "y", 
                    tab: "提成详情" 
                }
            });
        },
        // 单选计算
        checkdIteam(item){
            if (item.checked) {
                if (item.HangingAccountsTypeStr === '收') {
                    this.ChongDiMoney += item.Money
                } else {
                    this.ChongDiMoney -= item.Money
                }
            } else {
                if (item.HangingAccountsTypeStr === '收') {
                    this.ChongDiMoney -= item.Money
                } else {
                    this.ChongDiMoney += item.Money
                }
            }
            
        },
        // 全选
        changeCheckedAll(){
            if (this.checkedAll) {
                let money = 0
                this.HangingAccountList.map(item=>{
                    item.checked = true
                    if (item.HangingAccountsTypeStr === '收') {
                        money += item.Money
                    } else {
                        money -= item.Money
                    }
                })
                this.ChongDiMoney = money
            } else {
                this.HangingAccountList.map(item=>{
                    item.checked = false
                })
                this.ChongDiMoney = 0
            }
        },
        GetHangingAccountList(){
            if (this.GetDetail.Type === 1 && this.ChongDiMsg.ClientType === '' && this.ChongDiMsg.ClientID === '') {
                this.$message.error('请选择客户类型!')
                return 
            }
            this.apipost('Financial_post_GetHangingAccountList', this.ChongDiMsg, res=>{
                if(res.data.resultCode == 1) {
                    let data = res.data.data;
                    data.map(item=>{
                        item.checked = false
                    })
                    this.HangingAccountList = data
                }
            }, null)
        },
        financeinfo_post_GetClientAccountList(t , sel){  //获取付款 对象类型  新增用
            let msg = {
                ID:0,
                Type:t,
                ObjID:0,
                CardNum:''
            }
            if (sel) {
                this.ChongDiMsg.ClientID='';
            }
            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.AccountHolder + `(${x.AccountAlias})`,
                            Nom:x.CardNum,
                            OpenBankName:x.OpenBankName,
                            ObjID:x.ObjID,
                        }
                        ClientAccountList.push(obj)
                    })
                    this.ClientAccountList = ClientAccountList;
                
                }
            }, err => {})
        },
        financeinfo_post_GetClientTypeList(){  // 获取对象类型
            this.apipost('financeinfo_post_GetClientTypeList',{}, res => {
                if(res.data.resultCode == 1) {
                    this.ClientTypeList = res.data.data;
                }
            }, err => {})
        },
        timeAdd(t){  // 日期格式
            if(t==1){     //制单日期
                if(!this.productionDate){
                    this.ChongDiMsg.QStartDate = '';
                    this.ChongDiMsg.QEndDate = '';
                    return
                }
                this.ChongDiMsg.QStartDate = this.productionDate[0];
                this.ChongDiMsg.QEndDate = this.productionDate[1];
            }
        },
        payMsgListShow: function (type, index) {
        if(this.choiceMsg.Status==1){
            this.payMsgList.forEach(x=>{
                x.show = false
            })
            if(type.Type==1){
                this.bankaccount_post_GetList()
            }
            if(type.Type==2){
                this.BankAccount_post_GetPlatformList()
            }
            if(type.Type==3){
                this.BankAccount_post_GetCashAccountList()
            }
            if(type.Type==4){
                this.BankAccount_post_GetCashPoolList()
            }
            this.payMsgList[index].show = true
        }
        },
        addList: function (type, index) { 
        if (type) {
            if (this.payMsgList[index].AccountId==='') return
            if (this.payMsgList[index].Type==='') return
            if (this.payMsgList[index].AccName==='') return
            if (this.payMsgList[index].Name==='') return
            this.payMsgList[index].show = false
        } else {
            if (this.payMsg.AccountId==='') return
            if (this.payMsg.Type==='') return
            if (this.payMsg.AccName==='') return
            if (this.payMsg.Name==='') return
            this.payMsgList.push(this.payMsg);
            this.payMsg = {
                ID:0,
                FinanceId:'',
                Type:'',
                AccName: '',
                AccountId:'',
                OriginalMoney:0,
                CurrencyId:'',
                Rate:0,
                Fee:0,
                Name:'',
                CurrenName:'',
                Account:'',
                balance:'',
                allMoney:0,
                show: false,
            }
        }
        let allMoney = 0
        this.payMsgList.forEach(x=>{
            allMoney+= x.allMoney;
            x.allMoney=(Math.round(x.allMoney * 100)) / 100;
        })
        if(allMoney.toString().split(".")[1]){
            let num=allMoney.toString().split(".")[1].length;
            if(num==3){
                allMoney=`${allMoney}1`;
            }    
        }
        this.allMoney = Math.round(allMoney * 100) / 100;
        
        },
        Financial_post_GetFinancLogList(){  // 获取单据日志
        if(this.checkboxShow) return
        this.LogLoading = true;
        this.apipost('Financial_post_GetFinancLogList',{ID:this.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 => {})
        },
        zanCun() {
          this.loading = true;
          let imgArr = [];
          this.uploadImgList.forEach(x=>{
            imgArr.push(x.src);
          })
          if(this.GetDetail.CashierDetail==1){
            this.AuditOrRefundMsg.SpecialNode=0;
          }
          this.AuditOrRefundMsg.tradeWays = this.payMsgList
          this.AuditOrRefundMsg.WorkFlowId=parseInt(this.ID)
          this.AuditOrRefundMsg.TemplateType=this.GetDetail.TemplateType
          this.AuditOrRefundMsg.Image=JSON.stringify(imgArr);
          this.apipost('Financial_post_AuditTemporary',this.AuditOrRefundMsg,r=>{
            if(r.data.resultCode==1){
              this.$message.success(r.data.message);
              // let _this = this;
              this.$router.push({name:'FinancialDocuments',query:{'returnCode':3,"pageIndex":this.pageIndex}})
              // setTimeout(function () {
              //   _this.MsgBus.$emit('msg');
              // },500)
            }else{
              this.resultCode = r.data.resultCode;
              this.$message.error(r.data.message);
            }
            this.loading = false;
          },null)
        },
        jumpCheZiPage(path, id){
            this.apipost('bus_post_GetCarfareTravelInfo', {TCID: id}, res=>{
                if(res.data.resultCode==1){
                    this.$router.push({
                        name: path,
                        query: { num: res.data.data, blank: 'y'}
                    })
                }
            }, null)
        },
        jumpPlanPage(path, id){
            this.apipost('dmcstatistics_post_GetTCIDsByOneTCID', {TCID: id}, res=>{
                if(res.data.resultCode==1){
                    this.$router.push({
                        name: path,
                        query: { id: res.data.data.TCIDs, isUpdate: false, blank: 'y'}
                    })
                }
            }, null)
        },
        jumpPage(path,id,type){
            if(type==1){
                // let routeData = this.$router.resolve({
                //     name: path,
                //     query: { TCIDList: id}
                // });
                // window.open(routeData.href, "_blank");
                this.$router.push({
                    name: path,
                    query: { tcmun: id,blank:'y'}
                })
            }else if(type==2){
                // let routeData = this.$router.resolve({
                //     name: path,
                //     query: { OrderSource: id.OrderSource,SourceID: id.SourceID}
                // });
                // window.open(routeData.href, "_blank");
                this.$router.push({
                    name: path,
                    query: {  OrderSource: id.OrderSource,SourceID: id.SourceID,blank:'y'}
                })
            }else if(type==3){
                // let routeData = this.$router.resolve({
                //     name: path,
                //     query: { OrderSource: id.OrderSource,SourceID: id.SourceID}
                // });
                // window.open(routeData.href, "_blank");
                this.$router.push({
                    name: path,
                    query: {  OrderSource: id.OrderSource,SourceID: id.SourceID,blank:'y'}
                })
            }else if(type==4){
                // let routeData = this.$router.resolve({
                //     name: path,
                //     query: { OrderSource: id.OrderSource,SourceID: id.SourceID}
                // });
                // window.open(routeData.href, "_blank");
                this.$router.push({
                    name: path,
                    query: {  OrderSource: id.OrderSource,SourceID: id.SourceID,blank:'y'}
                })
            }else if(type==5){
                // let routeData = this.$router.resolve({
                //     name: path,
                //     query: { id:id,OutBranchId:id.RB_Branch_Id}
                // });
                // window.open(routeData.href, "_blank");
                this.$router.push({
                    name: path,
                    query: {  id:id,OutBranchId:id.RB_Branch_Id,blank:'y'}
                })
            }else if(type==6){
                // let routeData = this.$router.resolve({
                //     name: path,
                //     query: { id:id,OutBranchId:id.RB_Branch_Id,'CloseIncomeBtn':true}
                // });
                // window.open(routeData.href, "_blank");
                this.$router.push({
                    name: path,
                    query: {  id:id,OutBranchId:id.RB_Branch_Id,'CloseIncomeBtn':true,blank:'y'}
                })
            }else if(type==7){
                // let routeData = this.$router.resolve({
                //     name: path,
                //     query: { id:id,isShow:false}
                // });
                // window.open(routeData.href, "_blank");
                this.$router.push({
                    name: path,
                    query: {  id:id,isShow:false,blank:'y'}
                })
            }else if(type==8){
                // let routeData = this.$router.resolve({
                //     name: path,
                //     query: {VisaID:id.SourceID,isFinacial:0}
                // });
                // window.open(routeData.href, "_blank");
                this.$router.push({
                    name: path,
                    query: { VisaID:id.SourceID,isFinacial:0,blank:'y'}
                })
            }
        },
       //跳转至手配详情
        jumpHotelContract(path,item){
            this.$router.push({
                name: path,
                query: { id:item.TCID,TCNUM:item.TCNUM,blank:'y'}
            })
        },
        zhuanBtn(){
            this.zhuanMsg.WorkFlowId = this.ID;
            if(!this.zhuanMsg.AuditEmId) return this.$message.error('请选择转交人');
            let msg = [];
                msg.push(this.zhuanMsg);
            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 => {});
        },
        remoteMethod(query) {
            if (query !== '') {
                this.loadingPeople = true
                this.apipost('admin_Get_Chat_All_SelectEmpName',{EmName:query}, res => {
                    if(res.data.resultCode == 1) {
                        this.peopleData = res.data.data
                    }
                    this.loadingPeople = false
                }, err => {})
            } else {
                this.peopleData = [];
            }
        },
        showUpLoadFile(i){  // 预览上传文件
            if(i.Type==3){
                this.picObj = i.Content;
                this.picIsShow= true;
            }else{
                if(i.Content.substring(i.Content.lastIndexOf('.')+1,i.Content.length).toUpperCase()=='PDF'){
                    this.previewPDF(i.Content)
                }else{
                   let dom = document.querySelector("#groupTourOrder_DownLoad");
                dom.href = i.Content;
                dom.click();
                    window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Content)
                }
            }
        },
        clearAccBank(type,index){  // 选择账户类型清空数据
            if (type) {
                this.payMsgList[index].Type = ''
                this.payMsgList[index].AccountId = '';
            } else {
                this.payMsg.Type = '';
                this.payMsg.AccountId = '';
            }
        },
        Calculation(type, index){  //  计算价格
            if (type) {
                this.payMsgList[index].Fee = isNaN(parseFloat(this.payMsgList[index].Fee))?0:parseFloat(this.payMsgList[index].Fee);
                this.payMsgList[index].Rate = isNaN(parseFloat(this.payMsgList[index].Rate))?0:parseFloat(this.payMsgList[index].Rate);
                this.payMsgList[index].OriginalMoney = isNaN(parseFloat(this.payMsgList[index].OriginalMoney))?0:parseFloat(this.payMsgList[index].OriginalMoney);
                let fee = this.payMsgList[index].Fee,
                    Rate = this.payMsgList[index].Rate==0?1:this.payMsgList[index].Rate,
                    Money = this.payMsgList[index].OriginalMoney;
                let NewRate=Rate;
                if(Rate.toString().split(".")[1] && Rate.toString().split(".")[1].length <5){
                    NewRate= Rate*100;
                } 
                let newmoney=Money*NewRate+fee;
                if(newmoney.toString().split(".")[1]){
                    let num=newmoney.toString().split(".")[1].length;
                    if(num==1){
                        newmoney=`${newmoney}0`;
                    }  
                }
                if(Rate.toString().split(".")[1] && Rate.toString().split(".")[1].length <5){
                    this.payMsgList[index].allMoney = Math.round( newmoney* 100) / 100 / 100;
                } else{
                    this.payMsgList[index].allMoney = Math.round( newmoney* 100) / 100;
                }
                
            } else {
                this.payMsg.Fee = isNaN(parseFloat(this.payMsg.Fee))?0:parseFloat(this.payMsg.Fee);
                this.payMsg.Rate = isNaN(parseFloat(this.payMsg.Rate))?0:parseFloat(this.payMsg.Rate);
                this.payMsg.OriginalMoney = isNaN(parseFloat(this.payMsg.OriginalMoney))?0:parseFloat(this.payMsg.OriginalMoney);
                let fee = this.payMsg.Fee,
                    Rate = this.payMsg.Rate==0?1:this.payMsg.Rate,
                    Money = this.payMsg.OriginalMoney;
                let NewRate=Rate;
                if(Rate.toString().split(".")[1] && Rate.toString().split(".")[1].length <5){
                    NewRate= Rate*100;
                }
                let newmoney=Money*NewRate+fee;
                if(newmoney.toString().split(".")[1]){
                    let num=newmoney.toString().split(".")[1].length;
                    if(num==1){
                        newmoney=`${newmoney}0`;
                    } 
                }
                if(Rate.toString().split(".")[1] && Rate.toString().split(".")[1].length <5){
                    this.payMsg.allMoney = Math.round( newmoney* 100) / 100 / 100; 
                }else{
                    this.payMsg.allMoney = Math.round( newmoney* 100) / 100; 
                }                                     
                                            

            }
        },
        setAccountName(i, type, index){
            this.accountList.forEach(x=>{
                if(x.ID==i){
                    if (type) {
                        this.payMsgList[index].Account = x.allName;
                        this.payMsgList[index].CurrenName =x.CurrencyName;
                        this.payMsgList[index].Rate = x.PayRate;
                        this.payMsgList[index].CurrencyId = x.CurrencyId;
                        this.payMsgList[index].balance = x.Initialbalance;
                        this.Calculation(1, index);
                    } else {
                        this.payMsg.Account = x.allName;
                        this.payMsg.CurrenName =x.CurrencyName;
                        this.payMsg.Rate = x.PayRate;
                        this.payMsg.CurrencyId = x.CurrencyId;
                        this.payMsg.balance = x.Initialbalance;
                        this.Calculation();
                    }
                }
            })
        },
        getRate(i,id){
            this.coinGetList.forEach(x=>{
                if(x.ID==id){
                    this.payMsg.Rate = x.Rate;
                    this.payMsg.CurrenName = x.Name;
                }
            })
        },
        BankAccount_post_GetAccountType(){ // 获取公司账户类型列表
            this.apipost('BankAccount_post_GetAccountType',{}, res => {
                if(res.data.resultCode == 1) {
                    let data = res.data.data;
                    this.GetAccountType = data;
                }
            }, err => {})
        },
        getAccountList(i,type,index){
            if (type) {
                this.payMsgList[index].AccountId = '';
                this.GetAccountType.forEach(x=>{
                    if(x.ID==i){
                        this.payMsgList[index].Name = x.Name;
                    }
                })
            } else {
                this.payMsg.AccountId = '';
                this.GetAccountType.forEach(x=>{
                    if(x.ID==i){
                        this.payMsg.Name = x.Name;
                    }
                })
            }
            if(i==1){
                this.bankaccount_post_GetList()
            }
            if(i==2){
                this.BankAccount_post_GetPlatformList()
            }
            if(i==3){
                this.BankAccount_post_GetCashAccountList()
            }
            if(i==4){
                this.BankAccount_post_GetCashPoolList()
            }
        },
        BankAccount_post_GetPlatformList(i){  //获取平台账户
            let msg = {
                BackId:0,
                TypeId:0,
                BranchId:-1,
                Alias:''
            }
            this.apipost('BankAccount_post_GetPlatformList',msg, res => {
                if(res.data.resultCode == 1) {
                    let data = res.data.data;
                    data.forEach(x=>{
                        x.allName = x.Alias+' '+x.PlatformNo;
                    })
                    this.accountList = data;
                }
            }, err => {})
        },
        BankAccount_post_GetCashAccountList(i){  // 获取现金账户
            let msg = {
                    TypeId:0,
                    BranchId:-1,
                    Alias:''
            }
            this.apipost('BankAccount_post_GetCashAccountList',msg, res => {
                if(res.data.resultCode == 1) {
                    let data = res.data.data;
                    data.forEach(x=>{
                        x.allName = x.Alias;
                    })
                    this.accountList = data;
                }
            }, err => {})
        },
        bankaccount_post_GetList(i){  // 获取银行账户
            this.apipost('bankaccount_post_GetList',{}, res => {
                if(res.data.resultCode == 1) {
                    let data = res.data.data;
                    data.forEach(x=>{
                        x.allName = x.Alias+' '+x.BackNo;
                    })
                    this.accountList = data;
                }
            }, err => {})
        },
        BankAccount_post_GetCashPoolList(){ // 获取资金池账
          let id = 0;
          this.AccList.forEach(x=>{
            if (x.Name === this.payMsg.AccName) {
              id = x.ID;
            }
          })
            this.apipost('BankAccount_post_GetCashPoolList',{TypeId:id,BranchId:-1,Alias:''}, res => {
                if(res.data.resultCode == 1) {
                    let data = res.data.data;
                    data.forEach(x=>{
                        x.allName = x.Alias;
                    })
                    this.accountList = data;
                }
            }, err => {})
        },
        financeinfo_post_GetList(){ // 获取币种
            this.apipost('financeinfo_post_GetList',{Name:''}, res => {
                if(res.data.resultCode == 1) {
                    this.coinGetList = res.data.data;
                }
            }, err => {})
        },
        FinancialFlowTemplate_post_GetProcessList(id,tid){
            this.apipost('FinancialFlowTemplate_post_GetProcessList',{ID:0,WorkFlowID:id,TemplateType:tid},res=>{
                if(res.data.resultCode==1){
                    res.data.data.forEach(y=>{
                        y.contentTips = y.AuditDescription+(y.AuditWay=="2"?'(会签)':'(或签)')
                    })
                     this.AuditListData.AuditList = res.data.data
                }else{}
            },err=>{})
        },
        payFun(){  //付款按钮
            this.payMsg.FinanceId=this.ID;
            if(this.payMsg.AccountId=='')return this.$message.error('请选择账户!');
            if(this.payMsg.OriginalMoney==0)return this.$message.error('请输入金额!');
            if(this.payMsg.CurrencyId=='')return this.$message.error('请选择币种!');
            if(this.payMsg.Rate==0)return this.$message.error('请输入汇率!');
            if(parseFloat(this.payMsg.OriginalMoney)!=parseFloat(this.GetDetail.Money))return this.$message.error('请核对金额!');
            this.apipost('Financial_post_SetTradeWay',this.payMsg, res => {
                if(res.data.resultCode == 1) {
                    this.payMsgList.push(this.payMsg);
                    this.payMsg = {
                            ID:0,
                            FinanceId:'',
                            Type:'',
                            AccountId:'',
                            OriginalMoney:0,
                            CurrencyId:'',
                            Rate:0,
                            Fee:0,
                            Name:'',
                            CurrenName:'',
                            Account:'',
                            balance:'',
                            allMoney:0,
                        }
                    let allPrice = 0;
                    this.payMsgList.forEach(x=>{
                        if(x.Fee==''){
                            x.Fee = 0;
                        }
                        allPrice = allPrice + parseFloat(x.OriginalMoney) + parseFloat(x.Fee);
                    })
                    this.allMoney = allPrice;
                    this.$message.success(res.data.message);
                }else{
                    this.$message.error(res.data.message);
                }
            }, err => {})
        },
        AuditOrRefund(){  // 保存
            let that=this;
            that.benMoney=Math.round(that.benMoney * 100) / 100;
            
            if(that.Ststus==1){
                if(this.AuditOrRefundMsg.Status=='5'){
                    if(that.GetDetail.AccountNumber && that.GetDetail.AccountNumber.indexOf("东航平台")!=-1){
                        if(this.allMoney==0){
                            this.Error("请将信息填写完整!")
                            return;
                        }else{
                            if(this.allMoney>parseFloat(that.benMoney) + 5 || this.allMoney<parseFloat(that.benMoney) - 5){
                                this.Error("请检查实付金额是否在范围内!")
                                return;
                            }
                        }
                    }else{
                        if(this.allMoney!=parseFloat(that.benMoney)){
                            this.Error("请检查金额是否一致!")
                            return;
                        }
                    }
                }
            }
        
        
            let imgArr = [];
            this.uploadImgList.forEach(x=>{
                imgArr.push(x.src);
            })
            if(this.GetDetail.IsHave==0&&this.AuditOrRefundMsg.Status=='5'){
                if(this.chosenPeople.length==0){
                    return this.$message.error('请选择下一步审核人')
                }
            }
            if(this.GetDetail.CashierDetail==1){
                this.AuditOrRefundMsg.SpecialNode=0;
            }
            if(this.payMsgList.length>0){
                this.AuditOrRefundMsg.tradeWays = this.payMsgList
            }else{
               this.AuditOrRefundMsg.tradeWays=[];
            }
            this.AuditOrRefundMsg.WorkFlowId=parseInt(this.ID)
            this.AuditOrRefundMsg.TemplateType=this.GetDetail.TemplateType
            this.AuditOrRefundMsg.Image=JSON.stringify(imgArr);
            this.AuditOrRefundMsg.emList = this.chosenPeople;
            // this.GetDetail.AuditSteps.forEach(x=>{
            //   if(x.SpecialNode === 1 && x.AuditWay === 3) {
            //     if (this.GetDetail.CashierDetail.length>0) {
            //       this.AuditOrRefundMsg.tradeWays = null;
            //     }
            //   }
            // });
            this.AuditOrRefundMsg.TradeDetailList = [];
            this.GetDetail.TradeDetailList.forEach(x=>{
                if(x.isChecked){
                    this.AuditOrRefundMsg.TradeDetailList.push(x);
                }
            })
            // if(this.allMoney!=this.currentMoney){
            //     this.Error('原路退款金额与单据总金额不一致');
            //     return;
            // }
            this.loading = true;
            if (this.shifouChongDi) {
                let idList = []
                this.HangingAccountList.map(item=>{
                    if (item.checked) {
                        idList.push(item.FdID)
                    }
                })
                this.AuditOrRefundMsg.FdIdList = idList
            }
            this.apipost('Financial_post_AuditOrRefund',this.AuditOrRefundMsg,res=>{
                this.loading = false;
                if(res.data.resultCode==1){
                    this.$message.success(res.data.message);
                    // let _this = this;
                    if (this.$route.query.ISGZ){
                        this.$router.push({name:'FinancialAccounting',query:{}})
                    } else {
                        this.$router.push({name:'FinancialDocuments',query:{'returnCode':3,"pageIndex":this.pageIndex}})
                    }
                    // setTimeout(function () {
                    //   _this.MsgBus.$emit('msg');
                    // },500)
                }else{
                    this.resultCode = res.data.resultCode;
                    this.$message.error(res.data.message);
                }
              this.loading = false;
            },err=>{})
        },
        ReturnBack(){
            if ( this.GetDetail.Type===7) {
                this.$router.push({name:'FinancialAccounting',query:{}});
            } else {
                this.$router.push({name:'FinancialDocuments',query:{"returnCode":this.returnCode,"pageIndex":this.pageIndex}});
            }
        },
        deleteImg(i){  // 删除
            this.uploadImgList.splice(i,1)
        },
        uploadFileBtn(file) { //上传
            if(file.file.size > 1024 * 1024 * 10) {
                this.$message.warning(this.$t('tips.wjdxbncgsz'))
                return
            }
            //  1 文档  2 数据 3 图片
            let typeArr=[
                {stringArr:'GIF|JPG|JPEG|PNG|BMP',type:3},
                {stringArr:'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',type:1},
            ]
            let ft=file.file.name.substring(file.file.name.lastIndexOf('.')+1,file.file.name.length).toUpperCase();
            let fileTypeNumber = 2;
            let typeOk  = false;
            typeArr.forEach(x=>{
                if(x.stringArr.indexOf(ft)!='-1')
                {
                  fileTypeNumber=x.type;
                  typeOk = true;
                }
            })
            if (!typeOk) return this.$message.error(this.$t('tips.qscWEfile'));
            let newArr = [];
            newArr.push(file.file)
            let path = "/Upload/Temporary/"
            this.$message.info(this.$t('tips.shangchuanzhong'))
            this.UploadSelfFileT(path, newArr, x => {
                let obj = {
                    src: this.domainManager().ViittoFileUrl + x.data.FilePath
                }
                this.uploadImgList.push(obj)
                this.$message.success(this.$t('tips.scchenggong'))
            }, 1);
        },
        handleAvatarSuccess(res, file) { //上传
            if(res.resultCode==1){
                var img_path = res.data.FullFilePath
                this.imageUrl = img_path
                let obj = {
                    src:img_path
                }
                this.uploadImgList.push(obj)
            }
        },
        inited (viewer){
          this.$viewer = viewer
        },
        showImg(obj, type){
            if (type) {
                let isExsit=false
                this.images.forEach(x=>{
                    if(x==obj)
                    isExsit=true
                })
                if(!isExsit) {
                    this.images.push(obj)
                } else {
                    this.$viewer.view(this.images.indexOf(obj))
                }
            } else {
                this.$viewer.view(this.images.indexOf(obj))
            }
          this.$viewer.show()
        },
        // 获取冲抵列表
        getChongDiList(data){
            this.danjuType = data.Type
            let cmd = 'Financial_post_GetHangingAccountList'
            if (data.Type === 7){
                cmd = 'Financial_post_GetHangingMatchFinanceList'
            }
            this.apipost(cmd,{FrID: data.FrID}, res => {
                if(res.data.resultCode == 1) {
                    let data = res.data.data;
                    this.ChongDiList = data;
                }
            }, err => {})
        },
        chongJudge(data){
        // 收支冲抵显示
            let p1 = false, p2 = false;
            data.AuditSteps.map(item=>{
                if (item.NextStep==1 && item.AuditType === 6 && item.Status==1) {
                    item.AuditRecordList.map(y=>{
                        if (y.AuditStatus === 1) {
                            p1 = true
                        } else {
                            p1 = false
                        }
                    })
                }
            })
            data.DetailList.map(item=>{
                if (item.CostTypeName === '挂账单冲抵') {
                    p2 = true
                }
            })
            if (p1 && p2) {
                this.chongDiShow = true;
            }
            if (p2  || data.Type === 7) {
                this.isChongDi = true;
                this.getChongDiList(data)
            }
        },
        Financial_post_GetDetail(id,t){  //获取单据详情
            let userInfo=this.getLocalStorage();
            this.apipost('Financial_post_GetDetail',{ID:id,Type:2}, res => {
                if(res.data.resultCode == 1) {
                    let data= res.data.data;
                    data.DetailList.forEach(x=>{
                        x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
                        x.Money = Math.round(x.Money * 100) / 100
                        x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
                        this.benMoney += parseFloat(x.Money);
                    })
                    data.Money = this.$commonUtils.addCommas( Math.round(data.Money * 100) / 100)
                    data.ChineseMoney = this.$commonUtils.changeMoneyToChinese(data.Money)
                    this.FinancialFlowTemplate_post_GetProcessList(data.FrID,data.TemplateType)
                    if(data.VorcherInos.length>0){
                        data.VorcherInos.forEach(x=>{
                            if(x.Type==3){
                                this.FuImgList.push(x.Content);
                              this.images.push(x.Content)
                            }
                        })
                    }
                    this.chongJudge(data)
                    this.GetDetail = data;
                    if(this.GetDetail.DetailList){
                        this.GetDetail.DetailList.forEach(item=>{
                            if(item.CostTypeName=="领队导游资金池领款"){
                                this.LeadState=true;
                            }
                        })
                    }
                    if(this.GetDetail.DetailList.length>0){
                        this.GetDetail.DetailList.forEach(item=>{
                            if(item.CostTypeName=="差旅费"){
                                this.CostTypeState=true;
                            }
                        })
                    }

                    this.showModel = true
                    this.FrID = data.FrID
                    this.ChongDiMsg.Types = ''
                    this.ChongDiMsg.ClientType = data.Type === 2 ? data.ClientType : ''
                    this.ChongDiMsg.ClientID = data.Type === 2 ? data.ClientID : ''
                    if (data.Type === 2) { 
                        this.financeinfo_post_GetClientAccountList(this.ChongDiMsg.ClientType)
                        this.GetHangingAccountList()
                    } 
                    let AuditSteps=this.GetDetail.AuditSteps;
                    let ChuNaShenHe =  false
                    let MsgUrl = false;
                    for(let i = 0; i < AuditSteps.length; i++) {
                        if(AuditSteps[i].NextStep==1 && AuditSteps[i].SpecialNode==2 && AuditSteps[i].Status==1){
                            ChuNaShenHe = true
                            this.Ststus = 1;
                            AuditSteps[i].AuditRecordList.forEach(audit=>{
                                if(audit.AuditStatus==2){
                                    this.Ststus=0;
                                    return
                                }
                            })
                        }
                        if(AuditSteps[i].NextStep==1){
                            AuditSteps[i].AuditRecordList.forEach(audit=>{
                                if(audit.AuditName==userInfo.emName){
                                    MsgUrl = true
                                    return
                                }
                            })
                            
                        }
                    }
                    this.MsgUrl = MsgUrl
                    // AuditSteps.forEach(item=>{
                    //     if(item.NextStep==1 && item.SpecialNode==2 && item.Status==1){
                    //         ChuNaShenHe = true
                    //         this.Ststus = 1;
                    //         item.AuditRecordList.forEach(audit=>{
                    //             if(audit.AuditStatus==2){
                    //                 this.Ststus=0;
                    //             }
                    //         })
                            
                    //     }
                    // })
                    if (this.GetDetail.DijieBathFinanceList.length > 0 ) {
                        if(ChuNaShenHe){
                            this.otherTable = false
                        }else{
                            this.otherTable = true
                        }
                    } else if (this.GetDetail.DijieBathFinanceList.length < 1 ) {
                        this.otherTable = false
                    } 
                    this.OrderID = this.GetDetail.OrderID;
                    this.OrderSource = this.GetDetail.OrderSource;
                    this.SourceID = this.GetDetail.SourceID;
                    this.Callback = this.GetDetail.Callback;
                    let lastSpecialNode = this.GetDetail.AuditSteps[this.GetDetail.AuditSteps.length-1].SpecialNode;
                    let lastStatus = this.GetDetail.AuditSteps[this.GetDetail.AuditSteps.length-1].Status;
                    if(lastSpecialNode==2&&lastStatus==1&&this.GetDetail.TradeDetailList.length>0){
                        this.isShowChoice = true;
                    }
                    //遍历默认不勾选
                    if(this.GetDetail.TradeDetailList&&this.GetDetail.TradeDetailList.length>0){
                        this.GetDetail.TradeDetailList.forEach(x=>{
                            x.isChecked = false;
                        })
                    }
                    // 拼接团号显示团信息
                    let str = '';
                    if(data.TCIDList.length>0){
                        data.TCIDList.forEach(x=>{
                            str = str + x + ',';
                        })
                    }
                        str = str.slice(0,str.length-1);
                    this.sonTCIDList = str==''?null:str;
                    if(data.URL){
                        // if(this.OrderSource==9){  // 国内票务订单
                        //     if(this.GetDetail.Type==2){
                        //         this.$router.push({name:data.URL+'1',query:{'FrID':this.FrID,id:this.ID}});
                        //     }
                        // }else if(this.OrderSource==10){ //销售订单
                        //     this.$router.push({name:data.URL,query:{'orderID':this.OrderID,'SourceID':this.SourceID}});
                        // }else if(this.OrderSource==4){  //机票订单
                        //     this.$router.push({name:data.URL+'1',query:{'SourceID':this.SourceID,'Callback':this.Callback,id:this.ID}});
                        // }
                    }
                }
            }, err => {})
        },
        GetSupperOrderEditAuth() {
            var actionCode = this.$AuthCode.F_PayMoney_CapitalPool;
            this.CheckUserAuth(actionCode, res => {
            if (res.data.resultCode == 1 && res.data.data == 1) {
                this.F_PayMoney_CapitalPool = true;
            }
            });
        },
        AccountType_post_GetList(){  //获取账户类型下拉
            this.apipost('AccountType_post_GetList',this.queryAccMsg,res=>{
                if(res.data.resultCode==1){
                    let data=res.data.data;
                    if(this.F_PayMoney_CapitalPool || this.RB_Post_Id==5 || this.userId==1648 || this.userId==1918 || this.userId==2113 || this.userId==2424){
                        this.AccList = res.data.data;
                    }else{
                        data.forEach(item=>{
                            if(item.Name!="公社资金池" && item.Name!="水口资金池" && item.Name!="橡胶资金池"  && item.Name!="老挝购物店资金池"){
                                    this.AccList.push(item);
                                }
                            })
                    }
                    // if(this.RB_Post_Id!=5&&this.userId!=1648){
                    //     if(this.userId==1918 || this.userId==2113 || this.userId==2424){
                    //         this.AccList = res.data.data;
                    //     }else{
                    //         data.forEach(item=>{
                    //             if(item.Name!="公社资金池" && item.Name!="水口资金池" && item.Name!="橡胶资金池"  && item.Name!="老挝购物店资金池"){
                    //                 this.AccList.push(item);
                    //             }
                    //         })
                    //     }
                    // }else{
                    //     this.AccList = res.data.data;
                    // }
                }else{
                    this.$message.error(res.data.message);
                }
            },err=>{})
        },
        //点击操作
        changeStatus(subItem,index){
            this.$forceUpdate();
            if(!subItem.isChecked){
                this.payMsgList.forEach((x,index)=>{
                    if(x.Trade_Order==subItem.Trade_Order){
                        this.payMsgList.splice(index,1);
                    }
                })
            }
        },
        addPayList(subItem,index){
            if(subItem.RefundMoney>subItem.CanRefundMoney){
                subItem.RefundMoney=0;
                this.Error('退款金额不能大于可退金额');
                return;
            }
            var payMsg = {
                AccName: subItem.AccountTypeName,
                Account: subItem.BackNo,
                AccountId: subItem.AccountId,
                CurrenName: "人民币",
                CurrencyId: 1,
                Fee: 0,
                FinanceId: "",
                ID: 0,
                Name: subItem.BankName,
                OriginalMoney: subItem.RefundMoney,
                Rate: 1,
                Type: subItem.Type,
                allMoney: subItem.RefundMoney,
                balance: 0,
                isChecked:subItem.isChecked,
                Trade_Order:subItem.Trade_Order,
                show: false
            }
            if(this.payMsgList.length==0){
                this.payMsgList.push(payMsg);
            }else{
                var isPush =false;
                this.payMsgList.forEach(x=>{
                    if(x.Trade_Order==subItem.Trade_Order){
                        isPush=true;
                        x.OriginalMoney = subItem.RefundMoney;
                        x.allMoney = subItem.RefundMoney;
                    }
                })
                if(!isPush){
                    this.payMsgList.push(payMsg);
                }
            }
            let total = 0;
            this.payMsgList.forEach(x=>{
                total +=parseFloat(x.OriginalMoney);
            })
            this.allMoney = Math.round(total * 100) / 100
        },
        //获取列表
        getTuikuan(){
            this.apipost('OnlinePay_get_GetOrderPayMoneyInfo',this.queryMsg,res=>{
                if(res.data.resultCode==1){
                    this.tuiDataList = res.data.data.pageData;
                    this.queryMsg.total = res.data.data.count;
                }else{

                }
            },err=>{})
        },
        handleCurrentChange(val) {
            this.queryMsg.pageIndex = val;
            this.getTuikuan();
        },
        headCall: function (msg) { //回调方法,接收子组件传的参数
            this.currentMoney = msg;
        },
        goUrlApplication(path, id) {
            this.$router.push({
                name: path,
                query: {
                    id: id,
                    blank: "y"
                }
            });
        },
        goUrl(path, id,OrderId) {
            this.$router.push({
                name: path,
                query: {
                    id: id,
                    orderId:OrderId,
                    blank: "y"
                }
            });
        },
        goInves(path,TCID){
            this.$router.push({
                name: path,
                query: {
                    TCID:TCID,
                    blank:'y'
                }
            });
        },
        goGuideAccount(path,ClientID){
         if(ClientID==0){
             this.Error('临时导游,无往来');
             return;
         }
         this.$router.push({
            name: path,
            query: {
                ClientID:ClientID,
                blank:'y'
            }
         });
        },
    },created(){
        if(this.$route.query.pageIndex){
            this.pageIndex = this.$route.query.pageIndex;
        }
        this.ISGZ = this.$route.query.ISGZ ? true : false;
        let userinfo = this.getLocalStorage();
        let ActionMenuCode=userinfo.ActionMenuCode;
      if(ActionMenuCode.indexOf('F_Update_KJCostType')!=-1){
        this.huijiShow=true;
      }
      this.ID = this.$route.query.id;
    },mounted(){
        let userInfo=this.getLocalStorage();
        this.userInfo=this.getLocalStorage();
        this.GetAuth();
        this.qjGroupId=this.QjGroupId();
        this.userId = userInfo.EmployeeId;
        this.RB_Post_Id = userInfo.RB_Post_Id;
        
        this.queryMsg.FinanceId = this.$route.query.id;
        this.financeinfo_post_GetClientTypeList();
        this.Financial_post_GetDetail(this.ID);
        this.financeinfo_post_GetList();
        this.BankAccount_post_GetAccountType();
        this.AccountType_post_GetList();
        this.getTuikuan();
        if(this.$route.query.Conditon){
            this.returnCode = this.$route.query.Conditon;
        }
        this.GetSupperOrderEditAuth();
    },
    watch : {
        'choiceMsg.Status':function(val) {
            if(val==1){
                this.payMsgList.forEach((x,index)=>{
                    if(x.isChecked){
                        this.payMsgList.splice(index,1);
                    }
                })
                this.AuditOrRefundMsg.IsRefundAutoGoBack=0;
            }else{
                this.AuditOrRefundMsg.IsRefundAutoGoBack=1;
            }
        },
        'AuditOrRefundMsg.Status':function(val){
            if(val==3){
                this.payMsgList.forEach((x,index)=>{
                    if(x.isChecked){
                        this.payMsgList.splice(index,1);
                    }
                })
            }
        }
    }

}
</script>