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
2ae51281
Commit
2ae51281
authored
Dec 18, 2019
by
786817560
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://hel.hand-china.com/xugong/hls-xcmg-vue-app
into develop
parents
6c8f4828
5d397e41
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
160 deletions
+111
-160
contract-record.vue
src/pages/pay/firstPay/contract-record.vue
+19
-28
first-pay.vue
src/pages/pay/firstPay/first-pay.vue
+19
-12
contract-record.vue
src/pages/pay/payment/contract-record.vue
+47
-113
new-list.vue
src/pages/pay/payment/new-list.vue
+26
-7
No files found.
src/pages/pay/firstPay/contract-record.vue
View file @
2ae51281
...
...
@@ -18,9 +18,7 @@
</div>
</div>
</div>
<scroll
ref=
"scroll"
:updateData=
"[prj_lists]"
:pullUp=
"true"
class=
"pay-content"
@
pullingUp=
"getDetail"
>
<section
class=
"pay-content"
>
<section
v-for=
"(item,index) in prj_lists"
:key=
"index"
class=
"contract-item"
>
<div
class=
"header"
>
<img
src=
"@/assets/payment/file.png"
>
...
...
@@ -42,7 +40,7 @@
</div>
</div>
</section>
</s
croll
>
</s
ection
>
</div>
<div
class=
"prompt has-footer"
>
<div>
...
...
@@ -55,7 +53,7 @@
</div>
</div>
<bottom-tab>
<tab-button
class=
"footer"
@
click
.
native=
"c
reateDetail
"
>
支
付
</tab-button>
<tab-button
class=
"footer"
@
click
.
native=
"c
heckPay
"
>
支
付
</tab-button>
</bottom-tab>
</h-view>
</
template
>
...
...
@@ -108,42 +106,23 @@ export default {
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
pagenum
=
1
vm
.
prj_lists
=
[]
vm
.
getDetail
()
})
},
mounted
()
{
console
.
log
(
this
.
prj_lists
)
},
methods
:
{
getDetail
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'payment_prj_list_query'
let
param
=
{
bp_id
:
window
.
localStorage
.
getItem
(
'bp_id'
),
pagenum
:
vm
.
pagenum
,
pagesize
:
10
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
let
returnData
=
[]
returnData
=
res
.
prj_lists
if
(
returnData
.
length
===
0
)
{
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
>
0
&&
returnData
.
length
<
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
prj_lists
.
push
(
array
[
index
])
})
vm
.
pagenum
++
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
===
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
prj_lists
.
push
(
array
[
index
])
})
vm
.
pagenum
++
vm
.
$refs
.
scroll
.
update
(
false
)
}
vm
.
prj_lists
=
res
.
prj_lists
vm
.
prj_lists
.
forEach
(
i
=>
{
i
.
cf_lists
.
forEach
(
j
=>
{
let
num
=
parseFloat
(
j
.
due_amount
)
-
parseFloat
(
j
.
received_amount
)
...
...
@@ -172,6 +151,18 @@ export default {
})
return
data
},
checkPay
()
{
let
money
=
parseFloat
(
this
.
money
)
// let theDefault = parseFloat(this.defaultMoney)
if
(
money
>
0
)
{
this
.
createDetail
()
}
else
if
(
money
===
0
)
{
hlsPopup
.
showLongCenter
(
'当前支付金额为0元,无需支付!'
)
}
// else if (money > theDefault) {
// hlsPopup.showLongCenter('当前支付金额超出应还金额!')
// }
},
createDetail
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'create_detail_0_part'
...
...
@@ -245,7 +236,7 @@ export default {
margin:auto;
width: 355px;
//margin-top:-60px;
height:
9
rem;
height:
8
rem;
overflow: scroll;
//background-color: #FFF;
.contract-item {
...
...
src/pages/pay/firstPay/first-pay.vue
View file @
2ae51281
...
...
@@ -75,7 +75,15 @@ export default {
}
})
},
watch
:
{},
watch
:
{
'money'
:
{
handler
(
newVal
,
oulVal
)
{
if
(
newVal
===
null
)
{
this
.
money
=
0
}
},
},
},
methods
:
{
getDownPayment
()
{
let
vm
=
this
...
...
@@ -100,17 +108,16 @@ export default {
})
},
pay
()
{
this
.
payProtocol
()
// let money = parseFloat(this.money)
// let theDefault = parseFloat(this.default)
// if (money > 0 && money
<=
theDefault
)
{
// this.payProtocol()
// } else if (money > theDefault) {
// hlsPopup.showLongCenter('当前支付金额超出应还金额!')
// } else if (money === 0) {
// hlsPopup.showLongCenter('当前支付金额为0元,无需支付!')
// }
let
money
=
parseFloat
(
this
.
money
)
let
theDefault
=
parseFloat
(
this
.
default
)
if
(
money
>
0
&&
money
<=
theDefault
)
{
this
.
payProtocol
()
}
else
if
(
money
>
theDefault
)
{
hlsPopup
.
showLongCenter
(
'当前支付金额超出应还金额!'
)
}
else
if
(
money
===
0
)
{
hlsPopup
.
showLongCenter
(
'当前支付金额为0元,无需支付!'
)
}
},
payProtocol
()
{
let
vm
=
this
...
...
src/pages/pay/payment/contract-record.vue
View file @
2ae51281
...
...
@@ -22,9 +22,7 @@
<input
v-model=
"keyWords"
type=
"text"
placeholder=
"请输入合同号/车架号/承租人名称"
>
<img
src=
"@/assets/payment/search.png"
alt
>
</div>
<scroll
ref=
"scroll"
:updateData=
"[showList]"
:pullUp=
"true"
class=
"pay-content"
@
pullingUp=
"loadMore"
>
<section
class=
"pay-content"
>
<section
v-for=
"(item,index) in showList"
:key=
"index"
class=
"contract-item"
>
<div
class=
"header"
>
<img
src=
"@/assets/payment/file.png"
alt
>
...
...
@@ -77,15 +75,17 @@
</div>
</div>
</div>
</div>
</section>
</scroll>
<list-item
:item-height=
"44"
class=
"rate"
>
<list-item
:item-height=
"44"
>
<item>
<div
slot=
"name"
>
逾期利息
</div>
<span
slot=
"content"
>
¥
{{
money
|
currency
}}
</span>
</item>
</list-item>
</div>
</section>
</section>
<div
class=
"prompt has-footer"
>
<div>
<img
src=
"@/assets/payment/prompt.png"
alt
>
...
...
@@ -97,7 +97,7 @@
</div>
</div>
<bottom-tab>
<tab-button
class=
"footer"
@
click
.
native=
"
payDetail
()"
>
支
付
</tab-button>
<tab-button
class=
"footer"
@
click
.
native=
"
checkPay
()"
>
支
付
</tab-button>
</bottom-tab>
</div>
</h-view>
...
...
@@ -116,6 +116,7 @@ export default {
vm
.
getRentInfo
()
vm
.
money
=
vm
.
$route
.
params
.
money
vm
.
sumMoney
=
vm
.
money
vm
.
keyWords
=
''
vm
.
info
=
[]
vm
.
showList
=
[]
vm
.
searchList
=
[]
...
...
@@ -163,7 +164,6 @@ export default {
vm
.
sumMoney
=
a
}
}
vm
.
money
=
a
})
}
else
{
if
(
vm
.
money
!==
''
)
{
...
...
@@ -177,61 +177,31 @@ export default {
deep
:
true
,
},
keyWords
(
newVal
,
oldVal
)
{
this
.
search
()
},
},
methods
:
{
loadMore
()
{
if
(
this
.
keyWords
)
{
this
.
searchMore
()
}
else
{
this
.
getRentInfo
()
}
},
searchMore
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'payment_con_list_query'
let
param
=
{
bp_id
:
window
.
localStorage
.
getItem
(
'bp_id'
),
pagesize
:
10
,
pagenum
:
vm
.
searchPagenum
,
searchInput
:
vm
.
keyWords
,
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中,请稍后!'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
let
returnData
=
[]
returnData
=
res
.
prj_lists
if
(
returnData
.
length
===
0
)
{
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
>
0
&&
returnData
.
length
<
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
searchList
.
push
(
array
[
index
])
})
vm
.
searchPagenum
++
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
===
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
searchList
.
push
(
array
[
index
])
})
vm
.
searchPagenum
++
vm
.
$refs
.
scroll
.
update
(
false
)
'sumMoney'
:
{
handler
(
newVal
,
oulVal
)
{
if
(
newVal
===
null
||
isNaN
(
newVal
)
||
newVal
===
''
)
{
this
.
sumMoney
=
0
}
vm
.
searchList
.
forEach
(
i
=>
{
i
.
con_lists
.
forEach
(
j
=>
{
let
num
=
(
parseFloat
(
j
.
due_amount
)
-
parseFloat
(
j
.
received_amount
))
vm
.
$set
(
j
,
'amount'
,
num
)
})
})
vm
.
showList
=
vm
.
searchList
}
})
},
search
()
{
},
},
methods
:
{
checkPay
()
{
let
money
=
parseFloat
(
this
.
sumMoney
)
// let theDefault = parseFloat(this.defaultMoney)
if
(
money
>
0
)
{
this
.
payDetail
()
}
else
if
(
money
===
0
)
{
hlsPopup
.
showLongCenter
(
'当前支付金额为0元,无需支付!'
)
}
// else if (money > theDefault) {
// hlsPopup.showLongCenter('当前支付金额超出应还金额!')
// }
},
getRentInfo
()
{
let
vm
=
this
vm
.
searchPagenum
=
2
vm
.
$refs
.
scroll
.
scrollToTop
()
let
randomString
=
Math
.
floor
(
Math
.
random
()
*
21
)
let
url
=
process
.
env
.
basePath
+
...
...
@@ -241,55 +211,12 @@ export default {
let
param
=
{
bp_id
:
window
.
localStorage
.
getItem
(
'bp_id'
),
searchInput
:
vm
.
keyWords
,
pagesize
:
10
,
pagenum
:
1
,
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中,请稍后!'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
searchList
=
res
.
prj_lists
vm
.
searchList
.
forEach
(
i
=>
{
i
.
con_lists
.
forEach
(
j
=>
{
let
num
=
(
parseFloat
(
j
.
due_amount
)
-
parseFloat
(
j
.
received_amount
))
vm
.
$set
(
j
,
'amount'
,
num
)
})
})
vm
.
showList
=
vm
.
searchList
vm
.
$refs
.
scroll
.
update
(
false
)
}
})
},
getRentInfo
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'payment_con_list_query'
let
param
=
{
bp_id
:
window
.
localStorage
.
getItem
(
'bp_id'
),
pagesize
:
10
,
pagenum
:
vm
.
pagenum
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
// vm.info = res.prj_lists
let
returnData
=
[]
returnData
=
res
.
prj_lists
if
(
returnData
.
length
===
0
)
{
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
>
0
&&
returnData
.
length
<
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
info
.
push
(
array
[
index
])
})
vm
.
pagenum
++
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
===
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
info
.
push
(
array
[
index
])
})
vm
.
pagenum
++
vm
.
$refs
.
scroll
.
update
(
false
)
}
vm
.
info
=
res
.
prj_lists
vm
.
info
.
forEach
(
i
=>
{
i
.
con_lists
.
forEach
(
j
=>
{
let
num
=
(
parseFloat
(
j
.
due_amount
)
-
parseFloat
(
j
.
received_amount
))
...
...
@@ -348,6 +275,12 @@ export default {
</
script
>
<
style
lang=
'less'
>
#payment-contract-record {
.list{
span{
overflow: hidden;
text-overflow: ellipsis;
}
}
.none {
display: flex;
justify-content: center;
...
...
@@ -425,9 +358,10 @@ export default {
width: 95%;
position: absolute;
bottom: 150px;
left:0; right:0;
left:0;
right:0;
margin:auto;
height: 5
0
%;
height: 5
3
%;
overflow: scroll;
.contract-item {
background-color: #fff;
...
...
@@ -550,12 +484,12 @@ export default {
}
}
}
.rate{
position: absolute;
width: 100%;
bottom: 134px;
box-shadow: -2px -2px 10px #ccc;
}
//
.rate{
//
position: absolute;
//
width: 100%;
//
bottom: 134px;
//
box-shadow: -2px -2px 10px #ccc;
//
}
.prompt {
position: absolute;
width: 100%;
...
...
src/pages/pay/payment/new-list.vue
View file @
2ae51281
...
...
@@ -26,7 +26,7 @@
</div>
<div
class=
"pay-input"
>
<span>
应还租金
</span>
<CurrencyInput
v-model=
"
pay_re
nt"
class=
"currencyInput"
type=
"text"
placeholder=
"请输入支付金额"
/>
<CurrencyInput
v-model=
"
amou
nt"
class=
"currencyInput"
type=
"text"
placeholder=
"请输入支付金额"
/>
<div
@
click=
"createOrder"
>
<img
src=
"@/assets/payment/into.png"
>
</div>
...
...
@@ -58,7 +58,7 @@
</div>
</h-content>
<bottom-tab>
<tab-button
class=
"footer"
@
click
.
native=
"
to
Pay"
>
支
付
</tab-button>
<tab-button
class=
"footer"
@
click
.
native=
"
check
Pay"
>
支
付
</tab-button>
</bottom-tab>
</h-view>
</
template
>
...
...
@@ -74,7 +74,7 @@ export default {
return
{
money
:
0
,
liquidated_damages
:
0
,
pay_re
nt
:
0
,
amou
nt
:
0
,
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
...
...
@@ -84,18 +84,25 @@ export default {
}
else
if
(
from
.
name
===
'Success'
)
{
vm
.
money
=
parseInt
(
vm
.
default
)
-
parseInt
(
window
.
localStorage
.
getItem
(
'money'
))
vm
.
default
=
vm
.
money
vm
.
pay_re
nt
=
vm
.
money
vm
.
amou
nt
=
vm
.
money
}
})
},
computed
:
{},
watch
:
{
'
pay_re
nt'
:
{
'
amou
nt'
:
{
handler
()
{
this
.
money
=
parseFloat
(
parseFloat
(
this
.
pay_re
nt
)
+
parseFloat
(
this
.
liquidated_damages
))
this
.
money
=
parseFloat
(
parseFloat
(
this
.
amou
nt
)
+
parseFloat
(
this
.
liquidated_damages
))
},
immediate
:
true
,
},
'money'
:
{
handler
(
newVal
,
oulVal
)
{
if
(
newVal
===
null
||
isNaN
(
newVal
))
{
this
.
money
=
0
}
},
},
},
activated
()
{
// this.money = this.pay_rent
...
...
@@ -117,19 +124,31 @@ export default {
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
default
=
parseFloat
(
res
.
info
.
rental_amount
)
+
parseFloat
(
res
.
info
.
overdue_amount
)
vm
.
pay_re
nt
=
parseFloat
(
res
.
info
.
rental_amount
).
toFixed
(
2
)
vm
.
amou
nt
=
parseFloat
(
res
.
info
.
rental_amount
).
toFixed
(
2
)
vm
.
liquidated_damages
=
parseFloat
(
res
.
info
.
overdue_amount
).
toFixed
(
2
)
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
checkPay
()
{
let
money
=
parseFloat
(
this
.
money
)
let
theDefault
=
parseFloat
(
this
.
default
)
if
(
money
>
0
&&
money
<=
theDefault
)
{
this
.
toPay
()
}
else
if
(
money
>
theDefault
)
{
hlsPopup
.
showLongCenter
(
'当前支付金额超出应还金额!'
)
}
else
if
(
money
===
0
)
{
hlsPopup
.
showLongCenter
(
'当前支付金额为0元,无需支付!'
)
}
},
toPay
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'create_order_1_amount'
let
param
=
{
info
:
{
bp_id
:
window
.
localStorage
.
getItem
(
'bp_id'
),
amount
:
vm
.
amount
,
},
}
hlsPopup
.
showLoading
(
'请稍候'
)
...
...
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