Commit f36a661e authored by 沈良进's avatar 沈良进

save

parent 34c0d083
<style> <style>
.empBankAccountTableLayer{overflow: auto; position:fixed;min-height:300px; max-height: 400px; .empBankAccountTableLayer {
z-index:50;bottom:0;left:50px;border-top:3px solid #38425d;background-color:#FFFFFF;padding: 10px 10px 0;width: 100%;} overflow: auto;
.empBankAccountTableLayer .el-form-item__label{font-size: 12px!important;} position: fixed;
.empBankAccountTableLayer>p{border-left: 3px solid #E95252; text-indent: 15px; height: 16px; padding-right: 50px; font-family: 'PingFangSc-Fine'; font-size: 16px; margin-bottom:20px; line-height: 14px; color: #000;} min-height: 300px;
.empBankAccountTable{width: 100%; min-width: 1500px; font-size:14px; color: #333; background: #ccc;} max-height: 400px;
.empBankAccountTable tr{border-bottom: 2px solid #333;} z-index: 50;
.empBankAccountTable tr th{background: #BDBDBD;height:30px; font-size: 12px; text-align: left; text-indent: 20px;} bottom: 0;
.empBankAccountTable tr{background: #fff;text-align: left;} left: 50px;
.empBankAccountTable tr:nth-child(2n+1){background: #E5E5E5;} border-top: 3px solid #38425d;
.empBankAccountTable tr td{height: 60px; padding-left:20px; border-right: 1px solid #DCDCDC; border-bottom: 1px solid #DCDCDC;} background-color: #ffffff;
.empBankAccountIcon button{width: 30px; height: 30px;border-radius:4px;} padding: 10px 10px 0;
.empBankAccountIcon .el-button--primary {padding: 5px;margin: 0;font-size: 14px!important;} width: 100%;
.empBankAccountIcon .el-button+.el-button{margin-left: 0!important;} }
.popTable{width: 80%; font-size:14px; color: #333; background: #ccc;} .empBankAccountTableLayer .el-form-item__label {
.popTable tr{border-bottom: 2px solid #333;} font-size: 12px !important;
.popTable tr th{background: #BDBDBD;height:30px; font-size: 12px; text-align: left; text-indent: 20px;} }
.popTable tr{background: #fff;text-align: left;} .empBankAccountTableLayer > p {
.popTable tr:nth-child(2n+1){background: #E5E5E5;} border-left: 3px solid #e95252;
.popTable tr td{height: 60px; padding-left:20px; border-right: 1px solid #DCDCDC; border-bottom: 1px solid #DCDCDC;} text-indent: 15px;
height: 16px;
padding-right: 50px;
font-family: "PingFangSc-Fine";
font-size: 16px;
margin-bottom: 20px;
line-height: 14px;
color: #000;
}
.empBankAccountTable {
width: 100%;
min-width: 1500px;
font-size: 14px;
color: #333;
background: #ccc;
}
.empBankAccountTable tr {
border-bottom: 2px solid #333;
}
.empBankAccountTable tr th {
background: #bdbdbd;
height: 30px;
font-size: 12px;
text-align: left;
text-indent: 20px;
}
.empBankAccountTable tr {
background: #fff;
text-align: left;
}
.empBankAccountTable tr:nth-child(2n + 1) {
background: #e5e5e5;
}
.empBankAccountTable tr td {
height: 60px;
padding-left: 20px;
border-right: 1px solid #dcdcdc;
border-bottom: 1px solid #dcdcdc;
}
.empBankAccountIcon button {
width: 30px;
height: 30px;
border-radius: 4px;
}
.empBankAccountIcon .el-button--primary {
padding: 5px;
margin: 0;
font-size: 14px !important;
}
.empBankAccountIcon .el-button + .el-button {
margin-left: 0 !important;
}
.popTable {
width: 80%;
font-size: 14px;
color: #333;
background: #ccc;
}
.popTable tr {
border-bottom: 2px solid #333;
}
.popTable tr th {
background: #bdbdbd;
height: 30px;
font-size: 12px;
text-align: left;
text-indent: 20px;
}
.popTable tr {
background: #fff;
text-align: left;
}
.popTable tr:nth-child(2n + 1) {
background: #e5e5e5;
}
.popTable tr td {
height: 60px;
padding-left: 20px;
border-right: 1px solid #dcdcdc;
border-bottom: 1px solid #dcdcdc;
}
</style> </style>
<template> <template>
<div class="flexOne"> <div class="flexOne">
<div class="empBankAccountTableLayer" v-show="outerVisible"> <div class="empBankAccountTableLayer" v-show="outerVisible">
<p> <p>
{{dialogTitle}} {{ dialogTitle }}
<span class="fr"> <span class="fr">
<button class="hollowFixedBtn" @click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button> <button
<button class="normalBtn" type="primary" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> class="hollowFixedBtn"
@click="(outerVisible = false), resetForm('addMsg')"
>
{{ $t("pub.cancelBtn") }}
</button>
<button
class="normalBtn"
type="primary"
@click="submitForm('addMsg')"
>
{{ $t("pub.saveBtn") }}
</button>
</span> </span>
</p> </p>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="90px" style="padding-right: 80px"> <el-form
<el-row > :model="addMsg"
:rules="rules"
ref="addMsg"
label-width="90px"
style="padding-right: 80px"
>
<el-row>
<el-col :span="4" :gutter="35"> <el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.zhfenlei')" prop="AccountClassify"> <el-form-item :label="$t('fnc.zhfenlei')" prop="AccountClassify">
<el-select v-model='addMsg.AccountClassify' :placeholder="$t('pub.pleaseSel')" @change='changeTitle'> <el-select
<el-option :label='$t("fnc.yinhang")' value='2' key='2'></el-option> v-model="addMsg.AccountClassify"
<el-option :label='$t("ground.xunizhanghu")' value='3' key='3'></el-option> :placeholder="$t('pub.pleaseSel')"
<el-option label='微信支付宝' value='4' key='4'></el-option> @change="changeTitle"
>
<el-option
:label="$t('fnc.yinhang')"
value="2"
key="2"
></el-option>
<el-option
:label="$t('ground.xunizhanghu')"
value="3"
key="3"
></el-option>
<el-option label="微信支付宝" value="4" key="4"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-if='addMsg.AccountClassify==2' :gutter="35"> <el-col :span="4" v-if="addMsg.AccountClassify == 2" :gutter="35">
<el-form-item :label="$t('fnc.ssjigou')" prop="BankName"> <el-form-item :label="$t('fnc.ssjigou')" prop="BankName">
<el-input type="text" v-model="addMsg.BankName" :placeholder="$t('ground.liruicbc')"></el-input> <el-input
type="text"
v-model="addMsg.BankName"
:placeholder="$t('ground.liruicbc')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-if='addMsg.AccountClassify!=3 && addMsg.AccountClassify!=4' :gutter="35"> <el-col
:span="4"
v-if="addMsg.AccountClassify != 3 && addMsg.AccountClassify != 4"
:gutter="35"
>
<el-form-item :label="nameA" prop="OpenBankName"> <el-form-item :label="nameA" prop="OpenBankName">
<el-input type="text" v-model="addMsg.OpenBankName" :placeholder="$t('ground.liruzhihang')"></el-input> <el-input
type="text"
v-model="addMsg.OpenBankName"
:placeholder="$t('ground.liruzhihang')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-if='addMsg.AccountClassify!=3 && addMsg.AccountClassify!=4' :gutter="35"> <el-col
:span="4"
v-if="addMsg.AccountClassify != 3 && addMsg.AccountClassify != 4"
:gutter="35"
>
<el-form-item :label="nameB" prop="AccountHolder"> <el-form-item :label="nameB" prop="AccountHolder">
<el-input type="text" v-model="addMsg.AccountHolder"></el-input> <el-input type="text" v-model="addMsg.AccountHolder"></el-input>
</el-form-item> </el-form-item>
...@@ -61,129 +186,248 @@ ...@@ -61,129 +186,248 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" :gutter="35"> <el-col :span="4" :gutter="35">
<el-form-item :label="nameD" prop="AccountAlias" > <el-form-item :label="nameD" prop="AccountAlias">
<el-input type="text" v-model="addMsg.AccountAlias"></el-input> <el-input type="text" v-model="addMsg.AccountAlias"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" :gutter="35"> <el-col :span="4" :gutter="35">
<el-form-item :label="nameE" prop="Type" > <el-form-item :label="nameE" prop="Type">
<el-select filterable v-model='addMsg.Type' :placeholder="$t('fnc.khleixing')" class="w135 _border_b_1"> <el-select
<el-option v-for='item in ClientTypeList' filterable
:label='item.Name' v-model="addMsg.Type"
:value='item.ID' :placeholder="$t('fnc.khleixing')"
:key='item.ID'> class="w135 _border_b_1"
>
<el-option
v-for="item in ClientTypeList"
:label="item.Name"
:value="item.ID"
:key="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div v-if="accountList.length" style="padding: 20px; display: flex; justify-content: center; align-items: center;flex-direction: column"> <div
v-if="accountList.length"
style="
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
"
>
<div style="padding: 10px">已存在相同的账户信息</div> <div style="padding: 10px">已存在相同的账户信息</div>
<table class="popTable" border="0" cellspacing="0" cellpadding="0"> <table class="popTable" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<th>{{$t("ground.zhanghumingcheng")}}</th> <th>{{ $t("ground.zhanghumingcheng") }}</th>
<th>{{$t("fnc.w_zhbieming")}}</th> <th>{{ $t("fnc.w_zhbieming") }}</th>
<th>{{$t("ground.zhanghuleibie")}}</th> <th>{{ $t("ground.zhanghuleibie") }}</th>
<th>{{$t("ground.suoshujigou")}}</th> <th>{{ $t("ground.suoshujigou") }}</th>
<th>{{$t("fnc.acc")}}</th> <th>{{ $t("fnc.acc") }}</th>
</tr> </tr>
<tr v-for="(item,index) in accountList"> <tr v-for="(item, index) in accountList">
<td>{{item.OpenBankName}}</td> <td>{{ item.OpenBankName }}</td>
<td>{{item.AccountAlias}}</td> <td>{{ item.AccountAlias }}</td>
<td> <td>
<span v-if="item.AccountClassify==1">{{$t('fnc.a_ptzhanghu')}}</span> <span v-if="item.AccountClassify == 1">{{
<span v-if="item.AccountClassify==2">银行账户</span> $t("fnc.a_ptzhanghu")
<span v-if="item.AccountClassify==3">虚拟账户</span> }}</span>
<span v-if="item.AccountClassify==4">微信支付宝</span> <span v-if="item.AccountClassify == 2">银行账户</span>
<span v-if="item.AccountClassify == 3">虚拟账户</span>
<span v-if="item.AccountClassify == 4">微信支付宝</span>
</td> </td>
<td>{{item.BankName}}</td> <td>{{ item.BankName }}</td>
<td>{{item.CardNum}} <td>{{ item.CardNum }} <br />{{ item.AccountHolder }}</td>
<br/>{{item.AccountHolder}}</td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </div>
<div style="display: flex">
<div style="padding: 10px"> <div style="padding: 10px">
客户类型: 客户类型:
<el-select filterable v-model='msg.Type' :placeholder="$t('fnc.khleixing')" @change="getList" class="w135 _border_b_1"> <el-select
filterable
v-model="msg.Type"
:placeholder="$t('fnc.khleixing')"
class="w135 _border_b_1"
>
<el-option label="不限" value="" key="0"> </el-option>
<el-option <el-option
label='不限' v-for="item in ClientTypeList"
value='' :label="item.Name"
key='0'> :value="item.ID"
</el-option> :key="item.ID"
<el-option v-for='item in ClientTypeList' >
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div style="padding: 10px">
账户分类:
<el-select
v-model="msg.AccountClassify"
:placeholder="$t('pub.pleaseSel')"
@change="changeTitle"
>
<el-option label="不限" value="" key="0"> </el-option>
<el-option
:label="$t('fnc.yinhang')"
value="2"
key="2"
></el-option>
<el-option
:label="$t('ground.xunizhanghu')"
value="3"
key="3"
></el-option>
<el-option label="微信支付宝" value="4" key="4"></el-option>
</el-select>
</div>
<div style="padding: 10px;display: flex">
<div style="flex-shrink: 0; margin: 5px 5px 0 0">关键字:</div>
<el-input
type="text"
v-model="msg.KeyWord"
></el-input>
</div>
</div>
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
<input type="button" @click="outerVisible = true,dialogTitle=$t('ground.xinzengzhanghu'),resetForm('addMsg')" class="normalBtn" :value="$t('pub.addBtn')" /> <input
type="button"
@click="getList"
class="normalBtn"
value="查询"
/>
<input
type="button"
@click="
(outerVisible = true),
(dialogTitle = $t('ground.xinzengzhanghu')),
resetForm('addMsg')
"
class="normalBtn"
:value="$t('pub.addBtn')"
/>
</li> </li>
</ul> </ul>
</div> </div>
<table class="empBankAccountTable" border="0" cellspacing="0" cellpadding="0"> <table
class="empBankAccountTable"
border="0"
cellspacing="0"
cellpadding="0"
>
<tr> <tr>
<th>{{$t("fnc.khleixing")}}</th> <th>{{ $t("fnc.khleixing") }}</th>
<th>{{$t("ground.zhanghumingcheng")}}</th> <th>{{ $t("ground.zhanghumingcheng") }}</th>
<th>{{$t("fnc.w_zhbieming")}}</th> <th>{{ $t("fnc.w_zhbieming") }}</th>
<th>{{$t("ground.zhanghuleibie")}}</th> <th>{{ $t("ground.zhanghuleibie") }}</th>
<th>{{$t("ground.suoshujigou")}}</th> <th>{{ $t("ground.suoshujigou") }}</th>
<th>{{$t("fnc.acc")}}</th> <th>{{ $t("fnc.acc") }}</th>
<th>{{$t("admin.admin_status")}}</th> <th>{{ $t("admin.admin_status") }}</th>
<th>{{$t("ground.leijijiaoyi")}}</th> <th>{{ $t("ground.leijijiaoyi") }}</th>
<th>{{$t("admin.admin_operate")}}</th> <th>{{ $t("admin.admin_operate") }}</th>
</tr> </tr>
<tr v-for="(item,index) in list"> <tr v-for="(item, index) in list">
<td>{{item.TypeName}}</td> <td>{{ item.TypeName }}</td>
<td>{{item.OpenBankName}}</td> <td>{{ item.OpenBankName }}</td>
<td>{{item.AccountAlias}}</td> <td>{{ item.AccountAlias }}</td>
<td> <td>
<span v-if="item.AccountClassify==1">{{$t('fnc.a_ptzhanghu')}}</span> <span v-if="item.AccountClassify == 1">{{
<span v-if="item.AccountClassify==2">银行账户</span> $t("fnc.a_ptzhanghu")
<span v-if="item.AccountClassify==3">虚拟账户</span> }}</span>
<span v-if="item.AccountClassify==4">微信支付宝</span> <span v-if="item.AccountClassify == 2">银行账户</span>
<span v-if="item.AccountClassify == 3">虚拟账户</span>
<span v-if="item.AccountClassify == 4">微信支付宝</span>
</td> </td>
<td>{{item.BankName}}</td> <td>{{ item.BankName }}</td>
<td>{{item.CardNum}} <td>{{ item.CardNum }} <br />{{ item.AccountHolder }}</td>
<br/>{{item.AccountHolder}}</td>
<td> <td>
<span v-if='item.Status!=0' style="color: #E95252;">{{$t('pub.fressSel')}}</span> <span v-if="item.Status != 0" style="color: #e95252">{{
<span v-if='item.Status==0' style="color: #09D49D;">{{$t('pub.normalSel')}}</span> $t("pub.fressSel")
}}</span>
<span v-if="item.Status == 0" style="color: #09d49d">{{
$t("pub.normalSel")
}}</span>
</td> </td>
<td style="color: #FF9C00;">{{moneyFormat(item.PayMoney)}}</td> <td style="color: #ff9c00">{{ moneyFormat(item.PayMoney) }}</td>
<td class="empBankAccountIcon"> <td class="empBankAccountIcon">
<el-button-group> <el-button-group>
<el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top-start"> <el-tooltip
<el-button @click="outerVisible = true,dialogTitle=$t('ground.xiugaizhanghu'),updateData(item.ID)" type="primary" style='background:#409EFF; border-color:#409EFF' icon="iconfont icon-bianji-smal" ></el-button> class="item"
effect="dark"
:content="$t('pub.updateMsg')"
placement="top-start"
>
<el-button
@click="
(outerVisible = true),
(dialogTitle = $t('ground.xiugaizhanghu')),
updateData(item.ID)
"
type="primary"
style="background: #409eff; border-color: #409eff"
icon="iconfont icon-bianji-smal"
></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="item.Status=='1'? $t('fnc.qiyong'):$t('pub.fressSel')" placement="top-start"> <el-tooltip
<el-button v-if='item.Status==1' @click="deleteData(item.ID)" type="primary" style='background:#09D49D; border-color:#09D49D' icon="iconfont icon-qidong" ></el-button> class="item"
<el-button v-if='item.Status==0' @click="deleteData(item.ID)" type="primary" style='background:#E95252; border-color:#E95252' icon="iconfont icon-dongjie" ></el-button> effect="dark"
:content="
item.Status == '1' ? $t('fnc.qiyong') : $t('pub.fressSel')
"
placement="top-start"
>
<el-button
v-if="item.Status == 1"
@click="deleteData(item.ID)"
type="primary"
style="background: #09d49d; border-color: #09d49d"
icon="iconfont icon-qidong"
></el-button>
<el-button
v-if="item.Status == 0"
@click="deleteData(item.ID)"
type="primary"
style="background: #e95252; border-color: #e95252"
icon="iconfont icon-dongjie"
></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('ground.mingxi')" placement="top-start"> <el-tooltip
<el-button type="primary" style='background:#E6A014; border-color:#E6A014' icon="iconfont icon-rizhi1" ></el-button> class="item"
effect="dark"
:content="$t('ground.mingxi')"
placement="top-start"
>
<el-button
type="primary"
style="background: #e6a014; border-color: #e6a014"
icon="iconfont icon-rizhi1"
></el-button>
</el-tooltip> </el-tooltip>
</el-button-group> </el-button-group>
</td> </td>
</tr> </tr>
</table> </table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total> <el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="msg.pageSize"
:total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
accountList: [], accountList: [],
...@@ -193,61 +437,66 @@ ...@@ -193,61 +437,66 @@
nameC: this.$t("ground.kahao"), nameC: this.$t("ground.kahao"),
nameD: this.$t("fnc.accBming"), nameD: this.$t("fnc.accBming"),
nameE: this.$t("fnc.khleixing"), nameE: this.$t("fnc.khleixing"),
switchValue:'1', switchValue: "1",
dialogTitle: '', dialogTitle: "",
insideDialogTxt: this.$t("tips.saveYes"), insideDialogTxt: this.$t("tips.saveYes"),
outerVisible: false, outerVisible: false,
innerVisible: false, innerVisible: false,
isRight:true, isRight: true,
versions: [], versions: [],
total: 0, total: 0,
currentPage: 1, currentPage: 1,
//请求数据 //请求数据
msg:{ msg: {
BranchId:'-1', BranchId: "-1",
EmpId:0, EmpId: 0,
BankId:'', BankId: "",
AccountHolder:'', AccountHolder: "",
AccountAlias:'', AccountAlias: "",
pageIndex:1, pageIndex: 1,
pageSize:15, pageSize: 15,
Type:'', Type: "",
}, },
getCompanyMsg:{ getCompanyMsg: {
RB_Group_Id:'0', RB_Group_Id: "0",
Status:'0', Status: "0",
}, },
getUserMsg:{ getUserMsg: {
RB_Branch_id:'-1', RB_Branch_id: "-1",
}, },
//返回数据 //返回数据
list:[], list: [],
bankList:[], bankList: [],
layerItem:[], layerItem: [],
addMsg:{ addMsg: {
Id:'0', Id: "0",
ObjID:'-1', ObjID: "-1",
BankId:'-1', BankId: "-1",
OpenBankName:'', OpenBankName: "",
BankName: '', BankName: "",
AccountHolder:'', AccountHolder: "",
CardNum:'', CardNum: "",
AccountAlias:'', AccountAlias: "",
AccountType:'1', AccountType: "1",
AccountClassify:'2', AccountClassify: "2",
Type:'9', Type: "",
},
rules: {
BankName: [
{
required: true,
message: this.$t("ground.qingtianxieyh"),
trigger: "blur",
}, },
rules:{
BankName:[
{ required: true, message: this.$t("ground.qingtianxieyh"), trigger: 'blur' }
], ],
} },
} };
}, },
mounted() { mounted() {
let userInfo=this.getLocalStorage(); let userInfo = this.getLocalStorage();
// let id = this.$route.query.type ? Number(this.$route.query.type) : 0 // let id = this.$route.query.type ? Number(this.$route.query.type) : 0
this.getUserMsg.RB_Group_id=this.getCompanyMsg.RB_Group_Id=userInfo.RB_Group_id; //集团ID this.getUserMsg.RB_Group_id = this.getCompanyMsg.RB_Group_Id =
userInfo.RB_Group_id; //集团ID
// this.msg.EmpId=0; // this.msg.EmpId=0;
// this.msg.Type= id; // this.msg.Type= id;
// this.addMsg.ObjID=this.$route.query.id || 0; // this.addMsg.ObjID=this.$route.query.id || 0;
...@@ -258,44 +507,57 @@ ...@@ -258,44 +507,57 @@
this.financeinfo_post_GetClientTypeList(); this.financeinfo_post_GetClientTypeList();
}, },
methods: { methods: {
financeinfo_post_GetClientTypeList(){ // 获取对象类型 financeinfo_post_GetClientTypeList() {
this.apipost('financeinfo_post_GetClientTypeList',{}, res => { // 获取对象类型
if(res.data.resultCode == 1) { this.apipost(
"financeinfo_post_GetClientTypeList",
{},
(res) => {
if (res.data.resultCode == 1) {
this.ClientTypeList = res.data.data; this.ClientTypeList = res.data.data;
} }
}, err => {})
}, },
changeTitle(){ (err) => {}
if(this.addMsg.AccountClassify==1){ );
this.nameA= this.$t("ground.pingtaimingcheng") },
this.nameB= this.$t("ground.yonghumingcheng") changeTitle() {
this.nameC= this.$t("fnc.ptAcc") if (this.addMsg.AccountClassify == 1) {
this.nameD= this.$t("fnc.accBming") this.nameA = this.$t("ground.pingtaimingcheng");
this.addMsg.AccountType='1' this.nameB = this.$t("ground.yonghumingcheng");
}else if(this.addMsg.AccountClassify==2){ this.nameC = this.$t("fnc.ptAcc");
this.nameA= this.$t("ground.zhanghumingcheng2") this.nameD = this.$t("fnc.accBming");
this.nameB= this.$t("fnc.khuren") this.addMsg.AccountType = "1";
this.nameC= this.$t("ground.kahao") } else if (this.addMsg.AccountClassify == 2) {
this.nameD= this.$t("fnc.accBming") this.nameA = this.$t("ground.zhanghumingcheng2");
}else if(this.addMsg.AccountClassify==3){ this.nameB = this.$t("fnc.khuren");
this.nameA= this.$t("ground.pingtaimingcheng") this.nameC = this.$t("ground.kahao");
this.nameB= this.$t("ground.yonghumingcheng") this.nameD = this.$t("fnc.accBming");
this.nameC= this.$t("fnc.ptAcc") } else if (this.addMsg.AccountClassify == 3) {
this.nameD= this.$t("fnc.accBming") this.nameA = this.$t("ground.pingtaimingcheng");
}else if(this.addMsg.AccountClassify==4){ this.nameB = this.$t("ground.yonghumingcheng");
this.nameA= this.$t("ground.pingtaimingcheng") this.nameC = this.$t("fnc.ptAcc");
this.nameB= this.$t("ground.yonghumingcheng") this.nameD = this.$t("fnc.accBming");
this.nameC= "账号" } else if (this.addMsg.AccountClassify == 4) {
this.nameD= "名称" this.nameA = this.$t("ground.pingtaimingcheng");
this.nameB = this.$t("ground.yonghumingcheng");
this.nameC = "账号";
this.nameD = "名称";
} }
}, },
getList() { //获取列表数据 getList() {
this.apipost("admin_get_GetEmpBankAccountPageList", this.msg, res => { //获取列表数据
if(res.data.resultCode==1){ this.apipost(
"admin_get_GetEmpBankAccountPageList",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
this.list = res.data.data.pageData; this.list = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
}else{} } else {
}, err => {}) }
},
(err) => {}
);
}, },
// getCompany(){ // getCompany(){
// this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{ // this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{
...@@ -304,91 +566,125 @@ ...@@ -304,91 +566,125 @@
// }else{} // }else{}
// },err=>{}) // },err=>{})
// }, // },
getBank(){ getBank() {
this.apipost('FinancialInstitutions_post_GetList',{Type:0},res=>{ this.apipost(
if(res.data.resultCode==1){ "FinancialInstitutions_post_GetList",
this.bankList=res.data.data; { Type: 0 },
}else{} (res) => {
},err=>{}) if (res.data.resultCode == 1) {
this.bankList = res.data.data;
} else {
}
},
(err) => {}
);
}, },
addData(){ //添加角色 addData() {
this.addMsg.ObjID=this.$route.query.id; //添加角色
if(this.addMsg.AccountClassify!='3' && this.addMsg.AccountClassify!='4'){ this.addMsg.ObjID = this.$route.query.id;
if(this.addMsg.OpenBankName==''){ if (
this.$message.error(this.$t('visaT.Pleasefillin')+this.nameA) this.addMsg.AccountClassify != "3" &&
return this.addMsg.AccountClassify != "4"
) {
if (this.addMsg.OpenBankName == "") {
this.$message.error(this.$t("visaT.Pleasefillin") + this.nameA);
return;
} }
if(this.addMsg.AccountHolder==''){ if (this.addMsg.AccountHolder == "") {
this.$message.error(this.$t('visaT.Pleasefillin')+this.nameB) this.$message.error(this.$t("visaT.Pleasefillin") + this.nameB);
return return;
} }
} }
if(this.addMsg.CardNum==''){ if (this.addMsg.CardNum == "") {
this.$message.error(this.$t('visaT.Pleasefillin')+this.nameC) this.$message.error(this.$t("visaT.Pleasefillin") + this.nameC);
return return;
} }
if(this.addMsg.AccountAlias==''){ if (this.addMsg.AccountAlias == "") {
this.$message.error(this.$t('visaT.Pleasefillin')+this.nameD) this.$message.error(this.$t("visaT.Pleasefillin") + this.nameD);
return return;
} }
// 查询是否有冲突的账户信息 // 查询是否有冲突的账户信息
this.checkCanAdd() this.checkCanAdd();
}, },
addAccount() { addAccount() {
this.apipost("admin_post_SetEmpBankAccount",this.addMsg,res=>{ this.apipost(
if(res.data.resultCode==1) "admin_post_SetEmpBankAccount",
{ this.addMsg,
this.$message.success(res.data.message) (res) => {
this.outerVisible=false; if (res.data.resultCode == 1) {
this.getList() this.$message.success(res.data.message);
this.resetForm('addMsg'); this.outerVisible = false;
}else{ this.getList();
this.$message.error(res.data.message) this.resetForm("addMsg");
} else {
this.$message.error(res.data.message);
} }
},
},err=>{})}, (err) => {}
);
},
checkCanAdd() { checkCanAdd() {
this.apipost('admin_post_GetBackAccount',{RB_Group_Id: this.addMsg.ObjID, ...this.addMsg},res=>{ this.apipost(
if(res.data.resultCode==1){ "admin_post_GetBackAccount",
if(res.data.data && res.data.data.length) { { RB_Group_Id: this.addMsg.ObjID, ...this.addMsg },
this.accountList = res.data.data (res) => {
if (res.data.resultCode == 1) {
if (res.data.data && res.data.data.length) {
this.accountList = res.data.data;
} else {
this.addAccount();
}
} else { } else {
this.addAccount() this.$message.error(res.data.message);
} }
}else{
this.$message.error(res.data.message)}
},err=>{})
}, },
updateData(id){ //修改角色 (err) => {}
this.apipost('admin_get_GetEmpBackAccount',{BAId:id},res=>{ );
if(res.data.resultCode==1){ },
updateData(id) {
//修改角色
this.apipost(
"admin_get_GetEmpBackAccount",
{ BAId: id },
(res) => {
if (res.data.resultCode == 1) {
this.addMsg = res.data.data; this.addMsg = res.data.data;
this.addMsg.AccountType=res.data.data.AccountType.toString(); this.addMsg.AccountType = res.data.data.AccountType.toString();
this.addMsg.AccountClassify=res.data.data.AccountClassify.toString(); this.addMsg.AccountClassify =
this.addMsg.BankId=res.data.data.BankId res.data.data.AccountClassify.toString();
this.changeTitle() this.addMsg.BankId = res.data.data.BankId;
}else{} this.changeTitle();
},err=>{}) } else {
// this.addMsg = this.dataList[index] }
// this.addMsg.Status = this.dataList[index].Status.toString(); },
(err) => {}
);
// this.addMsg = this.dataList[index]
// this.addMsg.Status = this.dataList[index].Status.toString();
},
deleteData(id) {
this.$confirm(this.$t("ground.querenqiyong"), "提示", {
confirmButtonText: this.$t("pub.sureBtn"),
cancelButtonText: this.$t("pub.cancelBtn"),
type: "warning",
})
.then(() => {
this.apipost(
"admin_post_DelEmpBankAccount",
{
BAId: id,
}, },
deleteData(id){ (res) => {
this.$confirm(this.$t('ground.querenqiyong'), '提示', { if (res.data.resultCode == 1) {
confirmButtonText: this.$t('pub.sureBtn'), this.$message.success(thi.$t("pub.saveYes"));
cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning'
}).then(() => {
this.apipost('admin_post_DelEmpBankAccount', {
BAId:id
}, res => {
if(res.data.resultCode == 1) {
this.$message.success(thi.$t('pub.saveYes'))
this.getList(); this.getList();
} }
}, err => {}) },
(err) => {}
}).catch(() => { );
this.$message.info(this.$t('ground.yiquxiao')) })
.catch(() => {
this.$message.info(this.$t("ground.yiquxiao"));
}); });
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -397,37 +693,38 @@ ...@@ -397,37 +693,38 @@
}, },
resetPageIndex() { resetPageIndex() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.currentPage = 1 this.currentPage = 1;
}, },
submitForm(addMsg) {//提交创建、修改表单 submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate((valid) => { this.$refs[addMsg].validate((valid) => {
if (valid) { if (valid) {
this.addData(); this.addData();
} else { } else {
return false; return false;
} }
}); });
}, },
closeChangeMachie(done){//弹出框关闭初始化弹框内表单 closeChangeMachie(done) {
//弹出框关闭初始化弹框内表单
done(); done();
this.resetForm('addMsg'); this.resetForm("addMsg");
}, },
resetForm(formName) {//弹出框取消 初始化谈框内表单 resetForm(formName) {
this.accountList = [] //弹出框取消 初始化谈框内表单
this.accountList = [];
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.addMsg.AccountType='1'; this.addMsg.AccountType = "1";
this.addMsg.AccountClassify='2'; this.addMsg.AccountClassify = "2";
this.addMsg.Id='0'; this.addMsg.Id = "0";
this.addMsg.ObjID='-1'; this.addMsg.ObjID = "-1";
this.addMsg.BankId='-1'; this.addMsg.BankId = "-1";
this.addMsg.OpenBankName=''; this.addMsg.OpenBankName = "";
this.addMsg.BankName=''; this.addMsg.BankName = "";
this.addMsg.AccountHolder=''; this.addMsg.AccountHolder = "";
this.addMsg.CardNum=''; this.addMsg.CardNum = "";
this.addMsg.AccountAlias=''; this.addMsg.AccountAlias = "";
},
} },
} };
}
</script> </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