See999 4 年前
父节点
当前提交
d7e29d26c9

+ 25 - 0
src/utils/tools.js 查看文件

@@ -175,3 +175,28 @@ export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
175 175
   // console.log((shouji + (shichang - t) * weichi).toFixed(1))
176 176
   return (shouji + (shichang - t) * weichi).toFixed(1)
177 177
 }
178
+
179
+
180
+export function formatDate (date, format) {
181
+  if (/(y+)/.test(format)) {
182
+      format= format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
183
+  }
184
+  let o = {
185
+      'M+': date.getMonth() + 1,
186
+      'd+': date.getDate(),
187
+      'h+': date.getHours(),
188
+      'm+': date.getMinutes(),
189
+      's+': date.getSeconds()
190
+  };
191
+  for (let k in o) {
192
+      if (new RegExp(`(${k})`).test(format)) {
193
+          let str = o[k] + '';
194
+          format= format.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
195
+      }
196
+  }
197
+  return format;
198
+};
199
+
200
+function padLeftZero (str) {
201
+  return ('00' + str).substr(str.length);
202
+};

+ 59 - 33
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

@@ -561,22 +561,22 @@
561 561
             this.department = response.data.data.department
562 562
             this.sick = response.data.data.sick
563 563
             this.additions = response.data.data.additions
564
-            var info = response.data.data.info
565
-            if (info.user_type == 2 || info.user_type == 1) {
566
-              this.doctorValue = info.admin_user_id
567
-              if (info.department_id == 0) {
568
-                if (this.department.length > 0) {
569
-                  this.departmentValue = this.department[0].id
570
-                } else {
571
-                  this.departmentValue = ''
572
-
573
-                }
574
-              } else {
575
-                this.departmentValue = info.department_id
576
-              }
577
-            }else{
578
-              this.doctorValue = this.doctors[0].admin_user_id
579
-            }
564
+            // var info = response.data.data.info
565
+            // if (info.user_type == 2 || info.user_type == 1) {
566
+            //   this.doctorValue = info.admin_user_id
567
+            //   if (info.department_id == 0) {
568
+            //     if (this.department.length > 0) {
569
+            //       this.departmentValue = this.department[0].id
570
+            //     } else {
571
+            //       this.departmentValue = ''
572
+            //
573
+            //     }
574
+            //   } else {
575
+            //     this.departmentValue = info.department_id
576
+            //   }
577
+            // }else{
578
+            //   this.doctorValue = this.doctors[0].admin_user_id
579
+            // }
580 580
           }
581 581
         })
582 582
 
@@ -630,14 +630,13 @@
630 630
         this.teamList = []
631 631
 
632 632
       },
633
-      setData(data, info) {
633
+      setData(data, info, admin_info,doctors,department) {
634 634
         this.prescription_id = data[0].id
635 635
         this.editableTabsValue = "处方1"
636 636
         this.$emit('event1', this.prescription_id)
637 637
         this.curStatus = 0
638 638
         this.prescriptions = data
639 639
         this.curPrescriptions = this.prescriptions[0]
640
-        console.log( this.curPrescriptions)
641 640
 
642 641
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
643 642
           this.curStatus = 1
@@ -645,7 +644,6 @@
645 644
           this.rightTab = 1
646 645
           this.showOne = true
647 646
           this.showTwo = false
648
-
649 647
         }
650 648
 
651 649
         if (this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0) {
@@ -655,23 +653,19 @@
655 653
           this.showOne = false
656 654
           this.showTwo = true
657 655
         }
658
-
659 656
         this.state1 = info.diagnosis
660 657
         this.state2 = info.sick_history
661
-        this.doctorValue = info.doctor_id
662
-        this.departmentValue = info.departmentValue
663
-
664
-        if(this.doctorValue == 0){
665 658
 
666
-        }
667 659
 
668 660
         this.register_type = info.register_type
669 661
 
662
+        if(info.prescription_status == 0){
663
+          this.order_status = ''
664
+        }
665
+
670 666
         if (info.prescription_status == 1 || info.prescription_status == 2) {
671 667
           this.order_status = '未收费'
672
-
673 668
         }
674
-
675 669
         if (info.prescription_status == 3) {
676 670
           this.order_status = '已结算'
677 671
         }
@@ -680,10 +674,40 @@
680 674
           this.order_status = '已退费'
681 675
         }
682 676
 
