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
 
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
         method:"get",
317
         method:"get",
318
         params:params  
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
                     <span>当前处方总费用:<span style="color:red;">{{ total}}元</span></span>
90
                     <span>当前处方总费用:<span style="color:red;">{{ total}}元</span></span>
91
                     <span v-if="this.curPrescriptions.order_status  == 1">待结算</span>
91
                     <span v-if="this.curPrescriptions.order_status  == 1">待结算</span>
92
                     <span v-if="this.curPrescriptions.order_status  == 2">已结算</span>
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
                   </div>
95
                   </div>
96
                 </div>
96
                 </div>
211
   import prescriptionTable from './components/prescriptionTable'
211
   import prescriptionTable from './components/prescriptionTable'
212
   import additionalCharges from './components/additionalCharges'
212
   import additionalCharges from './components/additionalCharges'
213
   import { getPatientInformation, getPatientList } from '@/api/project/project'
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
   const moment = require('moment')
216
   const moment = require('moment')
217
   export default {
217
   export default {
341
                 name: '处方' + index,
341
                 name: '处方' + index,
342
                 advices: tempAdvice,
342
                 advices: tempAdvice,
343
                 project: tempProject,
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
               this.prescriptions.push(obj)
347
               this.prescriptions.push(obj)
347
               this.curPrescriptions = this.prescriptions[0]
348
               this.curPrescriptions = this.prescriptions[0]
463
           this.state = '已收费'
464
           this.state = '已收费'
464
           this.$message({ message: '收费成功', type: 'success' })
465
           this.$message({ message: '收费成功', type: 'success' })
465
         } else if (index == 5) {
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
           this.$message({ message: '退费成功', type: 'success' })
487
           this.$message({ message: '退费成功', type: 'success' })
467
         } else if (index == 6) {
488
         } else if (index == 6) {
468
 
489
 

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

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

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

170
       patientInfo: Object,
170
       patientInfo: Object,
171
       hisPatientInfo: Object,
171
       hisPatientInfo: Object,
172
       record_date:String,
172
       record_date:String,
173
+      detalid:Number,
173
     },
174
     },
