Browse Source

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 years ago
parent
commit
849ac58fd8

+ 10 - 0
src/api/his/his.js View File

@@ -150,6 +150,16 @@ export function getConfig() {
150 150
 
151 151
 
152 152
 
153
+export function Refund() {
154
+  return request({
155
+    url: "/api/refund/post",
156
+    method: "post",
157
+  });
158
+}
159
+
160
+
161
+
162
+
153 163
 
154 164
 
155 165
 

+ 10 - 1
src/api/project/project.js View File

@@ -317,4 +317,13 @@ export function changePatient(id,params){
317 317
         method:"get",
318 318
         params:params  
319 319
     })
320
-  } 
320
+  } 
321
+
322
+  export function getHisPatient(params){
323
+    
324
+    return request({
325
+      url:"/api/hispatient/gehispatient",
326
+      method:"get",
327
+      params:params
328
+    })
329
+  }

+ 24 - 3
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -90,7 +90,7 @@
90 90
                     <span>当前处方总费用:<span style="color:red;">{{ total}}元</span></span>
91 91
                     <span v-if="this.curPrescriptions.order_status  == 1">待结算</span>
92 92
                     <span v-if="this.curPrescriptions.order_status  == 2">已结算</span>
93
-                    <span v-if="this.curPrescriptions.order_status  == 2">已退费</span>
93
+                    <span v-if="this.curPrescriptions.order_status  == 3">已退费</span>
94 94
 
95 95
                   </div>
96 96
                 </div>
@@ -211,7 +211,7 @@
211 211
   import prescriptionTable from './components/prescriptionTable'
212 212
   import additionalCharges from './components/additionalCharges'
213 213
   import { getPatientInformation, getPatientList } from '@/api/project/project'
214
-  import { getPatientInfo, getSchedulePatientList, register, upload } from '@/api/his/his'
214
+  import { getPatientInfo, getSchedulePatientList, register, upload,Refund } from '@/api/his/his'
215 215
 
216 216
   const moment = require('moment')
217 217
   export default {
@@ -341,7 +341,8 @@
341 341
                 name: '处方' + index,
342 342
                 advices: tempAdvice,
343 343
                 project: tempProject,
344
-                type: response.data.data.prescription[i].type
344
+                type: response.data.data.prescription[i].type,
345
+                order_status: response.data.data.prescription[i].order_status
345 346
               }
346 347
               this.prescriptions.push(obj)
347 348
               this.curPrescriptions = this.prescriptions[0]
@@ -463,6 +464,26 @@
463 464
           this.state = '已收费'
464 465
           this.$message({ message: '收费成功', type: 'success' })