683
-        // console.log(this.$refs)
684
-        // this.$nextTick(() => {
685
-        //   this.$refs.prescription_tables.setNewData(this.prescriptions[0])
686
-        // })
677
+        if(info.id > 0){
678
+          this.doctorValue = info.doctor_id
679
+          this.departmentValue = info.department
680
+        }else{
681
+          this.doctorValue = ''
682
+          this.departmentValue = ''
683
+
684
+          if (admin_info.user_type == 2 || admin_info.user_type == 1) {
685
+            this.doctorValue = admin_info.admin_user_id
686
+            if (admin_info.department_id == 0) {
687
+              if (this.department.length > 0) {
688
+                this.departmentValue = department[0].id
689
+              } else {
690
+                this.departmentValue = ''
691
+              }
692
+            } else {
693
+              this.departmentValue = admin_info.department_id
694
+            }
695
+          }else{
696
+            this.doctorValue = doctors[0].admin_user_id
697
+          }
698
+
699
+          if(this.doctorValue == 0){
700
+            this.doctorValue = ''
701
+          }
702
+
703
+
704
+
705
+        }
706
+
707
+
708
+
709
+
710
+
687 711
       },
688 712
       moreState(tab, event) {
689 713
         if (tab == 'more') {
@@ -1155,13 +1179,15 @@
1155 1179
           }
1156 1180
         })
1157 1181
       }, changeDoctor(val) {
1158
-        console.log(val)
1159
-        console.log(this.doctors)
1160 1182
         for (let i = 0; i < this.doctors.length; i++) {
1161 1183
           if (this.doctors[i].admin_user_id == this.doctorValue) {
1162 1184
             this.departmentValue = this.doctors[i].department_id
1163 1185
           }
1164 1186
         }
1187
+
1188
+        if(this.departmentValue == 0){
1189
+          this.departmentValue = ""
1190
+        }
1165 1191
       }
1166 1192
     },mounted(){
1167 1193
       this.getInitData()

+ 5 - 5
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue 查看文件

@@ -45,7 +45,7 @@
45 45
         </el-select>
46 46
       </el-form-item>
47 47
       <el-form-item label="医保证号: " prop="name">
48
-        <el-input v-model="patientInfo.home_address" placeholder="" readonly></el-input>
48
+        <el-input v-model="patientInfo.health_care_no" placeholder="" readonly></el-input>
49 49
       </el-form-item>
50 50
       <el-form-item label="家庭住址: " prop="name">
51 51
         <el-input v-model="patientInfo.home_address" placeholder="" readonly></el-input>
@@ -138,7 +138,7 @@
138 138
           type="textarea"
139 139
           :rows="2"
140 140
           placeholder="请输入内容"
141
-          v-model="doctor_advice">
141
+          v-model="case_history.doctor_advice">
142 142
         </el-input>
143 143
       </el-form-item>
144 144
        <el-form-item label="备注:" prop="name" style="width:100%;">
@@ -146,7 +146,7 @@
146 146
           type="textarea"
147 147
           :rows="2"
148 148
           placeholder="请输入内容"
149
-          v-model="remark">
149
+          v-model="case_history.remark">
150 150
         </el-input>
151 151
       </el-form-item>
152 152
     </el-form>
@@ -254,8 +254,8 @@
254 254
             "record_date":this.record_date,
255 255
             "diagnostic":this.case_history.diagnostic,
256 256
             "breathing":this.case_history.breathing,
257
-            "doctor_advice":this.doctor_advice,
258
-            "remark":this.remark
257
+            "doctor_advice":this.case_history.doctor_advice,
258
+            "remark":this.case_history.remark
259 259
           }
260 260
 
