Commit a2f4cdf7 authored by 邓春圆's avatar 邓春圆

银行卡账户修改

parent 2f570fc0
...@@ -419,88 +419,88 @@ ...@@ -419,88 +419,88 @@
<el-button style="float: right;" size="small" type="primary" @click="addBankData">+</el-button> <el-button style="float: right;" size="small" type="primary" @click="addBankData">+</el-button>
</div> </div>
<el-form ref="bankForm" :model="form"> <el-form ref="bankForm" :model="form">
<el-table border :data="form.customerBankAccounts"> <el-table border :data="form.customerBanks">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column> <el-table-column>
<div slot="header"> <div slot="header">
账户名称 <span style="color: red;">*</span> {{$t('账户名称')}} <span style="color: red;">*</span>
</div> </div>
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<el-form-item :rules="{required:true,message:'请输入账户名称'}" :prop="'customerBankAccounts.'+ $index +'.baAccountName'"> <el-form-item :rules="{required:true,message:$t('请输入账户名称')}" :prop="'customerBanks.'+ $index +'.accountName'">
<el-input size="mini" v-model="row.baAccountName"></el-input> <el-input size="mini" v-model="row.accountName"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="币别"> <el-table-column :label="$t('币别')">
<div slot="header"> <div slot="header">
币别 <span style="color: red;">*</span> {{$t('币别')}} <span style="color: red;">*</span>
</div> </div>
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<el-form-item :prop="'customerBankAccounts.'+ $index +'.currency'" :rules="{required:true,message:'请输入币别'}" > <el-form-item :prop="'customerBanks.'+ $index +'.currency'" :rules="{required:true,message:$t('请输入币别')}" >
<el-select v-model="row.currency"> <el-select v-model="row.currency">
<el-option v-for="(item) in currecyList" :label="$l(item,'title')" :value="item.id" :key="item.id"></el-option> <el-option v-for="(item) in currecyList" :label="$l(item,'title')" :value="item.id.toString()" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="银行名称"> <el-table-column :label="$t('银行名称')">
<div slot="header"> <div slot="header">
银行名称 <span style="color: red;">*</span> {{$t('银行名称')}} <span style="color: red;">*</span>
</div> </div>
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<el-form-item :prop="'customerBankAccounts.'+ $index +'.baBankName'" :rules="{required:true,message:'银行名称'}"> <el-form-item :prop="'customerBanks.'+ $index +'.bankName'" :rules="{required:true,message:$t('银行名称')}">
<el-input v-model="row.baBankName" size="mini"></el-input> <el-input v-model="row.bankName" size="mini"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="银行账户"> <el-table-column :label="$t('银行账户')">
<div slot="header"> <div slot="header">
银行账户 <span style="color: red;">*</span> {{$t('银行账户')}} <span style="color: red;">*</span>
</div> </div>
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<el-form-item :prop="`customerBankAccounts.${$index}.baAccountNum`" :rules="{required:true,message:'请输入银行账户'}"> <el-form-item :prop="`customerBanks.${$index}.bankAccount`" :rules="{required:true,message:$t('请输入银行账户')}">
<el-input v-model="row.baAccountNum" size="mini"></el-input> <el-input v-model="row.bankAccount" size="mini"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="银行代码"> <el-table-column :label="$t('银行代码')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-form-item prop="baSwiftCode"> <el-form-item prop="bankCode">
<el-input v-model="row.baSwiftCode" size="mini"></el-input> <el-input v-model="row.bankCode" size="mini"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="账户类型"> <el-table-column :label="$t('账户类型')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-form-item> <el-form-item>
<el-select v-model="row.baType"> <el-select v-model="row.accountType">
<el-option value="1" label="公账"></el-option> <el-option value="1" :label="$t('公账')"></el-option>
<el-option value="2" label="私账" ></el-option> <el-option value="2" :label="$t('私账')" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态"> <el-table-column :label="$t('状态')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-form-item> <el-form-item>
<el-select v-model="row.status"> <el-select v-model="row.status">
<el-option value="0" label="停用"></el-option> <el-option :value="0" :label="$t('停用')"></el-option>
<el-option value="1" label="正常"></el-option> <el-option :value="1" :label="$t('正常')"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="银行地址"> <el-table-column :label="$t('银行地址')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-form-item prop="baBankAdd"> <el-form-item prop="baBankAdd">
<el-input v-model="row.baBankAdd" size="mini"></el-input> <el-input v-model="row.bankAddress" size="mini"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column :label="$t('操作')">
<template v-slot="{$index}"> <template v-slot="{$index}">
<el-button @click="deleteBankData($index)">删除</el-button> <el-button @click="deleteBankData($index)">{{$t('删除')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -693,26 +693,26 @@ export default { ...@@ -693,26 +693,26 @@ export default {
methods: { methods: {
deleteBankData(index){ deleteBankData(index){
if(this.form.customerBankAccounts.length === 1){ if(this.form.customerBanks.length === 1){
this.$message.warning('至少添加一条银行卡号信息'); this.$message.warning('至少添加一条银行卡号信息');
}else { }else {
this.form.customerBankAccounts.splice(index, 1); this.form.customerBanks.splice(index, 1);
} }
}, },
//添加银行卡 //添加银行卡
addBankData(){ addBankData(){
let p = { let p = {
baAccountName: "", bankName: "",
baAccountNum: "", bankAccount: "",
baBankAdd: "", bankAddress: "",
baBankName: "", bankCode: "",
baSwiftCode: "", accountType: null,
baType: null,
status: null, status: null,
currency:'', currency:'',
accountName:''
}; };
this.form.customerBankAccounts = [...this.form.customerBankAccounts,p] this.form.customerBanks = [...this.form.customerBanks,p]
}, },
/* getUserMemberUserFn(val){ /* getUserMemberUserFn(val){
userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => { userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => {
...@@ -899,7 +899,7 @@ export default { ...@@ -899,7 +899,7 @@ export default {
isShowTidanPrice:true, isShowTidanPrice:true,
carName:undefined, carName:undefined,
carNo:undefined, carNo:undefined,
customerBankAccounts:[] customerBanks:[]
}; };
this.form.createTime = (new Date()).getTime() this.form.createTime = (new Date()).getTime()
this.resetForm("form"); this.resetForm("form");
...@@ -908,7 +908,7 @@ export default { ...@@ -908,7 +908,7 @@ export default {
getCustomer(id) { getCustomer(id) {
return getCustomer(id).then(response => { return getCustomer(id).then(response => {
console.log(response,'response') console.log(response,'response')
this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType.split(',') }; this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType.split(','),customerBanks:response.data.customerBankBackVOList };
this.open = true; this.open = true;
this.title = this.$t('修改客户'); this.title = this.$t('修改客户');
this.getZhongPao() this.getZhongPao()
......
...@@ -112,18 +112,20 @@ ...@@ -112,18 +112,20 @@
<el-card style="margin-top: 15px;"> <el-card style="margin-top: 15px;">
<h3>{{$t('银行账户')}}</h3> <h3>{{$t('银行账户')}}</h3>
<el-table :data="customer.customerBankBackVOList" border> <el-table :data="customer.customerBankBackVOList" border>
<el-table-column label="编号"></el-table-column> <el-table-column label="编号" type="index"></el-table-column>
<el-table-column label="账户名称" prop="accountName"></el-table-column> <el-table-column label="账户名称" prop="accountName"></el-table-column>
<el-table-column label="币别"> <el-table-column label="币别">
<template> <template v-slot="{row}">
{{$l(currecyList.find(i => row.currency == i.id),'title')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="银行名称" prop="bankName"></el-table-column> <el-table-column label="银行名称" prop="bankName"></el-table-column>
<el-table-column label="银行账户" prop="bankAccount"></el-table-column> <el-table-column label="银行账户" prop="bankAccount"></el-table-column>
<el-table-column label="银行代码" prop="bankCode"></el-table-column> <el-table-column label="银行代码" prop="bankCode"></el-table-column>
<el-table-column label="账户类型"> <el-table-column label="账户类型">
<template></template> <template v-slot="{row}">
{{row.accountType === 1 ? $t('公账') : $t('私账')}}
</template>
</el-table-column> </el-table-column>
<el-table-column label="状态"> <el-table-column label="状态">
<template v-slot="{row}"> <template v-slot="{row}">
...@@ -482,6 +484,7 @@ import {getOrderPage} from "@/api/ecw/order"; ...@@ -482,6 +484,7 @@ import {getOrderPage} from "@/api/ecw/order";
import Template from "@/views/cms/template"; import Template from "@/views/cms/template";
import {getCreditRulePage} from "@/api/customer/creditRule"; import {getCreditRulePage} from "@/api/customer/creditRule";
import {getCountry} from "@/api/ecw/country" import {getCountry} from "@/api/ecw/country"
import {getCurrencyList} from "@/api/ecw/currency";
export default { export default {
name: 'query', name: 'query',
...@@ -491,6 +494,10 @@ export default { ...@@ -491,6 +494,10 @@ export default {
CustomerComplaint CustomerComplaint
}, },
created() { created() {
// 获取币种
getCurrencyList().then(response => {
this.currecyList = response.data;
})
//获取信用类型 //获取信用类型
getCreditRulePage({page:1,rows:999,type:2}).then(r => { getCreditRulePage({page:1,rows:999,type:2}).then(r => {
this.creditTypeList = r.data.list this.creditTypeList = r.data.list
...@@ -500,6 +507,7 @@ export default { ...@@ -500,6 +507,7 @@ export default {
}) })
getCustomer(this.id).then(response => { getCustomer(this.id).then(response => {
this.customer = { ...this.customer, ...response.data } this.customer = { ...this.customer, ...response.data }
console.log( this.customer,'this.customer')
getCustomerContactsListByCustomer({customerId: this.id}).then(r => { getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data this.customerContacts = r.data
...@@ -537,7 +545,6 @@ export default { ...@@ -537,7 +545,6 @@ export default {
}, },
watch:{ watch:{
activeName(val){ activeName(val){
console.log(val,'val')
switch (val) { switch (val) {
case 'order': case 'order':
this.getorderList()//订单 this.getorderList()//订单
...@@ -567,6 +574,7 @@ export default { ...@@ -567,6 +574,7 @@ export default {
data() { data() {
return { return {
activeName:'order', activeName:'order',
currecyList:[],
STATUS:{ STATUS:{
0:this.$t('取消报价'), 0:this.$t('取消报价'),
1:this.$t('特价审批中'), 1:this.$t('特价审批中'),
......
...@@ -673,7 +673,7 @@ export default { ...@@ -673,7 +673,7 @@ export default {
if(val){ if(val){
getCustomer(val).then(r => { getCustomer(val).then(r => {
this.form.customerName = r.data.name this.form.customerName = r.data.name
this.bankAccountList = r.data.customerBankAccountBackVOList this.bankAccountList = r.data.customerBankBackVOList
// this.$set(this.form, 'customerBank',r.data.bank ) // this.$set(this.form, 'customerBank',r.data.bank )
// this.$set(this.form, 'customerBankAccount',r.data.bankNumber ) // this.$set(this.form, 'customerBankAccount',r.data.bankNumber )
// this.$set(this.form, 'customerBankAccountName',r.data.name ) // this.$set(this.form, 'customerBankAccountName',r.data.name )
...@@ -697,19 +697,20 @@ export default { ...@@ -697,19 +697,20 @@ export default {
// t && (this.bankData = t.bankList) // t && (this.bankData = t.bankList)
}, },
getBankInfo(val){ getBankInfo(val){
let {baAccountName,baAccountNum,baBankAdd,baBankName,baSwiftCode,baType,status} = val console.log(val,'valbank')
let {accountName,bankAccount,bankAddress,bankName,bankCode,accountType} = val
// this.form.customerAccountType = baType; //账户类型 // this.form.customerAccountType = baType; //账户类型
this.$set(this.form, 'customerAccountType', baType) this.$set(this.form, 'customerAccountType', accountType)
// this.form.customerBank = baBankName; //客户银行 // this.form.customerBank = baBankName; //客户银行
this.$set(this.form, 'customerBank', baBankName) this.$set(this.form, 'customerBank', bankName)
// this.form.customerBankAccount = baAccountNum; // 客户银行账号 // this.form.customerBankAccount = baAccountNum; // 客户银行账号
this.$set(this.form, 'customerBankAccount', baAccountNum) this.$set(this.form, 'customerBankAccount', bankAccount)
// this.form.customerBankAccountName = customerBankAccountName; //客户银行账户名 // this.form.customerBankAccountName = customerBankAccountName; //客户银行账户名
this.$set(this.form, 'customerBankAccountName', baAccountName ) this.$set(this.form, 'customerBankAccountName', accountName)
// this.form.customerBankAddress = customerBankAddress; // 银行地址 // this.form.customerBankAddress = customerBankAddress; // 银行地址
this.$set(this.form, 'customerBankAddress', baBankAdd) this.$set(this.form, 'customerBankAddress', bankAddress)
// this.form.customerBankAddress = customerBankCode; // 银行代码 // this.form.customerBankAddress = customerBankCode; // 银行代码
this.$set(this.form, 'customerBankCode', baSwiftCode) this.$set(this.form, 'customerBankCode', bankCode)
}, },
handleQuery() { handleQuery() {
......
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