Commit 7626ef2a authored by 黄奎's avatar 黄奎

页面修改

parent e7710c73
<style>
.empBankAccountTableLayer{overflow: auto; position:fixed;height:200px;
z-index:50;bottom:0;left:50px;border-top:3px solid #38425d;background-color:#FFFFFF;padding: 10px 10px 0;width: 100%;}
.empBankAccountTableLayer .el-form-item__label{font-size: 12px!important;}
.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;}
.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;}
.empBankAccountTableLayer {
overflow: auto;
position: fixed;
height: 200px;
z-index: 50;
bottom: 0;
left: 50px;
border-top: 3px solid #38425d;
background-color: #FFFFFF;
padding: 10px 10px 0;
width: 100%;
}
.empBankAccountTableLayer .el-form-item__label {
font-size: 12px !important;
}
.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;
}
.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;
}
.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{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;}
.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;
}
.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;
}
.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;}
</style>
<template>
<div class="flexOne">
......@@ -29,12 +124,13 @@
{{dialogTitle}}
<span style="font-size:12px;color:red;">*如果是个人则无需填写税号,如是供应商则必填税号;</span>
<span class="fr">
<button class="hollowFixedBtn" @click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button>
<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>
</p>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="90px" style="padding-right: 80px">
<el-row >
<el-row>
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.zhfenlei')" prop="AccountClassify">
<el-select v-model='addMsg.AccountClassify' :placeholder="$t('pub.pleaseSel')" @change='changeTitle'>
......@@ -62,70 +158,47 @@
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item :label="nameC" prop="CardNum" >
<el-input type="text" v-model="addMsg.CardNum" onkeyup="value=value.replace(/[^\w\u4E00-\u9FA5]/g, '')" placeholder="卡号请输入中文、数字、字母"></el-input>
<el-form-item :label="nameC" prop="CardNum">
<el-input type="text" v-model="addMsg.CardNum" @keyup.native="replaceSpace" placeholder="卡号请输入中文、数字、字母">
</el-input>
</el-form-item>
</el-col>
<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-form-item>
</el-col>
<el-col :span="4" :gutter="35" v-if="ClientTypeList&&ClientTypeList.length>0">
<el-form-item label="客户类型" prop="Type">
<el-select
filterable
v-model="addMsg.Type"
:placeholder="$t('fnc.khleixing')"
@change="getType"
>
<el-option
v-for="item in ClientTypeList"
:label="item.Name"
:value="item.ID"
:key="item.ID"
>
<el-select filterable v-model="addMsg.Type" :placeholder="$t('fnc.khleixing')" @change="getType">
<el-option v-for="item in ClientTypeList" :label="item.Name" :value="item.ID" :key="item.ID">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" v-if="addMsg.Type!=0&&addMsg.Type!=10&&ClientTypeList.length>0">
<el-form-item label="客户名称" prop="ObjID">
<el-select
filterable
remote
reserve-keyword
v-model="addMsg.ObjID"
:remote-method="remoteMethod"
@change="getObjName"
:loading="supplierLoading"
placeholder="请输入关键词"
>
<el-option
v-for="(item,index) in supplierList"
:label="item.Name"
:value="item.ID"
:key="index"
>
<el-select filterable remote reserve-keyword v-model="addMsg.ObjID" :remote-method="remoteMethod"
@change="getObjName" :loading="supplierLoading" placeholder="请输入关键词">
<el-option v-for="(item,index) in supplierList" :label="item.Name" :value="item.ID" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="税号:" prop="DutyNo" >
<el-form-item label="税号:" prop="DutyNo">
<el-input type="text" v-model="addMsg.DutyNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="供应商:" prop="SupplierName" >
<el-form-item label="供应商:" prop="SupplierName">
<el-input type="text" v-model="addMsg.SupplierName"></el-input>
</el-form-item>
</el-col>
</el-row>
</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>
<table class="popTable" border="0" cellspacing="0" cellpadding="0">
<tr>
......@@ -150,7 +223,7 @@
</td>
<td>{{item.BankName}}</td>
<td>{{item.CardNum}}
<br/>{{item.AccountHolder}}</td>
<br />{{item.AccountHolder}}</td>
<td>{{ item.TypeName }}</td>
<td>
{{item.CreateByName?item.CreateByName:'-'}}
......@@ -160,25 +233,12 @@
<span v-if='item.Status!=0' style="color: #E95252;">{{$t('pub.fressSel')}}</span>
<span v-if='item.Status==0' style="color: #09D49D;">{{$t('pub.normalSel')}}</span>
</td>
<td class="empBankAccountIcon" v-if="addMsg.Type==8">
<el-button-group>
<el-tooltip
class="item"
effect="dark"
content="绑定"
placement="top-start"
>
<el-button v-if="item.Type == 10"
@click="bindData(item.ID)"
type="primary"
style="background: #09d49d; border-color: #09d49d"
icon="iconfont icon-bianji-smal"
></el-button>
<el-tooltip class="item" effect="dark" content="绑定" placement="top-start">
<el-button v-if="item.Type == 10" @click="bindData(item.ID)" type="primary"
style="background: #09d49d; border-color: #09d49d" icon="iconfont icon-bianji-smal"></el-button>
</el-tooltip>
</el-button-group>
</td>
</tr>
......@@ -189,41 +249,21 @@
<ul>
<li>
<span style="margin-left: 80px"><em>账户分类</em>
<el-select
v-model="msg.AccountClassify"
:placeholder="$t('pub.pleaseSel')"
@change="changeTitle"
>
<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="$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>
</span>
</li>
<li>
<span><em>关键字</em>
<el-input
type="text"
v-model="msg.KeyWord"
></el-input>
<el-input type="text" v-model="msg.KeyWord"></el-input>
</span>
</li>
<li>
<input
type="button"
@click="getList"
class="normalBtn"
value="查询"
/>
<input type="button" @click="getList" class="normalBtn" value="查询" />
<input type="button" @click="AddAccountBank" class="normalBtn" :value="$t('pub.addBtn')" />
</li>
</ul>
......@@ -250,7 +290,7 @@
</td>
<td>{{item.BankName}}</td>
<td>{{item.CardNum}}
<br/>{{item.AccountHolder}}</td>
<br />{{item.AccountHolder}}</td>
<td>
<span v-if='item.Status!=0' style="color: #E95252;">{{$t('pub.fressSel')}}</span>
<span v-if='item.Status==0' style="color: #09D49D;">{{$t('pub.normalSel')}}</span>
......@@ -260,29 +300,29 @@
<el-button-group>
<el-tooltip 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>
type="primary" style='background:#409EFF; border-color:#409EFF' icon="iconfont icon-bianji-smal">
</el-button>
</el-tooltip>
<el-tooltip class="item" 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 class="item" 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 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-button type="primary" style='background:#E6A014; border-color:#E6A014' icon="iconfont icon-rizhi1">
</el-button>
</el-tooltip>
</el-button-group>
</td>
</tr>
</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>
</div>
</template>
<script>
export default {
data() {
......@@ -291,15 +331,15 @@
supplierLoading: false,
supplierList: [],
supplierMsg: {
pageIndex:1,
pageSize:1000,
Name:"",
Contact:"",
pageIndex: 1,
pageSize: 1000,
Name: "",
Contact: "",
Type: "",
CountryStr:"",
ProvinceStr:"",
CityStr:"",
DistrictStr:""
CountryStr: "",
ProvinceStr: "",
CityStr: "",
DistrictStr: ""
},
loading: true,
accountList: [],
......@@ -307,84 +347,80 @@
nameB: this.$t("fnc.khuren"),
nameC: this.$t("ground.kahao"),
nameD: this.$t("fnc.accBming"),
switchValue:'1',
switchValue: '1',
dialogTitle: '',
insideDialogTxt: this.$t("tips.saveYes"),
outerVisible: false,
innerVisible: false,
isRight:true,
isRight: true,
versions: [],
total: 0,
currentPage: 1,
//请求数据
msg:{
BranchId:'-1',
EmpId:'-1',
BankId:'',
AccountHolder:'',
AccountAlias:'',
pageIndex:1,
pageSize:15,
Type:'',
msg: {
BranchId: '-1',
EmpId: '-1',
BankId: '',
AccountHolder: '',
AccountAlias: '',
pageIndex: 1,
pageSize: 15,
Type: '',
AccountClassify: '',
KeyWord: ''
},
getCompanyMsg:{
RB_Group_Id:'0',
Status:'0',
getCompanyMsg: {
RB_Group_Id: '0',
Status: '0',
},
getUserMsg:{
RB_Branch_id:'-1',
getUserMsg: {
RB_Branch_id: '-1',
},
//返回数据
list:[],
bankList:[],
layerItem:[],
addMsg:{
Id:'0',
ObjID:'-1',
BankId:'-1',
OpenBankName:'',
list: [],
bankList: [],
layerItem: [],
addMsg: {
Id: '0',
ObjID: '-1',
BankId: '-1',
OpenBankName: '',
BankName: '',
AccountHolder:'',
CardNum:'',
AccountAlias:'',
AccountType:'1',
AccountClassify:'2',
Type:'9',
DutyNo:'',
SupplierName:'',
AccountHolder: '',
CardNum: '',
AccountAlias: '',
AccountType: '1',
AccountClassify: '2',
Type: '9',
DutyNo: '',
SupplierName: '',
},
rules:{
BankName:[
{ required: true, message: this.$t("ground.qingtianxieyh"), trigger: 'blur' }
],
Type:[
{
rules: {
BankName: [{
required: true,
message: this.$t("ground.qingtianxieyh"),
trigger: 'blur'
}],
Type: [{
required: true,
message: '请选择客户类型',
trigger: "chang",
},
],
ObjID:[
{
}, ],
ObjID: [{
required: true,
message: '请选择客户名称',
trigger: "chang",
},
]
}, ]
}
}
},
mounted() {
let userInfo=this.getLocalStorage();
this.getUserMsg.RB_Group_id=this.getCompanyMsg.RB_Group_Id=userInfo.RB_Group_id; //集团ID
this.msg.EmpId=this.$route.query.id;
this.msg.Type=this.$route.query.type;
this.addMsg.Type=Number(this.$route.query.type);
// this.addMsg.ObjID=this.$route.query.id;
if(this.$route.query.type==10){
let userInfo = this.getLocalStorage();
this.getUserMsg.RB_Group_id = this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID
this.msg.EmpId = this.$route.query.id;
this.msg.Type = this.$route.query.type;
this.addMsg.Type = Number(this.$route.query.type);
if (this.$route.query.type == 10) {
this.financeinfo_post_GetClientTypeList()
}
this.getBank();
......@@ -392,26 +428,30 @@
this.changeTitle()
},
methods: {
//替换卡号里面的空格
replaceSpace(event) {
// onkeyup="value=value.replace(/[^\w\u4E00-\u9FA5]/g,'')"
this.addMsg.CardNum = event.target.value.replace(/ /g, ''); // 将所有空格替换为空字符串
},
// 获取客户类型
getType(){
getType() {
this.supplierList = []
if(this.addMsg.Type==4){
if (this.addMsg.Type == 4) {
this.supplierMsg.Type = 5
}else{
} else {
this.supplierMsg.Type = this.addMsg.Type
}
if(this.addMsg.Type!=10){
if (this.addMsg.Type != 10) {
this.addMsg.ObjID = null
this.addMsg.ObjIdStr = ''
this.supplierMsg.Name = ''
// this.getSupplierGetPageList()
}else{
} else {
this.addMsg.ObjID = this.$route.query.id
}
},
getObjName(){
this.supplierList.filter(x=>{
if(x.ID==this.addMsg.ObjID){
getObjName() {
this.supplierList.filter(x => {
if (x.ID == this.addMsg.ObjID) {
this.addMsg.ObjIdStr = x.Name
this.addMsg.SupplierName = x.Name
}
......@@ -421,103 +461,103 @@
if (query !== '') {
this.addMsg.ObjID = null
this.supplierMsg.Name = query
this.supplierList=[];
this.supplierList = [];
this.getSupplierGetPageList()
} else {
this.supplierMsg.Name = ''
this.supplierList = [];
}
},
getSupplierGetPageList(){
if(this.addMsg.Type==10) {
getSupplierGetPageList() {
if (this.addMsg.Type == 10) {
return
}
let url = "supplier_get_GetPageList"
let msg = JSON.parse(JSON.stringify(this.supplierMsg))
if(this.addMsg.Type==5) {
if (this.addMsg.Type == 5) {
url = "dmc_post_visa_GetCommuneInfoPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
Name:this.supplierMsg.Name,
PersonInCharge:"",
Country:"",
City:"",
District:"",
Province:""
pageIndex: 1,
pageSize: this.supplierMsg.pageSize,
Name: this.supplierMsg.Name,
PersonInCharge: "",
Country: "",
City: "",
District: "",
Province: ""
}
}
if(this.addMsg.Type==7) {
if (this.addMsg.Type == 7) {
url = "leader_post_GetPageList"
msg = {
Type:"0",
FullName:this.supplierMsg.Name,
RB_Branch_id:-1,
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
total:0,
currentPage:1,
QueryType:0,
LeaderGuidClass:-1
}
}
if(this.addMsg.Type==8) {
Type: "0",
FullName: this.supplierMsg.Name,
RB_Branch_id: -1,
pageIndex: 1,
pageSize: this.supplierMsg.pageSize,
total: 0,
currentPage: 1,
QueryType: 0,
LeaderGuidClass: -1
}
}
if (this.addMsg.Type == 8) {
url = "app_customer_GetCustomerListForCareOf"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
CustomerName:this.supplierMsg.Name,
CreateBy:"-1",
DepartmentId:"-2",
Brand:-1,
allDepartment:1,
CustomerStatus:"",
OperationStatus:"",
jySort:"desc",
rtsSort:"",
orderBy:"TradeMoney desc",
ExceptionCount:0,
}
}
if(this.addMsg.Type==9) {
pageIndex: 1,
pageSize: this.supplierMsg.pageSize,
CustomerName: this.supplierMsg.Name,
CreateBy: "-1",
DepartmentId: "-2",
Brand: -1,
allDepartment: 1,
CustomerStatus: "",
OperationStatus: "",
jySort: "desc",
rtsSort: "",
orderBy: "TradeMoney desc",
ExceptionCount: 0,
}
}
if (this.addMsg.Type == 9) {
url = "admin_get_EmployeeList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
EmName:this.supplierMsg.Name,
EmAccount:"",
RB_Group_id:2,
RB_Branch_id:-1,
RB_Department_Id:"0",
RB_Post_Id:"0",
Status:"0",
sEmEntry:"",
eEmEntry:"",
sEmLeave:"",
eEmLeave:"",
IsParentCompany:1
}
}
if(this.addMsg.Type==11) {
pageIndex: 1,
pageSize: this.supplierMsg.pageSize,
EmName: this.supplierMsg.Name,
EmAccount: "",
RB_Group_id: 2,
RB_Branch_id: -1,
RB_Department_Id: "0",
RB_Post_Id: "0",
Status: "0",
sEmEntry: "",
eEmEntry: "",
sEmLeave: "",
eEmLeave: "",
IsParentCompany: 1
}
}
if (this.addMsg.Type == 11) {
url = "travel_get_GetGroundingSupplierPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
Name:this.supplierMsg.Name,
GroundingType:"",
LineInfo:"",
LineId:"0",
Id:""
pageIndex: 1,
pageSize: this.supplierMsg.pageSize,
Name: this.supplierMsg.Name,
GroundingType: "",
LineInfo: "",
LineId: "0",
Id: ""
}
}
if(this.addMsg.Type==6) {
if (this.addMsg.Type == 6) {
url = "airline_post_GetPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
AlName:this.supplierMsg.Name,
AlCode:"",
TicketCode:"",
pageIndex: 1,
pageSize: this.supplierMsg.pageSize,
AlName: this.supplierMsg.Name,
AlCode: "",
TicketCode: "",
}
}
this.supplierLoading = true
......@@ -526,179 +566,168 @@
msg,
(res) => {
if (res.data.resultCode == 1) {
let dataList
if(res.data.data.pageData&&res.data.data.pageData.length>0){
if (res.data.data.pageData && res.data.data.pageData.length > 0) {
dataList = res.data.data.pageData
}
if(res.data.data.pages&&res.data.data.pages.pageData.length>0){
if (res.data.data.pages && res.data.data.pages.pageData.length > 0) {
dataList = res.data.data.pages.pageData
}
dataList&&dataList.forEach(x=>{
dataList && dataList.forEach(x => {
let Obj = {
Name: '',
ID: 0
}
if(this.addMsg.Type==9){
if (this.addMsg.Type == 9) {
Obj = {
Name: x.EmName,
ID: x.EmployeeId
}
}else if(this.addMsg.Type==8){
} else if (this.addMsg.Type == 8) {
Obj = {
Name: x.CustomerName,
ID: x.CustomerId
}
}else if(this.addMsg.Type==7){
} else if (this.addMsg.Type == 7) {
Obj = {
Name: x.Surname+x.Name,
Name: x.Surname + x.Name,
ID: x.ID
}
}else if(this.addMsg.Type==6){
} else if (this.addMsg.Type == 6) {
Obj = {
Name: x.AlName,
ID: x.AirLineId
}
}else if(this.addMsg.Type==11){
} else if (this.addMsg.Type == 11) {
Obj = {
Name: x.Name,
ID: x.Id
}
} else{
} else {
Obj = {
Name:x.Name,
Name: x.Name,
ID: x.ID
}
}
this.supplierList.push(Obj)
})
if(this.addMsg.ObjIdStr&&this.supplierList.length>0){
if (this.addMsg.ObjIdStr && this.supplierList.length > 0) {
this.addMsg.ObjID = Number(this.supplierList[0].ID)
}
}
this.supplierLoading = false
},
(err)=>{
(err) => {
this.supplierLoading = false
})
},
financeinfo_post_GetClientTypeList() {
// 获取对象类型
this.apipost(
"financeinfo_post_GetClientTypeList",
{},
"financeinfo_post_GetClientTypeList", {},
(res) => {
if (res.data.resultCode == 1) {
this.ClientTypeList = res.data.data;}
this.ClientTypeList = res.data.data;
}
})
},
AddAccountBank(){
// if(this.list&&this.list.length>0){
// return this.$message.info('已有账户,试试编辑已有账户吧!')
// }
AddAccountBank() {
this.outerVisible = true
this.dialogTitle= this.$t('ground.xinzengzhanghu')
this.dialogTitle = this.$t('ground.xinzengzhanghu')
this.resetForm('addMsg')
},
changeTitle(){
if(this.addMsg.AccountClassify==1){
this.nameA= this.$t("ground.pingtaimingcheng")
this.nameB= this.$t("ground.yonghumingcheng")
this.nameC= this.$t("fnc.ptAcc")
this.nameD= this.$t("fnc.accBming")
this.addMsg.AccountType='1'
}else if(this.addMsg.AccountClassify==2){
this.nameA= this.$t("ground.zhanghumingcheng2")
this.nameB= this.$t("fnc.khuren")
this.nameC= this.$t("ground.kahao")
this.nameD= this.$t("fnc.accBming")
}else if(this.addMsg.AccountClassify==3){
this.nameA= this.$t("ground.pingtaimingcheng")
this.nameB= this.$t("ground.yonghumingcheng")
this.nameC= this.$t("fnc.ptAcc")
this.nameD= this.$t("fnc.accBming")
}else if(this.addMsg.AccountClassify==4){
this.nameA= this.$t("ground.pingtaimingcheng")
this.nameB= this.$t("ground.yonghumingcheng")
this.nameC= "账号"
this.nameD= "名称"
changeTitle() {
if (this.addMsg.AccountClassify == 1) {
this.nameA = this.$t("ground.pingtaimingcheng")
this.nameB = this.$t("ground.yonghumingcheng")
this.nameC = this.$t("fnc.ptAcc")
this.nameD = this.$t("fnc.accBming")
this.addMsg.AccountType = '1'
} else if (this.addMsg.AccountClassify == 2) {
this.nameA = this.$t("ground.zhanghumingcheng2")
this.nameB = this.$t("fnc.khuren")
this.nameC = this.$t("ground.kahao")
this.nameD = this.$t("fnc.accBming")
} else if (this.addMsg.AccountClassify == 3) {
this.nameA = this.$t("ground.pingtaimingcheng")
this.nameB = this.$t("ground.yonghumingcheng")
this.nameC = this.$t("fnc.ptAcc")
this.nameD = this.$t("fnc.accBming")
} else if (this.addMsg.AccountClassify == 4) {
this.nameA = this.$t("ground.pingtaimingcheng")
this.nameB = this.$t("ground.yonghumingcheng")
this.nameC = "账号"
this.nameD = "名称"
}
},
getList() { //获取列表数据
this.loading = true
this.apipost("admin_get_GetEmpBankAccountPageList", this.msg, res => {
if(res.data.resultCode==1){
if (res.data.resultCode == 1) {
this.list = res.data.data.pageData;
this.total = res.data.data.count;
}else{}
} else {}
this.loading = false
}, err => {})
},
// getCompany(){
// this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{
// if(res.data.resultCode==1){
// this.companyList=res.data.data;
// }else{}
// },err=>{})
// },
getBank(){
this.apipost('FinancialInstitutions_post_GetList',{Type:0},res=>{
if(res.data.resultCode==1){
this.bankList=res.data.data;
}else{}
},err=>{})
getBank() {
this.apipost('FinancialInstitutions_post_GetList', {
Type: 0
}, res => {
if (res.data.resultCode == 1) {
this.bankList = res.data.data;
} else {}
}, err => {})
},
addData(){
if(this.addMsg.ObjID==null&&this.addMsg.Type!=10){
addData() {
if (this.addMsg.ObjID == null && this.addMsg.Type != 10) {
this.$message.error('请选择客户名称')
return
}
console.log("this.addMsg.Type",this.addMsg.Type);
if (this.addMsg.Type!=7&&this.addMsg.Type!=9&&this.addMsg.Type!=10) {
if(this.addMsg.DutyNo==''||this.addMsg.DutyNo==undefined){
console.log("this.addMsg.Type", this.addMsg.Type);
if (this.addMsg.Type != 7 && this.addMsg.Type != 9 && this.addMsg.Type != 10) {
if (this.addMsg.DutyNo == '' || this.addMsg.DutyNo == undefined) {
this.$message.error('请填写税号')
return
}
}
this.addMsg.ObjID = this.addMsg.ObjID!='-1'&&this.addMsg.ObjID!=null?this.addMsg.ObjID:this.$route.query.id
if(this.addMsg.AccountClassify!='3' && this.addMsg.AccountClassify!='4'){
if(this.addMsg.OpenBankName==''){
this.$message.error(this.$t('visaT.Pleasefillin')+this.nameA)
this.addMsg.ObjID = this.addMsg.ObjID != '-1' && this.addMsg.ObjID != null ? this.addMsg.ObjID : this.$route
.query.id
if (this.addMsg.AccountClassify != '3' && this.addMsg.AccountClassify != '4') {
if (this.addMsg.OpenBankName == '') {
this.$message.error(this.$t('visaT.Pleasefillin') + this.nameA)
return
}
if(this.addMsg.AccountHolder==''){
this.$message.error(this.$t('visaT.Pleasefillin')+this.nameB)
if (this.addMsg.AccountHolder == '') {
this.$message.error(this.$t('visaT.Pleasefillin') + this.nameB)
return
}
}
if(this.addMsg.CardNum==''){
this.$message.error(this.$t('visaT.Pleasefillin')+this.nameC)
if (this.addMsg.CardNum == '') {
this.$message.error(this.$t('visaT.Pleasefillin') + this.nameC)
return
}
if(this.addMsg.AccountAlias==''){
this.$message.error(this.$t('visaT.Pleasefillin')+this.nameD)
if (this.addMsg.AccountAlias == '') {
this.$message.error(this.$t('visaT.Pleasefillin') + this.nameD)
return
}
this.checkCanAdd()
},
addAccount() {
this.apipost("admin_post_SetEmpBankAccount",this.addMsg,res=>{
if(res.data.resultCode==1)
{
this.apipost("admin_post_SetEmpBankAccount", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message)
this.outerVisible=false;
this.outerVisible = false;
this.getList()
this.resetForm('addMsg');
}else{
} else {
this.getList();
this.$message.error(res.data.message)
}
},err=>{})},
}, err => {})
},
checkCanAdd() {
this.$confirm("客户类型与税号请务必填写正确,避免单据驳回!!", "提示", {
confirmButtonText: "确定",
......@@ -706,43 +735,47 @@
type: "warning"
})
.then(() => {
this.apipost('admin_post_GetBackAccount',{RB_Group_Id: this.addMsg.ObjID, ...this.addMsg},res=>{
if(res.data.resultCode==1){
if(res.data.data && res.data.data.length) {
this.apipost('admin_post_GetBackAccount', {
RB_Group_Id: this.addMsg.ObjID,
...this.addMsg
}, res => {
if (res.data.resultCode == 1) {
if (res.data.data && res.data.data.length) {
this.accountList = res.data.data
} else {
this.addAccount()
}
}else{
this.$message.error(res.data.message)}
},err=>{})
} else {
this.$message.error(res.data.message)
}
}, err => {})
})
.catch(() => {});
},
updateData(id){ //修改角色
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.AccountType=res.data.data.AccountType.toString();
this.addMsg.AccountClassify=res.data.data.AccountClassify.toString();
this.addMsg.BankId=res.data.data.BankId
this.addMsg.AccountType = res.data.data.AccountType.toString();
this.addMsg.AccountClassify = res.data.data.AccountClassify.toString();
this.addMsg.BankId = res.data.data.BankId
this.addMsg.IsOtherEdit = 1
this.supplierMsg.Type = this.addMsg.Type
this.addMsg.DutyNo=res.data.data.DutyNo
this.addMsg.SupplierName=res.data.data.SupplierName
if(this.addMsg.ObjIdStr){
this.addMsg.DutyNo = res.data.data.DutyNo
this.addMsg.SupplierName = res.data.data.SupplierName
if (this.addMsg.ObjIdStr) {
this.supplierMsg.Name = this.addMsg.ObjIdStr
this.getSupplierGetPageList()
}else{
} else {
this.addMsg.ObjID = null
}
this.changeTitle()
}else{}
},err=>{})
// this.addMsg = this.dataList[index]
// this.addMsg.Status = this.dataList[index].Status.toString();
} else {}
}, err => {})
},
deleteData(id){
deleteData(id) {
let that = this
this.$confirm(that.$t('ground.querenqiyong'), '提示', {
confirmButtonText: that.$t('pub.sureBtn'),
......@@ -750,12 +783,12 @@
type: 'warning'
}).then(() => {
this.apipost('admin_post_DelEmpBankAccount', {
BAId:id
BAId: id
}, res => {
if(res.data.resultCode == 1) {
if (res.data.resultCode == 1) {
that.$message.success('操作成功')
that.getList();
}else{
} else {
that.$message.info('操作失败')
}
}, err => {})
......@@ -764,8 +797,7 @@
that.$message.info('操作失败')
});
},
bindData(id){
bindData(id) {
let that = this
this.$confirm("是否绑定当前付款对象", '提示', {
confirmButtonText: that.$t('pub.sureBtn'),
......@@ -773,15 +805,15 @@
type: 'warning'
}).then(() => {
this.apipost('admin_post_BindEmpBankAccount', {
BAId:id,
ObjID:this.$route.query.id,
Type:this.$route.query.type
BAId: id,
ObjID: this.$route.query.id,
Type: this.$route.query.type
}, res => {
if(res.data.resultCode == 1) {
if (res.data.resultCode == 1) {
that.$message.success('操作成功')
this.outerVisible=false;
this.outerVisible = false;
that.getList();
}else{
} else {
that.$message.info('操作失败')
}
}, err => {})
......@@ -789,7 +821,6 @@
}).catch(() => {
that.$message.info('操作失败')
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
......@@ -799,7 +830,7 @@
this.msg.pageIndex = 1;
this.currentPage = 1
},
submitForm(addMsg) {//提交创建、修改表单
submitForm(addMsg) { //提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.addData();
......@@ -807,28 +838,26 @@
return false;
}
});
},
closeChangeMachie(done){//弹出框关闭初始化弹框内表单
closeChangeMachie(done) { //弹出框关闭初始化弹框内表单
done();
this.resetForm('addMsg');
},
resetForm(formName) {//弹出框取消 初始化谈框内表单
resetForm(formName) { //弹出框取消 初始化谈框内表单
this.accountList = []
this.$refs[formName].resetFields();
this.addMsg.AccountType='1';
this.addMsg.AccountClassify='2';
this.addMsg.Id='0';
this.addMsg.ObjID='-1';
this.addMsg.BankId='-1';
this.addMsg.OpenBankName='';
this.addMsg.BankName='';
this.addMsg.AccountHolder='';
this.addMsg.CardNum='';
this.addMsg.AccountAlias='';
this.addMsg.AccountType = '1';
this.addMsg.AccountClassify = '2';
this.addMsg.Id = '0';
this.addMsg.ObjID = '-1';
this.addMsg.BankId = '-1';
this.addMsg.OpenBankName = '';
this.addMsg.BankName = '';
this.addMsg.AccountHolder = '';
this.addMsg.CardNum = '';
this.addMsg.AccountAlias = '';
}
}
}
</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