261 261
           createCaseHistory(params).then(response => {

+ 41 - 6
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue 查看文件

@@ -6,7 +6,7 @@
6 6
     :before-close="_close"
7 7
     class="detailDialog"
8 8
   >
9
-    <div style="position: absolute;right:20px;">
9
+    <div style="position: absolute;right:20px;z-index:99">
10 10
       <el-button v-if="activeName == 'first'" @click="open(1)" type="primary">打印</el-button>
11 11
       <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
12 12
     </div>
@@ -25,13 +25,11 @@
25 25
           <div class="RP">
26 26
             Rp
27 27
           </div>
28
-          <new-prescription-table ref="prescription_tables"
29
-                                  :prescription="curPrescriptions"></new-prescription-table>
28
+          <new-prescription-table ref="prescription_tables" :prescription="curPrescriptions"></new-prescription-table>
30 29
         </el-tabs>
31 30
 
32 31
       </el-tab-pane>
33 32
       <el-tab-pane label="病历详情" name="second">
34
-        
35 33
         <div class="commonCell">
36 34
           <p style="color:#409EFF;">基本信息</p>
37 35
           <div class="detailMain">
@@ -84,7 +82,7 @@
84 82
         </div>
85 83
         <div class="commonCell">
86 84
           <p>过敏史</p>
87
-          <div>{{order.sick_history}}</div>
85
+          <div>{{case_history.past_history}}</div>
88 86
         </div>
89 87
         <div class="commonCell">
90 88
           <p>既往史</p>
@@ -114,6 +112,8 @@
114 112
   import { getHisPrescriptionInfo } from '@/api/his/his'
115 113
   import NewPrescriptionTable from './newPrescriptionTable'
116 114
   import { uParseTime } from '@/utils/tools'
115
+ import { getAllDoctorList } from "@/api/project/project"
116
+import moment from 'moment';
117 117
 
118 118
   export default {
119 119
     components: { NewPrescriptionTable },
@@ -146,14 +146,18 @@
146 146
         search_input: '',
147 147
         case_history:{},
148 148
         order:{},
149
+        doctorList:[],
150
+        departmentList:[]
149 151
       }
150 152
     },
151 153
     methods: {
152 154
       open(index){
153 155
         if(index == 1){
154 156
 
157
+          //  /outpatientDoctorStation/print?record=2020-12-11&prescription_id=157&ids=157,159&patient_id=1064
155 158
         }else if(index == 2){
156
-
159
+           var record_date = this.format(this.case_history.sick_date)    
160
+          this.$router.push("/outpatientDoctorStation/recordPrint?record="+record_date+"&patient_id="+this.case_history.patient_id)
157 161
         }
158 162
       },
159 163
       getTimes(time,temp) {
@@ -210,6 +214,7 @@
210 214
             this.patientInfo = response.data.data.order.patient
211 215
             this.hisPatientInfo = response.data.data.order.his_patient
212 216
             this.case_history = response.data.data.order.case_history
217
+            console.log("历史详情",this.case_history)
213 218
             this.order = response.data.data.order
214 219
             console.log('this.order',this.order)
215 220
 
@@ -279,6 +284,36 @@
279 284
         // this.clear()
280 285
         this.visible = false
281 286
       },
287
+     getAllDoctorList(){
288
+      getAllDoctorList().then(response=>{
289
+        if(response.data.state == 1){
290
+            var doctor =  response.data.data.doctor 
291
+            this.doctorList = doctor
292
+             var department = response.data.data.department
293
+             console.log("department",department)
294
+             this.departmentList = department
295
+            }
296
+         })   
297
+      },
298
+      getDepartMent(id){
299
+         var name = ""
300
+         for(let i=0;i<this.departmentList.length;i++){
301
+           if(id == this.departmentList[i].id){
302
+              name = this.departmentList[i].name
303
+           }
304
+         }
305
+         return name
306
+      },
307
+
308
+      format(time){
309
+        moment.locale()
310
+        var times = time*1000
311
+        times = moment(times).format('YYYY-MM-DD')
312
+        return times
313
+      }
314
+    },
315
+    created(){
316
+      this.getAllDoctorList()
282 317
     }
283 318
   }
284 319
 </script>

+ 6 - 2
src/xt_pages/outpatientDoctorStation/components/medicalRecord.vue 查看文件

@@ -87,7 +87,7 @@
87 87
                             <template slot-scope="scope">{{ scope.row.user_name }}</template>
88 88
                         </el-table-column>
89 89
                         <el-table-column align="center" prop="name" label="创建日期">
90
-                            <template slot-scope="scope">{{ scope.row.record_date }}</template>
90
+                            <template slot-scope="scope">{{getTimes(scope.row.record_date) }}</template>
91 91
                         </el-table-column>
92 92
                         <el-table-column align="center" prop="name" label="模板说明">
93 93
                             <template slot-scope="scope">{{ scope.row.template_remark }}</template>
@@ -115,6 +115,7 @@
115 115
 import recordHistoryDetail from './recordHistoryDetail'
116 116
 import recordTemplateDetail from './recordTemplateDetail'
117 117
 import { getHistoryTemplate } from "@/api/project/project"
118
+import { uParseTime } from '@/utils/tools'
118 119
 export default {
119 120
     components:{
120 121
         recordHistoryDetail,
@@ -192,7 +193,10 @@ export default {
192 193
         },
193 194
         changeEndTime(){
194 195
           this.getlist()
195
-        }
196
+        },
197
+        getTimes(time) {
198
+        return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
199
+      },
196 200
     },
