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
6da225d1
Commit
6da225d1
authored
Dec 29, 2022
by
WangRui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feature]还款计划页面接口联调
parent
223aeb36
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
23 deletions
+60
-23
Pay.vue
src/modules/makeRepayment/components/Pay.vue
+2
-0
plan.vue
src/modules/makeRepayment/views/plan.vue
+13
-6
index.js
src/modules/repayPlan/api/index.js
+4
-0
index.js
src/modules/repayPlan/store/index.js
+9
-0
index.vue
src/modules/repayPlan/views/index.vue
+28
-14
pay.js
src/utils/pay.js
+4
-3
No files found.
src/modules/makeRepayment/components/Pay.vue
View file @
6da225d1
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
<
script
setup
>
<
script
setup
>
import
{
Popup
,
NavBar
,
Field
,
Cell
,
RadioGroup
,
Radio
,
CellGroup
,
Button
,
NumberKeyboard
,
Dialog
,
PasswordInput
}
from
'vant'
;
import
{
Popup
,
NavBar
,
Field
,
Cell
,
RadioGroup
,
Radio
,
CellGroup
,
Button
,
NumberKeyboard
,
Dialog
,
PasswordInput
}
from
'vant'
;
import
{
ref
,
reactive
}
from
"vue"
;
import
{
ref
,
reactive
}
from
"vue"
;
import
{
pay
}
from
'@/utils/pay'
;
const
props
=
defineProps
({
const
props
=
defineProps
({
visible
:
{
type
:
Boolean
},
// 是否打开弹框
visible
:
{
type
:
Boolean
},
// 是否打开弹框
...
@@ -164,6 +165,7 @@ const payMoney = () => {
...
@@ -164,6 +165,7 @@ const payMoney = () => {
const
handleFinishAmount
=
()
=>
{
const
handleFinishAmount
=
()
=>
{
showDialog
.
value
=
false
;
showDialog
.
value
=
false
;
pay
();
}
}
...
...
src/modules/makeRepayment/views/plan.vue
View file @
6da225d1
...
@@ -54,12 +54,19 @@ import api from "../api";
...
@@ -54,12 +54,19 @@ import api from "../api";
const
showDialog
=
ref
(
false
);
const
showDialog
=
ref
(
false
);
let
currencyObj
=
$ref
({
let
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
=
[]
let
cashflow
=
[
{
chargeDueDate
:
'2022-12-28'
,
dueAmount
:
'2000'
,
obligation
:
'3200'
,
}
]
const
payInfo
=
ref
({});
const
payInfo
=
ref
({});
let
showModal
=
ref
(
false
);
let
showModal
=
ref
(
false
);
...
@@ -101,7 +108,7 @@ const getRepayPlanInfo = async () => {
...
@@ -101,7 +108,7 @@ const getRepayPlanInfo = async () => {
console
.
log
(
cashflow
);
console
.
log
(
cashflow
);
}
}
}
}
getRepayPlanInfo
()
//
getRepayPlanInfo()
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
src/modules/repayPlan/api/index.js
View file @
6da225d1
...
@@ -3,6 +3,10 @@ import { get, put, post, File, deleteReq } from '@/utils/http'
...
@@ -3,6 +3,10 @@ import { get, put, post, File, deleteReq } from '@/utils/http'
const
baseURL
=
import
.
meta
.
env
.
DEV
?
'/api'
:
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
=
{
//列表查询
getRepayPlantList
(
data
=
{})
{
return
post
(
`
${
baseURL
}
/app/api/app/repayment/details`
,
data
)
},
//还款计划明细
//还款计划明细
getRepaymentDetails
(
data
=
{}){
getRepaymentDetails
(
data
=
{}){
return
post
(
`
${
baseURL
}
/app/api/app/project/repayment/details`
,
data
)
return
post
(
`
${
baseURL
}
/app/api/app/project/repayment/details`
,
data
)
...
...
src/modules/repayPlan/store/index.js
0 → 100644
View file @
6da225d1
import
{
ref
,
computed
}
from
'vue'
import
{
defineStore
}
from
'pinia'
export
const
useIntention
=
defineStore
(
'formStore'
,
()
=>
{
const
repayPlanData
=
ref
({})
return
{
repayPlanData
}
})
src/modules/repayPlan/views/index.vue
View file @
6da225d1
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<Notice
detail=
"只可对已关联的项目还款"
/>
<Notice
detail=
"只可对已关联的项目还款"
/>
<PullRefresh
v-model=
"refreshing"
@
refresh=
"
onRefresh
"
class=
"scroll"
>
<PullRefresh
v-model=
"refreshing"
@
refresh=
"
getList
"
class=
"scroll"
>
<List
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"loadApproval"
>
<List
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"loadApproval"
>
<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"
/>
...
@@ -27,25 +27,39 @@ import { useRouter } from "vue-router";
...
@@ -27,25 +27,39 @@ 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",
values
:
[[
"剩余应还金额"
,
"状态"
,
"融资金额"
],
[
"¥ 20,000.00"
,
"正常"
,
"¥ 20,000.00"
]]
//
values: [["剩余应还金额", "状态", "融资金额"], ["¥ 20,000.00", "正常", "¥ 20,000.00"]]
},
//
},
{
//
{
title
:
'202204-DB001-001'
,
//
title: '202204-DB001-001',
other_title
:
"2022-07-18"
,
//
other_title: "2022-07-18",
values
:
[[
"剩余应还金额"
,
"状态"
,
"融资金额"
],
[
"¥ 20,000.00"
,
"正常"
,
"¥ 20,000.00"
]]
//
values: [["剩余应还金额", "状态", "融资金额"], ["¥ 20,000.00", "正常", "¥ 20,000.00"]]
},
//
},
])
])
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/utils/pay.js
View file @
6da225d1
...
@@ -16,14 +16,15 @@ const pay = (payType = 'alipay') => {
...
@@ -16,14 +16,15 @@ const pay = (payType = 'alipay') => {
}
}
const
appId
=
'10037ca75e6125aa015e9e12a89b001b'
;
const
appId
=
'10037ca75e6125aa015e9e12a89b001b'
;
const
AppKey
=
'f7a74b6c02ae4e1e94aaba311c04acf2'
;
const
timestamp
=
getTimestamp
();
const
timestamp
=
getTimestamp
();
const
nonce
=
randomString
();
const
nonce
=
randomString
();
const
content
=
{
const
content
=
{
"requestTimestamp"
:
getTimestamp
(
true
),
// 报文请求时间
"requestTimestamp"
:
getTimestamp
(
true
),
// 报文请求时间
"mid"
:
"898201612345678"
,
// 商户号
"mid"
:
"898201612345678"
,
// 商户号
"tid"
:
"88880001"
,
// 终端号
"tid"
:
"88880001"
,
// 终端号
"instMid"
:
"
YUEDANDEFAULT"
,
// 业务类型
"instMid"
:
"
H5DEFAULT"
,
// 业务类型YUEDANDEFAULT
"totalAmount"
:
3
,
// 支付总金额
"totalAmount"
:
0.1
,
// 支付总金额
"notifyUrl"
:
"https://qrtest2.chinaums.com/netpayportal/test/notifyUrl.do"
,
// 支付结果通知地址
"notifyUrl"
:
"https://qrtest2.chinaums.com/netpayportal/test/notifyUrl.do"
,
// 支付结果通知地址
"returnUrl"
:
"https://qrtest2.chinaums.com/netpayportal/test/returnUrl.do"
,
// 支付结果回跳商户页面
"returnUrl"
:
"https://qrtest2.chinaums.com/netpayportal/test/returnUrl.do"
,
// 支付结果回跳商户页面
"merOrderId"
:
randomString
(
true
)
// 商户订单号 商户自行生成 6..32
"merOrderId"
:
randomString
(
true
)
// 商户订单号 商户自行生成 6..32
...
@@ -43,7 +44,7 @@ function randomString(OnlyNumber = false, e) {
...
@@ -43,7 +44,7 @@ function randomString(OnlyNumber = false, e) {
a
=
t
.
length
,
a
=
t
.
length
,
n
=
""
;
n
=
""
;
if
(
OnlyNumber
)
t
=
t2
;
if
(
OnlyNumber
)
t
=
t2
;
for
(
i
=
0
;
i
<
e
;
i
++
)
n
+=
t
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
a
));
for
(
let
i
=
0
;
i
<
e
;
i
++
)
n
+=
t
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
a
));
return
n
return
n
}
}
...
...
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