Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
komatsu-lease-app
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
komatsu
komatsu-lease-app
Commits
f83c6cc9
Commit
f83c6cc9
authored
Dec 23, 2022
by
WangRui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feature]还款计划页面接口联调
parent
ffd616e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
21 deletions
+63
-21
index.js
src/modules/makeRepayment/api/index.js
+16
-7
index.vue
src/modules/makeRepayment/views/index.vue
+18
-4
plan.vue
src/modules/makeRepayment/views/plan.vue
+29
-10
No files found.
src/modules/makeRepayment/api/index.js
View file @
f83c6cc9
import
{
get
,
put
,
post
,
File
,
deleteReq
}
from
'@/utils/http'
import
{
get
,
put
,
post
,
File
,
deleteReq
}
from
'@/utils/http'
const
baseURL
=
import
.
meta
.
env
.
VITE_HTTP_BASE_URL
const
baseURL
=
import
.
meta
.
env
.
DEV
?
'/api'
:
import
.
meta
.
env
.
VITE_HTTP_BASE_URL
const
api
=
{
const
api
=
{
// getMakingList (data) { // 查询合同制作列表
// 首页查询
// return get(
getRepayPlantList
(
data
=
{})
{
// `${baseURL}/hlct/v1/0/contracts/toMake`,
return
post
(
`
${
baseURL
}
/app/api/app/repayment/details`
,
data
)
// {...data}
},
// )
// 明细查询
// },
getRepayPlanDetail
(
data
=
{}){
return
post
(
`
${
baseURL
}
/app/api/app/project/repayment/details`
,
data
)
},
//还款计划明细
getRepaymentDetails
(
data
=
{}){
return
post
(
`
${
baseURL
}
/app/api/app/project/repayment/details`
,
data
)
}
};
};
export
default
api
;
export
default
api
;
src/modules/makeRepayment/views/index.vue
View file @
f83c6cc9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<Notice
detail=
"只可对已关联的项目还款"
/>
<Notice
detail=
"只可对已关联的项目还款"
/>
<PullRefresh
v-model=
"refreshing"
@
refresh=
"onRefresh"
class=
"scroll"
>
<PullRefresh
v-model=
"refreshing"
@
refresh=
"onRefresh"
class=
"scroll"
>
<List
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"loadApproval"
>
<List
:finished=
"finished"
finished-text=
"没有更多了"
>
<ListItem
v-for=
"item in listValue"
:other_title=
"item.other_title"
:title=
"item.title"
:values=
"item.values"
<ListItem
v-for=
"item in listValue"
:other_title=
"item.other_title"
:title=
"item.title"
:values=
"item.values"
@
click=
"jump"
/>
@
click=
"jump"
/>
</List>
</List>
...
@@ -27,7 +27,7 @@ import { useRouter } from "vue-router";
...
@@ -27,7 +27,7 @@ import { useRouter } from "vue-router";
const
searchVal
=
$ref
(
''
);
const
searchVal
=
$ref
(
''
);
cons
t
listValue
=
$ref
([
le
t
listValue
=
$ref
([
{
{
title
:
'202204-DB001-001'
,
title
:
'202204-DB001-001'
,
other_title
:
"2022-07-18"
,
other_title
:
"2022-07-18"
,
...
@@ -40,12 +40,26 @@ const listValue = $ref([
...
@@ -40,12 +40,26 @@ const listValue = $ref([
},
},
])
])
cons
t
refreshing
=
$ref
(
true
);
le
t
refreshing
=
$ref
(
true
);
const
finished
=
$ref
(
true
);
const
finished
=
$ref
(
true
);
const
onRefresh
=
()
=>
{
const
getList
=
async
()
=>
{
// 下拉重置参数,重新加载
// 下拉重置参数,重新加载
let
list
=
await
api
.
getRepayPlantList
({
userId
:
window
.
localStorage
.
getItem
(
'userId'
)});
if
(
list
.
result
===
'SUCCESS'
){
list
=
list
.
data
.
map
(
item
=>
({
...
item
,
title
:
item
.
contractNumber
,
other_title
:
item
.
applyDate
?.
split
(
' '
)[
0
],
values
:
[[
"剩余应还金额"
,
"状态"
,
"融资金额"
],
[
item
.
residueAmount
,
item
.
contractStatusN
,
item
.
financeAmount
]]
}))
}
else
{
list
=
[];
}
listValue
=
list
;
refreshing
=
false
;
};
};
// getList();
const
loadApproval
=
()
=>
{
const
loadApproval
=
()
=>
{
...
...
src/modules/makeRepayment/views/plan.vue
View file @
f83c6cc9
...
@@ -3,24 +3,24 @@
...
@@ -3,24 +3,24 @@
<template
#
list
>
<template
#
list
>
<div
class=
"repay_list"
>
<div
class=
"repay_list"
>
<div
class=
"left"
>
<div
class=
"left"
>
<div
class=
"times-box"
v-for=
"i in
30
"
>
<div
class=
"times-box"
v-for=
"i in
currencyObj.times
"
>
<div
class=
"times"
>
{{
i
}}
期
</div>
<div
class=
"times"
>
{{
i
}}
期
</div>
</div>
</div>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<div
class=
"item"
v-for=
"i
in 30
"
>
<div
class=
"item"
v-for=
"i
tem in cashflow
"
>
<div
class=
"left-item"
>
<div
class=
"left-item"
>
<span>
租金
</span>
<span>
租金
</span>
<span>
2022-06-20
</span>
<span>
{{
item
.
chargeDueDate
}}
</span>
</div>
</div>
<div
class=
"center-item"
>
<div
class=
"center-item"
>
<p>
<p>
<span>
应付金额
</span>
<span>
应付金额
</span>
<span>
¥9,000.00
</span>
<span>
{{
item
.
dueAmount
}}
</span>
</p>
</p>
<p>
<p>
<span>
待付金额
</span>
<span>
待付金额
</span>
<span>
¥0.00
</span>
<span>
{{
item
.
obligation
}}
</span>
</p>
</p>
</div>
</div>
<div
class=
"right-item"
>
<div
class=
"right-item"
>
...
@@ -50,14 +50,16 @@ import Pay from '../components/Pay.vue'
...
@@ -50,14 +50,16 @@ import Pay from '../components/Pay.vue'
import
{
Icon
,
Dialog
}
from
'vant'
import
{
Icon
,
Dialog
}
from
'vant'
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
import
api
from
"../api"
;
const
showDialog
=
ref
(
false
);
const
showDialog
=
ref
(
false
);
cons
t
currencyObj
=
$ref
({
le
t
currencyObj
=
$ref
({
financingCurrency
:
'200,000.00'
,
//
financingCurrency: '200,000.00',
headerCurrency
:
'5,000.00'
,
//
headerCurrency: '5,000.00',
fristCurrency
:
'10,000.00'
,
//
fristCurrency: '10,000.00',
times
:
'12'
//
times: '12'
})
})
let
cashflow
=
[]
const
payInfo
=
ref
({});
const
payInfo
=
ref
({});
let
showModal
=
ref
(
false
);
let
showModal
=
ref
(
false
);
...
@@ -83,6 +85,23 @@ const router = useRouter();
...
@@ -83,6 +85,23 @@ const router = useRouter();
const
goDamagesDetail
=
()
=>
{
const
goDamagesDetail
=
()
=>
{
router
.
push
({
name
:
'makeRepayment-views-liquidatedDamagesDetails'
})
router
.
push
({
name
:
'makeRepayment-views-liquidatedDamagesDetails'
})
}
}
const
getRepayPlanInfo
=
async
()
=>
{
const
result
=
await
api
.
getRepayPlanDetail
({
"contractId"
:
"777"
})
if
(
result
.
message
===
'请求成功'
){
const
rows
=
result
.
rows
[
0
];
currencyObj
=
{
financingCurrency
:
rows
.
financeAmount
,
headerCurrency
:
rows
.
firstGold
,
fristCurrency
:
rows
.
firstRentGold
,
times
:
rows
.
cashflow
.
length
}
rows
.
cashflow
=
rows
.
cashflow
.
map
(
item
=>
{
item
.
calcDate
=
item
.
calcDate
?.
split
(
" "
)[
0
];
return
item
})
cashflow
=
rows
.
cashflow
console
.
log
(
cashflow
);
}
}
getRepayPlanInfo
()
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
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