Browse Source

请假

tall-leave
xuesinan 3 years ago
parent
commit
8cb0c78979
  1. 122
      index.html

122
index.html

@ -55,18 +55,17 @@
data-url="http://101.201.226.163:7320/v1.0" data-type="1" data-tid="tid444"
data-did="did555" style="height:500px;width:100%">
<!-- 考勤插件 -->
<div data-root="p1473554031225085952" style="height: 100%; width: 100%;">
<div data-root="p1539144813097783296" style="height: 100%; width: 100%;">
<div class="pb-3 flex justify-between items-center">
<div class="flex items-center border border-blue-500 rounded-sm">
<span class="px-2 py-1.5 text-sm text-white bg-blue-500 rounded-sm"
onclick="p1473554031225085952.showPopup()">请假申请</span>
onclick="p1539144813097783296.showPopup()">请假申请</span>
</div>
<div class="flex items-center">
<div class="ml-2" onclick="p1473554031225085952.jumpDetails(this)">
<!-- <img style="width:15px" src="https://www.tall.wiki/staticrec/icon/right.svg" /> -->
<span class="text-blue-500 text-xs">查看更多</span>
<div class="flex items-center">-
<div class="ml-2" onclick="p1539144813097783296.jumpDetails(this)">
<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/right.svg" />
<!-- <span class="text-blue-500 text-xs">查看更多</span> -->
</div>
</div>
</div>
@ -80,19 +79,6 @@
</div>
<div class="record-wrap">
<div class="py-1.5 flex items-center text-center border-b">
<div class="px-1 text-sm" style="width: 20%;">张三</div>
<div class="px-1 text-sm" style="width: 16%;">加班</div>
<div class="px-1 text-sm" style="width: 42%;">
<div>5.21 09:00</div>-<div>5.21 18:00</div>
</div>
<div class="px-1 text-sm" style="width: 22%;">
<div
class="inline-block px-2 py-1.5 text-xs text-white bg-blue-500 rounded-sm">
通过</div>
</div>
</div>
<div class="py-1.5 flex items-center text-center border-b">
<div class="px-1 text-sm" style="width: 20%;">薛思男</div>
<div class="px-1 text-sm" style="width: 16%;">请假</div>
@ -103,18 +89,15 @@
<div class="py-1.5 flex items-center text-center border-b">
<div class="px-1 text-sm" style="width: 20%;">张三</div>
<div class="px-1 text-sm" style="width: 16%;">调休</div>
<div class="px-1 text-sm" style="width: 42%;">5.21 9:00 - 5.21 18:00
<div class="px-1 text-sm" style="width: 16%;">加班</div>
<div class="px-1 text-sm" style="width: 42%;">
<div>5.21 09:00 - 5.21 18:00</div>
</div>
<div class="px-1 text-sm" style="width: 22%;">待审批</div>
</div>
<div class="py-1.5 flex items-center text-center border-b">
<div class="px-1 text-sm" style="width: 20%;">张三</div>
<div class="px-1 text-sm" style="width: 16%;">弹性</div>
<div class="px-1 text-sm" style="width: 42%;">5.21 9:00 - 5.21 18:00
<div class="px-1 text-sm" style="width: 22%;">
<div
class="inline-block px-2 py-1.5 text-xs text-white bg-blue-500 rounded-sm">
通过</div>
</div>
<div class="px-1 text-sm" style="width: 22%;">待审批</div>
</div>
</div>
</div>
@ -177,7 +160,7 @@
<input
class="reviewer-1 px-1 focus:outline-none border border-gray-300 rounded"
style="width: 180px; height: 32px" type="text"
onFocus="p1473554031225085952.show(1)" />
onFocus="p1539144813097783296.show(1)" />
</div>
<div class="mt-3 flex items-center text-sm" style="color: #595959;">
@ -185,7 +168,7 @@
<input
class="reviewer-2 px-1 focus:outline-none border border-gray-300 rounded"
style="width: 180px; height: 32px" type="text"
onFocus="p1473554031225085952.show(2)" />
onFocus="p1539144813097783296.show(2)" />
</div>
<div class="mt-3 flex items-center text-sm" style="color: #595959;">
@ -193,16 +176,16 @@
<input
class="reviewer-3 px-1 focus:outline-none border border-gray-300 rounded"
style="width: 180px; height: 32px" type="text"
onFocus="p1473554031225085952.show(3)" />
onFocus="p1539144813097783296.show(3)" />
</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: 16px; border-right: 1px solid rgba(0, 0, 0, .1);"
onclick="p1473554031225085952.hidePopup()">取消</div>
onclick="p1539144813097783296.hidePopup()">取消</div>
<div class="w-2/4 h-14 flex justify-center items-center text-blue-500"
style="font-size: 16px;" onclick="p1473554031225085952.punch()">提交
style="font-size: 16px;" onclick="p1539144813097783296.punch()">提交
</div>
</div>
</div>
@ -214,10 +197,10 @@
<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="p1473554031225085952.hide()">取消</span>
onclick="p1539144813097783296.hide()">取消</span>
<span class="font-bold">选择审核人</span>
<span class="text-blue-500"
onclick="p1473554031225085952.choose()">确定</span>
onclick="p1539144813097783296.choose()">确定</span>
</div>
<div class="bg-gray-200" style="width:100%;height: 1px"></div>
<ul class="flex flex-col text-center"
@ -228,51 +211,33 @@
</div>
<script>
var p1473554031225085952 = {
token: '',
projectId: '',
roleId: '',
var p1539144813097783296_config = {
urlAddress: 'http://101.201.226.163:7320/v1.0',
}
</script>
<script>
var p1539144813097783296 = {
dom: '',
lists: [],
token: '',
projectId: '', // 项目id
lists: [], // 项目成员列表
currentIndex: '', // 当前点击的审核人下标
checkerId: '', // 审核员id
currReviewer: 1, // 当前选择的审核人等级
init() {
this.dom = document.querySelector("div[data-root=p1473554031225085952]");
this.dom = document.querySelector("div[data-root=p1539144813097783296]");
var domBox = this.dom.parentNode;
var title = this.dom.querySelector('.title');
// 获取父元素携带的参数
var userId = domBox.getAttribute("data-uid");
this.token = domBox.getAttribute('data-token');
this.projectId = domBox.getAttribute("data-pid");
this.roleId = domBox.getAttribute("data-rid");
// 初始化的时候 获取token
this.getTokenByUserId(userId);
},
// 获取token
getTokenByUserId(userId) {
var that = this
fetch(`https://test.tall.wiki/gateway/tall3/v3.0/users/userId?userId=${userId}`)
.then(function(response) {
return response.json();
})
.then(function(res) {
const {
success,
code,
data,
msg
} = res;
if (success && code === 200) {
that.token = data.token;
// 查询项目成员列表
that.getQueryChecker()
} else {
console.log('msg: ', msg);
}
});
// 查询项目成员列表
this.getQueryChecker();
// 查询请假信息
this.getClockQuery()
},
/**
@ -298,7 +263,7 @@
projectId: that.projectId
}
});
var url = 'https://test.tall.wiki/gateway/defaultwbs/deliver/queryChecker';
var url = `${p1539144813097783296_config.urlAddress}/deliver/queryChecker`;
fetch(url, {
method: 'POST',
mode: 'cors',
@ -323,8 +288,6 @@
data[i].choose = true
that.lists.push(data[i])
}
// 查询请假信息
that.getClockQuery()
} else {
console.log('msg: ', msg);
}
@ -360,14 +323,14 @@
statusChoose.style.display = 'block';
var list = ''
for (let i = 0; i < this.lists.length; i++) {
list += `<li class="py-3" onclick="p1473554031225085952.chooseItem(${i})">` + this.lists[i]
list += `<li class="py-3" onclick="p1539144813097783296.chooseItem(${i})">` + this.lists[i]
.name + '</li>';
}
var ul = this.dom.querySelector('ul');
ul.innerHTML = list
ul.innerHTML = list;
},
// 选择
// 点击审核人名称选择
chooseItem(index) {
this.currentIndex = index;
var lis = this.dom.querySelectorAll('li');
@ -385,9 +348,6 @@
/**
* 确定 选择审核人
* @param { Array } codeAndAnswerList code和答案
* @param { String } projectId 项目ID
* @param { Number } codeAndAnswerList 提交人类型(0平车 1人)
*/
choose() {
const that = this;
@ -444,7 +404,7 @@
}
}
}
p1473554031225085952.init()
p1539144813097783296.init()
</script>
</div>
</div>

Loading…
Cancel
Save