Browse Source

考勤插件

tall-check-work
xuesinan 3 years ago
parent
commit
7b34d714b9
  1. 27
      index.html

27
index.html

@ -73,7 +73,7 @@
<span class="nightClockAgree" style="color: #13acc4;font-weight: 700;display: none;"></span>
</div>
</div>
<div class="flex flex-nowrap border py-1 px-3 rounded-md startBtnBox" onclick="p1485171846022434817.show()">
<div class="flex flex-nowrap border border-solid border-gray-200 py-1 px-3 rounded-md startBtnBox" onclick="p1485171846022434817.show()">
<div class="startBtn mr-1">审核人</div>
<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/down.svg" />
</div>
@ -82,7 +82,7 @@
<div class="flex flex-nowrap ml-4" onclick="p1485171846022434817.jumpDetails(this)">
<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/right.svg" />
</div>
<div class="w-screen h-screen fixed z-10 statusChoose bg-black bg-opacity-50" style="display:none;top: 0;left: 0;">
<div class="w-screen h-screen fixed z-10 statusChoose bg-black bg-opacity-50" style="display:none;bottom: 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="p1485171846022434817.hide()">取消</span>
@ -90,7 +90,7 @@
<span class="text-blue-500" onclick="p1485171846022434817.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>
<ul class="flex flex-col text-center list-none" style="padding-left: 0; height: 240px; overflow-y: auto;"></ul>
</div>
</div>
</div>
@ -165,7 +165,6 @@
var url = 'http://101.201.226.163:7320/v1.0/clock/query';
fetch(url, {
method: 'POST',
mode: 'cors',
body: params,
headers: new Headers({
@ -178,23 +177,23 @@
}).then(function(res){
const { success, code, data, msg } = res;
if (success && code === 200) {
if(data && data.length && data[0].recordList && data[0].recordList.length){
if (data && data.length && data[0].recordList && data[0].recordList.length) {
that.memberId = data[0].recordList[0].memberId
that.id = data[0].recordList[0].id
// 审核人
if(data[0].recordList[0].lastCheckerId){
if (data[0].recordList[0].lastCheckerId) {
that.checkerId = data[0].recordList[0].lastCheckerId
}else if(data[0].recordList[0].checkerId){
} else if (data[0].recordList[0].checkerId) {
that.checkerId = data[0].recordList[0].checkerId
}else{
} else {
that.checkerId = ''
}
if(data[0].recordList[0].lastCheckerName){
if (data[0].recordList[0].lastCheckerName) {
that.checkerName = data[0].recordList[0].lastCheckerName
}else if(data[0].recordList[0].checkerName){
} else if (data[0].recordList[0].checkerName) {
that.checkerName = data[0].recordList[0].checkerName
}else{
} else {
that.checkerName = ''
}
@ -295,12 +294,14 @@
// 显示选择框
show(){
console.log('11111111');
var statusChoose = this.dom.querySelector('.statusChoose');
statusChoose.style.display='block';
var list = ''
for (let i=0;i < this.lists.length; i++) {
list += `<li class="py-3" onclick="p1485171846022434817.chooseItem(${i})">` + this.lists[i].name + '</li>';
}
console.log('22222222222', list);
var ul = this.dom.querySelector('ul');
ul.innerHTML = list
},
@ -311,10 +312,10 @@
var lis = this.dom.querySelectorAll('li');
for (var i = 0; i < lis.length; i++){
var item = lis[i];
if(i === index){
if (i === index) {
item.classList.add('text-white');
item.style.backgroundColor = '#3b82f6';
}else{
} else {
item.classList.remove('text-white');
item.style.backgroundColor = '#fff';
}

Loading…
Cancel
Save