Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
3d63519c
提交
3d63519c
编写于
8月 17, 2020
作者:
chendeli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品管理ui
上级
b03a8146
变更
2
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
204 行增加
和
179 行删除
+204
-179
create-good.vue
src/views/goods/create-good.vue
+178
-71
goods-manage.vue
src/views/goods/goods-manage.vue
+26
-108
未找到文件。
src/views/goods/create-good.vue
浏览文件 @
3d63519c
此差异已折叠。
点击以展开。
src/views/goods/goods-manage.vue
浏览文件 @
3d63519c
...
...
@@ -40,14 +40,19 @@
<el-col
:span=
"6"
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"batchOpt(3)"
>
批量导入
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"
createShop
"
>
新建单个商品
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"
edit('add')
"
>
新建单个商品
</el-button>
</el-col>
</el-row>
</el-form>
<el-table
:data=
"tableData"
class=
"item-table"
style=
"width: 100%;margin-top: 10px;"
>
<el-table-column
prop=
"id"
label=
"商品ID"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"商品名称"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table
:data=
"tableData"
class=
"item-table"
style=
"width: 100%;margin-top: 10px;"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
fixed
width=
"55"
>
</el-table-column>
<el-table-column
prop=
"id"
label=
"商品ID"
width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"商品名称"
min-width=
"140"
align=
"center"
></el-table-column>
<el-table-column
prop=
"type"
label=
"商品类型"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
type
|
dynamicFlagStatus
}}
</span>
...
...
@@ -67,12 +72,12 @@
<el-table-column
prop=
"num"
label=
"价格"
min-width=
"120"
align=
"center"
>
111
</el-table-column>
<el-table-column
prop=
"createdTime"
label=
"发布时间"
min-width=
"10
0"
align=
"center"
>
<el-table-column
prop=
"createdTime"
label=
"发布时间"
width=
"15
0"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createdTime
|
liveDateFilter
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"370"
align=
"center"
>
<el-table-column
label=
"操作"
min-width=
"370"
align=
"center"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<div>
<el-button
@
click=
"edit(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
...
...
@@ -121,7 +126,7 @@
:before-remove=
"beforeRemove"
multiple
:limit=
"3"
:on-exceed=
"handleExceed"
:file-list=
"fileList"
>
<i
class=
"el-icon-upload"
></i>
上传
</el-upload>
...
...
@@ -156,6 +161,7 @@
pageNo
:
1
,
pageSize
:
10
,
},
fileList
:[],
totalRows
:
0
,
tableData
:
[
{}
...
...
@@ -177,6 +183,12 @@
// this.searchList();
},
methods
:
{
handlePreview
(){},
handleRemove
(){},
beforeRemove
(){},
handleSelectionChange
(){
},
//批量 上下架操作
batchOpt
(
type
){
if
(
type
==
3
){
//批量导入
...
...
@@ -184,9 +196,14 @@
}
},
edit
(
row
){
///create-good
let
url
=
''
if
(
row
==
'add'
){
url
=
`/create-good?id=add`
}
else
{
url
=
`/create-good?id=
${
row
.
id
}
`
}
this
.
$router
.
push
({
path
:
`/create-good`
path
:
url
})
},
...
...
@@ -251,18 +268,6 @@
searchList
()
{
openLoading
(
this
);
let
params
=
this
.
searchForm
;
/* getRangeList(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.tableData = res.data.circleList;
this.totalRows = res.data.count;
} else {
this.tableData = [];
}
}).catch((error) => {
this.$message.error("请重试");
})*/
},
resetForm
()
{
...
...
@@ -273,95 +278,8 @@
};
this
.
searchList
();
},
//新建店铺
createShop
()
{
this
.
$router
.
push
({
path
:
`/create-good`
})
},
//上线
publishRange
(
row
)
{
this
.
$confirm
(
`确定上线“
${
row
.
name
}
”吗?`
,
''
,
{
confirmButtonText
:
'上线'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
// confirm
this
.
updateStatus
(
row
.
id
,
"30"
);
}).
catch
(()
=>
{
// cancel
// this.$message.error("上线失败");
});
},
//下线
unPublishRange
(
row
)
{
this
.
$confirm
(
`确定下线“
${
row
.
name
}
”吗?`
,
''
,
{
confirmButtonText
:
'下线'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
this
.
updateStatus
(
row
.
id
,
"40"
);
// confirm
}).
catch
(()
=>
{
// cancel
});
},
// 更新圈子状态(上线,下线)
updateStatus
(
id
,
status
){
let
params
=
{
"id"
:
id
,
"status"
:
status
};
updateRangeStatus
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
if
(
status
==
"40"
){
this
.
$message
.
success
(
"下线成功"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
success
(
"上线成功"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
success
(
"解散成功"
);
}
this
.
searchList
();
}
else
{
if
(
status
==
"40"
){
this
.
$message
.
error
(
"下线失败,请重试"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
error
(
"上线失败,请重试"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
error
(
"解散失败,请重试"
);
}
}
}).
catch
((
error
)
=>
{
if
(
status
==
"40"
){
this
.
$message
.
error
(
"下线失败,请重试"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
error
(
"上线失败,请重试"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
error
(
"解散失败,请重试"
);
}
})
},
//店铺管理
shopManage
(
row
)
{
this
.
$router
.
push
({
path
:
'/role-manage?id='
+
row
.
id
,
})
},
//编辑
editShop
(
row
)
{
let
enterType
=
2
;
//1:add 2 edit
this
.
$router
.
push
({
path
:
`/create-range?enterType`
,
query
:{
id
:
row
.
id
,
enterType
:
enterType
,
roleType
:
row
.
roleId
}
})
},
handleSizeChange
(
val
)
{
this
.
searchForm
.
pageSize
=
val
;
this
.
searchForm
.
pageNo
=
1
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录