Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WX_h5
Project
Project
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
godwithdh
WX_h5
Commits
304db003
Commit
304db003
authored
Feb 11, 2020
by
张锡奇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://47.110.145.204:2222/godwithdh/wx_h5
parents
b75b2968
3a46df1b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
26 deletions
+44
-26
punchClockDetail.vue
src/view/healthCard/punchClockDetail.vue
+43
-25
chart.vue
src/view/healthCard/statistics/chart.vue
+1
-1
No files found.
src/view/healthCard/punchClockDetail.vue
View file @
304db003
...
@@ -134,30 +134,37 @@
...
@@ -134,30 +134,37 @@
</div>
</div>
<div
class=
"list"
>
<div
class=
"list"
>
<div
class=
"tip"
>
9. 出行明细
</div>
<div
class=
"tip"
>
9. 出行明细
</div>
<textarea
:placeholder=
"
readOnly
? '' : '请输入'"
:disabled=
"status==2"
autoHeight=
"true"
v-model=
"value.sHaveBeenDetail"
/>
<textarea
:placeholder=
"
status==2
? '' : '请输入'"
:disabled=
"status==2"
autoHeight=
"true"
v-model=
"value.sHaveBeenDetail"
/>
</div>
</div>
<div
class=
"list"
>
<div
class=
"list"
>
<div
class=
"tip"
>
10. 其他情况
</div>
<div
class=
"tip"
>
10. 其他情况
</div>
<textarea
:placeholder=
"
readOnly
? '' : '请输入'"
:disabled=
"status==2"
autoHeight=
"true"
v-model=
"value.sRemark"
/>
<textarea
:placeholder=
"
status==2
? '' : '请输入'"
:disabled=
"status==2"
autoHeight=
"true"
v-model=
"value.sRemark"
/>
</div>
</div>
<button
@
click=
"upData"
v-if=
"status!=2"
>
{{
!
status
?
'提交'
:
'修改'
}}
</button>
<button
@
click=
"upData"
v-if=
"status!=2"
>
{{
btnName
}}
</button>
<confirm
v-model=
"isShowConfirm"
title=
"提示"
@
on-confirm=
"onConfirm"
>
<p
style=
"text-align:center;"
>
{{
status
==
1
?
'修改数据会覆盖原来的数据'
:
'补卡后不能再修改'
}}
,是否继续?
</p>
</confirm>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
util
from
"@/libs/util.js"
import
util
from
"@/libs/util.js"
import
{
mapState
}
from
'vuex'
;
import
{
mapState
}
from
'vuex'
;
import
{
XAddress
,
ChinaAddressV4Data
,
Datetime
,
XInput
}
from
'vux'
import
{
XAddress
,
ChinaAddressV4Data
,
Datetime
,
XInput
,
Confirm
}
from
'vux'
export
default
{
export
default
{
name
:
'punchClockDetail'
,
name
:
'punchClockDetail'
,
components
:{
XAddress
,
Datetime
,
XInput
},
components
:{
XAddress
,
Datetime
,
XInput
,
Confirm
},
data
()
{
data
()
{
return
{
return
{
address
:[],
address
:[],
addressData
:
ChinaAddressV4Data
,
addressData
:
ChinaAddressV4Data
,
showAddress
:
false
,
showAddress
:
false
,
isShowDate
:
false
,
isShowDate
:
false
,
isShowConfirm
:
false
,
value
:{
value
:{
iEmploeeId
:
""
,
//员工主键
iEmploeeId
:
""
,
//员工主键
dCheckDate
:
""
,
//打卡日期
dCheckDate
:
""
,
//打卡日期
...
@@ -176,32 +183,33 @@ export default {
...
@@ -176,32 +183,33 @@ export default {
sCreateAppid
:
""
,
//openID
sCreateAppid
:
""
,
//openID
iStatus
:
1
,
iStatus
:
1
,
},
},
status
:
0
,
//0 新增,1 修改,2 只读
status
:
0
,
//0 新增,1 修改,2 只读,3 补卡
readOnly
:
false
,
//是否只读
}
}
},
},
computed
:{
computed
:{
...
mapState
({
...
mapState
({
hdr
:
state
=>
state
.
healthStatistics
.
hdr
,
hdr
:
state
=>
state
.
healthStatistics
.
hdr
,
})
}),
btnName
(){
if
(
this
.
status
==
0
)
return
"新增"
;
else
if
(
this
.
status
==
1
)
return
"修改"
;
else
return
"补卡"
}
},
},
async
activated
(){
async
activated
(){
this
.
status
=
this
.
$route
.
query
.
readOnly
==
'true'
?
2
:
0
;
this
.
status
=
parseInt
(
this
.
$route
.
query
.
readOnly
)
||
0
if
(
this
.
$route
.
query
.
readOnly
==
'true'
){
this
.
status
=
2
var
date
=
new
Date
(
Number
(
this
.
$route
.
query
.
dDate
))
if
(
util
.
dateFormat
(
date
,
"yyyy-MM-dd"
)
==
util
.
dateFormat
(
new
Date
(),
"yyyy-MM-dd"
)){
this
.
status
=
1
}
}
this
.
value
.
sCreateAppid
=
this
.
$route
.
params
.
openId
this
.
value
.
sCreateAppid
=
this
.
$route
.
params
.
openId
if
(
this
.
status
>
0
){
if
(
/^1$|^2$/
.
test
(
this
.
status
)
){
await
this
.
getHealthDate
();
await
this
.
getHealthDate
();
}
else
{
}
else
{
this
.
value
.
iEmploeeId
=
this
.
$route
.
params
.
id
this
.
value
.
iEmploeeId
=
this
.
$route
.
params
.
id
this
.
value
.
sAddressFull
=
this
.
$route
.
params
.
address
this
.
value
.
sAddressFull
=
this
.
$route
.
params
.
address
}
}
this
.
value
.
dCheckDate
=
this
.
value
.
tCreateTime
=
util
.
dateFormat
(
new
Date
(),
"yyyy-MM-dd hh:mm:ss"
)
this
.
value
.
dCheckDate
=
this
.
value
.
tCreateTime
=
util
.
dateFormat
(
new
Date
(),
"yyyy-MM-dd hh:mm:ss"
)
if
(
this
.
status
==
3
){
this
.
value
.
dCheckDate
=
util
.
dateFormat
(
new
Date
(
Number
(
this
.
$route
.
query
.
dDate
)),
"yyyy-MM-dd"
)
}
},
},
methods
:{
methods
:{
async
getHealthDate
(){
async
getHealthDate
(){
...
@@ -241,17 +249,27 @@ export default {
...
@@ -241,17 +249,27 @@ export default {
onShadowChange
(
e
){
onShadowChange
(
e
){
console
.
log
(
e
)
console
.
log
(
e
)
},
},
async
upData
(){
//保存数据
upData
(){
//保存数据
if
(
this
.
checkData
()){
if
(
this
.
checkData
()){
this
.
value
.
iStatus
=
this
.
status
>
0
?
2
:
1
if
(
this
.
status
>
0
){
this
.
isShowConfirm
=
true
}
else
{
this
.
saveData
()
}
}
},
onConfirm
(){
this
.
saveData
()
},
async
saveData
(){
this
.
value
.
iStatus
=
this
.
status
==
1
?
2
:
1
var
value
=
await
this
.
request
(
"saveHealth"
,{
var
value
=
await
this
.
request
(
"saveHealth"
,{
data
:
this
.
value
,
data
:
this
.
value
,
},
"加载中"
,{})
},
"加载中"
,{})
if
(
/^
\d
+$/
.
test
(
value
)){
if
(
/^
\d
+$/
.
test
(
value
)){
wx
.
miniProgram
.
navigateBack
()
wx
.
miniProgram
.
navigateBack
()
}
else
{
}
else
{
this
.
$vux
.
toast
.
text
(
this
.
status
>
0
?
'修改失败!'
:
'保存失败!'
,
'middle'
);
this
.
$vux
.
toast
.
text
(
this
.
status
==
0
?
'保存'
:(
this
.
status
==
1
?
'修改'
:
'补卡'
)
+
'失败!'
,
'middle'
);
}
}
}
},
},
checkData
(){
checkData
(){
...
...
src/view/healthCard/statistics/chart.vue
View file @
304db003
...
@@ -537,7 +537,7 @@ export default {
...
@@ -537,7 +537,7 @@ export default {
this
.
$router
.
push
({
name
:
'healthCardStatisticsList'
,
params
:{
type
:
type
}});
this
.
$router
.
push
({
name
:
'healthCardStatisticsList'
,
params
:{
type
:
type
}});
},
},
routerToPunchClockDetail
(
item
){
routerToPunchClockDetail
(
item
){
this
.
$router
.
push
({
name
:
'punchClockDetail'
,
params
:{
id
:
'1'
,
address
:
'1'
,
openId
:
item
.
sCreateAppid
},
query
:{
readOnly
:
'
true
'
,
dDate
:
new
Date
(
Util
.
dateFormat
(
this
.
hdr
.
dDate
,
'yyyy-MM-dd'
)).
getTime
()}})
this
.
$router
.
push
({
name
:
'punchClockDetail'
,
params
:{
id
:
'1'
,
address
:
'1'
,
openId
:
item
.
sCreateAppid
},
query
:{
readOnly
:
'
2
'
,
dDate
:
new
Date
(
Util
.
dateFormat
(
this
.
hdr
.
dDate
,
'yyyy-MM-dd'
)).
getTime
()}})
}
}
}
}
}
}
...
...
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