Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
367cf787
Commit
367cf787
authored
Nov 22, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(gpsDeposit): 完善订单列表
parent
11107d18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
49 deletions
+189
-49
gpsDeposit.jsp
src/main/webapp/WEB-INF/views/cmpt/gpsDeposit.jsp
+188
-48
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+1
-1
No files found.
src/main/webapp/WEB-INF/views/cmpt/gpsDeposit.jsp
View file @
367cf787
...
@@ -141,10 +141,10 @@
...
@@ -141,10 +141,10 @@
<
/div
>
<
/div
>
<
div
class
=
"w-full gap-x-2 flex flex-row items-center mt-3"
>
<
div
class
=
"w-full gap-x-2 flex flex-row items-center mt-3"
>
<
n
-
space
v
-
if
=
"tabIndex===2"
>
<
n
-
space
v
-
if
=
"tabIndex===2"
>
<
n
-
button
type
=
"primary"
>
<
n
-
button
type
=
"primary"
@
click
=
"refundAll"
>
一键归还
一键归还
<
/n-button
>
<
/n-button
>
<
n
-
button
v
-
if
=
"checkedRowKeys.length"
type
=
"error"
>
<
n
-
button
v
-
if
=
"checkedRowKeys.length"
@
click
=
"batchRefund"
type
=
"error"
>
批量退款
批量退款
<
/n-button
>
<
/n-button
>
<
/n-space
>
<
/n-space
>
...
@@ -236,7 +236,6 @@
...
@@ -236,7 +236,6 @@
</script>
</script>
<script>
<script>
const
cmpt
=
JSON
.
parse
(
'${fns:toJson(cmpt)}'
);
const
cmpt
=
JSON
.
parse
(
'${fns:toJson(cmpt)}'
);
console
.
log
({
cmpt
})
// 枚举class
// 枚举class
class
SuperEnum
{
class
SuperEnum
{
constructor
(
param
)
{
constructor
(
param
)
{
...
@@ -423,6 +422,12 @@
...
@@ -423,6 +422,12 @@
const
GET_DEPOSIT_URL
=
BASE_ECC_URL
+
"/api-gps-config/v1/getByCmptId?cmptId="
+
getCId
()
const
GET_DEPOSIT_URL
=
BASE_ECC_URL
+
"/api-gps-config/v1/getByCmptId?cmptId="
+
getCId
()
// 获取订单
// 获取订单
const
GET_ORDER_PAGE_URL
=
BASE_ECC_URL
+
"/api-order/v1/order-list"
const
GET_ORDER_PAGE_URL
=
BASE_ECC_URL
+
"/api-order/v1/order-list"
// 删除订单
const
DELETE_ORDER_URL
=
BASE_ECC_URL
+
"/api-order/v1/delete-order"
// 订单退款
const
ORDER_REFUND_URL
=
BASE_ECC_URL
+
"/api-refund/v1/refund"
// 批量退款
const
ORDER_BATCH_REFUND_URL
=
BASE_ECC_URL
+
"/api-refund/v1/batch-refund"
// 获取赛事信息
// 获取赛事信息
const
GET_CMPT_URL
=
"https://timerbackend.geexek.com/getCmpt.do?cmptId="
+
getCId
()
const
GET_CMPT_URL
=
"https://timerbackend.geexek.com/getCmpt.do?cmptId="
+
getCId
()
...
@@ -509,6 +514,9 @@
...
@@ -509,6 +514,9 @@
const
orderColumns
=
[
const
orderColumns
=
[
{
{
type
:
'selection'
,
type
:
'selection'
,
disabled
(
row
)
{
return
!
[
TradeStatusEnum
.
PAY_SUCCESS
.
value
].
includes
(
row
.
tradeStatus
)
}
},
},
{
{
title
:
'订单号'
,
title
:
'订单号'
,
...
@@ -528,44 +536,92 @@
...
@@ -528,44 +536,92 @@
{
{
title
:
'状态'
,
title
:
'状态'
,
key
:
'tradeStatus'
,
key
:
'tradeStatus'
,
width
:
100
,
align
:
'center'
,
width
:
150
,
render
:
(
row
)
=>
{
render
:
(
row
)
=>
{
// 两个按钮,一个 编辑 一个 删除
return
h
(
NSpace
,
{
return
h
(
NSpace
,
{
vertical
:
true
vertical
:
true
},
[
},
[
h
(
NTag
,
{
h
(
NSpace
,
{},
[
size
:
"small"
,
h
(
'span'
,
{},
"订单状态"
),
type
:
TradeStatusEnum
[
row
.
tradeStatus
].
color
,
h
(
NTag
,
{
},
TradeStatusEnum
[
row
.
tradeStatus
].
name
),
size
:
"small"
,
h
(
NTag
,
{
type
:
TradeStatusEnum
[
row
.
tradeStatus
].
color
,
size
:
"small"
,
bordered
:
false
,
type
:
OrderTypeEnum
[
row
.
orderType
].
color
,
round
:
true
,
},
OrderTypeEnum
[
row
.
orderType
].
name
),
},
TradeStatusEnum
[
row
.
tradeStatus
].
name
),
h
(
NTag
,
{
]),
size
:
"small"
,
h
(
NSpace
,
{},
[
type
:
PayTypeEnum
[
row
.
payType
].
color
,
h
(
'span'
,
{},
"订单类型"
),
},
PayTypeEnum
[
row
.
orderType
].
name
),
h
(
NTag
,
{
size
:
"small"
,
bordered
:
false
,
round
:
true
,
type
:
OrderTypeEnum
[
row
.
orderType
].
color
,
},
OrderTypeEnum
[
row
.
orderType
].
name
),
]),
h
(
NSpace
,
{},
[
h
(
'span'
,
{},
"支付方式"
),
h
(
NTag
,
{
size
:
"small"
,
bordered
:
false
,
round
:
true
,
type
:
PayTypeEnum
[
row
.
payType
].
color
,
},
PayTypeEnum
[
row
.
payType
].
name
),
])
])
])
}
}
},
},
{
{
title
:
'交易金额'
,
title
:
'交易金额'
,
key
:
'amount'
,
key
:
'amount'
,
align
:
'center'
,
align
:
'center'
,
width
:
140
,
render
:
(
row
)
=>
{
// 两个按钮,一个 编辑 一个 删除
return
h
(
NSpace
,
{
vertical
:
true
},
[
h
(
NSpace
,
{},
[
h
(
'span'
,
{},
"支付金额"
),
h
(
NTag
,
{
size
:
"small"
,
bordered
:
false
,
type
:
'primary'
,
},
`¥`
+
row
.
amount
),
]),
row
.
returnAmount
&&
h
(
NSpace
,
{},
[
h
(
'span'
,
{},
"退款金额"
),
h
(
NTag
,
{
size
:
"small"
,
bordered
:
false
,
type
:
'error'
,
},
`¥`
+
row
.
returnAmount
),
]),
])
}
},
},
{
{
title
:
'
创建时间
'
,
title
:
'
日期
'
,
key
:
'createTime'
,
key
:
'createTime'
,
align
:
'center'
,
align
:
'center'
,
width
:
100
,
width
:
220
,
},
render
:
(
row
)
=>
{
{
// 两个按钮,一个 编辑 一个 删除
title
:
'更新时间'
,
return
h
(
NSpace
,
{
key
:
'updateTime'
,
vertical
:
true
align
:
'center'
,
},
[
width
:
100
,
h
(
'span'
,
{
className
:
'text-xs'
,
},
"创建时间:"
+
row
.
createTime
),
row
.
updateTime
&&
h
(
'span'
,
{
className
:
'text-xs'
,
},
"更新时间:"
+
row
.
updateTime
),
row
.
refundTime
&&
h
(
'span'
,
{
className
:
'text-xs'
,
},
"退款时间:"
+
row
.
refundTime
),
])
}
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
@@ -574,28 +630,52 @@
...
@@ -574,28 +630,52 @@
align
:
'center'
,
align
:
'center'
,
render
:
(
row
)
=>
{
render
:
(
row
)
=>
{
// 两个按钮,一个 编辑 一个 删除
// 两个按钮,一个 编辑 一个 删除
return
h
(
NSpace
,
{},
[
return
h
(
'div'
,
{
className
:
'flex flex-row items-center justify-center gap-x-1'
},
[
row
.
tradeStatus
===
TradeStatusEnum
.
PAY_SUCCESS
.
value
&&
h
(
NButton
,
{
row
.
tradeStatus
===
TradeStatusEnum
.
PAY_SUCCESS
.
value
&&
h
(
NButton
,
{
type
:
'error'
,
type
:
'error'
,
size
:
'small'
,
size
:
'small'
,
onClick
:
async
()
=>
{
onClick
:
async
()
=>
{
const
result
=
confirm
(
'将全额退款'
+
row
.
markNo
+
'GPS押金?'
)
if
(
!
result
)
{
return
}
row
.
refundAmount
=
row
.
amount
// 订单退款
await
orderRefund
(
row
)
}
},
'全额退款'
),
row
.
tradeStatus
===
TradeStatusEnum
.
PAY_SUCCESS
.
value
&&
h
(
NButton
,
{
type
:
'primary'
,
size
:
'small'
,
onClick
:
async
()
=>
{
const
inputConfirm
=
prompt
(
'请输入退款金额(最大'
+
row
.
amount
+
')'
)
if
(
!
inputConfirm
)
{
return
}
if
(
Number
(
inputConfirm
)
>
row
.
amount
)
{
NMessage
.
error
(
'退款金额不能大于订单金额'
)
return
}
row
.
refundAmount
=
Number
(
inputConfirm
)
// 订单退款
await
orderRefund
(
row
)
}
}
},
'退款'
),
},
'部分退款'
),
// h(NButton, {
// 仅当订单状态为待支付时,显示删除按钮
// type: 'primary',
row
.
tradeStatus
===
TradeStatusEnum
.
WAIT_PAY
.
value
&&
h
(
NButton
,
{
// size: 'small',
type
:
'error'
,
// onClick: () => {
size
:
'small'
,
onClick
:
async
()
=>
{
// }
const
result
=
confirm
(
'确定删除订单'
+
row
.
markNo
+
'吗?'
)
// }, '归还'),
if
(
!
result
)
{
// h(NButton, {
return
// type: 'primary',
}
// size: 'small',
// 删除订单
// onClick: async () => {
await
deleteOrder
(
row
)
}
// }
},
'删除订单'
),
// }, '退款'),
])
])
}
}
...
@@ -660,7 +740,7 @@
...
@@ -660,7 +740,7 @@
checkedRowKeys
.
value
=
rowKeys
checkedRowKeys
.
value
=
rowKeys
}
}
function
rowKey
(
row
)
{
function
rowKey
(
row
)
{
return
row
.
markNo
return
row
.
id
}
}
// 状态更新
// 状态更新
const
updateStatus
=
(
value
)
=>
{
const
updateStatus
=
(
value
)
=>
{
...
@@ -741,7 +821,62 @@
...
@@ -741,7 +821,62 @@
tradeStatusOptions
.
value
[
2
].
total
=
res
[
2
].
data
.
total
tradeStatusOptions
.
value
[
2
].
total
=
res
[
2
].
data
.
total
tradeStatusOptions
.
value
[
3
].
total
=
res
[
3
].
data
.
total
tradeStatusOptions
.
value
[
3
].
total
=
res
[
3
].
data
.
total
tradeStatusOptions
.
value
[
4
].
total
=
res
[
4
].
data
.
total
tradeStatusOptions
.
value
[
4
].
total
=
res
[
4
].
data
.
total
}
// 订单退款
const
orderRefund
=
async
(
row
)
=>
{
loading
.
value
=
true
let
params
=
{
orderId
:
row
.
orderId
,
refundAmount
:
row
.
refundAmount
,
refundReason
:
getCId
()
+
"_gps押金退款_"
+
row
.
markNo
,
operatorCode
:
getUId
(),
}
const
[
err
,
res
]
=
await
to
(
fetch
(
ORDER_REFUND_URL
,
{
method
:
"POST"
,
headers
:
{
'Content-Type'
:
'application/json'
},
body
:
JSON
.
stringify
(
params
)
}).
then
(
res
=>
res
.
json
()))
loading
.
value
=
false
if
(
err
)
{
message
.
error
(
err
)
return
}
if
(
res
.
code
===
200
)
{
message
.
success
(
'退款成功'
)
fetchOrders
()
}
else
{
message
.
error
(
res
.
message
)
}
}
// 删除订单
const
deleteOrder
=
async
(
row
)
=>
{
loading
.
value
=
true
let
params
=
{
applyId
:
row
.
applyId
,
operator
:
getUId
(),
}
const
[
err
,
res
]
=
await
to
(
fetch
(
DELETE_ORDER_URL
,
{
method
:
"POST"
,
headers
:
{
'Content-Type'
:
'application/json'
},
body
:
JSON
.
stringify
(
params
)
}).
then
(
res
=>
res
.
json
()))
loading
.
value
=
false
if
(
err
)
{
message
.
error
(
err
)
return
}
if
(
res
.
code
===
200
)
{
message
.
success
(
'删除成功'
)
fetchOrders
()
}
else
{
message
.
error
(
res
.
message
)
}
}
}
...
@@ -835,11 +970,14 @@
...
@@ -835,11 +970,14 @@
}
}
}
}
// todo 批量退款
// todo 批量退款
const
batchRefund
=
()
=>
{
}
const
batchRefund
=
()
=>
{
// todo 触发批量退款
message
.
success
(
'功能未实现'
)
const
onBatchRefund
=
()
=>
{
}
showBatchModal
.
value
=
true
// todo 批量退款
const
refundAll
=
()
=>
{
message
.
success
(
'功能未实现'
)
}
}
/***---------------- 押金交互相关 end -----------------*/
/***---------------- 押金交互相关 end -----------------*/
onMounted
(()
=>
{
onMounted
(()
=>
{
...
@@ -873,6 +1011,7 @@
...
@@ -873,6 +1011,7 @@
fetchOrders
,
fetchOrders
,
updateStatus
,
updateStatus
,
handleCheck
,
handleCheck
,
rowKey
,
// gps 相关
// gps 相关
GpsStatusOptions
,
GpsStatusOptions
,
PLAYER
,
PLAYER
,
...
@@ -885,6 +1024,7 @@
...
@@ -885,6 +1024,7 @@
saveDeposit
,
saveDeposit
,
getDeposit
,
getDeposit
,
batchRefund
,
batchRefund
,
refundAll
,
}
}
}
}
...
...
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
367cf787
...
@@ -408,7 +408,7 @@
...
@@ -408,7 +408,7 @@
<a
<a
href=
"/gk/gpsDeposit/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
href=
"/gk/gpsDeposit/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
GPS押金
(ing)
</span>
<span
class=
"menu-txt"
>
GPS押金
</span>
</a>
</a>
</li>
</li>
<li
class=
"information menu-sub-item"
>
<li
class=
"information menu-sub-item"
>
...
...
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