Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
2f3ef296
Unverified
Commit
2f3ef296
authored
Aug 04, 2020
by
端午安康
Committed by
GitHub
Aug 04, 2020
Browse files
Merge pull request #1 from linlinjava/master
update
parents
a2f77152
83711ec2
Changes
72
Show whitespace changes
Inline
Side-by-side
litemall-admin/src/views/goods/comment.vue
View file @
2f3ef296
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<!-- 查询和其他操作 -->
<!-- 查询和其他操作 -->
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.userId"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入用户ID"
/>
<el-input
v-model=
"listQuery.userId"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入用户ID"
/>
<el-input
v-model=
"listQuery.valueId"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入商品ID"
/>
<el-input
v-model=
"listQuery.valueId"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入商品ID"
/>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
</div>
</div>
...
@@ -12,21 +12,21 @@
...
@@ -12,21 +12,21 @@
<!-- 查询结果 -->
<!-- 查询结果 -->
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
label=
"用户ID"
prop=
"userId"
/>
<el-table-column
align=
"center"
label=
"用户ID"
prop=
"userId"
/>
<el-table-column
align=
"center"
label=
"商品ID"
prop=
"valueId"
/>
<el-table-column
align=
"center"
label=
"商品ID"
prop=
"valueId"
/>
<el-table-column
align=
"center"
label=
"打分"
prop=
"star"
/>
<el-table-column
align=
"center"
label=
"打分"
prop=
"star"
/>
<el-table-column
align=
"center"
label=
"评论内容"
prop=
"content"
/>
<el-table-column
align=
"center"
label=
"评论内容"
prop=
"content"
/>
<el-table-column
align=
"center"
label=
"评论图片"
prop=
"picUrls"
>
<el-table-column
align=
"center"
label=
"评论图片"
prop=
"picUrls"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-image
v-for=
"item in scope.row.picUrls"
:key=
"item"
:src=
"item"
:preview-src-list=
"scope.row.picUrls"
:lazy=
"true"
style=
"width: 40px; height: 40px; margin-right: 5px;"
/>
<el-image
v-for=
"item in scope.row.picUrls"
:key=
"item"
:src=
"item"
:preview-src-list=
"scope.row.picUrls"
:lazy=
"true"
style=
"width: 40px; height: 40px; margin-right: 5px;"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"时间"
prop=
"addTime"
/>
<el-table-column
align=
"center"
label=
"时间"
prop=
"addTime"
/>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
class-name=
"small-padding fixed-width"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<el-dialog
:visible.sync=
"replyFormVisible"
title=
"回复"
>
<el-dialog
:visible.sync=
"replyFormVisible"
title=
"回复"
>
<el-form
ref=
"replyForm"
:model=
"replyForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form
ref=
"replyForm"
:model=
"replyForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"回复内容"
prop=
"content"
>
<el-form-item
label=
"回复内容"
prop=
"content"
>
<el-input
:autosize=
"{ minRows: 4, maxRows: 8}"
v-model=
"replyForm.content"
type=
"textarea"
/>
<el-input
v-model=
"replyForm.content"
:autosize=
"{ minRows: 4, maxRows: 8}"
type=
"textarea"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -129,8 +129,7 @@ export default {
...
@@ -129,8 +129,7 @@ export default {
type
:
'
success
'
,
type
:
'
success
'
,
duration
:
2000
duration
:
2000
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
})
})
},
},
handleDownload
()
{
handleDownload
()
{
...
...
litemall-admin/src/views/goods/create.vue
View file @
2f3ef296
...
@@ -410,7 +410,8 @@ export default {
...
@@ -410,7 +410,8 @@ export default {
this
.
goods
.
categoryId
=
value
[
value
.
length
-
1
]
this
.
goods
.
categoryId
=
value
[
value
.
length
-
1
]
},
},
handleCancel
:
function
()
{
handleCancel
:
function
()
{
this
.
$router
.
push
({
path
:
'
/goods/goods
'
})
this
.
$store
.
dispatch
(
'
tagsView/delView
'
,
this
.
$route
)
this
.
$router
.
push
({
path
:
'
/goods/list
'
})
},
},
handlePublish
:
function
()
{
handlePublish
:
function
()
{
const
finalGoods
=
{
const
finalGoods
=
{
...
@@ -424,6 +425,7 @@ export default {
...
@@ -424,6 +425,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
创建成功
'
message
:
'
创建成功
'
})
})
this
.
$store
.
dispatch
(
'
tagsView/delView
'
,
this
.
$route
)
this
.
$router
.
push
({
path
:
'
/goods/list
'
})
this
.
$router
.
push
({
path
:
'
/goods/list
'
})
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
...
...
litemall-admin/src/views/goods/edit.vue
View file @
2f3ef296
...
@@ -419,6 +419,7 @@ export default {
...
@@ -419,6 +419,7 @@ export default {
this
.
goods
.
categoryId
=
value
[
value
.
length
-
1
]
this
.
goods
.
categoryId
=
value
[
value
.
length
-
1
]
},
},
handleCancel
:
function
()
{
handleCancel
:
function
()
{
this
.
$store
.
dispatch
(
'
tagsView/delView
'
,
this
.
$route
)
this
.
$router
.
push
({
path
:
'
/goods/list
'
})
this
.
$router
.
push
({
path
:
'
/goods/list
'
})
},
},
handleEdit
:
function
()
{
handleEdit
:
function
()
{
...
@@ -432,8 +433,9 @@ export default {
...
@@ -432,8 +433,9 @@ export default {
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
$notify
.
success
({
this
.
$notify
.
success
({
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
创建
成功
'
message
:
'
编辑
成功
'
})
})
this
.
$store
.
dispatch
(
'
tagsView/delView
'
,
this
.
$route
)
this
.
$router
.
push
({
path
:
'
/goods/list
'
})
this
.
$router
.
push
({
path
:
'
/goods/list
'
})
})
})
.
catch
(
response
=>
{
.
catch
(
response
=>
{
...
...
litemall-admin/src/views/goods/list.vue
View file @
2f3ef296
...
@@ -190,8 +190,7 @@ export default {
...
@@ -190,8 +190,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
删除成功
'
message
:
'
删除成功
'
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
this
.
$notify
.
error
({
this
.
$notify
.
error
({
title
:
'
失败
'
,
title
:
'
失败
'
,
...
...
litemall-admin/src/views/layout/components/Navbar.vue
View file @
2f3ef296
...
@@ -46,8 +46,8 @@
...
@@ -46,8 +46,8 @@
密码修改
密码修改
</router-link>
</router-link>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
divided
>
<el-dropdown-item
divided
@
click.native=
"logout"
>
<span
style=
"display:block;"
@
click=
"logout"
>
退出
</span>
<span
style=
"display:block;"
>
退出
</span>
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
...
...
litemall-admin/src/views/layout/components/Sidebar/Item.vue
View file @
2f3ef296
...
@@ -17,8 +17,12 @@ export default {
...
@@ -17,8 +17,12 @@ export default {
const
vnodes
=
[]
const
vnodes
=
[]
if
(
icon
)
{
if
(
icon
)
{
if
(
icon
.
includes
(
'
el-icon
'
))
{
vnodes
.
push
(
<
i
class
=
{[
icon
,
'
sub-el-icon
'
]}
/>
)
}
else
{
vnodes
.
push
(
<
svg
-
icon
icon
-
class
=
{
icon
}
/>
)
vnodes
.
push
(
<
svg
-
icon
icon
-
class
=
{
icon
}
/>
)
}
}
}
if
(
title
)
{
if
(
title
)
{
vnodes
.
push
(
<
span
slot
=
'
title
'
>
{(
title
)}
<
/span>
)
vnodes
.
push
(
<
span
slot
=
'
title
'
>
{(
title
)}
<
/span>
)
...
@@ -27,3 +31,11 @@ export default {
...
@@ -27,3 +31,11 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
.sub-el-icon
{
color
:
currentColor
;
width
:
1em
;
height
:
1em
;
}
</
style
>
litemall-admin/src/views/layout/components/Sidebar/Link.vue
View file @
2f3ef296
<
template
>
<
template
>
<!-- eslint-disable vue/require-component-is-->
<component
:is=
"type"
v-bind=
"linkProps(to)"
>
<component
v-bind=
"linkProps(to)"
>
<slot
/>
<slot/>
</component>
</component>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
isExternal
}
from
'
@/utils
'
import
{
isExternal
}
from
'
@/utils/validate
'
export
default
{
export
default
{
props
:
{
props
:
{
to
:
{
to
:
{
...
@@ -16,22 +13,28 @@ export default {
...
@@ -16,22 +13,28 @@ export default {
required
:
true
required
:
true
}
}
},
},
methods
:
{
computed
:
{
isExternal
Link
(
routePath
)
{
isExternal
(
)
{
return
isExternal
(
routePath
)
return
isExternal
(
this
.
to
)
},
},
linkProps
(
url
)
{
type
()
{
if
(
this
.
isExternalLink
(
url
))
{
if
(
this
.
isExternal
)
{
return
'
a
'
}
return
'
router-link
'
}
},
methods
:
{
linkProps
(
to
)
{
if
(
this
.
isExternal
)
{
return
{
return
{
is
:
'
a
'
,
href
:
to
,
href
:
url
,
target
:
'
_blank
'
,
target
:
'
_blank
'
,
rel
:
'
noopener
'
rel
:
'
noopener
'
}
}
}
}
return
{
return
{
is
:
'
router-link
'
,
to
:
to
to
:
url
}
}
}
}
}
}
...
...
litemall-admin/src/views/layout/components/Sidebar/index.vue
View file @
2f3ef296
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
text-color=
"#bfcbd9"
text-color=
"#bfcbd9"
active-text-color=
"#409EFF"
active-text-color=
"#409EFF"
>
>
<sidebar-item
v-for=
"route in permission_route
r
s"
:key=
"route.path"
:item=
"route"
:base-path=
"route.path"
/>
<sidebar-item
v-for=
"route in permission_routes"
:key=
"route.path"
:item=
"route"
:base-path=
"route.path"
/>
</el-menu>
</el-menu>
</el-scrollbar>
</el-scrollbar>
</
template
>
</
template
>
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
components
:
{
SidebarItem
},
components
:
{
SidebarItem
},
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
'
permission_route
r
s
'
,
'
permission_routes
'
,
'
sidebar
'
'
sidebar
'
]),
]),
isCollapse
()
{
isCollapse
()
{
...
...
litemall-admin/src/views/layout/components/ScrollPane.vue
→
litemall-admin/src/views/layout/components/
TagsView/
ScrollPane.vue
View file @
2f3ef296
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
<
script
>
<
script
>
const
tagAndTagSpacing
=
4
// tagAndTagSpacing
const
tagAndTagSpacing
=
4
// tagAndTagSpacing
export
default
{
export
default
{
name
:
'
ScrollPane
'
,
name
:
'
ScrollPane
'
,
data
()
{
data
()
{
...
@@ -19,27 +18,33 @@ export default {
...
@@ -19,27 +18,33 @@ export default {
return
this
.
$refs
.
scrollContainer
.
$refs
.
wrap
return
this
.
$refs
.
scrollContainer
.
$refs
.
wrap
}
}
},
},
mounted
()
{
this
.
scrollWrapper
.
addEventListener
(
'
scroll
'
,
this
.
emitScroll
,
true
)
},
beforeDestroy
()
{
this
.
scrollWrapper
.
removeEventListener
(
'
scroll
'
,
this
.
emitScroll
)
},
methods
:
{
methods
:
{
handleScroll
(
e
)
{
handleScroll
(
e
)
{
const
eventDelta
=
e
.
wheelDelta
||
-
e
.
deltaY
*
40
const
eventDelta
=
e
.
wheelDelta
||
-
e
.
deltaY
*
40
const
$scrollWrapper
=
this
.
scrollWrapper
const
$scrollWrapper
=
this
.
scrollWrapper
$scrollWrapper
.
scrollLeft
=
$scrollWrapper
.
scrollLeft
+
eventDelta
/
4
$scrollWrapper
.
scrollLeft
=
$scrollWrapper
.
scrollLeft
+
eventDelta
/
4
},
},
emitScroll
()
{
this
.
$emit
(
'
scroll
'
)
},
moveToTarget
(
currentTag
)
{
moveToTarget
(
currentTag
)
{
const
$container
=
this
.
$refs
.
scrollContainer
.
$el
const
$container
=
this
.
$refs
.
scrollContainer
.
$el
const
$containerWidth
=
$container
.
offsetWidth
const
$containerWidth
=
$container
.
offsetWidth
const
$scrollWrapper
=
this
.
scrollWrapper
const
$scrollWrapper
=
this
.
scrollWrapper
const
tagList
=
this
.
$parent
.
$refs
.
tag
const
tagList
=
this
.
$parent
.
$refs
.
tag
let
firstTag
=
null
let
firstTag
=
null
let
lastTag
=
null
let
lastTag
=
null
// find first tag and last tag
// find first tag and last tag
if
(
tagList
.
length
>
0
)
{
if
(
tagList
.
length
>
0
)
{
firstTag
=
tagList
[
0
]
firstTag
=
tagList
[
0
]
lastTag
=
tagList
[
tagList
.
length
-
1
]
lastTag
=
tagList
[
tagList
.
length
-
1
]
}
}
if
(
firstTag
===
currentTag
)
{
if
(
firstTag
===
currentTag
)
{
$scrollWrapper
.
scrollLeft
=
0
$scrollWrapper
.
scrollLeft
=
0
}
else
if
(
lastTag
===
currentTag
)
{
}
else
if
(
lastTag
===
currentTag
)
{
...
@@ -49,13 +54,10 @@ export default {
...
@@ -49,13 +54,10 @@ export default {
const
currentIndex
=
tagList
.
findIndex
(
item
=>
item
===
currentTag
)
const
currentIndex
=
tagList
.
findIndex
(
item
=>
item
===
currentTag
)
const
prevTag
=
tagList
[
currentIndex
-
1
]
const
prevTag
=
tagList
[
currentIndex
-
1
]
const
nextTag
=
tagList
[
currentIndex
+
1
]
const
nextTag
=
tagList
[
currentIndex
+
1
]
// the tag's offsetLeft after of nextTag
// the tag's offsetLeft after of nextTag
const
afterNextTagOffsetLeft
=
nextTag
.
$el
.
offsetLeft
+
nextTag
.
$el
.
offsetWidth
+
tagAndTagSpacing
const
afterNextTagOffsetLeft
=
nextTag
.
$el
.
offsetLeft
+
nextTag
.
$el
.
offsetWidth
+
tagAndTagSpacing
// the tag's offsetLeft before of prevTag
// the tag's offsetLeft before of prevTag
const
beforePrevTagOffsetLeft
=
prevTag
.
$el
.
offsetLeft
-
tagAndTagSpacing
const
beforePrevTagOffsetLeft
=
prevTag
.
$el
.
offsetLeft
-
tagAndTagSpacing
if
(
afterNextTagOffsetLeft
>
$scrollWrapper
.
scrollLeft
+
$containerWidth
)
{
if
(
afterNextTagOffsetLeft
>
$scrollWrapper
.
scrollLeft
+
$containerWidth
)
{
$scrollWrapper
.
scrollLeft
=
afterNextTagOffsetLeft
-
$containerWidth
$scrollWrapper
.
scrollLeft
=
afterNextTagOffsetLeft
-
$containerWidth
}
else
if
(
beforePrevTagOffsetLeft
<
$scrollWrapper
.
scrollLeft
)
{
}
else
if
(
beforePrevTagOffsetLeft
<
$scrollWrapper
.
scrollLeft
)
{
...
@@ -73,7 +75,7 @@ export default {
...
@@ -73,7 +75,7 @@ export default {
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
width
:
100%
;
width
:
100%
;
/
deep
/
{
::v-
deep
{
.el-scrollbar__bar
{
.el-scrollbar__bar
{
bottom
:
0px
;
bottom
:
0px
;
}
}
...
...
litemall-admin/src/views/layout/components/TagsView.vue
→
litemall-admin/src/views/layout/components/TagsView
/index
.vue
View file @
2f3ef296
<
template
>
<
template
>
<div
id=
"tags-view-container"
class=
"tags-view-container"
>
<div
id=
"tags-view-container"
class=
"tags-view-container"
>
<scroll-pane
ref=
"scrollPane"
class=
"tags-view-wrapper"
>
<scroll-pane
ref=
"scrollPane"
class=
"tags-view-wrapper"
@
scroll=
"handleScroll"
>
<router-link
<router-link
v-for=
"tag in visitedViews"
v-for=
"tag in visitedViews"
ref=
"tag"
ref=
"tag"
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
</router-link>
</router-link>
</scroll-pane>
</scroll-pane>
<ul
v-show=
"visible"
:style=
"
{left:left+'px',top:top+'px'}" class="contextmenu">
<ul
v-show=
"visible"
:style=
"
{left:left+'px',top:top+'px'}" class="contextmenu">
<li
@
click=
"refreshSelectedTag(selectedTag)"
>
刷新
</li>
<li
@
click=
"refreshSelectedTag(selectedTag)"
>
Refresh
</li>
<li
v-if=
"!isAffix(selectedTag)"
@
click=
"closeSelectedTag(selectedTag)"
>
关闭
</li>
<li
v-if=
"!isAffix(selectedTag)"
@
click=
"closeSelectedTag(selectedTag)"
>
Close
</li>
<li
@
click=
"closeOthersTags"
>
关闭其他
</li>
<li
@
click=
"closeOthersTags"
>
Close Others
</li>
<li
@
click=
"closeAllTags(selectedTag)"
>
关闭所有
</li>
<li
@
click=
"closeAllTags(selectedTag)"
>
Close All
</li>
</ul>
</ul>
</div>
</div>
</
template
>
</
template
>
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
<
script
>
<
script
>
import
ScrollPane
from
'
./ScrollPane
'
import
ScrollPane
from
'
./ScrollPane
'
import
path
from
'
path
'
import
path
from
'
path
'
export
default
{
export
default
{
components
:
{
ScrollPane
},
components
:
{
ScrollPane
},
data
()
{
data
()
{
...
@@ -45,7 +44,7 @@ export default {
...
@@ -45,7 +44,7 @@ export default {
return
this
.
$store
.
state
.
tagsView
.
visitedViews
return
this
.
$store
.
state
.
tagsView
.
visitedViews
},
},
routes
()
{
routes
()
{
return
this
.
$store
.
state
.
permission
.
route
r
s
return
this
.
$store
.
state
.
permission
.
routes
}
}
},
},
watch
:
{
watch
:
{
...
@@ -176,19 +175,20 @@ export default {
...
@@ -176,19 +175,20 @@ export default {
const
offsetWidth
=
this
.
$el
.
offsetWidth
// container width
const
offsetWidth
=
this
.
$el
.
offsetWidth
// container width
const
maxLeft
=
offsetWidth
-
menuMinWidth
// left boundary
const
maxLeft
=
offsetWidth
-
menuMinWidth
// left boundary
const
left
=
e
.
clientX
-
offsetLeft
+
15
// 15: margin right
const
left
=
e
.
clientX
-
offsetLeft
+
15
// 15: margin right
if
(
left
>
maxLeft
)
{
if
(
left
>
maxLeft
)
{
this
.
left
=
maxLeft
this
.
left
=
maxLeft
}
else
{
}
else
{
this
.
left
=
left
this
.
left
=
left
}
}
this
.
top
=
e
.
clientY
this
.
top
=
e
.
clientY
this
.
visible
=
true
this
.
visible
=
true
this
.
selectedTag
=
tag
this
.
selectedTag
=
tag
},
},
closeMenu
()
{
closeMenu
()
{
this
.
visible
=
false
this
.
visible
=
false
},
handleScroll
()
{
this
.
closeMenu
()
}
}
}
}
}
}
...
...
litemall-admin/src/views/layout/components/index.js
View file @
2f3ef296
export
{
default
as
AppMain
}
from
'
./AppMain
'
export
{
default
as
Navbar
}
from
'
./Navbar
'
export
{
default
as
Navbar
}
from
'
./Navbar
'
export
{
default
as
Sidebar
}
from
'
./Sidebar/index.vue
'
export
{
default
as
Sidebar
}
from
'
./Sidebar/index.vue
'
export
{
default
as
TagsView
}
from
'
./TagsView
'
export
{
default
as
TagsView
}
from
'
./TagsView/index.vue
'
export
{
default
as
AppMain
}
from
'
./AppMain
'
litemall-admin/src/views/mall/aftersale.vue
View file @
2f3ef296
...
@@ -50,7 +50,65 @@
...
@@ -50,7 +50,65 @@
<el-tooltip
placement=
"top"
content=
"返回顶部"
>
<el-tooltip
placement=
"top"
content=
"返回顶部"
>
<back-to-top
:visibility-height=
"100"
/>
<back-to-top
:visibility-height=
"100"
/>
</el-tooltip>
</el-tooltip>
<!-- 详情对话框 -->
<el-dialog
:visible.sync=
"aftersaleDialogVisible"
title=
"售后详情"
width=
"800"
>
<section
ref=
"print"
>
<el-form
:data=
"aftersaleDetail"
label-position=
"left"
>
<el-form-item
label=
"售后id"
>
<el-tag>
{{ aftersaleDetail.id }}
</el-tag>
</el-form-item>
<el-form-item
label=
"售后编号"
>
<el-tag>
{{ aftersaleDetail.aftersaleSn }}
</el-tag>
</el-form-item>
<el-form-item
label=
"订单号"
>
<el-tag>
{{ aftersaleDetail.orderId }}
</el-tag>
</el-form-item>
<el-form-item
label=
"订单金额"
>
<el-tag>
{{ aftersaleDetail.amount }}
</el-tag>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-tag
v-if=
"aftersaleDetail.status === 1"
>
已申请,待审核
</el-tag>
<el-tag
v-if=
"aftersaleDetail.status === 2"
>
审核通过,待退款
</el-tag>
<el-tag
v-if=
"aftersaleDetail.status === 3"
>
退款成功
</el-tag>
<el-tag
v-if=
"aftersaleDetail.status === 4"
>
审核不通过,已拒绝
</el-tag>
</el-form-item>
<el-form-item
label=
"订单用户id"
>
<el-tag>
{{ aftersaleDetail.userId }}
</el-tag>
</el-form-item>
<el-form-item
label=
"售后类型"
>
<el-tag
v-if=
"aftersaleDetail.type === 0"
>
未收货退款
</el-tag>
<el-tag
v-if=
"aftersaleDetail.type === 1"
>
不退货退款
</el-tag>
<el-tag
v-if=
"aftersaleDetail.type === 2"
>
退货退款
</el-tag>
</el-form-item>
<el-form-item
label=
"退款原因"
>
<span>
{{ aftersaleDetail.reason }}
</span>
</el-form-item>
<el-form-item
label=
"申请时间"
>
<span>
{{ aftersaleDetail.addTime }}
</span>
</el-form-item>
<el-form-item
label=
"更新时间"
>
<span>
{{ aftersaleDetail.updateTime }}
</span>
</el-form-item>
<el-form-item
label=
"处理时间"
>
<span>
{{ aftersaleDetail.handleTime }}
</span>
</el-form-item>
<el-form-item
label=
"售后图片"
>
<el-table
:data=
"aftersaleDetail.pictures"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
label=
"售后图片"
>
<
template
slot-scope=
"scope"
>
<a
:href=
"scope.row"
target=
"_blank"
>
<img
:src=
"scope.row"
width=
"40"
>
</a>
</
template
>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
</section>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"aftersaleDialogVisible = false"
>
取 消
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -91,7 +149,9 @@ export default {
...
@@ -91,7 +149,9 @@ export default {
multipleSelection
:
[],
multipleSelection
:
[],
contentDetail
:
''
,
contentDetail
:
''
,
contentDialogVisible
:
false
,
contentDialogVisible
:
false
,
downloadLoading
:
false
downloadLoading
:
false
,
aftersaleDialogVisible
:
false
,
aftersaleDetail
:{}
}
}
},
},
created
()
{
created
()
{
...
@@ -249,7 +309,12 @@ export default {
...
@@ -249,7 +309,12 @@ export default {
excel
.
export_json_to_excel2
(
tHeader
,
this
.
list
,
filterVal
,
'
售后信息
'
)
excel
.
export_json_to_excel2
(
tHeader
,
this
.
list
,
filterVal
,
'
售后信息
'
)
this
.
downloadLoading
=
false
this
.
downloadLoading
=
false
})
})
}
},
handleRead
(
row
)
{
this
.
aftersaleDetail
=
row
;
console
.
log
(
this
.
aftersaleDetail
);
this
.
aftersaleDialogVisible
=
true
},
}
}
}
}
</
script
>
</
script
>
litemall-admin/src/views/mall/brand.vue
View file @
2f3ef296
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<!-- 查询和其他操作 -->
<!-- 查询和其他操作 -->
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.id"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入品牌商ID"
/>
<el-input
v-model=
"listQuery.id"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入品牌商ID"
/>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入品牌商名称"
/>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入品牌商名称"
/>
<el-button
v-permission=
"['GET /admin/brand/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['GET /admin/brand/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['POST /admin/brand/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
v-permission=
"['POST /admin/brand/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
<!-- 查询结果 -->
<!-- 查询结果 -->
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
label=
"品牌商ID"
prop=
"id"
/>
<el-table-column
align=
"center"
label=
"品牌商ID"
prop=
"id"
/>
<el-table-column
align=
"center"
label=
"品牌商名称"
prop=
"name"
/>
<el-table-column
align=
"center"
label=
"品牌商名称"
prop=
"name"
/>
<el-table-column
align=
"center"
property=
"picUrl"
label=
"品牌商图片"
>
<el-table-column
align=
"center"
property=
"picUrl"
label=
"品牌商图片"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -23,9 +23,9 @@
...
@@ -23,9 +23,9 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
min-width=
"400px"
label=
"介绍"
prop=
"desc"
/>
<el-table-column
align=
"center"
min-width=
"400px"
label=
"介绍"
prop=
"desc"
/>
<el-table-column
align=
"center"
label=
"底价"
prop=
"floorPrice"
/>
<el-table-column
align=
"center"
label=
"底价"
prop=
"floorPrice"
/>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
class-name=
"small-padding fixed-width"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -41,10 +41,10 @@
...
@@ -41,10 +41,10 @@
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"品牌商名称"
prop=
"name"
>
<el-form-item
label=
"品牌商名称"
prop=
"name"
>
<el-input
v-model=
"dataForm.name"
/>
<el-input
v-model=
"dataForm.name"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"介绍"
prop=
"simpleDesc"
>
<el-form-item
label=
"介绍"
prop=
"simpleDesc"
>
<el-input
v-model=
"dataForm.desc"
/>
<el-input
v-model=
"dataForm.desc"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"品牌商图片"
prop=
"picUrl"
>
<el-form-item
label=
"品牌商图片"
prop=
"picUrl"
>
<el-upload
<el-upload
...
@@ -53,13 +53,14 @@
...
@@ -53,13 +53,14 @@
:show-file-list=
"false"
:show-file-list=
"false"
:on-success=
"uploadPicUrl"
:on-success=
"uploadPicUrl"
class=
"avatar-uploader"
class=
"avatar-uploader"
accept=
".jpg,.jpeg,.png,.gif"
>
accept=
".jpg,.jpeg,.png,.gif"
>
<img
v-if=
"dataForm.picUrl"
:src=
"dataForm.picUrl"
class=
"avatar"
>
<img
v-if=
"dataForm.picUrl"
:src=
"dataForm.picUrl"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
</el-upload>
</el-upload>
</el-form-item>
</el-form-item>
<el-form-item
label=
"底价"
prop=
"floorPrice"
>
<el-form-item
label=
"底价"
prop=
"floorPrice"
>
<el-input
v-model=
"dataForm.floorPrice"
/>
<el-input
v-model=
"dataForm.floorPrice"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -254,8 +255,7 @@ export default {
...
@@ -254,8 +255,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
删除成功
'
message
:
'
删除成功
'
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
})
})
.
catch
(
response
=>
{
.
catch
(
response
=>
{
this
.
$notify
.
error
({
this
.
$notify
.
error
({
...
...
litemall-admin/src/views/mall/issue.vue
View file @
2f3ef296
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<!-- 查询和其他操作 -->
<!-- 查询和其他操作 -->
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.question"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入问题"
/>
<el-input
v-model=
"listQuery.question"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入问题"
/>
<el-button
v-permission=
"['GET /admin/issue/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['GET /admin/issue/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['POST /admin/issue/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
v-permission=
"['POST /admin/issue/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
...
@@ -11,11 +11,11 @@
...
@@ -11,11 +11,11 @@
<!-- 查询结果 -->
<!-- 查询结果 -->
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
width=
"100px"
label=
"问题ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
width=
"100px"
label=
"问题ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
min-width=
"200px"
label=
"问题内容"
prop=
"question"
/>
<el-table-column
align=
"center"
min-width=
"200px"
label=
"问题内容"
prop=
"question"
/>
<el-table-column
align=
"center"
min-width=
"400px"
label=
"问题回复"
prop=
"answer"
/>
<el-table-column
align=
"center"
min-width=
"400px"
label=
"问题回复"
prop=
"answer"
/>
<el-table-column
align=
"center"
label=
"操作"
width=
"250"
class-name=
"small-padding fixed-width"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"250"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -31,10 +31,10 @@
...
@@ -31,10 +31,10 @@
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"问题"
prop=
"question"
>
<el-form-item
label=
"问题"
prop=
"question"
>
<el-input
v-model=
"dataForm.question"
/>
<el-input
v-model=
"dataForm.question"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"回复"
prop=
"answer"
>
<el-form-item
label=
"回复"
prop=
"answer"
>
<el-input
v-model=
"dataForm.answer"
:rows=
"8"
type=
"textarea"
placeholder=
"请输入内容"
/>
<el-input
v-model=
"dataForm.answer"
:rows=
"8"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -177,8 +177,7 @@ export default {
...
@@ -177,8 +177,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
删除成功
'
message
:
'
删除成功
'
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
this
.
$notify
.
error
({
this
.
$notify
.
error
({
title
:
'
失败
'
,
title
:
'
失败
'
,
...
...
litemall-admin/src/views/mall/keyword.vue
View file @
2f3ef296
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<!-- 查询和其他操作 -->
<!-- 查询和其他操作 -->
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.keyword"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入关键字"
/>
<el-input
v-model=
"listQuery.keyword"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入关键字"
/>
<el-input
v-model=
"listQuery.url"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入跳转链接"
/>
<el-input
v-model=
"listQuery.url"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入跳转链接"
/>
<el-button
v-permission=
"['GET /admin/keyword/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['GET /admin/keyword/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['POST /admin/keyword/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
v-permission=
"['POST /admin/keyword/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
<!-- 查询结果 -->
<!-- 查询结果 -->
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
width=
"150px"
label=
"关键词ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
width=
"150px"
label=
"关键词ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
min-width=
"100px"
label=
"关键词"
prop=
"keyword"
/>
<el-table-column
align=
"center"
min-width=
"100px"
label=
"关键词"
prop=
"keyword"
/>
<el-table-column
align=
"center"
min-width=
"300px"
label=
"跳转链接"
prop=
"url"
/>
<el-table-column
align=
"center"
min-width=
"300px"
label=
"跳转链接"
prop=
"url"
/>
<el-table-column
align=
"center"
min-width=
"100px"
label=
"是否推荐"
prop=
"isHot"
>
<el-table-column
align=
"center"
min-width=
"100px"
label=
"是否推荐"
prop=
"isHot"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -45,21 +45,21 @@
...
@@ -45,21 +45,21 @@
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"关键词"
prop=
"keyword"
>
<el-form-item
label=
"关键词"
prop=
"keyword"
>
<el-input
v-model=
"dataForm.keyword"
/>
<el-input
v-model=
"dataForm.keyword"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"跳转链接"
prop=
"url"
>
<el-form-item
label=
"跳转链接"
prop=
"url"
>
<el-input
v-model=
"dataForm.url"
/>
<el-input
v-model=
"dataForm.url"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否推荐"
prop=
"isHot"
>
<el-form-item
label=
"是否推荐"
prop=
"isHot"
>
<el-select
v-model=
"dataForm.isHot"
placeholder=
"请选择"
>
<el-select
v-model=
"dataForm.isHot"
placeholder=
"请选择"
>
<el-option
:value=
"true"
label=
"推荐"
/>
<el-option
:value=
"true"
label=
"推荐"
/>
<el-option
:value=
"false"
label=
"普通"
/>
<el-option
:value=
"false"
label=
"普通"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否默认"
prop=
"isDefault"
>
<el-form-item
label=
"是否默认"
prop=
"isDefault"
>
<el-select
v-model=
"dataForm.isDefault"
placeholder=
"请选择"
>
<el-select
v-model=
"dataForm.isDefault"
placeholder=
"请选择"
>
<el-option
:value=
"true"
label=
"默认"
/>
<el-option
:value=
"true"
label=
"默认"
/>
<el-option
:value=
"false"
label=
"非默认"
/>
<el-option
:value=
"false"
label=
"非默认"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -207,8 +207,7 @@ export default {
...
@@ -207,8 +207,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
删除成功
'
message
:
'
删除成功
'
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
this
.
$notify
.
error
({
this
.
$notify
.
error
({
title
:
'
失败
'
,
title
:
'
失败
'
,
...
...
litemall-admin/src/views/mall/order.vue
View file @
2f3ef296
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<!-- 查询和其他操作 -->
<!-- 查询和其他操作 -->
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.userId"
clearable
class=
"filter-item"
style=
"width: 160px;"
placeholder=
"请输入用户ID"
/>
<el-input
v-model=
"listQuery.userId"
clearable
class=
"filter-item"
style=
"width: 160px;"
placeholder=
"请输入用户ID"
/>
<el-input
v-model=
"listQuery.orderId"
clearable
class=
"filter-item"
style=
"width: 160px;"
placeholder=
"请输入订单ID"
/>
<el-input
v-model=
"listQuery.orderSn"
clearable
class=
"filter-item"
style=
"width: 160px;"
placeholder=
"请输入订单编号"
/>
<el-input
v-model=
"listQuery.orderSn"
clearable
class=
"filter-item"
style=
"width: 160px;"
placeholder=
"请输入订单编号"
/>
<el-date-picker
v-model=
"listQuery.timeArray"
type=
"datetimerange"
value-format=
"yyyy-MM-dd HH:mm:ss"
class=
"filter-item"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"pickerOptions"
/>
<el-date-picker
v-model=
"listQuery.timeArray"
type=
"datetimerange"
value-format=
"yyyy-MM-dd HH:mm:ss"
class=
"filter-item"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"pickerOptions"
/>
<el-select
v-model=
"listQuery.orderStatusArray"
multiple
style=
"width: 200px"
class=
"filter-item"
placeholder=
"请选择订单状态"
>
<el-select
v-model=
"listQuery.orderStatusArray"
multiple
style=
"width: 200px"
class=
"filter-item"
placeholder=
"请选择订单状态"
>
...
@@ -190,7 +191,8 @@ export default {
...
@@ -190,7 +191,8 @@ export default {
timeArray
:
[],
timeArray
:
[],
orderStatusArray
:
[],
orderStatusArray
:
[],
sort
:
'
add_time
'
,
sort
:
'
add_time
'
,
order
:
'
desc
'
order
:
'
desc
'
,
orderId
:
undefined
},
},
pickerOptions
:
{
pickerOptions
:
{
shortcuts
:
[{
shortcuts
:
[{
...
@@ -256,7 +258,20 @@ export default {
...
@@ -256,7 +258,20 @@ export default {
this
.
listQuery
.
start
=
null
this
.
listQuery
.
start
=
null
this
.
listQuery
.
end
=
null
this
.
listQuery
.
end
=
null
}
}
if
(
this
.
listQuery
.
orderId
){
detailOrder
(
this
.
listQuery
.
orderId
).
then
(
response
=>
{
this
.
list
=
[];
if
(
response
.
data
.
data
.
order
){
this
.
list
.
push
(
response
.
data
.
data
.
order
);
this
.
total
=
1
;
this
.
listLoading
=
false
}
}).
catch
(()
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
})
}
else
{
listOrder
(
this
.
listQuery
).
then
(
response
=>
{
listOrder
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
list
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
total
=
response
.
data
.
data
.
total
...
@@ -266,6 +281,7 @@ export default {
...
@@ -266,6 +281,7 @@ export default {
this
.
total
=
0
this
.
total
=
0
this
.
listLoading
=
false
this
.
listLoading
=
false
})
})
}
},
},
getChannel
()
{
getChannel
()
{
listChannel
().
then
(
response
=>
{
listChannel
().
then
(
response
=>
{
...
...
litemall-admin/src/views/profile/notice.vue
View file @
2f3ef296
...
@@ -112,8 +112,7 @@ export default {
...
@@ -112,8 +112,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
删除通知成功
'
message
:
'
删除通知成功
'
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
})
})
.
catch
(
response
=>
{
.
catch
(
response
=>
{
this
.
$notify
.
error
({
this
.
$notify
.
error
({
...
...
litemall-admin/src/views/promotion/ad.vue
View file @
2f3ef296
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<!-- 查询和其他操作 -->
<!-- 查询和其他操作 -->
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入广告标题"
/>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入广告标题"
/>
<el-input
v-model=
"listQuery.content"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入广告内容"
/>
<el-input
v-model=
"listQuery.content"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入广告内容"
/>
<el-button
v-permission=
"['GET /admin/ad/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['GET /admin/ad/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['POST /admin/ad/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
v-permission=
"['POST /admin/ad/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
<!-- 查询结果 -->
<!-- 查询结果 -->
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
label=
"广告ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
label=
"广告ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
label=
"广告标题"
prop=
"name"
/>
<el-table-column
align=
"center"
label=
"广告标题"
prop=
"name"
/>
<el-table-column
align=
"center"
label=
"广告内容"
prop=
"content"
/>
<el-table-column
align=
"center"
label=
"广告内容"
prop=
"content"
/>
<el-table-column
align=
"center"
label=
"广告图片"
prop=
"url"
>
<el-table-column
align=
"center"
label=
"广告图片"
prop=
"url"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"广告位置"
prop=
"position"
/>
<el-table-column
align=
"center"
label=
"广告位置"
prop=
"position"
/>
<el-table-column
align=
"center"
label=
"活动链接"
prop=
"link"
/>
<el-table-column
align=
"center"
label=
"活动链接"
prop=
"link"
/>
<el-table-column
align=
"center"
label=
"是否启用"
prop=
"enabled"
>
<el-table-column
align=
"center"
label=
"是否启用"
prop=
"enabled"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -49,10 +49,10 @@
...
@@ -49,10 +49,10 @@
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"广告标题"
prop=
"name"
>
<el-form-item
label=
"广告标题"
prop=
"name"
>
<el-input
v-model=
"dataForm.name"
/>
<el-input
v-model=
"dataForm.name"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"广告内容"
prop=
"content"
>
<el-form-item
label=
"广告内容"
prop=
"content"
>
<el-input
v-model=
"dataForm.content"
/>
<el-input
v-model=
"dataForm.content"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"广告图片"
prop=
"url"
>
<el-form-item
label=
"广告图片"
prop=
"url"
>
<el-upload
<el-upload
...
@@ -62,24 +62,25 @@
...
@@ -62,24 +62,25 @@
:on-success=
"uploadUrl"
:on-success=
"uploadUrl"
:before-upload=
"checkFileSize"
:before-upload=
"checkFileSize"
class=
"avatar-uploader"
class=
"avatar-uploader"
accept=
".jpg,.jpeg,.png,.gif"
>
accept=
".jpg,.jpeg,.png,.gif"
>
<img
v-if=
"dataForm.url"
:src=
"dataForm.url"
class=
"avatar"
>
<img
v-if=
"dataForm.url"
:src=
"dataForm.url"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传jpg/png文件,且不超过1024kb
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传jpg/png文件,且不超过1024kb
</div>
</el-upload>
</el-upload>
</el-form-item>
</el-form-item>
<el-form-item
label=
"广告位置"
prop=
"position"
>
<el-form-item
label=
"广告位置"
prop=
"position"
>
<el-select
v-model=
"dataForm.position"
placeholder=
"请选择"
>
<el-select
v-model=
"dataForm.position"
placeholder=
"请选择"
>
<el-option
:value=
"1"
label=
"首页"
/>
<el-option
:value=
"1"
label=
"首页"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"活动链接"
prop=
"link"
>
<el-form-item
label=
"活动链接"
prop=
"link"
>
<el-input
v-model=
"dataForm.link"
/>
<el-input
v-model=
"dataForm.link"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"enabled"
>
<el-form-item
label=
"是否启用"
prop=
"enabled"
>
<el-select
v-model=
"dataForm.enabled"
placeholder=
"请选择"
>
<el-select
v-model=
"dataForm.enabled"
placeholder=
"请选择"
>
<el-option
:value=
"true"
label=
"启用"
/>
<el-option
:value=
"true"
label=
"启用"
/>
<el-option
:value=
"false"
label=
"不启用"
/>
<el-option
:value=
"false"
label=
"不启用"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -290,8 +291,7 @@ export default {
...
@@ -290,8 +291,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
删除成功
'
message
:
'
删除成功
'
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
})
})
.
catch
(
response
=>
{
.
catch
(
response
=>
{
this
.
$notify
.
error
({
this
.
$notify
.
error
({
...
...
litemall-admin/src/views/promotion/coupon.vue
View file @
2f3ef296
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
<!-- 查询和其他操作 -->
<!-- 查询和其他操作 -->
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入优惠券标题"
/>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入优惠券标题"
/>
<el-select
v-model=
"listQuery.type"
clearable
style=
"width: 200px"
class=
"filter-item"
placeholder=
"请选择优惠券类型"
>
<el-select
v-model=
"listQuery.type"
clearable
style=
"width: 200px"
class=
"filter-item"
placeholder=
"请选择优惠券类型"
>
<el-option
v-for=
"type in typeOptions"
:key=
"type.value"
:label=
"type.label"
:value=
"type.value"
/>
<el-option
v-for=
"type in typeOptions"
:key=
"type.value"
:label=
"type.label"
:value=
"type.value"
/>
</el-select>
</el-select>
<el-select
v-model=
"listQuery.status"
clearable
style=
"width: 200px"
class=
"filter-item"
placeholder=
"请选择优惠券状态"
>
<el-select
v-model=
"listQuery.status"
clearable
style=
"width: 200px"
class=
"filter-item"
placeholder=
"请选择优惠券状态"
>
<el-option
v-for=
"type in statusOptions"
:key=
"type.value"
:label=
"type.label"
:value=
"type.value"
/>
<el-option
v-for=
"type in statusOptions"
:key=
"type.value"
:label=
"type.label"
:value=
"type.value"
/>
</el-select>
</el-select>
<el-button
v-permission=
"['GET /admin/coupon/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['GET /admin/coupon/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
v-permission=
"['POST /admin/coupon/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
v-permission=
"['POST /admin/coupon/create']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
...
@@ -18,13 +18,13 @@
...
@@ -18,13 +18,13 @@
<!-- 查询结果 -->
<!-- 查询结果 -->
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
label=
"优惠券ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
label=
"优惠券ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
label=
"优惠券名称"
prop=
"name"
/>
<el-table-column
align=
"center"
label=
"优惠券名称"
prop=
"name"
/>
<el-table-column
align=
"center"
label=
"介绍"
prop=
"desc"
/>
<el-table-column
align=
"center"
label=
"介绍"
prop=
"desc"
/>
<el-table-column
align=
"center"
label=
"标签"
prop=
"tag"
/>
<el-table-column
align=
"center"
label=
"标签"
prop=
"tag"
/>
<el-table-column
align=
"center"
label=
"最低消费"
prop=
"min"
>
<el-table-column
align=
"center"
label=
"最低消费"
prop=
"min"
>
<template
slot-scope=
"scope"
>
满
{{
scope
.
row
.
min
}}
元可用
</
template
>
<template
slot-scope=
"scope"
>
满
{{
scope
.
row
.
min
}}
元可用
</
template
>
...
@@ -69,13 +69,13 @@
...
@@ -69,13 +69,13 @@
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-dialog
:title=
"textMap[dialogStatus]"
:visible.sync=
"dialogFormVisible"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"dataForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"优惠券名称"
prop=
"name"
>
<el-form-item
label=
"优惠券名称"
prop=
"name"
>
<el-input
v-model=
"dataForm.name"
/>
<el-input
v-model=
"dataForm.name"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"介绍"
prop=
"desc"
>
<el-form-item
label=
"介绍"
prop=
"desc"
>
<el-input
v-model=
"dataForm.desc"
/>
<el-input
v-model=
"dataForm.desc"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"标签"
prop=
"tag"
>
<el-form-item
label=
"标签"
prop=
"tag"
>
<el-input
v-model=
"dataForm.tag"
/>
<el-input
v-model=
"dataForm.tag"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"最低消费"
prop=
"min"
>
<el-form-item
label=
"最低消费"
prop=
"min"
>
<el-input
v-model=
"dataForm.min"
>
<el-input
v-model=
"dataForm.min"
>
...
@@ -98,7 +98,8 @@
...
@@ -98,7 +98,8 @@
v-for=
"type in typeOptions"
v-for=
"type in typeOptions"
:key=
"type.value"
:key=
"type.value"
:label=
"type.label"
:label=
"type.label"
:value=
"type.value"
/>
:value=
"type.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"优惠券数量"
prop=
"total"
>
<el-form-item
label=
"优惠券数量"
prop=
"total"
>
...
@@ -119,11 +120,11 @@
...
@@ -119,11 +120,11 @@
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"dataForm.timeType === 1"
>
<el-form-item
v-show=
"dataForm.timeType === 1"
>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-date-picker
v-model=
"dataForm.startTime"
type=
"datetime"
placeholder=
"选择日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
style=
"width: 100%;"
/>
<el-date-picker
v-model=
"dataForm.startTime"
type=
"datetime"
placeholder=
"选择日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
style=
"width: 100%;"
/>
</el-col>
</el-col>
<el-col
:span=
"2"
class=
"line"
>
至
</el-col>
<el-col
:span=
"2"
class=
"line"
>
至
</el-col>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-date-picker
v-model=
"dataForm.endTime"
type=
"datetime"
placeholder=
"选择日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
style=
"width: 100%;"
/>
<el-date-picker
v-model=
"dataForm.endTime"
type=
"datetime"
placeholder=
"选择日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
style=
"width: 100%;"
/>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品限制范围"
>
<el-form-item
label=
"商品限制范围"
>
...
@@ -134,10 +135,76 @@
...
@@ -134,10 +135,76 @@
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"dataForm.goodsType === 1"
>
<el-form-item
v-show=
"dataForm.goodsType === 1"
>
目前不支持
<el-cascader
v-model=
"selectGoodsCategory"
clearable
placeholder=
"请选择分类名称"
:options=
"goodsCategoryOptions"
/>
<el-button
@
click=
"handleAddGoodsCategory()"
>
添加
</el-button>
<el-table
ref=
"goodsCateRelationTable"
:data=
"couponCategoryList"
style=
"width: 100%;margin-top: 20px"
border
>
<el-table-column
label=
"分类名称"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
parentCategoryName
}}
>
{{
scope
.
row
.
goodsCategoryName
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleDeleteGoodsCategory(scope.$index, scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"dataForm.goodsType === 2"
>
<el-form-item
v-show=
"dataForm.goodsType === 2"
>
目前不支持
<el-select
v-model=
"selectGoods"
filterable
remote
reserve-keyword
placeholder=
"商品名称/商品货号"
>
<el-option
v-for=
"item in goodsOptions"
:key=
"item.goodsId"
:label=
"item.goodsName"
:value=
"item.goodsId"
>
<span
style=
"float: left"
>
{{ item.goodsName }}
</span>
<span
style=
"float: right; color: #8492a6; font-size: 13px"
>
NO.{{ item.goodsSn }}
</span>
</el-option>
</el-select>
<el-button
@
click=
"handleAddGoods()"
>
添加
</el-button>
<el-table
ref=
"goodsRelationTable"
:data=
"couponGoodsList"
style=
"width: 100%;margin-top: 20px"
border
>
<el-table-column
label=
"商品名称"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
goodsName
}}
</
template
>
</el-table-column>
<el-table-column
label=
"商品编号"
align=
"center"
width=
"80"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
goodsSn
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"60"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleDeleteGoods(scope.$index, scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -178,6 +245,8 @@
...
@@ -178,6 +245,8 @@
<
script
>
<
script
>
import
{
listCoupon
,
createCoupon
,
updateCoupon
,
deleteCoupon
}
from
'
@/api/coupon
'
import
{
listCoupon
,
createCoupon
,
updateCoupon
,
deleteCoupon
}
from
'
@/api/coupon
'
import
{
listCategory
}
from
'
@/api/category.js
'
import
{
listGoods
}
from
'
@/api/goods.js
'
import
Pagination
from
'
@/components/Pagination
'
// Secondary package based on el-pagination
import
Pagination
from
'
@/components/Pagination
'
// Secondary package based on el-pagination
const
defaultTypeOptions
=
[
const
defaultTypeOptions
=
[
...
@@ -286,11 +355,19 @@ export default {
...
@@ -286,11 +355,19 @@ export default {
{
required
:
true
,
message
:
'
优惠券标题不能为空
'
,
trigger
:
'
blur
'
}
{
required
:
true
,
message
:
'
优惠券标题不能为空
'
,
trigger
:
'
blur
'
}
]
]
},
},
downloadLoading
:
false
downloadLoading
:
false
,
selectGoods
:
null
,
goodsOptions
:
[],
selectGoodsCategory
:
null
,
goodsCategoryOptions
:
[],
couponGoodsList
:
[],
couponCategoryList
:
[]
}
}
},
},
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
this
.
getCategoryList
()
this
.
getGoodsList
()
},
},
methods
:
{
methods
:
{
getList
()
{
getList
()
{
...
@@ -330,6 +407,8 @@ export default {
...
@@ -330,6 +407,8 @@ export default {
startTime
:
null
,
startTime
:
null
,
endTime
:
null
endTime
:
null
}
}
this
.
couponCategoryList
=
[]
this
.
couponGoodsList
=
[]
},
},
handleCreate
()
{
handleCreate
()
{
this
.
resetForm
()
this
.
resetForm
()
...
@@ -342,6 +421,12 @@ export default {
...
@@ -342,6 +421,12 @@ export default {
createData
()
{
createData
()
{
this
.
$refs
[
'
dataForm
'
].
validate
(
valid
=>
{
this
.
$refs
[
'
dataForm
'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
dataForm
.
goodsType
===
1
)
{
this
.
dataForm
.
goodsValue
=
this
.
couponCategoryList
.
map
(
item
=>
(
item
.
goodsCategoryId
))
}
if
(
this
.
dataForm
.
goodsType
===
2
)
{
this
.
dataForm
.
goodsValue
=
this
.
couponGoodsList
.
map
(
item
=>
(
item
.
goodsId
))
}
createCoupon
(
this
.
dataForm
)
createCoupon
(
this
.
dataForm
)
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
list
.
unshift
(
response
.
data
.
data
)
this
.
list
.
unshift
(
response
.
data
.
data
)
...
@@ -408,8 +493,7 @@ export default {
...
@@ -408,8 +493,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
删除优惠券成功
'
message
:
'
删除优惠券成功
'
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
})
})
.
catch
(
response
=>
{
.
catch
(
response
=>
{
this
.
$notify
.
error
({
this
.
$notify
.
error
({
...
@@ -447,6 +531,84 @@ export default {
...
@@ -447,6 +531,84 @@ export default {
excel
.
export_json_to_excel2
(
tHeader
,
this
.
list
,
filterVal
,
'
优惠券信息
'
)
excel
.
export_json_to_excel2
(
tHeader
,
this
.
list
,
filterVal
,
'
优惠券信息
'
)
this
.
downloadLoading
=
false
this
.
downloadLoading
=
false
})
})
},
getGoodsList
()
{
listGoods
({
limit
:
0
}).
then
(
response
=>
{
const
goodsList
=
response
.
data
.
data
.
list
this
.
goodsOptions
=
[]
for
(
let
i
=
0
;
i
<
goodsList
.
length
;
i
++
)
{
const
item
=
goodsList
[
i
]
this
.
goodsOptions
.
push
({
goodsId
:
item
.
id
,
goodsName
:
item
.
name
,
goodsSn
:
item
.
goodsSn
})
}
}).
catch
(()
=>
{
this
.
goodsOptions
=
[]
})
},
handleAddGoods
()
{
if
(
this
.
selectGoods
===
null
)
{
this
.
$message
({
message
:
'
请先选择商品
'
,
type
:
'
warning
'
})
return
}
this
.
couponGoodsList
.
push
(
this
.
getGoodsById
(
this
.
selectGoods
))
this
.
selectGoods
=
null
},
handleDeleteGoods
(
index
,
row
)
{
this
.
couponGoodsList
.
splice
(
index
,
1
)
},
handleAddGoodsCategory
()
{
if
(
this
.
selectGoodsCategory
===
null
||
this
.
selectGoodsCategory
.
length
===
0
)
{
this
.
$message
({
message
:
'
请先选择商品分类
'
,
type
:
'
warning
'
})
return
}
this
.
couponCategoryList
.
push
(
this
.
getGoodsCategoryByIds
(
this
.
selectGoodsCategory
))
this
.
selectGoodsCategory
=
[]
},
handleDeleteGoodsCategory
(
index
,
row
)
{
this
.
couponCategoryList
.
splice
(
index
,
1
)
},
getGoodsById
(
id
)
{
for
(
let
i
=
0
;
i
<
this
.
goodsOptions
.
length
;
i
++
)
{
if
(
id
===
this
.
goodsOptions
[
i
].
goodsId
)
{
return
this
.
goodsOptions
[
i
]
}
}
return
null
},
getCategoryList
()
{
listCategory
().
then
(
response
=>
{
const
list
=
response
.
data
.
data
.
list
this
.
goodsCategoryOptions
=
[]
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
const
children
=
[]
if
(
list
[
i
].
children
!=
null
&&
list
[
i
].
children
.
length
>
0
)
{
for
(
let
j
=
0
;
j
<
list
[
i
].
children
.
length
;
j
++
)
{
children
.
push
({
label
:
list
[
i
].
children
[
j
].
name
,
value
:
list
[
i
].
children
[
j
].
id
})
}
}
this
.
goodsCategoryOptions
.
push
({
label
:
list
[
i
].
name
,
value
:
list
[
i
].
id
,
children
:
children
})
}
})
},
getGoodsCategoryByIds
(
ids
)
{
let
name
let
parentName
for
(
let
i
=
0
;
i
<
this
.
goodsCategoryOptions
.
length
;
i
++
)
{
if
(
this
.
goodsCategoryOptions
[
i
].
value
===
ids
[
0
])
{
parentName
=
this
.
goodsCategoryOptions
[
i
].
label
for
(
let
j
=
0
;
j
<
this
.
goodsCategoryOptions
[
i
].
children
.
length
;
j
++
)
{
if
(
this
.
goodsCategoryOptions
[
i
].
children
[
j
].
value
===
ids
[
1
])
{
name
=
this
.
goodsCategoryOptions
[
i
].
children
[
j
].
label
}
}
}
}
return
{
goodsCategoryId
:
ids
[
1
],
goodsCategoryName
:
name
,
parentCategoryName
:
parentName
}
}
}
}
}
}
}
...
...
litemall-admin/src/views/promotion/grouponRule.vue
View file @
2f3ef296
...
@@ -237,8 +237,7 @@ export default {
...
@@ -237,8 +237,7 @@ export default {
title
:
'
成功
'
,
title
:
'
成功
'
,
message
:
'
删除团购规则成功
'
message
:
'
删除团购规则成功
'
})
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
getList
()
this
.
list
.
splice
(
index
,
1
)
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
this
.
$notify
.
error
({
this
.
$notify
.
error
({
title
:
'
失败
'
,
title
:
'
失败
'
,
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
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