From d10c7c728234b5a9098b7bd5bb7a914a14e33c20 Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期五, 29 十二月 2023 18:37:28 +0800
Subject: [PATCH] su

---
 src/views/doctor/check/index.vue |  204 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 161 insertions(+), 43 deletions(-)

diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue
index 0e51b0b..f515a51 100644
--- a/src/views/doctor/check/index.vue
+++ b/src/views/doctor/check/index.vue
@@ -13,7 +13,7 @@
           style="width: 116px"
           placeholder="璇疯緭鍏ュ鍚�"
           clearable
-          @keyup.enter.native="handleQuery"
+          @keyup.enter.native="submitForm"
         ></el-input>
       </el-form-item>
       <el-form-item label="浣撴鍙�" prop="tjNumber">
@@ -22,6 +22,8 @@
           v-model="queryParams.tjNumber"
           style="width: 240px"
           placeholder="璇疯緭鍏ヤ綋妫�鍙�"
+          @blur="submitForm"
+          @keyup.enter.native="submitForm"
         ></el-input>
       </el-form-item>
       <el-form-item>
@@ -213,7 +215,11 @@
                 <el-radio-button label="1">绉戝浼氳瘖</el-radio-button>
               </el-radio-group>
             </el-form-item>
-            <el-form-item label="閫夋嫨绉戝" v-if="form.hzType == '1'">
+            <el-form-item
+              label="閫夋嫨绉戝"
+              v-if="form.hzType == '1'"
+              style="margin-top: 22px"
+            >
               <el-select
                 v-model="form.hzDeptId"
                 multiple
@@ -228,7 +234,11 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="鐢宠浜�" prop="hzDoctorId">
+            <el-form-item
+              label="鐢宠浜�"
+              prop="hzDoctorId"
+              style="margin-top: 22px"
+            >
               <el-select
                 v-model="form.hzDoctorId"
                 placeholder="璇烽�夋嫨"
@@ -469,6 +479,11 @@
             >鍘嗗彶鎶ュ憡</el-button
           >
         </div>
+        <div style="margin: 10px 10px">
+          <el-button type="primary" size="mini" @click="jianqian()"
+            >妫�鍓嶉棶璇�</el-button
+          >
+        </div>
       </div>
 
       <el-row>
@@ -686,7 +701,7 @@
           </div>
         </el-col>
         <el-col :span="6">
-          <Historicalreport
+          <Historicalreport v-show="lishi"
             :reportHistorydata="reportHistorydata"
           ></Historicalreport>
         </el-col>
@@ -734,11 +749,27 @@
       </div> -->
     </el-drawer>
     <Public ref="aaa" :row="row" @add="handleChanges" />
+
+    <el-dialog
+      title="鎻愮ず"
+      :visible.sync="jianqians"
+      width="1000px"
+      :before-close="handleClose1"
+    >
+       <jianqianwenzhen
+          :jianqianwenzhendatas="jianqianwenzhendatas"
+        ></jianqianwenzhen>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="jianqians = false">鍙� 娑�</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 
 <script>
+import { getInfoById } from "@/api/hosp/history";
+import jianqianwenzhen from "@/components/jianqianwenzhen";
 import Public from "@/components/public";
 import { getPdf } from "@/api/hosp/order";
 import { getInfo } from "@/api/login";
@@ -761,9 +792,13 @@
 export default {
   dicts: ["sys_user_sex", "sys_yes_no", "tj_result_type", "lj_positive"],
   name: "check",
-  components: { Public, Historicalreport },
+  components: { Public, Historicalreport,jianqianwenzhen },
   data() {
     return {
+      lishi:false,
+      rowes:{},
+      jianqianwenzhendatas:[],
+      jianqians:false,
       selected: false,
       checkval: false,
       // 閬僵灞�
@@ -851,7 +886,9 @@
         name: null,
       },
       rules: {
-        hzType: [{ required: true, message: "", trigger: "change" }],
+        hzType: [
+          { required: true, message: "浼氳瘖绉戝涓哄繀濉」", trigger: "change" },
+        ],
       },
     };
   },
