1178232204@qq.com 3 years ago
parent
commit
65238c431d
2 changed files with 49 additions and 24 deletions
  1. 49 23
      src/js/appealExamine.js
  2. 0 1
      src/js/index.js

+ 49 - 23
src/js/appealExamine.js

@@ -28,7 +28,7 @@ const casesEntryId = getUrlArgObjectNew("casesEntryId", srcUrl) || "";
 const qcresultDetailId = getUrlArgObjectNew("qcresultDetailId", srcUrl) || "";
 const appealOperationType = getUrlArgObjectNew("appealOperationType", srcUrl) || "";
 const form = getUrlArgObjectNew("form", srcUrl) || "";
-let appealInfo, appealExamineRecordDTOList;
+let appealInfo, appealExamineRecordDTOList, auditNumber;
 (function () {
     getApprovedView()
     if (form == 2) {
@@ -38,6 +38,7 @@ let appealInfo, appealExamineRecordDTOList;
         $(".bot").hide();
         $('.appealExamine h2').html('申诉信息 > 申诉记录 > 查看');
     }
+
 })();
 //获取审核详情
 function getApprovedView() {
@@ -51,27 +52,30 @@ function getApprovedView() {
     return post(api.getApprovedView, param).then(res => {
         if (res.data.code == '0') {
             data = res.data.data.data
-            appealExamineRecordDTOList = data.appealExamineRecordDTOList,
-                appealInfo = {
-                    exampleOperation: 2,
-                    casesEntryName: data.casesEntryName,
-                    casesEntryMsg: data.casesEntryMsg,
-                    remark: data.remark,
-                    behospitalCode: data.behospitalCode,
-                    qcResultAlgVO: {
-                        casesEntryId: casesEntryId,
-                        casesId: data.casesId,
-                        id: data.qcresultDetailId,
-                        casesScore: appealExamineRecordDTOList[0].casesScore,
-                        msg: appealExamineRecordDTOList[0].msg,
-                        score: appealExamineRecordDTOList[0].qcresultDetaiValue,
-                        isReject: appealExamineRecordDTOList[0].isReject,
-                        explainInfo:appealExamineRecordDTOList[0].explainInfo,
-                    }
+            appealExamineRecordDTOList = data.appealExamineRecordDTOList;
+            appealInfo = {
+                exampleOperation: 2,
+                casesEntryName: data.casesEntryName,
+                casesEntryMsg: data.casesEntryMsg,
+                remark: data.remark,
+                behospitalCode: data.behospitalCode,
+                qcResultAlgVO: {
+                    casesEntryId: casesEntryId,
+                    casesId: data.casesId,
+                    id: data.qcresultDetailId,
+                    casesScore: appealExamineRecordDTOList[0].casesScore,
+                    msg: appealExamineRecordDTOList[0].msg,
+                    score: appealExamineRecordDTOList[0].qcresultDetaiValue,
+                    isReject: appealExamineRecordDTOList[0].isReject,
+                    explainInfo: appealExamineRecordDTOList[0].explainInfo,
                 }
-            getInfo(data)
-            getCon(data)
-            getAppealInfo(id, behospitalCode, casesEntryId, hospitalId, qcresultDetailId)
+            };
+            $('.info').html('');
+            $('.content').html('');
+            $('.history').html('');
+            getInfo(data);
+            getCon(data);
+            getAppealInfo(id, behospitalCode, casesEntryId, hospitalId, qcresultDetailId);
         } else {
             const token = localStorage.getItem('accessToken');
             if (!token && window.location.href.indexOf('login') == -1) {
@@ -252,6 +256,8 @@ function approved(type) {
     post(api.approved, param).then(function (res) {
         if (res.data.code === '0') {
             $("#delModal").hide();
+            getApprovedView()
+            getAuditNumber()
             $.alerModal({ "message": "审核成功", type: "tip", time: '1000', win: true });
         } else {
             $.alerModal({ "message": res.data.msg || '失败,请重试~', type: "tip", time: '1000', win: 'default' });
@@ -282,15 +288,35 @@ function rejected() {
         rejectedReason: $(".textarea2").val()
     };
     post(api.rejected, param).then(function (res) {
-        console.log(res.data.data.code);
         if (res.data.data.code === '0') {
             $("#delModal").hide();
+            getApprovedView()
+            getAuditNumber()
             $.alerModal({ "message": "驳回成功", type: "tip", time: '1000', win: true });
         } else {
-            console.log(123);
             $.alerModal({ "message": res.data.data.msg || '失败,请重试~', type: "tip", time: '1000', win: 'default' });
         }
     }).catch(() => {
         $.alerModal({ "message": '失败,请重试~', type: "tip", time: '1000', win: 'default' });
     });
+}
+
+//获取待审核数量
+getAuditNumber()
+function getAuditNumber() {
+    return post(api.getAuditNumber, {}).then(res => {
+        if (res.data.code == '0') {
+            auditNumber = res.data.data.data > 99 ? '99+' : res.data.data.data
+            $(".menu .page", parent.document).children('.reds').html(auditNumber)
+        } else {
+            const token = localStorage.getItem('accessToken');
+            if (!token && window.location.href.indexOf('login') == -1) {
+                //alert('无token判断,跳回登录')
+            } else {
+                $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
+            }
+        }
+    }).catch((e) => {
+
+    })
 }

+ 0 - 1
src/js/index.js

@@ -347,7 +347,6 @@ function getAuditNumber() {
   })
 }
 function initMenu(data, userInfo) {
-  console.log(data);
   //菜单数据填充
   $(".menu ul").html("");
   $(".menu-mini ul").html("");