Просмотр исходного кода

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

See999 4 лет назад
Родитель
Сommit
3823b10b4e

+ 31 - 0
src/api/his/his.js Просмотреть файл

@@ -131,6 +131,37 @@ export function getHisPrescriptionList() {
131 131
 }
132 132
 
133 133
 
134
+export function getHisPrescriptionInfo(params) {
135
+  return request({
136
+    url: "/api/hisprescription/info",
137
+    method: "get",
138
+    params:params,
139
+  });
140
+}
141
+
142
+
143
+
144
+export function getConfig() {
145
+  return request({
146
+    url: "/api/medicalinsurance/config",
147
+    method: "get",
148
+  });
149
+}
150
+
151
+
152
+
153
+export function Refund() {
154
+  return request({
155
+    url: "/api/refund/post",
156
+    method: "post",
157
+  });
158
+}
159
+
160
+
161
+
162
+
163
+
164
+
134 165
 
135 166
 
136 167
 

+ 76 - 15
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Просмотреть файл

@@ -42,15 +42,15 @@
42 42
           <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
43 43
           <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
44 44
           <el-button size="small" @click="open(3)" type="primary">打印</el-button>
45
-          <el-button v-loading="loadingone" v-if="hisPatientInfo == null || hisPatientInfo.id == 0 " size="small"
45
+          <el-button v-loading="loadingone"  size="small"
46 46
                      @click="open(6)"
47 47
                      type="primary">挂号
48 48
           </el-button>
49
-          <el-button v-loading="loadingtwo" v-if="hisPatientInfo != null && hisPatientInfo.id > 0 " size="small"
49
+          <el-button v-loading="loadingtwo" v-if="this.info.prescription_status == 1" size="small"
50 50
                      @click="open(4)"
51 51
                      type="primary">收费
52 52
           </el-button>
53
-          <el-button size="small" @click="open(5)" type="primary">退费</el-button>
53
+          <el-button size="small" @click="open(5)" type="primary" v-if="this.info && this.info.prescription_status == 3">退费</el-button>
54 54
         </div>
55 55
 
56 56
         <div class="mainCenter">
@@ -87,8 +87,11 @@
87 87
 
88 88
                   </div>
89 89
                   <div class="costBox">
90
-                    <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
91
-                    <span>{{ state }}</span>
90
+                    <span>当前处方总费用:<span style="color:red;">{{ total}}元</span></span>
91
+                    <span v-if="this.curPrescriptions.order_status  == 1">待结算</span>
92
+                    <span v-if="this.curPrescriptions.order_status  == 2">已结算</span>
93
+                    <span v-if="this.curPrescriptions.order_status  == 3">已退费</span>
94
+
92 95
                   </div>
93 96
                 </div>
94 97
                 <div class="centerRight">
@@ -114,6 +117,8 @@
114 117
                   <ul class="basicUl">
115 118
                     <li style="width:50%;">医生:{{ info.doctor }}</li>
116 119
                     <li style="width:50%;">科室:{{ info.departments }}</li>
120
+                    <li style="width:50%;">总费用:{{ getTotal() }}</li>
121
+
117 122
                     <li style="width:100%;">判断结果:{{info.diagnosis}}</li>
118 123
                     <li style="width:100%;">是否有传染病:</li>
119 124
                     <li style="width:100%;">血压:</li>
@@ -206,7 +211,7 @@
206 211
   import prescriptionTable from './components/prescriptionTable'
207 212
   import additionalCharges from './components/additionalCharges'
208 213
   import { getPatientInformation, getPatientList } from '@/api/project/project'
209
-  import { getPatientInfo, getSchedulePatientList, register, upload } from '@/api/his/his'
214
+  import { getPatientInfo, getSchedulePatientList, register, upload,Refund } from '@/api/his/his'
210 215
 
211 216
   const moment = require('moment')
212 217
   export default {
@@ -336,18 +341,16 @@
336 341
                 name: '处方' + index,
337 342
                 advices: tempAdvice,
338 343
                 project: tempProject,
339
-                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
340 346
               }
341 347
               this.prescriptions.push(obj)
342 348
               this.curPrescriptions = this.prescriptions[0]
343
-
349
+              this.total = 0
350
+              this.total = this.getTotalOne()
344 351
             }
345 352
           }
346 353
         })
347
-
348
-        console.log(val)
349
-        console.log(patientInfo.id)
350
-
351 354
       },
352 355
       handleClick() {
353 356
 
@@ -363,6 +366,14 @@
363 366
             this.curPrescriptions = temp
364 367
           }
365 368
         }
369
+        console.log(this.curPrescriptions)
370
+
371
+        this.total = 0
372
+        this.total = this.getTotalOne()
373
+        console.log(this.total)
374
+
375
+
376
+
366 377
       }, deepClone(source) {
367 378
         if (!source && typeof source !== 'object') {
368 379
           throw new Error('error arguments', 'shallowClone')
@@ -376,6 +387,34 @@
376 387
           }
377 388
         })
378 389
         return targetObj
390
+      },getTotalOne(){
391
+        var total = 0
392
+          if(this.curPrescriptions.type == 1) {
393
+            if (this.curPrescriptions.advices != null) {
394
+              for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
395
+                console.log(this.curPrescriptions.advices[a].retail_price)
396
+                console.log(this.curPrescriptions.advices[a].prescribing_number)
397
+
398
+                total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
399
+              }
400
+            }
401
+            return total
402
+
403
+          }else{
404
+            var total = 0
405
+            if (this.curPrescriptions.project != null) {
406
+              for (let b = 0; b < this.curPrescriptions.project.length; b++) {
407
+                console.log(this.curPrescriptions.project[b].price )
408
+                console.log(this.curPrescriptions.project[b].total )
409
+                total = total + this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total
410
+              }
411
+            }
412
+            return total
413
+
414
+          }
415
+
416
+
417
+
379 418
       },
380 419
       getTotal() {
381 420
         var total = 0
@@ -425,6 +464,26 @@
425 464
           this.state = '已收费'
426 465
           this.$message({ message: '收费成功', type: 'success' })
427 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
+
428 487
           this.$message({ message: '退费成功', type: 'success' })
429 488
         } else if (index == 6) {
430 489
 
@@ -453,9 +512,6 @@
453 512
         }
454 513
       },
455 514
 
456
-      // addCharges(){
457
-      //     this.$refs.additionalCharges.show()
458
-      // },
459 515
       choosePatient() {
460 516
         console.log(id)
461 517
         this.radioStatus = id
@@ -561,10 +617,15 @@
561 617
                 name: '处方' + index,
562 618
                 advices: tempAdvice,
563 619
                 project: tempProject,
620
+                order_status:response.data.data.prescription[i].order_status,
564 621
                 type: response.data.data.prescription[i].type
565 622
               }
