Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
2ca0fa36
Commit
2ca0fa36
authored
Oct 21, 2021
by
xhx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://gitlab.33.cn/CassiniatSaturn/fns_backend
into sub
parents
183cf57f
8b04f323
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
107 additions
and
54 deletions
+107
-54
productTable.vue
src/components/productManage/productTable.vue
+6
-6
productColumn.ts
src/const/columns/productColumn.ts
+5
-4
index.ts
src/service/AddressService/index.ts
+41
-8
index.ts
src/service/LoanProductService/index.ts
+12
-8
type.ts
src/service/LoanProductService/type.ts
+2
-0
type.ts
src/store/LoanProductManagement/type.ts
+2
-0
index.ts
src/utils/StaffUtils/index.ts
+8
-6
publish.vue
src/views/Root/Product/Loan/publish.vue
+31
-22
No files found.
src/components/productManage/productTable.vue
View file @
2ca0fa36
...
...
@@ -18,14 +18,14 @@
<
template
#
loan_type=
"text"
>
{{
text
|
filterLoanType
}}
</
template
>
<span
slot=
"date"
slot-scope=
"text"
>
<
!-- <
span slot="date" slot-scope="text">
{{ text.min_date }}-{{ text.max_date }}
</span>
<span
slot=
"rate"
slot-scope=
"text"
>
{{ text.rate
_lower }}-{{ text.rate_upper
}}
</span>
</span>
-->
<
!-- <
span slot="rate" slot-scope="text">
{{ text.rate }}
</span>
-->
<span
slot=
"amount"
slot-scope=
"text"
>
{{ text.min_amount }}
-
{{ text.max_amount }}
{{ text.min_amount }}
~
{{ text.max_amount }}
</span>
<
template
#
guarantee_type=
"text"
>
{{
text
|
filterGuaranteeType
}}
...
...
src/const/columns/productColumn.ts
View file @
2ca0fa36
...
...
@@ -22,14 +22,15 @@ export default [
scopedSlots
:
{
customRender
:
'loan_type'
},
},
{
title
:
'产品期限(
月
)'
,
title
:
'产品期限(
年
)'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'date'
},
dataIndex
:
'date'
,
// scopedSlots: { customRender: 'date' },
},
{
title
:
'参考利率(%)'
,
title
:
'
最低
参考利率(%)'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'rate'
}
,
dataIndex
:
'rate'
,
},
{
title
:
'产品额度(万元)'
,
...
...
src/service/AddressService/index.ts
View file @
2ca0fa36
...
...
@@ -16,9 +16,37 @@ export default class AddressService {
this
.
max_len_gps
=
10
}
getGpses
(
data
:
{
addrs
:
string
[]
}):
Promise
<
string
[]
>
{
// getGpses(data: { addrs: string[] }): Promise<string[]> {
// return new Promise((resolve, reject) => {
// const resultList = [] as string[]
// if (data.addrs.length) {
// for (
// let i = 0;
// i < Math.ceil(data.addrs.length / this.max_len_gps);
// ++i
// ) {
// const reqList = data.addrs.slice(
// i * this.max_len_gps,
// i * this.max_len_gps + this.max_len_gps,
// )
// this.__getGpses(reqList).then((ret) => {
// if (ret.code === 200) {
// resultList.push(...ret.data.gps)
// if (resultList.length === data.addrs.length) {
// resolve(resultList)
// }
// } else {
// reject('解析错误')
// }
// })
// }
// }
// })
// }
getGpses2
(
data
:
{
addrs
:
string
[]
}):
Promise
<
{
[
props
:
string
]:
string
}
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
resultList
=
[]
as
string
[]
const
theMap
=
{}
as
{
[
props
:
string
]:
string
}
if
(
data
.
addrs
.
length
)
{
for
(
let
i
=
0
;
...
...
@@ -31,9 +59,14 @@ export default class AddressService {
)
this
.
__getGpses
(
reqList
).
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
resultList
.
push
(...
ret
.
data
.
gps
)
if
(
resultList
.
length
===
data
.
addrs
.
length
)
{
resolve
(
resultList
)
const
locations
=
reqList
const
gpses
=
ret
.
data
.
gps
locations
.
map
((
location
,
index
)
=>
{
theMap
[
location
]
=
gpses
[
index
]
})
if
(
Object
.
keys
(
theMap
).
length
===
data
.
addrs
.
length
)
{
resolve
(
theMap
)
}
}
else
{
reject
(
'解析错误'
)
...
...
@@ -47,7 +80,7 @@ export default class AddressService {
if
(
addrs
.
length
>
10
)
{
throw
new
Error
(
'长度超过10'
)
}
else
{
return
baseAxios
<
{
gps
:
string
[]}
>
({
return
baseAxios
<
{
gps
:
string
[]
}
>
({
url
:
this
.
prefix
+
'/getGps'
,
method
:
'post'
,
data
:
{
...
...
@@ -71,7 +104,7 @@ export default class AddressService {
// })
// }
getOutlets
(
data
:
{
level
?:
number
;
id
?:
number
,
branch_name
?:
string
})
{
getOutlets
(
data
:
{
level
?:
number
;
id
?:
number
;
branch_name
?:
string
})
{
return
baseAxios
<
iOutLetDetail
[]
>
({
url
:
'/address/getOutlets'
,
method
:
'post'
,
...
...
@@ -119,7 +152,7 @@ export default class AddressService {
url
:
'/address/add'
,
method
:
'post'
,
data
:
{
outlets_req
:
[
data
]
outlets_req
:
[
data
]
,
},
})
}
...
...
src/service/LoanProductService/index.ts
View file @
2ca0fa36
...
...
@@ -21,13 +21,15 @@ export default class LoanProductService {
inst_name
:
string
loan_type
:
eProductType
max_amount
:
number
max_date
:
number
date
:
number
rate
:
number
// max_date: number
product_name
:
string
products
:
string
rate_lower
:
number
rate_upper
:
number
//
rate_lower: number
//
rate_upper: number
submit_cond
:
string
min_date
:
number
//
min_date: number
min_amount
:
number
}
)
{
...
...
@@ -47,15 +49,17 @@ export default class LoanProductService {
inst_name
:
string
loan_type
:
eProductType
max_amount
:
number
max_date
:
number
//
max_date: number
product_name
:
string
products
:
string
rate_lower
:
number
rate_upper
:
number
//
rate_lower: number
//
rate_upper: number
submit_cond
:
string
min_amount
:
number
min_date
:
number
//
min_date: number
uuid
:
string
date
:
number
rate
:
number
}
)
{
return
baseAxios
({
...
...
src/service/LoanProductService/type.ts
View file @
2ca0fa36
...
...
@@ -13,6 +13,8 @@
product_status
:
number
,
product_type
:
number
,
products
:
string
,
date
:
number
,
lower
:
number
,
rate_lower
:
string
,
rate_upper
:
string
,
submit_cond
:
string
,
...
...
src/store/LoanProductManagement/type.ts
View file @
2ca0fa36
...
...
@@ -11,6 +11,8 @@ export interface iListItem {
max_date
:
number
,
min_amount
:
number
,
min_date
:
number
,
date
:
number
,
rate
:
number
,
product_name
:
string
,
product_status
:
number
,
loan_type
:
number
,
...
...
src/utils/StaffUtils/index.ts
View file @
2ca0fa36
...
...
@@ -33,14 +33,14 @@ function getAddressList(dataList: any[]) {
}
async
function
getAddressLalonObj
(
locationList
:
string
[])
{
const
rets
=
await
AddressService
.
getInstance
().
getGpses
({
const
rets
=
await
AddressService
.
getInstance
().
getGpses
2
({
addrs
:
locationList
,
})
let
obj
=
{}
as
any
locationList
.
forEach
((
item
,
index
)
=>
{
obj
[
item
]
=
rets
[
index
]
})
return
obj
//
let obj = {} as any
//
locationList.forEach((item, index) => {
//
obj[item] = rets[index]
//
})
return
rets
}
function
formatPositionToNumber
(
str
:
string
)
{
...
...
@@ -181,9 +181,11 @@ export const handle建设银行excelFileChange = (e: Event) => {
const list = (parseJSYHSheet(
Sheets[SheetsKeys[0]],
) as unknown) as any[]
console.log(list, 'show list');
const locationList = getAddressList((list as unknown) as any)
console.log(JSON.stringify(locationList))
getAddressLalonObj(locationList).then((addressLalonObj) => {
console.log(addressLalonObj,' show addressLalonObj');
list.forEach((data) => {
data.la_lon = addressLalonObj[data.location]
})
...
...
src/views/Root/Product/Loan/publish.vue
View file @
2ca0fa36
...
...
@@ -3,7 +3,7 @@
<div
class=
"text-left"
>
<a-button
type=
"primary"
@
click=
"$router.go(-1)"
>
返回
</a-button>
</div>
<p
class=
"text-2xl font-bold mb-5"
>
新增产品
</p>
<p
class=
"text-2xl font-bold mb-5"
>
{{
title
}}
</p>
<div
class=
"text-left"
>
<a-form-model
:model=
"form"
...
...
@@ -28,8 +28,8 @@
</a-form-model-item>
<a-form-model-item
label=
"贷款期限(年)"
required
>
<a-select
:value=
"form.
period
"
@
change=
"(v)=>form.
period
= v"
:value=
"form.
date
"
@
change=
"(v)=>form.
date
= v"
style=
"width: 20%"
>
<a-select-option
value=
"1"
>
1
</a-select-option>
...
...
@@ -56,8 +56,8 @@
</a-form-model-item>
<a-form-model-item
label=
"参考利率(%)"
required
>
<a-input-number
:value=
"form.
interstMin
"
@
change=
"(v) => (form.
interstMin
= Number.parseFloat(v).toFixed(4))"
:value=
"form.
rate
"
@
change=
"(v) => (form.
rate
= Number.parseFloat(v).toFixed(4))"
placeholder=
"最多可输小数点后四位"
:step=
"0.0001"
:precision=
"4"
...
...
@@ -175,13 +175,16 @@ export default Vue.extend({
},
mounted
()
{
if
(
this
.
$route
.
query
.
record
)
{
this
.
title
=
"编辑产品"
const
record
:
iListItem
=
JSON
.
parse
(
this
.
$route
.
query
.
record
as
string
);
this
.
form
.
name
=
record
.
product_name
;
this
.
form
.
orgnization
=
record
.
inst_name
;
this
.
form
.
startTime
=
record
.
min_date
;
this
.
form
.
endTime
=
record
.
max_date
;
this
.
form
.
interstMin
=
record
.
rate_lower
;
this
.
form
.
interstMax
=
record
.
rate_upper
;
// this.form.startTime = record.min_date;
// this.form.endTime = record.max_date;
// this.form.interstMin = record.rate_lower;
// this.form.interstMax = record.rate_upper;
this
.
form
.
date
=
record
.
date
,
this
.
form
.
rate
=
record
.
rate
this
.
form
.
limitMin
=
record
.
min_amount
;
this
.
form
.
limitMax
=
record
.
max_amount
;
this
.
form
.
guarantee
=
record
.
guarantee_type
;
...
...
@@ -220,14 +223,16 @@ export default Vue.extend({
},
data
()
{
return
{
title
:
"新增产品"
,
form
:
{
name
:
""
,
orgnization
:
""
,
startTime
:
0
,
endTime
:
1
,
period
:
1
,
interstMax
:
0.01
,
interstMin
:
0
,
// startTime: 0,
// endTime: 1,
date
:
1
,
rate
:
0
,
// interstMax: 0.01,
// interstMin: 0,
limitMax
:
1
,
limitMin
:
0
,
guarantee
:
eGuaranteeType
.
credit
,
...
...
@@ -316,15 +321,17 @@ export default Vue.extend({
guarantee_type
:
this
.
form
.
guarantee
as
eGuaranteeType
,
inst_name
:
this
.
form
.
orgnization
,
max_amount
:
this
.
form
.
limitMax
,
max_date
:
this
.
form
.
endTime
,
//
max_date: this.form.endTime,
product_name
:
this
.
form
.
name
,
products
:
this
.
form
.
introduction
,
loan_type
:
this
.
form
.
type
,
rate_lower
:
+
this
.
form
.
interstMin
,
rate_upper
:
+
this
.
form
.
interstMax
,
date
:
+
this
.
form
.
date
,
rate
:
+
this
.
form
.
rate
,
// rate_lower: +this.form.interstMin,
// rate_upper: +this.form.interstMax,
submit_cond
:
this
.
form
.
submissionCon
,
min_amount
:
this
.
form
.
limitMin
,
min_date
:
this
.
form
.
startTime
,
//
min_date: this.form.startTime,
uuid
:
this
.
uuid
,
})
.
then
((
ret
)
=>
{
...
...
@@ -345,14 +352,16 @@ export default Vue.extend({
guarantee_type
:
this
.
form
.
guarantee
as
eGuaranteeType
,
inst_name
:
this
.
form
.
orgnization
,
max_amount
:
this
.
form
.
limitMax
,
max_date
:
this
.
form
.
endTime
,
//
max_date: this.form.endTime,
min_amount
:
this
.
form
.
limitMin
,
min_date
:
this
.
form
.
startTime
,
//
min_date: this.form.startTime,
loan_type
:
this
.
form
.
type
as
eProductType
,
product_name
:
this
.
form
.
name
,
products
:
this
.
form
.
introduction
,
rate_lower
:
+
this
.
form
.
interstMin
,
rate_upper
:
+
this
.
form
.
interstMax
,
date
:
+
this
.
form
.
date
,
rate
:
+
this
.
form
.
rate
,
// rate_lower: +this.form.interstMin,
// rate_upper: +this.form.interstMax,
submit_cond
:
this
.
form
.
submissionCon
,
})
.
then
((
ret
)
=>
{
...
...
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