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
af8a8dd8
authored
Apr 24, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
551e2ccd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
56 deletions
src/store/modules/bill.js
src/views/Bill/index.vue
src/views/Bill/record.vue
src/views/More/detail.vue
src/views/More/index.vue
src/store/modules/bill.js
View file @
af8a8dd8
...
...
@@ -140,7 +140,7 @@ const actions = {
},
loadRecord
({
commit
},
param
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
api
.
getRecord
(
param
.
accountId
,
param
.
page
,
param
.
page
s
ize
)
api
.
getRecord
(
param
.
accountId
,
param
.
page
,
param
.
page
S
ize
)
.
then
(
res
=>
{
if
(
res
&&
res
.
status
)
{
record
=
res
.
data
;
...
...
src/views/Bill/index.vue
View file @
af8a8dd8
...
...
@@ -236,7 +236,10 @@ export default {
case
1
:
// 充值
break
;
case
2
:
// 资金记录
this
.
$router
.
push
({
name
:
"billrecord"
});
this
.
$router
.
push
({
name
:
"billrecord"
,
query
:
{
accountId
:
this
.
currentPerId
}
});
break
;
case
3
:
// 人事托管
this
.
$router
.
push
({
...
...
src/views/Bill/record.vue
View file @
af8a8dd8
...
...
@@ -25,7 +25,8 @@ import { Icon } from "vant";
import
{
HeaderW
}
from
"@/components"
;
import
MescrollMixins
from
"../../assets/js/MescrollMixins.js"
;
import
MescrollVue
from
"mescroll.js/mescroll.vue"
;
import
{
mapActions
}
from
"vuex"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
dayjs
from
"dayjs"
;
export
default
{
components
:
{
HeaderW
,
...
...
@@ -33,9 +34,13 @@ export default {
MescrollVue
},
mixins
:
[
MescrollMixins
],
computed
:
{
...
mapGetters
([
"getBeginDate"
])
},
data
()
{
return
{
title
:
"11月资金记录"
,
title
:
""
,
accountId
:
0
,
mescrollUp
:
{
callback
:
this
.
upCallback
,
// 上拉回调,此处可简写; 相当于 callback: function (page, mescroll) { getListData(page); }
page
:
{
...
...
@@ -66,9 +71,13 @@ export default {
this
.
mescroll
=
mescroll
;
},
upCallback
(
page
,
mescroll
)
{
this
.
loadRecord
({
accountId
:
"2319680"
,
page
:
page
.
num
,
pageSize
:
"10"
}).
then
(
this
.
loadRecord
({
accountId
:
this
.
accountId
,
page
:
page
.
num
,
pageSize
:
"10"
}).
then
(
resdata
=>
{
console
.
log
(
JSON
.
stringify
(
resdata
));
let
arr
=
resdata
.
list
;
// 如果是第一页需手动制空列表
if
(
page
.
num
===
1
)
this
.
dataList
=
[];
...
...
@@ -83,60 +92,15 @@ export default {
mescroll
.
endErr
();
}
);
// 模拟联网
// this.getListDataFromNet(
// this.pdType,
// page.num,
// page.size,
// arr => {
// // 如果是第一页需手动制空列表
// if (page.num === 1) this.dataList = [];
// // 把请求到的数据添加到列表
// this.dataList = this.dataList.concat(arr);
// // 数据渲染成功后,隐藏下拉刷新的状态
// this.$nextTick(() => {
// mescroll.endSuccess(arr.length);
// });
// },
// () => {
// // 联网异常,隐藏上拉和下拉的加载进度
// mescroll.endErr();
// }
// );
},
onClickLeft
()
{
console
.
log
(
1
);
},
navLeftArrowClick
()
{
this
.
$router
.
go
(
-
1
);
},
mescrollInit
(
mescroll
)
{
this
.
mescroll
=
mescroll
;
},
upCallback
(
page
,
mescroll
)
{
this
.
loadRecord
({
accountId
:
"2319680"
,
page
:
page
.
num
.
toString
(),
pagesize
:
"10"
}).
then
(
resdata
=>
{
console
.
log
(
'resdata='
,
JSON
.
stringify
(
resdata
));
let
data
=
page
.
num
==
1
?
[]
:
this
.
articleList
;
data
.
push
(...
resdata
.
list
);
this
.
articleList
=
data
;
// 数据渲染成功后,隐藏下拉刷新的状态
this
.
$nextTick
(()
=>
{
mescroll
.
endSuccess
(
resdata
.
list
.
length
);
});
},
err
=>
{
console
.
log
(
err
);
}
);
}
},
mounted
()
{
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
this
.
accountId
=
this
.
$route
.
query
.
accountId
;
this
.
title
=
dayjs
(
this
.
getBeginDate
).
format
(
"M"
)
+
"月"
+
"资金记录"
;
}
};
</
script
>
...
...
src/views/More/detail.vue
View file @
af8a8dd8
<
template
>
<div>
<div
class=
"header"
>
<van-nav-bar
:title=
"title"
left-arrow
@
click-left=
"onClickLeft"
/>
<van-nav-bar
:title=
"title"
left-arrow
/>
</div>
<div
class=
"container"
>
<div
class=
"list"
v-for=
"(item, index) in list"
:key=
"index"
>
...
...
@@ -10,7 +10,7 @@
<i>
{{
item
.
dueAmount
}}
</i>
</div>
<p>
<span>
截止扣费日期
{{
item
.
dueDate
}}
</span>
<span>
截止扣费日期
{{
item
.
dueDate
|
y
-
m
-
d
}}
</span>
<i>
{{
item
.
statusDesc
}}
</i>
</p>
</div>
...
...
src/views/More/index.vue
View file @
af8a8dd8
...
...
@@ -72,7 +72,10 @@ export default {
methods
:
{
...
mapActions
([
"loadMoreList"
,
"loadMoreSummary"
]),
toPage
()
{
this
.
$router
.
push
({
name
:
"billrecord"
});
this
.
$router
.
push
({
name
:
"billrecord"
,
query
:
{
accountId
:
this
.
summary
.
accountId
}
});
},
toNextPage
(
index
,
name
)
{
this
.
$router
.
push
({
name
:
"moredetail"
,
query
:
{
index
,
name
}
});
...
...
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