|
@@ -87,7 +87,8 @@ class PunchClocks extends Component {
|
|
|
|
|
|
Taro.eventCenter.on('GoPunchIn', (arg) => {
|
|
|
this.setState({
|
|
|
- data: arg
|
|
|
+ data: arg,
|
|
|
+ isCalendar: false,
|
|
|
}, () => {
|
|
|
this.onmyDuration()
|
|
|
!!arg.id && this.onMyDurationMonth({ id: arg.id }, { year, month })
|
|
@@ -120,19 +121,23 @@ class PunchClocks extends Component {
|
|
|
}
|
|
|
|
|
|
onMyDurationMonth(val, time) {
|
|
|
+ Taro.showLoading({ title: '加载中...' });
|
|
|
myDurationMonth({
|
|
|
id: val.id,
|
|
|
year: time.year,
|
|
|
month: time.month,
|
|
|
}).then(v => {
|
|
|
+ Taro.hideLoading()
|
|
|
if (v.code === 200) {
|
|
|
this.setState({
|
|
|
dateList: v.data,
|
|
|
+ isCalendar: true,
|
|
|
})
|
|
|
} else {
|
|
|
Taro.showToast({ title: v.msg, icon: 'none' })
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
+ Taro.hideLoading()
|
|
|
Taro.showToast({
|
|
|
title: '系统错误,请稍后再试',
|
|
|
icon: 'none'
|
|
@@ -366,6 +371,7 @@ class PunchClocks extends Component {
|
|
|
/> */}
|
|
|
</View>
|
|
|
</View>
|
|
|
+
|
|
|
<View className='items'>
|
|
|
<View className='ititles'><Text style={{ width: "7px" }}></Text>上传附件:</View>
|
|
|
<ImagePicker
|