Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
70faa810
Commit
70faa810
authored
Jun 22, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature 商品详情页完成
parent
d6f3fadf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
64 deletions
+16
-64
index.vue
src/pages/Goods/List/index.vue
+16
-64
No files found.
src/pages/Goods/List/index.vue
View file @
70faa810
...
@@ -78,57 +78,27 @@
...
@@ -78,57 +78,27 @@
>
>
<el-table-column
<el-table-column
label=
"商品id"
label=
"商品id"
prop=
"goods_id"
prop=
"goods_
sku_
id"
align=
"center"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
label=
"商品名称"
label=
"商品名称"
prop=
"
goods_
name"
prop=
"name"
align=
"center"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
label=
"一级分类"
label=
"一级分类"
prop=
"
first_classify
"
prop=
"
category_1_name
"
align=
"center"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
label=
"二级分类"
label=
"二级分类"
prop=
"second_classify"
prop=
"category_2_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"关联门店"
prop=
"shop"
align=
"center"
></el-table-column>
<el-table-column
label=
"活动营销价"
prop=
"sale_prise"
align=
"center"
></el-table-column>
<el-table-column
label=
"售价"
prop=
"prise"
align=
"center"
></el-table-column>
<el-table-column
label=
"原价"
prop=
"perprise"
align=
"center"
></el-table-column>
<el-table-column
label=
"库存"
prop=
"inventory"
align=
"center"
></el-table-column>
<el-table-column
label=
"状态"
prop=
"state"
align=
"center"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
label=
"生活号id"
label=
"生活号id"
prop=
"life_
no
_id"
prop=
"life_
account
_id"
align=
"center"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
...
@@ -138,17 +108,17 @@
...
@@ -138,17 +108,17 @@
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
label=
"发布者"
label=
"发布者"
prop=
"
publisher
"
prop=
"
user_id
"
align=
"center"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
label=
"状态更新时间"
label=
"状态更新时间"
prop=
"
state_
update_time"
prop=
"update_time"
align=
"center"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
label=
"商品创建时间"
label=
"商品创建时间"
prop=
"
goods_
create_time"
prop=
"create_time"
align=
"center"
align=
"center"
></el-table-column>
></el-table-column>
<!-- 操作快捷键 -->
<!-- 操作快捷键 -->
...
@@ -161,22 +131,21 @@
...
@@ -161,22 +131,21 @@
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
<el-button
type=
"text"
type=
"text"
v-if=
"scope.row.state === 1"
@
click=
"goDetail(`EDIT`)"
@
click=
"goDetail(`EDIT`)"
>
编辑
</el-button>
>
编辑
</el-button>
<el-button
<el-button
v-if=
"scope.row.status == 0"
type=
"text"
type=
"text"
v-if=
"scope.row.state === 1"
@
click=
"goDetail(`AUDIT`)"
@
click=
"goDetail(`AUDIT`)"
>
审核
</el-button>
>
审核
</el-button>
<el-button
<el-button
v-if=
"scope.row.online_status == 2"
type=
"text"
type=
"text"
v-if=
"scope.row.state === 1"
@
click=
"changeGoodsState('GROUNDING')"
@
click=
"changeGoodsState('GROUNDING')"
>
上架
</el-button>
>
上架
</el-button>
<el-button
<el-button
v-if=
"scope.row.online_status == 1"
type=
"text"
type=
"text"
v-if=
"scope.row.state === 1"
@
click=
"changeGoodsState('UNDERCARRIAGE')"
@
click=
"changeGoodsState('UNDERCARRIAGE')"
>
下架
</el-button>
>
下架
</el-button>
</
template
>
</
template
>
...
@@ -229,7 +198,7 @@ export default {
...
@@ -229,7 +198,7 @@ export default {
name
:
""
,
// 商品名称
name
:
""
,
// 商品名称
category_1_id
:
""
,
// 一级分类id
category_1_id
:
""
,
// 一级分类id
category_2_id
:
""
,
// 二级分类id
category_2_id
:
""
,
// 二级分类id
life_account_id
:
0
,
life_account_id
:
""
,
life_account_name
:
""
,
life_account_name
:
""
,
status
:
""
,
// 商品状态
status
:
""
,
// 商品状态
online_status
:
""
// 上架状态
online_status
:
""
// 上架状态
...
@@ -255,25 +224,7 @@ export default {
...
@@ -255,25 +224,7 @@ export default {
onlineStatus
:
[],
onlineStatus
:
[],
// 商品列表
// 商品列表
goodsList
:
[
goodsList
:
[],
{
goods_id
:
1
,
goods_name
:
"威化"
,
first_classify
:
1
,
second_classify
:
1
,
life_no_id
:
1
,
shop
:
"楼下小卖部"
,
life_no_name
:
"1的生活号"
,
publisher
:
"蒙文昊"
,
sale_prise
:
300
,
prise
:
200
,
perprise
:
500
,
inventory
:
999
,
state
:
1
,
state_update_time
:
"2021-06-17"
,
goods_create_time
:
"2021-06-17"
}
],
currentPage
:
1
,
// 当前页码
currentPage
:
1
,
// 当前页码
totalCount
:
0
// 总条数
totalCount
:
0
// 总条数
...
@@ -299,8 +250,9 @@ export default {
...
@@ -299,8 +250,9 @@ export default {
try
{
try
{
const
res
=
await
getList
(
this
.
searchProps
);
const
res
=
await
getList
(
this
.
searchProps
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
console
.
log
(
res
);
this
.
goodsList
=
res
.
result
.
list
;
this
.
goodsList
=
res
.
result
.
list
;
this
.
totalCount
=
res
.
result
.
count
this
.
totalCount
=
res
.
result
.
count
;
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment