Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-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
xugong
hls-xcmg-vue-app
Commits
cdcaa73e
Commit
cdcaa73e
authored
Oct 29, 2019
by
linxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改过滤器
parent
f89de467
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
201 deletions
+97
-201
contract-details.vue
src/pages/distributorSign/contract-details.vue
+8
-30
contract-list.vue
src/pages/distributorSign/contract-list.vue
+1
-22
financ-details.vue
src/pages/distributorSign/financ-details.vue
+5
-27
refund.vue
src/pages/intoApproval/intoApproval/refund.vue
+5
-28
rentInfo.vue
src/pages/intoApproval/intoApproval/rentInfo.vue
+78
-94
No files found.
src/pages/distributorSign/contract-details.vue
View file @
cdcaa73e
...
...
@@ -80,15 +80,15 @@
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
设备总价
</div>
<span
slot=
"content"
>
{{
info
.
equip_price
*
info
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
info
.
equip_price
*
info
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
融资金额
</div>
<span
slot=
"content"
>
{{
info
.
finance_amount
*
info
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
info
.
finance_amount
*
info
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
首付款
</div>
<span
slot=
"content"
>
{{
info
.
down_payment
*
info
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
info
.
down_payment
*
info
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
保证金比例
</div>
...
...
@@ -96,7 +96,7 @@
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
保证金
</div>
<span
slot=
"content"
>
{{
info
.
deposit
*
info
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
info
.
deposit
*
info
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
手续费比例
</div>
...
...
@@ -104,19 +104,19 @@
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
手续费
</div>
<span
slot=
"content"
>
{{
info
.
lease_charge
*
info
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
parseFloat
(
info
.
lease_charge
*
info
.
product_num
).
toFixed
(
2
)
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
保险押金
</div>
<span
slot=
"content"
>
{{
info
.
insurance_fee
*
info
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
info
.
insurance_fee
*
info
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
GPS费用
</div>
<span
slot=
"content"
>
{{
info
.
gps_fee
*
info
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
info
.
gps_fee
*
info
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
首次付款合计
</div>
<span
slot=
"content"
>
{{
info
.
first_pay
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
parseFloat
(
info
.
first_pay
).
toFixed
(
2
)
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
预计付款日
</div>
...
...
@@ -244,28 +244,6 @@ export default {
Personal
,
LegalPerson
,
},
filters
:
{
NumFormat
:
function
(
valueOrig
)
{
var
value
=
parseFloat
(
valueOrig
).
toFixed
(
2
)
if
(
!
value
)
return
'0.00'
var
intPart
=
Number
(
value
)
|
0
// 获取整数部分
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
floatPart
=
'.00'
// 预定义小数部分
var
value2Array
=
value
.
split
(
'.'
)
// =2表示数据有小数位
if
(
value2Array
.
length
===
2
)
{
floatPart
=
value2Array
[
1
].
toString
()
// 拿到小数部分
if
(
floatPart
.
length
===
1
)
{
// 补0,实际上用不着
return
intPartFormat
+
'.'
+
floatPart
+
'0'
}
else
{
return
intPartFormat
+
'.'
+
floatPart
}
}
else
{
return
intPartFormat
+
floatPart
}
},
},
data
()
{
return
{
hasButtomStorage
:
window
.
localStorage
.
getItem
(
'hasButtom'
),
...
...
src/pages/distributorSign/contract-list.vue
View file @
cdcaa73e
...
...
@@ -58,7 +58,7 @@
</div>
<div
class=
"option"
>
<p
class=
"name"
>
合同金额
</p>
<p
class=
"normal money"
>
{{
item
.
total_price
|
NumFormat
}}
</p>
<p
class=
"normal money"
>
{{
parseFloat
(
item
.
total_price
).
toFixed
(
2
)
|
currency
}}
</p>
<img
src=
"@/assets/distributorSign/goDetails.png"
alt=
""
>
</div>
<div
class=
"option"
>
...
...
@@ -76,27 +76,6 @@
import
Tab
from
'@/pages/distributorSign/tab'
export
default
{
name
:
'ContractList'
,
filters
:
{
NumFormat
:
function
(
value
)
{
if
(
!
value
)
return
'0.00'
var
intPart
=
Number
(
value
)
|
0
// 获取整数部分
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
floatPart
=
'.00'
// 预定义小数部分
var
value2Array
=
value
.
split
(
'.'
)
// =2表示数据有小数位
if
(
value2Array
.
length
===
2
)
{
floatPart
=
value2Array
[
1
].
toString
()
// 拿到小数部分
if
(
floatPart
.
length
===
1
)
{
// 补0,实际上用不着
return
intPartFormat
+
'.'
+
floatPart
+
'0'
}
else
{
return
intPartFormat
+
'.'
+
floatPart
}
}
else
{
return
intPartFormat
+
floatPart
}
},
},
components
:
{
Tab
,
},
...
...
src/pages/distributorSign/financ-details.vue
View file @
cdcaa73e
...
...
@@ -16,22 +16,22 @@
</h-header>
<div
class=
"top-content"
>
<span
class=
"top-tittle"
>
总租金
</span>
<span
class=
"num"
>
{{
info
.
total_rental_sum
|
NumFormat
}}
</span>
<span
class=
"num"
>
{{
info
.
total_rental_sum
|
currency
}}
</span>
<div
class=
"top-detail"
>
<div
class=
"left"
>
<span
class=
"line"
>
保证金
</span>
<span>
¥
{{
info
.
deposit
*
product_num
|
NumFormat
}}
</span>
<span>
¥
{{
info
.
deposit
*
product_num
|
currency
}}
</span>
</div>
<div
class=
"right"
>
<span
class=
"line"
>
首付款
</span>
<span>
¥
{{
info
.
down_payment
*
product_num
|
NumFormat
}}
</span>
<span>
¥
{{
info
.
down_payment
*
product_num
|
currency
}}
</span>
</div>
</div>
<div
class=
"clear"
/>
<div
class=
"top-detail"
>
<div
class=
"left"
>
<span
class=
"line"
>
手续费
</span>
<span>
¥
{{
info
.
lease_charge
*
product_num
|
NumFormat
}}
</span>
<span>
¥
{{
parseFloat
(
info
.
lease_charge
*
product_num
).
toFixed
(
2
)
|
currency
}}
</span>
</div>
<div
class=
"right"
>
<span
class=
"line"
>
合同期数
</span>
...
...
@@ -52,7 +52,7 @@
<td>
{{
index
+
1
}}
</td>
<td>
{{
dateConverse
(
item
.
due_date
)
}}
</td>
<td>
租金
</td>
<td>
{{
item
.
rental
*
product_num
|
NumFormat
}}
</td>
<td>
{{
item
.
rental
*
product_num
|
currency
}}
</td>
</tr>
</table>
</h-content>
...
...
@@ -61,28 +61,6 @@
<
script
>
export
default
{
name
:
'FinancDetails'
,
filters
:
{
NumFormat
:
function
(
valueOrig
)
{
var
value
=
parseFloat
(
valueOrig
).
toFixed
(
2
)
if
(
!
value
)
return
'0.00'
var
intPart
=
Number
(
value
)
|
0
// 获取整数部分
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
floatPart
=
'.00'
// 预定义小数部分
var
value2Array
=
value
.
split
(
'.'
)
// =2表示数据有小数位
if
(
value2Array
.
length
===
2
)
{
floatPart
=
value2Array
[
1
].
toString
()
// 拿到小数部分
if
(
floatPart
.
length
===
1
)
{
// 补0,实际上用不着
return
intPartFormat
+
'.'
+
floatPart
+
'0'
}
else
{
return
intPartFormat
+
'.'
+
floatPart
}
}
else
{
return
intPartFormat
+
floatPart
}
},
},
data
()
{
return
{
confirm_status
:
this
.
$route
.
params
.
confirm_status
,
...
...
src/pages/intoApproval/intoApproval/refund.vue
View file @
cdcaa73e
...
...
@@ -17,22 +17,22 @@
<img
v-if=
"none"
class=
"noData"
src=
"@/assets/intoApproval/none.jpg"
>
<div
v-if=
"dataNone"
class=
"top-content"
>
<span
class=
"top-tittle"
>
总租金
</span>
<span
class=
"num"
>
{{
info
.
total_rental_sum
|
NumFormat
}}
</span>
<span
class=
"num"
>
{{
info
.
total_rental_sum
|
currency
}}
</span>
<div
class=
"top-detail"
>
<div
class=
"left"
>
<span
class=
"line"
>
保证金
</span>
<span>
¥
{{
info
.
deposit
*
product_num
|
NumFormat
}}
</span>
<span>
¥
{{
info
.
deposit
*
product_num
|
currency
}}
</span>
</div>
<div
class=
"right"
>
<span
class=
"line"
>
首付款
</span>
<span>
¥
{{
info
.
down_payment
*
product_num
|
NumFormat
}}
</span>
<span>
¥
{{
info
.
down_payment
*
product_num
|
currency
}}
</span>
</div>
</div>
<div
class=
"clear"
/>
<div
class=
"top-detail"
>
<div
class=
"left"
>
<span
class=
"line"
>
手续费
</span>
<span>
¥
{{
info
.
lease_charge
*
product_num
|
NumFormat
}}
</span>
<span>
¥
{{
parseFloat
(
info
.
lease_charge
*
product_num
).
toFixed
(
2
)
|
currency
}}
</span>
</div>
<div
class=
"right"
>
<span
class=
"line date-sum"
>
合同期数
</span>
...
...
@@ -59,7 +59,7 @@
<td>
{{
index
+
1
}}
</td>
<td>
{{
item
.
due_date
|
timeFormat
}}
</td>
<td>
租金
</td>
<td>
{{
item
.
rental
*
product_num
|
NumFormat
}}
</td>
<td>
{{
item
.
rental
*
product_num
|
currency
}}
</td>
</tr>
</table>
</h-content>
...
...
@@ -68,29 +68,6 @@
<
script
>
export
default
{
filters
:
{
NumFormat
:
function
(
valueOrig
)
{
var
value
=
parseFloat
(
valueOrig
).
toFixed
(
2
)
if
(
!
value
)
return
'0.00'
var
intPart
=
Number
(
value
)
|
0
// 获取整数部分
var
intPartFormat
=
intPart
.
toString
()
.
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
floatPart
=
'.00'
// 预定义小数部分
var
value2Array
=
value
.
split
(
'.'
)
// =2表示数据有小数位
if
(
value2Array
.
length
===
2
)
{
floatPart
=
value2Array
[
1
].
toString
()
// 拿到小数部分
if
(
floatPart
.
length
===
1
)
{
// 补0,实际上用不着
return
intPartFormat
+
'.'
+
floatPart
+
'0'
}
else
{
return
intPartFormat
+
'.'
+
floatPart
}
}
else
{
return
intPartFormat
+
floatPart
}
},
timeFormat
:
function
(
time
)
{
var
date
=
new
Date
(
time
)
var
y
=
date
.
getFullYear
()
...
...
src/pages/intoApproval/intoApproval/rentInfo.vue
View file @
cdcaa73e
...
...
@@ -14,15 +14,15 @@
</item>
<item>
<div
slot=
"name"
>
设备总价
</div>
<span
slot=
"content"
>
{{
rentInfo
.
equip_price
*
rentInfo
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
rentInfo
.
equip_price
*
rentInfo
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
融资金额
</div>
<span
slot=
"content"
>
{{
rentInfo
.
finance_amount
*
rentInfo
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
rentInfo
.
finance_amount
*
rentInfo
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
首付款
</div>
<span
slot=
"content"
>
{{
rentInfo
.
down_payment
*
rentInfo
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
rentInfo
.
down_payment
*
rentInfo
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
保证金比例
</div>
...
...
@@ -30,7 +30,7 @@
</item>
<item>
<div
slot=
"name"
>
保证金
</div>
<span
slot=
"content"
>
{{
rentInfo
.
deposit
*
rentInfo
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
rentInfo
.
deposit
*
rentInfo
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
手续费比例
</div>
...
...
@@ -38,19 +38,19 @@
</item>
<item>
<div
slot=
"name"
>
手续费
</div>
<span
slot=
"content"
>
{{
rentInfo
.
lease_charge
*
rentInfo
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
parseFloat
(
rentInfo
.
lease_charge
*
rentInfo
.
product_num
).
toFixed
(
2
)
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
保险押金
</div>
<span
slot=
"content"
>
{{
rentInfo
.
insurance_fee
*
rentInfo
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
rentInfo
.
insurance_fee
*
rentInfo
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
GPS费用
</div>
<span
slot=
"content"
>
{{
rentInfo
.
gps_fee
*
rentInfo
.
product_num
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
rentInfo
.
gps_fee
*
rentInfo
.
product_num
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
首次付款合计
</div>
<span
slot=
"content"
>
{{
rentInfo
.
first_pay
|
NumFormat
}}
</span>
<span
slot=
"content"
>
{{
parseFloat
(
rentInfo
.
first_pay
).
toFixed
(
2
)
|
currency
}}
</span>
</item>
<item>
<div
slot=
"name"
>
预计付款日
</div>
...
...
@@ -95,103 +95,87 @@
<span
class=
"info-word"
>
提示
</span>
</div>
<p
class=
"top-info"
>
绑定成功后,您即可使用APP中合同查询、还款查询等功能。
<span>
为了确保您的权益,请查看全部
</span></p>
<span>
为了确保您的权益,请查看全部
</span></p>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
filters
:
{
'NumFormat'
:
function
(
valueOrig
)
{
// if (!value) return '0.00'
var
value
=
parseFloat
(
valueOrig
).
toFixed
(
2
)
var
intPart
=
Number
(
value
)
|
0
// 获取整数部分
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
floatPart
=
'.00'
// 预定义小数部分
var
value2Array
=
value
.
split
(
'.'
)
// =2表示数据有小数位
if
(
value2Array
.
length
===
2
)
{
floatPart
=
value2Array
[
1
].
toString
()
// 拿到小数部分
if
(
floatPart
.
length
===
1
)
{
// 补0,实际上用不着
return
intPartFormat
+
'.'
+
floatPart
+
'0'
}
else
{
return
intPartFormat
+
'.'
+
floatPart
}
}
else
{
return
intPartFormat
+
floatPart
}
},
'timeFormat'
:
function
(
time
)
{
if
(
time
!==
''
)
{
var
date
=
new
Date
(
time
)
var
y
=
date
.
getFullYear
()
var
m
=
date
.
getMonth
()
+
1
var
d
=
date
.
getDate
()
return
`
${
y
}
-
${
m
}
-
${
d
}
`
}
},
},
props
:
{
confirm_status
:
{
type
:
String
,
default
:
''
,
},
},
data
()
{
return
{
rentInfo
:
{
finance_amount
:
''
,
lease_charge
:
''
,
annual_pay_times
:
''
,
deposit_ratio_n
:
' '
,
lease_charge_ratio_n
:
' '
,
product_plan_id
:
''
,
equip_price
:
''
,
lease_charge_ratio
:
''
,
int_rate_n
:
' '
,
product_num
:
''
,
down_payment
:
''
,
deposit_ratio
:
''
,
division
:
''
,
lease_times
:
''
,
pre_pay_date
:
''
,
product_id
:
''
,
deposit
:
''
,
int_rate
:
''
,
product_plan_id_n
:
''
,
},
export
default
{
filters
:
{
timeFormat
:
function
(
time
)
{
var
date
=
new
Date
(
time
)
var
y
=
date
.
getFullYear
()
var
m
=
date
.
getMonth
()
+
1
var
d
=
date
.
getDate
()
if
(
m
<
10
)
{
m
=
`0
${
m
}
`
}
if
(
d
<
10
)
{
d
=
`0
${
d
}
`
}
return
`
${
y
}
-
${
m
}
-
${
d
}
`
},
created
()
{
this
.
getRent
()
},
props
:
{
confirm_status
:
{
type
:
String
,
default
:
''
,
},
methods
:
{
changeRefund
()
{
this
.
$router
.
push
({
name
:
'Refund'
,
params
:
{
confirm_status
:
this
.
confirm_status
,
product_num
:
this
.
rentInfo
.
product_num
},
})
},
data
()
{
return
{
rentInfo
:
{
finance_amount
:
''
,
lease_charge
:
''
,
annual_pay_times
:
''
,
deposit_ratio_n
:
' '
,
lease_charge_ratio_n
:
' '
,
product_plan_id
:
''
,
equip_price
:
''
,
lease_charge_ratio
:
''
,
int_rate_n
:
' '
,
product_num
:
''
,
down_payment
:
''
,
deposit_ratio
:
''
,
division
:
''
,
lease_times
:
''
,
pre_pay_date
:
''
,
product_id
:
''
,
deposit
:
''
,
int_rate
:
''
,
product_plan_id_n
:
''
,
},
getRent
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'prj_lease_query'
let
param
=
{
project_id
:
window
.
sessionStorage
.
project_id
,
}
},
created
()
{
this
.
getRent
()
},
methods
:
{
changeRefund
()
{
this
.
$router
.
push
({
name
:
'Refund'
,
params
:
{
confirm_status
:
this
.
confirm_status
,
product_num
:
this
.
rentInfo
.
product_num
,
},
})
},
getRent
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'prj_lease_query'
let
param
=
{
project_id
:
window
.
sessionStorage
.
project_id
,
}
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
Object
.
assign
(
vm
.
rentInfo
,
res
.
info
)
}
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
Object
.
assign
(
vm
.
rentInfo
,
res
.
info
)
}
})
},
})
},
}
},
}
</
script
>
<
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