浏览代码

我的考勤展示修改

ouyj 3 周之前
父节点
当前提交
ec8467ceac
共有 1 个文件被更改,包括 76 次插入43 次删除
  1. 76 43
      pages/mine/checkIn/checkIn.vue

+ 76 - 43
pages/mine/checkIn/checkIn.vue

@@ -16,59 +16,87 @@
 			<view class="check-in-container">
 				<text class="todayAttTitle">今日签到信息</text>
 				<view class="action-buttons">
-					<text class="exceptionText" v-if="lackCardState" @click="toBuKa">处理异常</text>
+					<text class="exceptionText" v-if="lackCardState && config.companyCode !== 'yz'" @click="toBuKa">处理异常</text>
           <text class="viewMoreText" @click="showAllRecords">查看更多</text>
 				</view>
-				<view class="info-row">
-					<view>
-						<text class="ygoa_icon icon-date"></text>
-						<text class="value">日期:</text>
-					</view>
+				
+				<!-- 非yz公司显示原有格式 -->
+				<template v-if="config.companyCode !== 'yz'">
+					<view class="info-row">
+						<view>
+							<text class="ygoa_icon icon-date"></text>
+							<text class="value">日期:</text>
+						</view>
 
-					<text class="label">{{ todayData.day }}</text>
-				</view>
-				<view class="info-row">
-					<view>
-						<text class="ygoa-icon icon-day"></text>
-						<text class="value" v-if="!clockMultiple">晨签时间:</text>
-						<text class="value" v-if="clockMultiple">早上签到:</text>
-					</view>
-					<view>
-						<text class="label">{{ todayData.startTime || '未打卡' }}</text>
-						<text class="att_status" v-if="config.companyCode !== 'yz'">{{todayData.startStatus}}</text>
+						<text class="label">{{ todayData.day }}</text>
 					</view>
-				</view>
-				<view class="info-row" v-if="clockMultiple">
-					<view>
-						<text class="ygoa-icon icon-day"></text> 
-						<text class="value">早上签退:</text>
+					<view class="info-row">
+						<view>
+							<text class="ygoa_icon icon-day"></text>
+							<text class="value" v-if="!clockMultiple">晨签时间:</text>
+							<text class="value" v-if="clockMultiple">早上签到:</text>
+						</view>
+						<view>
+							<text class="label">{{ todayData.startTime || '未打卡' }}</text>
+							<text class="att_status">{{todayData.startStatus}}</text>
+						</view>
 					</view>
-					<view>
-						<text class="label">{{ todayData.endTimeAm || '未打卡' }}</text>
-						<text class="att_status" v-if="config.companyCode !== 'yz'">{{todayData.endStatusForAm}}</text>
+					<view class="info-row" v-if="clockMultiple">
+						<view>
+							<text class="ygoa_icon icon-day"></text>
+							<text class="value">早上签退:</text>
+						</view>
+						<view>
+							<text class="label">{{ todayData.endTimeAm || '未打卡' }}</text>
+							<text class="att_status">{{todayData.endStatusForAm}}</text>
+						</view>
 					</view>
-				</view>
-				<view class="info-row" v-if="clockMultiple">
-					<view>
-						<text class="ygoa-icon icon-night"></text> 
-						<text class="value">下午签到:</text>
+					<view class="info-row" v-if="clockMultiple">
+						<view>
+							<text class="ygoa_icon icon-night"></text>
+							<text class="value">下午签到:</text>
+						</view>
+						<view>
+							<text class="label">{{ todayData.startTimePm || '未打卡' }}</text>
+							<text class="att_status">{{todayData.startStatusForPm}}</text>
+						</view>
 					</view>
-					<view>
-						<text class="label">{{ todayData.startTimePm || '未打卡' }}</text>
-						<text class="att_status" v-if="config.companyCode !== 'yz'">{{todayData.startStatusForPm}}</text>
+					<view class="info-row">
+						<view>
+							<text class="ygoa_icon icon-night"></text>
+							<text class="value" v-if="!clockMultiple">晚签时间:</text>
+							<text class="value" v-if="clockMultiple">下午签退:</text>
+						</view>
+						<view>
+							<text class="label">{{ todayData.endTime || '未打卡' }}</text>
+							<text class="att_status">{{todayData.endStatus}}</text>
+						</view>
 					</view>
-				</view>
-				<view class="info-row">
-					<view>
-						<text class="ygoa-icon icon-night"></text> 
-						<text class="value" v-if="!clockMultiple">晚签时间:</text>
-						<text class="value" v-if="clockMultiple">下午签退:</text>
+				</template>
+				
+				<!-- yz公司显示所有打卡记录列表 -->
+				<template v-else>
+					<view class="info-row">
+						<view>
+							<text class="ygoa_icon icon-date"></text>
+							<text class="value">日期:</text>
+						</view>
+						<text class="label">{{ todayData.day }}</text>
 					</view>
-					<view>
-						<text class="label">{{ todayData.endTime || '未打卡' }}</text>
-						<text class="att_status" v-if="config.companyCode !== 'yz'">{{todayData.endStatus}}</text>
+					
+					<view v-if="currentAttList.length === 0" class="info-row">
+						<text class="label" style="color: #999; text-align: center; width: 100%;">暂无打卡记录</text>
 					</view>
-				</view>
+					
+					<view class="info-row" v-for="(item, index) in currentAttList" :key="index">
+            <view>
+              <text class="value">{{ formatAttType(item.att_type_id) }}:</text>
+            </view>
+            <view>
+              <text class="label">{{ item.att_time }}</text>
+            </view>
+          </view>
+				</template>
 
 			</view>
 			
@@ -430,6 +458,11 @@
 		getMyQDQtAttendance(params).then(({ returnParams }) => {
 			//定义一个数组用于接收日历data
 			const thisCalenderData=[]
+			// yz公司不展示缺卡信息
+			if (config.companyCode === 'yz') {
+				calenderData.value = []
+				return
+			}
 			returnParams.list.forEach(item => {
 				if ((!item.type.includes('1') || !item.type.includes('2'))&&item.att_date.slice(0, 10)!==todayData.day) {
 					const calenderDataInfo = {