挂账添加
This commit is contained in:
parent
d52a755338
commit
952574e92d
|
|
@ -112,14 +112,45 @@ export default {
|
|||
size: 10,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
couponId: null
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
* 获取挂账人列表
|
||||
*/
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
try {
|
||||
const res = await getCreditBuyerList({
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
keywords: this.tableData.keywords,
|
||||
status: this.tableData.status,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.data = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除挂账人
|
||||
* @param id
|
||||
*/
|
||||
async delTableHandle(id) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const res = await delCreditBuyer(id)
|
||||
this.getTableData()
|
||||
},
|
||||
|
||||
/**
|
||||
* 操作
|
||||
*/
|
||||
|
|
@ -147,46 +178,8 @@ export default {
|
|||
},
|
||||
// 分页回调
|
||||
paginationChange(e) {
|
||||
console.log(e)
|
||||
this.tableData.page = e
|
||||
this.getTableData()
|
||||
},
|
||||
// 获取挂账列表
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
try {
|
||||
const res = await getCreditBuyerList({
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
keywords: this.tableData.keywords,
|
||||
status: this.tableData.status,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.data = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
console.log(this.tableData)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看领取详情
|
||||
*/
|
||||
couponDetailsOpen(row) {
|
||||
this.$refs.couponDetails.show(row)
|
||||
this.couponId = row.id
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除优惠券
|
||||
* @param id
|
||||
*/
|
||||
async delTableHandle(id) {
|
||||
const delRes = await delCreditBuyer(id)
|
||||
console.log(delRes)
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,7 +302,6 @@ export default {
|
|||
default:
|
||||
break
|
||||
}
|
||||
console.log(this.timeValue)
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue