|
|
@ -44,46 +44,57 @@ |
|
|
|
|
|
|
|
<div data-tname="考勤" data-pid="1433332016270811136" data-uid="1217647686598135808" data-rid="rid333" data-tid="tid444" data-did="did555" style="height:50px;width:100%"> |
|
|
|
<div data-root="p1449944565271502848" style="height:100%;width:100%;"> |
|
|
|
<div class="title"></div> |
|
|
|
<div class="flex justify-between mt-4"> |
|
|
|
<div class="text-sm">培训委派</div> |
|
|
|
<div> |
|
|
|
<button class="nightClockBtn border text-xs rounded-md py-1 px-3" onclick="refuse()">拒绝</button> |
|
|
|
<button class="nightClockBtn bg-blue-500 text-xs rounded-md py-1 px-3 text-white">接受</button> |
|
|
|
<div class="teacher-box" style="display: none;"> |
|
|
|
<div class="title"></div> |
|
|
|
<div class="flex justify-between"> |
|
|
|
<div class="text-sm">培训委派</div> |
|
|
|
<div class="btn-group"> |
|
|
|
<button class="nightClockBtn border text-xs rounded-md py-1 px-3" onclick="p1449944565271502848.refuse()">拒绝</button> |
|
|
|
<button class="nightClockBtn bg-blue-500 text-xs rounded-md py-1 px-3 text-white">接受</button> |
|
|
|
</div> |
|
|
|
<div class="refuse-status" style="display: none;">已拒绝</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex justify-between mt-4"> |
|
|
|
<div class="text-sm"></div> |
|
|
|
<div class="text-sm text-yellow-400">时间原因已拒绝</div> |
|
|
|
</div> |
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm"> |
|
|
|
<p style="color: #999999;">山西跳协**培训红头文件</p> |
|
|
|
<button class="text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5">查看</button> |
|
|
|
</div> |
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm"> |
|
|
|
<p style="color: #999999;">报名人员</p> |
|
|
|
<button id="checkBmqk" class="text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5">查看</button> |
|
|
|
</div> |
|
|
|
<div class="pl-7 pr-7 pt fixed z-10 statusChoose bg-black bg-opacity-50" style="display:none;top: 0;bottom: 0;left: 0;right: 0;"> |
|
|
|
<div class=" bg-white"> |
|
|
|
<!-- <div class="bg-gray-200" style="width:100%;height: 1px"></div> --> |
|
|
|
<!-- <ul class="flex text-center" style="height: 240px;overflow-y: auto;"> |
|
|
|
11 |
|
|
|
</ul> --> |
|
|
|
<div style="height: 13rem;overflow-y: auto;"> |
|
|
|
<p class="mt-8 checkReject text-center">拒绝原因</p> |
|
|
|
<div class="pl-6 pr-6"> |
|
|
|
<div class="mt-8 border-b pt-2 pb-2"> |
|
|
|
<input type="text" class="border-none outline-none" style="width: 100%;" placeholder="请输入拒绝原因"> |
|
|
|
|
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm"> |
|
|
|
<p style="color: #999999;">山西跳协**培训红头文件</p> |
|
|
|
<button class="text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5" onclick="p1449944565271502848.jumpDetails()">查看</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm"> |
|
|
|
<p style="color: #999999;">报名人员</p> |
|
|
|
<button class="check-btn text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5" style="display: none;" onclick="p1449944565271502848.jumpDetails()">查看</button> |
|
|
|
<button class="check-btn-disabled text-xs text-gray-400 border border-gray-400 rounded-full w-10 h-5">查看</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="refuse-reason border-2 w-full mt-2.5 flex justify-between p-2 text-sm" style="display: none;"> |
|
|
|
<p class="w-20 flex-shrink-0" style="color: #999999;">拒绝原因</p> |
|
|
|
<div>时间原因已拒绝</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="pl-7 pr-7 pt fixed z-10 statusChoose bg-black bg-opacity-50" style="display:none;top: 0;bottom: 0;left: 0;right: 0; padding-top: calc((100vh - 250px) / 2);"> |
|
|
|
<div class="bg-white"> |
|
|
|
<div style="height: 13rem;overflow-y: auto;"> |
|
|
|
<p class="mt-8 checkReject text-center">拒绝原因</p> |
|
|
|
<div class="pl-6 pr-6"> |
|
|
|
<div class="mt-8 border-b pt-2 pb-2"> |
|
|
|
<input type="text" class="border-none outline-none" style="width: 100%;" placeholder="请输入拒绝原因"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="border-t btn mt-6 flex justify-between"> |
|
|
|
<div class="flex-1 text-center border-r h-full" style="line-height: 3.375rem;" onclick="p1449944565271502848.hide()">取消</div> |
|
|
|
<div class="flex-1 text-center h-full" style="line-height: 3.375rem;" onclick="p1449944565271502848.submit()">提交</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="border-t btn mt-6 flex justify-between"> |
|
|
|
<div class="flex-1 text-center border-r h-full" style="line-height: 3.375rem;" onclick="choose()">取消</div> |
|
|
|
<div class="flex-1 text-center h-full" style="line-height: 3.375rem;" onclick="hide()">提交</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="teacher-title"> |
|
|
|
<div class="title"></div> |
|
|
|
<div class="flex justify-between"> |
|
|
|
<div class="text-sm">培训委派</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -94,11 +105,6 @@ |
|
|
|
roleId: '', |
|
|
|
dom: '', |
|
|
|
lists: [], |
|
|
|
currentIndex: '', |
|
|
|
memberId: '', // 打卡人id |
|
|
|
checkerId: '', // 审核员id |
|
|
|
checkerName: '', // 审核员 |
|
|
|
id: '', // 记录id |
|
|
|
|
|
|
|
init() { |
|
|
|
this.dom = document.querySelector("div[data-root=p1449944565271502848]"); |
|
|
@ -124,33 +130,69 @@ |
|
|
|
const { success, code, data, msg } = res; |
|
|
|
if (success && code === 200) { |
|
|
|
that.token = data.token; |
|
|
|
// 查询考勤信息 |
|
|
|
that.getClockQuery() |
|
|
|
// 查询委派信息 |
|
|
|
that.getAppointStatus(); |
|
|
|
} else { |
|
|
|
console.log('msg: ', msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询委派信息 |
|
|
|
getAppointStatus() { |
|
|
|
var that = this; |
|
|
|
var teacherTitle = that.dom.querySelector('.teacher-title'); |
|
|
|
var teacherBox = that.dom.querySelector('.teacher-box'); |
|
|
|
teacherTitle.style.display = 'none'; |
|
|
|
teacherBox.style.display = 'block'; |
|
|
|
// fetch(`https://test.tall.wiki/gateway/sports/training/getAppoint`, { |
|
|
|
// headers: new Headers({ |
|
|
|
// 'Authorization': 'Bearer ' + that.token, |
|
|
|
// 'Content-Type': 'application/json; charset=utf-8' |
|
|
|
// }), |
|
|
|
// method: 'POST', |
|
|
|
// body: JSON.stringify({ |
|
|
|
// projectId: that.projectId, |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// .then(function(response) { |
|
|
|
// return response.json(); |
|
|
|
// }) |
|
|
|
// .then(function(res) { |
|
|
|
// const { success, code, data, msg } = res; |
|
|
|
// if (success && code === 200) { |
|
|
|
// if (!data) { |
|
|
|
// for (var i = 0; i < data.length; i++) { |
|
|
|
// if (data[i].mine == 1) { |
|
|
|
// var teacherTitle = that.dom.querySelector('.teacher-title'); |
|
|
|
// var teacherBox = that.dom.querySelector('.teacher-box'); |
|
|
|
// teacherTitle.style.display = 'none'; |
|
|
|
// teacherBox.style.display = 'block'; |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// console.log('msg: ', msg); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
}, |
|
|
|
|
|
|
|
// 培训委派拒绝按钮弹出框 |
|
|
|
refuse(){ |
|
|
|
var statusChoose = this.dom.querySelector('.statusChoose'); |
|
|
|
statusChoose.style.display='block'; |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 确定 选择审核人 |
|
|
|
* @param { Array } codeAndAnswerList code和答案 |
|
|
|
* @param { String } projectId 项目ID |
|
|
|
* @param { Number } codeAndAnswerList 提交人类型(0平车 1人) |
|
|
|
*/ |
|
|
|
choose(){ |
|
|
|
// const that = this; |
|
|
|
// const { dom } = that; |
|
|
|
// var startBtn = document.querySelector('.startBtn'); |
|
|
|
// startBtn.innerHTML = that.lists[that.currentIndex].name; |
|
|
|
// that.checkerId = that.lists[that.currentIndex].memberId |
|
|
|
that.hide() |
|
|
|
// 提交拒绝原因 |
|
|
|
submit() { |
|
|
|
var that = this; |
|
|
|
that.hide(); |
|
|
|
var reasonBox = that.dom.querySelector('.refuse-reason'); |
|
|
|
reasonBox.style.display = 'flex'; |
|
|
|
var btnGroup = that.dom.querySelector('.btn-group'); |
|
|
|
var refuseText = that.dom.querySelector('.refuse-status'); |
|
|
|
btnGroup.style.display = 'none'; |
|
|
|
refuseText.style.display = 'block'; |
|
|
|
}, |
|
|
|
|
|
|
|
// 取消 |
|
|
|