566 623
               this.prescriptions.push(obj)
567 624
               this.curPrescriptions = this.prescriptions[0]
625
+              this.total = 0
626
+              this.total = this.getTotalOne()
627
+              console.log(this.total)
628
+
568 629
 
569 630
             }
570 631
           }

+ 2 - 0
src/xt_pages/outpatientCharges/summary.vue Просмотреть файл

@@ -67,6 +67,8 @@
67 67
             <div v-if="scope.row.order_status == 1">待结算</div>
68 68
             <div v-if="scope.row.order_status == 2">已结算</div>
69 69
             <div v-if="scope.row.order_status == 3">结算失败</div>
70
+            <div v-if="scope.row.order_status == 4">已退费</div>
71
+
70 72
           </template>
71 73
         </el-table-column>
72 74
         <el-table-column align="center" prop="name" label="操作">

+ 2 - 1
src/xt_pages/outpatientCharges/summaryDetail.vue Просмотреть файл

@@ -115,7 +115,8 @@ export default {
115 115
           this.curPrescriptions = temp
116 116
         }
117 117
       }
118
-    }, deepClone(source) {
118
+    },
119
+    deepClone(source) {
119 120
       if (!source && typeof source !== 'object') {
120 121
         throw new Error('error arguments', 'shallowClone')
121 122
       }

+ 110 - 74
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Просмотреть файл

@@ -19,12 +19,12 @@
19 19
             <el-input v-model="patientInfo.id_card_no" placeholder="" readonly></el-input>
20 20
           </el-form-item>
21 21
           <!--<el-form-item label="挂号类型: " prop="name">-->
22
-            <!--<el-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>-->
22
+          <!--<el-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>-->
23 23
           <!--</el-form-item>-->
24 24
           <el-form-item label="挂号类型: " prop="name">
25 25
             <el-select style="margin-right:5px;" v-model="register_type" placeholder="">
26 26
               <el-option
27
-                v-for="(item,index) in getDictionaryDataConfig('system','register_type')"
27
+                v-for="(item,index) in this.register_types"
28 28
                 :key="index"
29 29
                 :label="item.name"
30 30
                 :value="item.name">
@@ -88,7 +88,7 @@
88 88
               v-for="(item,index) in doctors"
89 89
               :key="index"
90 90
               :label="item.user_name"
91
-              :value="item.user_name">
91
+              :value="item.admin_user_id">
92 92
             </el-option>
93 93
           </el-select>
94 94
           <span>科室:</span>
@@ -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"
@@ -235,7 +237,8 @@
235 237
         </template>
236 238
       </div>
237 239
     </div>
238
-    <additionalCharges ref='additionalCharges' :hisPatientInfo="hisPatientInfo" :patientInfo="patientInfo"></additionalCharges>
240
+    <additionalCharges ref='additionalCharges' :hisPatientInfo="hisPatientInfo"
241
+                       :patientInfo="patientInfo"></additionalCharges>
239 242
     <select-template ref='selectTemplate'></select-template>
240 243
     <save-template ref='saveTemplate'></save-template>
241 244
   </div>
@@ -248,8 +251,7 @@
248 251
     delHisPrescription,
249 252
     getInitData,
250 253
     getPatientInfo,
251
-    getSchedulePatientList,
252
-
254
+    getSchedulePatientList
253 255
   } from '@/api/his/his'
254 256
   import { getDictionaryDataConfig } from '@/utils/data'
255 257
   import prescriptionTable from './prescriptionTable'
@@ -257,13 +259,14 @@
257 259
   import saveTemplate from './saveTemplate'
258 260
   import additionalCharges from './additionalCharges'
