Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
web
soss
Commits
9af822a8
Commit
9af822a8
authored
May 30, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户
parent
dc34c818
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
255 additions
and
1 deletions
+255
-1
src/api/system/customer.js
+33
-0
src/views/customer/index.vue
+221
-0
src/views/system/user/index.vue
+1
-1
No files found.
src/api/system/customer.js
0 → 100644
View file @
9af822a8
import
request
from
'@/utils/request'
import
{
parseStrEmpty
}
from
"@/utils/ruoyi"
;
// 查询用户列表
export
function
listCustomer
(
query
)
{
return
request
({
url
:
'/system/customer/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询用户详细
export
function
getCustomer
(
userId
)
{
return
request
({
url
:
'/system/customer/'
+
parseStrEmpty
(
userId
),
method
:
'get'
})
}
src/views/customer/index.vue
0 → 100644
View file @
9af822a8
<
template
>
<div
class=
"app-container"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
:xs=
"24"
>
<el-form
:model=
"queryParams"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"用户信息"
prop=
"userInfo"
>
<el-input
v-model=
"queryParams.userInfo"
placeholder=
"请输入姓名、手机号"
clearable
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"注册时间"
>
<el-date-picker
v-model=
"createdTime"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
style=
"width:230px"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"购买记录"
>
<el-select
v-model=
"queryParams.buyRecords"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"customerList"
>
<el-table-column
label=
"用户"
align=
"center"
prop=
"userName"
>
<template
slot-scope=
"scope"
>
<a
@
click=
"getDetial(scope.row.id)"
style=
"color: blue"
>
{{
scope
.
row
.
userName
}}
</a>
</
template
>
</el-table-column>
<el-table-column
label=
"手机号"
align=
"center"
prop=
"phoneNumber"
/>
<el-table-column
label=
"订单量"
align=
"center"
prop=
"orderCount"
/>
<el-table-column
label=
"总金额"
align=
"center"
prop=
"amount"
/>
<el-table-column
label=
"已取消"
align=
"center"
prop=
"cancelCount"
/>
<el-table-column
label=
"取消金额"
align=
"center"
prop=
"cancelAmount"
/>
<el-table-column
label=
"已退款"
align=
"center"
prop=
"refundCount"
/>
<el-table-column
label=
"退款金额"
align=
"center"
prop=
"refundAmount"
/>
<el-table-column
label=
"最近订单时间"
align=
"center"
prop=
"lastOrderDate"
/>
<el-table-column
label=
"注册时间"
align=
"center"
prop=
"createDate"
/>
<el-table-column
label=
"来源"
align=
"center"
prop=
"source"
/>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-col>
</el-row>
<!-- 添加或修改人员配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"700px"
append-to-body
>
<div
style=
"display: flex;align-items: center;"
>
<div>
<img
v-bind:src=
"img"
class=
"img-circle img-lg"
/>
</div>
<div
style=
"margin-left: 20px;"
>
<div
style=
"margin-bottom: 20px;"
>
<span>
姓名
</span>
</div>
<div>
<span>
电话
</span>
</div>
</div>
<div
style=
"margin-left: 50px;"
>
<div
style=
"margin-bottom: 20px;"
>
消费
</div>
<div>
地址
</div>
</div>
</div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"正常订单"
name=
"first"
>
<el-table
v-loading=
"loading"
:data=
"normalOrder"
>
<el-table-column
label=
"订单编号"
align=
"center"
prop=
""
></el-table-column>
<el-table-column
label=
"商品数量"
align=
"center"
prop=
""
/>
<el-table-column
label=
"金额"
align=
"center"
prop=
""
/>
<el-table-column
label=
"城市"
align=
"center"
prop=
""
/>
<el-table-column
label=
"店铺"
align=
"center"
prop=
""
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
""
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
""
/>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"取消订单"
name=
"second"
>
<el-table
v-loading=
"loading"
:data=
"cancelOrder"
>
<el-table-column
label=
"订单编号"
align=
"center"
prop=
""
></el-table-column>
<el-table-column
label=
"商品数量"
align=
"center"
prop=
""
/>
<el-table-column
label=
"金额"
align=
"center"
prop=
""
/>
<el-table-column
label=
"城市"
align=
"center"
prop=
""
/>
<el-table-column
label=
"店铺"
align=
"center"
prop=
""
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
""
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
""
/>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"退款订单"
name=
"third"
>
<el-table
v-loading=
"loading"
:data=
"refundOrder"
>
<el-table-column
label=
"订单编号"
align=
"center"
prop=
""
></el-table-column>
<el-table-column
label=
"商品数量"
align=
"center"
prop=
""
/>
<el-table-column
label=
"金额"
align=
"center"
prop=
""
/>
<el-table-column
label=
"城市"
align=
"center"
prop=
""
/>
<el-table-column
label=
"店铺"
align=
"center"
prop=
""
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
""
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
""
/>
</el-table>
</el-tab-pane>
</el-tabs>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"cancel"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listCustomer
,
getCustomer
}
from
"@/api/system/customer"
;
import
{
VueCropper
}
from
"vue-cropper"
;
export
default
{
name
:
"Customer"
,
components
:
{
VueCropper
},
data
()
{
return
{
img
:
"/static/img/profile.473f5971.jpg"
,
createdTime
:[],
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 人员表格数据
customerList
:
null
,
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 退款订单
refundOrder
:
[],
// 正常订单
normalOrder
:[],
// 取消订单
cancelOrder
:[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
userInfo
:
null
,
createAtStart
:
null
,
createAtEnd
:
null
,
buyRecords
:
null
},
options
:[
{
value
:
""
,
label
:
"全部"
},
{
value
:
"1"
,
label
:
"有购买"
},
{
value
:
"2"
,
label
:
"无购买"
},
{
value
:
"3"
,
label
:
"有复购"
},
],
activeName
:
"first"
};
},
created
()
{
this
.
getList
();
},
methods
:
{
handleClick
(){
},
/** 查询用户列表 */
getList
()
{
this
.
loading
=
true
;
listCustomer
(
this
.
queryParams
).
then
((
response
)
=>
{
if
(
response
.
code
==
"200"
){
this
.
customerList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
});
},
getDetial
(
id
){
this
.
open
=
true
;
this
.
title
=
"用户信息"
;
getCustomer
(
id
).
then
((
response
)
=>
{
if
(
response
.
code
==
"200"
){
this
.
form
=
response
.
data
}
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
.
userInfo
=
null
;
this
.
queryParams
.
buyRecords
=
null
;
this
.
createdTime
=
[];
this
.
handleQuery
();
},
},
};
</
script
>
src/views/system/user/index.vue
View file @
9af822a8
...
...
@@ -73,7 +73,7 @@
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<
template
scope=
"scope"
>
<
template
s
lot-s
cope=
"scope"
>
<span
v-if=
"scope.row.status=='0'"
>
启用
</span>
<span
v-if=
"scope.row.status=='1'"
>
停用
</span>
</
template
>
...
...
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