Просмотр исходного кода

修复非公出协单未填写地址,导致无法打卡的问题

dev01 1 неделя назад
Родитель
Сommit
60e2bf7027
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/pages/punchClock/punchClocks.jsx

+ 3 - 3
src/pages/punchClock/punchClocks.jsx

@@ -257,7 +257,7 @@ class PunchClocks extends Component {
       Taro.showToast({ title: '暂无公出申请,无法打卡', icon: 'none' });
       return;
     }
-    if (isNaN(parseInt(this.state.distance))) {
+    if (![5, 6].includes(dtails.type) && isNaN(parseInt(this.state.distance))) {
       Taro.hideLoading()
       Taro.showToast({ title: '定位错误,请联系管理员', icon: 'none' })
       return;
@@ -291,7 +291,7 @@ class PunchClocks extends Component {
     //   Taro.showToast({ title: '已超过合同规定时限,需审核通过,才可打卡!', icon: 'none' });
     //   return
     // }
-    if ([5, 6].indexOf(dtails.type) === -1 && this.state.imgs.length === 0) {
+    if (this.state.imgs.length === 0) {
       Taro.hideLoading()
       Taro.showToast({ title: '请上传打卡照片', icon: 'none' })
       return;
@@ -693,7 +693,7 @@ class PunchClocks extends Component {
                   </View>
                 </View>
                 {
-                  !(this.state.distance <= this.wxConfig.clockInRange && this.state.distance >= 0) &&
+                  !(this.state.distance <= this.wxConfig.clockInRange && this.state.distance >= 0) && ![5, 6].includes(dtails.type) &&
                   <View className='switchposition'>您不在打卡范围:
                     <Text className='stxt' onClick={this.selectArrder}>切换位置</Text>
                   </View>