Browse Source

打卡

tall-check-work-2
xuesinan 4 years ago
parent
commit
db93cf2078
  1. 76
      index.html

76
index.html

@ -49,24 +49,24 @@
<div data-tname="考勤" data-pid="1458744703108521984" data-uid="1438701238123368448" data-rid="1458744707302825984" data-tid="tid444" data-did="did555" style="height:500px;width:100%">
<!-- 考勤插件 -->
<div data-root="p1432643387798069248" style="height: 100%; width: calc(100% + 30px); margin-left: -15px;">
<div class="px-4 pb-3 flex justify-between items-center border-b">
<div data-root="p1473554031225085952" style="height: 100%; width: 100%;">
<div class="pb-3 flex justify-between items-center border-b">
<div class="flex items-center border border-blue-500 rounded-sm">
<span class="px-2.5 h-6 leading-6 text-sm text-white bg-blue-500">签到</span>
<span class="px-2.5 h-6 leading-6 text-sm text-blue-500">请假</span>
</div>
<div onclick="p1432643387798069248.jumpDetails(this)">
<div onclick="p1473554031225085952.jumpDetails(this)">
<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/right.svg" />
</div>
</div>
<div class="mt-2 px-2">
<div class="flex items-center text-center h-10 border-b">
<!-- <div class="flex items-center text-center h-10 border-b">
<div class="text-sm" style="width: 20%;">姓名</div>
<div class="text-sm" style="width: 25%;">早打卡</div>
<div class="text-sm" style="width: 25%;">晚打卡</div>
<div class="text-sm" style="width: 30%;">审核人</div>
</div>
</div> -->
<div class="record-wrap">
<div class="flex items-center text-center h-10 border-b">
@ -84,7 +84,7 @@
</div>
</div>
<div class="text-sm" style="width: 30%;">
<div class="flex flex-nowrap border py-1 px-3 rounded-md" onclick="p1432643387798069248.show()">
<div class="flex justify-between flex-nowrap border py-1 px-3 rounded-md" onclick="p1473554031225085952.show()">
<div class="startBtn mr-1">审核人</div>
<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/down.svg" />
</div>
@ -97,9 +97,9 @@
<div class="w-screen h-screen fixed z-20 statusChoose bg-black bg-opacity-50" style="display:none;top: 0;left: 0;">
<div class="flex flex-col absolute w-full bg-white" style="bottom: 0;">
<div class="flex flex-row justify-between px-5 py-4">
<span class="text-gray-400" onclick="p1432643387798069248.hide()">取消</span>
<span class="text-gray-400" onclick="p1473554031225085952.hide()">取消</span>
<span class="font-bold">选择审核人</span>
<span class="text-blue-500" onclick="p1432643387798069248.choose()">确定</span>
<span class="text-blue-500" onclick="p1473554031225085952.choose()">确定</span>
</div>
<div class="bg-gray-200" style="width:100%;height: 1px"></div>
<ul class="flex flex-col text-center" style="height: 240px;overflow-y: auto;"></ul>
@ -122,15 +122,15 @@
<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/right.svg" />
</div>
</div>
<div class="h-12 flex justify-between items-center text-sm" style="border-bottom: 1px solid rgba(0, 0, 0, .1); color: #595959;" onclick="p1432643387798069248.show()">
<div class="h-12 flex justify-between items-center text-sm" style="border-bottom: 1px solid rgba(0, 0, 0, .1); color: #595959;" onclick="p1473554031225085952.show()">
<div>审核人</div>
<div class="flex items-center"><span class="checker">周勇</span><img style="width:15px" src="https://www.tall.wiki/staticrec/icon/right.svg" /></div>
</div>
</div>
<div class="mt-4 flex" style="border-top: 1px solid rgba(0, 0, 0, .1);">
<div class="w-2/4 h-14 flex justify-center items-center" style="font-size: 17px; border-right: 1px solid rgba(0, 0, 0, .1);" onclick="p1432643387798069248.hidePopup()">取消</div>
<div class="w-2/4 h-14 flex justify-center items-center text-blue-500" style="font-size: 17px;" onclick="p1432643387798069248.punch()">提交</div>
<div class="w-2/4 h-14 flex justify-center items-center" style="font-size: 17px; border-right: 1px solid rgba(0, 0, 0, .1);" onclick="p1473554031225085952.hidePopup()">取消</div>
<div class="w-2/4 h-14 flex justify-center items-center text-blue-500" style="font-size: 17px;" onclick="p1473554031225085952.punch()">提交</div>
</div>
</div>
</div>
@ -138,7 +138,7 @@
</div>
<script>
var p1432643387798069248 = {
var p1473554031225085952 = {
token: '',
projectId: '',
roleId: '',
@ -154,7 +154,7 @@
clockType: -1, // 打卡类型 0 早打卡 1 晚打卡
init() {
this.dom = document.querySelector("div[data-root=p1432643387798069248]");
this.dom = document.querySelector("div[data-root=p1473554031225085952]");
var domBox = this.dom.parentNode;
var title = this.dom.querySelector('.title');
@ -360,7 +360,7 @@
statusChoose.style.display='block';
var list = ''
for (let i = 0; i < this.lists.length; i++) {
list += `<li class="py-3" onclick="p1432643387798069248.chooseItem(${i})">` + this.lists[i].name + '</li>';
list += `<li class="py-3" onclick="p1473554031225085952.chooseItem(${i})">` + this.lists[i].name + '</li>';
}
var ul = this.dom.querySelector('ul');
ul.innerHTML = list
@ -561,36 +561,34 @@
html += `<div class="line-through font-bold">${morning}</div>`;
} else if (record.morningStatus === 3) {
html += `<div class="font-bold">${morning}</div>`;
} else if (that.today !== that.recordTime) {
html += `<div>未打卡</div>`;
} else {
html += `<button class="morningClockBtn m-auto py-1 rounded bg-blue-500 text-xs text-white" style="width: 50px;" onclick="p1432643387798069248.showPopup(0)">早打卡</button>`;
html += `<button class="morningClockBtn m-auto py-1 rounded bg-blue-500 text-xs text-white" style="width: 50px;" onclick="p1473554031225085952.showPopup(0)">早打卡</button>`;
}
}
if (record.isChecker) {
html += `<input class="morning-input-${index} border max-w-full focus:outline-none" style="display: none;" type="time" value="${morning}" onblur="p1432643387798069248.changeTimeData(this.value, ${index}, 'morning')" />`;
html += `<input class="morning-input-${index} border max-w-full focus:outline-none" style="display: none;" type="time" value="${morning}" onblur="p1473554031225085952.changeTimeData(this.value, ${index}, 'morning')" />`;
if (record.morningStatus === 1) {
html += `<div class="morning-time-${index} relative inline-block" onclick="p1432643387798069248.showAction(${index}, 'morning')">${morning}
html += `<div class="morning-time-${index} relative inline-block" onclick="p1473554031225085952.showAction(${index}, 'morning')">${morning}
<span class="absolute inline-block rounded-full bg-red-500" style="top: 0; right: -10px; width: 6px; height: 6px;"></span>
</div>`;
} else if (record.morningStatus === 2) {
html += `<div class="morning-time-${index} line-through" onclick="p1432643387798069248.showAction(${index}, 'morning')">${morning}</div>`;
html += `<div class="morning-time-${index} line-through" onclick="p1473554031225085952.showAction(${index}, 'morning')">${morning}</div>`;
} else if (record.morningStatus === 3) {
html += `<div class="morning-time-${index}" onclick="p1432643387798069248.showAction(${index}, 'morning')">${morning}</div>`;
html += `<div class="morning-time-${index}" onclick="p1473554031225085952.showAction(${index}, 'morning')">${morning}</div>`;
} else {
html += `<div class="morning-time-${index}" onclick="p1432643387798069248.showAction(${index}, 'morning')">未打卡</div>`;
html += `<div class="morning-time-${index}" onclick="p1473554031225085952.showAction(${index}, 'morning')">未打卡</div>`;
}
}
// 操作面板
html += `<div class="morning-action-${index} absolute bg-white shadow-lg" style="display: none; bottom: 30px; left: -74px; border-radius: 5px; width: 248px;">
<div class="relative flex justify-between" style="padding: 8px;">
<button class="text-white bg-green-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1432643387798069248.rejectStatus(${index}, 2, 'morning')">审核</button>
<button class="text-white bg-red-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1432643387798069248.rejectStatus(${index}, 1, 'morning')">驳回</button>
<button class="text-white bg-blue-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1432643387798069248.changePunchTime(${index}, 'morning')">修改</button>
<button class="border" style="width: 52px; height: 26px; border-radius: 5px; border-color: #999; color: #595959;" onclick="p1432643387798069248.hideAction(${index}, 'morning')">取消</button>
<button class="text-white bg-green-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1473554031225085952.rejectStatus(${index}, 2, 'morning')">审核</button>
<button class="text-white bg-red-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1473554031225085952.rejectStatus(${index}, 1, 'morning')">驳回</button>
<button class="text-white bg-blue-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1473554031225085952.changePunchTime(${index}, 'morning')">修改</button>
<button class="border" style="width: 52px; height: 26px; border-radius: 5px; border-color: #999; color: #595959;" onclick="p1473554031225085952.hideAction(${index}, 'morning')">取消</button>
<div class="absolute w-0 h-0" style="left: 88px; top: 42px; font-size: 0; line-height: 0; border-width: 7px; border-color: #fff transparent transparent;"></div>
</div>
</div>`;
@ -618,36 +616,34 @@
html += `<div class="line-through font-bold">${night}</div>`;
} else if (record.nightStatus === 3) {
html += `<div class="font-bold">${night}</div>`;
} else if (that.today !== that.recordTime) {
html += `<div>未打卡</div>`;
} else {
html += `<button class="nightClockBtn m-auto py-1 rounded bg-blue-500 text-xs text-white" style="width: 50px;" onclick="p1432643387798069248.showPopup(1)">晚打卡</button>`;
html += `<button class="nightClockBtn m-auto py-1 rounded bg-blue-500 text-xs text-white" style="width: 50px;" onclick="p1473554031225085952.showPopup(1)">晚打卡</button>`;
}
}
if (record.isChecker) {
html += `<input class="night-input-${index} border max-w-full focus:outline-none" style="display: none;" type="time" value="${night}" onblur="p1432643387798069248.changeTimeData(this.value, ${index}, 'night')" />`;
html += `<input class="night-input-${index} border max-w-full focus:outline-none" style="display: none;" type="time" value="${night}" onblur="p1473554031225085952.changeTimeData(this.value, ${index}, 'night')" />`;
if (record.nightStatus === 1) {
html += `<div class="night-time-${index} relative inline-block" onclick="p1432643387798069248.showAction(${index}, 'night')">${night}
html += `<div class="night-time-${index} relative inline-block" onclick="p1473554031225085952.showAction(${index}, 'night')">${night}
<span class="absolute inline-block rounded-full bg-red-500" style="top: 0; right: -10px; width: 6px; height: 6px;"></span>
</div>`;
} else if (record.nightStatus === 2) {
html += `<div class="night-time-${index} line-through" onclick="p1432643387798069248.showAction(${index}, 'night')">${night}</div>`;
html += `<div class="night-time-${index} line-through" onclick="p1473554031225085952.showAction(${index}, 'night')">${night}</div>`;
} else if (record.nightStatus === 3) {
html += `<div class="night-time-${index}" onclick="p1432643387798069248.showAction(${index}, 'night')">${night}</div>`;
html += `<div class="night-time-${index}" onclick="p1473554031225085952.showAction(${index}, 'night')">${night}</div>`;
} else {
html += `<div class="night-time-${index}" onclick="p1432643387798069248.showAction(${index}, 'night')">未打卡</div>`;
html += `<div class="night-time-${index}" onclick="p1473554031225085952.showAction(${index}, 'night')">未打卡</div>`;
}
}
}
html += `<div class="night-action-${index} absolute bg-white shadow-lg" style="display: none; bottom: 30px; right: -74px; border-radius: 5px; width: 248px;">
<div class="relative flex justify-between" style="padding: 8px;">
<button class="text-white bg-green-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1432643387798069248.rejectStatus(${index}, 2, 'night')">审核</button>
<button class="text-white bg-red-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1432643387798069248.rejectStatus(${index}, 1, 'night')">驳回</button>
<button class="text-white bg-blue-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1432643387798069248.changePunchTime(${index}, 'night')">修改</button>
<button class="border" style="width: 52px; height: 26px; border-radius: 5px; border-color: #999; color: #595959;" onclick="p1432643387798069248.hideAction(${index}, 'night')">取消</button>
<button class="text-white bg-green-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1473554031225085952.rejectStatus(${index}, 2, 'night')">审核</button>
<button class="text-white bg-red-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1473554031225085952.rejectStatus(${index}, 1, 'night')">驳回</button>
<button class="text-white bg-blue-500" style="width: 52px; height: 26px; border-radius: 5px;" onclick="p1473554031225085952.changePunchTime(${index}, 'night')">修改</button>
<button class="border" style="width: 52px; height: 26px; border-radius: 5px; border-color: #999; color: #595959;" onclick="p1473554031225085952.hideAction(${index}, 'night')">取消</button>
<div class="absolute w-0 h-0" style="right: 88px; top: 42px; font-size: 0; line-height: 0; border-width: 7px; border-color: #fff transparent transparent;"></div>
</div>
</div>`;
@ -660,7 +656,7 @@
if (!record.isMine || record.isMine && record.morningStatus && record.nightStatus || that.today !== that.recordTime) {
html += `<div class="mr-1">${record.checkerName ? record.checkerName : that.lists[0].name}</div>`;
} else {
html += `<div class="flex flex-nowrap border py-1 px-3 rounded-md" onclick="p1432643387798069248.show()">`;
html += `<div class="flex justify-between flex-nowrap border py-1 px-3 rounded-md" onclick="p1473554031225085952.show()">`;
html += `<div class="startBtn mr-1">${checker}</div>`;
html += `<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/down.svg" />`;
html += `</div>`;
@ -693,7 +689,7 @@
location.href = `https://test.tall.wiki/checkwork/?pid=${pId}&uid=${uId}&rid=${rId}`;
}
}
p1432643387798069248.init()
p1473554031225085952.init()
</script>
</div>
</div>

Loading…
Cancel
Save