|
@@ -437,8 +437,9 @@ function bindTaskNumEvent(){
|
|
|
$(".job-num").unbind("click").click(function(){
|
|
|
global_CheckerId = $(this).attr("data-id");
|
|
|
global_CheckerName=$(this).attr("data-name");
|
|
|
+ global_DeptMId=$(this).attr("data-dept");
|
|
|
$(".modal-container").show();
|
|
|
- getTasksList($(this).attr("data-dept"));
|
|
|
+ getTasksList();
|
|
|
})
|
|
|
}
|
|
|
//获取全部科室数据
|
|
@@ -466,8 +467,8 @@ function getCheckerList(){
|
|
|
}
|
|
|
|
|
|
//获取质控员任务列表
|
|
|
-function getTasksList(deptId){
|
|
|
- post(ywCheckApi.getTaskByUserId,{checkId:global_CheckerId,deptList:[deptId]}).then(res =>{
|
|
|
+function getTasksList(){
|
|
|
+ post(ywCheckApi.getTaskByUserId,{checkId:global_CheckerId,deptList:[global_DeptMId]}).then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
|
const list = res.data.data||{};
|
|
|
renderTaskTable(list);
|
|
@@ -500,15 +501,22 @@ function renderTaskTable(data) {
|
|
|
}
|
|
|
//移除任务事件
|
|
|
function bindDeleteEvent(){
|
|
|
+ const dom = `<div class="del-pop">
|
|
|
+ <div class="pop-title">确定移除该任务吗?</div>
|
|
|
+ <div class="pop-btns">
|
|
|
+ <button class="del-confirm">确定</button>
|
|
|
+ <button class="cancel">取消</button>
|
|
|
+ </div>
|
|
|
+ </div>`;
|
|
|
$(".taskTable .delete:not(.disable)").unbind("click").click(function(e){
|
|
|
- global_TaskCodes=[$(this).attr("code")];
|
|
|
- $(".del-pop").insertAfter($(this)).show();
|
|
|
- });
|
|
|
- $(".del-pop .cancel").unbind("click").click(function(){
|
|
|
- $(".del-pop").hide();
|
|
|
- });
|
|
|
- $(".del-pop .del-confirm").unbind("click").click(function(){
|
|
|
- allotTask(1);
|
|
|
+ global_TaskCodes=[$(this).attr("code")];console.log(3)
|
|
|
+ $(dom).insertAfter($(this)).show();
|
|
|
+ $(".del-pop .cancel").unbind("click").click(function(){
|
|
|
+ $(".del-pop").hide();
|
|
|
+ });
|
|
|
+ $(".del-pop .del-confirm").unbind("click").click(function(){
|
|
|
+ allotTask(1);
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -654,7 +662,7 @@ function allotTask(flag){
|
|
|
getCheckerList();
|
|
|
getTabData(1);
|
|
|
flag&&getTasksList(); //移除时更新已分配任务列表弹窗数据
|
|
|
- toast("分配成功");
|
|
|
+ toast("操作功");
|
|
|
}else{
|
|
|
toast(res.data.msg||'保存分配失败,请重试~');
|
|
|
}
|