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
9a0b2dce
Commit
9a0b2dce
authored
Feb 09, 2020
by
godwithdh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confirm
parent
3f28eccd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
punchClockDetail.vue
src/view/healthCard/punchClockDetail.vue
+27
-10
No files found.
src/view/healthCard/punchClockDetail.vue
View file @
9a0b2dce
...
@@ -141,23 +141,30 @@
...
@@ -141,23 +141,30 @@
<textarea
:placeholder=
"status==2 ? '' : '请输入'"
: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"
>
{{
!
status
?
'提交'
:
'修改'
}}
</button>
<confirm
v-model=
"isShowConfirm"
title=
"提示"
@
on-confirm=
"onConfirm"
>
<p
style=
"text-align:center;"
>
修改数据会覆盖原来的数据,是否继续?
</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
:
""
,
//打卡日期
...
@@ -234,19 +241,29 @@ export default {
...
@@ -234,19 +241,29 @@ 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
){
var
value
=
await
this
.
request
(
"saveHealth"
,{
this
.
isShowConfirm
=
true
data
:
this
.
value
,
},
"加载中"
,{})
if
(
/^
\d
+$/
.
test
(
value
)){
wx
.
miniProgram
.
navigateBack
()
}
else
{
}
else
{
this
.
$vux
.
toast
.
text
(
this
.
status
>
0
?
'修改失败!'
:
'保存失败!'
,
'middle'
);
this
.
saveData
()
}
}
}
}
},
},
onConfirm
(){
this
.
saveData
()
},
async
saveData
(){
this
.
value
.
iStatus
=
this
.
status
>
0
?
2
:
1
var
value
=
await
this
.
request
(
"saveHealth"
,{
data
:
this
.
value
,
},
"加载中"
,{})
if
(
/^
\d
+$/
.
test
(
value
)){
wx
.
miniProgram
.
navigateBack
()
}
else
{
this
.
$vux
.
toast
.
text
(
this
.
status
>
0
?
'修改失败!'
:
'保存失败!'
,
'middle'
);
}
},
checkData
(){
checkData
(){
if
(
!
this
.
value
.
sStatus
){
if
(
!
this
.
value
.
sStatus
){
this
.
$vux
.
toast
.
text
(
'健康状态必填!'
,
'middle'
);
this
.
$vux
.
toast
.
text
(
'健康状态必填!'
,
'middle'
);
...
...
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