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,6 +86,12 @@ export default {
return num.substring(num.length - 4)
},
deleteFun (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
......@@ -92,7 +102,7 @@ export default {
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': window.localStorage.user_id,
'bp_id': this.from ? this.$route.params.bp_id : window.localStorage.getItem('user_id'),
'bank_account_num': e,
},
}
......@@ -100,9 +110,14 @@ export default {
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log(res)
vm.hlsPopup.showSuccess('删除成功')
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
}
},
})
},
},
}
......
......@@ -257,6 +257,7 @@
<BankInfo
v-show="tabNum==1"
:getBankList="getBankList"
:from="from"
@getInfo="getInfo"
@getList="getList"
/>
......
......@@ -61,6 +61,10 @@ export default {
default: [],
type: Array,
},
'from': {
default: null,
type: Boolean,
},
},
data () {
return {
......@@ -90,6 +94,12 @@ export default {
return num.substring(num.length - 4)
},
deleteFun (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
......@@ -100,7 +110,7 @@ export default {
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': window.localStorage.user_id,
'bp_id': this.from ? this.$route.params.bp_id : window.localStorage.getItem('user_id'),
'bank_account_num': e,
},
}
......@@ -108,14 +118,19 @@ export default {
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log(res)
vm.hlsPopup.showSuccess('删除成功')
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
}
},
})
},
},
}
</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"
......
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