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
6cba9f87
Commit
6cba9f87
authored
Jan 04, 2023
by
WangRui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feature]自助服务页面接口联调
parent
91132dd3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
177 additions
and
39 deletions
+177
-39
index.vue
src/modules/makeRepayment/views/index.vue
+27
-1
plan.vue
src/modules/makeRepayment/views/plan.vue
+16
-2
index.js
src/modules/selfService/api/index.js
+18
-7
authorize.vue
src/modules/selfService/views/authorize.vue
+78
-21
index.vue
src/modules/selfService/views/index.vue
+38
-8
No files found.
src/modules/makeRepayment/views/index.vue
View file @
6cba9f87
...
@@ -68,8 +68,34 @@ const loadApproval = () => {
...
@@ -68,8 +68,34 @@ const loadApproval = () => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
jump
=
()
=>
{
const
jump
=
()
=>
{
router
.
push
({
name
:
'makeRepayment-views-plan'
})
router
.
push
({
name
:
'makeRepayment-views-plan'
,
params
:
{
name
:
'hh'
}})
}
}
// export default ({
// setup(props, ctx) {
// //router是全局路由对象,route= userRoute()是当前路由对象
// let router = useRouter();
// const jump=()=>{
// router.push({
// //传递参数使用params的话,只能使用name指定(在route.js里面声明name)
// name:'makeRepayment-views-plan',
// params:{
// num:1
// }
// /* 使用query的话,指定path或者name都行
// path:'/home',
// query:{
// num:1
// } */
// })
// }
// return{
// jump,
// }
// }
// })
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
...
...
src/modules/makeRepayment/views/plan.vue
View file @
6cba9f87
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</p>
</p>
</div>
</div>
<div
class=
"right-item"
>
<div
class=
"right-item"
>
<span></span>
<span>
啊哈哈哈:
{{
route
.
params
.
name
}}
</span>
<span
class=
"flag-button payment"
@
click=
"handleClick"
>
<span
class=
"flag-button payment"
@
click=
"handleClick"
>
支付
支付
</span>
</span>
...
@@ -49,7 +49,7 @@ import RepayPlan from '@/components/RepayPlan.vue'
...
@@ -49,7 +49,7 @@ import RepayPlan from '@/components/RepayPlan.vue'
import
Pay
from
'../components/Pay.vue'
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
{
useRoute
,
useRouter
}
from
"vue-router"
;
import
api
from
"../api"
;
import
api
from
"../api"
;
const
showDialog
=
ref
(
false
);
const
showDialog
=
ref
(
false
);
...
@@ -69,6 +69,7 @@ let cashflow = [
...
@@ -69,6 +69,7 @@ let cashflow = [
]
]
const
payInfo
=
ref
({});
const
payInfo
=
ref
({});
let
showModal
=
ref
(
false
);
let
showModal
=
ref
(
false
);
const
route
=
useRoute
()
const
handleClick
=
()
=>
{
const
handleClick
=
()
=>
{
console
.
log
(
'hahhha'
)
console
.
log
(
'hahhha'
)
...
@@ -109,6 +110,19 @@ const getRepayPlanInfo = async () => {
...
@@ -109,6 +110,19 @@ const getRepayPlanInfo = async () => {
}
}
}
}
// getRepayPlanInfo()
// getRepayPlanInfo()
// export default ({
// setup(props, ctx) {
// //router是全局路由对象,route= userRoute()是当前路由对象
// let route = useRoute();
// const num = route.params.num;
// console.log(num);
// return {
// num,
// };
// },
// });
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
src/modules/selfService/api/index.js
View file @
6cba9f87
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(
getSelfServiceList
(
data
=
{})
{
// `${baseURL}/hlct/v1/0/contracts/toMake`,
return
post
(
`
${
baseURL
}
/app/api/app/agency/auth/query`
,
data
)
// {...data}
},
// )
//查询所有区域
// },
getAreaList
(
data
=
{}){
return
post
(
`
${
baseURL
}
/app/api/app/agency/area/query`
,
data
)
},
//查询代理店信息
getAgencyList
(
data
=
{}){
return
post
(
`
${
baseURL
}
/app/api/app/agency/query`
,
data
)
},
//确认授权代理店单据
confrimAgent
(
data
=
{}){
return
post
(
`
${
baseURL
}
/app/api/app/agency/auth/confirm`
,
data
)
}
};
};
export
default
api
;
export
default
api
;
src/modules/selfService/views/authorize.vue
View file @
6cba9f87
...
@@ -6,23 +6,29 @@
...
@@ -6,23 +6,29 @@
<section
class=
"form"
>
<section
class=
"form"
>
<CellGroup
inset
>
<CellGroup
inset
>
<Field
v-model=
"form.
result3
"
readonly
label=
"授权对象编码"
input-align=
"right"
/>
<Field
v-model=
"form.
code
"
readonly
label=
"授权对象编码"
input-align=
"right"
/>
<Field
required
v-model=
"form.
result
"
is-link
readonly
label=
"所属地区"
@
click=
"showArea = true"
<Field
required
v-model=
"form.
areaName
"
is-link
readonly
label=
"所属地区"
@
click=
"showArea = true"
input-align=
"right"
/>
input-align=
"right"
/>
<Field
required
v-model=
"form.
result2
"
is-link
readonly
label=
"代理店名称"
@
click=
"showPicker = true"
<Field
required
v-model=
"form.
agencyName
"
is-link
readonly
label=
"代理店名称"
@
click=
"showPicker = true"
input-align=
"right"
/>
input-align=
"right"
/>
</CellGroup>
</CellGroup>
</section>
</section>
<section
class=
"sub"
>
<section
class=
"sub"
>
<Button
type=
"primary"
block
>
确认
</Button>
<Button
type=
"primary"
block
@
click=
"confirm"
>
确认
</Button>
</section>
</section>
<Popup
v-model:show=
"showArea"
position=
"bottom"
>
<Popup
v-model:show=
"showArea"
position=
"bottom"
>
<Picker
:columns=
"columns"
@
confirm=
"areaConfirm"
@
cancel=
"showArea = false"
/>
<Picker
:columns=
"areaColumns"
:columns-field-names=
"
{text:'value', value: 'code'}" @confirm="areaConfirm" @cancel="showArea = false" >
</Picker>
</Popup>
</Popup>
<Popup
v-model:show=
"showPicker"
position=
"bottom"
>
<Popup
v-model:show=
"showPicker"
position=
"bottom"
>
<Picker
:columns=
"columns"
@
confirm=
"onConfirm"
@
cancel=
"showPicker = false"
/>
<Picker
:columns=
"agencyColumns"
:columns-field-names=
"
{text:'agencyName', value: 'agencyId'}" @confirm="agencyConfrim" @cancel="showPicker = false" >
<template
#
columns-top
>
<!--
<Icon
name=
"search"
/>
-->
<Search
v-model=
"agencyValue"
placeholder=
"请输入搜索关键词"
@
click-left-icon=
"searchAgency"
/>
</
template
>
</Picker>
</Popup>
</Popup>
</div>
</div>
</template>
</template>
...
@@ -30,30 +36,81 @@
...
@@ -30,30 +36,81 @@
<
script
setup
>
<
script
setup
>
import
{
goBack
}
from
"@/utils/globalFun"
import
{
goBack
}
from
"@/utils/globalFun"
import
Notice
from
"@/components/Notice.vue"
import
Notice
from
"@/components/Notice.vue"
import
{
NavBar
,
Field
,
CellGroup
,
Popup
,
Picker
,
Button
}
from
"vant"
;
import
{
NavBar
,
Field
,
CellGroup
,
Popup
,
Picker
,
Button
,
Icon
,
Search
}
from
"vant"
;
import
api
from
'../api'
cons
t
showArea
=
$ref
(
false
)
le
t
showArea
=
$ref
(
false
)
const
form
=
$ref
({
const
form
=
$ref
({
result
:
''
,
code
:
''
,
result2
:
''
,
areaName
:
''
,
result3
:
'333'
areaCode
:
''
,
agencyName
:
''
,
agencyCode
:
''
,
agencyId
:
''
,
})
})
let
showPicker
=
$ref
(
false
);
const
submit
=
()
=>
{
let
areaColumns
=
$ref
([]);
let
agencyColumns
=
$ref
([])
;
const
agencyValue
=
$ref
(
null
);
const
areaPagination
=
{
page
:
1
,
size
:
1000
,
}
const
agencyPagination
=
{
page
:
1
,
size
:
1000
,
}
}
const
areaConfirm
=
(
value
)
=>
{
const
areaConfirm
=
(
selectedValues
)
=>
{
form
.
result
=
value
;
form
.
areaName
=
selectedValues
.
value
;
showArea
=
false
form
.
areaCode
=
selectedValues
.
code
;
// form.result = value;
// form
showArea
=
false
;
getAgencyList
();
}
}
const
showPicker
=
$ref
(
false
);
const
agencyConfrim
=
(
selectedValues
)
=>
{
const
columns
=
[
'华北'
,
'东北'
,
'华东'
,
'西南'
,
'西北'
,
"华南"
,
"国外"
];
console
.
log
(
selectedValues
);
const
onConfirm
=
(
value
)
=>
{
form
.
agencyName
=
selectedValues
.
agencyName
;
form
.
result2
=
value
;
form
.
agencyId
=
selectedValues
.
agencyId
;
form
.
code
=
selectedValues
.
agencyCode
;
showPicker
=
false
;
showPicker
=
false
;
}
}
//代理店模糊查询
const
searchAgency
=
()
=>
{
agencyColumns
=
[];
getAgencyList
({
agencyName
:
agencyValue
})
}
const
confirm
=
async
()
=>
{
const
param
=
{
contractId
:
''
,
agencyId
:
form
.
agencyId
,
receivets
:
new
Date
(),
}
const
res
=
await
api
.
confrimAgent
(
param
);
console
.
log
(
'hha'
,
res
);
}
const
getAreaList
=
async
()
=>
{
const
res
=
await
api
.
getAreaList
({
receivets
:
+
new
Date
()
+
''
,
...
areaPagination
});
areaColumns
=
res
.
rows
;
}
getAreaList
();
const
getAgencyList
=
async
(
value
=
{})
=>
{
const
params
=
{
receivets
:
new
Date
(),
agencyName
:
value
.
agencyName
,
areaCode
:
form
.
areaCode
,
...
agencyPagination
,
}
const
res
=
await
api
.
getAgencyList
(
params
);
agencyColumns
=
res
.
rows
;
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
@@ -61,4 +118,4 @@ const onConfirm = (value) => {
...
@@ -61,4 +118,4 @@ const onConfirm = (value) => {
width: 70%;
width: 70%;
margin: 50px auto 5px;
margin: 50px auto 5px;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/modules/selfService/views/index.vue
View file @
6cba9f87
...
@@ -22,22 +22,52 @@ import Plus from '@/components/Plus.vue'
...
@@ -22,22 +22,52 @@ import Plus from '@/components/Plus.vue'
import
api
from
"../api"
;
import
api
from
"../api"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
cons
t
listValue
=
$ref
([
le
t
listValue
=
$ref
([
{
//
{
title
:
'2022-07-18'
,
//
title: '2022-07-18',
values
:
[[
"授权对象编码"
,
"授权对象名称"
,
"所属区域"
],
[
"DB001"
,
"新疆田园技术有限公司"
,
"西北"
]]
//
values: [["授权对象编码", "授权对象名称", "所属区域"], ["DB001", "新疆田园技术有限公司", "西北"]]
}
//
}
])
])
let
pagination
=
{
page
:
1
,
pageSize
:
10
}
let
refreshing
=
$ref
(
true
);
let
finished
=
$ref
(
true
);
const
queryList
=
async
()
=>
{
refreshing
=
true
let
res
=
await
api
.
getSelfServiceList
({
receivets
:
+
new
Date
()
+
''
,
...
pagination
})
if
(
res
.
success
)
{
pagination
.
page
++
if
(
res
.
total
==
0
)
finished
=
true
res
.
rows
.
forEach
(
item
=>
{
listValue
.
push
({
title
:
item
.
authDate
+
''
||
''
,
values
:
[[
"授权对象编码"
,
"授权对象名称"
,
"所属区域"
],
[
item
.
agencyCode
,
item
.
agencyName
,
item
.
areaName
]],
...
item
})
})
}
else
{
finished
=
true
}
refreshing
=
false
}
queryList
()
const
refreshing
=
$ref
(
true
);
const
finished
=
$ref
(
true
);
const
onRefresh
=
()
=>
{
const
onRefresh
=
()
=>
{
// 下拉重置参数,重新加载
// 下拉重置参数,重新加载
listValue
=
[];
pagination
.
page
=
1
;
pagination
.
pageSize
=
10
;
finished
=
false
queryList
()
};
};
const
loadApproval
=
()
=>
{
const
loadApproval
=
()
=>
{
pager
.
page
++
;
queryList
()
}
}
const
router
=
useRouter
();
const
router
=
useRouter
();
...
...
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