Commit 8b4df4e0 by wangzhihui

修复层级选择期二次切换数据bug

1 parent c882a894
......@@ -299,22 +299,22 @@ export default {
props: {
lazy: true,
lazyLoad: (node, resolve) => {
console.log(node, 'node')
const { level, value } = node
let res
let obj = {
0: async () => {
console.log(await this.getlistChannel(), 'await this.getlistChannel()')
res = await this.getlistChannel()
resolve(res)
},
1: async () => {
this.searchForm.channel = value
res = await this.getListPaymentEntity(value)
resolve(res)
},
2: async () => {
this.searchForm.paymentSubjectId = value
res = await this.getListPayLevy(value)
let channel=node.parent?node.parent.value:''
res = await this.getListPayLevy(value,channel)
resolve(res)
},
3: async () => {
......@@ -356,10 +356,10 @@ export default {
})
return list
},
async getListPayLevy(value) {
async getListPayLevy(paymentEntityId,channel) {
let arr = await this.$apis.withdraw.getListPayLevy({
paymentEntityId: value,
channel: this.searchForm.channel
paymentEntityId,
channel
})
let list = arr.map(item => {
return {
......
......@@ -142,6 +142,7 @@ export default {
props: {
lazy: true,
lazyLoad: (node, resolve) => {
console.log(node, node.value)
const { level, value } = node
let res
let obj = {
......@@ -150,13 +151,13 @@ export default {
resolve(res)
},
1: async () => {
this.payForm.channel = value
res = await this.getListPaymentEntity(value)
resolve(res)
},
2: async () => {
this.payForm.paymentSubjectId = value
res = await this.getListPayLevy(value)
let channel = node.parent ? node.parent.value : ''
res = await this.getListPayLevy(value, channel)
resolve(res)
},
3: async () => {
......@@ -206,10 +207,10 @@ export default {
})
return list
},
async getListPayLevy(value) {
async getListPayLevy(paymentEntityId, channel) {
this.baseData.paymentEntityList = await this.$apis.withdraw.getListPayLevy({
paymentEntityId: value,
channel: this.payForm.channel
paymentEntityId,
channel
})
let list = this.baseData.paymentEntityList.map(item => {
return {
......@@ -220,13 +221,14 @@ export default {
})
return list
},
selectAddAttr(e, formName) {
async selectAddAttr(e, formName) {
console.log(e)
this.payForm.paymentSubjectId = ''
let [value1, value2, value3] = e
if (value1) this[formName].channel = value1
if (value2) this[formName].paymentSubjectId = value2
if (value3) this[formName].paymentChannelId = value3 //代征主体
await this.getListPayLevy(value2, value1) //重新获取代征主体获取最新的税率
this.recordInfo.taxRate = this.baseData.paymentEntityList.find(item => item.id === value3).tax + '%'
this.getAdmin()
this.calculateAmount()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!