挂账添加

This commit is contained in:
GaoHao 2024-11-25 16:26:28 +08:00
parent d52a755338
commit 952574e92d
2 changed files with 33 additions and 41 deletions

View File

@ -112,14 +112,45 @@ export default {
size: 10, size: 10,
loading: false, loading: false,
total: 0 total: 0
}, }
couponId: null
} }
}, },
mounted() { mounted() {
this.getTableData() this.getTableData()
}, },
methods: { 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) { paginationChange(e) {
console.log(e)
this.tableData.page = e this.tableData.page = e
this.getTableData() 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()
} }
} }
} }

View File

@ -302,7 +302,6 @@ export default {
default: default:
break break
} }
console.log(this.timeValue)
}, },
/** /**