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

处理非公出协单打卡结束日期于今天相等时无法打卡的问题

dev01 1 неделя назад
Родитель
Сommit
e6690e03fe

+ 1 - 1
src/pages/applyDepart/enterprise.jsx

@@ -180,7 +180,7 @@ class Enterprise extends Component {
 
   checkUserArchives(v) {
 
-    if (v.status == 2 && this.props.type == 0) {
+    if (v.status == 2 && [0, 5].includes(this.props.type)) {
       Taro.showToast({
         title: "请在“单位公共客户”中领取后,再次发起公出!",
         icon: 'none'

+ 1 - 1
src/pages/applyDepart/publicContent.jsx

@@ -935,7 +935,7 @@ class PublicContent extends Component {
         {/*  */}
         <View className="formItem" style={{ display: "block", paddingBottom: 0 }}>
           <View className="formName">
-            {this.state.totalDuration > info.workTimeInfor.minHours && <Text style={{ color: "red" }}>*</Text>}
+            {this.state.totalDuration > info.workTimeInfor.minHours && ![5, 6].includes(this.props.enterpriseInfor.type) && <Text style={{ color: "red" }}>*</Text>}
             附件:
           </View>
           {this.state.totalDuration > info.workTimeInfor.minHours &&

+ 1 - 1
src/pages/egressDetails/publicContent.jsx

@@ -1184,7 +1184,7 @@ class PublicContent extends Component {
         </View>
         <View className="formItem" style={{ display: "block" }}>
           <View className="formName">
-            {this.state.totalDuration > info.workTimeInfor.minHours && <Text style={{ color: "red" }}>*</Text>}
+            {this.state.totalDuration > info.workTimeInfor.minHours && ![5, 6].includes(dtails.type) && <Text style={{ color: "red" }}>*</Text>}
             附件:
           </View>
           {this.state.totalDuration > info.workTimeInfor.minHours &&

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

@@ -267,7 +267,7 @@ class PunchClocks extends Component {
       Taro.hideLoading()
       Taro.showToast({ title: '当前时间不在打卡时间范围内,无法打卡', icon: 'none' })
       return;
-    } else if (dayjs().isAfter(dtails.releaseEnds)) {
+    } else if (dayjs().isAfter(dayjs(dtails.releaseEnds).add(1, 'day'))) {
       Taro.hideLoading()
       Taro.showToast({ title: '当前时间不在打卡时间范围内,无法打卡', icon: 'none' })
       return;
@@ -464,7 +464,7 @@ class PunchClocks extends Component {
     const { dtails, distance, data } = this.state
     const newClockIn = !!data.prdcList && data.prdcList.length > 0 ? data.prdcList[0] : {};
     if ([5, 6].indexOf(dtails.type) > -1) {
-      if (!dayjs().isAfter(dtails.releaseEnds)) {
+      if (!dayjs().isAfter(dayjs(dtails.releaseEnds).add(1, 'day'))) {
         return [1, 2].includes(newClockIn.status) ? '#72cb78' : '#3f82e8'
       } else {
         return '#828e83'