Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5
Overview
Overview
Details
Activity
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
vanke
h5
Commits
13cd3522
Commit
13cd3522
authored
Jul 02, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领用记录
parent
e1e14a27
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
26 deletions
+115
-26
code.js
src/api/code.js
+8
-0
date.js
src/utils/date.js
+43
-0
index.vue
src/views/Employee/index.vue
+1
-1
receiveRecords.vue
src/views/Employee/receiveRecords.vue
+62
-24
index.vue
src/views/Home/index.vue
+1
-1
No files found.
src/api/code.js
View file @
13cd3522
...
...
@@ -16,3 +16,11 @@ export function checkQcode (params) {
params
})
}
// 万科h5_领用记录分页查询
export
function
getOutboundOrderList
(
params
)
{
return
request
({
url
:
'vankeOutboundOrder/getPageList'
,
method
:
'get'
,
params
})
}
src/utils/date.js
0 → 100644
View file @
13cd3522
// date.js
/* eslint-disable */
export
function
formatDate
(
date
,
fmt
)
{
if
(
/
(
y+
)
/
.
test
(
fmt
))
{
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
''
).
substr
(
4
-
RegExp
.
$1
.
length
))
}
const
o
=
{
'M+'
:
date
.
getMonth
()
+
1
,
'd+'
:
date
.
getDate
(),
'h+'
:
date
.
getHours
(),
'm+'
:
date
.
getMinutes
(),
's+'
:
date
.
getSeconds
()
}
for
(
const
k
in
o
)
{
if
(
new
RegExp
(
`(
${
k
}
)`
).
test
(
fmt
))
{
const
str
=
o
[
k
]
+
''
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
===
1
)
?
str
:
padLeftZero
(
str
))
}
}
return
fmt
}
function
padLeftZero
(
str
)
{
return
(
'00'
+
str
).
substr
(
str
.
length
)
}
export
function
str2Date
(
dateStr
,
separator
)
{
if
(
!
separator
)
{
separator
=
'-'
}
const
dateArr
=
dateStr
.
split
(
separator
)
const
year
=
parseInt
(
dateArr
[
0
])
let
month
// 处理月份为04这样的情况
if
(
dateArr
[
1
].
indexOf
(
'0'
)
==
0
)
{
month
=
parseInt
(
dateArr
[
1
].
substring
(
1
))
}
else
{
month
=
parseInt
(
dateArr
[
1
])
}
const
day
=
parseInt
(
dateArr
[
2
])
const
date
=
new
Date
(
year
,
month
-
1
,
day
)
return
date
}
src/views/Employee/index.vue
View file @
13cd3522
...
...
@@ -7,7 +7,7 @@
<div
class=
"wrap"
>
<p>
我的动态二维码
</p>
</div>
<div
id=
"qrcode"
class=
"qr"
></div>
<div
id=
"qrcode"
class=
"qr"
@
click=
"generateQrcode"
></div>
<p
class=
"notice"
v-if=
"onlyId"
>
领用办公用品时请出示该二维码
</p>
</div>
</div>
...
...
src/views/Employee/receiveRecords.vue
View file @
13cd3522
...
...
@@ -2,8 +2,9 @@
<div
class=
"page"
>
<navbar
title=
"领用记录"
@
rightClick=
"goRecords"
></navbar>
<div
class=
"container"
>
<van-pull-refresh
class=
"
list
"
v-model=
"refreshing"
@
refresh=
"onRefresh"
>
<van-pull-refresh
class=
"
width_100
"
v-model=
"refreshing"
@
refresh=
"onRefresh"
>
<van-list
:immediate-check=
"false"
v-model=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
...
...
@@ -11,14 +12,14 @@
>
<div
class=
"row"
v-for=
"(item,index) in list"
:key=
"index"
>
<p
class=
"title"
>
<span>
领用编号:
98293023
</span>
<span>
2020-03-02 19:30
</span>
<span>
领用编号:
{{
item
.
outboundNo
}}
</span>
<span>
{{
item
.
createtime
|
formatTime
}}
</span>
</p>
<div
class=
"info"
v-for=
"(
item,index) in 4"
:key=
"
index"
>
<p>
16开记事本
</p>
<div
class=
"info"
v-for=
"(
vor,v_index) in item.vorList"
:key=
"v_
index"
>
<p>
{{
vor
.
goodsName
}}
</p>
<p>
<span
class=
"num"
>
数量:
</span>
<span>
3
</span>
<span>
{{
vor
.
outboundNum
}}
</span>
</p>
</div>
</div>
...
...
@@ -30,15 +31,23 @@
</
template
>
<
script
>
import
{
getOutboundOrderList
}
from
'@/api/code'
import
{
formatDate
}
from
'@/utils/date'
export
default
{
name
:
'index'
,
components
:
{},
data
()
{
return
{
total
:
null
,
list
:
[],
loading
:
false
,
finished
:
false
,
refreshing
:
false
refreshing
:
false
,
params
:
{
pageNum
:
1
,
pageSize
:
5
}
}
},
mounted
()
{
...
...
@@ -47,24 +56,32 @@ export default {
goRecords
()
{
console
.
log
(
1111
)
},
onLoad
()
{
setTimeout
(()
=>
{
if
(
this
.
refreshing
)
{
this
.
list
=
[]
this
.
refreshing
=
false
}
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
this
.
list
.
push
(
this
.
list
.
length
+
1
)
getList
()
{
getOutboundOrderList
(
this
.
params
).
then
(
res
=>
{
console
.
log
(
'列表'
,
this
.
params
,
res
)
for
(
var
i
of
res
.
data
.
list
)
{
this
.
list
.
push
(
i
)
}
this
.
total
=
Number
(
res
.
data
.
total
)
this
.
params
.
pageNum
++
this
.
loading
=
false
if
(
this
.
list
.
length
>=
10
)
{
if
(
this
.
list
.
length
>=
this
.
total
)
{
this
.
finished
=
true
}
},
1000
)
})
},
onLoad
()
{
console
.
log
(
'onload'
)
if
(
this
.
refreshing
)
{
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
refreshing
=
false
}
this
.
getList
()
},
onRefresh
()
{
console
.
log
(
'onrefresh'
)
// 清空列表数据
this
.
finished
=
false
...
...
@@ -73,17 +90,35 @@ export default {
this
.
loading
=
true
this
.
onLoad
()
}
},
filters
:
{
formatTime
(
time
)
{
if
(
!
time
)
{
return
'--'
}
const
date
=
new
Date
(
time
)
return
formatDate
(
date
,
'yyyy-MM-dd hh:mm:ss'
)
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
.page
{
height
:
100%
;
}
.width_100
{
width
:
100%
;
}
.row
{
width
:
100%
;
}
.row
+
.row
{
margin-top
:
10px
;
}
.row
+
.row
{
margin-top
:
10px
;
}
.row
.title
{
display
:
flex
;
justify-content
:
space-between
;
...
...
@@ -91,10 +126,12 @@ export default {
padding
:
10px
15px
;
background
:
#f6f7f9
;
}
.title
span
:last-child
,
.num
{
.title
span
:last-child
,
.num
{
color
:
#999
;
}
.row
.info
{
.row
.info
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
...
...
@@ -102,7 +139,8 @@ export default {
padding
:
15px
;
font-size
:
14px
;
}
.info
+
.info
{
.info
+
.info
{
border-top
:
1px
solid
#e8e8e8
;
}
</
style
>
src/views/Home/index.vue
View file @
13cd3522
...
...
@@ -38,7 +38,7 @@ export default {
getToken
()
{
this
.
$store
.
dispatch
(
'Login'
,
{
jobNo
:
this
.
$route
.
query
.
jobNo
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'GetUserInfo'
).
then
(
res
=>
{
//
res.data.accouuntType = 0
res
.
data
.
accouuntType
=
0
this
.
userInfo
=
res
.
data
console
.
log
(
'userInof'
,
this
.
userInfo
)
}).
catch
(()
=>
{
...
...
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