diff --git a/frontend/web-admin/src/mockApi.js b/frontend/web-admin/src/mockApi.js
index 54ed852..c546639 100644
--- a/frontend/web-admin/src/mockApi.js
+++ b/frontend/web-admin/src/mockApi.js
@@ -730,6 +730,7 @@ export async function fetchProductList(filters = {}) {
unit: spec.unit || "-",
costPrice: Number(spec.cost_price || 0).toFixed(2),
salePrice: Number(spec.sale_price || 0).toFixed(2),
+ isDefault: Boolean(spec.is_default),
status: Number(spec.status || 1) === 1 ? "启用" : "停用",
remark: spec.remark || "-",
})),
diff --git a/frontend/web-admin/src/views/MasterDataPage.vue b/frontend/web-admin/src/views/MasterDataPage.vue
index 2351aac..9eb2ef9 100644
--- a/frontend/web-admin/src/views/MasterDataPage.vue
+++ b/frontend/web-admin/src/views/MasterDataPage.vue
@@ -535,7 +535,11 @@
|
产品名称 |
- 规格数量 |
+ 默认规格 |
+ 单位 |
+ 规格数 |
+ 成本价 |
+ 售价 |
分类 |
状态 |
操作 |
@@ -545,7 +549,11 @@
|
{{ row.productName }} |
+ {{ row.specifications.find(s => s.isDefault)?.specification || row.specifications[0]?.specification || '-' }} |
+ {{ row.specifications.find(s => s.isDefault)?.unit || row.specifications[0]?.unit || '-' }} |
{{ row.specifications.length }} |
+ ¥{{ row.specifications.find(s => s.isDefault)?.costPrice || row.specifications[0]?.costPrice || '0.00' }} |
+ ¥{{ row.specifications.find(s => s.isDefault)?.salePrice || row.specifications[0]?.salePrice || '0.00' }} |
{{ row.categoryName }} |
{{ row.status }} |
@@ -1992,7 +2000,7 @@ textarea,
.loading { margin: 0; color: #6b7280; }
.empty-state { padding: 24px; border: 1px dashed #cbd5e1; border-radius: 16px; color: #64748b; text-align: center; background: #fff; }
.table-wrap { overflow-x: auto; }
-table { width: 100%; border-collapse: collapse; min-width: 860px; }
+table { width: 100%; border-collapse: collapse; min-width: 1100px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
th { color: #334155; font-size: 13px; background: #f8fafc; }
.status { display: inline-flex; padding: 4px 10px; border-radius: 999px; }
|