feat:后台退款
This commit is contained in:
1 parent
8292325f02
commit
bba6c00070
2 files changed
+36
-2
No files matched your search
@@ -1,5 +1,13 @@
|
|||||||
import request from "/@/utils/request"
|
import request from "/@/utils/request"
|
||||||
|
|
||||||
|
export function adminRefund(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: "/hard/hard-invoice/admin-refund",
|
||||||
|
method: "get",
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function print(query?: Object) {
|
export function print(query?: Object) {
|
||||||
return request({
|
return request({
|
||||||
url: "/hard/hard-invoice/print",
|
url: "/hard/hard-invoice/print",
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="200">
|
<el-table-column fixed="right" label="操作" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="grid grid-cols-2">
|
<div class="grid grid-cols-2 gap-4 justify-between">
|
||||||
<el-button icon="Printer" text type="primary" @click="print(row)" v-auth="'hard_hardInvoice_admin_print'">
|
<el-button icon="Printer" text type="primary" @click="print(row)" v-auth="'hard_hardInvoice_admin_print'">
|
||||||
打印发票
|
打印发票
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -207,8 +207,17 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
v-auth="'hard_hardwareOrder_edit'"
|
v-auth="'hard_hardwareOrder_edit'"
|
||||||
@click="formDialogRef.openDialog(row.id)"
|
@click="formDialogRef.openDialog(row.id)"
|
||||||
>编辑</el-button
|
>编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
icon="stamp"
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
v-auth="'hard_hardAfterSale_adminRefund'"
|
||||||
|
@click="adminRefund(row)"
|
||||||
>
|
>
|
||||||
|
退款
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="false"
|
v-if="false"
|
||||||
icon="delete"
|
icon="delete"
|
||||||
@@ -318,6 +327,23 @@ const print = async (row: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const adminRefund = async (row: any) => {
|
||||||
|
let loading: any = null
|
||||||
|
try {
|
||||||
|
await useMessage().delConfirm("是否同意退款?")
|
||||||
|
loading = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: "提交中",
|
||||||
|
background: "rgba(0, 0, 0, 0.7)",
|
||||||
|
})
|
||||||
|
await hardInvoice.adminRefund({ id: row.id })
|
||||||
|
useMessage().success("操作成功")
|
||||||
|
getDataList()
|
||||||
|
} finally {
|
||||||
|
setTimeout(() => loading.close(), 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
downBlobFile("/hard/hardwareOrder/export", Object.assign(state.queryForm, { ids: selectObjs }), "hardwareOrder.xlsx")
|
downBlobFile("/hard/hardwareOrder/export", Object.assign(state.queryForm, { ids: selectObjs }), "hardwareOrder.xlsx")
|
||||||
|
|||||||
Reference in new issue
Block a user