소스 검색

Merge branch 'appeal0121' into test

1178232204@qq.com 3 년 전
부모
커밋
02db349fc9
1개의 변경된 파일26개의 추가작업 그리고 25개의 파일을 삭제
  1. 26 25
      src/js/appealExamine.js

+ 26 - 25
src/js/appealExamine.js

@@ -248,44 +248,45 @@ function approved(type) {
         if ($('input:radio:checked').val() == 2) {
             appealInfo.delStatus == 0
         } else {
-            appealInfo.casesEntryMsg == $(".case").val()
-            appealInfo.qcResultAlgVO.score = $('.score').val()
-            appealInfo.qcResultAlgVO.explainInfo = $('.explainInfo').val()
-            appealInfo.qcResultAlgVO.msg = $('.msg').val()
-            let val = $(".msg").val()
-            let score = $(".score").val()
-            if (!score) {
-                $(".appealDel .warning .red").text("分值不能为空~");
+            appealInfo.casesEntryMsg == $(".case").val().trim()
+            appealInfo.qcResultAlgVO.score = $('.score').val().trim()
+            appealInfo.qcResultAlgVO.explainInfo = $('.explainInfo').val().trim()
+            appealInfo.qcResultAlgVO.msg = $('.msg').val().trim()
+            let val = $(".msg").val().trim()
+            let score = $(".score").val().trim()
+            if (!val) {
+                $(".appealDel .warning .red").text("提示信息不能为空~");
                 $(".appealDel .warning").show();
                 return
             }
-            if (!val) {
-                $(".appealDel .warning .red").text("提示信息不能为空~");
+            if (!score) {
+                $(".appealDel .warning .red").text("分值不能为空~");
                 $(".appealDel .warning").show();
                 return
             }
         }
     } else if (type == 2) {
         appealInfo.exampleOperation = 3
-        appealInfo.qcResultAlgVO.score = $('.score').val()
-        appealInfo.qcResultAlgVO.explainInfo = $('.explainInfo').val()
-        appealInfo.qcResultAlgVO.msg = $('.msg').val()
-        let val = $(".msg").val()
-        let score = $(".score").val()
-        if (!score) {
-            $(".appealDel .warning .red").text("分值不能为空~");
-            $(".appealDel .warning").show();
-            return
-        }
+        appealInfo.qcResultAlgVO.score = $('.score').val().trim()
+        appealInfo.qcResultAlgVO.explainInfo = $('.explainInfo').val().trim()
+        appealInfo.qcResultAlgVO.msg = $('.msg').val().trim()
+        let val = $(".msg").val().trim()
+        let score = $(".score").val().trim()
         if (!val) {
             $(".appealAdd .warning .red").text("提示信息不能为空~");
             $(".appealAdd .warning").show();
             return
         }
+        if (!score) {
+            $(".appealDel .warning .red").text("分值不能为空~");
+            $(".appealDel .warning").show();
+            return
+        }
+        
     } else if (type == 3) {
         appealInfo.exampleOperation = 4
-        appealInfo.processResult = $(".textarea").val()
-        let val = $(".textarea").val()
+        appealInfo.processResult = $(".textarea").val().trim()
+        let val = $(".textarea").val().trim()
         let num = 500
         if (!val) {
             $(".appealDef .warning .red").text("处理结果不能为空~");
@@ -298,7 +299,7 @@ function approved(type) {
         }
     } else if (type == 4) {
         appealInfo.exampleOperation = 5
-        appealInfo.qcResultAlgVO.score = $('.score').val()
+        appealInfo.qcResultAlgVO.score = $('.score').val().trim()
 
     }
     const param = {
@@ -324,7 +325,7 @@ function approved(type) {
 
 //驳回
 function rejected() {
-    let val = $(".textarea2").val()
+    let val = $(".textarea2").val().trim()
     let num = 500
     if (!val) {
         $(".appealReject .warning .red").text("驳回理由不能为空~");
@@ -338,7 +339,7 @@ function rejected() {
     const param = {
         'behospitalCode': behospitalCode,
         'id': id,
-        rejectedReason: $(".textarea2").val()
+        rejectedReason: $(".textarea2").val().trim()
     };
     post(api.rejected, param).then(function (res) {
         if (res.data.code === '0') {