Commit 04495ad9 authored by linxin's avatar linxin

修复银行卡删除问题

parent 7734660f
......@@ -54,6 +54,10 @@ export default {
default: [],
type: Array,
},
'from': {
default: null,
type: Boolean,
},
},
data () {
return {
......@@ -82,26 +86,37 @@ export default {
return num.substring(num.length - 4)
},
deleteFun (e) {
let index = this.getBankList.findIndex(item => {
if (item.bank_account_num === e) {
return true
}
})
this.getBankList.splice(index, 1)
let vm = this
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': window.localStorage.user_id,
'bank_account_num': e,
this.hlsPopup.showConfirm({
title: '提示',
content: '您确认删除吗?',
onConfirm: data => {
console.log(data)
if (data === 1) {
let index = this.getBankList.findIndex(item => {
if (item.bank_account_num === e) {
return true
}
})
this.getBankList.splice(index, 1)
let vm = this
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': this.from ? this.$route.params.bp_id : window.localStorage.getItem('user_id'),
'bank_account_num': e,
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.hlsPopup.showSuccess('删除成功')
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
}
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log(res)
}
})
},
},
......
......@@ -257,6 +257,7 @@
<BankInfo
v-show="tabNum==1"
:getBankList="getBankList"
:from="from"
@getInfo="getInfo"
@getList="getList"
/>
......@@ -314,7 +315,7 @@
</item>
<item>
<div slot="name">银行名称</div>
<input slot="content" v-model="bank.bank_full_name" placeholder="识别银行卡自动填充" >
<input slot="content" v-model="bank.bank_full_name" placeholder="识别银行卡自动填充" >
</item>
<item>
<div slot="name">支行名称</div>
......
......@@ -61,6 +61,10 @@ export default {
default: [],
type: Array,
},
'from': {
default: null,
type: Boolean,
},
},
data () {
return {
......@@ -90,32 +94,43 @@ export default {
return num.substring(num.length - 4)
},
deleteFun (e) {
let index = this.getBankList.findIndex(item => {
if (item.bank_account_num === e) {
return true
}
})
this.getBankList.splice(index, 1)
let vm = this
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': window.localStorage.user_id,
'bank_account_num': e,
this.hlsPopup.showConfirm({
title: '提示',
content: '您确认删除吗?',
onConfirm: data => {
console.log(data)
if (data === 1) {
let index = this.getBankList.findIndex(item => {
if (item.bank_account_num === e) {
return true
}
})
this.getBankList.splice(index, 1)
let vm = this
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': this.from ? this.$route.params.bp_id : window.localStorage.getItem('user_id'),
'bank_account_num': e,
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.hlsPopup.showSuccess('删除成功')
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
}
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log(res)
}
})
},
},
}
</script>
<style lang="less" scoped>
<style lang="less">
#bank-card {
.info {
height: 70px;
......
......@@ -337,7 +337,8 @@
</div>
</div>
<!-- <BankInfo v-show="tabNum==1" :bp_id="bp_id" @getInfo="getInfo" /> -->
<BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo" @getList="getList" />
<BankInfo v-show="tabNum==1" :from="from" :getBankList="getBankList" @getInfo="getInfo"
@getList="getList" />
<InvoiceInfo
v-show="tabNum==2"
:tabNum="tabNum"
......@@ -971,7 +972,7 @@ export default {
getInfo (i, isClear) {
this.isClear = isClear
if (isClear) {
// this.bank_lists = {}
// this.bank_lists = {}
this.bank_lists.bank_account_num = ''
this.bank_lists.bank_account_name = ''
this.bank_lists.bank_card_type = ''
......
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