修复一些问题以及优惠券管理功能

This commit is contained in:
xiaowang
2026-02-27 22:20:25 +08:00
parent 43f31eed53
commit fadc847b1d
30 changed files with 925 additions and 393 deletions
+10 -1
View File
@@ -50,6 +50,9 @@
/>
</div>
</template>
<template v-else-if="column.key === 'shop'">
<span>{{ getShopName(record.shopId) }}</span>
</template>
<template v-else-if="column.key === 'price'">
<span style="color: #cf1322; font-weight: 600;">
¥{{ record.price }}
@@ -107,7 +110,7 @@
placeholder="请选择店铺"
style="width: 100%"
:loading="loadingShops"
:disabled="!isAdmin && formState.shopId"
:disabled="!isAdmin && !!formState.shopId"
>
<a-select-option
v-if="shops.length === 0"
@@ -308,6 +311,7 @@ const formRules = {
const columns = [
{ title: '图片', key: 'image', width: 150 },
{ title: '商品名称', dataIndex: 'title', key: 'title' },
{ title: '所属店铺', key: 'shop', width: 150 },
{ title: '描述', dataIndex: 'description', key: 'description' },
{ title: '价格', key: 'price', width: 100 },
{ title: '预计时长', dataIndex: 'approximateDuration', key: 'approximateDuration', width: 120 },
@@ -317,6 +321,11 @@ const columns = [
{ title: '操作', key: 'actions', width: 150, fixed: 'right' as const }
]
const getShopName = (shopId: number): string => {
const shop = shops.value.find(s => s.id === shopId)
return shop ? shop.shopName : '未知店铺'
}
const getCurrentUserInfo = () => {
try {
const userInfoStr = localStorage.getItem('adminUserInfo')