465 466
         } else if (index == 5) {
467
+          let params = {
468
+            'id': this.patientInfo.id,
469
+            'record_time': this.record_date
470
+          }
471
+          Refund(params).then(response => {
472
+            if (response.data.state == 0) {
473
+              this.$message.error(response.data.msg)
474
+              this.loadingtwo = false
475
+
476
+              return false
477
+
478
+            } else {
479
+              this.loadingtwo = false
480
+
481
+            }
482
+          })
483
+
484
+
485
+
486
+
466 487
           this.$message({ message: '退费成功', type: 'success' })
467 488
         } else if (index == 6) {
468 489
 

+ 37 - 4
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -102,6 +102,8 @@
102 102
           </el-select>
103 103
           <span>总计:</span>
104 104
           <span style="color:red;">{{ getTotal() }}</span>元
105
+          <span >{{order_status}}</span>
106
+
105 107
         </div>
106 108
       </div>
107 109
       <div class='centerRight'>
@@ -114,7 +116,7 @@
114 116
             <el-tabs class="rightTabs" v-model="activeName">
115 117
               <el-tab-pane label="药品列表" name="1">
116 118
                 <div style="margin-bottom:5px;display:flex;">
117
-                  <el-input style="width:50%;" v-model="input" placeholder=""></el-input>
119
+                  <el-input style="width:50%;"  @keyup.enter.native='searchAction' v-model.trim="search_keyword" placeholder=""></el-input>
118 120
                   <el-select style="margin-left:5px;width:50%;" v-model="value" placeholder="" @change="changeKind">
119 121
                     <el-option
120 122
                       label="全部"
@@ -148,7 +150,7 @@
148 150
               </el-tab-pane>
149 151
               <el-tab-pane label="医嘱模板" name="2">
150 152
                 <div style="margin-bottom:5px;">
151
-                  <el-input style="width:50%;" v-model="input" placeholder=""></el-input>
153
+                  <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
152 154
                   <el-select style="float: right;width: 49%;" v-model="value" placeholder="">
153 155
                       <el-option
154 156
                       v-for="item in options"
@@ -264,6 +266,7 @@
264 266
       hisPatientInfo: Object,
265 267
       prescriptions: Array,
266 268
       record_date: String,
269
+      search_keyword:"",
267 270
 
268 271
       other_sick: {
269 272
         type: Array,
@@ -323,6 +326,7 @@
323 326
         doctors: [],
324 327
         departMent: [],
325 328
         curStatus: 0,
329
+        order_status:"",
326 330
         register_types: [
327 331
           { id: 1, name: '医保' },
328 332
           { id: 2, name: '自费' }
@@ -331,6 +335,10 @@
331 335
       }
332 336
     },
333 337
     methods: {
338
+      searchAction(){
339
+        console.log(this.search_keyword)
340
+
341
+      },
334 342
       getTotal() {
335 343
         var total = 0
336 344
         for (let i = 0; i < this.prescriptions.length; i++) {
@@ -477,6 +485,20 @@
477 485
         this.departmentValue = info.departments
478 486
         this.register_type = info.register_type
479 487
 
488
+        if(info.prescription_status == 1 || info.prescription_status == 2){
489
+          this.order_status  = "未收费"
490
+
491
+        }
492
+
493
+        if(info.prescription_status == 3){
494
+          this.order_status  = "已结算"
495
+        }
496
+
497
+
498
+        if(info.prescription_status == 4){
499
+          this.order_status  = "已退费"
500
+        }
501
+
480 502
 
481 503
         // console.log(this.$refs)
482 504
         // this.$nextTick(() => {
@@ -489,6 +511,10 @@
489 511
         }
490 512
       },
491 513
       open(index) {
514
+        if(this.curPrescriptions.order_status >= 2){
515
+          this.$message.error('当前处方处于结算或者退费状态,无法保存')
516
+          return
517
+        }
492 518
         if (this.doctorValue.length <= 0) {
493 519
           this.$message.error('医生不能为空')
494 520
           return
@@ -535,7 +561,6 @@
535 561
           }
536 562
           createHisPrescription(data, params).then(response => {
537 563
             if (response.data.state == 1) {
538
-              // this.prescriptions = []
539 564
               this.$message.success('保存成功')
540 565
             }
541 566
           })
@@ -549,6 +574,10 @@
549 574
 
550 575
       },
551 576
       addTab(targetName) {
577
+        if(this.curPrescriptions.order_status >= 2){
578
+          this.$message.error('该处方已经结算或者退费,无法继续添加处方')
579
+          return
580
+        }
552 581
         ++this.tabIndex
553 582
         let newTabName = '处方' + this.tabIndex
554 583
         this.prescriptions.push({
@@ -563,6 +592,10 @@
563 592
         this.curStatus = 0
564 593
       },
565 594
       removeTab(targetName) {
595
+        if(this.curPrescriptions.order_status >= 2){
596
+          this.$message.error('该处方已经结算或者退费,无法删除')
597
+          return
598
+        }
566 599
 
567 600
         this.$confirm('处方删除后不可恢复,是否确认删除', '删除', {
568 601
           confirmButtonText: '确 定',
@@ -723,7 +756,7 @@
723 756
       },
724 757
       comfirm() {
725 758
         if(this.curPrescriptions.order_status >= 2){
726
-          this.$message.error('该处方已经结算或者退费,无法继续添加')
759
+          this.$message.error('该处方已经结算或者退费,无法继续添加药品或者项目')
727 760
           this.teamList = []
728 761
           this.curDrugs = []
729 762
           this.$refs.tables.clearSelection()

+ 22 - 18
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue View File

@@ -170,6 +170,7 @@
170 170
       patientInfo: Object,
171 171
       hisPatientInfo: Object,
172 172
       record_date:String,
173
+      detalid:Number,
173 174
     },
174 175
     components: {
175 176
       medicalRecord,
@@ -179,19 +180,19 @@
179 180
       return {
180 181
         id:0,
181 182
         delivery_way:"",
182
-        case_history:{
183
-          sick_type:'',
184
-          symptom:"",
185
-          sick_date:"",
186
-          is_infect:"",
187
-          chief_conplaint:"",
188
-          history_of_present_illness:"",
189
-          past_history:"",
190
-          diagnostic:"",
191
-          personal_history:"",
192
-          family_history:"",
183
+        // case_history:{
184
+        //   sick_type:'',
185
+        //   symptom:"",
186
+        //   sick_date:"",
187
+        //   is_infect:"",
188
+        //   chief_conplaint:"",
189
+        //   history_of_present_illness:"",
190
+        //   past_history:"",
191
+        //   diagnostic:"",
192
+        //   personal_history:"",
193
+        //   family_history:"",
193 194
 
194
-        },
195
+        // },
195 196
         formValue:{
196 197
           temperature:"",
197 198
           blood_sugar:"",
@@ -271,11 +272,10 @@
271 272
        
272 273
 
273 274
       },
274
-      getMsgFormSon(data){
275
-       this.getTemplateDetail(data)
276
-     },
275
+    
277 276
 
278 277
       getTemplateDetail(id){
278
+          console.log("22222")
279 279
           getTemplateDetail(id).then(response=>{
280 280
               if(response.data.state == 1){  
281 281
                 var templatedetail =  response.data.data.templateDetail
@@ -294,9 +294,13 @@
294 294
     },
295 295
     created(){
296 296
        this.wayOptions = getDataConfig("patient", "reimbursement_ways");
297
-
298
-       console.log("2222",this.wayOptions)
299
-     
297
+       console.log("232322323",this)
298
+       
299
+    },
300
+    watch:{
301
+      detalid:function(val){
302
+        this.getTemplateDetail(val)
303
+      }
300 304
     }
301 305
   }
302 306
 </script>

+ 39 - 26
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue View File

@@ -27,75 +27,78 @@
27 27
       </el-tab-pane>
28 28
       <el-tab-pane label="病历详情" name="second">
29 29
         <div class="detailMain">
30
-          <span style="width:240px;">处方号:344431222222222</span>
31
-          <span style="width:200px;">医生:医生</span>
32
-          <span style="width:200px;">科室:儿科</span>
33
-          <span style="width:200px;">创建时间:2020-10-10 01:12:20</span>
30
+          <span style="width:240px;">处方号:{{order.prescription_number}}</span>
31
+          <span style="width:200px;">医生:{{order.doctor}}</span>
32
+          <span style="width:200px;">科室:{{order.departments}}</span>
33
+          <span style="width:200px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
34 34
         </div>
35 35
         <div class="commonCell">
36 36
           <p>基本信息</p>
37 37
           <div class="detailMain">
38
-            <span style="width:240px;">疾病名称:无</span>
39
-            <span style="width:200px;">症状:医生</span>
40
-            <span style="width:200px;">发病日期:2020-10-10 01:12:20</span>
41
-            <span style="width:200px;">是否传染:否</span>
38
+            <span style="width:240px;">疾病名称:{{case_history.diagnostic}}</span>
39
+            <span style="width:200px;">症状:{{case_history.diagnostic}}</span>
40
+            <span style="width:200px;">发病日期:{{getTimes(case_history.sick_date,"{y}-{m}-{d}")}}</span>
41
+            <span style="width:200px;" v-if="case_history.is_infect== 1">是否传染:是</span>
42
+          <span style="width:200px;" v-if="case_history.is_infect != 1">是否传染:否</span>
43
+
42 44
           </div>
43 45
         </div>
44 46
         <div class="commonCell">
45 47
           <p>体格信息</p>
46 48
           <div class="detailMain">
47
-            <span style="width:140px;">体温:℃</span>
48
-            <span style="width:140px;">呼吸:0 次/分</span>
49
-            <span style="width:140px;">脉搏:0 次/分</span>
50
-            <span style="width:200px;">血压:0。00~0.00 mmHg</span>
49
+            <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
50
+            <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
51
+
52
+            <span style="width:140px;">脉搏:{{case_history.pulse}} 次/分</span>
53
+            <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
51 54
           </div>
52 55
         </div>
53 56
         <div class="commonCell">
54 57
           <p></p>
55 58
           <div class="detailMain">
56
-            <span style="width:140px;">血糖:0 mmol/L</span>
57
-            <span style="width:140px;">血脂:0 mmol/L</span>
58
-            <span style="width:140px;">身高:0 cm</span>
59
-            <span style="width:200px;">体重:0 kg</span>
59
+            <span style="width:140px;">血糖:{{case_history.blood_sugar}} mmol/L</span>
60
+            <span style="width:140px;">血脂:{{case_history.blood_fat}} mmol/L</span>
61
+            <span style="width:140px;">身高:{{case_history.height}} cm</span>
62
+            <span style="width:200px;">体重: kg</span>
60 63
           </div>
61 64
         </div>
62 65
         <div class="commonCell">
63 66
           <p>主诉</p>
64
-          <div></div>
67
+          <div>{{case_history.chief_conplaint}}</div>
65 68
         </div>
66 69
         <div class="commonCell">
67 70
           <p>现病史</p>
68
-          <div></div>
71
+          <div>{{case_history.history_of_present_illness}}</div>
69 72
         </div>
70 73
         <div class="commonCell">
71 74
           <p>门诊诊断</p>
72
-          <div></div>
75
+          <div>{{case_history.diagnostic}}</div>
73 76
         </div>
74 77
         <div class="commonCell">
75 78
           <p>门诊医嘱</p>
76
-          <div></div>
79
+          <div>{{case_history.doctor_advice}}</div>
77 80
         </div>
78 81
         <div class="commonCell">
79 82
           <p>过敏史</p>
80
-          <div></div>
83
+          <div>{{order.sick_history}}</div>
81 84
         </div>
82 85
         <div class="commonCell">
83 86
           <p>既往史</p>
84
-          <div></div>
87
+          <div>{{case_history.past_history}}</div>
85 88
         </div>
86 89
         <div class="commonCell">
87 90
           <p>个人史</p>
88
-          <div></div>
91
+          <div>{{case_history.personal_history}}</div>
89 92
         </div>
90 93
         <div class="commonCell">
91 94
           <p>家族史</p>
92
-          <div></div>
95
+          <div>{{case_history.family_history}}</div>
93 96
         </div>
94 97
       </el-tab-pane>
95 98
     </el-tabs>
96 99
     <div slot="footer" class="dialog-footer">
97 100
       <el-button @click="hide">取 消</el-button>
98
-      <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
101
+      <!--<el-button type="primary" :loading="submitLoading" @click="hide">确定</el-button>-->
99 102
     </div>
100 103
   </el-dialog>
101 104
 </template>
@@ -105,6 +108,7 @@
105 108
 <script>
106 109
   import { getHisPrescriptionInfo } from '@/api/his/his'
107 110
   import NewPrescriptionTable from './newPrescriptionTable'
111
+  import { uParseTime } from '@/utils/tools'
108 112
 
109 113
   export default {
110 114
     components: { NewPrescriptionTable },
@@ -134,10 +138,15 @@
134 138
         state: '未收费',
135 139
         radio: 1,
136 140
         radioStatus: 1,
137
-        search_input: ''
141
+        search_input: '',
142
+        case_history:{},
143
+        order:{},
138 144
       }
139 145
     },
140 146
     methods: {
147
+      getTimes(time,temp) {
148
+        return uParseTime(time, temp);
149
+      },
141 150
       tabclickEvent(val) {
142 151
         for (let i = 0; i < this.prescriptions.length; i++) {
143 152
           if (this.prescriptions[i].name == val.name) {
@@ -188,6 +197,10 @@
188 197
           } else {
189 198
             this.patientInfo = response.data.data.order.patient
190 199
             this.hisPatientInfo = response.data.data.order.his_patient
200
+            this.case_history = response.data.data.order.case_history
201
+            this.order = response.data.data.order
202
+
203
+
191 204
             this.prescriptions = []
192 205
             for (let i = 0; i < response.data.data.prescription.length; i++) {
193 206
               var prescription = response.data.data.prescription[i]

+ 7 - 3
src/xt_pages/outpatientDoctorStation/components/medicalRecord.vue View File

@@ -160,24 +160,27 @@ export default {
160 160
             this.$refs.recordTemplateDetail.show(id)
161 161
         },
162 162
         totemplateDetailTwo(id){
163
+        console.log("id0---",id)
163 164
          this.$emit('func',id)
164 165
          this.visible = false
165 166
         },
166 167
         //获取历史数据历史模板
167 168
         getlist(){
169
+            console.log("触发了吗")
168 170
             const params = {
169 171
                keyword:this.search_input,
170 172
                start_time:this.start_time,
171 173
                end_time:this.end_time
172 174
             }
175
+           console.log("params-----",params)
173 176
           getHistoryTemplate(params).then(response=>{
174 177
             if(response.data.state == 1){
175 178
               var template =  response.data.data.template
176 179
               console.log("templagte",template)
177 180
               this.tempalateData = template
178
-              var history =  response.data.data.history
179
-              console.log("history",history)
180
-              this.tableData = history
181
+            //   var history =  response.data.data.history
182
+            //   console.log("history",history)
183
+            //   this.tableData = history
181 184
             }
182 185
           })
183 186
         },
@@ -192,6 +195,7 @@ export default {
192 195
         }
193 196
     },
194 197
     created(){
198
+       console.log("99999999999999999")
195 199
        this.getlist()
196 200
     }
197 201
 }

+ 8 - 1
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

@@ -193,7 +193,10 @@
193 193
         })
194 194
 
195 195
       },deleteDrug:function(index, row){
196
-
196
+       if(this.curPrescriptions.order_status >= 2){
197
+         this.$message.error('该处方已经结算或者退费,无法删除')
198
+         return
199
+       }
197 200
        this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
198 201
          confirmButtonText: "确 定",
199 202
          cancelButtonText: "取 消",
@@ -266,6 +269,10 @@
266 269
          return name
267 270
       },
268 271
       deleteProject(row){
272
+        if(this.curPrescriptions.order_status >= 2){
273
+          this.$message.error('该处方已经结算或者退费,无法删除')
274
+          return
275
+        }
269 276
         this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
270 277
           confirmButtonText: "确 定",
271 278
           cancelButtonText: "取 消",

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/recordTemplateDetail.vue View File

@@ -145,7 +145,7 @@ export default {
145 145
                 var template =  response.data.data.templateDetail
146 146
                 this.$message.success("保存成功")
147 147
                 this.visible = false
148
-                this.$parents.getlist()
148
+                // this.$parents.getlist()
149 149
              }
150 150
           }) 
151 151
         }

+ 3 - 2
src/xt_pages/outpatientDoctorStation/components/saveRecordTemplate.vue View File

@@ -12,7 +12,7 @@
12 12
                 <el-radio v-model="mode_type" label="2">公共模板</el-radio>
13 13
             </el-form-item> -->
14 14
             <el-form-item label="模板名称: " prop="name" style="width:100%;">
15
-                <el-input v-model="form.template_name" placeholder=""></el-input>
15
+                <el-input v-model="template_name" placeholder=""></el-input>
16 16
             </el-form-item>
17 17
             <el-form-item label="模板说明:" prop="name" style="width:100%;">
18 18
                 <el-input
@@ -100,7 +100,7 @@ export default {
100 100
              family_history:this.family_history,
101 101
              diagnostic:this.diagnostic,
102 102
             }
103
-            console.log("params",params)
103
+         console.log("params",params)
104 104
           SaveHisPatientCaseHistoryTemplate(params).then(response=>{
105 105
               if(response.data.state == 1){
106 106
                  this.$message.success("保存成功")
@@ -112,6 +112,7 @@ export default {
112 112
     created(){
113 113
       this.start_time = moment().format("YYYY-MM-DD HH:mm:ss")
114 114
       this.user_name = this.$store.getters.xt_user.user.user_name
115
+      
115 116
     }
116 117
 }
117 118
 </script>

+ 41 - 7
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -64,9 +64,10 @@
64 64
                            :hisPatientInfo="hisPatientInfo"
65 65
                            v-show="titleType == '处方'" style="flex:1;"></desk-prescription>
66 66
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
67
-                     :hisPatientInfo="hisPatientInfo" v-show="titleType == '病历'"></desk-record>
68
-        <medicalRecord ref='medicalRecord'  @func="getMsgFormSon"></medicalRecord>
69
-       <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
67
+                     :hisPatientInfo="hisPatientInfo"   v-show="titleType == '病历'" :detalid="detalid" ref="child"></desk-record>
68
+
69
+         <medicalRecord ref='medicalRecord' @func="getMsgFormSon" ></medicalRecord>
70
+         <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
70 71
       </div>
71 72
 
72 73
     </div>
@@ -82,7 +83,6 @@
82 83
   import medicalRecord from './components/medicalRecord'
83 84
   import saveRecordTemplate from './components/saveRecordTemplate'
84 85
   import { uParseTime } from '@/utils/tools'
85
-
86 86
   export default {
87 87
     components: {
88 88
       BreadCrumb,
@@ -113,6 +113,7 @@
113 113
         ],
114 114
         titleType: '处方',
115 115
         patientTableData: [{}],
116
+        patientTableDataTwo:[{}],
116 117
         patientInfo: {},
117 118
         hisPatientInfo: {},
118 119
         case_history: {},
@@ -120,7 +121,8 @@
120 121
         diagnoses: [],
121 122
         other_sick: [],
122 123
         info:{},
123
-
124
+        templatedetail:{},
125
+        detalid:0,
124 126
       }
125 127
     },
126 128
     methods: {
@@ -133,6 +135,21 @@
133 135
 
134 136
       },
135 137
       searchAction() {
138
+        if(this.search_input.length == 0){
139
+          this.patientTableData = this.patientTableDataTwo
140
+        }else{
141
+          let arr = []
142
+          for (let i = 0; i < this.patientTableData.length; i++){
143
+            if(this.patientTableData[i].patients.name.indexOf(this.search_input) != -1 ){
144
+              arr = arr.concat(this.patientTableData[i])
145
+            }
146
+          }
147
+          if(arr.length > 0){
148
+            this.patientTableData = arr
149
+          }
150
+
151
+        }
152
+
136 153
 
137 154
       },
138 155
       change(val) {
@@ -150,6 +167,8 @@
150 167
             return false
151 168
           } else {
152 169
             this.patientTableData = response.data.data.list
170
+            this.patientTableDataTwo = response.data.data.list
171
+
153 172
             console.log('222', this.patientTableData)
154 173
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
155 174
             let cal_one = 0
@@ -182,7 +201,6 @@
182 201
           } else {
183 202
 
184 203
             this.prescriptions = []
185
-            // this.$refs.prescriptions.clearData()
186 204
             this.patientInfo = response.data.data.xt_info
187 205
             this.hisPatientInfo = response.data.data.his_info
188 206
             this.case_history = response.data.data.case_history
@@ -276,7 +294,7 @@
276 294
                   name: '处方' + index,
277 295
                   advices: tempAdvice,
278 296
                   project: tempProject,
279
-                  orderStatus:prescription.order_status
297
+                  order_status:prescription.order_status
280 298
                 }
281 299
                 this.prescriptions.push(obj)
282 300
               }
@@ -384,6 +402,22 @@
384 402
       //   this.hisPatientInfo = val.hisPatientInfo
385 403
       //   console.log("333333",this.hisPatientInfo)
386 404
       // }
405
+
406
+      getMsgFormSon(id){
407
+        console.log("id----------",id)
408
+        this.detalid = id
409
+      },
410
+      //  getTemplateDetail(id){
411
+      //     getTemplateDetail(id).then(response=>{
412
+      //         if(response.data.state == 1){
413
+      //           var templatedetail =  response.data.data.templateDetail
414
+      //           console.log("templatedetail",templatedetail)
415
+      //           templatedetail =
416
+
417
+
418
+      //         }
419
+      //     })
420
+      //   },
387 421
     },
388 422
     created() {
389 423
       var nowDate = new Date()

+ 36 - 10
src/xt_pages/outpatientRegistration/index.vue View File

@@ -23,8 +23,8 @@
23 23
                             <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>
24 24
                         </div>
25 25
                     </el-form-item>
26
-                    <el-form-item label="患者姓名:">
27
-                        <el-input v-model="form.name"></el-input>
26
+                    <el-form-item label="患者姓名:"  prop="name" :validate-event="is_Name">
27
+                        <el-input  v-model="form.name"></el-input>
28 28
                     </el-form-item>
29 29
                     <el-form-item label="性别:">
30 30
                         <el-select v-model="form.sex" placeholder="请选择">
@@ -62,7 +62,7 @@
62 62
                     <el-form-item label="年龄:">
63 63
                         <el-input v-model="form.age"></el-input>
64 64
                     </el-form-item>
65
-                    <el-form-item label="证件号码:" required prop="idCard">
65
+                    <el-form-item label="证件号码:" prop="idCard"  :validate-event="is_Name">
66 66
                         <el-input v-model="form.idCard"></el-input>
67 67
                     </el-form-item>
68 68
    
@@ -71,7 +71,7 @@
71 71
             <div class="nameTitle">患者挂号信息:</div>
72 72
             <div class="formMain">
73 73
                 <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
74
-                    <el-form-item label="挂号类型:"  prop="register">
74
+                    <el-form-item label="挂号类型:"  prop="register"  :validate-event="is_Name">
75 75
                         <el-select v-model="form.register"  placeholder="请选择">
76 76
                             <el-option
77 77
                             v-for="item in register"
@@ -81,7 +81,7 @@
81 81
                             </el-option>
82 82
                         </el-select>
83 83
                     </el-form-item>
84
-                    <el-form-item label="医生:"  prop="doctor" >
84
+                    <el-form-item label="医生:"  prop="doctor" :validate-event="is_Name" >
85 85
                         <el-select v-model="form.doctor" placeholder="请选择">
86 86
                             <el-option
87 87
                             v-for="item in doctorList"
@@ -91,7 +91,7 @@
91 91
                             </el-option>
92 92
                         </el-select>
93 93
                     </el-form-item>
94
-                    <el-form-item label="科室:"  prop="department">
94
+                    <el-form-item label="科室:"  prop="department" :validate-event="is_Name">
95 95
                         <el-select v-model="form.department"  placeholder="请选择">
96 96
                             <el-option
97 97
                             v-for="item in departmentList"
@@ -243,8 +243,8 @@ export default {
243 243
                 psn_name:"杨美英",
244 244
                 age:60.7
245 245
             },
246
-
247 246
             rules: {
247
+              name:[{ required:true,message:"患者姓名不能为空",trigger: 'blur'}],
248 248
               idCard: [{ required: true, message: '证件号码不能为空', trigger: 'blur'  }],
249 249
               register: [{ required: true, message: '请选择挂号类型' , trigger: 'blur' }],
250 250
               doctor: [{ required: true, message: '请选择医生' , trigger: 'blur' }],
@@ -253,7 +253,8 @@ export default {
253 253
            doctorList:[],
254 254
            departmentList:[],
255 255
            check:0,
256
-           show:false
256
+           show:false,
257
+           is_Name:false
257 258
         }
258 259
     },
259 260
     computed:{
@@ -358,8 +359,33 @@ export default {
358 359
            })   
359 360
         },
360 361
         saveHisPatient(formName){   
361
-           if(this.form.idCard == ""){
362
+           if(this.form.name == ""){
363
+             this.$message.error("患者姓名不能为空")
364
+             this.is_Name = true
365
+             return
366
+           }
367
+          if(this.form.idCard == ""){
362 368
              this.$message.error("证件号码不能为空")
369
+             this.is_Name = true
370
+             return
371
+           }
372
+
373
+          if(this.form.register == ""){
374
+             this.$message.error("挂号类型不能为空")
375
+             this.is_Name = true
376
+             return
377
+           }
378
+
379
+         if(this.form.doctor == ""){
380
+             this.$message.error("医生不能为空")
381
+             this.is_Name = true
382
+             return
383
+           }
384
+
385
+         if(this.form.department == ""){
386
+             this.$message.error("科室不能为空")
387
+             this.is_Name = true
388
+             return
363 389
            }
364 390
           this.$refs[formName].validate((valid)=>{
365 391
              if(valid){
@@ -405,7 +431,7 @@ export default {
405 431
                      this.form.medicalCare = "",
406 432
                      this.form.birthday ="",
407 433
                      this.form.age ="",
408
-                    //  this.form.idCard = "",
434
+                     this.form.idCard = "",
409 435
                      this.form.register = "",
410 436
                      this.form.doctor = "",
411 437
                      this.form.department = "",

+ 45 - 3
src/xt_pages/outpatientRegistration/registrationHistory.vue View File

@@ -5,7 +5,21 @@
5 5
         </div>
6 6
         <div class="app-container">
7 7
             <div class="cell clearfix">
8
-                <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/>
8
+                <!-- <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/> -->
9
+                <el-autocomplete
10
+                  style="margin:16px 5px"
11
+                  popper-class="my-autocomplete"
12
+                  v-model.trim="search_input"
13
+                  :fetch-suggestions="querySearchAsync"
14
+                  :trigger-on-focus="false"
15
+                  placeholder="病人名字或者透析号"
16
+                  @select="handleSelect"
17
+                >
18
+                  <i class="el-icon-search el-input__icon" slot="suffix"> </i>
19
+                  <template slot-scope="{ item }">
20
+                    <div class="name">{{ item.name }}</div>
21
+                  </template>
22
+                </el-autocomplete>
9 23
                 <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
10 24
                 <!-- <el-date-picker
11 25
                 v-model="value1"
@@ -113,7 +127,7 @@
113 127
 <script>
114 128
 const moment = require('moment')
115 129
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
116
-import { getHisPatientHistory,changePatient } from "@/api/project/project"
130
+import { getHisPatientHistory,changePatient,getHisPatient } from "@/api/project/project"
117 131
 import { uParseTime } from "@/utils/tools";
118 132
 export default {
119 133
     components:{
@@ -167,6 +181,7 @@ export default {
167 181
                 id: 7,
168 182
                 name: "生育保险"
169 183
             }],
184
+            tablePatient:[]
170 185
         }
171 186
     },
172 187
     created(){
@@ -180,7 +195,7 @@ export default {
180 195
             
181 196
         // })
182 197
         // this.tableData = arr
183
-     
198
+       //获取所有挂号号的患者
184 199
        this.getlist()
185 200
     },
186 201
     methods:{
@@ -301,7 +316,34 @@ export default {
301 316
           });
302 317
         })
303 318
         .catch(() => {});
319
+        },
320
+
321
+     querySearchAsync(keyword, cb) {
322
+        let key = ''
323
+        if (keyword != undefined) {
324
+          key = keyword
325
+        }
326
+        let searchArray = []
327
+       
328
+        var params = {
329
+           keyword:key
304 330
         }
331
+        console.log("params",params)
332
+        getHisPatient(params).then(response => {
333
+          if (response.data.state == 1) {
334
+            searchArray = response.data.data.patient
335
+            console.log("searcharrya",searchArray)
336
+            cb(searchArray)
337
+          }
338
+        })
339
+        return searchArray
340
+      },
341
+
342
+      handleSelect(val){   
343
+          this.search_input = val.name
344
+          this.getlist()
345
+        },
346
+
305 347
     }
306 348
 }
307 349
 </script>

+ 1 - 0
src/xt_pages/stock/selfPreparedMedicine/index.vue View File

@@ -350,6 +350,7 @@ export default {
350 350
             key = keyword
351 351
           }
352 352
           let searchArray = []
353
+          console.log("key",key)
353 354
           PostSearch(key).then(response => {
354 355
             if (response.data.state == 1) {
355 356
               searchArray = response.data.data.patient