197 201
     created(){
198 202
        console.log("99999999999999999")

+ 9 - 4
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

@@ -173,13 +173,15 @@
173 173
         templatedetail:{},
174 174
         detalid:0,
175 175
         prescription_id:0,
176
-
176
+        doctors:[],
177
+        department:[],
177 178
         patientid:0,
178 179
         prescriptionList:[],
179 180
         centerDialogVisible:false,
180 181
         tableData:[],
181 182
         selecting_schs: [],
182 183
         index:0,
184
+        admin_info:{},
183 185
       }
184 186
     },
185 187
     methods: {
@@ -227,6 +229,8 @@
227 229
             this.patientTableDataTwo = response.data.data.list
228 230
             this.cal_one = response.data.data.total_one
229 231
             this.cal_two =  response.data.data.total_two
232
+            this.admin_info =  response.data.data.info
233
+
230 234
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
231 235
 
232 236
             if(this.patientTableData.length > 0) {
@@ -258,6 +262,9 @@
258 262
             this.case_history = response.data.data.case_history
259 263
 
260 264
             this.info = response.data.data.info
265
+            this.doctors = response.data.data.doctors
266
+            this.department = response.data.data.department
267
+
261 268
 
262 269
 
263 270
 
@@ -380,7 +387,7 @@
380 387
 
381 388
 
382 389
 
383
-            this.$refs.prescriptions.setData(this.prescriptions,this.info)
390
+            this.$refs.prescriptions.setData(this.prescriptions,this.info,this.admin_info,this.doctors,this.department)
384 391
           }
385 392
         })
386 393
 
@@ -670,8 +677,6 @@
670 677
 
671 678
       this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
672 679
       this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
673
-
674
-      console.log('1222232434234',document.documentElement.clientHeight)
675 680
       let tableHeight = document.body.clientHeight - 263
676 681
       this.tableHeight = tableHeight
677 682
 

+ 17 - 6
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue 查看文件

@@ -41,7 +41,7 @@
41 41
 
42 42
         <div class="printTitle">病历内容</div>
43 43
         <div class="recordTitle">
44
-            <div>科别:{{hispatient.departments?hispatient.departments:''}}</div>
44
+            <div>科别:{{getDeparment(hispatient.departments)?getDeparment(hispatient.departments):''}}</div>
45 45
             <div>姓名:{{patient.name?patient.name:''}}</div>
46 46
             <div>性别:
47 47
                 <span v-if="patient.gender == 1">男</span>
@@ -98,11 +98,12 @@ export default {
98 98
     props:{
99 99
       patient:Object,
100 100
       hispatient:Object,
101
-      history:Object,
101
+    //   history:Object,
102 102
     },
103 103
     data(){
104 104
         return{
105
-            educationOptions:[]
105
+            educationOptions:[],
106
+            departmentList:[]
106 107
         }                   
107 108
     },
108 109
     methods:{
@@ -121,9 +122,9 @@ export default {
121 122
                var doctor =  response.data.data.doctor
122 123
 
123 124
                this.doctorList = doctor
124
-            //    var department = response.data.data.department
125
-            //    console.log("department",department)
126
-            //    this.departmentList = department
125
+               var department = response.data.data.department
126
+               console.log("department",department)
127
+               this.departmentList = department
127 128
              }
128 129
            })   
129 130
        },
@@ -156,6 +157,16 @@ export default {
156 157
          }
157 158
       })
158 159
     },
160
+    getDeparment(id){
161
+    console.log("id---",id)
162
+     var name = ''
163
+     for(let i=0;i<this.departmentList.length;i++){
164
+         if(id == this.departmentList[i].id){
165
+            name = this.departmentList[i].name
166
+         }
167
+      }
168
+      return name
169
+    }
159 170
     },
160 171
     created(){
161 172
       this.educationOptions = getDataConfig("patient", "education_types");

+ 4 - 3
src/xt_pages/outpatientDoctorStation/template/printOne.vue 查看文件

@@ -31,12 +31,12 @@
31 31
 
32 32
           </div>
33 33
           <div class="doctorBox">
34
-              <p>医师:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
34
+              <p>医师:{{item.doctor?item.doctor:""}}</p>
35 35
               <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
36 36
           </div>
37 37
           <div class="actionBar">
38 38
                  <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
39
-                 <p>配对:{{getDoctor(item.advices[0].advice_doctor)?getDoctor(item.advices[0].advice_doctor):""}}</p>
39
+                 <p>配对:</p>
40 40
                  <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
41 41
                  <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
42 42
                  <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p>
@@ -149,7 +149,7 @@ export default {
149 149
        return name
150 150
      },
151 151
      getTotalOne(id) {
152
-        
152
+        console.log("处方数据",this.prescriptions)
153 153
         var total = 0
154 154
         var addtotal = 0
155 155
         for (let i = 0; i < this.prescriptions.length; i++) {
@@ -167,6 +167,7 @@ export default {
167 167
             }
168 168
               addtotal =  Math.floor(addtotal * 100) / 100
169 169
         }
170
+        
170 171
         return total + addtotal
171 172
        }
172 173
       }, 