174
     components: {
175
     components: {
175
       medicalRecord,
176
       medicalRecord,
179
       return {
180
       return {
180
         id:0,
181
         id:0,
181
         delivery_way:"",
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
         formValue:{
196
         formValue:{
196
           temperature:"",
197
           temperature:"",
197
           blood_sugar:"",
198
           blood_sugar:"",
271
        
272
        
272
 
273
 
273
       },
274
       },
274
-      getMsgFormSon(data){
275
-       this.getTemplateDetail(data)
276
-     },
275
+    
277
 
276
 
278
       getTemplateDetail(id){
277
       getTemplateDetail(id){
278
+          console.log("22222")
279
           getTemplateDetail(id).then(response=>{
279
           getTemplateDetail(id).then(response=>{
280
               if(response.data.state == 1){  
280
               if(response.data.state == 1){  
281
                 var templatedetail =  response.data.data.templateDetail
281
                 var templatedetail =  response.data.data.templateDetail
294
     },
294
     },
295
     created(){
295
     created(){
296
        this.wayOptions = getDataConfig("patient", "reimbursement_ways");
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
 </script>
306
 </script>

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

27
       </el-tab-pane>
27
       </el-tab-pane>
28
       <el-tab-pane label="病历详情" name="second">
28
       <el-tab-pane label="病历详情" name="second">
29
         <div class="detailMain">
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
         </div>
34
         </div>
35
         <div class="commonCell">
35
         <div class="commonCell">
36
           <p>基本信息</p>
36
           <p>基本信息</p>
37
           <div class="detailMain">
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
           </div>
44
           </div>
43
         </div>
45
         </div>
44
         <div class="commonCell">
46
         <div class="commonCell">
45
           <p>体格信息</p>
47
           <p>体格信息</p>
46
           <div class="detailMain">
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
           </div>
54
           </div>
52
         </div>
55
         </div>
53
         <div class="commonCell">
56
         <div class="commonCell">
54
           <p></p>
57
           <p></p>
55
           <div class="detailMain">
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
           </div>
63
           </div>
61
         </div>
64
         </div>
62
         <div class="commonCell">
65
         <div class="commonCell">
63
           <p>主诉</p>
66
           <p>主诉</p>
64
-          <div></div>
67
+          <div>{{case_history.chief_conplaint}}</div>
65
         </div>
68
         </div>
66
         <div class="commonCell">
69
         <div class="commonCell">
67
           <p>现病史</p>
70
           <p>现病史</p>
68
-          <div></div>
71
+          <div>{{case_history.history_of_present_illness}}</div>
69
         </div>
72
         </div>
70
         <div class="commonCell">
73
         <div class="commonCell">
71
           <p>门诊诊断</p>
74
           <p>门诊诊断</p>
72
-          <div></div>
75
+          <div>{{case_history.diagnostic}}</div>
73
         </div>
76
         </div>
74
         <div class="commonCell">
77
         <div class="commonCell">
75
           <p>门诊医嘱</p>
78
           <p>门诊医嘱</p>
76
-          <div></div>
79
+          <div>{{case_history.doctor_advice}}</div>
77
         </div>
80
         </div>
78
         <div class="commonCell">
81
         <div class="commonCell">
79
           <p>过敏史</p>
82
           <p>过敏史</p>
80
-          <div></div>
83
+          <div>{{order.sick_history}}</div>
81
         </div>
84
         </div>
82
         <div class="commonCell">
85
         <div class="commonCell">
83
           <p>既往史</p>
86
           <p>既往史</p>
84
-          <div></div>
87
+          <div>{{case_history.past_history}}</div>
85
         </div>
88
         </div>
86
         <div class="commonCell">
89
         <div class="commonCell">
87
           <p>个人史</p>
90
           <p>个人史</p>
88
-          <div></div>
91
+          <div>{{case_history.personal_history}}</div>
89
         </div>
92
         </div>
90
         <div class="commonCell">
93
         <div class="commonCell">
91
           <p>家族史</p>
94
           <p>家族史</p>
92
-          <div></div>
95
+          <div>{{case_history.family_history}}</div>
93
         </div>
96
         </div>
94
       </el-tab-pane>
97
       </el-tab-pane>
95
     </el-tabs>
98
     </el-tabs>
96
     <div slot="footer" class="dialog-footer">
99
     <div slot="footer" class="dialog-footer">
97
       <el-button @click="hide">取 消</el-button>
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
     </div>
102
     </div>
100
   </el-dialog>
103
   </el-dialog>
101
 </template>
104
 </template>
105
 <script>
108
 <script>
106
   import { getHisPrescriptionInfo } from '@/api/his/his'
109
   import { getHisPrescriptionInfo } from '@/api/his/his'
107
   import NewPrescriptionTable from './newPrescriptionTable'
110
   import NewPrescriptionTable from './newPrescriptionTable'
111
+  import { uParseTime } from '@/utils/tools'
108
 
112
 
109
   export default {
113
   export default {
110
     components: { NewPrescriptionTable },
114
     components: { NewPrescriptionTable },
134
         state: '未收费',
138
         state: '未收费',
135
         radio: 1,
139
         radio: 1,
136
         radioStatus: 1,
140
         radioStatus: 1,
137
-        search_input: ''
141
+        search_input: '',
142
+        case_history:{},
143
+        order:{},
138
       }
144
       }
139
     },
145
     },
140
     methods: {
146
     methods: {
147
+      getTimes(time,temp) {
148
+        return uParseTime(time, temp);
149
+      },
141
       tabclickEvent(val) {
150
       tabclickEvent(val) {
142
         for (let i = 0; i < this.prescriptions.length; i++) {
151
         for (let i = 0; i < this.prescriptions.length; i++) {
143
           if (this.prescriptions[i].name == val.name) {
152
           if (this.prescriptions[i].name == val.name) {
188
           } else {
197
           } else {
189
             this.patientInfo = response.data.data.order.patient
198
             this.patientInfo = response.data.data.order.patient
190
             this.hisPatientInfo = response.data.data.order.his_patient
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
             this.prescriptions = []
204
             this.prescriptions = []
192
             for (let i = 0; i < response.data.data.prescription.length; i++) {
205
             for (let i = 0; i < response.data.data.prescription.length; i++) {
193
               var prescription = response.data.data.prescription[i]
206
               var prescription = response.data.data.prescription[i]

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

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

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

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

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

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

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

64
                            :hisPatientInfo="hisPatientInfo"
64
                            :hisPatientInfo="hisPatientInfo"
65
                            v-show="titleType == '处方'" style="flex:1;"></desk-prescription>
65
                            v-show="titleType == '处方'" style="flex:1;"></desk-prescription>
66
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
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
       </div>
71
       </div>
71
 
72
 
72
     </div>
73
     </div>
82
   import medicalRecord from './components/medicalRecord'
83
   import medicalRecord from './components/medicalRecord'
83
   import saveRecordTemplate from './components/saveRecordTemplate'
84
   import saveRecordTemplate from './components/saveRecordTemplate'
84
   import { uParseTime } from '@/utils/tools'
85
   import { uParseTime } from '@/utils/tools'
85
-
86
   export default {
86
   export default {
87
     components: {
87
     components: {
88
       BreadCrumb,
88
       BreadCrumb,
113
         ],
113
         ],
114
         titleType: '处方',
114
         titleType: '处方',
115
         patientTableData: [{}],
115
         patientTableData: [{}],
116
+        patientTableDataTwo:[{}],
116
         patientInfo: {},
117
         patientInfo: {},
117
         hisPatientInfo: {},
118
         hisPatientInfo: {},
118
         case_history: {},
119
         case_history: {},
120
         diagnoses: [],
121
         diagnoses: [],
121
         other_sick: [],
122
         other_sick: [],
122
         info:{},
123
         info:{},
123
-
124
+        templatedetail:{},
125
+        detalid:0,
124
       }
126
       }
125
     },
127
     },
126
     methods: {
128
     methods: {
133
 
135
 
134
       },
136
       },
135
       searchAction() {
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
       change(val) {
155
       change(val) {
150
             return false
167
             return false
151
           } else {
168
           } else {
152
             this.patientTableData = response.data.data.list
169
             this.patientTableData = response.data.data.list
170
+            this.patientTableDataTwo = response.data.data.list
171
+
153
             console.log('222', this.patientTableData)
172
             console.log('222', this.patientTableData)
154
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
173
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
155
             let cal_one = 0
174
             let cal_one = 0
182
           } else {
201
           } else {
183
 
202
 
184
             this.prescriptions = []
203
             this.prescriptions = []
185
-            // this.$refs.prescriptions.clearData()
186
             this.patientInfo = response.data.data.xt_info
204
             this.patientInfo = response.data.data.xt_info
187
             this.hisPatientInfo = response.data.data.his_info
205
             this.hisPatientInfo = response.data.data.his_info
188
             this.case_history = response.data.data.case_history
206
             this.case_history = response.data.data.case_history
276
                   name: '处方' + index,
294
                   name: '处方' + index,
277
                   advices: tempAdvice,
295
                   advices: tempAdvice,
278
                   project: tempProject,
296
                   project: tempProject,
279
-                  orderStatus:prescription.order_status
297
+                  order_status:prescription.order_status
280
                 }
298
                 }
281
                 this.prescriptions.push(obj)
299
                 this.prescriptions.push(obj)
282
               }
300
               }
384
       //   this.hisPatientInfo = val.hisPatientInfo
402
       //   this.hisPatientInfo = val.hisPatientInfo
385
       //   console.log("333333",this.hisPatientInfo)
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
     created() {
422
     created() {
389
       var nowDate = new Date()
423
       var nowDate = new Date()

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

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

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

5
         </div>
5
         </div>
6
         <div class="app-container">
6
         <div class="app-container">
7
             <div class="cell clearfix">
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
                 <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
23
                 <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
10
                 <!-- <el-date-picker
24
                 <!-- <el-date-picker
11
                 v-model="value1"
25
                 v-model="value1"
113
 <script>
127
 <script>
114
 const moment = require('moment')
128
 const moment = require('moment')
115
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
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
 import { uParseTime } from "@/utils/tools";
131
 import { uParseTime } from "@/utils/tools";
118
 export default {
132
 export default {
119
     components:{
133
     components:{
167
                 id: 7,
181
                 id: 7,
168
                 name: "生育保险"
182
                 name: "生育保险"
169
             }],
183
             }],
184
+            tablePatient:[]
170
         }
185
         }
171
     },
186
     },
172
     created(){
187
     created(){
180
             
195
             
181
         // })
196
         // })
182
         // this.tableData = arr
197
         // this.tableData = arr
183
-     
198
+       //获取所有挂号号的患者
184
        this.getlist()
199
        this.getlist()
185
     },
200
     },
186
     methods:{
201
     methods:{
301
           });
316
           });
302
         })
317
         })
303
         .catch(() => {});
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
 </script>
349
 </script>

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

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