Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
华润手术跟台
admin
Commits
1314e118
提交
1314e118
authored
11月 16, 2022
作者:
leon
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
2550da90
c7f0df5d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
36 行增加
和
18 行删除
+36
-18
index.vue
src/views/product/goods-category/index.vue
+2
-2
index.vue
src/views/product/goods-price/index.vue
+2
-2
index.vue
src/views/product/goods/index.vue
+27
-11
index.vue
src/views/store/shoppingCart/index.vue
+5
-3
没有找到文件。
src/views/product/goods-category/index.vue
浏览文件 @
1314e118
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
<a-table
:columns=
"columns"
:data-source=
"data"
:pagination=
"false"
:loading=
"tableLoading"
rowKey=
"id"
>
<a-table
:columns=
"columns"
:data-source=
"data"
:pagination=
"false"
:loading=
"tableLoading"
rowKey=
"id"
>
<template
#
bodyCell=
"
{ column, record }">
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'status'"
>
<template
v-if=
"column.key === 'status'"
>
<span
v-if=
"record.status === 'YES'"
>
启用
</span>
<span
v-if=
"record.status === 'YES'"
>
<a-tag
color=
"green"
>
启用
</a-tag>
</span>
<span
v-else
>
禁用
</span>
<span
v-else
>
<a-tag
color=
"red"
>
禁用
</a-tag>
</span>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'action'"
>
<
template
v-if=
"column.key === 'action'"
>
<a-button
<a-button
...
...
src/views/product/goods-price/index.vue
浏览文件 @
1314e118
...
@@ -50,8 +50,8 @@
...
@@ -50,8 +50,8 @@
<span>
{{
record
.
discountStartTime
+
' - '
+
record
.
discountEndTime
}}
</span>
<span>
{{
record
.
discountStartTime
+
' - '
+
record
.
discountEndTime
}}
</span>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'status'"
>
<
template
v-if=
"column.key === 'status'"
>
<span
v-if=
"record.status === 'YES'"
>
启用
</span>
<span
v-if=
"record.status === 'YES'"
>
<a-tag
color=
"green"
>
启用
</a-tag>
</span>
<span
v-else
>
禁用
</span>
<span
v-else
>
<a-tag
color=
"red"
>
禁用
</a-tag>
</span>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'action'"
>
<
template
v-if=
"column.key === 'action'"
>
<a-button
type=
"link"
@
click=
"handleEdit(record.id)"
>
编辑
</a-button>
<a-button
type=
"link"
@
click=
"handleEdit(record.id)"
>
编辑
</a-button>
...
...
src/views/product/goods/index.vue
浏览文件 @
1314e118
...
@@ -42,30 +42,38 @@
...
@@ -42,30 +42,38 @@
<a-table
:dataSource=
"dataSource"
:columns=
"columns"
:pagination=
"pagination"
:loading=
"tableLoading"
>
<a-table
:dataSource=
"dataSource"
:columns=
"columns"
:pagination=
"pagination"
:loading=
"tableLoading"
>
<template
#
bodyCell=
"
{ column, record }">
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'status'"
>
<template
v-if=
"column.key === 'status'"
>
<span
v-if=
"record.status === 'YES'"
>
是
</span>
<span
v-if=
"record.status === 'YES'"
>
<a-tag
color=
"green"
>
是
</a-tag>
</span>
<span
v-else
>
否
</span>
<span
v-else
>
<a-tag
color=
"red"
>
否
</a-tag>
</span>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'isImport'"
>
<
template
v-if=
"column.key === 'isImport'"
>
<span
v-if=
"record.isImport === 'YES'"
>
是
</span>
<span
v-if=
"record.isImport === 'YES'"
>
<a-tag
color=
"green"
>
是
</a-tag>
</span>
<span
v-else
>
否
</span>
<span
v-else
>
<a-tag
color=
"red"
>
否
</a-tag>
</span>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'isNews'"
>
<
template
v-if=
"column.key === 'isNews'"
>
<span
v-if=
"record.isNews === 'YES'"
>
是
</span>
<span
v-if=
"record.isNews === 'YES'"
>
<a-tag
color=
"green"
>
是
</a-tag>
</span>
<span
v-else
>
否
</span>
<span
v-else
>
<a-tag
color=
"red"
>
否
</a-tag>
</span>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'isUnconventional'"
>
<
template
v-if=
"column.key === 'isUnconventional'"
>
<span
v-if=
"record.isUnconventional === 'YES'"
>
是
</span>
<span
v-if=
"record.isUnconventional === 'YES'"
>
<a-tag
color=
"green"
>
是
</a-tag>
</span>
<span
v-else
>
否
</span>
<span
v-else
>
<a-tag
color=
"red"
>
否
</a-tag>
</span>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'isPromotion'"
>
<
template
v-if=
"column.key === 'isPromotion'"
>
<span
v-if=
"record.isPromotion === 'YES'"
>
是
</span>
<span
v-if=
"record.isPromotion === 'YES'"
>
<a-tag
color=
"green"
>
是
</a-tag>
</span>
<span
v-else
>
否
</span>
<span
v-else
>
<a-tag
color=
"red"
>
否
</a-tag>
</span>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'action'"
>
<
template
v-if=
"column.key === 'action'"
>
<a-button
type=
"link"
@
click=
"handleAdd(record.id)"
v-if=
"hasPermission('AUTH_PRODUCT_GOODS:EDIT')"
<a-button
type=
"link"
@
click=
"handleAdd(record.id)"
v-if=
"hasPermission('AUTH_PRODUCT_GOODS:EDIT')"
>
编辑
</a-button
>
编辑
</a-button
>
>
<a-button
type=
"link"
v-if=
"hasPermission('AUTH_PRODUCT_GOODS:DELETE')"
>
删除
</a-button>
<a-popconfirm
title=
"是否确认删除?"
ok-text=
"是"
cancel-text=
"否"
@
confirm=
"handleDelete(record.id)"
v-if=
"hasPermission('AUTH_PRODUCT_GOODS:DELETE')"
>
<a-button
type=
"link"
>
删除
</a-button>
</a-popconfirm>
</
template
>
</
template
>
</template>
</template>
</a-table>
</a-table>
...
@@ -81,6 +89,7 @@
...
@@ -81,6 +89,7 @@
import
*
as
GoodsApi
from
'/@/api/product/goodsApi'
;
import
*
as
GoodsApi
from
'/@/api/product/goodsApi'
;
import
{
Goods
}
from
'/@/api/model/goods'
;
import
{
Goods
}
from
'/@/api/model/goods'
;
import
{
usePagination
}
from
'/@/hooks/myhooks/index'
;
import
{
usePagination
}
from
'/@/hooks/myhooks/index'
;
import
{
message
}
from
'ant-design-vue'
;
const
{
hasPermission
}
=
usePermission
();
const
{
hasPermission
}
=
usePermission
();
const
go
=
useGo
();
const
go
=
useGo
();
...
@@ -131,6 +140,13 @@
...
@@ -131,6 +140,13 @@
}
}
};
};
const
handleDelete
=
(
id
)
=>
{
GoodsApi
.
remove
(
id
).
then
((
res
)
=>
{
message
.
success
(
'删除成功'
);
getData
();
});
};
onMounted
(()
=>
{
onMounted
(()
=>
{
getData
();
getData
();
});
});
...
...
src/views/store/shoppingCart/index.vue
浏览文件 @
1314e118
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<div
class=
"productList"
>
<div
class=
"productList"
>
<a-table
<a-table
:dataSource=
"productList"
:dataSource=
"productList"
:columns=
"
c
olumns"
:columns=
"
productC
olumns"
:pagination=
"false"
:pagination=
"false"
childrenColumnName=
"cartProductDetailList"
childrenColumnName=
"cartProductDetailList"
rowKey=
"uuid"
rowKey=
"uuid"
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
import
Search
from
'../components/search.vue'
;
import
Search
from
'../components/search.vue'
;
import
Nav
from
'../components/nav.vue'
;
import
Nav
from
'../components/nav.vue'
;
import
{
DataItem
}
from
'/@/views/product/goods-category/type'
;
import
{
DataItem
}
from
'/@/views/product/goods-category/type'
;
import
{
toNumber
}
from
'lodash'
;
import
{
cloneDeep
,
toNumber
}
from
'lodash'
;
import
{
columns
}
from
'./schema'
;
import
{
columns
}
from
'./schema'
;
import
{
ShoppingCartOutlined
}
from
'@ant-design/icons-vue'
;
import
{
ShoppingCartOutlined
}
from
'@ant-design/icons-vue'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
...
@@ -92,7 +92,9 @@
...
@@ -92,7 +92,9 @@
const
route
=
useRoute
();
const
route
=
useRoute
();
const
getCartList
=
useCartList
();
const
getCartList
=
useCartList
();
columns
.
push
({
const
productColumns
=
cloneDeep
(
columns
);
productColumns
.
push
({
title
:
'操作'
,
title
:
'操作'
,
key
:
'active'
,
key
:
'active'
,
width
:
'100px'
,
width
:
'100px'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论