Commit 8f882c15 authored by zhengke's avatar zhengke

修改

parent 335afc13
<style scoped> <style scoped>
@import "css/cssReset.css"; @import "css/cssReset.css";
.page_CompanyAccount .query-box li label{display: inline-block;min-width: 80px;text-align: right;font-style: normal;margin: 0 20px 0 0;}
._scrollbar::-webkit-scrollbar{width: 4px;height: 8px;} .page_CompanyAccount .query-box li label {
._scrollbar::-webkit-scrollbar-thumb{border-radius: 4px;box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);background: #c9c9c9;} display: inline-block;
._scrollbar::-webkit-scrollbar-track{box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);border-radius: 4px;background: #EDEDED;} min-width: 80px;
.page_CompanyAccount ._vMG_edit{overflow: auto;display: none;position:absolute;bottom:0;left: 0;font-family: 'PingFangSc-Fine';border-top:3px solid #38425d;background-color:#FFFFFF;padding: 10px;width: 100%;} text-align: right;
.page_CompanyAccount ._vMG_edit ._tit{padding-left: 10px;border-left: 3px solid #E95252; font-size: 16px;color: #000000} font-style: normal;
.page_CompanyAccount ._vMG_edit ._tit span{color: #666666} margin: 0 20px 0 0;
.cm_content{margin:0;padding: 0;overflow-x: auto;} }
._edHeight{height:400px;}
.edHeight{display: block !important;height: 230px;} ._scrollbar::-webkit-scrollbar {
.page_CompanyAccount ._info_box ul{margin-top: 15px} width: 4px;
.page_CompanyAccount ._info_box ul li{float: left; margin-right: 12px;} height: 8px;
.instMg_list_item{width: 296px;height: auto;border-radius: 4px;border: 1px solid #ebebeb;float: left;background:rgba(255,255,255,1);overflow: hidden;margin-right: 15px;margin-bottom: 15px;} }
.instMg_list_item:hover{box-shadow:0px 0px 20px rgba(191,191,191,1);transition: all linear 0.5s;}
._tips{font-size: 12px;color: #666666;padding: 15px 0} ._scrollbar::-webkit-scrollbar-thumb {
._top{text-align: center;height: 50px;border-bottom: 1px solid #EEEEEE;overflow: hidden;padding: 10px 0;} border-radius: 4px;
._top img{height: 100%;} box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
._bt{padding: 20px;font-size: 14px;} background: #c9c9c9;
._bt_t{border-radius:4px;background-color: #2AAEF2;color: #FFFFFF} }
._bt_t>p{padding: 10px 0;text-align: center}
._bt_t>p>span{display: inline-block;padding: 3px 10px;background-color: #FFA200;border-radius: 4px} ._scrollbar::-webkit-scrollbar-track {
._bt_t ._btt_b{padding: 14px;background-color: #0F98DE} box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
._bt_t ._btt_b>div{display: flex;text-align: center;padding: 0 0 9px 0} border-radius: 4px;
._bt_t ._btt_b>div>p{flex:1} background: #EDEDED;
._bt_t ._btt_b>div>p:nth-child(2){border-left: 2px solid #179FE5;max-width: 100%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;padding: 0 5px} }
.icon-img-ren{color: #2AAEF2}
._bt_t ._btt_b .PingFangSC{font-weight: bold;text-align: center;padding: 8px 0;border: 1px solid #2AAEF2;border-radius: 4px} .page_CompanyAccount ._vMG_edit {
.icon-qiehuan,.icon-ico-renwuyaoqiu{background-color: #E7E7E7;border-radius: 50%;color: #999999;font-size: 12px;width: 18px;height: 18px;display: inline-block;text-align: center;line-height: 19px;cursor: pointer;} overflow: auto;
.icon-ico-renwuyaoqiu{font-size: 10px} display: none;
.icon-qiehuan:hover,.icon-ico-renwuyaoqiu:hover{background-color: #E95252;color: white;} position: absolute;
._bt_b{padding: 15px 0 0 0;border-bottom: 1px solid #EEEEEE} bottom: 0;
._bt_b>p{display: flex;justify-content: space-between;padding-bottom: 10px} left: 0;
._bt_b>P span._name{color: #333333;font-size: 12px;} font-family: 'PingFangSc-Fine';
._btn{padding: 20px 30px 0 30px;text-align: center;border-left: none} border-top: 3px solid #38425d;
._btn span{display: inline-block;font-size: 12px;background-color: #E7E7E7;color: #333333;padding: 5px 20px;border-radius: 14px;cursor: pointer; margin-left: 10px} background-color: #FFFFFF;
._btn span:hover{background-color: #E95252;color: white} padding: 10px;
.fc_green{color: #47BF8C !important} width: 100%;
.fc_red{color: #E95252 !important} }
.page_CompanyAccount .PingFangSC,._bold{font-weight: bold}
._no_bold{font-weight: normal} .page_CompanyAccount ._vMG_edit ._tit {
._max_wd{max-width: 80px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;vertical-align:top;display: inline-block} padding-left: 10px;
._btt_b .over_ellipsis{max-width: 107px;} border-left: 3px solid #E95252;
._add_saveBtn{text-align: right;margin-bottom: 10px} font-size: 16px;
._cp_name{width: 185px;display: inline-block;text-overflow: ellipsis; white-space: nowrap;display: inline-block;overflow: hidden;text-align: right} color: #000000
._underline{text-decoration: underline;cursor: pointer;} }
.page_CompanyAccount .el-button-group .el-button{padding: 4px;}
._yingkui{ .page_CompanyAccount ._vMG_edit ._tit span {
height: 40px; color: #666666
line-height: 40px; }
font-size: 12px;
color: #666666; .cm_content {
padding-left: 20px; margin: 0;
} padding: 0;
.page_CompanyAccount .query-box{ overflow-x: auto;
padding: 20px 0 0 ; }
}
.page_PlatformAccount ._wAuto{ ._edHeight {
width: auto; height: 400px;
} }
.edHeight_t{display: block !important;height: 152px;}
.el-date-editor.el-input{width: 100% !important;} .edHeight {
display: block !important;
height: 230px;
}
.page_CompanyAccount ._info_box ul {
margin-top: 15px
}
.page_CompanyAccount ._info_box ul li {
float: left;
margin-right: 12px;
}
.instMg_list_item {
width: 296px;
height: auto;
border-radius: 4px;
border: 1px solid #ebebeb;
float: left;
background: rgba(255, 255, 255, 1);
overflow: hidden;
margin-right: 15px;
margin-bottom: 15px;
}
.instMg_list_item:hover {
box-shadow: 0px 0px 20px rgba(191, 191, 191, 1);
transition: all linear 0.5s;
}
._tips {
font-size: 12px;
color: #666666;
padding: 15px 0
}
._top {
text-align: center;
height: 50px;
border-bottom: 1px solid #EEEEEE;
overflow: hidden;
padding: 10px 0;
}
._top img {
height: 100%;
}
._bt {
padding: 20px;
font-size: 14px;
}
._bt_t {
border-radius: 4px;
background-color: #2AAEF2;
color: #FFFFFF
}
._bt_t>p {
padding: 10px 0;
text-align: center
}
._bt_t>p>span {
display: inline-block;
padding: 3px 10px;
background-color: #FFA200;
border-radius: 4px
}
._bt_t ._btt_b {
padding: 14px;
background-color: #0F98DE
}
._bt_t ._btt_b>div {
display: flex;
text-align: center;
padding: 0 0 9px 0
}
._bt_t ._btt_b>div>p {
flex: 1
}
._bt_t ._btt_b>div>p:nth-child(2) {
border-left: 2px solid #179FE5;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0 5px
}
.icon-img-ren {
color: #2AAEF2
}
._bt_t ._btt_b .PingFangSC {
font-weight: bold;
text-align: center;
padding: 8px 0;
border: 1px solid #2AAEF2;
border-radius: 4px
}
.icon-qiehuan,
.icon-ico-renwuyaoqiu {
background-color: #E7E7E7;
border-radius: 50%;
color: #999999;
font-size: 12px;
width: 18px;
height: 18px;
display: inline-block;
text-align: center;
line-height: 19px;
cursor: pointer;
}
.icon-ico-renwuyaoqiu {
font-size: 10px
}
.icon-qiehuan:hover,
.icon-ico-renwuyaoqiu:hover {
background-color: #E95252;
color: white;
}
._bt_b {
padding: 15px 0 0 0;
border-bottom: 1px solid #EEEEEE
}
._bt_b>p {
display: flex;
justify-content: space-between;
padding-bottom: 10px
}
._bt_b>P span._name {
color: #333333;
font-size: 12px;
}
._btn {
padding: 20px 30px 0 30px;
text-align: center;
border-left: none
}
._btn span {
display: inline-block;
font-size: 12px;
background-color: #E7E7E7;
color: #333333;
padding: 5px 20px;
border-radius: 14px;
cursor: pointer;
margin-left: 10px
}
._btn span:hover {
background-color: #E95252;
color: white
}
.fc_green {
color: #47BF8C !important
}
.fc_red {
color: #E95252 !important
}
.page_CompanyAccount .PingFangSC,
._bold {
font-weight: bold
}
._no_bold {
font-weight: normal
}
._max_wd {
max-width: 80px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: top;
display: inline-block
}
._btt_b .over_ellipsis {
max-width: 107px;
}
._add_saveBtn {
text-align: right;
margin-bottom: 10px
}
._cp_name {
width: 185px;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
overflow: hidden;
text-align: right
}
._underline {
text-decoration: underline;
cursor: pointer;
}
.page_CompanyAccount .el-button-group .el-button {
padding: 4px;
}
._yingkui {
height: 40px;
line-height: 40px;
font-size: 12px;
color: #666666;
padding-left: 20px;
}
.page_CompanyAccount .query-box {
padding: 20px 0 0;
}
.page_PlatformAccount ._wAuto {
width: auto;
}
.edHeight_t {
display: block !important;
height: 152px;
}
.el-date-editor.el-input {
width: 100% !important;
}
</style> </style>
<template> <template>
<div class='flexOne page_CompanyAccount'> <div class='flexOne page_CompanyAccount'>
<div class='query-box'> <div class='query-box' style="padding-bottom:20px;">
<el-form class="_info_box clearfix" label-width="110px"> <ul>
<el-row> <li>
<el-col :span="4" :gutter="35"> <em>{{$t('fnc.accBming')}}</em>
<el-form-item :label="$t('fnc.accBming')"> <el-input v-model="msg.Alias"></el-input>
<el-input v-model="msg.Alias"></el-input> </li>
</el-form-item> <li>
</el-col> <em>{{$t('fnc.ssjigou')}}</em>
<el-col :span="4" :gutter="35"> <el-select filterable v-model='msg.BackId'>
<el-form-item :label="$t('fnc.ssjigou')"> <el-option :label='$t("pub.unlimitedSel")' value='-1'></el-option>
<el-select filterable v-model='msg.BackId' > <el-option v-for='item in FinancialList' v-if="item.Type == 0" :label='item.Name' :value='item.ID'
<el-option :label='$t("pub.unlimitedSel")' value='-1'></el-option> :key='item.ID'>
<el-option v-for='item in FinancialList' v-if="item.Type == 0" </el-option>
:label='item.Name' </el-select>
:value='item.ID' </li>
:key='item.ID'> <li>
</el-option> <em>{{$t('fnc.accType')}}</em>
</el-select> <el-select filterable v-model='msg.TypeId'>
</el-form-item> <el-option :label='$t("pub.unlimitedSel")' value='-1'></el-option>
</el-col> <el-option v-for='item in AccountTypeList' :label='item.Name' :value='item.ID' :key='item.ID'>
<el-col :span="4" :gutter="35"> </el-option>
<el-form-item :label="$t('fnc.accType')"> </el-select>
<el-select filterable v-model='msg.TypeId' > </li>
<el-option :label='$t("pub.unlimitedSel")' value='-1'></el-option> <li>
<el-option v-for='item in AccountTypeList' <em>校区:</em>
:label='item.Name' <el-select filterable v-model='msg.RB_Branch_Id'>
:value='item.ID' <el-option :label='$t("pub.unlimitedSel")' value='-1'></el-option>
:key='item.ID'> <!-- <el-option label='通用' value='-1'></el-option> -->
</el-option> <el-option v-for='item in CompanyList' :label='item.SName' :value='item.SId' :key='item.SId'>
</el-select> </el-option>
</el-form-item> </el-select>
</el-col> </li>
<el-col :span="4" :gutter="35"> <li>
<el-form-item label="校区"> <input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
<el-select filterable v-model='msg.RB_Branch_Id' > @click="resetPageIndex(),getList()" />
<el-option :label='$t("pub.unlimitedSel")' value='-1'></el-option> <input type="button" class="normalBtn" :value="$t('pub.addBtn')"
<!-- <el-option label='通用' value='-1'></el-option> --> @click="addShow=true,text=$t('pub.addBtn'),ed=false" />
<el-option v-for='item in CompanyList' </li>
:label='item.SName' </ul>
:value='item.SId' </div>
:key='item.SId'> <div class="cm_content _scrollbar" :class="addShow==true||addCuren==false?'_edHeight':''">
</el-option> <p class="_tips">{{$t('tips.sxhuilv')}}</p>
</el-select> <div class="clearfix" v-loading='loading'>
</el-form-item> <div class="instMg_list_item" v-for="(item,index) in DataList">
</el-col> <div class="_top">
</el-row> <img v-if="!item.LogoStr" style="width:100%" src="../financial/image/bg_c1@2x.png" alt="">
</el-form> <img v-else :src="item.LogoStr" alt="">
<ul> </div>
<li><input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()"/> <div class="_bt">
<input type="button" class="normalBtn" :value="$t('pub.addBtn')" @click="addShow=true,text=$t('pub.addBtn'),ed=false"/></li> <div class="_bt_t">
</ul> <p>
</div> <el-tooltip class="item" effect="dark" :content="item.Alias" placement="top-start">
<div class="cm_content _scrollbar" :class="addShow==true||addCuren==false?'_edHeight':''"> <span class="max_w200">{{item.Alias}}</span>
<p class="_tips">{{$t('tips.sxhuilv')}}</p> </el-tooltip>
<div class="clearfix" v-loading='loading'> </p>
<div class="instMg_list_item" v-for="(item,index) in DataList"> <div class="_btt_b">
<div class="_top"> <div>
<img v-if="!item.LogoStr" style="width:100%" src="../financial/image/bg_c1@2x.png" alt=""> <p class="over_ellipsis"> <i class="iconfont icon-img-ren"></i>
<img v-else :src="item.LogoStr" alt=""> <el-tooltip class="item" effect="dark" :content="item.Accountholder" placement="top-start">
</div> <span> {{item.Accountholder}}</span>
<div class="_bt"> </el-tooltip>
<div class="_bt_t"> </p>
<p><el-tooltip class="item" effect="dark" :content="item.Alias" placement="top-start"> <p>{{item.TypeName}}</p>
<span class="max_w200">{{item.Alias}}</span>
</el-tooltip></p>
<div class="_btt_b">
<div>
<p class="over_ellipsis"> <i class="iconfont icon-img-ren"></i>
<el-tooltip class="item" effect="dark" :content="item.Accountholder" placement="top-start">
<span> {{item.Accountholder}}</span>
</el-tooltip>
</p>
<p>{{item.TypeName}}</p>
</div>
<p class="PingFangSC">
{{item.BackNo}}
</p>
</div>
</div>
<div class="_bt_b">
<p>
<span class="_name">{{$t('fnc.zhyue')}}</span>
<span>
<span v-if="item.IsStandardCurrency!=1">{{item.showB?item.StandardCurrencyCode:item.CurrencyCode}}</span>
<span v-else>{{item.StandardCurrencyCode}}</span>
<!-- <span class="fc_green PingFangSC _underline" @click="item.IsStandardCurrency!=1?goUrl('FineBalance',item.ID,item.Alias):''">{{item.showB?moneyFormat(item.benBalance):moneyFormat(item.Initialbalance)}}</span> -->
<span class="fc_green PingFangSC _underline" @click="goUrlNew(item)">{{item.showB?moneyFormat(item.benBalance):moneyFormat(item.Initialbalance)}}</span>
<span class="iconfont icon-qiehuan" @click="item.showB=!item.showB" v-if="item.IsStandardCurrency!=1"></span>
<span v-if="item.IsStandardCurrency!=1" class="iconfont icon-ico-renwuyaoqiu"></span>
</span>
</p>
<p><span class="_name">{{$t('fnc.zhubizhong')}}</span><span class="_bold">
<el-tooltip class="item" effect="dark" :content="item.CurrencyName" placement="top-start">
<span class="_max_wd">{{item.CurrencyName}}</span>
</el-tooltip>
(<span class="_bold" :class="item.IsStandardCurrency==1?'fc_green':'fc_red'">{{item.IsStandardCurrency==1?'本位币':'外币'}}</span>) <span class="_no_bold" v-if="item.IsStandardCurrency!=1">{{item.CurrentRate}}</span> </span></p>
<p><span class="_name">校区</span>
<el-tooltip class="item" effect="dark" :content="item.allName" placement="top-end">
<span class="_cp_name"><span class="_bold" v-for="(b,bi) in item.BranchName">{{b.BranchName}} </span></span>
</el-tooltip>
</p>
<p v-if="item.IsStandardCurrency!=1">
<span class="_name">{{$t('fnc.sqisunyi')}}</span>
<span class="fr" v-if="item.ProfitLossMoney&&item.ProfitLossMoney!=0" :class="item.ProfitLossMoney>0?'fc_green':'fc_red'">{{item.ProfitLossMoney}}</span>
<span class="fr" v-else>-</span>
</p>
<p v-else>&nbsp;</p>
</div>
<p class="_btn">
<el-button-group>
<el-button type="primary" @click="editCurency(item.ID),text=$t('pub.updateMsg'),addShow=true,addCuren=true">{{$t('pub.updateMsg')}}</el-button>
<el-button type="success" v-if="item.IsStandardCurrency===0" @click="moneyDate.ProfitLoss=0,cancelEdit(2),addShow=false,addCuren=false,SetProfitLossMsg.AccountID = item.ID,SetProfitLossMsg.CurrencyId=item.CurrencyId,SetProfitLossMsg.initRate=item.CurrentRate,SetProfitLossMsg.Money = item.Initialbalance">{{$t('fnc.tiaohui')}}</el-button>
<el-button type="info" v-if="item.IsStandardCurrency===0" @click="goUrl('RemittanceRecord',item.ID,item.Alias,1,item.CurrencyId)">{{$t('fnc.jilu')}}</el-button>
<el-button type="danger" @click="financeinfoRemove(item.ID,item.Alias)">{{$t('fnc.xiaohu')}}</el-button>
</el-button-group>
</p>
</div>
</div> </div>
<p class="PingFangSC">
{{item.BackNo}}
</p>
</div>
</div> </div>
<div class="noData" v-show="noData"> <div class="_bt_b">
{{$t('system.content_noData')}} <p>
<span class="_name">{{$t('fnc.zhyue')}}</span>
<span>
<span
v-if="item.IsStandardCurrency!=1">{{item.showB?item.StandardCurrencyCode:item.CurrencyCode}}</span>
<span v-else>{{item.StandardCurrencyCode}}</span>
<!-- <span class="fc_green PingFangSC _underline" @click="item.IsStandardCurrency!=1?goUrl('FineBalance',item.ID,item.Alias):''">{{item.showB?moneyFormat(item.benBalance):moneyFormat(item.Initialbalance)}}</span> -->
<span class="fc_green PingFangSC _underline"
@click="goUrlNew(item)">{{item.showB?moneyFormat(item.benBalance):moneyFormat(item.Initialbalance)}}</span>
<span class="iconfont icon-qiehuan" @click="item.showB=!item.showB"
v-if="item.IsStandardCurrency!=1"></span>
<span v-if="item.IsStandardCurrency!=1" class="iconfont icon-ico-renwuyaoqiu"></span>
</span>
</p>
<p><span class="_name">{{$t('fnc.zhubizhong')}}</span><span class="_bold">
<el-tooltip class="item" effect="dark" :content="item.CurrencyName" placement="top-start">
<span class="_max_wd">{{item.CurrencyName}}</span>
</el-tooltip>
(<span class="_bold"
:class="item.IsStandardCurrency==1?'fc_green':'fc_red'">{{item.IsStandardCurrency==1?'本位币':'外币'}}</span>)
<span class="_no_bold" v-if="item.IsStandardCurrency!=1">{{item.CurrentRate}}</span>
</span></p>
<p><span class="_name">校区</span>
<el-tooltip class="item" effect="dark" :content="item.allName" placement="top-end">
<span class="_cp_name"><span class="_bold" v-for="(b,bi) in item.BranchName">{{b.BranchName}}
</span></span>
</el-tooltip>
</p>
<p v-if="item.IsStandardCurrency!=1">
<span class="_name">{{$t('fnc.sqisunyi')}}</span>
<span class="fr" v-if="item.ProfitLossMoney&&item.ProfitLossMoney!=0"
:class="item.ProfitLossMoney>0?'fc_green':'fc_red'">{{item.ProfitLossMoney}}</span>
<span class="fr" v-else>-</span>
</p>
<p v-else>&nbsp;</p>
</div> </div>
<div> <p class="_btn">
<el-pagination <el-button-group>
background <el-button type="primary"
@current-change="handleCurrentChange" @click="editCurency(item.ID),text=$t('pub.updateMsg'),addShow=true,addCuren=true">
:current-page.sync="currentPage" {{$t('pub.updateMsg')}}</el-button>
layout="prev, pager, next" <el-button type="success" v-if="item.IsStandardCurrency===0"
:page-size=msg.pageSize @click="moneyDate.ProfitLoss=0,cancelEdit(2),addShow=false,addCuren=false,SetProfitLossMsg.AccountID = item.ID,SetProfitLossMsg.CurrencyId=item.CurrencyId,SetProfitLossMsg.initRate=item.CurrentRate,SetProfitLossMsg.Money = item.Initialbalance">
:total=total> {{$t('fnc.tiaohui')}}</el-button>
</el-pagination> <el-button type="info" v-if="item.IsStandardCurrency===0"
</div> @click="goUrl('RemittanceRecord',item.ID,item.Alias,1,item.CurrencyId)">{{$t('fnc.jilu')}}</el-button>
</div> <el-button type="danger" @click="financeinfoRemove(item.ID,item.Alias)">{{$t('fnc.xiaohu')}}</el-button>
<div class="_vMG_edit _scrollbar" v-if="addShow" :class="addShow==true?'edHeight':''"> </el-button-group>
<el-row> </p>
<el-col :span="20"> </div>
<p class="_tit">{{text}}{{$t('fnc.acc')}}</p>
</el-col>
<el-col :span="4" class="_add_saveBtn">
<button type="button" class="normalBtn" @click="submitForm('addMsg',1)">{{$t('pub.saveBtn')}}</button>
<button class="hollowFixedBtn" type="button" @click="cancelEdit(),resetForm('addMsg'),addShow=false">{{$t('pub.cancelBtn')}}</button>
</el-col>
</el-row>
<el-form class="_info_box clearfix" :model="addMsg" ref="addMsg" :rules="rules" label-width="110px">
<el-row>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.accBming')" prop="Alias">
<el-input v-model="addMsg.Alias" class="" maxlength="10"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.accType')" prop="TypeId">
<el-select filterable v-model='addMsg.TypeId' class="">
<el-option v-for='item in AccountTypeList'
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.yhjigou')" prop="BackId">
<el-select filterable v-model='addMsg.BackId' class="">
<el-option v-for='item in FinancialList' v-if="item.Type == 0"
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.khuren')" prop="Accountholder">
<el-input v-model="addMsg.Accountholder" class="" maxlength="50"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.khuhang')" prop="Openingbank">
<el-input v-model="addMsg.Openingbank" class="" maxlength="50"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.yhkahao')" prop="BackNo">
<el-input v-model="addMsg.BackNo" class="" maxlength="50"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.csyue')" prop="Initialbalance" >
<el-input v-model="addMsg.Initialbalance" class=""></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.zhbizhong')" prop="CurrencyId">
<el-select filterable v-model='addMsg.CurrencyId' class="">
<el-option v-for='item in financeinfoList'
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" class="_BranchIdS">
<el-form-item label="校区" prop="BranchIdS">
<el-select filterable v-model='addMsg.BranchIdS'>
<el-option v-for='item in CompanyList'
:label='item.SName'
:value='item.SId'
:key='item.SId'
:disabled="item.disabled">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.fxshangxian')" >
<el-input v-model="addMsg.RiskLimitMoney" type="number" class=""></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.fxxiaxian')" >
<el-input v-model="addMsg.RiskLowerLimitMoney" type="number" class=""></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="初始本位币金额">
<el-input v-model="addMsg.AccountStartWBMoney" type="number" class></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="初始原币金额">
<el-input v-model="addMsg.AccountStartMoney" type="number" class></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="期初应用日期">
<el-date-picker type="date" v-model="addMsg.BeginTimeStr"
value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="_vMG_edit _scrollbar" v-if="addCuren == false" :class="addCuren==false?'edHeight_t':''">
<el-row>
<el-col :span="20">
<p class="_tit">{{$t('fnc.qmtiaohui')}}</p>
</el-col>
<el-col :span="4" class="_add_saveBtn">
<button type="button" class="normalBtn" @click="submitForm('SetProfitLossMsg',2)">{{$t('fnc.qrtijiao')}}</button>
<button class="hollowFixedBtn" type="button" @click="cancelEdit(),resetForm('SetProfitLossMsg')">{{$t('pub.cancelBtn')}}</button>
</el-col>
</el-row>
<el-form class="_info_box clearfix" :model="SetProfitLossMsg" ref="SetProfitLossMsg" :rules="rules" label-width="100px">
<el-row>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.sqhuilv')">
<el-input v-model="SetProfitLossMsg.initRate" disabled=""></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.qmhuilv')" prop="EndRate">
<el-input v-model="SetProfitLossMsg.EndRate" type="number" @change="Calculation()"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" >
<el-form-item :label="$t('fnc.xzqishu')" prop="TermNum">
<el-date-picker
v-model="SetProfitLossMsg.TermNum"
value-format="yyyy-MM-dd"
type="month"
class="_wAuto"
:placeholder="$t('admin.admin_choDate')">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" v-if="costType.length">
<el-form-item :label="$t('fnc.fyleixing')" prop="CostTypeID">
<el-select filterable v-model='SetProfitLossMsg.CostTypeID'>
<el-option v-for='item in costType'
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" class="_yingkui">
<p v-if="moneyDate.ProfitLoss<0">{{$t('fnc.yingkui')}}<span class="fc_red">{{moneyDate.ProfitLoss}}</span></p>
<p v-if="moneyDate.ProfitLoss>0">{{$t('fnc.yingli')}}<span class="fc_green">{{moneyDate.ProfitLoss}}</span></p>
<p v-if="moneyDate.ProfitLoss==0">{{$t('fnc.yingkui')}}<span class="fc_green">0</span></p>
</el-col>
</el-row>
</el-form>
</div> </div>
</div>
<div class="noData" v-show="noData">
{{$t('system.content_noData')}}
</div>
<div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="prev, pager, next" :page-size=msg.pageSize :total=total>
</el-pagination>
</div>
</div>
<div class="_vMG_edit _scrollbar" v-if="addShow" :class="addShow==true?'edHeight':''">
<el-row>
<el-col :span="20">
<p class="_tit">{{text}}{{$t('fnc.acc')}}</p>
</el-col>
<el-col :span="4" class="_add_saveBtn">
<button type="button" class="normalBtn" @click="submitForm('addMsg',1)">{{$t('pub.saveBtn')}}</button>
<button class="hollowFixedBtn" type="button"
@click="cancelEdit(),resetForm('addMsg'),addShow=false">{{$t('pub.cancelBtn')}}</button>
</el-col>
</el-row>
<el-form class="_info_box clearfix" :model="addMsg" ref="addMsg" :rules="rules" label-width="110px">
<el-row>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.accBming')" prop="Alias">
<el-input v-model="addMsg.Alias" class="" maxlength="10"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.accType')" prop="TypeId">
<el-select filterable v-model='addMsg.TypeId' class="">
<el-option v-for='item in AccountTypeList' :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.yhjigou')" prop="BackId">
<el-select filterable v-model='addMsg.BackId' class="">
<el-option v-for='item in FinancialList' v-if="item.Type == 0" :label='item.Name' :value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.khuren')" prop="Accountholder">
<el-input v-model="addMsg.Accountholder" class="" maxlength="50"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.khuhang')" prop="Openingbank">
<el-input v-model="addMsg.Openingbank" class="" maxlength="50"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.yhkahao')" prop="BackNo">
<el-input v-model="addMsg.BackNo" class="" maxlength="50"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.csyue')" prop="Initialbalance">
<el-input v-model="addMsg.Initialbalance" class=""></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.zhbizhong')" prop="CurrencyId">
<el-select filterable v-model='addMsg.CurrencyId' class="">
<el-option v-for='item in financeinfoList' :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" class="_BranchIdS">
<el-form-item label="校区" prop="BranchIdS">
<el-select filterable v-model='addMsg.BranchIdS'>
<el-option v-for='item in CompanyList' :label='item.SName' :value='item.SId' :key='item.SId'
:disabled="item.disabled">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.fxshangxian')">
<el-input v-model="addMsg.RiskLimitMoney" type="number" class=""></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.fxxiaxian')">
<el-input v-model="addMsg.RiskLowerLimitMoney" type="number" class=""></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="初始本位币金额">
<el-input v-model="addMsg.AccountStartWBMoney" type="number" class></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="初始原币金额">
<el-input v-model="addMsg.AccountStartMoney" type="number" class></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="期初应用日期">
<el-date-picker type="date" v-model="addMsg.BeginTimeStr" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div> </div>
<div class="_vMG_edit _scrollbar" v-if="addCuren == false" :class="addCuren==false?'edHeight_t':''">
<el-row>
<el-col :span="20">
<p class="_tit">{{$t('fnc.qmtiaohui')}}</p>
</el-col>
<el-col :span="4" class="_add_saveBtn">
<button type="button" class="normalBtn"
@click="submitForm('SetProfitLossMsg',2)">{{$t('fnc.qrtijiao')}}</button>
<button class="hollowFixedBtn" type="button"
@click="cancelEdit(),resetForm('SetProfitLossMsg')">{{$t('pub.cancelBtn')}}</button>
</el-col>
</el-row>
<el-form class="_info_box clearfix" :model="SetProfitLossMsg" ref="SetProfitLossMsg" :rules="rules"
label-width="100px">
<el-row>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.sqhuilv')">
<el-input v-model="SetProfitLossMsg.initRate" disabled=""></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.qmhuilv')" prop="EndRate">
<el-input v-model="SetProfitLossMsg.EndRate" type="number" @change="Calculation()"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.xzqishu')" prop="TermNum">
<el-date-picker v-model="SetProfitLossMsg.TermNum" value-format="yyyy-MM-dd" type="month" class="_wAuto"
:placeholder="$t('admin.admin_choDate')">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" v-if="costType.length">
<el-form-item :label="$t('fnc.fyleixing')" prop="CostTypeID">
<el-select filterable v-model='SetProfitLossMsg.CostTypeID'>
<el-option v-for='item in costType' :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" class="_yingkui">
<p v-if="moneyDate.ProfitLoss<0">{{$t('fnc.yingkui')}}<span class="fc_red">{{moneyDate.ProfitLoss}}</span>
</p>
<p v-if="moneyDate.ProfitLoss>0">{{$t('fnc.yingli')}}<span class="fc_green">{{moneyDate.ProfitLoss}}</span>
</p>
<p v-if="moneyDate.ProfitLoss==0">{{$t('fnc.yingkui')}}<span class="fc_green">0</span></p>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template> </template>
<script> <script>
import { import {
getSchoolPage getSchoolPage
} from '../../api/school/index' } from '../../api/school/index'
export default { export default {
data(){ data() {
return{ return {
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:5, pageSize: 5,
BackId:'-1', BackId: '-1',
TypeId:'-1', TypeId: '-1',
RB_Branch_Id:'-1', RB_Branch_Id: '-1',
Alias:'' Alias: ''
},
addMsg:{
ID:0,
Alias:'',
TypeId:'',
BackId:'',
Accountholder:'',
Openingbank:'',
BackNo:'',
Initialbalance:'',
RiskLimitMoney:'',
BranchList:[],
BranchIdS:0,
OutCharge:0,
InCharge:0,
RiskLowerLimitMoney:'',
AccountStartMoney:0,
AccountStartWBMoney:0,
BeginTimeStr:'',
},
getCompanyMsg:{
RB_Group_Id:'0',
Status:'0',
},
DataList:[],
total:0,
currentPage:1,
loading:true,
text:'',
dialogTitle:'',
AccountTypeList:[],
CompanyList:[],
FinancialList:[],
financeinfoList:[],
addShow:false,
noData:false,
ed:false,
rules: {//表单必填验证
Alias: [
{ required: true, message: this.$t('rule.qsrzhbieming'), trigger: 'blur' }
],
TypeId: [
{ required: true, message: this.$t('rule.qxzzhleixing'), trigger: 'change' }
],BackId: [
{ required: true, message: this.$t('rule.qxzyhjigou'), trigger: 'change' }
],Accountholder: [
{ required: true, message: this.$t('rule.qsrkhuren'), trigger: 'blur' }
],Openingbank: [
{ required: true, message: this.$t('rule.qsrkhuhang'), trigger: 'blur' }
],BackNo:
[
{ required: true, message: this.$t('rule.qssrzhhaoma'), trigger: 'blur' }
// {pattern:/^[0-9]*$/, message: this.$t('rule.qsrzqdzhhaoma')}
],BranchIdS: [
{ required: true, message: this.$t('rule.qszssgongsi'), trigger: 'change' }
],CurrencyId: [
{ required: true, message: this.$t('rule.qxzzhbizhong'), trigger: 'change' }
],Initialbalance: [
{ required: true, message: this.$t('rule.qsrcsyue'), trigger: 'blur' },
{pattern: this.$commonUtils.Regex.el_IsInventer, message: this.$t('rule.qsrzqdyue')}
],OutCharge:[
{ required: true, message: this.$t('rule.szfzeren'), trigger: 'change' },
],InCharge:[
{ required: true, message: this.$t('rule.fkfzeren'), trigger: 'change' },
],CostTypeID:[
{ required: true, message: this.$t('rule.qxzfyleixing'), trigger: 'change' },
]
},
addCuren:true,
ed:false,
loading2:false,
moneyDate:{
Money : 0,
LastR : 0,
currentR : 0,
LastM : 0,
currentM : 0,
ProfitLoss : 0
},
EmployeeMsg: {
GroupId:'',
BranchId:0,
DepartmentId:0,
PostId:0,
IsLeave:0,
},
EmployeeList:[],
EmployeeList2:[],
showEmployeeList:[],
showEmployeeList2:[],
Charge:1,
SetProfitLossMsg:{
ID:0,
AccountID:0,
EndRate:'',
TermNum:'',
CurrencyId:'',
initRate:'',
Money:'',
ProfitLoss:0,
Source:1,
CostTypeID:''
},
costType:[],
schoolMsg:{
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
SName: "",
Status: '-1'
}
}
},methods:{
regNum(n,t){ // 判断数字 n 值 t 类型
let reg = /^\d+(\.\d{0,6})?$/
if(!n)return 0
if(t==2){
if(reg.test(n)){
return Number(n)
}
return 0;
}else if(t==1){
if(reg.test(n)){
return Number(n)
}
return 0
}
}, },
Calculation(){ // 计算盈亏 addMsg: {
this.SetProfitLossMsg.CostTypeID = ''; ID: 0,
this.moneyDate.Money = this.regNum(this.SetProfitLossMsg.Money,1) Alias: '',
this.moneyDate.LastR = this.regNum(this.SetProfitLossMsg.initRate,1) TypeId: '',
this.moneyDate.currentR = this.regNum(this.SetProfitLossMsg.EndRate,2) BackId: '',
this.moneyDate.LastM = 0 Accountholder: '',
this.moneyDate.currentM = 0 Openingbank: '',
this.moneyDate.ProfitLoss = ((this.moneyDate.currentR-this.moneyDate.LastR)*this.moneyDate.Money).toFixed(2); BackNo: '',
if(this.moneyDate.ProfitLoss>0){ Initialbalance: '',
this.getTemplateCostTypeList(1) RiskLimitMoney: '',
}else if(this.moneyDate.ProfitLoss<0){ BranchList: [],
this.getTemplateCostTypeList(2) BranchIdS: 0,
}else{ OutCharge: 0,
this.costType=[]; InCharge: 0,
} RiskLowerLimitMoney: '',
AccountStartMoney: 0,
AccountStartWBMoney: 0,
BeginTimeStr: '',
}, },
getTemplateCostTypeList(t){ getCompanyMsg: {
this.apipost('financeinfo_post_GetCostTypeList',{Type:t},res=>{ RB_Group_Id: '0',
if(res.data.resultCode==1){ Status: '0',
this.costType=res.data.data;
}else{
}
},err=>{})
}, },
remoteMethod(query) { DataList: [],
if (query !== '') { total: 0,
this.loadingPeople = true currentPage: 1,
this.apipost('admin_Get_Chat_All_SelectEmpName',{EmName:query}, res => { loading: true,
if(res.data.resultCode == 1) { text: '',
this.showEmployeeList = res.data.data dialogTitle: '',
} AccountTypeList: [],
this.loadingPeople = false CompanyList: [],
}, err => {}) FinancialList: [],
} else { financeinfoList: [],
this.showEmployeeList = []; addShow: false,
noData: false,
ed: false,
rules: { //表单必填验证
Alias: [{
required: true,
message: this.$t('rule.qsrzhbieming'),
trigger: 'blur'
}],
TypeId: [{
required: true,
message: this.$t('rule.qxzzhleixing'),
trigger: 'change'
}],
BackId: [{
required: true,
message: this.$t('rule.qxzyhjigou'),
trigger: 'change'
}],
Accountholder: [{
required: true,
message: this.$t('rule.qsrkhuren'),
trigger: 'blur'
}],
Openingbank: [{
required: true,
message: this.$t('rule.qsrkhuhang'),
trigger: 'blur'
}],
BackNo: [{
required: true,
message: this.$t('rule.qssrzhhaoma'),
trigger: 'blur'
} }
}, // {pattern:/^[0-9]*$/, message: this.$t('rule.qsrzqdzhhaoma')}
remoteMethod2(query) { ],
if (query !== '') { BranchIdS: [{
this.loadingPeople = true required: true,
this.apipost('admin_Get_Chat_All_SelectEmpName',{EmName:query}, res => { message: this.$t('rule.qszssgongsi'),
if(res.data.resultCode == 1) { trigger: 'change'
this.showEmployeeList2 = res.data.data }],
} CurrencyId: [{
this.loadingPeople = false required: true,
}, err => {}) message: this.$t('rule.qxzzhbizhong'),
} else { trigger: 'change'
this.showEmployeeList2 = []; }],
Initialbalance: [{
required: true,
message: this.$t('rule.qsrcsyue'),
trigger: 'blur'
},
{
pattern: this.$commonUtils.Regex.el_IsInventer,
message: this.$t('rule.qsrzqdyue')
} }
],
OutCharge: [{
required: true,
message: this.$t('rule.szfzeren'),
trigger: 'change'
}, ],
InCharge: [{
required: true,
message: this.$t('rule.fkfzeren'),
trigger: 'change'
}, ],
CostTypeID: [{
required: true,
message: this.$t('rule.qxzfyleixing'),
trigger: 'change'
}, ]
}, },
goUrlNew (item) { addCuren: true,
let path="CompanyAccDetail"; ed: false,
this.$router.push({ name: path,query:{"TypeId":item.TypeId,'ID':item.ID, blank: "y",}}) loading2: false,
moneyDate: {
Money: 0,
LastR: 0,
currentR: 0,
LastM: 0,
currentM: 0,
ProfitLoss: 0
}, },
goUrl (path,id,name,source,CurrencyId) { EmployeeMsg: {
this.$router.push({ name: path,query:{"id":id,'name':name,'source':source,'CurrencyId':CurrencyId}}) GroupId: '',
BranchId: 0,
DepartmentId: 0,
PostId: 0,
IsLeave: 0,
}, },
disabledOption(){ // 选择公司 如果选择通用则禁用其它选项 EmployeeList: [],
if(this.addMsg.BranchIdS&&this.addMsg.BranchIdS.length==0){ EmployeeList2: [],
this.CompanyList.forEach(y=>{ showEmployeeList: [],
y.disabled=false showEmployeeList2: [],
}) Charge: 1,
return SetProfitLossMsg: {
} ID: 0,
this.addMsg.BranchIdS.forEach(x=>{ AccountID: 0,
if(x=='-1'){ EndRate: '',
this.addMsg.BranchIdS=[] TermNum: '',
this.addMsg.BranchIdS.push('-1') CurrencyId: '',
this.CompanyList.forEach(y=>{ initRate: '',
y.disabled=true Money: '',
}) ProfitLoss: 0,
} Source: 1,
}) CostTypeID: ''
},
getCurrentRate(id,index){// 更新汇率
this.apipost('financeinfo_post_GetCurrentRate',{ID:id}, res => {
if(res.data.resultCode == 1) {
this.tips(res.data.message,'success');
} else {
this.tips(res.data.message,'error');
}
}, err => {})
}, },
getfinanceinfoList(){ //获取币种列表 costType: [],
this.apipost('financeinfo_post_GetList',{Name:''},res=>{ schoolMsg: {
if(res.data.resultCode==1){ pageIndex: 1,
this.financeinfoList=res.data.data; pageSize: 12,
}else{} rowsPerPage: 12,
},err=>{}) SName: "",
}, Status: '-1'
getFinancialList(){ //获取机构列表 }
this.apipost('FinancialInstitutions_post_GetList',{},res=>{ }
if(res.data.resultCode==1){ },
this.FinancialList=res.data.data; methods: {
}else{} regNum(n, t) { // 判断数字 n 值 t 类型
},err=>{}) let reg = /^\d+(\.\d{0,6})?$/
}, if (!n) return 0
getCompanyList(){ //获取公司列表 if (t == 2) {
getSchoolPage(this.schoolMsg).then(res => { if (reg.test(n)) {
this.CompanyList = res.Data.PageData; return Number(n)
}).catch(() => { }
return 0;
}) } else if (t == 1) {
}, if (reg.test(n)) {
editCurency(id){ // 修改根据ID 获取信息 return Number(n)
this.apipost('bankaccount_post_Get',{ID:id}, res => { }
if(res.data.resultCode == 1) { return 0
let data = res.data.data; }
data.BranchIdS = data.BranchList[0].RB_Branch_Id; },
this.addMsg = data; Calculation() { // 计算盈亏
// this.disabledOption(); this.SetProfitLossMsg.CostTypeID = '';
} else { this.moneyDate.Money = this.regNum(this.SetProfitLossMsg.Money, 1)
this.tips(res.data.message,'error'); this.moneyDate.LastR = this.regNum(this.SetProfitLossMsg.initRate, 1)
} this.moneyDate.currentR = this.regNum(this.SetProfitLossMsg.EndRate, 2)
}, err => {}) this.moneyDate.LastM = 0
}, this.moneyDate.currentM = 0
cancelEdit(t){ // 取消修改、新增 this.moneyDate.ProfitLoss = ((this.moneyDate.currentR - this.moneyDate.LastR) * this.moneyDate.Money).toFixed(
this.addMsg ={ 2);
ID:0, if (this.moneyDate.ProfitLoss > 0) {
Alias:'', this.getTemplateCostTypeList(1)
TypeId:'', } else if (this.moneyDate.ProfitLoss < 0) {
BackId:'', this.getTemplateCostTypeList(2)
Accountholder:'', } else {
Openingbank:'', this.costType = [];
BackNo:'', }
Initialbalance:'', },
RiskLimitMoney:'', getTemplateCostTypeList(t) {
BranchList:[], this.apipost('financeinfo_post_GetCostTypeList', {
BranchIdS:0, Type: t
OutCharge:0, }, res => {
InCharge:0, if (res.data.resultCode == 1) {
RiskLowerLimitMoney:'', this.costType = res.data.data;
AccountStartMoney:0, } else {}
AccountStartWBMoney:0, }, err => {})
BeginTimeStr:'', },
} remoteMethod(query) {
this.SetProfitLossMsg={ if (query !== '') {
ID:0, this.loadingPeople = true
EndRate:'', this.apipost('admin_Get_Chat_All_SelectEmpName', {
TermNum:'', EmName: query
CurrencyId:'', }, res => {
initRate:'', if (res.data.resultCode == 1) {
Money:'', this.showEmployeeList = res.data.data
AccountID:0,
Source:1,
CostTypeID:''
}
if(!t){
this.addShow=false
this.ed = false
this.addCuren = true
}
this.Charge = 3;
},
getAccountTypeList() { //获取账户类型
this.apipost('AccountType_post_GetList',{}, res => {
if(res.data.resultCode == 1) {
this.AccountTypeList = res.data.data;
}
}, err => {})
},
getList(){ //获取列表
this.loading = true
this.apipost('bankaccount_post_GetPageList',this.msg,res=>{
if(res.data.resultCode==1){
this.total = res.data.data.count;
let data = res.data.data.pageData;
if(this.total>0){
this.noData =false;
}else{
this.noData =true;
}
data.forEach(x => {
x.showB = false
if(x.Initialbalance){
x.benBalance = (Number(x.CurrentRate)*x.Initialbalance).toFixed(2)
}
let allName = '';
x.BranchName.forEach(y=>{
allName = allName+y.BranchName;
})
x.allName = allName
});
this.DataList = data
this.loading = false;
}else{
this.$message.error(res.data.message)
this.loading = false;
}
},err=>{})
},
addInstitutions(){ // 保存 修改、新增
this.addMsg.BranchList = [];
if(!this.addMsg.RiskLimitMoney) {
this.addMsg.RiskLimitMoney = 0;
}
let obj = {};
obj = this.CompanyList.find(item => {
return item.SId === this.addMsg.BranchIdS; //筛选出匹配数据
});
let msg = {
ID:0,
Type:2,
RB_Branch_Id:this.addMsg.BranchIdS,
RB_BranchName:obj.SName
} }
this.addMsg.BranchList.push(msg); this.loadingPeople = false
this.apipost('bankaccount_post_Set',this.addMsg,res=>{ }, err => {})
if(res.data.resultCode == 1) { } else {
this.tips(this.$t('tips.saveYes'), "success"); this.showEmployeeList = [];
this.getList(); }
this.initAddMsg(); },
this.addShow = false remoteMethod2(query) {
} else { if (query !== '') {
this.$message.error(res.data.message) this.loadingPeople = true
} this.apipost('admin_Get_Chat_All_SelectEmpName', {
},err=>{}) EmName: query
}, }, res => {
financeinfoRemove(id,text){//删除 if (res.data.resultCode == 1) {
this.$confirm(this.$t('tips.shifoudui')+'“'+text+'”'+ this.$t('tips.zhshanchu'), this.showEmployeeList2 = res.data.data
this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning'
}).then(() => {
this.deletInstitutions(id)
}).catch(() => {
this.$message({
type: 'info',
message: this.$t('tips.cancleDelete')
});
});
},
deletInstitutions(id){
this.apipost('bankaccount_post_Remove',{ID:id},res=>{
if(res.data.resultCode == 1) {
this.innerVisible=false;
this.$message.success(res.data.message)
}else{
this.$message.error(res.data.message)
}
this.getList();
},err=>{})
},
initAddMsg(){//初始化添加、修改数据
let newMsg = {
ID:0,
Alias:'',
TypeId:'',
BackId:'',
Accountholder:'',
Openingbank:'',
BackNo:'',
Initialbalance:'',
RiskLimitMoney:'',
BranchList:[],
BranchIdS:0,
OutCharge:0,
InCharge:0,
RiskLowerLimitMoney:''
} }
this.addMsg = newMsg; this.loadingPeople = false
}, }, err => {})
SetProfitLoss(){ //币种调汇 } else {
this.apipost('FinanceInfo_post_SetProfitLoss',this.SetProfitLossMsg, res => { this.showEmployeeList2 = [];
if(res.data.resultCode == 1) { }
this.tips(res.data.message,'success'); },
this.addShow =false goUrlNew(item) {
this.addCuren = true let path = "CompanyAccDetail";
this.ed =0 this.$router.push({
} else { name: path,
this.tips(res.data.message,'error'); query: {
} "TypeId": item.TypeId,
}, err => {}) 'ID': item.ID,
blank: "y",
}
})
},
goUrl(path, id, name, source, CurrencyId) {
this.$router.push({
name: path,
query: {
"id": id,
'name': name,
'source': source,
'CurrencyId': CurrencyId
}
})
},
disabledOption() { // 选择公司 如果选择通用则禁用其它选项
if (this.addMsg.BranchIdS && this.addMsg.BranchIdS.length == 0) {
this.CompanyList.forEach(y => {
y.disabled = false
})
return
}
this.addMsg.BranchIdS.forEach(x => {
if (x == '-1') {
this.addMsg.BranchIdS = []
this.addMsg.BranchIdS.push('-1')
this.CompanyList.forEach(y => {
y.disabled = true
})
}
})
},
getCurrentRate(id, index) { // 更新汇率
this.apipost('financeinfo_post_GetCurrentRate', {
ID: id
}, res => {
if (res.data.resultCode == 1) {
this.tips(res.data.message, 'success');
} else {
this.tips(res.data.message, 'error');
}
}, err => {})
},
getfinanceinfoList() { //获取币种列表
this.apipost('financeinfo_post_GetList', {
Name: ''
}, res => {
if (res.data.resultCode == 1) {
this.financeinfoList = res.data.data;
} else {}
}, err => {})
},
getFinancialList() { //获取机构列表
this.apipost('FinancialInstitutions_post_GetList', {}, res => {
if (res.data.resultCode == 1) {
this.FinancialList = res.data.data;
} else {}
}, err => {})
},
getCompanyList() { //获取公司列表
getSchoolPage(this.schoolMsg).then(res => {
this.CompanyList = res.Data.PageData;
}).catch(() => {
}, })
submitForm(addMsg,type) {//提交创建、修改表单 },
this.$refs[addMsg].validate((valid) => { editCurency(id) { // 修改根据ID 获取信息
if (valid) { this.apipost('bankaccount_post_Get', {
if(type==1){ ID: id
this.addInstitutions() }, res => {
}else{ if (res.data.resultCode == 1) {
this.SetProfitLoss() let data = res.data.data;
} data.BranchIdS = data.BranchList[0].RB_Branch_Id;
} else { this.addMsg = data;
return false; // this.disabledOption();
} } else {
this.tips(res.data.message, 'error');
}
}, err => {})
},
cancelEdit(t) { // 取消修改、新增
this.addMsg = {
ID: 0,
Alias: '',
TypeId: '',
BackId: '',
Accountholder: '',
Openingbank: '',
BackNo: '',
Initialbalance: '',
RiskLimitMoney: '',
BranchList: [],
BranchIdS: 0,
OutCharge: 0,
InCharge: 0,
RiskLowerLimitMoney: '',
AccountStartMoney: 0,
AccountStartWBMoney: 0,
BeginTimeStr: '',
}
this.SetProfitLossMsg = {
ID: 0,
EndRate: '',
TermNum: '',
CurrencyId: '',
initRate: '',
Money: '',
AccountID: 0,
Source: 1,
CostTypeID: ''
}
if (!t) {
this.addShow = false
this.ed = false
this.addCuren = true
}
this.Charge = 3;
},
getAccountTypeList() { //获取账户类型
this.apipost('AccountType_post_GetList', {}, res => {
if (res.data.resultCode == 1) {
this.AccountTypeList = res.data.data;
}
}, err => {})
},
getList() { //获取列表
this.loading = true
this.apipost('bankaccount_post_GetPageList', this.msg, res => {
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let data = res.data.data.pageData;
if (this.total > 0) {
this.noData = false;
} else {
this.noData = true;
}
data.forEach(x => {
x.showB = false
if (x.Initialbalance) {
x.benBalance = (Number(x.CurrentRate) * x.Initialbalance).toFixed(2)
}
let allName = '';
x.BranchName.forEach(y => {
allName = allName + y.BranchName;
})
x.allName = allName
}); });
}, this.DataList = data
resetPageIndex() {//查询初始化页码 this.loading = false;
this.msg.pageIndex = 1; } else {
this.currentPage = 1 this.$message.error(res.data.message)
}, this.loading = false;
handleCurrentChange(val) {//翻页功能按钮 }
this.msg.pageIndex = val; }, err => {})
},
addInstitutions() { // 保存 修改、新增
this.addMsg.BranchList = [];
if (!this.addMsg.RiskLimitMoney) {
this.addMsg.RiskLimitMoney = 0;
}
let obj = {};
obj = this.CompanyList.find(item => {
return item.SId === this.addMsg.BranchIdS; //筛选出匹配数据
});
let msg = {
ID: 0,
Type: 2,
RB_Branch_Id: this.addMsg.BranchIdS,
RB_BranchName: obj.SName
}
this.addMsg.BranchList.push(msg);
this.apipost('bankaccount_post_Set', this.addMsg, res => {
if (res.data.resultCode == 1) {
this.tips(this.$t('tips.saveYes'), "success");
this.getList(); this.getList();
}, this.initAddMsg();
tips(msg,type) { this.addShow = false
this.$message({ } else {
message: msg, this.$message.error(res.data.message)
duration:2000, }
type: type }, err => {})
}); },
}, financeinfoRemove(id, text) { //删除
closeChangeMachie(done){ this.$confirm(this.$t('tips.shifoudui') + '“' + text + '”' + this.$t('tips.zhshanchu'),
done(); this.$t('tips.tips'), {
this.resetForm('addMsg'); confirmButtonText: this.$t('pub.sureBtn'),
}, cancelButtonText: this.$t('pub.cancelBtn'),
resetForm(formName) { type: 'warning'
this.initAddMsg(); }).then(() => {
this.$refs[formName].resetFields(); this.deletInstitutions(id)
}, }).catch(() => {
},mounted(){ this.$message({
this.getList() type: 'info',
this.getAccountTypeList() message: this.$t('tips.cancleDelete')
let userInfo=this.getLocalStorage(); });
this.getCompanyMsg.RB_Group_Id=userInfo.Group_Id; //集团ID });
this.getCompanyList() },
this.getFinancialList() deletInstitutions(id) {
this.getfinanceinfoList() this.apipost('bankaccount_post_Remove', {
} ID: id
} }, res => {
</script> if (res.data.resultCode == 1) {
this.innerVisible = false;
this.$message.success(res.data.message)
} else {
this.$message.error(res.data.message)
}
this.getList();
}, err => {})
},
initAddMsg() { //初始化添加、修改数据
let newMsg = {
ID: 0,
Alias: '',
TypeId: '',
BackId: '',
Accountholder: '',
Openingbank: '',
BackNo: '',
Initialbalance: '',
RiskLimitMoney: '',
BranchList: [],
BranchIdS: 0,
OutCharge: 0,
InCharge: 0,
RiskLowerLimitMoney: ''
}
this.addMsg = newMsg;
},
SetProfitLoss() { //币种调汇
this.apipost('FinanceInfo_post_SetProfitLoss', this.SetProfitLossMsg, res => {
if (res.data.resultCode == 1) {
this.tips(res.data.message, 'success');
this.addShow = false
this.addCuren = true
this.ed = 0
} else {
this.tips(res.data.message, 'error');
}
}, err => {})
},
submitForm(addMsg, type) { //提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
if (type == 1) {
this.addInstitutions()
} else {
this.SetProfitLoss()
}
} else {
return false;
}
});
},
resetPageIndex() { //查询初始化页码
this.msg.pageIndex = 1;
this.currentPage = 1
},
handleCurrentChange(val) { //翻页功能按钮
this.msg.pageIndex = val;
this.getList();
},
tips(msg, type) {
this.$message({
message: msg,
duration: 2000,
type: type
});
},
closeChangeMachie(done) {
done();
this.resetForm('addMsg');
},
resetForm(formName) {
this.initAddMsg();
this.$refs[formName].resetFields();
},
},
mounted() {
this.getList()
this.getAccountTypeList()
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id = userInfo.Group_Id; //集团ID
this.getCompanyList()
this.getFinancialList()
this.getfinanceinfoList()
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment