tanyanfei 7 ay önce
ebeveyn
işleme
148d76e8db
2 değiştirilmiş dosya ile 40 ekleme ve 28 silme
  1. 28 24
      src/components/DocIndex.vue
  2. 12 4
      src/components/RegPatinfo.vue

+ 28 - 24
src/components/DocIndex.vue

@@ -73,32 +73,36 @@
         this.$api.getPatientDoingCase({
           doctor_id: this.doctorInfo.id
         }).then(res => {
-          if (res.data.code == 0 && res.data.data.id) {
-            MessageBox ({
-              title: '提示',
-              message: '您有一个病例未完成',
-              showCancelButton: true,
-              confirmButtonText: "继续录入",
-              cancelButtonText: "重新录入",
-              cancelButtonClass: "docIndexCancelBtn",
-              confirmButtonClass: "confirmButtonClass"
-            }, action => {
-              console.log(action)
-              if (action == "confirm") {
-                this.$router.push({
-                  path: "/diagcalc",
-                  query: {
-                    id: res.data.data.id,
-                    patid: res.data.data.patient_id
-                  }
-                })
-              } else {
-                this.$router.push("regpatinfo")
-              }
-            });
-          } else {
+          if(res.data.code == 0){
             this.$router.push("regpatinfo")
           }
+          
+          // if (res.data.code == 0 && res.data.data.id) {
+          //   MessageBox ({
+          //     title: '提示',
+          //     message: '您有一个病例未完成',
+          //     showCancelButton: true,
+          //     confirmButtonText: "继续录入",
+          //     cancelButtonText: "重新录入",
+          //     cancelButtonClass: "docIndexCancelBtn",
+          //     confirmButtonClass: "confirmButtonClass"
+          //   }, action => {
+          //     console.log(action)
+          //     if (action == "confirm") {
+          //       this.$router.push({
+          //         path: "/diagcalc",
+          //         query: {
+          //           id: res.data.data.id,
+          //           patid: res.data.data.patient_id
+          //         }
+          //       })
+          //     } else {
+          //       this.$router.push("regpatinfo")
+          //     }
+          //   });
+          // } else {
+          //   this.$router.push("regpatinfo")
+          // }
         })
       }
     },

+ 12 - 4
src/components/RegPatinfo.vue

@@ -141,19 +141,27 @@
           }
         }
         let params = this.form
-        if(!params.sex){
+        if(!params.sex || !this.form.birthday){
           this.$api.searchInfo(params).then(res=>{
             // console.log(res.data)
             if(res.data.code == 0){
               if(res.data.data.length > 0){
-                this.form=res.data.data[0]
+
+                if(res.data.data[0].sex && res.data.data[0].birthday){
+                  this.form=res.data.data[0]
+                }else{
+                  MessageBox({
+                    title: '提示',
+                    message: '该患者信息尚未补充完整'
+                  })
+                }
               }else{
                 MessageBox({
                   title: '提示',
-                  message: '未检索到该病人信息'
+                  message: '该患者尚未完成注册信息'
                 })
               }
-                
+
             }
           })
           return