Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
kadycui
game-admin
提交
46b10351
game-admin
项目概览
kadycui
/
game-admin
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
game-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
46b10351
编写于
9月 20, 2023
作者:
kadycui
💻
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ADD: 商品管理界面
上级
5a9ead8d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
53 addition
and
41 deletion
+53
-41
src/pages/goods/list.vue
src/pages/goods/list.vue
+53
-41
未找到文件。
src/pages/goods/list.vue
浏览文件 @
46b10351
...
...
@@ -28,47 +28,59 @@
<el-table
v-loading=
"loading"
element-loading-text=
"加载中..."
element-loading-spinner=
"el-icon-loading"
:data=
"tableData"
stripe
style=
"width:
1
00%"
>
<el-table-column
label=
"
管理员"
width=
"2
00"
>
:data=
"tableData"
stripe
style=
"width:
3
00%"
>
<el-table-column
label=
"
商品"
width=
"3
00"
>
<template
#default
="
{ row }">
<div
class=
"flex items-center"
>
<el-avatar
:size=
"40"
:src=
"row.avatar"
>
<img
src=
"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"
/>
</el-avatar>
<div
class=
"ml-3"
>
<h6>
{{
row
.
username
}}
</h6>
<small>
ID:
{{
row
.
id
}}
</small>
<div
class=
"flex"
>
<el-image
class=
"mr-3 rounded"
:src=
"row.cover"
fit=
"cover"
:lazy=
"true"
style=
"width: 50px; height: 50px;"
></el-image>
<div
class=
"flex-1"
>
<p>
{{
row
.
title
}}
</p>
<div>
<span
class=
"text-rose-500"
>
¥
{{
row
.
min_price
}}
</span>
<el-divider
direction=
"vertical"
></el-divider>
<span
class=
"text-gray-500 text-xs"
>
¥
{{
row
.
min_oprice
}}
</span>
</div>
<p
class=
"text-gray-400 text-xs mb-1"
>
分类:
{{
row
.
category
?
row
.
category
.
name
:
"
未分类
"
}}
</p>
<p
class=
"text-gray-400 text-xs"
>
创建时间:
{{
row
.
create_time
}}
</p>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"所属角色"
align=
"center"
>
<el-table-column
label=
"实际销量"
width=
"90"
prop=
"sale_count"
align=
"center"
/>
<el-table-column
label=
"商品状态"
width=
"120"
align=
"center"
>
<
template
#default=
"{ row }"
>
{{
row
.
role
?.
name
||
"
_
"
}}
<el-tag
:type=
"row.status ? 'success' : 'danger'"
size=
"small"
>
{{
row
.
status
?
'
上架
'
:
'
仓库
'
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
width=
"120"
>
<el-table-column
v-if=
"searchForm.tab != 'delete'"
label=
"审核状态"
width=
"120"
align=
"center"
>
<
template
#default=
"{ row }"
>
<el-switch
:modelValue=
"row.status"
:active-value=
"1"
:inactive-value=
"0"
:loading=
"row.statusLoading"
:disabled=
"row.super == 1"
@
change=
"handleStatusChange($event, row)"
>
</el-switch>
<div
class=
"flex flex-col"
v-if=
"row.ischeck == 0"
>
<el-button
type=
"success"
size=
"small"
plain
>
审核通过
</el-button>
<el-button
class=
"mt-2 !ml-0"
type=
"danger"
size=
"small"
plain
>
审核拒绝
</el-button>
</div>
<span>
{{
row
.
ischeck
==
1
?
'
通过
'
:
'
拒绝
'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"180"
align=
"center"
>
<el-table-column
label=
"总库存"
width=
"90"
prop=
"stock"
align=
"center"
/>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
#default=
"scope"
>
<small
v-if=
"scope.row.super == 1"
class=
"text-sm text-gray-500"
>
暂无操作
</small>
<div
v-else
>
<el-button
type=
"primary"
size=
"small"
text
@
click=
"handleEdit(scope.row)"
>
修改
</el-button>
<el-popconfirm
title=
"是否删除该管理员?"
confirm-button-text=
"确认"
cancel-button-text=
"取消"
<div
v-if=
"searchForm.tab != 'delete'"
>
<el-button
class=
"px-1"
type=
"primary"
size=
"small"
text
>
修改
</el-button>
<el-button
class=
"px-1"
type=
"primary"
size=
"small"
text
>
商品规格
</el-button>
<el-button
class=
"px-1"
type=
"primary"
size=
"small"
text
>
设置轮播图
</el-button>
<el-button
class=
"px-1"
type=
"primary"
size=
"small"
text
>
商品详情
</el-button>
<el-popconfirm
title=
"是否删除该商品?"
confirm-button-text=
"确认"
cancel-button-text=
"取消"
@
confirm=
"handleDelete(scope.row.id)"
>
<template
#reference
>
<el-button
text
type=
"primary"
size=
"small"
>
删除
</el-button>
<el-button
class=
"px-1"
text
type=
"primary"
size=
"small"
>
删除
</el-button>
</
template
>
</el-popconfirm>
</div>
<span
v-else
>
暂无操作
</span>
</template>
</el-table-column>
</el-table>
...
...
@@ -187,23 +199,23 @@ const {
const
tabbars
=
[{
key
:
"
all
"
,
name
:
"
全部
"
},{
key
:
"
checking
"
,
name
:
"
审核中
"
},{
key
:
"
saling
"
,
name
:
"
出售中
"
},{
key
:
"
off
"
,
name
:
"
已下架
"
},{
key
:
"
min_stock
"
,
name
:
"
库存预警
"
},{
key
:
"
delete
"
,
name
:
"
回收站
"
key
:
"
all
"
,
name
:
"
全部
"
},
{
key
:
"
checking
"
,
name
:
"
审核中
"
},
{
key
:
"
saling
"
,
name
:
"
出售中
"
},
{
key
:
"
off
"
,
name
:
"
已下架
"
},
{
key
:
"
min_stock
"
,
name
:
"
库存预警
"
},
{
key
:
"
delete
"
,
name
:
"
回收站
"
}]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录