<style scoped> /deep/.el-table th.el-table__cell{ background-color: #E6E6E6; } /deep/.page_fnDm .el-range-editor.el-input__inner{ width: 100% !important; } </style> <style> ._addChuNa_tit{color: gray;margin-bottom: 10px;} ._addChuNa_tit span{ color:#333333} .page_RecPayQuery ._addUpload_box{ display: block; margin-top: 20px; width:590px; } .page_RecPayQuery ._addUpload_box>div{ float: left; width: 138px; height: 92px; border: 1px dashed rgba(210,210,210,1); border-radius: 2px; cursor: pointer; padding: 5px; margin:0 10px 10px 0; position: relative; } .page_RecPayQuery .el-upload-dragger { width: 126px!important; height: 80px!important; } .page_RecPayQuery ._addUpload_box .icon-guanbi1 { font-size: 12px; color: white; display: inline-block; margin-left: 15px; position: absolute; right: -6px; top: -9px; background-color: #f56c6c; border-radius: 50%; height: 20px; width: 20px; text-align: center; line-height: 20px; } .page_RecPayQuery ._addUpload_box .icon-guanbi1:hover { font-size: 12px; color: #c94052; } </style> <template > <div class="page_fnDm page_RecPayQuery" @keyup.enter="resetPageIndex()"> <div class="query-box" style="margin-bottom: 0px;"> <el-form class="_info_box clearfix" label-width="110px" :model="msg" :rules="rules" ref="ruleForm"> <el-row style="padding:15px 20px 0 0;"> <el-col :span="4"> <el-form-item :label="$t('fnc.danhao')"> <el-input placeholder="" v-model="msg.FrID" @keyup.native="checkInteger(msg,'FrID')" clearable></el-input> </el-form-item> </el-col> <el-col :span="4"> <el-form-item :label="$t('visa.v_tuanhao')" prop="TCNUM"> <el-input v-model="msg.TCNUM" :placeholder="$t('visa.v_shurutuanhao')"></el-input> </el-form-item> </el-col> <el-col :span="4"> <el-form-item :label="$t('scen.sc_temID')"> <el-input v-model="msg.TCID" clearable></el-input> </el-form-item> </el-col> <el-col :span="4"> <el-form-item :label="$t('sm.company')"> <el-select filterable v-model='msg.RB_Branch_Id' class=""> <el-option :value="-1" :label="$t('pub.unlimitedSel')"></el-option> <el-option v-for='item in CompanyList' :label='item.BName' :value='item.Id' :key='item.Id'> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="4"> <el-form-item :label="$t('leader.leader_leaderGuid')" prop="RemitterName"> <el-input v-model="msg.RemitterName" class="" :placeholder="$t('objFill.qingsrlddymc')"></el-input> </el-form-item> </el-col> <el-col :span="4"> <el-form-item :label="$t('fnc.shzhuangtai')"> <el-select filterable v-model='msg.Status' class=""> <el-option key="-1" value="-1" :label="$t('pub.unlimitedSel')"></el-option> <el-option key="0" value="0" :label="$t('fnc.zancun')"></el-option> <el-option key="1" value="1" :label="$t('fnc.a_shezhong')"></el-option> <el-option key="2" value="2" :label="$t('visa.v_tongguo')"></el-option> <el-option key="3" value="3" :label="$t('fnc.bohui')"></el-option> <el-option key="4" value="4" :label="$t('active.cl_zuofei')"></el-option> <el-option key="5" value="5" :label="$t('fnc.a_cnzancun')"></el-option> </el-select> </el-form-item> </el-col> <template v-if="!heightQueryBox"> <el-col :span="5"> <el-form-item :label="$t('scen.sc_ftTime')"> <el-date-picker class="h34" v-model="missionDate" @change="timeAdd()" type="daterange" value-format="yyyy-MM-dd"> </el-date-picker> <!-- <StartDateLimit :clearable="false" :dateTime="missionDate" @change="(startDate,endDate)=>{msg.QStartDate=startDate,msg.QEndDate=endDate}"></StartDateLimit> --> </el-form-item> </el-col> <el-col :span="5"> <el-form-item :label="$t('fnc.jiaoyiriqi')"> <el-date-picker class="h34" v-model="tradeDate" @change="timeTradeAdd()" type="daterange" value-format="yyyy-MM-dd"> </el-date-picker> </el-form-item> </el-col> <el-col :span="4"> <el-form-item :label="$t('objFill.settlementstatus')"> <el-select v-model='msg.IsSelectNormal'> <el-option v-for='item in SelectNormalList' :label='item.Name' :value='item.Id' :key='item.Id'> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="2"> <el-form-item :label="$t('objFill.caiwubz')"> <el-checkbox v-model="msg.IsAirTicketSelect" true-label="1" false-label="0"></el-checkbox> </el-form-item> </el-col> </template> <el-col :span="8"> <span style="margin-left: 20px; font-size: 12px;">{{$t('objFill.hebingjsbzts')}}</span> </el-col> </el-row> </el-form> <ul class="clearfix"> <li class="hight_query"> <!-- <span style="font-size: 13px;color: red;cursor: pointer;"> <em @click.stop="heightQueryBox=!heightQueryBox">{{$t('visa.v_gjchaxun')}} <i class="iconfont icon-gengduo" style="font-size: 12px;"></i></em> </span> --> <button class="hollowFixedBtn" @click="resetPageIndex()">{{$t('pub.searchBtn')}}</button> <el-button :loading="loadingDC" class="normalBtn" @click="method5()">{{$t('visa.v_daochu')}}</el-button> <button class="normalBtn" @click="GenerateDocuments()">{{$t('objFill.hebingshdj')}}</button> </li> </ul> </div> <div style="display: flex;flex-wrap: nowrap; padding: 10px;"> <div style="display: flex;flex-wrap: wrap;"> <span>{{$t('objFill.selecteddata')}}:</span> <template v-if="multipleSelection.length>0"> <el-tag size="mini" closable style="margin-right: 5px;margin-bottom: 5px;" v-for="(x,index) in multipleSelection" :key="x.FrID" @close="handleClose([multipleSelection[index]])" :type="x.Type==2?'danger':'success'"> {{x.FrID}}/{{x.DetailList[0].CostTypeName}}:{{x.WBMoney}} </el-tag> </template> <template v-else> {{$t('fnc.no')}} </template> </div> <div style="margin-left: 20px;flex-shrink: 0;"> {{$t('fnc.a_zongjine')}}:{{getMoney()}} </div> </div> <div class="_fnDm_content" v-loading='loading'> <el-table ref="multipleTable" :data="DataList" tooltip-effect="dark" style="width: 100%" row-key="FrID" @selection-change="handleSelectionChange" > <el-table-column type="selection" :selectable="selectable" width="55" :reserve-selection="true"> </el-table-column> <el-table-column :label="$t('fnc.danhao')" width="80"> <template slot-scope="scope"> <span style="cursor: pointer;color: #00C6FF;" @click="openDetails(scope.row.FrID)">{{ scope.row.FrID }}</span> </template> </el-table-column> <el-table-column :label="$t('sm.company')" width="80"> <template slot-scope="scope"> {{ scope.row.BranchName }} </template> </el-table-column> <el-table-column prop="name" :label="$t('fnc.djleixing')" width="80"> <template slot-scope="scope"> <span v-if="scope.row.Type==2" style="display: inline-block; padding: 2px 8px; color: white; background-color: #E95252; line-height: 16px; border-radius: 4px;"> {{$t('restaurant.res_outcome')}} </span> <span v-if="scope.row.Type==1" style="display: inline-block; padding: 2px 8px; color: white; background-color: #2BB87C; line-height: 16px; border-radius: 4px;"> {{$t('restaurant.res_income')}} </span> <span v-if="scope.row.Type==5" style="display: inline-block; padding: 2px 8px; color: white; background-color: #2BB87C; line-height: 16px; border-radius: 4px;"> {{$t('fnc.yingshou')}} </span> <span v-if="scope.row.Type==6" style="display: inline-block; padding: 2px 8px; color: white; background-color: #E95252; line-height: 16px; border-radius: 4px;"> {{$t('fnc.yingfu')}} </span> <el-tooltip class="item" effect="dark" :content="$t('ground.zjiatk')" placement="top"> <span v-if="scope.row.OtherType == 1" style="width: 20px; height: 20px; display: inline-block; border-radius: 50%; text-align: center; line-height: 20px; color: #E95252; border: 1px solid #E95252; font-size: 12px;" class="zhuiClass">{{$t('objFill.chase')}}</span> </el-tooltip> </template> </el-table-column> <el-table-column prop="" :label="$t('hotel.hotel_corrlelatition')" show-overflow-tooltip width="200"> <template slot-scope="scope"> <template v-if="scope.row.TCIDAndTCNUMList.length>0"> <p class="_TCIDAndTCNUMList" style="display: flex;"> <!-- <span>{{$t('visa.v_tuanhao')}}:</span> --> <template v-if="scope.row.TCIDAndTCNUMList&&scope.row.TCIDAndTCNUMList.length>0"> <p><span v-for="(i,ix) in scope.row.TCIDAndTCNUMList">{{i.TCNUM}}({{i.TCID}}) <template v-if="i.DMCNum&&i.DMCNum!=''">{{i.DMCNum}}</template> <span v-if="ix!=scope.row.TCIDAndTCNUMList.length-1">,</br></span></span></p> </template> <template v-else> <span>{{$t('fnc.no')}}</span> </template> </p> <p v-if="scope.row.OrderID>0 && scope.row.OrderSource==8">{{$t('fnc.danhao')}}:<span class="">{{scope.row.OrderID}}</span></p> </template> <template v-else-if="scope.row.OrderSource==8 && scope.row.TCIDAndTCNUMList.length==0"> <p class="_TCIDAndTCNUMList">{{$t('tips.zwtqxinxi')}}</p> </template> <template v-else-if="scope.row.OrderSource==4 && scope.row.TCIDAndTCNUMList.length==0"> <p class="_TCIDAndTCNUMList" style="text-decoration: underline;cursor: pointer;" @click="goTicketPage(rowData)">{{$t('fnc.jpbianhao')}}:{{scope.row.SourceID}}</p> <p style="margin-top: 5px;">{{$t('advmanager.v_line')}}:<span>{{scope.row.LineName?scope.row.LineName:$t('tips.jpswxzxianlu')}}</span></p> </template> <template v-else-if="scope.row.OrderSource==9 && scope.row.TCIDAndTCNUMList.length==0"> <p class="_TCIDAndTCNUMList">{{$t('fnc.gnjpqishu')}}:{{scope.row.Term}}</p> </template> <template v-else-if="scope.row.OrderSource==10 && scope.row.TCIDAndTCNUMList.length==0"> <p class="_TCIDAndTCNUMList">{{$t('tips.qzcpbianhao')}}:{{scope.row.SourceID}}</p> </template> <template v-else-if="scope.row.OrderSource==0 || scope.row.OrderSource==null"> <p class="_TCIDAndTCNUMList">{{ scope.row.BranchName }}-{{scope.row.DepartName}} </p> </template> <template v-else> <p class="_TCIDAndTCNUMList">{{$t('pub.noMsg')}}</p> </template> </template> </el-table-column> <el-table-column prop="" :label="$t('fnc.feiyongleixing')" show-overflow-tooltip width="170"> <template slot-scope="scope"> <template v-for="(s,si) in scope.row.CostTypeList"> <span style="background-color: rgba(64,158,255,.1);display: inline-block;padding: 0 5px;height: 22px;line-height: 20px;font-size: 12px;color: #646464;border-radius: 4px;box-sizing: border-box;border: 1px solid rgba(64,158,255,.2);white-space: nowrap;margin-bottom: 4px;">{{s}}</span></br> </template> </template> </el-table-column> <el-table-column prop="" :label="$t('tips.jiaoyifangshi')" show-overflow-tooltip :width="msg.IsSelectNormal==2?300:200"> <template slot-scope="scope"> <div> <template v-if="scope.row.TradeWayList&&scope.row.TradeWayList.length>0"> <div class="_TradeWayList" v-for="(tw,twIn) in scope.row.TradeWayList" style="line-height: normal !important;padding: 5px 10px;background-color: #EEEEEE;border-radius: 4px;width:230px"> <p><span style="font-weight: bold;color:#333333">{{tw.Alias}}</span><span class="_bank_name" style="height:20px;;display: inline-block;background-color: #333333;color: white;padding: 2px 4px;border-radius: 4px;margin-left:10px;"> {{scope.row.TradeWayList[0].TypeName}}</span> <span style="height:20px;display: inline-block;background-color: #333333;color: white;padding: 2px 4px;border-radius: 4px;margin-left:10px;" :style="{'background-color':tw.AccountType=='私'?'#2AAEF2':'#FF9C01'}">{{tw.AccountType==""?$t('fnc.no'):tw.AccountType}}</span> </p> <p style="color:#333333">{{tw.BankNo}}</p> </div> </template> <template v-else> <div class="_pad5"> - </div> </template> </div> </template> </el-table-column> <el-table-column prop="" :label="$t('fnc.jiaoyiriqi')" show-overflow-tooltip width="100"> <template slot-scope="scope"> {{scope.row.TradeDate}} </template> </el-table-column> <el-table-column prop="" :label="$t('objFill.originalamount')" show-overflow-tooltip width="100"> <template slot-scope="scope"> {{scope.row.WBMoney}} </template> </el-table-column> <el-table-column prop="" :label="$t('objFill.yuanbibz')" show-overflow-tooltip width="100"> <template slot-scope="scope"> {{scope.row.CurrencyName}} </template> </el-table-column> <el-table-column prop="" :label="$t('fnc.bwbjine')" show-overflow-tooltip width="100"> <template slot-scope="scope"> {{scope.row.Money}} </template> </el-table-column> <el-table-column prop="" :label="$t('fnc.fkduixiang')" show-overflow-tooltip> <template slot-scope="scope"> <span style="color: gray">{{scope.row.Type==2&&scope.row.ClientTypeName?scope.row.ClientTypeName+':':$t('fnc.huikuanren')+':'}}</span><span>{{scope.row.RemitterName}}</span> </template> </el-table-column> <el-table-column prop="" :label="$t('fnc.zdrenyuan')" show-overflow-tooltip width="170"> <template slot-scope="scope"> <div>{{scope.row.EmName}}<br/>{{scope.row.CreateDate}}</div> </template> </el-table-column> <el-table-column prop="" :label="$t('fnc.dqzhuangtai')" show-overflow-tooltip width="120"> <template slot-scope="scope"> <i v-if="scope.row.Status==1" class="iconfont icon-daiqueren" style="color: #4BCA81"></i> <i v-if="scope.row.Status==4" class="iconfont icon-yiquxiao" style="color: #4BCA81"></i> <i v-if="scope.row.Status==2" class="iconfont icon-yiqueren" style="color: #959595"></i> <i v-if="scope.row.Status==3" class="iconfont icon-shenhebohui" style="color: #E95252"></i> <i v-if="scope.row.Status==0" class="iconfont icon-zancun" style="color: #FF9C01"></i> <span slot="reference" class="text_d _font_init">{{scope.row.StatusStr}}</span> </template> </el-table-column> <el-table-column v-if="msg.IsAirTicketSelect=='1'" prop="" :label="$t('objFill.caiwubz')" width="160"> <template slot-scope="scope"> <div>{{scope.row.Remark}}</div> <template v-if="scope.row.vorcherInos"> <div style="display: flex;flex-direction: row;flex-wrap: wrap;"> <template v-for="(vitem,index) in scope.row.vorcherInos"> <el-image v-if="vitem.Type==3" style="width: 30px; height: 30px;margin-right: 3px;" :src="vitem.Content" :preview-src-list="scope.row.srcList" fit="cover"> </el-image> <div v-if="vitem.Type==1" style="width: 30px; height: 30px;text-align: center;line-height: 30px;background: #eee;margin-right: 3px;"> <div class="iconfont _wenjian_P" :class="vitem.Content.substring(vitem.Content.lastIndexOf('.')+1,vitem.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'" @click="showUpLoadFile(vitem.Content)"> </div> </div> </template> </div> </template> </template> </el-table-column> </el-table> <div style="padding-bottom:15px"> <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChanges" layout="total,sizes,prev, pager, next, jumper" :page-sizes="[8,20,50,70,100,200]" :page-size="msg.pageSize" :current-page.sync="currentPage" :total='total'> </el-pagination> </div> </div> <el-dialog custom-class='w750 height="34px"' :title="$t('fnc.a_hbdanju')" :visible.sync="addChuNa" center :before-close="initAddChuNa" v-loading="allLoading"> <p class="_addChuNa_tit"><span>{{multipleSelection.length}}</span>{{$t('fnc.a_hbtips')}} <span>{{ getMoney() }}</span> {{$t('fnc.a_hbtips2')}} <span>{{ getMoney2() }}</span> </p> <table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;text-align: center; width: 100%;"> <template> <tr > <th height="34px">{{$t('fnc.zhfenlei')}}</th> <th height="34px">{{$t('fnc.fkfangshi')}}</th> <th height="34px">{{$t('fnc.acc')}}</th> <th height="34px">{{$t('fnc.jine')}}</th> <th height="34px" width="70">{{$t('hotel.hotel_Currency')}}</th> <th height="34px" width="50px">{{$t('hotel.hotel_CurrentRate')}}</th> <th height="34px" width="100px">{{$t('fnc.a_zongjine')}}</th> </tr> <template v-for="(item,index) in payMsgList"> <tr v-if="!item.show" @click="payMsgList[index].show=true"> <td height="34px">{{item.AccName}}</td> <td height="34px">{{item.Name}}</td> <td height="34px">{{item.Account}}</td> <td height="34px">{{moneyFormat(item.OriginalMoney)}}</td> <td height="34px">{{item.CurrenName}}</td> <td height="34px">{{item.Rate}}</td> <td height="34px">{{moneyFormat(item.allMoney)}}</td> </tr> <tr v-else class="_show_class"> <td> <el-select filterable v-model='item.AccName' @change="clearAccBank()" class=" _border_b_1"> <el-option v-for='i in AccListT' :label='i.Name' :value='i.Name' :key='i.ID'> </el-option> </el-select> </td> <td> <el-select filterable v-model='item.Type' @change="getAccountList(item.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='item.AccountId' :placeholder="$t('rule.qxzzhanghu')" @change="setAccountName(item.AccountId,1,index)" 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> <el-input v-model="item.OriginalMoney" @change="Calculation(1,index)" @blur="item.show=false,CalculationMoney()" :placeholder="$t('rule.qsrjine')" type="number" class=" _border_b_1"></el-input> </td> <td> <p>{{item.CurrenName}}</p> </td> <td> <el-input v-model="item.Rate" @blur="item.show=false,CalculationMoney()" @change="Calculation(1,index)" type="number" class=" _border_b_1"></el-input> </td> <td>{{moneyFormat(item.allMoney)}} <i @click="deleteRow(item,index),CalculationMoney()" class="_delete_row iconfont icon-img_delete_small"></i></td> </tr> </template> <tr> <td> <el-select filterable v-model='payMsg.AccName' @change="clearAccBank(),addList()" class=" _border_b_1"> <el-option v-for='i in AccListT' :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),addList()" 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="$t('rule.qxzzhanghu')" @change="setAccountName(payMsg.AccountId,2),addList()" 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> <el-input v-model="payMsg.OriginalMoney" @change="Calculation(2)" @blur="addList()" :placeholder="$t('rule.qsrjine')" type="number" class=" _border_b_1"></el-input> </td> <td> <p>{{payMsg.CurrenName}}</p> </td> <td> <el-input v-model="payMsg.Rate" @blur="addList()" @change="Calculation(2)" type="number" class=" _border_b_1"></el-input> </td> <td>{{moneyFormat(payMsg.allMoney)}}</td> </tr> </template> <tr> <td height="34px">{{$t('fnc.a_zongjine')}}</td> <td height="34px" colspan="7"> <el-input v-model="listAllMoney" type="number" :placeholder="$t('rule.qsrzjine')" class=" _border_b_1"></el-input> <!--{{moneyFormat(listAllMoney)}}--> </td> </tr> <tr v-if="BillType===2"> <td>{{$t('fnc.jiaoyiriqi')}}</td> <td colspan="6"> <el-date-picker class="width100b" v-model="addMsg.TradeDate" type="date" value-format="yyyy-MM-dd" :placeholder="$t('admin.admin_choDate')"> </el-date-picker> </td> </tr> <tr v-if="BillType===1"> <td>{{$t('fnc.huikuanren')}}</td> <td colspan="2"> <el-input v-model="addMsg.RemitterName" type="text" class=" _border_b_1"></el-input> </td> <td>{{$t('fnc.jiaoyiriqi')}}</td> <td colspan="3"> <el-date-picker class="width100b" v-model="addMsg.TradeDate" type="date" value-format="yyyy-MM-dd" :placeholder="$t('admin.admin_choDate')"> </el-date-picker> </td> </tr> </table> <el-form label-width="110px"> <el-row> <el-col :span="12" :gutter="35"> <el-form-item :label="$t('objFill.shangchuanpz')"> <div class="_addUpload_box clearfix" > <template v-for="(file,fIndex) in saveMsg"> <div v-if="file.Type==3"> <div style="width:100%;height:100%;overflow: hidden;"> <img style="width: 100%; height: 100%;" :src="file.Url?file.Url:file.Content" @click="showUpLoadFile(file)"> </div> <span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span> </div> <div v-if="file.Type==1"> <div class="iconfont " :class="file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'" @click="showUpLoadFile(file)"> </div> <span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span> </div> <div v-if="file.Type==2"> <div class="iconfont icon-excel" @click="showUpLoadFile(file)"> </div> <span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span> </div> </template> <div class="_pic_upload"> <el-upload drag :http-request="uploadFileBtn" :multiple="true" :show-file-list="false" action=""> <i class="el-icon-plus avatar-uploader-icon"></i> <div class="el-upload__text">{{$t('active.ld_djscwj')}}</div> </el-upload> </div> </div> </el-form-item> </el-col> </el-row> </el-form> <div slot="footer" class="dialog-footer"> <button class="normalBtn" type="primary" @click="submitAddChuNa">{{$t('pub.saveBtn')}}</button> <button class="hollowFixedBtn" @click="initAddChuNa">{{$t('pub.cancelBtn')}}</button> </div> </el-dialog> </div> </template> <script> import Vue from 'vue' import StartDateLimit from '../../public/StartDateLimit.vue'; export default { components: {StartDateLimit}, data(){ return{ addChuNa: false, allLoading: false, multipleSelection: [], SelectNormalList:[ {Name: this.$t('pub.unlimitedSel'),Id:'0'}, {Name: this.$t('objFill.zhikanwjs'),Id:'1'}, {Name: this.$t('objFill.zhikayjs'),Id:'2'}, ], rules: { TCNUM: [ // { required: true, message: '请输入团队号或者', trigger: 'blur' }, ], RemitterName: [ // { required: true, message: '请输入领队/导游名称', trigger: 'blur' }, ], }, msg:{ pageIndex:1, pageSize: 8, TCNUM:'', TCID: '', FrID:'', RB_Branch_Id:-1, RemitterName:'', QStartDate:'', QEndDate:'', Status:'-1', IsSelectNormal: '1',//0不限 1只看未计算 2只看已结算 sTradeDate:'', eTradeDate:'', IsAirTicketSelect:'0' }, getCompanyMsg:{ // 公司 RB_Group_Id:'0', Status:'0', }, DataList:[], accountList:[], CompanyList:[], missionDate:[], tradeDate:[], GetAccountType:[], loading:false, currentPage:1, total:0, heightQueryBox:false, loadingDC: false, BillType:1, //1 收 2 支 , payMsgList:[], payMsg: { ID:0, FinanceId:'', Type:'', AccountId:'', OriginalMoney:0, CurrencyId:'', Rate:0, Fee:0, Name:'', CurrenName:'', Account:'', balance:'', allMoney:0, show:false, }, addMsg:{ FrIDs:'', RemitterName:'', TradeDate:'', BankList:[], vorcherInos:[] }, AccListT:[], accountListT:[], listAllMoney:0, checkList:[], count:0, allBPrice:0, allWPrice:0, userInfo:{}, //是否全选 isCheckAll:false, //是否显示全选框 isShowCheckAll:false, picIsShow:false, picObj:[], imgList:[], //上传数组 saveMsg:[], TradeDate:'', initialIndex: 0, } }, created(){ // let StartDate = this.getBeforeDate(186, new Date().Format("yyyy-MM-dd")) // let EndDate = this.getBeforeDate(-1, new Date().Format("yyyy-MM-dd")) // this.missionDate = [StartDate, EndDate] // this.msg.QStartDate = this.missionDate[0]; // this.msg.QEndDate = this.missionDate[1]; if(this.$route.query.pageIndex){ this.msg.pageIndex = this.$route.query.pageIndex; } if(this.$route.query.FrID){ this.msg.FrID = this.$route.query.FrID; } if(this.$route.query.Type){ this.msg.Type = this.$route.query.Type+''; } }, mounted(){ let userInfo=this.getLocalStorage(); this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID this.msg.EmployeeId= userInfo.EmployeeId; this.msg.FrID = this.$route.query.FrID?this.$route.query.FrID:0; this.getCompanyList(); this.BankAccount_post_GetAccountType(); this.AccountType_post_GetList(); }, methods:{ showUpLoadFile(i) { // 预览上传文件 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) } }, handleClose(rows){ if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } // this.multipleSelection.splice(index,1) }, // 单据详情 openDetails(FrID) { let query = { id: FrID, blank: "y", }; this.$router.push({ path: "/FinancialDocumentsDetail", query }); }, selectable(row, index){ if (!this.DataList[index].ReFinanceId) { return true; } else { return false; } }, handleSelectionChange(val) { this.multipleSelection = val; }, handleSizeChange(val) { this.msg.pageSize = val this.msg.pageIndex = 1; this.getPageList(); }, handleCurrentChanges(val){ this.msg.pageIndex = val; this.getPageList(); }, getPageList(){ // 获取列表数据 if(this.msg.RB_Branch_Id === '')this.msg.RB_Branch_Id=-1; if(!this.msg.TCID)this.msg.TCID=0; if(!this.msg.Status)this.msg.Status=0; if(!this.msg.FrID)this.msg.FrID=0; this.loading= true; this.apipost('Financial_post_GetReimbursementPageList',this.msg,res=>{ if(res.data.resultCode == 1) { let data = res.data.data.pageData; let arrList = function(arr){ arr.forEach(x=>{ x._checked = true x._disabled = false x.srcList = [] }) } arrList(data) for(let i=0;i<data.length;i++){ if(data[i].vorcherInos) { let list = data[i].vorcherInos.filter(x=>{ return x.Type==3 }) data[i].srcList = list.map(x=>{ if(x.Type==3)return x.Content}) } } let userInfo=this.getLocalStorage(); data.forEach(x=>{ if((","+userInfo.ActionMenuCode+",").indexOf(',Finance_CreateByCareOf,')!=-1){ x.isExchange = true } else{ x.isExchange = false } }) this.total = res.data.data.count; if(this.total==0){ this.DataList=[]; }else{ this.DataList = data; } this.loading=false; }else{ this.loading= false; this.$message.error(res.data.message); } // this.msg.TCID= this.msg.TCID==0?this.msg.TCID:''; // this.queryInfoInit(); this.currentPage = parseInt(this.msg.pageIndex); },err=>{}) }, method5: function() { if(this.msg.TCNUM==''&&this.msg.RemitterName==''){ return this.$message.error(this.$t('objFill.qingshuruthdymc')) } if(this.msg.RB_Branch_Id === '')this.msg.RB_Branch_Id=-1; if(!this.msg.TCID)this.msg.TCID=0; if(!this.msg.Status)this.msg.Status=0; if(!this.msg.FrID)this.msg.FrID=0; let time = this.getBeforeDate(0,new Date().Format("yyyy-MM-dd")) var fileName = this.$t('objFill.baozhanghbjsb')+`${time}.xls`; this.loadingDC = true this.GetLocalFile("Financial_post_DownloadReimbursement", this.msg,fileName,x=>{ this.loadingDC = false }); }, getCompanyList(){ //获取公司列表 this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{ if(res.data.resultCode==1){ this.CompanyList=res.data.data; }else{} },err=>{}) }, timeAdd(){ // 日期格式 //发团日期 if(!this.missionDate){ this.msg.QStartDate = ''; this.msg.QEndDate = ''; return } this.msg.QStartDate = this.missionDate[0]; this.msg.QEndDate = this.missionDate[1]; }, timeTradeAdd(){ // 日期格式 //发团日期 if(!this.tradeDate){ this.msg.sTradeDate = ''; this.msg.eTradeDate = ''; return } this.msg.sTradeDate = this.tradeDate[0]; this.msg.eTradeDate = this.tradeDate[1]; }, queryInfoInit(){ // 初始化msg let msg = { pageIndex:this.msg.pageIndex, pageSize:6, FrID:this.msg.FrID==0?'':this.msg.FrID, sDate:this.msg.sDate, eDate:this.msg.eDate, Status:this.msg.Status, TemplateIds:this.msg.TemplateIds, RB_Branch_Id:this.msg.RB_Branch_Id, RB_Depart_Id:this.msg.RB_Depart_Id, UpdateBy:this.msg.UpdateBy, sTradeDate:this.msg.sTradeDate, eTradeDate:this.msg.eTradeDate, ClientType:this.msg.ClientType, RemitterName:this.msg.RemitterName, ClientID:this.msg.ClientID, sMoney:this.msg.sMoney, eMoney:this.msg.eMoney, CurrencyId:this.msg.CurrencyId, CostTypeID:this.msg.CostTypeID, Conditon:this.msg.Conditon, TCNUM:this.msg.TCNUM==0?"":this.msg.TCNUM, TradeWay:this.msg.TradeWay==0?"":this.msg.TradeWay, Type:this.msg.Type, AccountType:this.msg.AccountType==0?'':this.msg.AccountType, QEndDate:this.msg.QEndDate, QStartDate:this.msg.QStartDate, OrderID:this.msg.OrderID==0?'':this.msg.OrderID, Sort:this.msg.Sort, EmployeeId:this.msg.EmployeeId, KJCostTypeId:this.msg.KJCostTypeId==0?'':this.msg.KJCostTypeId, IsSelectKJSetCostType:this.msg.IsSelectKJSetCostType==0?'':this.msg.IsSelectKJSetCostType, } this.msg = msg; }, resetPageIndex(){ // 重置页码 this.msg.pageIndex=1; this.currentPage = 1; this.getPageList() }, getMoney(){ let Money = 0; let IsIncome=false;let IsExpend=false; this.multipleSelection.forEach(x=>{ if(x.Type==1){ IsIncome=true; }else if(x.Type ==2){ IsExpend=true; } }) if(IsIncome==true&&IsExpend==true){ //收支合并结算 this.multipleSelection.forEach(x=>{ x.DetailList.forEach(y=>{ if(x.Type==1){ Money -= (y.OriginalMoney*100) }else{ Money += (y.OriginalMoney*100) } }) }) }else{ this.multipleSelection.forEach(x=>{ x.DetailList.forEach(y=>{ Money += (y.OriginalMoney*100) }) }) } return Money/100 }, getMoney2(){ let Money = 0; let IsIncome=false;let IsExpend=false; this.multipleSelection.forEach(x=>{ if(x.Type==1){ IsIncome=true; }else if(x.Type ==2){ IsExpend=true; } }) if(IsIncome==true&&IsExpend==true){ //收支合并结算 this.multipleSelection.forEach(x=>{ x.DetailList.forEach(y=>{ if(x.Type==1){ Money -= (y.Money*100) }else{ Money += (y.Money*100) } }) }) }else{ this.multipleSelection.forEach(x=>{ x.DetailList.forEach(y=>{ Money += (y.Money*100) }) }) } return Money/100 }, GenerateDocuments(){ if(this.multipleSelection.length==0){ this.Error(this.$t('objFill.pleaseselectdocuments')); return; } this.BillType=1; let IsIncome=false;let IsExpend=false; this.multipleSelection.forEach(x=>{ if(x.Type==1){ IsIncome=true; }else if(x.Type ==2){ IsExpend=true; } }) if(IsIncome==false&&IsExpend==true){ this.BillType=2; } if(IsIncome==true&&IsExpend==true){ this.BillType=2; } this.addChuNa = true; }, initAddChuNa(){ this.payMsgList = []; this.saveMsg=[]; this.listAllMoney = 0; this.huikuanren = ''; this.TradeDate=''; this.addChuNa = false; this.payMsg = { ID:0, FinanceId:'', Type:'', AccountId:'', OriginalMoney:0, CurrencyId:'', Rate:0, Fee:0, Name:'', CurrenName:'', Account:'', balance:'', allMoney:0, show:false, }; this.addMsg = { FrIDs:'', RemitterName:'', TradeDate:'', BankList:[], } }, clearAccBank(){ // 选择账户类型清空数据 this.payMsg.Type = ''; this.payMsg.AccountId = ''; }, addList(){ if(this.payMsg.AccountId==='')return; if(this.payMsg.OriginalMoney===0||this.payMsg.OriginalMoney==='')return; if(this.payMsg.AccountId==='')return; 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, show:false, }; this.CalculationMoney(); }, CalculationMoney(){ this.listAllMoney = 0; this.payMsgList.forEach(x=>{ // this.listAllMoney = this.listAllMoney + x.allMoney this.listAllMoney += x.allMoney }) }, BankAccount_post_GetAccountType(){ //获取账户类型列表 this.apipost('BankAccount_post_GetAccountType',{}, res => { if(res.data.resultCode == 1) { this.GetAccountType = res.data.data; } }, err => {}) }, getAccountList(i){ this.payMsg.AccountId = ''; this.GetAccountType.forEach(x=>{ if(x.ID===i){ this.payMsg.Name = x.Name; } }); if(i===1){ this.bankaccount_post_GetListS() } if(i===2){ this.BankAccount_post_GetPlatformList() } if(i===3){ this.BankAccount_post_GetCashAccountList() } if(i===4){ this.BankAccount_post_GetCashPoolList() } }, BankAccount_post_GetPlatformList(){ //获取平台账户 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(){ // 获取现金账户 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_GetListS(query){ // 获取银行账户 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; if (query) { this.AccountId = parseInt(this.$route.query.BankID); } } }, err => {}) }, BankAccount_post_GetCashPoolList(){ // 获取资金池账 this.apipost('BankAccount_post_GetCashPoolList',{TypeId:2,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 => {}) }, setAccountName(i,type,index){ if(type===2){ this.accountList.forEach(x=>{ if(x.ID===i){ this.payMsg.Account = x.allName; this.payMsg.CurrenName =x.CurrencyName; this.payMsg.Rate = x.CurrencyRate?x.CurrencyRate:x.CurrentRate; this.payMsg.CurrencyId = x.CurrencyId; this.payMsg.balance = x.Initialbalance; } }) this.addList() }else{ this.accountList.forEach(x=>{ if(x.ID===i){ this.payMsgList[index].Account = x.allName; this.payMsgList[index].CurrenName =x.CurrencyName; this.payMsgList[index].Rate = x.CurrencyRate?x.CurrencyRate:x.CurrentRate; this.payMsgList[index].CurrencyId = x.CurrencyId; this.payMsgList[index].balance = x.Initialbalance; } }) this.addList() } }, Calculation(i,index){ // 计算价格 if(i===1){ 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; this.payMsgList[index].allMoney = (Money*Rate)+fee; }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; this.payMsg.allMoney = (Money*Rate)+fee; } }, deleteRow(obj,index){ obj.show = false; this.payMsgList.splice(index,1); this.$forceUpdate(); }, showUpLoadFile(i){ // 预览上传文件 if(i.Type==3){ this.picObj.push(i.Url); this.imgList.push(i.Url); this.picIsShow= false; // this.hideFlashMan = true; }else{ if(i.Content.substring(i.Content.lastIndexOf('.')+1,i.Content.length).toUpperCase()=='PDF'){ this.previewPDF(i.Url) }else{ window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Url) } } }, deleteUploadFile(i){ // 删除上传文件 this.saveMsg.splice(i,1); this.addMsg.vorcherInos = this.saveMsg; }, uploadFileBtn(file) { //上传 if(file.file.size > 1024 * 1024 * 10) { this.Error(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.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 fileSize = file.file.size<1024? file.file.size:(file.file.size / 1024).toFixed(0); this.saveMsg.push({ Content: x.data.FilePath, ID:0, Type:fileTypeNumber, Url: this.domainManager().ViittoFileUrl + x.data.FilePath, }) this.addMsg.vorcherInos = this.saveMsg; this.Success(this.$t('tips.scchenggong')); }); }, submitAddChuNa(){ if(this.addMsg.TradeDate==='') return this.$message.error(this.$t('fnc.a_qxzjyriqi')); if(this.BillType===1&&this.addMsg.RemitterName==='') return this.$message.error(this.$t('rule.qtxhkuanren')) ; this.addMsg.IsPlatformMergeBank=0; let IsIncome=false;let IsExpend=false; this.multipleSelection.forEach(x=>{ if(x.Type==1){IsIncome=true;}else if(x.Type ==2){IsExpend=true;} }) let listYMoney=0;let listBMoney=0;//勾选的单据的原币+本位币 if(IsIncome==true&&IsExpend==true){ this.addMsg.IsPlatformMergeBank=2;//收支合并结算 //收支合并结算 this.multipleSelection.forEach(x=>{ x.DetailList.forEach(y=>{ if(x.Type==1){ listYMoney -= (y.OriginalMoney*100) listBMoney -= (y.Money*100) }else{ listYMoney += (y.OriginalMoney*100) listBMoney += (y.Money*100) } }) }) }else{ this.multipleSelection.forEach(x=>{ x.DetailList.forEach(y=>{ listYMoney += (y.OriginalMoney*100) listBMoney += (y.Money*100) }) }) } listYMoney=listYMoney/100;listBMoney=listBMoney/100; let sureYMoney=0;let sureBMoney=0;//合并账户的原币+本位币 this.payMsgList.forEach(x=>{ sureYMoney += (x.OriginalMoney*100) sureBMoney += (x.Money*100) }) sureYMoney=sureYMoney/100;sureBMoney=sureBMoney/100; if(listYMoney!=sureYMoney || listBMoney!=sureBMoney){ this.$confirm(this.$t('objFill.v101.FinancialModule.yuandhjyb'),this.$t('tips.tips'), { confirmButtonText: this.$t('pub.sureBtn'), cancelButtonText: this.$t('pub.cancelBtn'), type: 'warning' }).then(() => { this.SureSubmit(); }).catch(() => { this.$message({type: 'info',message: this.$t('hotel.hotel_HasBeenCancelled')}); }); }else{ this.SureSubmit(); } }, SureSubmit(){ this.addMsg.FrIDs = this.multipleSelection.map(x=>{ return x.FrID}).join(','); this.addMsg.BankList = this.payMsgList; this.addMsg.Money = this.listAllMoney; this.allLoading = true this.apipost('Financial_post_MergeFinance',this.addMsg,r=>{ if(r.data.resultCode === 1) { this.addChuNa = false; this.saveMsg=[]; this.payMsgList = []; this.multipleSelection=[]; this.$refs.multipleTable.clearSelection(); this.payMsg = { ID:0, FinanceId:'', Type:'', AccountId:'', OriginalMoney:0, CurrencyId:'', Rate:0, Fee:0, Name:'', CurrenName:'', Account:'', balance:'', allMoney:0, show:false, } this.getPageList(); }else{ this.$message.error(r.data.message) } this.allLoading = false },null) }, AccountType_post_GetList(){ //获取账户类型下拉 this.apipost('AccountType_post_GetList',this.queryAccMsg,res=>{ if(res.data.resultCode==1){ this.AccList = res.data.data; this.AccListT = res.data.data; }else{ this.$message.error(res.data.message); } },err=>{}) }, } } </script>