@@ -897,6 +934,9 @@
     },
     handleClose() {
       this.$tab.refreshPage();
+    },
+    handleClose1(){
+      this.jianqians = false
     },
     // 鑾峰彇鍖荤敓
     selName(val) {
@@ -1168,12 +1208,22 @@
     },
 
     hadleedit(row) {
+      console.log(row, 111);
       this.form.hzType = row.hzType;
       this.form.id = row.id;
+      // this.form.hzDeptId = row.hzDeptNameList;
+      // row.hzDeptIdList.forEach(item=>{
+      //   console.log(item,222);
+      //   this.deptList.forEach(items=>{
+      //      console.log(item,333);
+      //      if(item == items.deptId){
+      //       this.form.hzDeptNameList =
+      //      }
+      //   })
+      // })
     },
 
     submitFormapply() {
-      console.log(this.form);
       let data = {};
       this.userList.forEach((item1) => {
         if (this.form.hzDoctorId == item1.userId) {
@@ -1181,36 +1231,49 @@
         }
       });
       if (this.form.hzType != undefined) {
-        if (this.form.hzDeptId && this.form.id) {
-          // let hzDeptId = ""
-          // this.form.hzDeptId.forEach(item => {
-          //   hzDeptId += item + ','
-          // })
-          data = {
-            tjNumber: this.form.tjNumber,
-            userId: this.form.cusId,
-            userName: this.form.cusName,
-            hzDeptIdList: this.form.hzDeptId,
-            hzDoctorId: this.form.hzDoctorId,
-            hzType: this.form.hzType,
-            orderId: this.form.orderId,
-            hzDoctorName: this.form.hzDoctorName,
-            id: this.form.id,
-          };
-        } else {
-          data = {
-            tjNumber: this.form.tjNumber,
-            userId: this.form.cusId,
-            userName: this.form.cusName,
-            hzDoctorId: this.form.hzDoctorId,
-            hzType: this.form.hzType,
-            orderId: this.form.orderId,
-            hzDoctorName: this.form.hzDoctorName,
-          };
-        }
+        // if (this.form.hzDeptId && this.form.id) {
+        //   console.log(111);
+        //   // let hzDeptId = ""
+        //   // this.form.hzDeptId.forEach(item => {
+        //   //   hzDeptId += item + ','
+        //   // })
+        //   data = {
+        //     tjNumber: this.form.tjNumber,
+        //     userId: this.form.cusId,
+        //     userName: this.form.cusName,
+        //     hzDeptIdList: this.form.hzDeptId,
+        //     hzDoctorId: this.form.hzDoctorId,
+        //     hzType: this.form.hzType,
+        //     orderId: this.form.orderId,
+        //     hzDoctorName: this.form.hzDoctorName,
+        //     id: this.form.id,
+        //   };
+        // } else {
+        //   console.log(222);
+        //   data = {
+        //     tjNumber: this.form.tjNumber,
+        //     userId: this.form.cusId,
+        //     userName: this.form.cusName,
+        //     hzDoctorId: this.form.hzDoctorId,
+        //     hzType: this.form.hzType,
+        //     orderId: this.form.orderId,
+        //     hzDoctorName: this.form.hzDoctorName,
+        //   };
+        // }
         this.$refs["form"].validate((valid) => {
           if (valid) {
             if (this.form.id != null) {
+              data = {
+                tjNumber: this.form.tjNumber,
+                userId: this.form.cusId,
+                userName: this.form.cusName,
+                hzDeptIdList: this.form.hzDeptId,
+                hzDoctorId: this.form.hzDoctorId,
+                hzType: this.form.hzType,
+                orderId: this.form.orderId,
+                hzDoctorName: this.form.hzDoctorName,
+                id: this.form.id,
+              };
               updateHzlog(data).then((res) => {
                 if (res.code == 200) {
                   this.$modal.msgSuccess("淇敼鎴愬姛");
@@ -1220,15 +1283,30 @@
                 }
               });
             } else {
-              addHzlog(data).then((res) => {
-                if (res.code == 200) {
-                  this.$modal.msgSuccess("鐢宠鎴愬姛");
-                  this.form = {};
-                  this.Hzlog();
-                  this.radioChange(1);
-                }
-              });
-              this.open = false;
+              data = {
+                tjNumber: this.form.tjNumber,
+                userId: this.form.cusId,
+                userName: this.form.cusName,
+                hzDeptIdList: this.form.hzDeptId,
+                hzDoctorId: this.form.hzDoctorId,
+                hzType: this.form.hzType,
+                orderId: this.form.orderId,
+                hzDoctorName: this.form.hzDoctorName,
+                id: this.form.id,
+              };
+              if (this.form.hzDeptId.length != 0) {
+                addHzlog(data).then((res) => {
+                  if (res.code == 200) {
+                    this.$modal.msgSuccess("鐢宠鎴愬姛");
+                    this.form = {};
+                    this.Hzlog();
+                    this.radioChange(1);
+                  }
+                });
+                this.open = false;
+              } else {
+                this.$modal.msgError("璇烽�夋嫨浼氳瘖绉戝");
+              }
             }
           }
         });
@@ -1251,11 +1329,46 @@
         cusId: this.tableAll.cusId,
       };
       reportHistory(data).then((res) => {
+        console.log(res);
         this.loading = false;
         if (res.data[0] != null) {
           this.reportHistorydata = res.data;
         }
+        if(this.reportHistorydata.length >= 1){
+          this.lishi = true;
+        }else{
+          this.lishi = true;
+          this.$modal.msgError("鏆傛棤鍘嗗彶鎶ュ憡");
+        }
       });
+    },
+
+    jianqian() {
+      let tjNumber = this.rowes.tjNumber;
+       getInfoById(tjNumber).then((response) => {
+        this.jianqianwenzhendatas = response.data;
+        if (this.form.xiyan == null) {
+          this.form.xiyan = "1";
+        }
+        if (this.form.xiyanpinlv == null) {
+          this.form.xiyanpinlv = "0";
+        }
+        if (this.form.xiyanyear == null) {
+          this.form.xiyanyear = "0";
+        }
+        if (this.form.yinjiu == null) {
+          this.form.yinjiu = "1";
+        }
+        if (this.form.yinjiupinlv == null) {
+          this.form.yinjiupinlv = "0";
+        }
+        if (this.form.yinjiuyear == null) {
+          this.form.yinjiuyear = "0";
+        }
+        this.form.tjAskHistorysList = response.data.tjAskHistorysList;
+        // this.isdisabled= true
+      });
+      this.jianqians = true;
     },
 
     handlecan(row) {
@@ -1339,6 +1452,8 @@
 
     // 鐐瑰嚮璇︽儏
     handleClick(row) {
+      this.rowes = row;
+      console.log(this.rowes);
       this.getDept(row.tjNumber);
       this.loading = true;
       this.drawer = true;
@@ -1349,6 +1464,9 @@
       if (this.tableAll.cusSex === 1) {
         this.tableAll.cusSex = "濂�";
       }
+      if (this.tableAll.cusSex === 2) {
+        this.tableAll.cusSex = "鏈煡";
+      }
       this.tjNumber = row.tjNumber;
       let num = 0;
       getParentList(this.tjNumber).then((response) => {

--
Gitblit v1.8.0