Commit 2903b78c authored by youjie's avatar youjie

编辑账户

parent 2aa43eb5
......@@ -23,7 +23,8 @@
</style>
<template>
<div class="flexOne">
<div class="empBankAccountTableLayer" v-show="outerVisible">
<div class="empBankAccountTableLayer" v-show="outerVisible"
:style="{'height':accountList.length>0?'355px':'188px'}">
<p>
{{dialogTitle}}
<span class="fr">
......@@ -67,6 +68,48 @@
<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')"
class="w135 _border_b_1"
@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="请输入关键词"
class="w135 _border_b_1"
>
<el-option
v-for="item in supplierList"
:label="item.Name"
:value="item.ID"
:key="item.ID"
>
</el-option>
</el-select>
</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">
......@@ -107,7 +150,7 @@
<td class="empBankAccountIcon" v-if="addMsg.Type==8">
<el-button-group>
<el-tooltip
class="item"
effect="dark"
......@@ -120,9 +163,9 @@
style="background: #09d49d; border-color: #09d49d"
icon="iconfont icon-bianji-smal"
></el-button>
</el-tooltip>
</el-button-group>
</td>
</tr>
......@@ -231,6 +274,20 @@
export default {
data() {
return {
ClientTypeList: [],
supplierLoading: false,
supplierList: [],
supplierMsg: {
pageIndex:1,
pageSize:1000,
Name:"",
Contact:"",
Type: "",
CountryStr:"",
ProvinceStr:"",
CityStr:"",
DistrictStr:""
},
loading: true,
accountList: [],
nameA: this.$t("ground.zhanghumingcheng2"),
......@@ -287,6 +344,20 @@
BankName:[
{ required: true, message: this.$t("ground.qingtianxieyh"), trigger: 'blur' }
],
Type:[
{
required: true,
message: '请选择客户类型',
trigger: "chang",
},
],
ObjID:[
{
required: true,
message: '请选择客户名称',
trigger: "chang",
},
]
}
}
},
......@@ -295,13 +366,164 @@
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.ObjID=this.$route.query.id;
this.addMsg.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){
this.financeinfo_post_GetClientTypeList()
}
this.getBank();
this.getList();
this.changeTitle()
},
methods: {
// 获取客户类型
getType(){
this.supplierMsg.Type = this.addMsg.Type
if(this.addMsg.Type!=10){
this.addMsg.ObjID = null
}else{
this.addMsg.ObjID = this.$route.query.id
}
},
getObjName(){
this.supplierList.filter(x=>{
if(x.ID==this.addMsg.ObjID){
this.addMsg.ObjIdStr = x.Name
}
})
},
remoteMethod(query) {
if (query !== '') {
this.addMsg.ObjID = null
this.supplierMsg.Name = query
this.getSupplierGetPageList()
} else {
this.supplierMsg.Name = ''
this.supplierList = [];
}
},
getSupplierGetPageList(){
if(this.supplierMsg.Type==10) {
return
}
let url = "supplier_get_GetPageList"
let msg = JSON.parse(JSON.stringify(this.supplierMsg))
if(this.supplierMsg.Type==5) {
url = "dmc_post_visa_GetCommuneInfoPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
Name:this.supplierMsg.Name,
PersonInCharge:"",
Country:"",
City:"",
District:"",
Province:""
}
}
if(this.supplierMsg.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.supplierMsg.Type==8) {
url = "app_customer_GetCustomerListForCareOf"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
CustomerName:this.supplierMsg.Name,
CreateBy:"-1",
DepartmentId:"-1",
Brand:-1,
allDepartment:1,
CustomerStatus:"",
OperationStatus:"",
jySort:"desc",
rtsSort:"",
orderBy:"TradeMoney desc",
ExceptionCount:0
}
}
if(this.supplierMsg.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.supplierMsg.Type==11) {
url = "travel_get_GetGroundingSupplierPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
Name:this.supplierMsg.Name,
GroundingType:"",
LineInfo:"",
LineId:"0",
Id:""
}
}
if(this.supplierMsg.Type==6) {
url = "airline_post_GetPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
AlName:this.supplierMsg.Name,
AlCode:"",
TicketCode:"",
}
}
this.supplierLoading = true
this.apipost(
url,
msg,
(res) => {
if (res.data.resultCode == 1) {
this.supplierList = res.data.data.pageData
if(this.addMsg.ObjIdStr&&this.supplierList.length>0){
this.addMsg.ObjID = Number(this.supplierList[0].ID)
}
}
this.supplierLoading = false
},
(err)=>{
this.supplierLoading = false
})
},
financeinfo_post_GetClientTypeList() {
// 获取对象类型
this.apipost(
"financeinfo_post_GetClientTypeList",
{},
(res) => {
if (res.data.resultCode == 1) {
this.ClientTypeList = res.data.data;}
})
},
AddAccountBank(){
// if(this.list&&this.list.length>0){
// return this.$message.info('已有账户,试试编辑已有账户吧!')
......@@ -358,8 +580,14 @@
}else{}
},err=>{})
},
addData(){ //添加角色
this.addMsg.ObjID=this.$route.query.id;
addData(){
if(!this.addMsg.ObjID&&this.addMsg.Type!=10){
this.$message.error('请选择客户名称')
return
}
if(this.addMsg.Type==10){
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)
......@@ -413,6 +641,14 @@
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
if(this.addMsg.ObjIdStr){
this.supplierMsg.Name = this.addMsg.ObjIdStr
this.getSupplierGetPageList()
}else{
this.addMsg.ObjID = null
}
this.changeTitle()
}else{}
},err=>{})
......@@ -466,7 +702,7 @@
}).catch(() => {
that.$message.info('操作失败')
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
......
......@@ -208,6 +208,29 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35" v-if="addMsg.Type!=0&&addMsg.Type!=10">
<el-form-item label="客户名称" prop="ObjID">
<el-select
filterable
remote
reserve-keyword
v-model="addMsg.ObjID"
:remote-method="remoteMethod"
@change="getObjName"
:loading="supplierLoading"
placeholder="请输入关键词"
class="w135 _border_b_1"
>
<el-option
v-for="item in supplierList"
:label="item.Name"
:value="item.ID"
:key="item.ID"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
......@@ -255,6 +278,11 @@
:placeholder="$t('fnc.khleixing')"
class="w135 _border_b_1"
>
<el-option
label="不限"
value="0"
>
</el-option>
<el-option
v-for="item in ClientTypeList"
:label="item.Name"
......@@ -435,6 +463,19 @@
export default {
data() {
return {
supplierLoading: false,
supplierList: [],
supplierMsg: {
pageIndex:1,
pageSize:1000,
Name:"",
Contact:"",
Type: "",
CountryStr:"",
ProvinceStr:"",
CityStr:"",
DistrictStr:""
},
loading: false,
accountList: [],
ClientTypeList: [],
......@@ -461,7 +502,7 @@ export default {
AccountAlias: "",
pageIndex: 1,
pageSize: 15,
Type: "",
Type: "0",
},
getCompanyMsg: {
RB_Group_Id: "0",
......@@ -495,6 +536,20 @@ export default {
trigger: "blur",
},
],
Type:[
{
required: true,
message: '请选择客户类型',
trigger: "chang",
},
],
ObjID:[
{
required: true,
message: '请选择客户名称',
trigger: "chang",
},
]
},
};
},
......@@ -512,6 +567,135 @@ export default {
this.changeTitle();
},
methods: {
getObjName(){
this.supplierList.filter(x=>{
if(x.ID==this.addMsg.ObjID){
this.addMsg.ObjIdStr = x.Name
}
})
},
remoteMethod(query) {
if (query !== '') {
this.supplierMsg.Name = query
this.getSupplierGetPageList()
} else {
this.supplierMsg.Name = ''
this.supplierList = [];
}
},
getSupplierGetPageList(){
if(this.supplierMsg.Type==10) {
this.addMsg.ObjID = this.addMsg.CreateBy
return
}
this.addMsg.ObjID = null
let url = "supplier_get_GetPageList"
let msg = JSON.parse(JSON.stringify(this.supplierMsg))
if(this.supplierMsg.Type==5) {
url = "dmc_post_visa_GetCommuneInfoPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
Name:this.supplierMsg.Name,
PersonInCharge:"",
Country:"",
City:"",
District:"",
Province:""
}
}
if(this.supplierMsg.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.supplierMsg.Type==8) {
url = "app_customer_GetCustomerListForCareOf"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
CustomerName:this.supplierMsg.Name,
CreateBy:"-1",
DepartmentId:"-1",
Brand:-1,
allDepartment:1,
CustomerStatus:"",
OperationStatus:"",
jySort:"desc",
rtsSort:"",
orderBy:"TradeMoney desc",
ExceptionCount:0
}
}
if(this.supplierMsg.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.supplierMsg.Type==11) {
url = "travel_get_GetGroundingSupplierPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
Name:this.supplierMsg.Name,
GroundingType:"",
LineInfo:"",
LineId:"0",
Id:""
}
}
if(this.supplierMsg.Type==6) {
url = "airline_post_GetPageList"
msg = {
pageIndex:1,
pageSize:this.supplierMsg.pageSize,
AlName:this.supplierMsg.Name,
AlCode:"",
TicketCode:"",
}
}
this.supplierLoading = true
this.apipost(
url,
msg,
(res) => {
if (res.data.resultCode == 1) {
this.supplierList = res.data.data.pageData
if(this.addMsg.ObjIdStr&&this.supplierList&&this.supplierList.length>0){
this.addMsg.ObjID = Number(this.supplierList[0].ID)
}
}
this.supplierLoading = false
},
(err)=>{
this.supplierLoading = false
})
},
financeinfo_post_GetClientTypeList() {
// 获取对象类型
this.apipost(
......@@ -520,12 +704,12 @@ export default {
(res) => {
if (res.data.resultCode == 1) {
this.ClientTypeList = res.data.data;
let obj = {
ID:0,
Name:'不限'
}
this.ClientTypeList.unshift(obj)
this.msg.Type = this.ClientTypeList[0].ID
// let obj = {
// ID:0,
// Name:'不限'
// }
// this.ClientTypeList.unshift(obj)
// this.msg.Type = this.ClientTypeList[0].ID
this.getList();
}
......@@ -596,7 +780,8 @@ export default {
},
addData() {
//添加角色
this.addMsg.ObjID = this.$route.query.id;
if(this.$route.query.id) this.addMsg.ObjID = this.$route.query.id;
if(this.supplierMsg.Type==10) this.addMsg.ObjID = this.addMsg.CreateBy
if (
this.addMsg.AccountClassify != "3" &&
this.addMsg.AccountClassify != "4"
......@@ -672,6 +857,14 @@ export default {
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
if(this.addMsg.ObjIdStr){
this.supplierMsg.Name = this.addMsg.ObjIdStr
this.getSupplierGetPageList()
}else{
this.addMsg.ObjID = null
}
this.changeTitle();
} else {
}
......
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