259 261
   import { addProjectTeam, getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
260
- 
262
+
261 263
   export default {
262 264
     props: {
263 265
       patientInfo: Object,
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,
@@ -282,7 +285,7 @@
282 285
     },
283 286
     data() {
284 287
       return {
285
-        register_type:"",
288
+        register_type: '',
286 289
         value: '',
287 290
         form: {
288 291
           name: ''
@@ -322,10 +325,20 @@
322 325
         teamList: [],
323 326
         doctors: [],
324 327
         departMent: [],
325
-        curStatus: 0
328
+        curStatus: 0,
329
+        order_status:"",
330
+        register_types: [
331
+          { id: 1, name: '医保' },
332
+          { id: 2, name: '自费' }
333
+
334
+        ]
326 335
       }
327 336
     },
328 337
     methods: {
338
+      searchAction(){
339
+        console.log(this.search_keyword)
340
+
341
+      },
329 342
       getTotal() {
330 343
         var total = 0
331 344
         for (let i = 0; i < this.prescriptions.length; i++) {
@@ -371,11 +384,11 @@
371 384
       changeKind(val) {
372 385
         this.drugs = []
373 386
 
374
-        if(val == 0){
387
+        if (val == 0) {
375 388
           this.drugs = this.allDrugs
376
-        }else{
377
-          for (let i = 0; i < this.allDrugs.length; i++){
378
-            if (this.allDrugs[i].drug_type == val){
389
+        } else {
390
+          for (let i = 0; i < this.allDrugs.length; i++) {
391
+            if (this.allDrugs[i].drug_type == val) {
379 392
               this.drugs.push(this.allDrugs[i])
380 393
             }
381 394
           }
@@ -396,7 +409,6 @@
396 409
             this.advices_template = response.data.data.advices_template
397 410
             this.doctors = response.data.data.doctors
398 411
 
399
-
400 412
           }
401 413
         })
402 414
 
@@ -432,7 +444,6 @@
432 444
             if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
433 445
               this.customTabIndex = this.rightTab
434 446
               this.curStatus = 0
435
-
436 447
             }
437 448
 
438 449
           }
@@ -440,41 +451,53 @@
440 451
         }
441 452
       },
442 453
       clearData() {
443
-        console.log("111111")
444 454
         this.curPrescriptions = []
445 455
         this.curStatus = 0
446 456
         this.curDrugs = []
447 457
         this.preDrugs = []
448 458
         this.teamList = []
449 459
 
450
-
451 460
       },
452
-      setData(data,info) {
461
+      setData(data, info) {
453 462
         this.curStatus = 0
454 463
         this.prescriptions = data
455 464
         this.curPrescriptions = this.prescriptions[0]
456
-        if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0 ){
465
+        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
457 466
           this.curStatus = 1
458
-          this.customTabIndex= 1
467
+          this.customTabIndex = 1
459 468
           this.rightTab = 1
460 469
           this.showOne = true
461 470
           this.showTwo = false
462 471
 
463 472
         }
464 473
 
465
-        if(this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0 ){
474
+        if (this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0) {
466 475
           this.curStatus = 2
467
-          this.customTabIndex= 2
476
+          this.customTabIndex = 2
468 477
           this.rightTab = 2
469 478
           this.showOne = false
470 479
           this.showTwo = true
471 480
         }
472 481
 
473
-
474 482
         this.state1 = info.diagnosis
475 483
         this.state2 = info.sick_history
476
-        this.doctorValue = info.doctor
484
+        this.doctorValue = info.doctor_id
477 485
         this.departmentValue = info.departments
486
+        this.register_type = info.register_type
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
+        }
478 501
 
479 502
 
480 503
         // console.log(this.$refs)
@@ -488,13 +511,17 @@
488 511
         }
489 512
       },
490 513
       open(index) {
491
-        if(this.doctorValue.length <= 0){
492
-          this.$message.error("医生不能为空")
514
+        if(this.curPrescriptions.order_status >= 2){
515
+          this.$message.error('当前处方处于结算或者退费状态,无法保存')
516
+          return
517
+        }
518
+        if (this.doctorValue.length <= 0) {
519
+          this.$message.error('医生不能为空')
493 520
           return
494 521
         }
495 522
 
496
-        if(this.departmentValue.length <= 0){
497
-          this.$message.error("科室不能为空")
523
+        if (this.departmentValue.length <= 0) {
524
+          this.$message.error('科室不能为空')
498 525
           return
499 526
         }
500 527
 
@@ -504,9 +531,10 @@
504 531
             diagnose: this.state1,
505 532
             sick_history: this.state2,
506 533
             doctor: this.doctorValue,
507
-               department: this.departmentValue,
534
+            department: this.departmentValue,
508 535
             record_date: this.record_date,
509
-            his_patient_id: this.hisPatientInfo.id
536
+            his_patient_id: this.hisPatientInfo.id,
537
+            reg_type: this.register_type
510 538
           }
511 539
 
512 540
           for (let i = 0; i < this.prescriptions.length; i++) {
@@ -533,7 +561,6 @@
533 561
           }
534 562
           createHisPrescription(data, params).then(response => {
535 563
             if (response.data.state == 1) {
536
-              // this.prescriptions = []
537 564
               this.$message.success('保存成功')
538 565
             }
539 566
           })
@@ -547,6 +574,10 @@
547 574
 
548 575
       },
549 576
       addTab(targetName) {
577
+        if(this.curPrescriptions.order_status >= 2){
578
+          this.$message.error('该处方已经结算或者退费,无法继续添加处方')
579
+          return
580
+        }
550 581
         ++this.tabIndex
551 582
         let newTabName = '处方' + this.tabIndex
552 583
         this.prescriptions.push({
@@ -561,10 +592,15 @@
561 592
         this.curStatus = 0
562 593
       },
563 594
       removeTab(targetName) {
564
-        this.$confirm("处方删除后不可恢复,是否确认删除", "删除", {
565
-          confirmButtonText: "确 定",
566
-          cancelButtonText: "取 消",
567
-          type: "warning"
595
+        if(this.curPrescriptions.order_status >= 2){
596
+          this.$message.error('该处方已经结算或者退费,无法删除')
597
+          return
598
+        }
599
+
600
+        this.$confirm('处方删除后不可恢复,是否确认删除', '删除', {
601
+          confirmButtonText: '确 定',
602
+          cancelButtonText: '取 消',
603
+          type: 'warning'
568 604
         }).then(() => {
569 605
           let id = 0
570 606
           for (let i = 0; i < this.prescriptions.length; i++) {
@@ -593,10 +629,10 @@
593 629
             for (let i = 0; i < this.prescriptions.length; i++) {
594 630
               if (activeName == this.prescriptions[i].name) {
595 631
                 this.curPrescriptions = this.prescriptions[i]
596
-                if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
632
+                if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
597 633
                   this.curStatus = 1
598 634
                 }
599
-                if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
635
+                if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
600 636
                   this.curStatus = 2
601 637
                 }
602 638
               }
@@ -605,8 +641,7 @@
605 641
               this.curPrescriptions = []
606 642
               this.curStatus = 0
607 643
             }
608
-          }
609
-          else {
644
+          } else {
610 645
             let params = {
611 646
               'id': id
612 647
             }
@@ -632,10 +667,10 @@
632 667
                 for (let i = 0; i < this.prescriptions.length; i++) {
633 668
                   if (activeName == this.prescriptions[i].name) {
634 669
                     this.curPrescriptions = this.prescriptions[i]
635
-                    if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
670
+                    if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
636 671
                       this.curStatus = 1
637 672
                     }
638
-                    if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
673
+                    if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
639 674
                       this.curStatus = 2
640 675
                     }
641 676
                   }
@@ -651,29 +686,27 @@
651 686
           }
652 687
 
653 688
         })
654
-          .catch(() => {});
655
-
656
-
689
+          .catch(() => {
690
+          })
657 691
 
658 692
       },
659 693
       clickTab(index) {
660
-        if (index == 1){
694
+        if (index == 1) {
661 695
           if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
662
-            this.$message.error("当前处方为项目,无法切换为药品,需要新开处方")
696
+            this.$message.error('当前处方为项目,无法切换为药品,需要新开处方')
663 697
             return
664 698
           }
665
-        }else{
699
+        } else {
666 700
           if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
667
-            this.$message.error("当前处方为药品,无法切换为项目,需要新开处方")
701
+            this.$message.error('当前处方为药品,无法切换为项目,需要新开处方')
668 702
             return
669 703
           }
670 704
 
671
-
672 705
         }
673 706
 
674 707
         if (index == 1) {
675 708
 
676
-            this.teamList = []
709
+          this.teamList = []
677 710
           this.$refs.tables.clearSelection()
678 711
 
679 712
           this.showOne = true
@@ -699,21 +732,20 @@
699 732
         //用来区分处方属于项目还是药品
700 733
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
701 734
           this.customTabIndex = 1
702
-          this.curStatus =1
735
+          this.curStatus = 1
703 736
 
704 737
         }
705 738
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
706 739
           this.customTabIndex = 2
707
-          this.curStatus =2
740
+          this.curStatus = 2
708 741
         }
709 742
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
710 743
           // this.customTabIndex = this.rightTab
711 744
           this.customTabIndex = index
712
-          this.curStatus =0
745
+          this.curStatus = 0
713 746
 
714 747
         }
715 748
 
716
-
717 749
       }, changeAllGoodInfoTableData: function(selection) {
718 750
         this.curDrugs = selection
719 751
       }, addCharges() {
@@ -723,24 +755,32 @@
723 755
         this.curDrugs = selection
724 756
       },
725 757
       comfirm() {
758
+        if(this.curPrescriptions.order_status >= 2){
759
+          this.$message.error('该处方已经结算或者退费,无法继续添加药品或者项目')
760
+          this.teamList = []
761
+          this.curDrugs = []
762
+          this.$refs.tables.clearSelection()
763
+          this.$refs.multipleTable.clearSelection()
764
+          return
765
+        }
726 766
 
727
-        if (this.curStatus == 1  && this.rightTab == 2) {
767
+        if (this.curStatus == 1 && this.rightTab == 2) {
728 768
           this.$message.error('改处方是药品,无法添加项目')
729 769
           this.teamList = []
730 770
           this.$refs.tables.clearSelection()
731 771
           return
732 772
         }
733 773
 
734
-        if (this.curStatus ==2 && this.rightTab == 1) {
774
+        if (this.curStatus == 2 && this.rightTab == 1) {
735 775
           this.$message.error('改处方是项目,无法添加药品')
736 776
           this.curDrugs = []
737 777
           this.$refs.multipleTable.clearSelection()
738 778
           return
739 779
         }
740 780
 
741
-        for (let i = 0; i < this.teamList.length; i++){
742
-          for (let a = 0; a < this.curPrescriptions.project.length; a++){
743
-            if(this.teamList[i].id == this.curPrescriptions.project[a].project_id){
781
+        for (let i = 0; i < this.teamList.length; i++) {
782
+          for (let a = 0; a < this.curPrescriptions.project.length; a++) {
783
+            if (this.teamList[i].id == this.curPrescriptions.project[a].project_id) {
744 784
               this.$message.error('改处方存在相同的项目,无法添加相同的项目')
745 785
               return
746 786
 
@@ -751,10 +791,9 @@
751 791
         console.log(this.curDrugs)
752 792
         console.log(this.curPrescriptions.advices)
753 793
 
754
-
755
-        for (let i = 0; i < this.curDrugs.length; i++){
756
-          for (let a = 0; a < this.curPrescriptions.advices.length; a++){
757
-            if(this.curDrugs[i].id == this.curPrescriptions.advices[i].id){
794
+        for (let i = 0; i < this.curDrugs.length; i++) {
795
+          for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
796
+            if (this.curDrugs[i].id == this.curPrescriptions.advices[i].id) {
758 797
               this.$message.error('改处方存在相同的药品,无法添加相同的药品')
759 798
               return
760 799
 
@@ -762,9 +801,6 @@
762 801
           }
763 802
         }
764 803
 
765
-
766
-
767
-
768 804
         for (let i = 0; i < this.prescriptions.length; i++) {
769 805
           if (this.prescriptions[i].name == this.editableTabsValue) {
770 806
             var temp = this.deepClone(this.curDrugs)
@@ -775,7 +811,7 @@
775 811
               for (let b = 0; b < temp.length; b++) {
776 812
                 let obj = {
777 813
                   advice_id: 0,
778
-                  id:  temp[b].id,
814
+                  id: temp[b].id,
779 815
                   drug_name: temp[b].drug_name,
780 816
                   single_dose: temp[b].single_dose,
781 817
                   delivery_way: temp[b].delivery_way,
@@ -786,7 +822,7 @@
786 822
                   single_dose_unit: temp[b].min_unit,
787 823
                   prescribing_number_unit: temp[b].min_unit,
788 824
                   min_unit: temp[b].min_unit,
789
-                  medical_insurance_number:temp[b].medical_insurance_number,
825
+                  medical_insurance_number: temp[b].medical_insurance_number
790 826
 
791 827
                 }
792 828
                 this.prescriptions[i].advices.push(obj)
@@ -805,10 +841,10 @@
805 841
                   delivery_way: temp2[b].delivery_way,
806 842
                   execution_frequency: temp2[b].execution_frequency,
807 843
                   number_days: temp2[b].number_days,
808
-                  total:temp2[b].total,
809
-                  price:temp2[b].price,
810
-                  remark:"",
811
-                  medical_code:temp2[b].medical_code,
844
+                  total: temp2[b].total,
845
+                  price: temp2[b].price,
846
+                  remark: '',
847
+                  medical_code: temp2[b].medical_code
812 848
                 }
813 849
                 console.log(obj)
814 850
                 this.prescriptions[i].project.push(obj)

+ 285 - 178
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue Просмотреть файл

@@ -1,191 +1,298 @@
1 1
 <template>
2
-    <el-dialog
3
-        title="详情"
4
-        width="1000px"
5
-        :visible.sync="visible"
6
-        :before-close="_close"
7
-        class="detailDialog"
8
-    >
9
-        <el-tabs v-model="activeName">
10
-            <el-tab-pane label="处方详情" name="first">
11
-                <el-table :data="tableData" border height="350" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
12
-                    <el-table-column align="center" prop="name" label="类型">
13
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
14
-                    </el-table-column>
15
-                    <el-table-column align="center" prop="name" label="医嘱名称">
16
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
17
-                    </el-table-column>
18
-                    <el-table-column align="center" prop="name" label="组">
19
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
20
-                    </el-table-column>
21
-                    <el-table-column align="center" prop="name" label="每次量">
22
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
23
-                    </el-table-column>
24
-                    <el-table-column align="center" prop="name" label="单位">
25
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
26
-                    </el-table-column>
27
-                    <el-table-column align="center" prop="name" label="用法">
28
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
29
-                    </el-table-column>
30
-                    <el-table-column align="center" prop="name" label="频率">
31
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
32
-                    </el-table-column>
33
-                    <el-table-column align="center" prop="name" label="天数">
34
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
35
-                    </el-table-column>
36
-                    <el-table-column align="center" prop="name" label="总量">
37
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
38
-                    </el-table-column>
39
-                    <el-table-column align="center" prop="name" label="单位">
40
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
41
-                    </el-table-column>
42
-                    <el-table-column align="center" prop="name" label="限制说明">
43
-                        <template slot-scope="scope">{{ scope.row.date }}</template>
44
-                    </el-table-column>
45
-                </el-table> 
46
-            </el-tab-pane>
47
-            <el-tab-pane label="病历详情" name="second">
48
-                <div class="detailMain">
49
-                    <span style="width:240px;">处方号:344431222222222</span>
50
-                    <span style="width:200px;">医生:医生</span>
51
-                    <span style="width:200px;">科室:儿科</span>
52
-                    <span style="width:200px;">创建时间:2020-10-10 01:12:20</span>
53
-                </div>
54
-                <div class="commonCell">
55
-                    <p>基本信息</p>
56
-                    <div class="detailMain">
57
-                        <span style="width:240px;">疾病名称:无</span>
58
-                        <span style="width:200px;">症状:医生</span>
59
-                        <span style="width:200px;">发病日期:2020-10-10 01:12:20</span>
60
-                        <span style="width:200px;">是否传染:否</span>
61
-                    </div>
62
-                </div>
63
-                <div class="commonCell">
64
-                    <p>体格信息</p>
65
-                    <div class="detailMain">
66
-                        <span style="width:140px;">体温:℃</span>
67
-                        <span style="width:140px;">呼吸:0 次/分</span>
68
-                        <span style="width:140px;">脉搏:0 次/分</span>
69
-                        <span style="width:200px;">血压:0。00~0.00 mmHg</span>
70
-                    </div>
71
-                </div>
72
-                <div class="commonCell">
73
-                    <p></p>
74
-                    <div class="detailMain">
75
-                        <span style="width:140px;">血糖:0 mmol/L</span>
76
-                        <span style="width:140px;">血脂:0 mmol/L</span>
77
-                        <span style="width:140px;">身高:0 cm</span>
78
-                        <span style="width:200px;">体重:0 kg</span>
79
-                    </div>
80
-                </div>
81
-                <div class="commonCell">
82
-                    <p>主诉</p>
83
-                    <div>无</div>
84
-                </div>
85
-                <div class="commonCell">
86
-                    <p>现病史</p>
87
-                    <div>无</div>
88
-                </div>
89
-                <div class="commonCell">
90
-                    <p>门诊诊断</p>
91
-                    <div>无</div>
92
-                </div>
93
-                <div class="commonCell">
94
-                    <p>门诊医嘱</p>
95
-                    <div>无</div>
96
-                </div>
97
-                <div class="commonCell">
98
-                    <p>过敏史</p>
99
-                    <div>无</div>
100
-                </div>
101
-                <div class="commonCell">
102
-                    <p>既往史</p>
103
-                    <div>无</div>
104
-                </div>
105
-                <div class="commonCell">
106
-                    <p>个人史</p>
107
-                    <div>无</div>
108
-                </div>
109
-                <div class="commonCell">
110
-                    <p>家族史</p>
111
-                    <div>无</div>
112
-                </div>
113
-            </el-tab-pane>
2
+  <el-dialog
3
+    title="详情"
4
+    width="1000px"
5
+    :visible.sync="visible"
6
+    :before-close="_close"
7
+    class="detailDialog"
8
+  >
9
+    <el-tabs v-model="activeName">
10
+      <el-tab-pane label="处方详情" name="first">
11
+        <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
12
+          <el-tab-pane
13
+            v-for="(item, index) in prescriptions"
14
+            :key="index"
15
+            :label="item.name"
16
+            :name="item.name"
17
+          >
18
+          </el-tab-pane>
19
+
20
+          <div class="RP">
21
+            Rp
22
+          </div>
23
+          <new-prescription-table ref="prescription_tables"
24
+                                  :prescription="curPrescriptions"></new-prescription-table>
114 25
         </el-tabs>
115
-        <div slot="footer" class="dialog-footer">
116
-            <el-button @click="hide">取 消</el-button>
117
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
26
+
27
+      </el-tab-pane>
28
+      <el-tab-pane label="病历详情" name="second">
29
+        <div class="detailMain">
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>
35
+        <div class="commonCell">
36
+          <p>基本信息</p>
37
+          <div class="detailMain">
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
+
44
+          </div>
45
+        </div>
46
+        <div class="commonCell">
47
+          <p>体格信息</p>
48
+          <div class="detailMain">
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>
54
+          </div>
55
+        </div>
56
+        <div class="commonCell">
57
+          <p></p>
58
+          <div class="detailMain">
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>
63
+          </div>
64
+        </div>
65
+        <div class="commonCell">
66
+          <p>主诉</p>
67
+          <div>{{case_history.chief_conplaint}}</div>
68
+        </div>
69
+        <div class="commonCell">
70
+          <p>现病史</p>
71
+          <div>{{case_history.history_of_present_illness}}</div>
72
+        </div>
73
+        <div class="commonCell">
74
+          <p>门诊诊断</p>
75
+          <div>{{case_history.diagnostic}}</div>
76
+        </div>
77
+        <div class="commonCell">
78
+          <p>门诊医嘱</p>
79
+          <div>{{case_history.doctor_advice}}</div>
118 80
         </div>
119
-    </el-dialog>         
81
+        <div class="commonCell">
82
+          <p>过敏史</p>
83
+          <div>{{order.sick_history}}</div>
84
+        </div>
85
+        <div class="commonCell">
86
+          <p>既往史</p>
87
+          <div>{{case_history.past_history}}</div>
88
+        </div>
89
+        <div class="commonCell">
90
+          <p>个人史</p>
91
+          <div>{{case_history.personal_history}}</div>
92
+        </div>
93
+        <div class="commonCell">
94
+          <p>家族史</p>
95
+          <div>{{case_history.family_history}}</div>
96
+        </div>
97
+      </el-tab-pane>
98
+    </el-tabs>
99
+    <div slot="footer" class="dialog-footer">
100
+      <el-button @click="hide">取 消</el-button>
101
+      <!--<el-button type="primary" :loading="submitLoading" @click="hide">确定</el-button>-->
102
+    </div>
103
+  </el-dialog>
120 104
 </template>
121 105
 
106
+
107
+
122 108
 <script>
123
-export default {
124
-    data(){
125
-        return{
126
-            visible:false,
127
-            tableData: [{
128
-            date: '2016-05-02',
129
-            name: '王小虎',
130
-            address: '上海市普陀区金沙江路 1518 弄'
131
-            }, {
132
-            date: '2016-05-04',
133
-            name: '王小虎',
134
-            address: '上海市普陀区金沙江路 1517 弄'
135
-            }, {
136
-            date: '2016-05-01',
137
-            name: '王小虎',
138
-            address: '上海市普陀区金沙江路 1519 弄'
139
-            }, {
140
-            date: '2016-05-03',
141
-            name: '王小虎',
142
-            address: '上海市普陀区金沙江路 1516 弄'
143
-            }],
144
-            activeName:'first'
145
-        }
109
+  import { getHisPrescriptionInfo } from '@/api/his/his'
110
+  import NewPrescriptionTable from './newPrescriptionTable'
111
+  import { uParseTime } from '@/utils/tools'
112
+
113
+  export default {
114
+    components: { NewPrescriptionTable },
115
+    data() {
116
+      return {
117
+        visible: false,
118
+        activeName: 'first',
119
+        curPrescriptions: {},
120
+        prescriptions: [],
121
+        record_date: '',
122
+        editableTabsValue: '1',
123
+        loadingone: false,
124
+        editableTabs: [{
125
+          title: '处方1',
126
+          name: '1'
127
+        }],
128
+        tabIndex: 1,
129
+        hisPatientInfo: {},
130
+        loadingtwo: false,
131
+        patientTableData: [{
132
+          name: '杨美英',
133
+          mdtrt_id: '1709946'
134
+        }],
135
+        patientInfo: { id: 0 },
136
+        doctor: {},
137
+        total: 0,
138
+        state: '未收费',
139
+        radio: 1,
140
+        radioStatus: 1,
141
+        search_input: '',
142
+        case_history:{},
143
+        order:{},
144
+      }
146 145
     },
147
-    methods:{
148
-        _close: function(done) {
149
-            // this.clear()
150
-            done()
151
-        },
152
-        clear: function() {
153
-            this.form.id = 0;
154
-            this.form.name = "";
155
-            this.form.intro = "";
156
-        },
157
-        show() {
158
-            // this.clear()
159
-            this.visible = true
160
-        },
161
-        hide() {
162
-            // this.clear()
163
-            this.visible = false
164
-        },
165
-    }
166
-}
167
-</script>
146
+    methods: {
147
+      getTimes(time,temp) {
148
+        return uParseTime(time, temp);
149
+      },
150
+      tabclickEvent(val) {
151
+        for (let i = 0; i < this.prescriptions.length; i++) {
152
+          if (this.prescriptions[i].name == val.name) {
153
+            this.curPrescriptions = {}
154
+            var temp = this.deepClone(this.prescriptions[i])
155
+            this.curPrescriptions = temp
156
+          }
157
+        }
158
+      },
159
+      deepClone(source) {
160
+        if (!source && typeof source !== 'object') {
161
+          throw new Error('error arguments', 'shallowClone')
162
+        }
163
+        const targetObj = source.constructor === Array ? [] : {}
164
+        Object.keys(source).forEach((keys) => {
165
+          if (source[keys] && typeof source[keys] === 'object') {
166
+            targetObj[keys] = this.deepClone(source[keys])
167
+          } else {
168
+            targetObj[keys] = source[keys]
169
+          }
170
+        })
171
+        return targetObj
172
+      },
168 173
 
169
-<style lang="scss">
170
-.detailDialog{
171
-    .el-dialog__body{
172
-        padding: 0 20px 30px;
173
-    }
174
-    .detailMain{
175
-        // padding:5px;
176
-        span{
177
-            display: inline-block;
174
+      moreState(tab, event) {
175
+        if (tab == 'more') {
176
+          return false
178 177
         }
179
-    }
180
-    .commonCell{
181
-        display: flex;
182
-        line-height: 40px;
183
-        >p{
184
-            font-weight: bold;
185
-            color:#000;
186
-            width: 80px;
178
+      },
179
+
180
+      _close: function(done) {
181
+        // this.clear()
182
+        done()
183
+      },
184
+      clear: function() {
185
+        this.form.id = 0
186
+        this.form.name = ''
187
+        this.form.intro = ''
188
+      },
189
+      show(id) {
190
+        let params={
191
+          id:id,
187 192
         }
193
+        getHisPrescriptionInfo(params).then(response => {
194
+          if (response.data.state == 0) {
195
+            this.$message.error(response.data.msg)
196
+            return false
197
+          } else {
198
+            this.patientInfo = response.data.data.order.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
+
204
+            this.prescriptions = []
205
+            for (let i = 0; i < response.data.data.prescription.length; i++) {
206
+              var prescription = response.data.data.prescription[i]
207
+              let tempAdvice = []
208
+              let tempProject = []
209
+              for (let b = 0; b < prescription.advices.length; b++) {
210
+                let obj = {
211
+                  advice_id: prescription.advices[b].id,
212
+                  drug_name: prescription.advices[b].advice_name,
213
+                  single_dose: prescription.advices[b].single_dose,
214
+                  delivery_way: prescription.advices[b].delivery_way,
215
+                  execution_frequency: prescription.advices[b].execution_frequency,
216
+                  retail_price: prescription.advices[b].price.toString(),
217
+                  remark: prescription.advices[b].remark,
218
+                  prescribing_number: prescription.advices[b].prescribing_number.toString(),
219
+                  single_dose_unit: prescription.advices[b].single_dose_unit,
220
+                  prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
221
+                  min_unit: prescription.advices[b].single_dose_unit,
222
+                  medical_insurance_number: prescription.advices[b].med_list_codg
223
+
224
+                }
225
+                tempAdvice.push(obj)
226
+              }
227
+
228
+              for (let b = 0; b < prescription.project.length; b++) {
229
+                let obj = {
230
+                  id: prescription.project[b].id,
231
+                  project_id: prescription.project[b].project.id,
232
+                  project_name: prescription.project[b].project.project_name,
233
+                  statistical_classification: prescription.project[b].statistical_classification,
234
+                  single_dose: prescription.project[b].single_dose,
235
+                  delivery_way: prescription.project[b].delivery_way,
236
+                  execution_frequency: prescription.project[b].execution_frequency,
237
+                  number_days: prescription.project[b].day,
238
+                  total: prescription.project[b].count.toString(),
239
+                  price: prescription.project[b].price,
240
+                  remark: prescription.project[b].remark,
241
+                  medical_code: prescription.project[b].project.medical_code
242
+                }
243
+                tempProject.push(obj)
244
+              }
245
+              let index = i + 1
246
+              let obj = {
247
+                id: prescription.id,
248
+                name: '处方' + index,
249
+                advices: tempAdvice,
250
+                project: tempProject,
251
+                type: response.data.data.prescription[i].type
252
+              }
253
+              this.prescriptions.push(obj)
254
+              this.curPrescriptions = this.prescriptions[0]
255
+            }
256
+          }
257
+        })
258
+        // this.clear()
259
+        this.visible = true
260
+
261
+
262
+
263
+      },
264
+      hide() {
265
+        // this.clear()
266
+        this.visible = false
267
+      }
188 268
     }
189
-}
269
+  }
270
+</script>
271
+
272
+<style lang="scss">
273
+  .detailDialog {
274
+
275
+  .el-dialog__body {
276
+    padding: 0 20px 30px;
277
+  }
278
+
279
+  .detailMain {
280
+  span {
281
+    display: inline-block;
282
+  }
283
+
284
+  }
285
+  .commonCell {
286
+    display: flex;
287
+    line-height: 40px;
288
+
289
+  > p {
290
+    font-weight: bold;
291
+    color: #000;
292
+    width: 80px;
293
+  }
294
+
295
+  }
296
+  }
190 297
 </style>
191 298
 

+ 8 - 3
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue Просмотреть файл

@@ -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,8 +269,10 @@
266 269
          return name
267 270
       },
268 271
       deleteProject(row,i){
269
-       
270
-        console.log("row",row)
272
+        if(this.curPrescriptions.order_status >= 2){
273
+          this.$message.error('该处方已经结算或者退费,无法删除')
274
+          return
275
+        }
271 276
         this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
272 277
           confirmButtonText: "确 定",
273 278
           cancelButtonText: "取 消",

+ 48 - 16
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Просмотреть файл

@@ -45,10 +45,10 @@
45 45
             <el-radio-button label="病历"></el-radio-button>
46 46
           </el-radio-group>
47 47
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '处方'">
48
-            <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
49
-            <el-button size="small" @click="open(2)" type="primary">打印</el-button>
50
-            <el-button size="small" @click="open(4)" type="primary">选择模板</el-button>
51
-            <el-button size="small" @click="open(5)" type="primary">存模板</el-button>
48
+            <el-button size="small" ref="button_one"   @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
49
+            <el-button size="small" ref="button_two"   @click="open(2)" type="primary">打印</el-button>
50
+            <el-button size="small" ref="button_three" @click="open(4)" type="primary">选择模板</el-button>
51
+            <el-button size="small" ref="button_four"  @click="open(5)" type="primary">存模板</el-button>
52 52
           </div>
53 53
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '病历'">
54 54
             <el-button size="small" @click="opentwo(1)" type="primary" style="margin-left:10px;">保存</el-button>
@@ -62,10 +62,10 @@
62 62
         <desk-prescription  :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
63 63
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
64 64
                            :hisPatientInfo="hisPatientInfo"
65
-                           v-if="titleType == '处方'" style="flex:1;"></desk-prescription>
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-if="titleType == '病历'" :detalid="detalid" ref="child"></desk-record>
68
-                    
67
+                     :hisPatientInfo="hisPatientInfo"   v-show="titleType == '病历'" :detalid="detalid" ref="child"></desk-record>
68
+
69 69
          <medicalRecord ref='medicalRecord' @func="getMsgFormSon" ></medicalRecord>
70 70
          <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
71 71
       </div>
@@ -113,6 +113,7 @@
113 113
         ],
114 114
         titleType: '处方',
115 115
         patientTableData: [{}],
116
+        patientTableDataTwo:[{}],
116 117
         patientInfo: {},
117 118
         hisPatientInfo: {},
118 119
         case_history: {},
@@ -134,6 +135,21 @@
134 135
 
135 136
       },
136 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
+
137 153
 
138 154
       },
139 155
       change(val) {
@@ -151,6 +167,8 @@
151 167
             return false
152 168
           } else {
153 169
             this.patientTableData = response.data.data.list
170
+            this.patientTableDataTwo = response.data.data.list
171
+
154 172
             console.log('222', this.patientTableData)
155 173
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
156 174
             let cal_one = 0
@@ -181,8 +199,8 @@
181 199
             this.$message.error(response.data.msg)
182 200
             return false
183 201
           } else {
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
@@ -275,7 +293,8 @@
275 293
                   id: prescription.id,
276 294
                   name: '处方' + index,
277 295
                   advices: tempAdvice,
278
-                  project: tempProject
296
+                  project: tempProject,
297
+                  order_status:prescription.order_status
279 298
                 }
280 299
                 this.prescriptions.push(obj)
281 300
               }
@@ -284,10 +303,12 @@
284 303
                 id:0,
285 304
                 name: '处方' + 1,
286 305
                 advices: [],
287
-                project: []
306
+                project: [],
307
+                orderStatus:0,
288 308
               }
289 309
               this.prescriptions.push(obj)
290 310
             }
311
+            console.log(this.prescriptions)
291 312
 
292 313
             this.$refs.prescriptions.setData(this.prescriptions,this.info)
293 314
           }
@@ -303,9 +324,20 @@
303 324
         //     psn_name:"杨美英",
304 325
         //     age:60.7
305 326
         // }
327
+      },open(index) {
328
+        if (index == 1) {
329
+          this.$refs.prescriptions.open(1)
330
+        } else if (index == 2) {
331
+          this.$refs.prescriptions.open(2)
332
+        } else if (index == 3) {
333
+          this.$refs.prescriptions.open(3)
334
+        } else if (index == 4) {
335
+          this.$refs.prescriptions.open(4)
336
+        }
306 337
       },
338
+
307 339
       opentwo(index) {
308
-        console.log("index===",index)
340
+        console.log("index",index)
309 341
         if (index == 1) {
310 342
           if(this.patientInfo.id == undefined){
311 343
             this.$message.error("请先选择病人")
@@ -377,16 +409,16 @@
377 409
       },
378 410
       //  getTemplateDetail(id){
379 411
       //     getTemplateDetail(id).then(response=>{
380
-      //         if(response.data.state == 1){  
412
+      //         if(response.data.state == 1){
381 413
       //           var templatedetail =  response.data.data.templateDetail
382 414
       //           console.log("templatedetail",templatedetail)
383
-      //           templatedetail = 
384
-             
385
-               
415
+      //           templatedetail =
416
+
417
+
386 418
       //         }
387 419
       //     })
388 420
       //   },
389
-    }, 
421
+    },
390 422
     created() {
391 423
       var nowDate = new Date()
392 424
       var nowYear = nowDate.getFullYear()

+ 28 - 16
src/xt_pages/outpatientDoctorStation/pastInquiries.vue Просмотреть файл

@@ -15,35 +15,40 @@
15 15
       </div>
16 16
       <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
17 17
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
18
-        <el-table-column align="center" width="60" label="序号">
19
-          <template slot-scope="scope">
20
-            1
21
-          </template>
18
+        <el-table-column align="center" label="序号" width="60" type="index">
19
+          <!--<template slot-scope="scope">{{ scope.$index +1 }}</template>-->
22 20
         </el-table-column>
23 21
         <el-table-column align="center" prop="name" label="姓名" width="100">
24
-          <template slot-scope="scope">{{ scope.row.date }}</template>
22
+          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
25 23
         </el-table-column>
26 24
         <el-table-column align="center" prop="name" label="处方日期" width="110">
27
-          <template slot-scope="scope">{{ scope.row.date }}</template>
28
-        </el-table-column>
29
-        <el-table-column align="center" prop="name" label="患者类型">
30
-          <template slot-scope="scope">{{ scope.row.date }}</template>
25
+          <template slot-scope="scope"> {{getTimes(scope.row.record_date)}}</template>
26
+
31 27
         </el-table-column>
28
+        <!--<el-table-column align="center" prop="name" label="患者类型">-->
29
+          <!--<template slot-scope="scope">{{}}</template>-->
30
+        <!--</el-table-column>-->
32 31
         <el-table-column align="center" prop="name" label="处方号">
33
-          <template slot-scope="scope">{{ scope.row.date }}</template>
32
+          <template slot-scope="scope">{{scope.row.prescription_number}}</template>
34 33
         </el-table-column>
35 34
         <el-table-column align="center" prop="name" label="开立医生">
36
-          <template slot-scope="scope">{{ scope.row.date }}</template>
35
+          <template slot-scope="scope">{{scope.row.doctor}}</template>
37 36
         </el-table-column>
38 37
         <el-table-column align="center" prop="name" label="诊断">
39
-          <template slot-scope="scope">{{ scope.row.date }}</template>
38
+          <template slot-scope="scope">{{ scope.row.diagnosis }}</template>
40 39
         </el-table-column>
41 40
         <el-table-column align="center" prop="name" label="状态">
42
-          <template slot-scope="scope">{{ scope.row.date }}</template>
41
+          <template slot-scope="scope">
42
+            <div v-if=" scope.row.prescription_status == 1">新建</div>
43
+            <div v-if=" scope.row.prescription_status == 2">待结算</div>
44
+            <div v-if=" scope.row.prescription_status == 3">已结算</div>
45
+            <div v-if=" scope.row.prescription_status == 4">已退费</div>
46
+
47
+          </template>
43 48
         </el-table-column>
44 49
         <el-table-column align="center" prop="name" label="操作" width="100">
45 50
           <template slot-scope="scope">
46
-            <el-button size="mini" type="primary" @click="handerDelete">详情</el-button>
51
+            <el-button size="mini" type="primary" @click="handerShowDetail(scope.row)">详情</el-button>
47 52
           </template>
48 53
         </el-table-column>
49 54
       </el-table>
@@ -56,6 +61,7 @@
56 61
         style="margin-top:20px;float: right"
57 62
         layout="total, sizes, prev, pager, next, jumper"
58 63
         :total="total"
64
+
59 65
       >
60 66
       </el-pagination>
61 67
       <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
@@ -67,6 +73,7 @@
67 73
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
68 74
   import inquiriesDetail from './components/inquiriesDetail'
69 75
   import { getHisPrescriptionList } from '@/api/his/his'
76
+  import { uParseTime } from '@/utils/tools'
70 77
 
71 78
   export default {
72 79
     components: {
@@ -99,14 +106,19 @@
99 106
       }
100 107
     },
101 108
     methods: {
102
-      handerDelete() {
103
-        this.$refs.inquiriesDetail.show()
109
+      getTimes(time) {
110
+        return uParseTime(time, "{y}-{m}-{d}");
111
+      },
112
+      handerShowDetail(row) {
113
+        console.log(row)
114
+        this.$refs.inquiriesDetail.show(row.id)
104 115
       }, getHisPrescriptionList() {
105 116
         getHisPrescriptionList().then(response => {
106 117
           if (response.data.state == 0) {
107 118
             this.$message.error(response.data.msg)
108 119
             return false
109 120
           } else {
121
+            this.tableData = response.data.data.order
110 122
 
111 123
           }
112 124
         })

+ 18 - 18
src/xt_pages/upload/fast/FastCountry.vue Просмотреть файл

@@ -1,28 +1,28 @@
1 1
 <template>
2 2
   <div class="patient-container">
3
-    <!-- <fast-patients-sidebar
3
+     <fast-patients-sidebar
4 4
       :id="patientID"
5 5
       v-on:patient="patientInfoClick()"
6 6
       v-on:inspection="inspectionClick()"
7
-    ></fast-patients-sidebar> -->
7
+    ></fast-patients-sidebar>
8 8
     <!-- <fast-upload-detail v-if="isShow == 1"  :id="patientID"  :is-edit='true' :class='panelClass'></fast-upload-detail> -->
9 9
     <el-container>
10
-      <div style="width:170px">
11
-        <el-form :inline="true" :model="listQuery">
12
-          <el-form-item label style="margin-bottom:0;">
13
-            <el-input v-model.trim="searchVal" placeholder="姓名/透析号" style="width:70%"></el-input>
14
-            <el-button type="primary" style="padding: 10px 6px;" @click="onSearch">搜索</el-button>
15
-          </el-form-item>
16
-        </el-form>
17
-        <div style="width:170px">
18
-          <div class="tableTitle">患者列表</div>
19
-          <el-table :data="tableData" border style="width: 100%;" height="500">
20
-            <el-table-column prop="date" label="日期" width="80"></el-table-column>
21
-            <el-table-column prop="name" label="姓名" width="90"></el-table-column>
22
-          </el-table>
23
-        </div>
24
-      </div>
25
-      
10
+      <!--<div style="width:170px">-->
11
+        <!--<el-form :inline="true" :model="listQuery">-->
12
+          <!--<el-form-item label style="margin-bottom:0;">-->
13
+            <!--<el-input v-model.trim="searchVal" placeholder="姓名/透析号" style="width:70%"></el-input>-->
14
+            <!--<el-button type="primary" style="padding: 10px 6px;" @click="onSearch">搜索</el-button>-->
15
+          <!--</el-form-item>-->
16
+        <!--</el-form>-->
17
+        <!--<div style="width:170px">-->
18
+          <!--<div class="tableTitle">患者列表</div>-->
19
+          <!--<el-table :data="tableData" border style="width: 100%;" height="500">-->
20
+            <!--<el-table-column prop="date" label="日期" width="80"></el-table-column>-->
21
+            <!--<el-table-column prop="name" label="姓名" width="90"></el-table-column>-->
22
+          <!--</el-table>-->
23
+        <!--</div>-->
24
+      <!--</div>-->
25
+
26 26
       <div style="margin-left:20px;flex:1;" >
27 27
         <div class="cell clearfix">
28 28
           <div class="time">

+ 4 - 4
src/xt_pages/upload/fast/FastPatientsSidebar.vue Просмотреть файл

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <!-- <div> -->
3 3
   <div class="patient-menu">
4
-    <!-- <el-autocomplete
4
+    <el-autocomplete
5 5
       style="margin:16px 5px"
6 6
       popper-class="my-autocomplete"
7 7
       v-model.trim="value"
@@ -38,10 +38,10 @@
38 38
       :default-expanded-keys="[defaultActive]"
39 39
       @node-click="handleNodeClick"
40 40
     >
41
-    </el-tree> -->
41
+    </el-tree>
42 42
     <!-- </div> -->
43 43
 
44
-    
44
+
45 45
   </div>
46 46
 </template>
47 47
 <script>
@@ -83,7 +83,7 @@ export default {
83 83
           ]
84 84
         }
85 85
       ],
86
-      
86
+
87 87
     };
88 88
   },
89 89
   methods: {

+ 2 - 2
src/xt_pages/upload/fast_upload.vue Просмотреть файл

@@ -6,9 +6,9 @@
6 6
     <div class="app-container">
7 7
       <div class="service-box">
8 8
         <el-tabs v-model="activeName">
9
-          <!-- <el-tab-pane label="国家质控平台" name="first">
9
+      <el-tab-pane label="国家质控平台" name="first">
10 10
            <fast-country></fast-country>
11
-          </el-tab-pane> -->
11
+          </el-tab-pane>
12 12
           <el-tab-pane label="省级质控平台" name="first">
13 13
             <fast-province></fast-province>
14 14
           </el-tab-pane>