Bläddra i källkod

操作类型改为接口获取

1178232204@qq.com 3 år sedan
förälder
incheckning
667b637847
2 ändrade filer med 21 tillägg och 18 borttagningar
  1. 1 2
      src/js/api.js
  2. 20 16
      src/js/appealHistory.js

+ 1 - 2
src/js/api.js

@@ -218,14 +218,13 @@ const api = {
   approved:'/qc/appealExamineInfo/approved', //审核通过
   getAppealInfo:'/qc/appealInfo/getAppealInfo', //申诉记录
   cancelAppealInfo:'/qc/appealInfo/cancelAppealInfo', //撤回申诉
-  getAppealOperationType:'/qc/appealInfo/getAppealOperationType', //再次申诉
+  getAppealOperationType:'/qc/appealInfo/getAppealOperationType', //再次申诉操作类型
   getAuditNumber:'/qc/appealExamineInfo/getAuditNumber', //获取待审核数量
   getAppealReviewExport:'/qc/appealExamineInfo/getAppealReviewExport', //申诉审核导出
   getComplaintRecordExport:'/qc/appealExamineInfo/getComplaintRecordExport', //申诉记录导出
   getAppealReviewDictionary:'/qc/appealExamineInfo/getAppealReviewDictionary', //操作类型
   getAppealDept:'/qc/appealInfo/getAppealDept ', //申诉科室
   getAppealMode:'/qc/appealInfo/getAppealMode ', //申诉模块
-
 }
 const ywCheckApi = {
   addMedCheckInfo: '/qc/medCheckInfo/addMedCheckInfo',   //核查

+ 20 - 16
src/js/appealHistory.js

@@ -215,7 +215,7 @@ getmoduleList()
 
 //获取模块类型
 function getmoduleList() {
-    post(api.getAppealMode,{pageType:1}).then(res => {
+    post(api.getAppealMode, { pageType: 1 }).then(res => {
         if (res.data.code == '0') {
             const moduleTypeList = res.data.data
             renderModuleList(moduleTypeList)
@@ -373,19 +373,7 @@ function renderTab(data) {
         $("#delModal .modal-body").html("");
         $("#delModal").show();
         getCheckUser()
-        if (data[i].appealOperationType == 1) {
-            if (data[i].exampleStatus == 2) {
-                data[i].appealOperationType = 0
-            } else {
-                data[i].appealOperationType = 1
-            }
-        } else if (data[i].appealOperationType == 3) {
-            data[i].appealOperationType = 0
-        }
-        $("#appealDef").tmpl(data[i]).appendTo("#delModal .modal-body");
-        $("#delModal .confirm").text("确定").unbind("click").click(function () {
-            addAppealInfo(data[i])
-        });
+        getAppealOperationType(data[i])
     })
     $(".goHomeDetail1").click(function () {
         let id = $(this).parent().attr("data-id")
@@ -394,10 +382,26 @@ function renderTab(data) {
         let casesEntryId = $(this).parent().attr("data-casesEntryId")
         let qcresultDetailId = $(this).parent().attr("data-qcresultDetailId")
         let appealOperationType = $(this).parent().attr("data-appealOperationType")
-        $(parent.document).find("#contentIframe").attr("src", "appealExamine.html?id=" + id + "&hospitalId=" + hospitalId + "&behospitalCode=" + behospitalCode + "&casesEntryId=" + casesEntryId + "&qcresultDetailId=" + qcresultDetailId + "&appealOperationType=" + appealOperationType+ "&page=" + page + "&form=" + 3)
+        $(parent.document).find("#contentIframe").attr("src", "appealExamine.html?id=" + id + "&hospitalId=" + hospitalId + "&behospitalCode=" + behospitalCode + "&casesEntryId=" + casesEntryId + "&qcresultDetailId=" + qcresultDetailId + "&appealOperationType=" + appealOperationType + "&page=" + page + "&form=" + 3)
     })
 }
+function getAppealOperationType(data) {
+    post(api.getAppealOperationType, { appealOperationType: data.appealOperationType, exampleStatus: data.exampleStatus, qcresultDetailId: data.qcresultDetailId }).then(function (res) {
+        if (res.data.code === '0') {
+            data.appealOperationType = res.data.data.appealOperationType
+            $("#appealDef").tmpl(data).appendTo("#delModal .modal-body");
+            $("#delModal .confirm").text("确定").unbind("click").click(function () {
+                addAppealInfo(data)
+            });
+        } else {
+            $.alerModal({ "message": res.data.msg || '失败,请重试~', type: "tip", time: '1000', win: 'default' });
 
+        }
+    }).catch(() => {
+        $.alerModal({ "message": '失败,请重试~', type: "tip", time: '1000', win: 'default' });
+
+    });
+}
 function cancelAppealInfo(id) {
     post(api.cancelAppealInfo, { id: id }).then(function (res) {
         if (res.data.code === '0') {
@@ -544,7 +548,7 @@ $('.selectDept').on("click", function (e) {
 //获取科室列表
 getDeptList()
 function getDeptList() {
-    post(api.getAppealDept, { inputStr: "",pageType:1 }).then(res => {
+    post(api.getAppealDept, { inputStr: "", pageType: 1 }).then(res => {
         if (res.data.code == '0') {
             const deptList = res.data.data
             rendeDeptList(deptList)