Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
hrs_app_h5
/
bill
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d5db1ddc
authored
Apr 23, 2020
by
cocomilk2012
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
more page in data
parent
acecce8d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
119 additions
and
99 deletions
src/api/More/index.js
src/api/More/urls.js
src/store/index.js
src/store/modules/more.js
src/store/types.js
src/views/Bill/record.vue
src/views/More/detail.vue
src/views/More/index.vue
src/api/More/index.js
View file @
d5db1ddc
...
...
@@ -8,11 +8,11 @@ console.log('userid', usermemberId);
export
default
{
// get数据
async
getMoreList
(
comid
,
id
,
name
)
{
async
getMoreList
()
{
const
url
=
urls
.
getMoreList
(
usermemberId
);
return
AjaxRequest
.
get
(
url
);
},
async
getMoreSummary
(
comid
,
deptid
,
name
)
{
async
getMoreSummary
()
{
const
url
=
urls
.
getMoreSummary
(
usermemberId
);
return
AjaxRequest
.
get
(
url
);
},
...
...
src/api/More/urls.js
View file @
d5db1ddc
...
...
@@ -6,7 +6,7 @@ export default {
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
);
return
url
;
},
getMoreSummary
(
accountId
,
usermemberId
)
{
getMoreSummary
(
usermemberId
)
{
let
url
=
VUE_APP_API_BASEURL
+
'bill/account/{usermemberId}/moresvc/summary'
;
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
);
return
url
;
...
...
src/store/index.js
View file @
d5db1ddc
...
...
@@ -5,6 +5,7 @@ import oidcSettings from "../utils/oidcSettings";
import
bill
from
'./modules/bill'
import
token
from
'./modules/token'
import
any
from
'./modules/any'
import
more
from
'./modules/more'
Vue
.
use
(
Vuex
)
...
...
@@ -13,6 +14,7 @@ export default new Vuex.Store({
bill
,
token
,
any
,
more
,
oidc
:
vuexOidcCreateStoreModule
(
oidcSettings
)
}
});
src/store/modules/more.js
View file @
d5db1ddc
import
types
from
"../types"
;
import
api
from
'../../api/More'
let
morelist
=
[]
const
state
=
{
morelist
}
let
moreSummary
=
{}
const
state
=
{
moreSummary
,
morelist
}
const
getters
=
{
getMoreList
(
state
)
{
const
temp
=
localStorage
.
getItem
(
'morelist'
);
if
(
temp
)
{
state
.
morelist
=
temp
}
return
state
.
morelist
;
},
getMoreList
(
state
)
{
const
temp
=
localStorage
.
getItem
(
'morelist'
);
if
(
temp
)
{
state
.
morelist
=
JSON
.
parse
(
temp
);
}
return
state
.
morelist
;
},
getMoreSummary
(
state
)
{
//state.summary = localStorage.getItem("bill_summary");
return
state
.
moreSummary
;
},
}
const
mutations
=
{
[
types
.
CHANGE_MORE_LIST
](
state
,
morelist
)
{
state
.
morelist
=
morelist
;
try
{
localStorage
.
setItem
(
"morelist"
,
morelist
);
}
catch
(
error
)
{
}
}
[
types
.
CHANGE_MORE_LIST
]
(
state
,
morelist
)
{
state
.
morelist
=
morelist
;
try
{
localStorage
.
setItem
(
"morelist"
,
JSON
.
stringify
(
morelist
));
}
catch
(
error
)
{
}
},
[
types
.
CHANGE_MORE_SUMMARY
]
(
state
,
moreSummary
)
{
state
.
moreSummary
=
moreSummary
;
try
{
localStorage
.
setItem
(
"moreSummary"
,
moreSummary
);
}
catch
(
error
)
{
}
},
}
const
actions
=
{
savePeriodIndex
({
commit
},
morelist
)
{
commit
(
types
.
CHANGE_MORE_LIST
,
morelist
);
}
loadMoreList
({
commit
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
api
.
getMoreList
().
then
(
res
=>
{
if
(
res
&&
res
.
status
)
{
morelist
=
res
.
data
.
list
;
commit
(
types
.
CHANGE_MORE_LIST
,
morelist
);
resolve
(
morelist
)
}
else
{
reject
(
res
.
message
);
}
})
});
},
loadMoreSummary
({
commit
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
api
.
getMoreSummary
().
then
(
res
=>
{
if
(
res
&&
res
.
status
)
{
moreSummary
=
res
.
data
;
commit
(
types
.
CHANGE_MORE_SUMMARY
,
moreSummary
);
resolve
(
moreSummary
);
}
else
{
reject
(
res
.
message
)
}
})
});
}
}
export
default
{
state
,
getters
,
mutations
,
actions
state
,
getters
,
mutations
,
actions
}
\ No newline at end of file
src/store/types.js
View file @
d5db1ddc
...
...
@@ -9,6 +9,7 @@ const CHANGE_RECEIPT_DETAIL = 'CHANGE_RECEIPT_DETAIL';
const
CHANGE_CURRENT_PERIOD
=
'CHANGE_CURRENT_PERIOD'
;
const
CHANGE_CURRENT_BEGINDATE
=
"CHANGE_CURRENT_BEGINDATE"
;
const
CHANGE_MORE_LIST
=
"CHANGE_MORE_LIST"
;
const
CHANGE_MORE_SUMMARY
=
"CHANGE_MORE_SUMMARY"
;
export
default
{
CHANGE_BILL_PERIOD
,
CHANGE_BILL_SUMMARY
,
...
...
@@ -19,5 +20,6 @@ export default {
CHANGE_CURRENT_PERIOD
,
CHANGE_CURRENT_BEGINDATE
,
CHANGE_MORE_LIST
,
CHANGE_MORE_SUMMARY
,
}
src/views/Bill/record.vue
View file @
d5db1ddc
...
...
@@ -56,13 +56,7 @@ export default {
use
:
true
// 是否开启懒加载,默认false
}
},
dataList
:
[
{
feeType
:
"企业会员费"
,
dateTime
:
"2020-04-03 15:31:22"
,
amount
:
"-500.00"
}
]
dataList
:
[]
};
},
methods
:
{
...
...
src/views/More/detail.vue
View file @
d5db1ddc
...
...
@@ -4,24 +4,14 @@
<van-nav-bar
:title=
"title"
left-arrow
@
click-left=
"onClickLeft"
/>
</div>
<div
class=
"container"
>
<div
class=
"list"
>
<div
class=
"list"
v-for=
"(item, index) in list"
:key=
"index"
>
<div
class=
"title"
>
<div
class=
"title_info"
>
{{
data
.
base
.
service_type
}}
</div>
<i>
{{
data
.
base
.
base_fee
}}
</i>
<div
class=
"title_info"
>
{{
item
.
orderName
}}
</div>
<i>
{{
item
.
dueAmount
}}
</i>
</div>
<p>
<span>
截止扣费日期
{{
data
.
base
.
pay_time_date
}}
</span>
<i>
{{
data
.
base
.
status
}}
</i>
</p>
</div>
<div
class=
"list"
>
<div
class=
"title"
>
<div
class=
"title_info"
>
{{
data
.
service
.
service_type
}}
</div>
<i>
{{
data
.
service
.
base_fee
}}
</i>
</div>
<p>
<span>
截止扣费日期
{{
data
.
service
.
pay_time_date
}}
</span>
<i>
{{
data
.
service
.
status
}}
</i>
<span>
截止扣费日期
{{
item
.
dueDate
}}
</span>
<i>
{{
item
.
statusDesc
}}
</i>
</p>
</div>
</div>
...
...
@@ -30,6 +20,7 @@
<
script
>
import
{
NavBar
,
Icon
}
from
"vant"
;
import
{
mapGetters
}
from
"vuex"
;
export
default
{
components
:
{
[
NavBar
.
name
]:
NavBar
,
...
...
@@ -37,33 +28,24 @@ export default {
},
data
()
{
return
{
title
:
"详情"
,
data
:
{
base
:
{
service_type
:
"吴医生工商代理工本费"
,
base_fee
:
400.0
,
pay_time_date
:
"2019-12-20"
,
status
:
"已扣费"
},
service
:{
service_type
:
"吴医生工商代理服务费"
,
base_fee
:
200.0
,
pay_time_date
:
"2019-12-20"
,
status
:
"未扣费"
}
}
title
:
""
,
list
:
[]
};
},
computed
:
{
...
mapGetters
([
"getMoreList"
])
},
methods
:
{
onClickLeft
()
{
console
.
log
(
1
);
},
navLeftArrowClick
()
{
this
.
$router
.
go
(
-
1
);
}
},
mounted
()
{
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
const
index
=
parseInt
(
this
.
$route
.
query
.
index
);
const
name
=
this
.
$route
.
query
.
name
;
this
.
title
=
name
;
this
.
list
=
this
.
getMoreList
[
index
].
details
;
}
};
</
script
>
...
...
src/views/More/index.vue
View file @
d5db1ddc
...
...
@@ -10,11 +10,11 @@
<div
class=
"header_content"
>
<div
class=
"fund"
>
<span>
账户余额
</span>
<i>
{{
data
.
balance
}}
</i>
<i>
{{
summary
.
balance
}}
</i>
</div>
<div
class=
"paid"
>
<span>
待付金额
</span>
<i
class=
"paid_color"
>
{{
data
.
toBePayAmount
}}
</i>
<i
class=
"paid_color"
>
{{
summary
.
waitPay
}}
</i>
</div>
</div>
<div
class=
"header_info"
>
...
...
@@ -22,7 +22,7 @@
<img
src
alt
/>
<span>
充值
</span>
</div>
<div
class=
"right"
@
click=
"toPage(
2
)"
>
<div
class=
"right"
@
click=
"toPage()"
>
<img
src
alt
/>
<span>
资金记录
</span>
</div>
...
...
@@ -30,18 +30,18 @@
</div>
</div>
<div
class=
"box"
>
<div
class=
"list"
>
<div
class=
"list_title"
@
click=
"to
Page(3
)"
>
<div
class=
"title"
>
{{
data
.
detail
.
service_type
}}
</div>
<div
class=
"list"
v-for=
"(item, index) in list"
:key=
"index"
>
<div
class=
"list_title"
@
click=
"to
NextPage(index, item.productName
)"
>
<div
class=
"title"
>
{{
item
.
productName
}}
</div>
<van-icon
name=
"arrow"
class=
"arrow_right"
/>
</div>
<p>
<span>
应付金额
</span>
<i>
{{
data
.
detail
.
toPayAmount
}}
</i>
<i>
{{
item
.
totalAmount
}}
</i>
</p>
<p>
<span>
待付金额
</span>
<i>
{{
data
.
detail
.
toBePayAmount
}}
</i>
<i>
{{
item
.
waitPayAmount
}}
</i>
</p>
</div>
</div>
...
...
@@ -52,9 +52,7 @@
<
script
>
import
{
NavBar
,
Icon
}
from
"vant"
;
import
{
TabHeader
}
from
"@/components"
;
import
MeScroll
from
'mescroll.js'
import
'mescroll.js/mescroll.min.css'
import
{
mapActions
}
from
"vuex"
;
export
default
{
components
:
{
[
Icon
.
name
]:
Icon
,
...
...
@@ -62,41 +60,48 @@ export default {
},
data
()
{
return
{
title
:
"人事服务"
,
data
:{
balance
:
0
,
toBePayAmount
:
0
,
detail
:{
service_type
:
"吴医生工商代理"
,
toPayAmount
:
0
,
toBePayAmount
:
0
}
title
:
""
,
list
:
[],
summary
:
{
accountId
:
0
,
balance
:
0
,
waitPay
:
0
}
};
},
methods
:
{
onClickLeft
()
{
console
.
log
(
1
);
...
mapActions
([
"loadMoreList"
,
"loadMoreSummary"
]),
toPage
()
{
this
.
$router
.
push
({
name
:
"billrecord"
});
},
toPage
(
flag
)
{
if
(
flag
===
2
){
this
.
$router
.
push
({
name
:
"morerecord"
});
}
if
(
flag
===
3
)
{
this
.
$router
.
push
({
name
:
"moredetail"
});
}
toNextPage
(
index
,
name
)
{
this
.
$router
.
push
({
name
:
"moredetail"
,
query
:
{
index
,
name
}
});
},
getData
()
{
const
res
=
null
;
this
.
data
.
topay
=
res
.
money
;
async
getData
()
{
await
this
.
loadMoreSummary
().
then
(
data
=>
{
this
.
summary
=
data
;
},
err
=>
{
console
.
log
(
err
);
}
);
await
this
.
loadMoreList
().
then
(
data
=>
{
this
.
list
=
data
;
},
err
=>
{
console
.
log
(
err
);
}
);
},
navLeftArrowClick
()
{
this
.
$router
.
go
(
-
1
);
}
},
mounted
()
{
async
mounted
()
{
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
await
this
.
getData
();
}
};
</
script
>
...
...
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