From 4ed0d66757d7fbd77bd5af97073c1d16b4311923 Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Sun, 29 Mar 2026 19:58:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/api/product.ts | 4 + admin/src/views/Dashboard.vue | 77 ++-------------- admin/src/views/order/OrderList.vue | 78 +++++++++------- admin/src/views/product/ProductForm.vue | 4 +- server/migrations/005_spec_snapshot.sql | 27 ++++++ server/migrations/006_shipped_at.sql | 1 + server/src/controllers/adminOrder.ts | 118 +++++++++++++++++++++--- server/src/routes/admin.ts | 12 +++ 8 files changed, 205 insertions(+), 116 deletions(-) create mode 100644 server/migrations/005_spec_snapshot.sql create mode 100644 server/migrations/006_shipped_at.sql diff --git a/admin/src/api/product.ts b/admin/src/api/product.ts index 085363fe..7dea0663 100644 --- a/admin/src/api/product.ts +++ b/admin/src/api/product.ts @@ -28,6 +28,10 @@ export function getStockAlerts() { return http.get('/admin/stock-alerts') } +export function getSpecDataCount() { + return http.get('/admin/spec-data-count') +} + export function exportSpecData(productId: number) { return http.get(`/admin/products/${productId}/spec-data/export`, { responseType: 'blob' } as any) } diff --git a/admin/src/views/Dashboard.vue b/admin/src/views/Dashboard.vue index 55a17cb5..a1984033 100644 --- a/admin/src/views/Dashboard.vue +++ b/admin/src/views/Dashboard.vue @@ -32,74 +32,38 @@
-
{{ stats.alertCount }}
-
库存预警
+
{{ stats.specCount }}
+
规格总数
- +
- - - - - - - - - - - - - - - - diff --git a/admin/src/views/order/OrderList.vue b/admin/src/views/order/OrderList.vue index 625d9097..05801926 100644 --- a/admin/src/views/order/OrderList.vue +++ b/admin/src/views/order/OrderList.vue @@ -21,6 +21,7 @@ + @@ -45,6 +46,22 @@ + +
+
发货信息
+
+
物流公司:{{ row.shipping_company }}
+
物流单号:{{ row.shipping_no }}
+
发货时间:{{ formatTime(row.shipped_at) }}
+
+
+ +
+
收货信息
+
+ 收货时间:{{ formatTime(row.received_at) }} +
+
取消/退款信息
@@ -68,6 +85,10 @@
{{ item.product_name }}
+ 款号:{{ item.style_no }} + 条形码:{{ item.barcode }} +
+
型号:{{ item.model_name }} 成色:{{ item.fineness }} 主石:{{ item.main_stone }} @@ -77,7 +98,6 @@
¥{{ Number(item.unit_price).toFixed(2) }}
-
×{{ item.quantity }}
@@ -144,13 +164,13 @@ @@ -212,6 +232,7 @@ 添加
+ 下载模板 导入 CSV @@ -242,11 +263,6 @@
- - - - - - - - - - - -
- 退货 {{ returnCheckedItems.reduce((s, i) => s + i.returnQty, 0) }} 件,退款金额 + 退货 {{ returnCheckedItems.length }} 件,退款金额 - ¥{{ returnCheckedItems.reduce((s, i) => s + i.returnQty * Number(i.unitPrice), 0).toFixed(2) }} + ¥{{ returnCheckedItems.reduce((s, i) => s + Number(i.unitPrice), 0).toFixed(2) }}
@@ -510,7 +512,7 @@