Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_admin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_admin
Commits
1ef5b2aa
Commit
1ef5b2aa
authored
Apr 29, 2024
by
gaia
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/20240301_1544_sale' into release_pre_20240429134034
parents
1e3dfa45
76bfce3a
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1506 additions
and
79 deletions
+1506
-79
src/api/business/order.js
src/api/business/order.js
+2
-44
src/api/business/sale.js
src/api/business/sale.js
+8
-0
src/api/business/user.js
src/api/business/user.js
+29
-0
src/router/index.js
src/router/index.js
+80
-8
src/views/order/itemOrderList.vue
src/views/order/itemOrderList.vue
+208
-0
src/views/order/saleOrderList.vue
src/views/order/saleOrderList.vue
+206
-0
src/views/sale/itemDetail.vue
src/views/sale/itemDetail.vue
+182
-0
src/views/sale/itemList.vue
src/views/sale/itemList.vue
+288
-0
src/views/sale/saleList.vue
src/views/sale/saleList.vue
+40
-17
src/views/user/user.vue
src/views/user/user.vue
+106
-10
src/views/user/userDetail.vue
src/views/user/userDetail.vue
+357
-0
No files found.
src/api/business/order.js
View file @
1ef5b2aa
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
import
Qs
from
'
qs
'
export
function
listOrder
(
query
)
{
export
function
requestOrderList
(
data
)
{
return
request
({
return
request
({
url
:
'
/order/list
'
,
url
:
'
/sysDistributionOrder/findList
'
,
method
:
'
get
'
,
params
:
query
,
paramsSerializer
:
function
(
params
)
{
return
Qs
.
stringify
(
params
,
{
arrayFormat
:
'
repeat
'
})
}
})
}
export
function
detailOrder
(
id
)
{
return
request
({
url
:
'
/order/detail
'
,
method
:
'
get
'
,
params
:
{
id
}
})
}
export
function
shipOrder
(
data
)
{
return
request
({
url
:
'
/order/ship
'
,
method
:
'
post
'
,
method
:
'
post
'
,
data
data
})
})
}
}
export
function
refundOrder
(
data
)
{
return
request
({
url
:
'
/order/refund
'
,
method
:
'
post
'
,
data
})
}
export
function
replyComment
(
data
)
{
return
request
({
url
:
'
/order/reply
'
,
method
:
'
post
'
,
data
})
}
export
function
listShipChannel
()
{
return
request
({
url
:
'
/order/listShipChannel
'
,
method
:
'
get
'
})
}
src/api/business/sale.js
View file @
1ef5b2aa
...
@@ -45,3 +45,11 @@ export function findSaleDetail(data) {
...
@@ -45,3 +45,11 @@ export function findSaleDetail(data) {
data
data
})
})
}
}
export
function
irregularOff
(
data
)
{
return
request
({
url
:
'
/supplierItem/irregularOff
'
,
method
:
'
post
'
,
data
})
}
src/api/business/user.js
View file @
1ef5b2aa
...
@@ -63,4 +63,33 @@ export function listHistory(query) {
...
@@ -63,4 +63,33 @@ export function listHistory(query) {
params
:
query
params
:
query
})
})
}
}
export
function
fansList
(
data
)
{
return
request
({
url
:
'
/user/findDetailList
'
,
method
:
'
post
'
,
data
})
}
export
function
requestUserDetail
(
data
)
{
return
request
({
url
:
'
/user/findDetail
'
,
method
:
'
post
'
,
data
})
}
export
function
updateCollectorPermission
(
data
)
{
return
request
({
url
:
'
/user/updateCollectorPermission
'
,
method
:
'
post
'
,
data
})
}
export
function
updateAccountState
(
data
)
{
return
request
({
url
:
'
/user/updateAccountState
'
,
method
:
'
post
'
,
data
})
}
src/router/index.js
View file @
1ef5b2aa
...
@@ -133,6 +133,17 @@ export const asyncRouterMap = [
...
@@ -133,6 +133,17 @@ export const asyncRouterMap = [
noCache
:
true
noCache
:
true
}
}
},
},
{
path
:
'
userDetail
'
,
component
:
()
=>
import
(
'
@/views/user/userDetail
'
),
name
:
'
userDetail
'
,
meta
:
{
title
:
'
会员详情
'
,
icon
:
'
message
'
,
noCache
:
true
},
hidden
:
true
},
{
{
path
:
'
feedback
'
,
path
:
'
feedback
'
,
component
:
()
=>
import
(
'
@/views/user/feedback
'
),
component
:
()
=>
import
(
'
@/views/user/feedback
'
),
...
@@ -143,8 +154,8 @@ export const asyncRouterMap = [
...
@@ -143,8 +154,8 @@ export const asyncRouterMap = [
icon
:
'
message
'
,
icon
:
'
message
'
,
noCache
:
true
noCache
:
true
}
}
}
,
}
{
/*
{
path: 'inviteList',
path: 'inviteList',
component: () => import('@/views/user/inviteList'),
component: () => import('@/views/user/inviteList'),
name: 'inviteList',
name: 'inviteList',
...
@@ -178,7 +189,7 @@ export const asyncRouterMap = [
...
@@ -178,7 +189,7 @@ export const asyncRouterMap = [
noCache: true
noCache: true
},
},
hidden: true
hidden: true
}
}
*/
]
]
},
},
{
{
...
@@ -367,7 +378,7 @@ export const asyncRouterMap = [
...
@@ -367,7 +378,7 @@ export const asyncRouterMap = [
}
}
]
]
},
},
{
/*
{
path: '/consign',
path: '/consign',
component: Layout,
component: Layout,
redirect: 'noredirect',
redirect: 'noredirect',
...
@@ -427,7 +438,7 @@ export const asyncRouterMap = [
...
@@ -427,7 +438,7 @@ export const asyncRouterMap = [
hidden: true
hidden: true
}
}
]
]
},
},
*/
{
{
path
:
'
/sale
'
,
path
:
'
/sale
'
,
component
:
Layout
,
component
:
Layout
,
...
@@ -435,7 +446,7 @@ export const asyncRouterMap = [
...
@@ -435,7 +446,7 @@ export const asyncRouterMap = [
alwaysShow
:
true
,
alwaysShow
:
true
,
name
:
'
sale
'
,
name
:
'
sale
'
,
meta
:
{
meta
:
{
title
:
'
分销
管理
'
,
title
:
'
商品
管理
'
,
icon
:
'
shopping
'
icon
:
'
shopping
'
},
},
children
:
[
children
:
[
...
@@ -445,12 +456,37 @@ export const asyncRouterMap = [
...
@@ -445,12 +456,37 @@ export const asyncRouterMap = [
name
:
'
saleList
'
,
name
:
'
saleList
'
,
meta
:
{
meta
:
{
perms
:
[],
perms
:
[],
title
:
'
分销商品
管理
'
,
title
:
'
分销商品
'
,
icon
:
'
list
'
,
icon
:
'
list
'
,
noCache
:
true
,
noCache
:
true
,
keepAlive
:
true
keepAlive
:
true
}
}
},
},
{
path
:
'
itemList
'
,
component
:
()
=>
import
(
'
@/views/sale/itemList
'
),
name
:
'
itemList
'
,
meta
:
{
perms
:
[],
title
:
'
用户藏品
'
,
icon
:
'
list
'
,
noCache
:
true
,
keepAlive
:
true
}
},
{
path
:
'
itemDetail
'
,
component
:
()
=>
import
(
'
@/views/sale/itemDetail
'
),
name
:
'
itemDetail
'
,
meta
:
{
perms
:
[],
title
:
'
藏品详情
'
,
icon
:
'
list
'
,
noCache
:
true
,
keepAlive
:
true
},
hidden
:
true
},
{
{
path
:
'
saleAdd
'
,
path
:
'
saleAdd
'
,
component
:
()
=>
import
(
'
@/views/sale/saleAdd
'
),
component
:
()
=>
import
(
'
@/views/sale/saleAdd
'
),
...
@@ -467,6 +503,42 @@ export const asyncRouterMap = [
...
@@ -467,6 +503,42 @@ export const asyncRouterMap = [
]
]
},
},
{
{
path
:
'
/order
'
,
component
:
Layout
,
redirect
:
'
noredirect
'
,
alwaysShow
:
true
,
name
:
'
order
'
,
meta
:
{
title
:
'
订单管理
'
,
icon
:
'
shopping
'
},
children
:
[
{
path
:
'
saleList
'
,
component
:
()
=>
import
(
'
@/views/order/itemOrderList
'
),
name
:
'
itemOrderList
'
,
meta
:
{
perms
:
[],
title
:
'
藏馆订单
'
,
icon
:
'
list
'
,
noCache
:
true
,
keepAlive
:
true
}
},
{
path
:
'
saleOrderList
'
,
component
:
()
=>
import
(
'
@/views/order/saleOrderList
'
),
name
:
'
saleOrderList
'
,
meta
:
{
perms
:
[],
title
:
'
分销订单
'
,
icon
:
'
list
'
,
noCache
:
true
,
keepAlive
:
true
}
}
]
},
/* {
path: '/service',
path: '/service',
component: Layout,
component: Layout,
redirect: 'noredirect',
redirect: 'noredirect',
...
@@ -500,7 +572,7 @@ export const asyncRouterMap = [
...
@@ -500,7 +572,7 @@ export const asyncRouterMap = [
}
}
}
}
]
]
},
},
*/
{
{
path
:
'
/redData
'
,
path
:
'
/redData
'
,
component
:
Layout
,
component
:
Layout
,
...
...
src/views/order/itemOrderList.vue
0 → 100644
View file @
1ef5b2aa
<
template
>
<div
class=
"page_consignList"
>
<div
class=
"filter-container"
>
<div
class=
"button_left"
>
<el-select
v-model=
"listQuery.state"
placeholder=
"请选择订单状态"
class=
"filter-item"
style=
"width: 200px;"
>
<el-option
v-for=
"item in options"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
size=
"mini"
/>
</el-select>
<el-input
v-model=
"listQuery.itemName"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入藏品名称"
/>
<el-input
v-model=
"listQuery.sellerName"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入藏家名称"
/>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
style=
"margin-left: 12px"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
@
click=
"resetSearchForm"
>
重置
</el-button>
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
size=
"small"
element-loading-text=
"正在查询中..."
border
fit
highlight-current-row
>
<!--
<el-table-column
align=
"center"
label=
"排行"
width=
"100px"
type=
"index"
/>
-->
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"distributionOrderId"
label=
"订单编号"
/>
<el-table-column
align=
"center"
label=
"藏家名称"
min-width=
"150px"
prop=
"sellerName"
>
<template
slot-scope=
"scope"
>
<Line2Hidden
:text=
"scope.row.sellerName || ''"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"藏品图片"
prop=
"homePageImage"
>
<
template
slot-scope=
"scope"
>
<img
v-if=
"scope.row.homePageImage && scope.row.homePageImage.url"
:src=
"scope.row.homePageImage.url"
width=
"60px"
height=
"60px"
>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"藏品名称"
min-width=
"150px"
prop=
"itemName"
>
<
template
slot-scope=
"scope"
>
<Line2Hidden
:text=
"scope.row.itemName"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"数量"
prop=
"itemNum"
/>
<el-table-column
align=
"center"
label=
"订单金额"
prop=
"amount"
>
<
template
slot-scope=
"scope"
>
<span
class=
"tooltip-span"
>
{{
`¥ ${scope.row.amount
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
下单用户
"
prop
=
"
buyerName
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
收货信息
"
prop
=
"
receiverName
"
min
-
width
=
"
160px
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
v
-
if
=
"
scope.row.receiverName
"
>
{{
scope
.
row
.
receiverName
+
'
,
'
+
scope
.
row
.
receiverPhone
+
'
,
'
+
scope
.
row
.
receiverAddress
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
订单状态
"
prop
=
"
stateName
"
/>
<!--
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
300
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
:
disabled
=
"
(!scope.row.editAble && scope.row.type === 2)
"
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToDetail(scope.row)
"
>
编辑
<
/el-button
>
<
el
-
button
:
disabled
=
"
(!scope.row.editAble && scope.row.type === 2)
"
type
=
"
danger
"
size
=
"
mini
"
@
click
=
"
handleDelete(scope.row)
"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column>--
>
<
/el-table
>
<
Pagination
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
/div
>
<
/template
>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
{
requestOrderList
}
from
'
@/api/business/order
'
export
default
{
name
:
'
ItemOrderList
'
,
components
:
{
Pagination
,
Line2Hidden
}
,
data
()
{
return
{
itemKey
:
0
,
options
:
[{
value
:
1
,
label
:
'
待付款
'
}
,
{
value
:
10
,
label
:
'
待发货
'
}
,
{
value
:
20
,
label
:
'
待收货
'
}
,
{
value
:
30
,
label
:
'
售后中
'
}
,
{
value
:
80
,
label
:
'
退款受理中
'
}
,
{
value
:
100
,
label
:
'
已完成
'
}
,
{
value
:
101
,
label
:
'
已取消
'
}
],
listLoading
:
true
,
listQuery
:
{
page
:
1
,
size
:
20
,
type
:
3
}
,
list
:
[],
total
:
0
,
// 图文估价
imageValueDialogShow
:
false
,
// 建议寄售价
identifyValueDialogShow
:
false
,
// 货品售出
finishDialogShow
:
false
,
// 寄售凭证
finishSettlementDialogShow
:
false
,
// 取消
cancelConsignDialogShow
:
false
,
currentSaleId
:
''
}
}
,
created
()
{
this
.
getList
()
}
,
methods
:
{
resetSearchForm
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
,
type
:
3
}
this
.
getList
()
}
,
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handlerGetList
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleClick
(
tab
,
event
)
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
getList
()
{
localStorage
.
setItem
(
'
systemState
'
,
''
)
this
.
listLoading
=
true
requestOrderList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
console
.
log
(
'
===报错=
'
,
e
)
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
/deep/
.
el
-
switch
{
height
:
30
px
;
}
/deep/
.
cell
{
display
:
flex
;
justify
-
content
:
center
;
}
.
page_consignList
{
padding
:
20
px
;
.
filter
-
container
{
display
:
flex
;
flex
-
direction
:
row
;
justify
-
content
:
space
-
between
;
}
}
<
/style
>
src/views/order/saleOrderList.vue
0 → 100644
View file @
1ef5b2aa
<
template
>
<div
class=
"page_consignList"
>
<div
class=
"filter-container"
>
<div
class=
"button_left"
>
<el-select
v-model=
"listQuery.state"
placeholder=
"请选择订单状态"
class=
"filter-item"
style=
"width: 200px;"
>
<el-option
v-for=
"item in options"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
size=
"mini"
/>
</el-select>
<el-input
v-model=
"listQuery.itemName"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入藏品名称"
/>
<el-input
v-model=
"listQuery.sellerName"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入藏家名称"
/>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
style=
"margin-left: 12px"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
@
click=
"resetSearchForm"
>
重置
</el-button>
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
size=
"small"
element-loading-text=
"正在查询中..."
border
fit
highlight-current-row
>
<!--
<el-table-column
align=
"center"
label=
"排行"
width=
"100px"
type=
"index"
/>
-->
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"distributionOrderId"
label=
"订单编号"
/>
<el-table-column
align=
"center"
label=
"藏家名称"
min-width=
"150px"
prop=
"sellerName"
>
<template
slot-scope=
"scope"
>
<Line2Hidden
:text=
"scope.row.sellerName || ''"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"藏品图片"
prop=
"homePageImage"
>
<
template
slot-scope=
"scope"
>
<img
v-if=
"scope.row.homePageImage && scope.row.homePageImage.url"
:src=
"scope.row.homePageImage.url"
width=
"60px"
height=
"60px"
>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"藏品名称"
min-width=
"150px"
prop=
"itemName"
>
<
template
slot-scope=
"scope"
>
<Line2Hidden
:text=
"scope.row.itemName"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"数量"
prop=
"itemNum"
/>
<el-table-column
align=
"center"
label=
"订单金额"
prop=
"amount"
>
<
template
slot-scope=
"scope"
>
<span
class=
"tooltip-span"
>
{{
`¥ ${scope.row.amount
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
下单用户
"
prop
=
"
buyerName
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
收货信息
"
prop
=
"
receiverName
"
min
-
width
=
"
160px
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
v
-
if
=
"
scope.row.receiverName
"
>
{{
scope
.
row
.
receiverName
+
'
,
'
+
scope
.
row
.
receiverPhone
+
'
,
'
+
scope
.
row
.
receiverAddress
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
订单状态
"
prop
=
"
stateName
"
/>
<!--
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
300
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
:
disabled
=
"
(!scope.row.editAble && scope.row.type === 2)
"
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToDetail(scope.row)
"
>
编辑
<
/el-button
>
<
el
-
button
:
disabled
=
"
(!scope.row.editAble && scope.row.type === 2)
"
type
=
"
danger
"
size
=
"
mini
"
@
click
=
"
handleDelete(scope.row)
"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column>--
>
<
/el-table
>
<
Pagination
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
/div
>
<
/template
>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
{
requestOrderList
}
from
'
@/api/business/order
'
export
default
{
name
:
'
SaleOrderList
'
,
components
:
{
Pagination
,
Line2Hidden
}
,
data
()
{
return
{
itemKey
:
0
,
options
:
[{
value
:
1
,
label
:
'
待付款
'
}
,
{
value
:
10
,
label
:
'
待发货
'
}
,
{
value
:
20
,
label
:
'
待收货
'
}
,
{
value
:
30
,
label
:
'
售后中
'
}
,
{
value
:
80
,
label
:
'
退款受理中
'
}
,
{
value
:
100
,
label
:
'
已完成
'
}
,
{
value
:
101
,
label
:
'
已取消
'
}
],
listLoading
:
true
,
listQuery
:
{
page
:
1
,
size
:
20
}
,
list
:
[],
total
:
0
,
// 图文估价
imageValueDialogShow
:
false
,
// 建议寄售价
identifyValueDialogShow
:
false
,
// 货品售出
finishDialogShow
:
false
,
// 寄售凭证
finishSettlementDialogShow
:
false
,
// 取消
cancelConsignDialogShow
:
false
,
currentSaleId
:
''
}
}
,
created
()
{
this
.
getList
()
}
,
methods
:
{
resetSearchForm
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
}
this
.
getList
()
}
,
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handlerGetList
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleClick
(
tab
,
event
)
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
getList
()
{
localStorage
.
setItem
(
'
systemState
'
,
''
)
this
.
listLoading
=
true
requestOrderList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
console
.
log
(
'
===报错=
'
,
e
)
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
/deep/
.
el
-
switch
{
height
:
30
px
;
}
/deep/
.
cell
{
display
:
flex
;
justify
-
content
:
center
;
}
.
page_consignList
{
padding
:
20
px
;
.
filter
-
container
{
display
:
flex
;
flex
-
direction
:
row
;
justify
-
content
:
space
-
between
;
}
}
<
/style
>
src/views/sale/itemDetail.vue
0 → 100644
View file @
1ef5b2aa
<
template
>
<div
class=
"page_itemDetail"
>
<el-card
class=
"box-card"
style=
"margin: 16px"
>
<h3>
用户信息
</h3>
<div
class=
"user_info flex"
>
<el-form
ref=
"addInviteRef"
label-width=
"120px"
>
<el-form-item
label=
"商品名称:"
>
<div>
{{
itemContent
&&
itemContent
.
name
||
'
-
'
}}
</div>
</el-form-item>
<el-form-item
label=
"价格:"
>
<div>
{{
`¥${itemContent && itemContent.distributionPrice || '-'
}
`
}}
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
商品详情:
"
>
<
div
>
{{
itemContent
&&
itemContent
.
name
||
'
-
'
}}
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
商品图片/视频:
"
>
<
div
v
-
if
=
"
itemContent && itemContent.imagelist && (typeof itemContent.imagelist === 'object')
"
class
=
"
image
"
>
<
div
v
-
for
=
"
item in itemContent.imagelist
"
:
key
=
"
item.url
"
class
=
"
image_item
"
@
click
=
"
handleShowLargeDialog(item.type, item.url, item.videoUrl)
"
>
<
img
:
src
=
"
item.url
"
class
=
"
image_item_content
"
>
<
img
v
-
if
=
"
item.type === 1
"
class
=
"
image_content_video_icon
"
src
=
"
https://cdn.wanwudezhi.com/static/web-static/image/10651432d8c28651da81753c260d81b3_120x120.png
"
>
<
/div
>
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
发布者:
"
>
<
div
>
{{
itemContent
&&
itemContent
.
creatorName
||
'
-
'
}}
<
/div
>
<
/el-form-item
>
<
/el-form
>
<
/div
>
<
/el-card
>
<
el
-
card
class
=
"
box-card
"
style
=
"
margin: 16px
"
>
<
h3
>
其他信息
<
/h3
>
<
div
class
=
"
user_info flex
"
>
<
el
-
form
ref
=
"
addInviteRef
"
label
-
width
=
"
120px
"
>
<
el
-
form
-
item
label
=
"
是否售卖:
"
>
<
div
>
{{
itemContent
&&
itemContent
.
isAbleSale
===
true
?
'
是
'
:
'
否
'
}}
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
库存:
"
>
<
div
>
{{
itemContent
&&
itemContent
.
stock
||
'
-
'
}}
<
/div
>
<
/el-form-item
>
<
/el-form
>
<
/div
>
<
/el-card
>
<
CheckLargeImageDialog
:
show
-
large
-
dialog
=
"
showLargeDialog
"
:
image
-
url
=
"
imageUrl
"
@
closeLargeDialog
=
"
showLargeDialog = false
"
/>
<
CheckVideoDialog
:
show
-
video
-
dialog
=
"
showVideoDialog
"
:
video
-
url
=
"
videosUrl
"
@
closeLargeDialog
=
"
showVideoDialog = false
"
/>
<
/div
>
<
/template
>
<
script
>
import
{
findSaleDetail
}
from
'
../../api/business/sale
'
import
CheckLargeImageDialog
from
'
../goods/components/CheckLargeImageDialog
'
import
CheckVideoDialog
from
'
../goods/components/CheckVideoDialog
'
export
default
{
name
:
'
ItemDetail
'
,
components
:
{
CheckVideoDialog
,
CheckLargeImageDialog
}
,
data
()
{
return
{
id
:
''
,
itemContent
:
{
}
,
imageUrl
:
''
,
showLargeDialog
:
false
,
showVideoDialog
:
false
,
videosUrl
:
''
}
}
,
created
()
{
if
(
this
.
$route
.
query
.
id
==
null
)
{
return
}
this
.
id
=
this
.
$route
.
query
.
id
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
Loading
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
}
)
this
.
handleGetDetail
(
loading
)
}
,
methods
:
{
/**
* 获取详情
* @param loading
*/
handleGetDetail
(
loading
)
{
findSaleDetail
({
id
:
this
.
id
}
)
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
console
.
log
(
'
====
'
,
response
.
data
.
data
)
if
(
response
.
data
.
data
)
{
this
.
itemContent
=
response
.
data
.
data
this
.
itemContent
.
images
=
response
.
data
.
data
.
images
?
response
.
data
.
data
.
images
.
split
(
'
;
'
)
:
[]
const
imageList
=
[]
if
(
this
.
itemContent
.
videos
)
{
const
videoList
=
this
.
itemContent
.
videos
.
split
(
'
,
'
)
if
(
videoList
.
length
===
2
)
{
imageList
.
push
({
url
:
videoList
[
1
],
type
:
1
,
videoUrl
:
videoList
[
0
]
}
)
}
}
if
(
this
.
itemContent
.
images
&&
this
.
itemContent
.
images
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
this
.
itemContent
.
images
.
length
;
i
++
)
{
imageList
.
push
({
url
:
this
.
itemContent
.
images
[
i
],
videoUrl
:
''
,
type
:
2
}
)
}
}
this
.
itemContent
.
imagelist
=
imageList
}
}
)
.
catch
(
response
=>
{
console
.
log
(
'
====erro
'
,
response
)
if
(
loading
)
{
loading
.
close
()
}
}
)
}
,
/**
* 展示大图
* @param imageUrl
*/
handleShowLargeDialog
(
type
,
imageUrl
,
videoUrl
)
{
if
(
type
===
1
)
{
this
.
videosUrl
=
videoUrl
this
.
showVideoDialog
=
true
}
else
{
this
.
imageUrl
=
imageUrl
this
.
showLargeDialog
=
true
}
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
.
page_itemDetail
{
padding
:
20
px
;
.
image
{
width
:
100
%
;
display
:
flex
;
flex
-
direction
:
row
;
}
.
image_item
{
width
:
100
px
;
height
:
100
px
;
margin
-
right
:
10
px
;
margin
-
top
:
16
px
;
position
:
relative
;
.
image_item_content
{
width
:
100
px
;
height
:
100
px
;
}
.
image_content_video_icon
{
position
:
absolute
;
width
:
30
px
;
height
:
30
px
;
top
:
10
px
;
left
:
10
px
;
}
}
}
/deep/
.
el
-
form
-
item
{
margin
-
bottom
:
0
}
<
/style
>
src/views/sale/itemList.vue
0 → 100644
View file @
1ef5b2aa
<
template
>
<div
class=
"page_consignList"
>
<div
class=
"filter-container"
>
<div
class=
"button_left"
>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入商品标题"
/>
<el-select
v-model=
"listQuery.isOnSale"
placeholder=
"请选择是否出售"
class=
"filter-item"
style=
"width: 200px;"
>
<el-option
v-for=
"item in options"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
size=
"mini"
/>
</el-select>
<el-select
v-model=
"listQuery.status"
placeholder=
"请选择藏品状态"
class=
"filter-item"
style=
"width: 200px;"
>
<el-option
v-for=
"item in statusOptions"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
size=
"mini"
/>
</el-select>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
style=
"margin-left: 12px"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
style=
"margin-left: 12px"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
size=
"small"
element-loading-text=
"正在查询中..."
border
fit
highlight-current-row
>
<!--
<el-table-column
align=
"center"
label=
"排行"
width=
"100px"
type=
"index"
/>
-->
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"id"
label=
"商品ID"
/>
<el-table-column
align=
"center"
label=
"封面图"
prop=
"itemImg"
>
<template
slot-scope=
"scope"
>
<img
v-if=
"scope.row.images"
:src=
"scope.row.images.split(';')[0]"
width=
"60px"
height=
"60px"
>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"藏品名称"
min-width=
"150px"
prop=
"name"
>
<
template
slot-scope=
"scope"
>
<Line2Hidden
:text=
"scope.row.name"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"藏品价格"
prop=
"distributionPrice"
>
<
template
slot-scope=
"scope"
>
<span
class=
"tooltip-span"
>
{{
`¥ ${scope.row.distributionPrice
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
是否出售
"
prop
=
"
isAbleSale
"
min
-
width
=
"
100px
"
>
<
template
slot
-
scope
=
"
scope
"
style
=
"
height: 100px
"
>
<
el
-
switch
v
-
model
=
"
scope.row.isAbleSale
"
:
active
-
text
=
"
scope.row.isAbleSale === true ? '是' : '否'
"
style
=
"
display: block
"
@
change
=
"
handleSaleSwitch($event, scope.row)
"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
stock
"
label
=
"
库存
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
creatorName
"
label
=
"
作者
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
updateTime
"
label
=
"
更新时间
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
statusName
"
label
=
"
状态
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.statusName || '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
200
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToDetail(scope.row)
"
>
详情
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.status === 0
"
type
=
"
danger
"
size
=
"
mini
"
@
click
=
"
handleSetItemOff(scope.row)
"
>
违规下架
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
Pagination
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
/div
>
<
/template
>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
{
getSaleList
,
updateOnSale
,
deleteSaleItem
,
irregularOff
}
from
'
@/api/business/sale
'
import
{
MessageBox
}
from
'
element-ui
'
export
default
{
name
:
'
SaleList
'
,
components
:
{
Pagination
,
Line2Hidden
}
,
data
()
{
return
{
itemKey
:
0
,
options
:
[{
value
:
1
,
label
:
'
是
'
}
,
{
value
:
0
,
label
:
'
否
'
}
],
statusOptions
:
[{
value
:
0
,
label
:
'
正常
'
}
,
{
value
:
1
,
label
:
'
违规
'
}
],
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
,
type
:
3
}
,
list
:
[],
total
:
0
,
// 图文估价
imageValueDialogShow
:
false
,
// 建议寄售价
identifyValueDialogShow
:
false
,
// 货品售出
finishDialogShow
:
false
,
// 寄售凭证
finishSettlementDialogShow
:
false
,
// 取消
cancelConsignDialogShow
:
false
,
currentSaleId
:
''
}
}
,
created
()
{
this
.
getList
()
}
,
methods
:
{
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleSaleSwitch
(
e
,
item
)
{
const
params
=
{
id
:
item
.
id
,
isOnSale
:
e
}
updateOnSale
(
params
)
.
then
(
response
=>
{
this
.
$notify
.
success
({
message
:
e
?
'
上架成功
'
:
'
下架成功
'
}
)
}
)
.
catch
(
response
=>
{
item
.
isOnSale
=
!
e
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
}
)
}
)
}
,
handleCreate
()
{
this
.
$router
.
push
({
path
:
'
/sale/saleAdd
'
}
)
}
,
handleReset
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
,
type
:
3
}
this
.
getList
()
}
,
handlerGetList
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleClick
(
tab
,
event
)
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
getList
()
{
localStorage
.
setItem
(
'
systemState
'
,
''
)
this
.
listLoading
=
true
getSaleList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
,
/**
* 详情
*/
handleToDetail
(
item
)
{
this
.
$router
.
push
({
path
:
'
/sale/itemDetail
'
,
query
:
{
id
:
item
.
id
}}
)
}
,
/**
* 删除
*/
handleDelete
(
item
)
{
this
.
$confirm
(
'
你确定删除吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
const
data
=
{
id
:
item
.
id
}
deleteSaleItem
(
data
).
then
((
res
)
=>
{
this
.
$notify
.
success
({
title
:
'
成功
'
,
message
:
'
删除成功
'
}
)
this
.
getList
()
}
).
catch
(
err
=>
{
this
.
$message
.
error
(
err
.
data
&&
err
.
data
.
errmsg
||
'
请求失败, 请重试
'
)
}
)
}
)
}
,
/**
* 违规下架
* @param this.userDetail
*/
handleSetItemOff
(
row
)
{
this
.
$confirm
(
'
是否将该商品违规下架?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
const
params
=
{
id
:
row
.
id
,
state
:
1
}
irregularOff
(
params
).
then
(
response
=>
{
this
.
list
=
this
.
list
.
filter
((
item
)
=>
{
if
(
item
.
id
===
row
.
id
)
{
item
.
statusName
=
'
违规下架
'
item
.
status
=
1
item
.
isAbleSale
=
false
return
item
}
return
item
}
)
this
.
$notify
.
success
({
message
:
'
下架成功
'
}
)
}
).
catch
((
e
)
=>
{
console
.
log
(
'
===报错=
'
,
e
)
this
.
$message
.
error
(
e
.
data
&&
e
.
data
.
errmsg
||
'
请求失败, 请重试
'
)
}
)
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
/deep/
.
el
-
switch
{
height
:
30
px
;
}
/deep/
.
cell
{
display
:
flex
;
justify
-
content
:
center
;
}
.
page_consignList
{
padding
:
20
px
;
.
filter
-
container
{
display
:
flex
;
flex
-
direction
:
row
;
justify
-
content
:
space
-
between
;
}
}
<
/style
>
src/views/sale/saleList.vue
View file @
1ef5b2aa
<
template
>
<
template
>
<div
class=
"page_consignList"
>
<div
class=
"page_consignList"
>
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<div
class=
"button_left"
>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入标题"
/>
<el-select
v-model=
"listQuery.isOnSale"
placeholder=
"请选择"
class=
"filter-item"
style=
"width: 200px;"
>
<el-option
v-for=
"item in options"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
size=
"mini"
/>
</el-select>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
style=
"margin-left: 12px"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
style=
"margin-left: 12px"
@
click=
"handleReset"
>
重置
</el-button>
</div>
<el-button
size=
"mini"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-button
size=
"mini"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
</div>
</div>
<el-table
<el-table
...
@@ -13,7 +26,7 @@
...
@@ -13,7 +26,7 @@
highlight-current-row
>
highlight-current-row
>
<!--
<el-table-column
align=
"center"
label=
"排行"
width=
"100px"
type=
"index"
/>
-->
<!--
<el-table-column
align=
"center"
label=
"排行"
width=
"100px"
type=
"index"
/>
-->
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"id"
label=
"商品ID"
/>
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"id"
label=
"商品ID"
/>
<el-table-column
align=
"center"
label=
"
图片
"
prop=
"itemImg"
>
<el-table-column
align=
"center"
label=
"
封面图
"
prop=
"itemImg"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<img
v-if=
"scope.row.images"
:src=
"scope.row.images.split(';')[0]"
width=
"60px"
height=
"60px"
>
<img
v-if=
"scope.row.images"
:src=
"scope.row.images.split(';')[0]"
width=
"60px"
height=
"60px"
>
</
template
>
</
template
>
...
@@ -76,7 +89,7 @@
...
@@ -76,7 +89,7 @@
v
-
show
=
"
total>0
"
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.
size
"
:
limit
.
sync
=
"
listQuery.
limit
"
@
pagination
=
"
getList
"
/>
@
pagination
=
"
getList
"
/>
<
/div
>
<
/div
>
...
@@ -97,11 +110,17 @@ export default {
...
@@ -97,11 +110,17 @@ export default {
data
()
{
data
()
{
return
{
return
{
itemKey
:
0
,
itemKey
:
0
,
options
:
[{
value
:
1
,
label
:
'
上架
'
}
,
{
value
:
0
,
label
:
'
下架
'
}
],
listLoading
:
true
,
listLoading
:
true
,
listQuery
:
{
listQuery
:
{
page
:
1
,
page
:
1
,
size
:
20
limit
:
20
}
,
}
,
list
:
[],
list
:
[],
total
:
0
,
total
:
0
,
...
@@ -121,10 +140,18 @@ export default {
...
@@ -121,10 +140,18 @@ export default {
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
}
,
}
,
destroyed
()
{
this
.
clearAll
()
}
,
methods
:
{
methods
:
{
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleReset
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
}
this
.
getList
()
}
,
handleSaleSwitch
(
e
,
item
)
{
handleSaleSwitch
(
e
,
item
)
{
const
params
=
{
id
:
item
.
id
,
isOnSale
:
e
}
const
params
=
{
id
:
item
.
id
,
isOnSale
:
e
}
updateOnSale
(
params
)
updateOnSale
(
params
)
...
@@ -144,14 +171,6 @@ export default {
...
@@ -144,14 +171,6 @@ export default {
handleCreate
()
{
handleCreate
()
{
this
.
$router
.
push
({
path
:
'
/sale/saleAdd
'
}
)
this
.
$router
.
push
({
path
:
'
/sale/saleAdd
'
}
)
}
,
}
,
// 清除所有定时器
clearAll
()
{
if
(
this
.
list
)
{
this
.
list
.
forEach
((
el
)
=>
{
clearInterval
(
el
.
countDown
)
}
)
}
}
,
handlerGetList
()
{
handlerGetList
()
{
this
.
listQuery
.
page
=
1
this
.
listQuery
.
page
=
1
this
.
getList
()
this
.
getList
()
...
@@ -164,7 +183,6 @@ export default {
...
@@ -164,7 +183,6 @@ export default {
localStorage
.
setItem
(
'
systemState
'
,
''
)
localStorage
.
setItem
(
'
systemState
'
,
''
)
this
.
listLoading
=
true
this
.
listLoading
=
true
getSaleList
(
this
.
listQuery
).
then
(
response
=>
{
getSaleList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
clearAll
()
this
.
list
=
response
.
data
.
data
.
dataList
this
.
list
=
response
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
total
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
this
.
listLoading
=
false
...
@@ -210,7 +228,7 @@ export default {
...
@@ -210,7 +228,7 @@ export default {
}
}
<
/script
>
<
/script
>
<
style
scoped
>
<
style
lang
=
"
scss
"
scoped
>
/deep/
.
el
-
switch
{
/deep/
.
el
-
switch
{
height
:
30
px
;
height
:
30
px
;
}
}
...
@@ -222,6 +240,11 @@ export default {
...
@@ -222,6 +240,11 @@ export default {
.
page_consignList
{
.
page_consignList
{
padding
:
20
px
;
padding
:
20
px
;
.
filter
-
container
{
display
:
flex
;
flex
-
direction
:
row
;
justify
-
content
:
space
-
between
;
}
}
}
<
/style
>
<
/style
>
src/views/user/user.vue
View file @
1ef5b2aa
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<el-input
v-model=
"listQuery.username"
clearable
size=
"small"
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入用户名"
/>
<el-input
v-model=
"listQuery.username"
clearable
size=
"small"
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入用户名"
/>
<el-input
v-model=
"listQuery.mobile"
clearable
size=
"small"
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入手机号"
/>
<el-input
v-model=
"listQuery.mobile"
clearable
size=
"small"
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入手机号"
/>
<el-button
class=
"filter-item"
type=
"primary"
size=
"mini"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
size=
"mini"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
size=
"mini"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:loading=
"downloadLoading"
size=
"mini"
class=
"filter-item"
type=
"warning"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
:loading=
"downloadLoading"
size=
"mini"
class=
"filter-item"
type=
"warning"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
</div>
</div>
...
@@ -17,7 +18,7 @@
...
@@ -17,7 +18,7 @@
<el-table-column
align=
"center"
label=
"手机号码"
prop=
"mobile"
/>
<el-table-column
align=
"center"
label=
"手机号码"
prop=
"mobile"
/>
<el-table-column
align=
"center"
label=
"性别"
prop=
"gender"
>
<
!--
<
el-table-column
align=
"center"
label=
"性别"
prop=
"gender"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
{{
genderDic
[
scope
.
row
.
gender
]
}}
{{
genderDic
[
scope
.
row
.
gender
]
}}
</
template
>
</
template
>
...
@@ -29,18 +30,24 @@
...
@@ -29,18 +30,24 @@
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
levelDic
[
scope
.
row
.
userLevel
]
}}
{{
levelDic
[
scope
.
row
.
userLevel
]
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
-->
<el-table-column
align=
"center"
label=
"角色"
prop=
"userLevelName"
/>
<el-table-column
align=
"center"
label=
"TA的关注"
prop=
"followerNum"
/>
<el-table-column
align=
"center"
label=
"TA的粉丝"
prop=
"fansNum"
/>
<el-table-column
align=
"center"
label=
"创建时间"
prop=
"addTime"
/>
<el-table-column
align=
"center"
label=
"创建时间"
prop=
"addTime"
/>
<el-table-column
align=
"center"
label=
"状态"
prop=
"status"
>
<el-table-column
align=
"center"
label=
"状态"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
statusDic
[
scope
.
row
.
status
]
}}
{{
statusDic
[
scope
.
row
.
status
]
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"
20
0"
class-name=
"small-padding fixed-width"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"
35
0"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permission=
"['GET /admin/user/detailApprove']"
v-if=
"scope.row.status==0 && scope.row.userLevel==2"
type=
"primary"
size=
"mini"
@
click=
"handleDetail(scope.row)"
>
推广代理
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleToUserDetail(scope.row)"
>
详情
</el-button>
<el-button
v-permission=
"['POST /admin/user/approveAgency']"
v-else-if=
"scope.row.status==3"
type=
"primary"
size=
"mini"
@
click=
"handleApproveAgency(scope.row)"
>
审批
</el-button>
<el-button
type=
"primary"
size=
"mini"
style=
"width: 100px"
@
click=
"handleSetUserState(scope.row)"
>
{{
scope
.
row
.
userLevel
>=
2
?
'
关闭藏家权限
'
:
'
开通藏家权限
'
}}
</el-button>
<el-button
v-permission=
"['GET /admin/user/detailApprove']"
v-else
type=
"info"
size=
"mini"
>
非代理
</el-button>
<el-button
type=
"danger"
size=
"mini"
style=
"width: 100px"
@
click=
"handleSetAccountState(scope.row)"
>
{{
scope
.
row
.
status
===
1
?
'
解封账号
'
:
'
冻结账号
'
}}
</el-button>
<!--
<el-button
v-permission=
"['GET /admin/user/detailApprove']"
v-if=
"scope.row.status==0 && scope.row.userLevel==2"
type=
"primary"
size=
"mini"
@
click=
"handleDetail(scope.row)"
>
推广代理
</el-button>
-->
<!--
<el-button
v-permission=
"['POST /admin/user/approveAgency']"
v-else-if=
"scope.row.status==3"
type=
"primary"
size=
"mini"
@
click=
"handleApproveAgency(scope.row)"
>
审批
</el-button>
-->
<!--
<el-button
v-permission=
"['GET /admin/user/detailApprove']"
v-else
type=
"info"
size=
"mini"
>
非代理
</el-button>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -49,7 +56,7 @@
...
@@ -49,7 +56,7 @@
<pagination
v-show=
"total>0"
:total=
"total"
:page.sync=
"listQuery.page"
:limit.sync=
"listQuery.limit"
@
pagination=
"getList"
/>
<pagination
v-show=
"total>0"
:total=
"total"
:page.sync=
"listQuery.page"
:limit.sync=
"listQuery.limit"
@
pagination=
"getList"
/>
<!-- 详情对话框 -->
<!-- 详情对话框 -->
<el-dialog
:visible.sync=
"detailDialogVisible"
title=
"代理详情"
width=
"700"
>
<
!-- <
el-dialog :visible.sync="detailDialogVisible" title="代理详情" width="700">
<el-form :data="agencyDetail" label-position="left">
<el-form :data="agencyDetail" label-position="left">
<el-form-item label="佣金比例(%)">
<el-form-item label="佣金比例(%)">
<span>{{ agencyDetail.settlementRate }}</span>
<span>{{ agencyDetail.settlementRate }}</span>
...
@@ -59,7 +66,7 @@
...
@@ -59,7 +66,7 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-dialog>
</el-dialog>
<!-- 代理审批 -->
<!– 代理审批 –>
<el-dialog :visible.sync="approveDialogVisible" title="代理审批">
<el-dialog :visible.sync="approveDialogVisible" title="代理审批">
<el-form ref="approveForm" :model="approveForm" status-icon label-position="left" label-width="100px" style="width: 400px; margin-left:50px;">
<el-form ref="approveForm" :model="approveForm" status-icon label-position="left" label-width="100px" style="width: 400px; margin-left:50px;">
<el-form-item label="佣金比例(%)" prop="settlementRate">
<el-form-item label="佣金比例(%)" prop="settlementRate">
...
@@ -70,13 +77,13 @@
...
@@ -70,13 +77,13 @@
<el-button @click="approveDialogVisible = false">取消</el-button>
<el-button @click="approveDialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirmApprove">确定</el-button>
<el-button type="primary" @click="confirmApprove">确定</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
-->
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
fetchList
,
approveAgency
,
detailApprove
}
from
'
@/api/business/user
'
import
{
fetchList
,
approveAgency
,
detailApprove
,
updateCollectorPermission
,
updateAccountState
}
from
'
@/api/business/user
'
import
Pagination
from
'
@/components/Pagination
'
// Secondary package based on el-pagination
import
Pagination
from
'
@/components/Pagination
'
// Secondary package based on el-pagination
export
default
{
export
default
{
...
@@ -124,6 +131,13 @@ export default {
...
@@ -124,6 +131,13 @@ export default {
this
.
listLoading
=
false
this
.
listLoading
=
false
})
})
},
},
handleReset
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
}
this
.
getList
()
},
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
listQuery
.
page
=
1
this
.
getList
()
this
.
getList
()
...
@@ -146,6 +160,88 @@ export default {
...
@@ -146,6 +160,88 @@ export default {
this
.
$refs
[
'
approveForm
'
].
clearValidate
()
this
.
$refs
[
'
approveForm
'
].
clearValidate
()
})
})
},
},
/**
* 跳转到用户详情
*/
handleToUserDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'
/user/userDetail
'
,
query
:
{
id
:
row
.
id
}})
},
handleSetUserState
(
row
)
{
const
tip
=
row
.
userLevel
>=
2
?
'
是否要关闭当前用户的藏家功能权限?
'
:
'
是否为当前用户开通藏家功能权限?
'
const
successTip
=
row
.
userLevel
>=
2
?
'
关闭成功
'
:
'
开通成功
'
this
.
$confirm
(
tip
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
const
params
=
{
id
:
row
.
id
,
flag
:
row
.
userLevel
>=
2
?
0
:
1
}
// userLevel: 0 普通用 1: 分销商 2 藏家 3分销商&藏家
updateCollectorPermission
(
params
).
then
(
response
=>
{
this
.
list
=
this
.
list
.
filter
((
item
)
=>
{
if
(
item
.
id
===
row
.
id
)
{
if
(
row
.
userLevel
===
0
)
{
item
.
userLevel
=
2
item
.
userLevelName
=
'
藏家
'
}
else
if
(
row
.
userLevel
===
1
)
{
item
.
userLevel
=
3
item
.
userLevelName
=
'
分销商、藏家
'
}
else
if
(
row
.
userLevel
===
2
)
{
item
.
userLevel
=
0
item
.
userLevelName
=
'
普通用户
'
}
else
if
(
row
.
userLevel
===
3
)
{
item
.
userLevel
=
1
item
.
userLevelName
=
'
分销商
'
}
return
item
}
return
item
})
this
.
$notify
.
success
({
message
:
successTip
})
}).
catch
((
e
)
=>
{
this
.
$message
.
error
(
e
.
data
&&
e
.
data
.
errmsg
||
'
请求失败, 请重试
'
)
})
})
},
/**
* 修改用户状态
* @param row
*/
handleSetAccountState
(
row
)
{
const
tip
=
row
.
status
===
1
?
'
是否要解封当前用户的账号?
'
:
'
是否要冻结当前用户的账号?
'
const
successTip
=
row
.
status
===
1
?
'
解封成功
'
:
'
冻结成功
'
this
.
$confirm
(
tip
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
const
params
=
{
id
:
row
.
id
,
status
:
row
.
status
===
1
?
0
:
1
}
updateAccountState
(
params
).
then
(
response
=>
{
this
.
list
=
this
.
list
.
filter
((
item
)
=>
{
if
(
item
.
id
===
row
.
id
)
{
item
.
status
=
row
.
status
===
1
?
0
:
1
return
item
}
return
item
})
this
.
$notify
.
success
({
message
:
successTip
})
}).
catch
((
e
)
=>
{
console
.
log
(
'
===报错=
'
,
e
)
this
.
$message
.
error
(
e
.
data
&&
e
.
data
.
errmsg
||
'
请求失败, 请重试
'
)
})
})
},
confirmApprove
()
{
confirmApprove
()
{
this
.
$refs
[
'
approveForm
'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'
approveForm
'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
src/views/user/userDetail.vue
0 → 100644
View file @
1ef5b2aa
This diff is collapsed.
Click to expand it.
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