|
@@ -18,7 +18,9 @@ const arrowLeft= require("./../images/arrow_left.png")
|
|
|
const arrowRight = require("./../images/arrow_right.png")
|
|
|
listenScroll()
|
|
|
let tabList = [], data_desc=["jobCreateTime"],data_asc=[],task_desc=["leaveHospitalDate"],task_asc=[];
|
|
|
-let global_DeptCheckers = [],global_Checkers={4:[],5:[],6:[]},global_CheckerId='',global_CheckerName='',
|
|
|
+let global_DeptCheckers = [],global_Checkers={4:[],5:[],6:[]},
|
|
|
+ global_CheckerId='',global_CheckerName='', //左边质检员选中id,name
|
|
|
+ global_CheckerNumId='',global_CheckerNumName='', //左边质检员数字id,name
|
|
|
global_checkerFilterName="",//左边核查员名字筛选
|
|
|
global_DeptId='',//左边质控员科室筛选id
|
|
|
global_DeptMId="", //左边质检员选中科室id
|
|
@@ -190,6 +192,8 @@ $(function() {
|
|
|
$(".modal-container .close").click(function(){
|
|
|
$(".modal-container").hide();
|
|
|
global_DeptNumId='';
|
|
|
+ global_CheckerNumId='';
|
|
|
+ global_CheckerNumName='';
|
|
|
if(global_deleted){
|
|
|
//移除后关闭弹窗时清空质控员选中状态:质控员id/name/科室id及右侧选中任务code
|
|
|
//并刷新左侧和右侧列表
|
|
@@ -443,6 +447,7 @@ function bindScoreSelect(){
|
|
|
}
|
|
|
//质控员列表渲染
|
|
|
function renderCheckerTable(){
|
|
|
+ //console.log(global_DeptId)
|
|
|
const totalArr = global_DeptId.trim()?global_DeptCheckers[global_DeptId]:global_Checkers[+global_activeTabCode+4];
|
|
|
let data = totalArr;
|
|
|
if(global_checkerFilterName){
|
|
@@ -572,8 +577,8 @@ function renderTab(data){
|
|
|
//任务数点击事件
|
|
|
function bindTaskNumEvent(){
|
|
|
$(".job-num").unbind("click").click(function(){
|
|
|
- global_CheckerId = $(this).attr("data-id");
|
|
|
- global_CheckerName=$(this).attr("data-name");
|
|
|
+ global_CheckerNumId = $(this).attr("data-id");
|
|
|
+ global_CheckerNumName=$(this).attr("data-name");
|
|
|
global_DeptNumId=$(this).attr("data-dept");
|
|
|
$(".modal-container").show();
|
|
|
global_deleted=false;
|
|
@@ -608,7 +613,7 @@ function getCheckerList(){
|
|
|
function getTasksList(){
|
|
|
post(ywCheckApi.getTaskByUserId,{
|
|
|
jobType:global_activeTabCode,
|
|
|
- checkId:global_CheckerId,
|
|
|
+ checkId:global_CheckerNumId,
|
|
|
deptList:global_DeptNumId.trim()?[global_DeptNumId]:[],
|
|
|
asc:task_asc,
|
|
|
desc:task_desc,
|
|
@@ -694,6 +699,10 @@ function formatDeptChecker(list){
|
|
|
});
|
|
|
rendeDeptList();
|
|
|
rendeCheckerList();
|
|
|
+ //院级任务时科室“全部”不遍历
|
|
|
+ if(+global_activeTabCode===2){
|
|
|
+ global_DeptId='-1';
|
|
|
+ }
|
|
|
renderCheckerTable();
|
|
|
}
|
|
|
//渲染科室列表
|
|
@@ -702,7 +711,7 @@ function rendeAllDeptList(list){
|
|
|
$(".deptAllList").html("")
|
|
|
return
|
|
|
}
|
|
|
- let str = `<li class="deptAllItem ellipsis" data-id=" " data-name="全部">全部</li>`;
|
|
|
+ let str = `<li class="deptAllItem ellipsis" data-id="" data-name="全部">全部</li>`;
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
str += `<li class="deptAllItem ellipsis" title=${list[i]['deptName']} data-id=${list[i]['deptId']} data-name=${list[i].deptName}> ${list[i].deptName}</li>`
|
|
|
}
|
|
@@ -828,17 +837,17 @@ function hideLoading(){
|
|
|
}
|
|
|
|
|
|
function allotTask(flag){
|
|
|
- if(!global_CheckerId){
|
|
|
+ if(flag!==1&&!global_CheckerId){
|
|
|
toast("请先选择质控员");
|
|
|
return;
|
|
|
}
|
|
|
- if((!global_TaskCodes.join("").trim())||global_TaskCodes.length===0){
|
|
|
+ if((flag!==1&&(!global_TaskCodes.join("").trim())||global_TaskCodes.length===0)){
|
|
|
toast("请选择至少一个任务");
|
|
|
return;
|
|
|
}
|
|
|
const param = {
|
|
|
- checkId:global_CheckerId,
|
|
|
- checkName:global_CheckerName,
|
|
|
+ checkId:flag===1?global_CheckerNumId:global_CheckerId,
|
|
|
+ checkName:flag===1?global_CheckerNumName:global_CheckerName,
|
|
|
distributionType:flag,
|
|
|
behospitalCodes:global_TaskCodes,
|
|
|
jobType:global_activeTabCode,
|