From ca11691c03c14200bce6ce5589400a432795991b Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Wed, 27 Aug 2025 20:15:28 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=95=86?=
=?UTF-8?q?=E5=93=81=E7=BA=A7=E9=80=80=E6=AC=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/hard/hard-after-sale.ts | 8 ++
src/api/hard/hard-car.ts | 77 ++++++-----
src/hooks/table.ts | 4 +-
.../components/admin-refund-dialog/form.vue | 8 +-
.../components/admin-refund-dialog/index.vue | 19 ++-
.../components/admin-refund-dialog/table.vue | 123 +++++++++++++++---
src/views/hard/hard-order/index.vue | 5 +-
7 files changed, 182 insertions(+), 62 deletions(-)
diff --git a/src/api/hard/hard-after-sale.ts b/src/api/hard/hard-after-sale.ts
index ad4ae65..283cbd9 100644
--- a/src/api/hard/hard-after-sale.ts
+++ b/src/api/hard/hard-after-sale.ts
@@ -8,6 +8,14 @@ export function adminRefund(data?: Object) {
})
}
+export function adminReinforceRefund(data?: Object) {
+ return request({
+ url: "/hard/hard-after-sale/admin-reinforce-refund",
+ method: "post",
+ data,
+ })
+}
+
export function history(query?: Object) {
return request({
url: "/hard/hard-after-sale/history",
diff --git a/src/api/hard/hard-car.ts b/src/api/hard/hard-car.ts
index 6c068e1..d92a11a 100644
--- a/src/api/hard/hard-car.ts
+++ b/src/api/hard/hard-car.ts
@@ -1,57 +1,64 @@
import request from "/@/utils/request"
export function getCarByOrderId(query?: Object) {
- return request({
- url: '/hard/hard-car/order-id',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/hard/hard-car/order-id",
+ method: "get",
+ params: query,
+ })
+}
+
+export function refundCar(query?: Object) {
+ return request({
+ url: "/hard/hard-car/refund-car",
+ method: "get",
+ params: query,
+ })
}
export function pageJoin(query?: Object) {
- return request({
- url: '/hard/hard-car/page-join',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/hard/hard-car/page-join",
+ method: "get",
+ params: query,
+ })
}
export function fetchList(query?: Object) {
- return request({
- url: '/hard/hard-car/page',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/hard/hard-car/page",
+ method: "get",
+ params: query,
+ })
}
export function addObj(obj?: Object) {
- return request({
- url: '/hard/hard-car',
- method: 'post',
- data: obj
- })
+ return request({
+ url: "/hard/hard-car",
+ method: "post",
+ data: obj,
+ })
}
export function getObj(id?: string) {
- return request({
- url: '/hard/hard-car/' + id,
- method: 'get'
- })
+ return request({
+ url: "/hard/hard-car/" + id,
+ method: "get",
+ })
}
export function delObjs(ids?: Object) {
- return request({
- url: '/hard/hard-car',
- method: 'delete',
- data: ids
- })
+ return request({
+ url: "/hard/hard-car",
+ method: "delete",
+ data: ids,
+ })
}
export function putObj(obj?: Object) {
- return request({
- url: '/hard/hard-car',
- method: 'put',
- data: obj
- })
+ return request({
+ url: "/hard/hard-car",
+ method: "put",
+ data: obj,
+ })
}
-
diff --git a/src/hooks/table.ts b/src/hooks/table.ts
index af2c58c..1fe3749 100644
--- a/src/hooks/table.ts
+++ b/src/hooks/table.ts
@@ -203,13 +203,13 @@ export function useTable(options?: BasicTableProps) {
* 刷新后不跳转第一页,则入参 getDataList(false)
* @param refresh 是否刷新当前页码
*/
- const getDataList = (refresh?: any) => {
+ const getDataList = async (refresh?: any) => {
// 如果需要刷新,则将state.pagination.current重置为1
if (refresh !== false) {
state.pagination!.current = 1
}
// 再次发起查询操作
- query()
+ await query()
}
/**
diff --git a/src/views/hard/hard-order/components/admin-refund-dialog/form.vue b/src/views/hard/hard-order/components/admin-refund-dialog/form.vue
index ccf9882..106581c 100644
--- a/src/views/hard/hard-order/components/admin-refund-dialog/form.vue
+++ b/src/views/hard/hard-order/components/admin-refund-dialog/form.vue
@@ -33,6 +33,7 @@
diff --git a/src/views/hard/hard-order/index.vue b/src/views/hard/hard-order/index.vue
index 8a3cb26..c4ab917 100644
--- a/src/views/hard/hard-order/index.vue
+++ b/src/views/hard/hard-order/index.vue
@@ -224,8 +224,7 @@
v-auth="'hard_hardwareOrder_edit'" @click="formDialogRef.openDialog(row.id)">
编辑
-
退款
@@ -402,7 +401,7 @@ const getSummaries = (param: SummaryMethodProps) => {
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
- ].forEach(({ column, columnName, color }: any) => {
+ ].forEach(({ column, columnName, color }: any, index: number) => {
const values = data.map((item) => Number(item[column]))
if (!values.every((value) => Number.isNaN(value))) {
priceVNode.push(