+ 1 - 1
src/xt_pages/outpatientDoctorStation/template/printTwo.vue 查看文件

@@ -30,7 +30,7 @@
30 30
         </div>
31 31
         <div class="actionBar">
32 32
             <p>审核:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
33
-            <p>配对:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
33
+            <p>配对:</p>
34 34
             <p>核对:{{getDoctor(advicePrint[0].checker)?getDoctor(advicePrint[0].checker):""}}</p>
35 35
             <p>发药:{{getDoctor(advicePrint[0].execution_staff)?getDoctor(advicePrint[0].execution_staff):""}}</p>
36 36
             <p>药费:{{advicePrint[0].price?advicePrint[0].price:""}}</p>

+ 7 - 0
src/xt_pages/outpatientRegistration/index.vue 查看文件

@@ -529,6 +529,8 @@ export default {
529 529
                      this.form.total= "" ,
530 530
                      this.form.phone = "",
531 531
                      this.form.social_type = ""
532
+                   }else{
533
+                       this.$message.error("今日患者已挂号!")
532 534
                    }
533 535
                 })
534 536
              }
@@ -561,6 +563,11 @@ export default {
561 563
          }
562 564
       },
563 565
       changeName(id){
566
+            this.form.sex = ""
567
+            this.form.age = ""
568
+            this.form.birthday = ""
569
+            this.form.phone = ""
570
+            this.form.idCard = ""
564 571
         getPatientDetail(id).then(response=>{
565 572
            if(response.data.state == 1){
566 573
              var patient =  response.data.data.patient

+ 10 - 4
src/xt_pages/outpatientRegistration/registrationHistory.vue 查看文件

@@ -99,7 +99,8 @@
99 99
                 </el-table-column>
100 100
                 <el-table-column align="center" prop="name" label="操作" width="80">
101 101
                     <template slot-scope="scope">
102
-                        <el-button size="mini" type="primary" v-if="scope.row.is_return == 1" @click ="toReturnPatient(scope.row.id)">退号</el-button> 
102
+                        <el-button size="mini" type="primary" v-if="scope.row.is_return == 1 && scope.row.record_date < startUnix" :disabled="true">已过号</el-button> 
103
+                        <el-button size="mini" type="primary" v-if="scope.row.is_return == 1 && scope.row.record_date >= startUnix" @click ="toReturnPatient(scope.row.id)">退号</el-button> 
103 104
                         <el-button size="mini" type="primary" v-if="scope.row.is_return == 2" :disabled="true">已退号</el-button>
104 105
                         <el-button size="mini" type="primary" v-if="scope.row.is_return == 3" >已就诊</el-button>  
105 106
                     </template>
@@ -181,7 +182,8 @@ export default {
181 182
             }],
182 183
             
183 184
             tablePatient:[],
184
-            creator:""
185
+            creator:"",
186
+            startUnix:''
185 187
         }
186 188
     },
187 189
     created(){
@@ -198,7 +200,10 @@ export default {
198 200
        //获取所有挂号号的患者
199 201
 
200 202
        this.creator = this.$store.getters.xt_user.user.user_name
201
-    
203
+       var today = moment().startOf('day').format('YYYY-MM-DD')
204
+       var todayUnix = Date.parse(today)/1000 
205
+       this.startUnix = todayUnix - 28800
206
+      
202 207
        this.getlist()
203 208
     },
204 209
     methods:{
@@ -254,6 +259,7 @@ export default {
254 259
           getHisPatientHistory(params).then(response=>{
255 260
              if(response.data.state == 1){
256 261
                 var history = response.data.data.history
262
+
257 263
                 console.log("history",history)
258 264
                 this.tableData = history
259 265
                 var total =  response.data.data.total
@@ -345,7 +351,7 @@ export default {
345 351
       handleSelect(val){   
346 352
           this.search_input = val.name
347 353
           this.getlist()
348
-        },
354
+       },
349 355
 
350 356
     }
351 357
 }