Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
615763d4
authored
Sep 09, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
order:完善订单聚合搜索
parent
7e511d1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
32 deletions
+50
-32
src/views/mall/trade/order/index.vue
+50
-32
No files found.
src/views/mall/trade/order/index.vue
View file @
615763d4
...
@@ -104,13 +104,19 @@
...
@@ -104,13 +104,19 @@
<el-form-item
label=
"聚合搜索"
>
<el-form-item
label=
"聚合搜索"
>
<el-input
<el-input
v-show=
"true"
v-show=
"true"
v-model=
"query
Type.v
"
v-model=
"query
Params[queryType.k]
"
class=
"!w-280px"
class=
"!w-280px"
clearable
clearable
placeholder=
"请输入"
placeholder=
"请输入"
>
>
<template
#
prepend
>
<template
#
prepend
>
<el-select
v-model=
"queryType.k"
class=
"!w-110px"
clearable
placeholder=
"全部"
>
<el-select
v-model=
"queryType.k"
class=
"!w-110px"
clearable
placeholder=
"全部"
@
change=
"inputChangeSelect"
>
<el-option
<el-option
v-for=
"dict in searchList"
v-for=
"dict in searchList"
:key=
"dict.value"
:key=
"dict.value"
...
@@ -335,41 +341,41 @@ const total = ref(2) // 列表的总页数
...
@@ -335,41 +341,41 @@ const total = ref(2) // 列表的总页数
const
list
=
ref
<
TradeOrderApi
.
OrderVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
TradeOrderApi
.
OrderVO
[]
>
([])
// 列表的数据
const
queryFormRef
=
ref
<
FormInstance
>
()
// 搜索的表单
const
queryFormRef
=
ref
<
FormInstance
>
()
// 搜索的表单
// 表单搜索
// 表单搜索
const
queryParams
=
reactive
({
const
queryParams
=
ref
({
pageNo
:
1
,
//首页
pageNo
:
1
,
// 页数
pageSize
:
10
,
//页面大小
pageSize
:
10
,
// 每页显示数量
no
:
''
,
status
:
null
,
// 订单状态
userId
:
''
,
payChannelCode
:
null
,
// 支付方式
userNickname
:
''
,
createTime
:
null
,
// 创建时间
userMobile
:
''
,
terminal
:
null
,
// 订单来源
receiverName
:
''
,
type
:
null
,
// 订单类型
receiverMobile
:
''
,
deliveryType
:
null
,
// 配送方式
logisticsId
:
null
,
// 快递公司
terminal
:
''
,
pickUpStoreId
:
null
// 自提门店
type
:
null
,
status
:
null
,
payChannelCode
:
''
,
createTime
:
[],
deliveryType
:
null
,
spuName
:
''
,
itemCount
:
''
,
pickUpStoreId
:
[],
logisticsId
:
null
,
all
:
''
})
})
const
queryType
=
reactive
({
k
:
''
,
v
:
''
})
// 订单搜索类型kv
const
queryType
=
reactive
({
k
:
''
})
// 订单搜索类型 k
/**
* 订单聚合搜索
// 订单聚合搜索 select 类型配置
* 商品名称、商品件数、全部
*
* 需要后端支持 TODO
*/
const
searchList
=
ref
([
const
searchList
=
ref
([
{
value
:
'no'
,
label
:
'订单号'
},
{
value
:
'no'
,
label
:
'订单号'
},
{
value
:
'userId'
,
label
:
'用户UID'
},
{
value
:
'userId'
,
label
:
'用户UID'
},
{
value
:
'userNickname'
,
label
:
'用户昵称'
},
{
value
:
'userNickname'
,
label
:
'用户昵称'
},
{
value
:
'userMobile'
,
label
:
'用户电话'
}
{
value
:
'userMobile'
,
label
:
'用户电话'
}
])
])
/**
* 聚合搜索切换查询对象时触发
* @param val
*/
const
inputChangeSelect
=
(
val
:
string
)
=>
{
searchList
.
value
.
filter
((
item
)
=>
item
.
value
!==
val
)
?.
forEach
((
item1
)
=>
{
// 清除集合搜索无用属性
if
(
queryParams
.
value
.
hasOwnProperty
(
item1
.
value
))
{
delete
queryParams
.
value
[
item1
.
value
]
}
})
}
const
headerStyle
=
({
row
,
columnIndex
}:
any
)
=>
{
const
headerStyle
=
({
row
,
columnIndex
}:
any
)
=>
{
// 表头第一行第一列占 8
// 表头第一行第一列占 8
...
@@ -417,7 +423,7 @@ const spanMethod = ({ row, rowIndex, columnIndex }: SpanMethodProps) => {
...
@@ -417,7 +423,7 @@ const spanMethod = ({ row, rowIndex, columnIndex }: SpanMethodProps) => {
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
data
=
await
TradeOrderApi
.
getOrderPage
(
queryParams
)
const
data
=
await
TradeOrderApi
.
getOrderPage
(
unref
(
queryParams
)
)
list
.
value
=
data
.
list
list
.
value
=
data
.
list
total
.
value
=
data
.
total
total
.
value
=
data
.
total
}
finally
{
}
finally
{
...
@@ -427,13 +433,25 @@ const getList = async () => {
...
@@ -427,13 +433,25 @@ const getList = async () => {
/** 搜索按钮操作 */
/** 搜索按钮操作 */
const
handleQuery
=
async
()
=>
{
const
handleQuery
=
async
()
=>
{
queryParams
.
pageNo
=
1
queryParams
.
value
.
pageNo
=
1
await
getList
()
await
getList
()
}
}
/** 重置按钮操作 */
/** 重置按钮操作 */
const
resetQuery
=
()
=>
{
const
resetQuery
=
()
=>
{
queryFormRef
.
value
?.
resetFields
()
queryFormRef
.
value
?.
resetFields
()
queryParams
.
value
=
{
pageNo
:
1
,
// 页数
pageSize
:
10
,
// 每页显示数量
status
:
null
,
// 订单状态
payChannelCode
:
null
,
// 支付方式
createTime
:
null
,
// 创建时间
terminal
:
null
,
// 订单来源
type
:
null
,
// 订单类型
deliveryType
:
null
,
// 配送方式
logisticsId
:
null
,
// 快递公司
pickUpStoreId
:
null
// 自提门店
}
handleQuery
()
handleQuery
()
}
}
...
...
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