瀏覽代碼

分配任务传科室id

zhouna 4 年之前
父節點
當前提交
b6806be33d
共有 1 個文件被更改,包括 14 次插入4 次删除
  1. 14 4
      src/js/allotCheckTask.js

+ 14 - 4
src/js/allotCheckTask.js

@@ -19,7 +19,7 @@ const arrowRight = require("./../images/arrow_right.png")
 listenScroll()
 listenScroll()
 let tabList = [], data_desc=["leaveHospitalDate"],data_asc=[];
 let tabList = [], data_desc=["leaveHospitalDate"],data_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='',
-    global_DeptId='',global_DeptMId="",global_DeptAllId='',global_deptData = {},global_activeTabCode='0',global_TaskCodes=[];
+    global_DeptId='',global_DeptMId="",global_DeptAllId='',global_deptData = {},global_activeTabCode='0',global_TaskCodes=[],global_TaskDept=[];
 let isPlacefile = getCookie('isPlacefile')||1
 let isPlacefile = getCookie('isPlacefile')||1
 /*if(isPlacefile != 1){
 /*if(isPlacefile != 1){
     data_desc=["behospital_date"]
     data_desc=["behospital_date"]
@@ -417,14 +417,18 @@ function selectCheckerTb(){
 function selectTaskTb(){
 function selectTaskTb(){
     $(".taskCheck").unbind("click").click(function(){
     $(".taskCheck").unbind("click").click(function(){
         const id=$(this).attr("code");
         const id=$(this).attr("code");
+        const did=$(this).attr("deptId");
         const it =$(this).find("img");
         const it =$(this).find("img");
         const codes = global_TaskCodes.join(",")+",";
         const codes = global_TaskCodes.join(",")+",";
+        const depts=global_TaskDept.join(",")+",";
         if(it.is(".active")){
         if(it.is(".active")){
             $(this).find("img").attr('src',iconUnCheck);
             $(this).find("img").attr('src',iconUnCheck);
             global_TaskCodes = codes.replace(id+",","").replace(/^,|,$/,'').split(",");
             global_TaskCodes = codes.replace(id+",","").replace(/^,|,$/,'').split(",");
+            global_TaskDept = depts.replace(did+",","").replace(/^,|,$/,'').split(",");
         }else{
         }else{
             $(this).find("img").attr('src',iconCheck);
             $(this).find("img").attr('src',iconCheck);
             global_TaskCodes.push(id);
             global_TaskCodes.push(id);
+            global_TaskDept.push(did);
         }
         }
         it.toggleClass('active');
         it.toggleClass('active');
 
 
@@ -432,8 +436,9 @@ function selectTaskTb(){
 }
 }
 //待分配任务列表渲染
 //待分配任务列表渲染
 function renderTab(data){
 function renderTab(data){
-    let str = ``,code=""
-    global_TaskCodes=[];console.log(1,data)
+    let str = ``,code="";
+    global_TaskCodes=[];
+    global_TaskDept=[];
     if(!data||data.length===0){
     if(!data||data.length===0){
       $('.patientTable .tbody').html(emptyBox(null,7))
       $('.patientTable .tbody').html(emptyBox(null,7))
     //   initScroll("qcList","YX",1)
     //   initScroll("qcList","YX",1)
@@ -535,7 +540,8 @@ function bindDeleteEvent(){
                         </div>
                         </div>
                     </div>`;
                     </div>`;
     $(".taskTable .delete:not(.disable)").unbind("click").click(function(e){
     $(".taskTable .delete:not(.disable)").unbind("click").click(function(e){
-        global_TaskCodes=[$(this).attr("code")];console.log(3)
+        global_TaskCodes=[$(this).attr("code")];
+        global_TaskDept=[$(this).attr("deptId")];
         $(dom).insertAfter($(this)).show();
         $(dom).insertAfter($(this)).show();
         $(".del-pop .cancel").unbind("click").click(function(){
         $(".del-pop .cancel").unbind("click").click(function(){
             $(".del-pop").hide();
             $(".del-pop").hide();
@@ -682,6 +688,10 @@ function allotTask(flag){
         checkName:global_CheckerName,
         checkName:global_CheckerName,
         distributionType:flag,
         distributionType:flag,
         behospitalCodes:global_TaskCodes,
         behospitalCodes:global_TaskCodes,
+        jobType:global_activeTabCode,
+        checkDept:global_DeptId,
+        behospitalDepts:global_TaskDept,
+
     }
     }
     post(ywCheckApi.allotTask,param).then(res =>{
     post(ywCheckApi.allotTask,param).then(res =>{
         if(res.data.code == '0'){
         if(res.data.code == '0'){