Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
ka-op-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
ka-op-ui
Commits
ea099305
Commit
ea099305
authored
Sep 05, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作日志
parent
67d8c438
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
30 deletions
+106
-30
order.js
src/api/order.js
+16
-0
request.js
src/utils/request.js
+6
-18
index.vue
src/views/order/index.vue
+84
-12
No files found.
src/api/order.js
View file @
ea099305
...
...
@@ -39,3 +39,19 @@ export function lendLoan(data) {
data
})
}
export
function
callbackRecord
(
query
)
{
return
request
({
url
:
'
/order/orderCallbackRecordList
'
,
method
:
'
get
'
,
params
:
query
})
}
export
function
logHistory
(
query
)
{
return
request
({
url
:
'
/opt/history/log/all
'
,
method
:
'
get
'
,
params
:
query
})
}
src/utils/request.js
View file @
ea099305
import
axios
from
'
axios
'
import
{
Message
,
MessageBox
}
from
'
element-ui
'
import
{
Message
}
from
'
element-ui
'
import
store
from
'
../store
'
import
{
getToken
}
from
'
@/utils/auth
'
...
...
@@ -42,27 +42,15 @@ service.interceptors.response.use(
// 50008:非法的token; 50012:其他客户端登录了; 500003:Token 过期了;
if
(
res
.
code
===
501002
||
res
.
code
===
500003
)
{
store
.
dispatch
(
'
FedLogOut
'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
Message
({
message
:
'
token失效,你已被登出
'
,
type
:
'
warning
'
,
duration
:
1000
})
store
.
dispatch
(
'
FedLogOut
'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
duration
:
2000
})
// MessageBox.confirm(
// '你已被登出,可以取消继续留在该页面,或者重新登录',
// '确定登出',
// {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }
// ).then(() => {
// store.dispatch('FedLogOut').then(() => {
// location.reload() // 为了重新实例化vue-router对象 避免bug
// })
// })
}
// return Promise.reject('error')
}
else
{
...
...
src/views/order/index.vue
View file @
ea099305
...
...
@@ -3,6 +3,8 @@
<div
class=
"filter-container"
style=
"padding-bottom:20px"
>
<el-input
v-model=
"listQuery.channelOrderNumber"
placeholder=
"订单号"
clearable
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"getOrders"
/>
<el-input
v-model=
"listQuery.channelId"
placeholder=
"渠道号"
clearable
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"getOrders"
/>
<el-input
v-model=
"listQuery.loanId"
placeholder=
"loanId"
clearable
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"getOrders"
/>
<el-input
v-model=
"listQuery.applyNo"
placeholder=
"授信申请号"
clearable
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"getOrders"
/>
<!--
<el-select
v-model=
"listQuery.channelId"
placeholder=
"渠道号"
clearable
style=
"width: 200px"
class=
"filter-item"
>
<el-option
v-for=
"item in channelOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
-->
...
...
@@ -22,7 +24,9 @@
<el-table-column
label=
"ID"
type=
"index"
align=
"center"
width=
"65"
/>
<el-table-column
sortable
label=
"订单号"
prop=
"channelOrderNumber"
align=
"center"
/>
<el-table-column
sortable
label=
"渠道号"
width=
"180"
prop=
"channelId"
align=
"center"
/>
<el-table-column
label=
"渠道号"
width=
"100"
prop=
"channelId"
align=
"center"
/>
<el-table-column
v-if=
"isShow"
label=
"loanId"
width=
"120"
prop=
"loanId"
align=
"center"
/>
<el-table-column
v-if=
"isShow"
label=
"授信申请号"
prop=
"applyNo"
align=
"center"
/>
<el-table-column
label=
"创建时间"
width=
"180"
prop=
"createdAt"
align=
"center"
/>
<el-table-column
label=
"订单状态"
width=
"180"
prop=
"status"
align=
"center"
/>
...
...
@@ -37,7 +41,7 @@
<el-card
class=
"box-card"
>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"订单状态"
name=
"
first
"
>
<el-tab-pane
label=
"订单状态"
name=
"
orderHistory
"
>
<el-table
ref=
"orderTable"
:data=
"orderHistory"
...
...
@@ -50,8 +54,49 @@
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"通知记录"
name=
"second"
>
通知记录
</el-tab-pane>
<el-tab-pane
label=
"通知记录"
name=
"callbackRecords"
>
<el-table
:data=
"callbackRecords"
fit
highlight-current-row
style=
"margin-bottom:20px"
>
<el-table-column
label=
"订单号"
prop=
"channelOrderNo"
align=
"center"
/>
<el-table-column
label=
"期数"
prop=
"termNo"
align=
"center"
/>
<el-table-column
label=
"通知类型"
prop=
"noticeType"
align=
"center"
/>
<el-table-column
label=
"状态枚举值"
prop=
"callbackStatus"
align=
"center"
/>
<el-table-column
label=
"重试次数"
prop=
"retryTimes"
align=
"center"
/>
<el-table-column
label=
"失败原因"
prop=
"failCode"
align=
"center"
/>
<el-table-column
label=
"是否活跃"
prop=
"isActive"
align=
"center"
/>
<el-table-column
label=
"其他数据"
prop=
"exdata"
align=
"center"
/>
<el-table-column
label=
"通知结果"
prop=
"tableName"
align=
"center"
/>
<el-table-column
label=
"创建时间"
prop=
"createdAt"
align=
"center"
/>
<el-table-column
label=
"修改时间"
prop=
"updatedAt"
align=
"center"
/>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"还款计划"
name=
"third"
>
还款计划
</el-tab-pane>
<el-tab-pane
label=
"操作日志"
name=
"logHistory"
>
<el-table
:data=
"logHistory"
fit
highlight-current-row
style=
"margin-bottom:20px"
>
<el-table-column
label=
"订单号"
prop=
"channelOrderNumber"
align=
"center"
/>
<el-table-column
label=
"操作"
prop=
"optName"
align=
"center"
/>
<el-table-column
label=
"操作员"
prop=
"optUser"
align=
"center"
/>
<el-table-column
label=
"日志详细"
prop=
"optLogDetail"
align=
"center"
/>
<el-table-column
label=
"操作结果"
prop=
"optResult"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
>
{{
scope
.
row
.
optResult
|
statusFilter
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"center"
/>
</el-table>
</el-tab-pane>
</el-tabs>
</el-card>
...
...
@@ -98,16 +143,26 @@
</template>
<
script
>
import
{
getOrders
,
getOrderHistory
,
approve
,
cancelLoan
,
lendLoan
}
from
'
@/api/order
'
import
{
getOrders
,
getOrderHistory
,
approve
,
cancelLoan
,
lendLoan
,
callbackRecord
,
logHistory
}
from
'
@/api/order
'
import
Pagination
from
'
@/components/Pagination
'
import
store
from
'
@/store
'
export
default
{
components
:
{
Pagination
},
filters
:
{
statusFilter
(
status
)
{
const
statusMap
=
{
true
:
'
成功
'
,
false
:
'
失败
'
}
return
statusMap
[
status
]
}
},
data
()
{
return
{
activeName
:
'
first
'
,
activeName
:
'
orderHistory
'
,
roles
:
[],
isShow
:
true
,
dialogTitle
:
''
,
count
:
1
,
page
:
1
,
...
...
@@ -120,7 +175,9 @@ export default {
opt
:
''
,
orders
:
[],
order
:
{},
callbackRecords
:
[],
orderHistory
:
[],
logHistory
:
[],
approveData
:
{},
typeOptions
:
[
{
key
:
'
0
'
,
display_name
:
'
存管
'
},
...
...
@@ -139,6 +196,8 @@ export default {
},
created
()
{
this
.
getOrders
()
this
.
roles
=
store
.
getters
.
roles
this
.
isShow
=
!!
this
.
roles
.
includes
(
'
admin
'
)
},
methods
:
{
getOrders
()
{
...
...
@@ -164,10 +223,8 @@ export default {
},
handleCurrentChange
(
val
)
{
this
.
orderHistory
=
[]
getOrderHistory
({
channelOrderNumber
:
val
.
channelOrderNumber
}).
then
(
res
=>
{
this
.
orderHistory
=
res
.
data
.
historyStatus
})
this
.
order
=
val
this
.
handleClick
()
},
handleOption
(
data
,
opt
)
{
...
...
@@ -230,22 +287,37 @@ export default {
this
.
$notify
({
title
:
res
.
message
,
type
:
'
success
'
,
duration
:
1
000
duration
:
5
000
})
}
else
{
this
.
$notify
({
title
:
res
.
message
,
type
:
'
error
'
,
duration
:
2
000
duration
:
5
000
})
}
this
.
getOrders
()
}).
catch
(()
=>
{
})
this
.
dialogFormVisible
=
false
},
handleClick
()
{
if
(
this
.
activeName
===
'
orderHistory
'
)
{
getOrderHistory
({
channelOrderNumber
:
this
.
order
.
channelOrderNumber
}).
then
(
res
=>
{
this
.
orderHistory
=
res
.
data
.
historyStatus
})
}
if
(
this
.
activeName
===
'
callbackRecords
'
)
{
callbackRecord
({
channelOrderNumber
:
this
.
order
.
channelOrderNumber
}).
then
(
res
=>
{
this
.
callbackRecords
=
res
.
data
})
}
if
(
this
.
activeName
===
'
logHistory
'
)
{
logHistory
({
channelOrderNumber
:
this
.
order
.
channelOrderNumber
}).
then
(
res
=>
{
this
.
logHistory
=
res
.
data
})
}
}
}
}
...
...
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