Преглед изворни кода

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

csx пре 3 година
родитељ
комит
eac89409ab
26 измењених фајлова са 1839 додато и 846 уклоњено
  1. 12 0
      src/api/his/his.js
  2. 2 1
      src/lang/zh.js
  3. 5 0
      src/router/modules/outpatientRecord.js
  4. 252 230
      src/xt_pages/data/components/consumables.vue
  5. 166 144
      src/xt_pages/data/components/drugs.vue
  6. 101 80
      src/xt_pages/data/components/project.vue
  7. 1 1
      src/xt_pages/hospitalStation/components/deskPrescription.vue
  8. 40 10
      src/xt_pages/hospitalStation/doctorDesk.vue
  9. 8 1
      src/xt_pages/hospitalStation/index.vue
  10. 8 1
      src/xt_pages/hospitalStation/newStatementPrint.vue
  11. 8 1
      src/xt_pages/hospitalStation/newStatementPrintTwo.vue
  12. 309 34
      src/xt_pages/hospitalStation/outpatientChargesManagement.vue
  13. 188 0
      src/xt_pages/hospitalStation/pastInquiries.vue
  14. 21 7
      src/xt_pages/hospitalStation/statementTemplate/printOne.vue
  15. 16 2
      src/xt_pages/hospitalStation/summary.vue
  16. 7 1
      src/xt_pages/hospitalStation/treatTemplate/printOne.vue
  17. 41 34
      src/xt_pages/outpatientCharges/newStatementPrintTwo.vue
  18. 268 26
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  19. 57 53
      src/xt_pages/outpatientCharges/settlementPrint.vue
  20. 8 1
      src/xt_pages/outpatientCharges/summary.vue
  21. 102 95
      src/xt_pages/outpatientCharges/treatTemplate/printOne.vue
  22. 3 3
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  23. 34 2
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  24. 71 50
      src/xt_pages/outpatientRecord/outpatientRecord.vue
  25. 32 4
      src/xt_pages/outpatientRegistration/index.vue
  26. 79 65
      src/xt_pages/outpatientRegistration/registrationHistory.vue

+ 12 - 0
src/api/his/his.js Прегледај датотеку

410
 
410
 
411
 
411
 
412
 
412
 
413
+export function GetHisHospitalPrescriptionList (params) {
414
+  return request({
415
+    url: '/api/hospotalcharge/info',
416
+    method: 'get',
417
+    params:params,
418
+  })
419
+}
420
+
421
+
422
+
423
+
424
+
413
 
425
 
414
 
426
 
415
 
427
 

+ 2 - 1
src/lang/zh.js Прегледај датотеку

244
     objectTableDisinfect:'物表消毒',
244
     objectTableDisinfect:'物表消毒',
245
 
245
 
246
 
246
 
247
-    hospitalStation:"住院工作站"
247
+    hospitalStation:"住院工作站",
248
+    pastInquiries:"既往查询",
248
 
249
 
249
   },
250
   },
250
   navbar: {
251
   navbar: {

+ 5 - 0
src/router/modules/outpatientRecord.js Прегледај датотеку

29
       component: () => import('@/xt_pages/hospitalStation/doctorDesk'),
29
       component: () => import('@/xt_pages/hospitalStation/doctorDesk'),
30
       name: 'outpatientDoctorStationDoctorDesk',
30
       name: 'outpatientDoctorStationDoctorDesk',
31
       meta: { title: 'outpatientDoctorStationDoctorDesk', noCache: true }
31
       meta: { title: 'outpatientDoctorStationDoctorDesk', noCache: true }
32
+    }, {
33
+      path: '/outpatientRecord/pastInquiries',
34
+      component: () => import('@/xt_pages/hospitalStation/pastInquiries'),
35
+      name: 'pastInquiries',
36
+      meta: { title: 'pastInquiries', noCache: true }
32
     },
37
     },
33
     {
38
     {
34
       path: '/outpatientRecord/outpatientChargesManagement',
39
       path: '/outpatientRecord/outpatientChargesManagement',

+ 252 - 230
src/xt_pages/data/components/consumables.vue Прегледај датотеку

4
       <div class="cell clearfix" style="margin-bottom:0;">
4
       <div class="cell clearfix" style="margin-bottom:0;">
5
         <el-input style="width: 180px;margin-right:10px;" @keyup.enter.native='searchAction' v-model="keywords"
5
         <el-input style="width: 180px;margin-right:10px;" @keyup.enter.native='searchAction' v-model="keywords"
6
                   class="filter-item"/>
6
                   class="filter-item"/>
7
-        <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" 
7
+        <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search"
8
                    @click="searchAction">搜索
8
                    @click="searchAction">搜索
9
         </el-button>
9
         </el-button>
10
         <label class="title"><span class="name">是否启用</span> : </label>
10
         <label class="title"><span class="name">是否启用</span> : </label>
60
       <div>
60
       <div>
61
         <el-button type="primary" @click="openForm()">新增</el-button>
61
         <el-button type="primary" @click="openForm()">新增</el-button>
62
       </div>
62
       </div>
63
-     
63
+
64
     </div>
64
     </div>
65
-    
65
+
66
      <div style="display:flex; align-items:center;margin-bottom:10px;">
66
      <div style="display:flex; align-items:center;margin-bottom:10px;">
67
         <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
67
         <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
68
         <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
68
         <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
330
               production_type:""
330
               production_type:""
331
             },
331
             },
332
             isVisibility: false,
332
             isVisibility: false,
333
-       
333
+
334
           }
334
           }
335
         },
335
         },
336
         selectDrug:[],
336
         selectDrug:[],
358
     },
358
     },
359
     methods: {
359
     methods: {
360
       putOnUnRecord(id){
360
       putOnUnRecord(id){
361
-        var that = this
361
+        var that = this;
362
         let params = {
362
         let params = {
363
           ids:id.toString(),
363
           ids:id.toString(),
364
           record_type: 2,
364
           record_type: 2,
365
           admin_user_id:this.$store.getters.xt_user.user.id
365
           admin_user_id:this.$store.getters.xt_user.user.id
366
-        }
366
+        };
367
         axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
367
         axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
368
           if (response.data.state == 0) {
368
           if (response.data.state == 0) {
369
-            that.$message.error(response.data.data.msg)
369
+            that.$message.error(response.data.data.msg);
370
             return false
370
             return false
371
           } else {
371
           } else {
372
             if(response.data.data.failed_code == -10){
372
             if(response.data.data.failed_code == -10){
373
-              that.$message.error(response.data.data.msg)
373
+              // that.$message.error(response.data.data.msg)
374
+              that.$confirm(response.data.data.msg, '医保错误信息', {
375
+                confirmButtonText: '确 定',
376
+                type: 'warning'
377
+              }).then(() => {
378
+
379
+              }).catch(() => {
380
+              })
374
             }else{
381
             }else{
375
               // for (let i = 0; i < that.tableData.length; i++) {
382
               // for (let i = 0; i < that.tableData.length; i++) {
376
               //   if (that.tableData[i].id == that.currentObject.id) {
383
               //   if (that.tableData[i].id == that.currentObject.id) {
384
         })
391
         })
385
       },
392
       },
386
       putOnRecord(id){
393
       putOnRecord(id){
387
-        var that = this
394
+        var that = this;
388
 
395
 
389
         let params = {
396
         let params = {
390
           ids:id.toString(),
397
           ids:id.toString(),
391
           record_type: 2,
398
           record_type: 2,
392
           admin_user_id:this.$store.getters.xt_user.user.id
399
           admin_user_id:this.$store.getters.xt_user.user.id
393
-        }
400
+        };
394
 
401
 
395
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
402
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
396
           if (response.data.state == 0) {
403
           if (response.data.state == 0) {
397
-            that.$message.error(response.data.data.msg)
404
+            that.$message.error(response.data.data.msg);
398
             return false
405
             return false
399
           } else {
406
           } else {
400
             if(response.data.data.failed_code == -10){
407
             if(response.data.data.failed_code == -10){
401
-              that.$message.error(response.data.data.msg)
408
+              // that.$message.error(response.data.data.msg)
409
+              that.$confirm(response.data.data.msg, '医保错误信息', {
410
+                confirmButtonText: '确 定',
411
+                type: 'warning'
412
+              }).then(() => {
413
+
414
+              }).catch(() => {
415
+              })
402
             }else{
416
             }else{
403
 
417
 
404
 
418
 
419
+
405
             }
420
             }
406
 
421
 
407
 
422
 
411
         })
426
         })
412
       },
427
       },
413
       GDYBBatchPutOnRecord(){
428
       GDYBBatchPutOnRecord(){
414
-        var that = this
429
+        var that = this;
415
         var ids = [];
430
         var ids = [];
416
         var idMap = {};
431
         var idMap = {};
417
         for (const index in this.selectDrug) {
432
         for (const index in this.selectDrug) {
422
           ids:ids.join(','),
437
           ids:ids.join(','),
423
           record_type: 2,
438
           record_type: 2,
424
           admin_user_id:this.$store.getters.xt_user.user.id
439
           admin_user_id:this.$store.getters.xt_user.user.id
425
-        }
440
+        };
426
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
441
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
427
           if (response.data.state == 0) {
442
           if (response.data.state == 0) {
428
-            that.$message.error(response.data.data.msg)
443
+            that.$message.error(response.data.data.msg);
429
             return false
444
             return false
430
           } else {
445
           } else {
431
             if(response.data.data.failed_code == -10){
446
             if(response.data.data.failed_code == -10){
432
-              that.$message.error(response.data.data.msg)
447
+              // that.$message.error(response.data.data.msg)
448
+              that.$confirm(response.data.data.msg, '医保错误信息', {
449
+                confirmButtonText: '确 定',
450
+                type: 'warning'
451
+              }).then(() => {
452
+
453
+              }).catch(() => {
454
+              })
433
             }else{
455
             }else{
434
 
456
 
435
 
457
 
463
       },
485
       },
464
       getGoodKind(id){
486
       getGoodKind(id){
465
         // var data = this.getDictionaryDataConfig('system','good_kind')
487
         // var data = this.getDictionaryDataConfig('system','good_kind')
466
-        var data = this.goodKindList
467
-       
468
-        var name = ""
488
+        var data = this.goodKindList;
489
+
490
+        var name = "";
469
         for(let i = 0; i < data.length; i++){
491
         for(let i = 0; i < data.length; i++){
470
           if(id == data[i].value){
492
           if(id == data[i].value){
471
             name = data[i].name
493
             name = data[i].name
482
         this.getList()
504
         this.getList()
483
       },
505
       },
484
       handleGoodInfoEdit: function(index, row) {
506
       handleGoodInfoEdit: function(index, row) {
485
-        this.getAllDealer()
486
-        this.getAllManufacturer()
487
-        this.getAllGoodType()
488
-        this.goodInfo.editGoodId = row.id
489
-        this.goodInfo.editGoodIndex = index
507
+        this.getAllDealer();
508
+        this.getAllManufacturer();
509
+        this.getAllGoodType();
510
+        this.goodInfo.editGoodId = row.id;
511
+        this.goodInfo.editGoodIndex = index;
490
 
512
 
491
         let params = {
513
         let params = {
492
           id: row.id
514
           id: row.id
493
-        }
515
+        };
494
         GetGoodInfo(params).then(response => {
516
         GetGoodInfo(params).then(response => {
495
           if (response.data.state == 0) {
517
           if (response.data.state == 0) {
496
-            this.$message.error(response.data.msg)
518
+            this.$message.error(response.data.msg);
497
             return false
519
             return false
498
           } else {
520
           } else {
499
 
521
 
519
             }
541
             }
520
 
542
 
521
             this.goodInfo.goodInfoDialog.formValue.specification_name =
543
             this.goodInfo.goodInfoDialog.formValue.specification_name =
522
-              response.data.data.goodInfo.specification_name
544
+              response.data.data.goodInfo.specification_name;
523
             this.goodInfo.goodInfoDialog.formValue.buy_price =
545
             this.goodInfo.goodInfoDialog.formValue.buy_price =
524
-              response.data.data.goodInfo.buy_price
546
+              response.data.data.goodInfo.buy_price;
525
             this.goodInfo.goodInfoDialog.formValue.sell_price =
547
             this.goodInfo.goodInfoDialog.formValue.sell_price =
526
-              response.data.data.goodInfo.sell_price
548
+              response.data.data.goodInfo.sell_price;
527
             this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count =
549
             this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count =
528
-              response.data.data.goodInfo.expiry_date_warn_day_count
550
+              response.data.data.goodInfo.expiry_date_warn_day_count;
529
             this.goodInfo.goodInfoDialog.formValue.stock_warn_count =
551
             this.goodInfo.goodInfoDialog.formValue.stock_warn_count =
530
-              response.data.data.goodInfo.stock_warn_count
531
-            this.goodInfo.goodInfoDialog.formValue.is_reuse = response.data.data.goodInfo.is_reuse.toString()
552
+              response.data.data.goodInfo.stock_warn_count;
553
+            this.goodInfo.goodInfoDialog.formValue.is_reuse = response.data.data.goodInfo.is_reuse.toString();
532
             this.goodInfo.goodInfoDialog.formValue.remark =
554
             this.goodInfo.goodInfoDialog.formValue.remark =
533
-              response.data.data.goodInfo.remark
534
-            this.goodInfo.goodInfoDialog.isCreated = 2
535
-            this.goodInfo.good_code = response.data.data.goodInfo.good_code
555
+              response.data.data.goodInfo.remark;
556
+            this.goodInfo.goodInfoDialog.isCreated = 2;
557
+            this.goodInfo.good_code = response.data.data.goodInfo.good_code;
536
             this.goodInfo.goodInfoDialog.formValue.good_type_id =
558
             this.goodInfo.goodInfoDialog.formValue.good_type_id =
537
-              response.data.data.goodInfo.good_type_id
559
+              response.data.data.goodInfo.good_type_id;
538
 
560
 
539
 
561
 
540
             this.goodInfo.goodInfoDialog.formValue.good_name =
562
             this.goodInfo.goodInfoDialog.formValue.good_name =
541
-              response.data.data.goodInfo.good_name
563
+              response.data.data.goodInfo.good_name;
542
 
564
 
543
 
565
 
544
             this.goodInfo.goodInfoDialog.formValue.pinyin =
566
             this.goodInfo.goodInfoDialog.formValue.pinyin =
545
-              response.data.data.goodInfo.pinyin
567
+              response.data.data.goodInfo.pinyin;
546
 
568
 
547
             this.goodInfo.goodInfoDialog.formValue.wubi =
569
             this.goodInfo.goodInfoDialog.formValue.wubi =
548
-              response.data.data.goodInfo.wubi
570
+              response.data.data.goodInfo.wubi;
549
 
571
 
550
 
572
 
551
 
573
 
565
 
587
 
566
 
588
 
567
             this.goodInfo.goodInfoDialog.formValue.retail_price =
589
             this.goodInfo.goodInfoDialog.formValue.retail_price =
568
-              response.data.data.goodInfo.retail_price
590
+              response.data.data.goodInfo.retail_price;
569
 
591
 
570
 
592
 
571
             this.goodInfo.goodInfoDialog.formValue.medical_insurance_number =
593
             this.goodInfo.goodInfoDialog.formValue.medical_insurance_number =
572
-              response.data.data.goodInfo.medical_insurance_number
594
+              response.data.data.goodInfo.medical_insurance_number;
573
 
595
 
574
 
596
 
575
             if (response.data.data.goodInfo.is_special_diseases <= 0) {
597
             if (response.data.data.goodInfo.is_special_diseases <= 0) {
667
                 response.data.data.goodInfo.is_doctor_use.toString()
689
                 response.data.data.goodInfo.is_doctor_use.toString()
668
             }
690
             }
669
 
691
 
670
-            this.goodInfo.goodInfoDialog.formValue.agent =response.data.data.goodInfo.agent
692
+            this.goodInfo.goodInfoDialog.formValue.agent =response.data.data.goodInfo.agent;
671
 
693
 
672
-            this.goodInfo.goodInfoDialog.formValue.good_number = response.data.data.goodInfo.good_number
694
+            this.goodInfo.goodInfoDialog.formValue.good_number = response.data.data.goodInfo.good_number;
673
 
695
 
674
-            this.goodInfo.goodInfoDialog.formValue.social_security_directory_code = response.data.data.goodInfo.social_security_directory_code
696
+            this.goodInfo.goodInfoDialog.formValue.social_security_directory_code = response.data.data.goodInfo.social_security_directory_code;
675
 
697
 
676
             if(response.data.data.production_type<=0){
698
             if(response.data.data.production_type<=0){
677
                this.goodInfo.goodInfoDialog.production_type = ''
699
                this.goodInfo.goodInfoDialog.production_type = ''
698
           .then(() => {
720
           .then(() => {
699
             let params = {
721
             let params = {
700
               id: row.id
722
               id: row.id
701
-            }
723
+            };
702
 
724
 
703
             deleteGoodInfo(params).then(response => {
725
             deleteGoodInfo(params).then(response => {
704
               if (response.data.state == 0) {
726
               if (response.data.state == 0) {
705
-                this.$message.error(response.data.msg)
727
+                this.$message.error(response.data.msg);
706
                 return false
728
                 return false
707
               } else {
729
               } else {
708
-                this.goodInfo.goodInfoData.splice(index, 1)
730
+                this.goodInfo.goodInfoData.splice(index, 1);
709
                 this.$message.success('删除成功')
731
                 this.$message.success('删除成功')
710
               }
732
               }
711
             })
733
             })
714
           })
736
           })
715
       },
737
       },
716
       getList() {
738
       getList() {
717
-        this.goodInfo.loading = true
739
+        this.goodInfo.loading = true;
718
         let params = {
740
         let params = {
719
           page: this.page,
741
           page: this.page,
720
           limit: this.limit,
742
           limit: this.limit,
724
           is_charge: this.is_charge,
746
           is_charge: this.is_charge,
725
           is_mark:this.is_record,
747
           is_mark:this.is_record,
726
           manufacturer:this.manufacturer,
748
           manufacturer:this.manufacturer,
727
-        }
728
-      
749
+        };
750
+
729
         getGoodInfoList(params).then(response => {
751
         getGoodInfoList(params).then(response => {
730
           if (response.data.state == 0) {
752
           if (response.data.state == 0) {
731
-            this.goodInfo.loading = false
732
-            this.$message.error(response.data.msg)
753
+            this.goodInfo.loading = false;
754
+            this.$message.error(response.data.msg);
733
             return false
755
             return false
734
           } else {
756
           } else {
735
-            this.goodInfo.loading = false
736
-            this.total = response.data.data.total
737
-            this.goodInfo.goodInfoData = []
757
+            this.goodInfo.loading = false;
758
+            this.total = response.data.data.total;
759
+            this.goodInfo.goodInfoData = [];
738
             for (let i = 0; i < response.data.data.list.length; i++) {
760
             for (let i = 0; i < response.data.data.list.length; i++) {
739
               this.goodInfo.goodInfoData.push(response.data.data.list[i])
761
               this.goodInfo.goodInfoData.push(response.data.data.list[i])
740
             }
762
             }
746
         row.index = rowIndex
768
         row.index = rowIndex
747
       },
769
       },
748
       onRowClick(row, event, column) {
770
       onRowClick(row, event, column) {
749
-        this.goodInfo.goodInfoData = []
750
-        this.goodType.tableCurrentIndex = row.index
751
-        this.goodInfo.goodInfoDialog.formValue.good_id = row.id
771
+        this.goodInfo.goodInfoData = [];
772
+        this.goodType.tableCurrentIndex = row.index;
773
+        this.goodInfo.goodInfoDialog.formValue.good_id = row.id;
752
         let params = {
774
         let params = {
753
           id: row.id
775
           id: row.id
754
-        }
755
-        this.goodInfo.loading = true
776
+        };
777
+        this.goodInfo.loading = true;
756
         GetGoodInfoByGoodId(params).then(response => {
778
         GetGoodInfoByGoodId(params).then(response => {
757
           if (response.data.state == 0) {
779
           if (response.data.state == 0) {
758
-            this.goodInfo.loading = false
759
-            this.$message.error(response.data.msg)
780
+            this.goodInfo.loading = false;
781
+            this.$message.error(response.data.msg);
760
             return false
782
             return false
761
           } else {
783
           } else {
762
-            this.goodInfo.loading = false
784
+            this.goodInfo.loading = false;
763
             this.getList()
785
             this.getList()
764
 
786
 
765
             // for (let i = 0; i < response.data.data.list.length; i++) {
787
             // for (let i = 0; i < response.data.data.list.length; i++) {
769
         })
791
         })
770
       },
792
       },
771
       goodInfoDialogComfirm: function(val) {
793
       goodInfoDialogComfirm: function(val) {
772
-       
794
+
773
         if (val.isCreated == 2) {
795
         if (val.isCreated == 2) {
774
           //修改
796
           //修改
775
-          val['id'] = this.goodInfo.editGoodId
776
-          val['good_code'] = this.goodInfo.good_code
777
-        
778
-          
797
+          val['id'] = this.goodInfo.editGoodId;
798
+          val['good_code'] = this.goodInfo.good_code;
799
+
800
+
801
+
779
 
802
 
780
 
803
 
781
-          
782
           modifyGoodInfo(val).then(response => {
804
           modifyGoodInfo(val).then(response => {
783
             if (response.data.state == 0) {
805
             if (response.data.state == 0) {
784
               // this.$message.error(response.data.msg)
806
               // this.$message.error(response.data.msg)
785
-              this.$message.error("同一耗材类型同一规格名称不能重复录入!")
807
+              this.$message.error("同一耗材类型同一规格名称不能重复录入!");
786
               return false
808
               return false
787
             } else {
809
             } else {
788
-              this.$refs.addConsumable.hide()
789
-              this.getList()
810
+              this.$refs.addConsumable.hide();
811
+              this.getList();
790
               // this.goodInfo.goodInfoData[
812
               // this.goodInfo.goodInfoData[
791
               //   this.goodInfo.editGoodIndex
813
               //   this.goodInfo.editGoodIndex
792
               //   ].specification_name =
814
               //   ].specification_name =
810
             }
832
             }
811
           })
833
           })
812
         } else if (val.isCreated == 1) {
834
         } else if (val.isCreated == 1) {
813
-         
814
-          
835
+
836
+
815
           if(val.is_reuse == ""){
837
           if(val.is_reuse == ""){
816
              val.is_reuse = 0
838
              val.is_reuse = 0
817
           }else{
839
           }else{
818
             val.is_reuse = parseInt(val.is_reuse)
840
             val.is_reuse = parseInt(val.is_reuse)
819
           }
841
           }
820
-          
842
+
821
           if(val.stock_warn_count == ""){
843
           if(val.stock_warn_count == ""){
822
              val.stock_warn_count = 0
844
              val.stock_warn_count = 0
823
           }else{
845
           }else{
824
             val.stock_warn_count = parseInt(val.stock_warn_count)
846
             val.stock_warn_count = parseInt(val.stock_warn_count)
825
           }
847
           }
826
-         
848
+
827
           //新增
849
           //新增
828
           createGoodInfo(val).then(response => {
850
           createGoodInfo(val).then(response => {
829
             if (response.data.state == 0) {
851
             if (response.data.state == 0) {
831
               // return false
853
               // return false
832
               this.$message.error("同一耗材类型同一规格名称不能重复录入!")
854
               this.$message.error("同一耗材类型同一规格名称不能重复录入!")
833
             } else {
855
             } else {
834
-              this.$refs.addConsumable.hide()
835
-              this.getList()
856
+              this.$refs.addConsumable.hide();
857
+              this.getList();
836
               // this.goodInfo.goodInfoData.unshift(response.data.data.goodInfo)
858
               // this.goodInfo.goodInfoData.unshift(response.data.data.goodInfo)
837
               this.$message.success('新增成功')
859
               this.$message.success('新增成功')
838
             }
860
             }
843
         this.$refs.addConsumable.hide()
865
         this.$refs.addConsumable.hide()
844
       },
866
       },
845
       showInfoDialog: function() {
867
       showInfoDialog: function() {
846
-        this.getAllDealer()
847
-        this.getAllManufacturer()
848
-        this.goodInfo.goodInfoDialog.formValue.goodType = []
868
+        this.getAllDealer();
869
+        this.getAllManufacturer();
870
+        this.goodInfo.goodInfoDialog.formValue.goodType = [];
849
         GetAllGoodType().then(response => {
871
         GetAllGoodType().then(response => {
850
           if (response.data.state == 0) {
872
           if (response.data.state == 0) {
851
-            this.$message.error(response.data.msg)
873
+            this.$message.error(response.data.msg);
852
             return false
874
             return false
853
           } else {
875
           } else {
854
             for (let i = 0; i < response.data.data.goodType.length; i++) {
876
             for (let i = 0; i < response.data.data.goodType.length; i++) {
860
               )
882
               )
861
             }
883
             }
862
             if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
884
             if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
863
-              this.$message.error('请先新增商品类型')
864
-              return
885
+              this.$message.error('请先新增商品类型');
886
+
865
             } else {
887
             } else {
866
-              this.goodInfo.goodInfoDialog.isVisibility = true
888
+              this.goodInfo.goodInfoDialog.isVisibility = true;
867
               this.goodInfo.goodInfoDialog.isCreated = 1
889
               this.goodInfo.goodInfoDialog.isCreated = 1
868
             }
890
             }
869
           }
891
           }
870
-        })
892
+        });
871
         this.$refs.addConsumable.show()
893
         this.$refs.addConsumable.show()
872
 
894
 
873
       },
895
       },
874
       getAllDealer: function() {
896
       getAllDealer: function() {
875
-        this.goodInfo.goodInfoDialog.formValue.dealers = []
897
+        this.goodInfo.goodInfoDialog.formValue.dealers = [];
876
         GetAllDeals().then(response => {
898
         GetAllDeals().then(response => {
877
           if (response.data.state == 0) {
899
           if (response.data.state == 0) {
878
-            this.$message.error(response.data.msg)
900
+            this.$message.error(response.data.msg);
879
             return false
901
             return false
880
           } else {
902
           } else {
881
             for (let i = 0; i < response.data.data.dealer.length; i++) {
903
             for (let i = 0; i < response.data.data.dealer.length; i++) {
882
               this.goodInfo.goodInfoDialog.formValue.dealers.push(
904
               this.goodInfo.goodInfoDialog.formValue.dealers.push(
883
                 response.data.data.dealer[i]
905
                 response.data.data.dealer[i]
884
-              )
906
+              );
885
               this.dealers.push(response.data.data.dealer[i])
907
               this.dealers.push(response.data.data.dealer[i])
886
             }
908
             }
887
           }
909
           }
888
         })
910
         })
889
       },
911
       },
890
       getAllManufacturer: function() {
912
       getAllManufacturer: function() {
891
-        this.goodInfo.goodInfoDialog.formValue.manufacturers = []
913
+        this.goodInfo.goodInfoDialog.formValue.manufacturers = [];
892
         GetAllManufacturer().then(response => {
914
         GetAllManufacturer().then(response => {
893
           if (response.data.state == 0) {
915
           if (response.data.state == 0) {
894
-            this.$message.error(response.data.msg)
916
+            this.$message.error(response.data.msg);
895
             return false
917
             return false
896
           } else {
918
           } else {
897
-            var obj = {id:0,manufacturer_name:"全部"}
898
-            this.manufacturers.push(obj)
919
+            var obj = {id:0,manufacturer_name:"全部"};
920
+            this.manufacturers.push(obj);
899
             for (let i = 0; i < response.data.data.manufacturer.length; i++) {
921
             for (let i = 0; i < response.data.data.manufacturer.length; i++) {
900
               this.goodInfo.goodInfoDialog.formValue.manufacturers.push(
922
               this.goodInfo.goodInfoDialog.formValue.manufacturers.push(
901
                 response.data.data.manufacturer[i]
923
                 response.data.data.manufacturer[i]
902
-              )
924
+              );
903
               this.manufacturers.push(response.data.data.manufacturer[i])
925
               this.manufacturers.push(response.data.data.manufacturer[i])
904
             }
926
             }
905
-           
927
+
906
           }
928
           }
907
         })
929
         })
908
       },
930
       },
909
       getAllGoodType: function() {
931
       getAllGoodType: function() {
910
-        this.goodInfo.goodInfoDialog.formValue.goodType = []
932
+        this.goodInfo.goodInfoDialog.formValue.goodType = [];
911
         GetAllGoodType().then(response => {
933
         GetAllGoodType().then(response => {
912
           if (response.data.state == 0) {
934
           if (response.data.state == 0) {
913
-            this.$message.error(response.data.msg)
935
+            this.$message.error(response.data.msg);
914
             return false
936
             return false
915
           } else {
937
           } else {
916
             for (let i = 0; i < response.data.data.goodType.length; i++) {
938
             for (let i = 0; i < response.data.data.goodType.length; i++) {
917
               if (response.data.data.goodType[i].type == 1) {
939
               if (response.data.data.goodType[i].type == 1) {
918
                 response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
940
                 response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
919
               }
941
               }
920
-              this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i])
921
-              this.goodType.push(response.data.data.goodType[i]) 
942
+              this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i]);
943
+              this.goodType.push(response.data.data.goodType[i])
922
             }
944
             }
923
           }
945
           }
924
         })
946
         })
925
       },
947
       },
926
       handleSizeChange(val) {
948
       handleSizeChange(val) {
927
-        this.limit = val
949
+        this.limit = val;
928
         this.getList()
950
         this.getList()
929
       },
951
       },
930
       handleCurrentChange(val) {
952
       handleCurrentChange(val) {
931
-        this.page = val
953
+        this.page = val;
932
         this.getList()
954
         this.getList()
933
       },
955
       },
934
       searchAction() {
956
       searchAction() {
935
-        this.is_use = ""
936
-        this.is_charge = ""
937
-        this.good_kind = ""
957
+        this.is_use = "";
958
+        this.is_charge = "";
959
+        this.good_kind = "";
938
         this.getList()
960
         this.getList()
939
       },clickSelfPayment(id){
961
       },clickSelfPayment(id){
940
       this.$refs.selfPayment.show(id,2)
962
       this.$refs.selfPayment.show(id,2)
941
       },
963
       },
942
       openForm() {
964
       openForm() {
943
 
965
 
944
-        this.getAllDealer()
945
-        this.getAllManufacturer()
946
-        this.goodInfo.goodInfoDialog.formValue.goodType = []
966
+        this.getAllDealer();
967
+        this.getAllManufacturer();
968
+        this.goodInfo.goodInfoDialog.formValue.goodType = [];
947
         GetAllGoodType().then(response => {
969
         GetAllGoodType().then(response => {
948
           if (response.data.state == 0) {
970
           if (response.data.state == 0) {
949
-            this.$message.error(response.data.msg)
971
+            this.$message.error(response.data.msg);
950
             return false
972
             return false
951
           } else {
973
           } else {
952
             for (let i = 0; i < response.data.data.goodType.length; i++) {
974
             for (let i = 0; i < response.data.data.goodType.length; i++) {
958
               )
980
               )
959
             }
981
             }
960
             if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
982
             if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
961
-              this.$message.error('请先新增商品类型')
962
-              return
983
+              this.$message.error('请先新增商品类型');
984
+
963
             } else {
985
             } else {
964
-              this.goodInfo.goodInfoDialog.isVisibility = true
986
+              this.goodInfo.goodInfoDialog.isVisibility = true;
965
               this.goodInfo.goodInfoDialog.isCreated = 1
987
               this.goodInfo.goodInfoDialog.isCreated = 1
966
             }
988
             }
967
           }
989
           }
968
-        })
969
-        this.goodInfo.goodInfoDialog.formValue.good_id = ''
970
-        this.goodInfo.goodInfoDialog.formValue.specification_name = ''
971
-        this.goodInfo.goodInfoDialog.formValue.buy_price = ''
972
-        this.goodInfo.goodInfoDialog.formValue.sell_price = ''
973
-        this.goodInfo.goodInfoDialog.formValue.remark = ''
974
-        this.goodInfo.goodInfoDialog.formValue.manufacturer = ''
975
-        this.goodInfo.goodInfoDialog.formValue.good_type_id = ''
976
-        this.goodInfo.goodInfoDialog.formValue.dealer = ''
977
-        this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count = ''
978
-        this.goodInfo.goodInfoDialog.formValue.stock_warn_count = ''
979
-        this.goodInfo.goodInfoDialog.formValue.is_reuse = '2'
980
-        this.goodInfo.goodInfoDialog.formValue.good_name = ''
981
-        this.goodInfo.goodInfoDialog.formValue.pinyin = ''
982
-        this.goodInfo.goodInfoDialog.formValue.wubi = ''
983
-        this.goodInfo.goodInfoDialog.formValue.good_kind = ''
984
-        this.goodInfo.goodInfoDialog.formValue.medical_insurance_level = ''
985
-        this.goodInfo.goodInfoDialog.formValue.retail_price = ''
986
-        this.goodInfo.goodInfoDialog.formValue.medical_insurance_number = ''
987
-        this.goodInfo.goodInfoDialog.formValue.is_special_diseases = ''
988
-        this.goodInfo.goodInfoDialog.formValue.is_record = ''
989
-        this.goodInfo.goodInfoDialog.formValue.statistics_category = ''
990
-        this.goodInfo.goodInfoDialog.formValue.good_status = ''
991
-        this.goodInfo.goodInfoDialog.formValue.default_count = ''
992
-        this.goodInfo.goodInfoDialog.formValue.sign = ''
993
-        this.goodInfo.goodInfoDialog.formValue.is_default = ''
994
-        this.goodInfo.goodInfoDialog.formValue.is_charge_use = ''
995
-        this.goodInfo.goodInfoDialog.formValue.is_charge_predict = ''
996
-        this.goodInfo.goodInfoDialog.formValue.is_statistics_work = ''
997
-        this.goodInfo.goodInfoDialog.formValue.sort = ''
998
-        this.goodInfo.goodInfoDialog.formValue.is_doctor_use = ''
999
-        this.goodInfo.goodInfoDialog.formValue.agent = ''
1000
-        this.goodInfo.goodInfoDialog.formValue.good_number = ''
990
+        });
991
+        this.goodInfo.goodInfoDialog.formValue.good_id = '';
992
+        this.goodInfo.goodInfoDialog.formValue.specification_name = '';
993
+        this.goodInfo.goodInfoDialog.formValue.buy_price = '';
994
+        this.goodInfo.goodInfoDialog.formValue.sell_price = '';
995
+        this.goodInfo.goodInfoDialog.formValue.remark = '';
996
+        this.goodInfo.goodInfoDialog.formValue.manufacturer = '';
997
+        this.goodInfo.goodInfoDialog.formValue.good_type_id = '';
998
+        this.goodInfo.goodInfoDialog.formValue.dealer = '';
999
+        this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count = '';
1000
+        this.goodInfo.goodInfoDialog.formValue.stock_warn_count = '';
1001
+        this.goodInfo.goodInfoDialog.formValue.is_reuse = '2';
1002
+        this.goodInfo.goodInfoDialog.formValue.good_name = '';
1003
+        this.goodInfo.goodInfoDialog.formValue.pinyin = '';
1004
+        this.goodInfo.goodInfoDialog.formValue.wubi = '';
1005
+        this.goodInfo.goodInfoDialog.formValue.good_kind = '';
1006
+        this.goodInfo.goodInfoDialog.formValue.medical_insurance_level = '';
1007
+        this.goodInfo.goodInfoDialog.formValue.retail_price = '';
1008
+        this.goodInfo.goodInfoDialog.formValue.medical_insurance_number = '';
1009
+        this.goodInfo.goodInfoDialog.formValue.is_special_diseases = '';
1010
+        this.goodInfo.goodInfoDialog.formValue.is_record = '';
1011
+        this.goodInfo.goodInfoDialog.formValue.statistics_category = '';
1012
+        this.goodInfo.goodInfoDialog.formValue.good_status = '';
1013
+        this.goodInfo.goodInfoDialog.formValue.default_count = '';
1014
+        this.goodInfo.goodInfoDialog.formValue.sign = '';
1015
+        this.goodInfo.goodInfoDialog.formValue.is_default = '';
1016
+        this.goodInfo.goodInfoDialog.formValue.is_charge_use = '';
1017
+        this.goodInfo.goodInfoDialog.formValue.is_charge_predict = '';
1018
+        this.goodInfo.goodInfoDialog.formValue.is_statistics_work = '';
1019
+        this.goodInfo.goodInfoDialog.formValue.sort = '';
1020
+        this.goodInfo.goodInfoDialog.formValue.is_doctor_use = '';
1021
+        this.goodInfo.goodInfoDialog.formValue.agent = '';
1022
+        this.goodInfo.goodInfoDialog.formValue.good_number = '';
1001
 
1023
 
1002
         this.$refs.addConsumable.show(0)
1024
         this.$refs.addConsumable.show(0)
1003
       },
1025
       },
1038
               ids.push(this.selectDrug[index].id);
1060
               ids.push(this.selectDrug[index].id);
1039
               idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
1061
               idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
1040
             }
1062
             }
1041
-          
1042
-            var idss = ids.join(',')
1063
+
1064
+            var idss = ids.join(',');
1043
             let params = {
1065
             let params = {
1044
               ids:idss,
1066
               ids:idss,
1045
               admin_user_id:this.$store.getters.xt_user.user.id
1067
               admin_user_id:this.$store.getters.xt_user.user.id
1046
-            }
1047
-          
1068
+            };
1048
 
1069
 
1049
-            var that = this
1070
+
1071
+            var that = this;
1050
             axios.get('http://127.0.0.1:9532/sz/api/goods/get',{ params: params }).then(function(response) {
1072
             axios.get('http://127.0.0.1:9532/sz/api/goods/get',{ params: params }).then(function(response) {
1051
             if (response.data.state == 0) {
1073
             if (response.data.state == 0) {
1052
-                  that.$message.error(response.data.data.msg)
1074
+                  that.$message.error(response.data.data.msg);
1053
                   return false
1075
                   return false
1054
                 } else {
1076
                 } else {
1055
                  if(response.data.data.msg == ""){
1077
                  if(response.data.data.msg == ""){
1056
-                  that.$message.success("备案成功!")
1078
+                  that.$message.success("备案成功!");
1057
                   that.getList()
1079
                   that.getList()
1058
                }
1080
                }
1059
                if(response.data.data.msg!=""){
1081
                if(response.data.data.msg!=""){
1060
-                  that.$message.error(response.data.data.msg)
1082
+                  that.$message.error(response.data.data.msg);
1061
                   that.getList()
1083
                   that.getList()
1062
                 }
1084
                 }
1063
                 }
1085
                 }
1067
      },
1089
      },
1068
       toReturn(id,isMark){
1090
       toReturn(id,isMark){
1069
 
1091
 
1070
-         var that = this
1092
+         var that = this;
1071
          let params = {
1093
          let params = {
1072
              'id':id,
1094
              'id':id,
1073
              'type_id':3,
1095
              'type_id':3,
1074
              'is_mark':isMark,
1096
              'is_mark':isMark,
1075
              'admin_user_id':this.$store.getters.xt_user.user.id,
1097
              'admin_user_id':this.$store.getters.xt_user.user.id,
1076
-          }
1098
+          };
1077
          axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
1099
          axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
1078
           if (response.data.state == 0) {
1100
           if (response.data.state == 0) {
1079
-               that.$message.error(response.data.data.msg)
1101
+               that.$message.error(response.data.data.msg);
1080
                return false
1102
                return false
1081
             } else {
1103
             } else {
1082
               if(response.data.data.msg == ""){
1104
               if(response.data.data.msg == ""){
1083
-                  that.$message.success("备案成功!")
1105
+                  that.$message.success("备案成功!");
1084
                   that.getList()
1106
                   that.getList()
1085
                }
1107
                }
1086
                if(response.data.data.msg!=""){
1108
                if(response.data.data.msg!=""){
1087
-                  that.$message.error(response.data.data.msg)
1109
+                  that.$message.error(response.data.data.msg);
1088
                   that.getList()
1110
                   that.getList()
1089
                }
1111
                }
1090
              }
1112
              }
1098
          this.getList()
1120
          this.getList()
1099
       },
1121
       },
1100
       handleSuccess({ results, header }) {
1122
       handleSuccess({ results, header }) {
1101
-       
1123
+
1102
         if (header != undefined && header.length > 0) {
1124
         if (header != undefined && header.length > 0) {
1103
-            
1104
-          var isHasMedicalInsuranceLevel = header.includes('*医保等级')
1105
-         
1106
-          var isHasGoodUnit = header.includes('*单位')
1107
-        
1108
-          var isHasStockWarnCount = header.includes('*库存警戒')
1109
-       
1110
-          var isHasManuFacturer =  header.includes('*生产厂商')
1111
-         
1112
-          var isHasGoodName = header.includes('*耗材名称')
1113
-        
1114
-          var isHasGoodKand = header.includes('*耗材种类')
1115
-          
1116
-          var isHasSpecificationName = header.includes('*规格型号')
1117
-        
1118
-          var isHasBuyPrice = header.includes('*零价')
1119
-                
1125
+
1126
+          var isHasMedicalInsuranceLevel = header.includes('*医保等级');
1127
+
1128
+          var isHasGoodUnit = header.includes('*单位');
1129
+
1130
+          var isHasStockWarnCount = header.includes('*库存警戒');
1131
+
1132
+          var isHasManuFacturer =  header.includes('*生产厂商');
1133
+
1134
+          var isHasGoodName = header.includes('*耗材名称');
1135
+
1136
+          var isHasGoodKand = header.includes('*耗材种类');
1137
+
1138
+          var isHasSpecificationName = header.includes('*规格型号');
1139
+
1140
+          var isHasBuyPrice = header.includes('*零价');
1141
+
1120
           if (!(isHasMedicalInsuranceLevel && isHasGoodUnit && isHasStockWarnCount && isHasManuFacturer  && isHasGoodName && isHasGoodKand && isHasSpecificationName &&  isHasBuyPrice)) {
1142
           if (!(isHasMedicalInsuranceLevel && isHasGoodUnit && isHasStockWarnCount && isHasManuFacturer  && isHasGoodName && isHasGoodKand && isHasSpecificationName &&  isHasBuyPrice)) {
1121
-            this.dialogVisible = true
1143
+            this.dialogVisible = true;
1122
             return
1144
             return
1123
           }
1145
           }
1124
         }else {
1146
         }else {
1125
-          this.dialogVisible = true
1147
+          this.dialogVisible = true;
1126
           return
1148
           return
1127
         }
1149
         }
1128
-       
1129
-       var tableData = []
1150
+
1151
+       var tableData = [];
1130
        for(let i=1;i<results.length;i++){
1152
        for(let i=1;i<results.length;i++){
1131
-         let obj = {"good_kind_id":0,"good_type_id":0,"medical_insurance_id":0,"dealer_id":0,"statistic_id":0,"manufacturer_id":0,"unit_id":0}
1153
+         let obj = {"good_kind_id":0,"good_type_id":0,"medical_insurance_id":0,"dealer_id":0,"statistic_id":0,"manufacturer_id":0,"unit_id":0};
1132
          for (var key in results[i]) {
1154
          for (var key in results[i]) {
1133
 
1155
 
1134
            if (results[i]['*耗材名称'] === undefined) {
1156
            if (results[i]['*耗材名称'] === undefined) {
1138
                obj['good_name'] = results[i][key].replace(/\s/g,"")
1160
                obj['good_name'] = results[i][key].replace(/\s/g,"")
1139
               }
1161
               }
1140
            }
1162
            }
1141
-           
1163
+
1142
            if (results[i]['*耗材种类'] === undefined) {
1164
            if (results[i]['*耗材种类'] === undefined) {
1143
                 obj['good_kind'] = ''
1165
                 obj['good_kind'] = ''
1144
               } else {
1166
               } else {
1250
                obj['is_special_diseases'] = results[i][key].replace(/\s/g,"")
1272
                obj['is_special_diseases'] = results[i][key].replace(/\s/g,"")
1251
               }
1273
               }
1252
            }
1274
            }
1253
-          
1275
+
1254
            if (results[i]['是否备案'] === undefined) {
1276
            if (results[i]['是否备案'] === undefined) {
1255
                 obj['is_record'] = ''
1277
                 obj['is_record'] = ''
1256
               } else {
1278
               } else {
1266
                obj['statistics_category'] = results[i][key].replace(/\s/g,"")
1288
                obj['statistics_category'] = results[i][key].replace(/\s/g,"")
1267
               }
1289
               }
1268
            }
1290
            }
1269
-          
1291
+
1270
           if (results[i]['状态'] === undefined) {
1292
           if (results[i]['状态'] === undefined) {
1271
                 obj['good_status'] = ''
1293
                 obj['good_status'] = ''
1272
               } else {
1294
               } else {
1274
                obj['good_status'] = results[i][key].replace(/\s/g,"")
1296
                obj['good_status'] = results[i][key].replace(/\s/g,"")
1275
               }
1297
               }
1276
            }
1298
            }
1277
-           
1299
+
1278
 
1300
 
1279
           if (results[i]['社保目录编码'] === undefined) {
1301
           if (results[i]['社保目录编码'] === undefined) {
1280
                 obj['social_security_directory_code'] = ''
1302
                 obj['social_security_directory_code'] = ''
1310
 
1332
 
1311
 
1333
 
1312
          }
1334
          }
1313
-         tableData.push(obj)
1314
-        var goodUnit =  this.$store.getters.good_unit
1315
-       
1335
+         tableData.push(obj);
1336
+        var goodUnit =  this.$store.getters.good_unit;
1337
+
1338
+
1339
+        for(let i=0;i<tableData.length;i++){
1316
 
1340
 
1317
-        for(let i=0;i<tableData.length;i++){ 
1318
-      
1319
          for(let c=0;c<goodUnit.length;c++){
1341
          for(let c=0;c<goodUnit.length;c++){
1320
             if(tableData[i].good_unit == goodUnit[c].name){
1342
             if(tableData[i].good_unit == goodUnit[c].name){
1321
                tableData[i].unit_id = goodUnit[c].id
1343
                tableData[i].unit_id = goodUnit[c].id
1324
 
1346
 
1325
         }
1347
         }
1326
        }
1348
        }
1327
-       
1349
+
1328
        for(let i=0;i<tableData.length;i++){
1350
        for(let i=0;i<tableData.length;i++){
1329
-          tableData[i].stock_warn_count = parseInt(tableData[i].stock_warn_count)
1351
+          tableData[i].stock_warn_count = parseInt(tableData[i].stock_warn_count);
1330
 
1352
 
1331
           if(tableData[i].is_special_diseases == "是"){
1353
           if(tableData[i].is_special_diseases == "是"){
1332
               tableData[i].is_special_diseases = 1
1354
               tableData[i].is_special_diseases = 1
1342
              tableData[i].is_record = 2
1364
              tableData[i].is_record = 2
1343
           }
1365
           }
1344
 
1366
 
1345
-         
1367
+
1346
 
1368
 
1347
           if(tableData[i].special_medical == "是"){
1369
           if(tableData[i].special_medical == "是"){
1348
              tableData[i].special_medical = "1"
1370
              tableData[i].special_medical = "1"
1351
              tableData[i].special_medical = "2"
1373
              tableData[i].special_medical = "2"
1352
           }
1374
           }
1353
        }
1375
        }
1354
-        
1376
+
1355
        for(let i=0;i<tableData.length;i++){
1377
        for(let i=0;i<tableData.length;i++){
1356
-         
1378
+
1357
           if(tableData[i].is_special_diseases == ""){
1379
           if(tableData[i].is_special_diseases == ""){
1358
              tableData[i].is_special_diseases = 0
1380
              tableData[i].is_special_diseases = 0
1359
           }else{
1381
           }else{
1365
           }else{
1387
           }else{
1366
             tableData[i].is_record = parseInt(tableData[i].is_record)
1388
             tableData[i].is_record = parseInt(tableData[i].is_record)
1367
           }
1389
           }
1368
-         
1369
-        
1390
+
1391
+
1370
        }
1392
        }
1371
-       
1393
+
1372
        let params = {
1394
        let params = {
1373
-          'goods':tableData 
1374
-        }
1375
-     
1376
-       
1377
-       
1395
+          'goods':tableData
1396
+        };
1397
+
1398
+
1399
+
1378
         postGoodInformation(params).then(response=>{
1400
         postGoodInformation(params).then(response=>{
1379
            if(response.data.state == 1){
1401
            if(response.data.state == 1){
1380
-             var msg =  response.data.data.msg
1381
-             this.$message.success("导入成功!")
1382
-             this.getList()
1402
+             var msg =  response.data.data.msg;
1403
+             this.$message.success("导入成功!");
1404
+             this.getList();
1383
              this.getInitializtion()
1405
              this.getInitializtion()
1384
            }else{
1406
            }else{
1385
              this.$message.error("导入失败,请下载日志查看")
1407
              this.$message.error("导入失败,请下载日志查看")
1387
         })
1409
         })
1388
       },
1410
       },
1389
       generateTxt: function(log) {
1411
       generateTxt: function(log) {
1390
-        var content = ''
1391
-        var errlog = log.err_logs
1392
-        content = this.getContent(log)
1412
+        var content = '';
1413
+        var errlog = log.err_logs;
1414
+        content = this.getContent(log);
1393
         for (let i = 0; i < errlog.length; i++) {
1415
         for (let i = 0; i < errlog.length; i++) {
1394
           if (content.length == 0) {
1416
           if (content.length == 0) {
1395
             content = errlog[i].err_msg
1417
             content = errlog[i].err_msg
1398
           }
1420
           }
1399
         }
1421
         }
1400
 
1422
 
1401
-        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
1423
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' });
1402
         if (typeof url === 'object' && url instanceof Blob) {
1424
         if (typeof url === 'object' && url instanceof Blob) {
1403
           url = URL.createObjectURL(url) // 创建blob地址
1425
           url = URL.createObjectURL(url) // 创建blob地址
1404
         }
1426
         }
1405
-        const aLink = document.createElement('a')
1406
-        aLink.href = url
1407
-        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
1427
+        const aLink = document.createElement('a');
1428
+        aLink.href = url;
1429
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt';
1408
         aLink.click()
1430
         aLink.click()
1409
 
1431
 
1410
       },
1432
       },
1412
         return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
1434
         return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
1413
       },
1435
       },
1414
       timestampToTime(timestamp) {
1436
       timestampToTime(timestamp) {
1415
-        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
1416
-        var Y = date.getFullYear() + '年'
1417
-        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
1418
-        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
1419
-        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
1420
-        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
1421
-        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
1437
+        var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
1438
+        var Y = date.getFullYear() + '年';
1439
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月';
1440
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 ';
1441
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时';
1442
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分';
1443
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒';
1422
         return Y + M + D + h + m + s
1444
         return Y + M + D + h + m + s
1423
       },
1445
       },
1424
        generateLog() {
1446
        generateLog() {
1425
         let params = {
1447
         let params = {
1426
           'log_type': 5
1448
           'log_type': 5
1427
-        }
1449
+        };
1428
         generateLog(params).then(
1450
         generateLog(params).then(
1429
           response => {
1451
           response => {
1430
             if (response.data.state === 1) {
1452
             if (response.data.state === 1) {
1431
-              this.logs = response.data.data.logs
1453
+              this.logs = response.data.data.logs;
1432
               this.exportLogVisible = true
1454
               this.exportLogVisible = true
1433
             } else {
1455
             } else {
1434
               this.$message.error(response.data.msg)
1456
               this.$message.error(response.data.msg)
1440
       getInitializtion(){
1462
       getInitializtion(){
1441
        getInitializtion().then(response=>{
1463
        getInitializtion().then(response=>{
1442
          if(response.data.state == 1){
1464
          if(response.data.state == 1){
1443
-           var goodKindList = response.data.data.goodKindList
1444
-          
1465
+           var goodKindList = response.data.data.goodKindList;
1466
+
1445
            this.goodKindList = goodKindList
1467
            this.goodKindList = goodKindList
1446
-         
1468
+
1447
 
1469
 
1448
          }
1470
          }
1449
        })
1471
        })
1450
       }
1472
       }
1451
 
1473
 
1452
-    }, 
1474
+    },
1453
     created() {
1475
     created() {
1454
-      this.getList()
1455
-      this.getAllDealer()
1456
-      this.getAllManufacturer()
1457
-      this.getAllGoodType()
1458
-      this.goodInfo.goodInfoDialog.formValue.goodUnit = this.$store.getters.good_unit
1476
+      this.getList();
1477
+      this.getAllDealer();
1478
+      this.getAllManufacturer();
1479
+      this.getAllGoodType();
1480
+      this.goodInfo.goodInfoDialog.formValue.goodUnit = this.$store.getters.good_unit;
1459
       this.getInitializtion()
1481
       this.getInitializtion()
1460
     }
1482
     }
1461
   }
1483
   }

+ 166 - 144
src/xt_pages/data/components/drugs.vue Прегледај датотеку

59
         <!-- <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
59
         <!-- <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
60
         <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button> -->
60
         <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button> -->
61
       </div>
61
       </div>
62
-      
62
+
63
     </div>
63
     </div>
64
     <div style="display:flex; align-items:center;margin-bottom:10px;">
64
     <div style="display:flex; align-items:center;margin-bottom:10px;">
65
         <el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
65
         <el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
199
       :total="total"
199
       :total="total"
200
     >
200
     >
201
     </el-pagination>
201
     </el-pagination>
202
-   
202
+
203
 
203
 
204
     <el-dialog
204
     <el-dialog
205
       title="提示"
205
       title="提示"
410
     },
410
     },
411
     methods: {
411
     methods: {
412
       GDYBBatchPutOnRecord(){
412
       GDYBBatchPutOnRecord(){
413
-        var that = this
413
+        var that = this;
414
         var ids = [];
414
         var ids = [];
415
         var idMap = {};
415
         var idMap = {};
416
         for (const index in this.selectDrug) {
416
         for (const index in this.selectDrug) {
421
           ids:ids.join(','),
421
           ids:ids.join(','),
422
           record_type: 1,
422
           record_type: 1,
423
           admin_user_id:this.$store.getters.xt_user.user.id
423
           admin_user_id:this.$store.getters.xt_user.user.id
424
-        }
424
+        };
425
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
425
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
426
           if (response.data.state == 0) {
426
           if (response.data.state == 0) {
427
-            that.$message.error(response.data.data.msg)
427
+            that.$message.error(response.data.data.msg);
428
             return false
428
             return false
429
           } else {
429
           } else {
430
             if(response.data.data.failed_code == -10){
430
             if(response.data.data.failed_code == -10){
431
-              that.$message.error(response.data.data.msg)
431
+              // that.$message.error(response.data.data.msg)
432
+              that.$confirm(response.data.data.msg, '医保错误信息', {
433
+                confirmButtonText: '确 定',
434
+                type: 'warning'
435
+              }).then(() => {
436
+
437
+              }).catch(() => {
438
+              })
432
             }else{
439
             }else{
433
 
440
 
434
 
441
 
439
 
446
 
440
       },
447
       },
441
       handleSizeChange(val) {
448
       handleSizeChange(val) {
442
-        this.limit = val
449
+        this.limit = val;
443
         this.getList()
450
         this.getList()
444
       },
451
       },
445
       handleCurrentChange(val) {
452
       handleCurrentChange(val) {
446
-        this.page = val
453
+        this.page = val;
447
         this.getList()
454
         this.getList()
448
       },
455
       },
449
       changeInject(val) {
456
       changeInject(val) {
471
         return ''
478
         return ''
472
       },
479
       },
473
       getDealer(id){
480
       getDealer(id){
474
-        var name = ""
481
+        var name = "";
475
         for(let i=0;i<this.dealer.length;i++){
482
         for(let i=0;i<this.dealer.length;i++){
476
           if(this.dealer[i].id == id){
483
           if(this.dealer[i].id == id){
477
              name = this.dealer[i].dealer_name
484
              name = this.dealer[i].dealer_name
480
         return name
487
         return name
481
       },
488
       },
482
       goodInfoDialogComfirm: function(val) {
489
       goodInfoDialogComfirm: function(val) {
483
-        
490
+
484
         //修改自备药
491
         //修改自备药
485
-        var untit = ""
486
-        var untis = getDataConfig('hemodialysis','units')
487
-        
492
+        var untit = "";
493
+        var untis = getDataConfig('hemodialysis','units');
494
+
488
         for(let i=0;i<untis.length;i++){
495
         for(let i=0;i<untis.length;i++){
489
            if(val.min_unit == untis[i].id){
496
            if(val.min_unit == untis[i].id){
490
               untit = untis[i].name
497
               untit = untis[i].name
492
         }
499
         }
493
         if (val.id > 0) {
500
         if (val.id > 0) {
494
           //修改
501
           //修改
495
-          val['id'] = this.current_id
502
+          val['id'] = this.current_id;
496
           editBaseDrugLib(val,untit).then(response => {
503
           editBaseDrugLib(val,untit).then(response => {
497
             if (response.data.state == 0) {
504
             if (response.data.state == 0) {
498
-              this.$message.error(response.data.msg)
505
+              this.$message.error(response.data.msg);
499
               return false
506
               return false
500
             } else {
507
             } else {
501
-              this.$refs.addDrugs.hide()
502
-              this.getList()
508
+              this.$refs.addDrugs.hide();
509
+              this.getList();
503
               this.$message.success('修改成功')
510
               this.$message.success('修改成功')
504
             }
511
             }
505
           })
512
           })
506
         } else if (val.id == 0) {
513
         } else if (val.id == 0) {
507
           //新增
514
           //新增
508
-         
515
+
509
 
516
 
510
           createBaseDrugLib(val).then(response => {
517
           createBaseDrugLib(val).then(response => {
511
             if (response.data.state == 0) {
518
             if (response.data.state == 0) {
512
-              this.$message.error(response.data.msg)
519
+              this.$message.error(response.data.msg);
513
               return false
520
               return false
514
             } else {
521
             } else {
515
-              this.$refs.addDrugs.hide()
516
-              this.getList()
522
+              this.$refs.addDrugs.hide();
523
+              this.getList();
517
               this.$message.success('新增成功')
524
               this.$message.success('新增成功')
518
             }
525
             }
519
           })
526
           })
523
         this.$refs.addDrugs.hide()
530
         this.$refs.addDrugs.hide()
524
       },
531
       },
525
       getAllManufacturer: function() {
532
       getAllManufacturer: function() {
526
-        this.manufacturers = []
533
+        this.manufacturers = [];
527
         GetAllManufacturer().then(response => {
534
         GetAllManufacturer().then(response => {
528
           if (response.data.state == 0) {
535
           if (response.data.state == 0) {
529
-            this.$message.error(response.data.msg)
536
+            this.$message.error(response.data.msg);
530
             return false
537
             return false
531
           } else {
538
           } else {
532
-              var obj = {id:0,manufacturer_name:"全部"}
533
-              this.manufacturers.push(obj)
539
+              var obj = {id:0,manufacturer_name:"全部"};
540
+              this.manufacturers.push(obj);
534
 
541
 
535
             for (let i = 0; i < response.data.data.manufacturer.length; i++) {
542
             for (let i = 0; i < response.data.data.manufacturer.length; i++) {
536
               this.manufacturers.push(response.data.data.manufacturer[i])
543
               this.manufacturers.push(response.data.data.manufacturer[i])
549
         // this.$refs.maintain.show();
556
         // this.$refs.maintain.show();
550
       },
557
       },
551
       openForm(id) {
558
       openForm(id) {
552
-        this.current_id = id
553
-        this.getAllManufacturer()
559
+        this.current_id = id;
560
+        this.getAllManufacturer();
554
         if (id > 0) {
561
         if (id > 0) {
555
           let params = {
562
           let params = {
556
             id: this.current_id
563
             id: this.current_id
557
-          }
564
+          };
558
           getBaseDrugLib(params).then(response => {
565
           getBaseDrugLib(params).then(response => {
559
             if (response.data.state == 0) {
566
             if (response.data.state == 0) {
560
-              this.$message.error(response.data.msg)
567
+              this.$message.error(response.data.msg);
561
               return false
568
               return false
562
             } else {
569
             } else {
563
-           
570
+
564
               for (let key in response.data.data.drug) {
571
               for (let key in response.data.data.drug) {
565
                 this.formValue[key] = response.data.data.drug[key]
572
                 this.formValue[key] = response.data.data.drug[key]
566
               }
573
               }
635
                 this.formValue.prescription_mark = this.formValue.prescription_mark.toString()
642
                 this.formValue.prescription_mark = this.formValue.prescription_mark.toString()
636
               }
643
               }
637
 
644
 
638
-              this.formValue.record_date = this.getTime(this.formValue.record_date)
645
+              this.formValue.record_date = this.getTime(this.formValue.record_date);
639
 
646
 
640
               if(this.formValue.drug_category == 0){
647
               if(this.formValue.drug_category == 0){
641
                   this.formValue.drug_category = ""
648
                   this.formValue.drug_category = ""
673
               if(this.formValue.hosp_appr_flag == 0){
680
               if(this.formValue.hosp_appr_flag == 0){
674
                 this.formValue.hosp_appr_flag = ""
681
                 this.formValue.hosp_appr_flag = ""
675
               }
682
               }
676
-              
683
+
677
               this.$refs.addDrugs.show(id, this.formValue)
684
               this.$refs.addDrugs.show(id, this.formValue)
678
 
685
 
679
             }
686
             }
687
       },
694
       },
688
 
695
 
689
        deleteDurg(id,index){
696
        deleteDurg(id,index){
690
-      
697
+
691
             this.$confirm('确认删除吗?', '删除', {
698
             this.$confirm('确认删除吗?', '删除', {
692
             confirmButtonText: '确 定',
699
             confirmButtonText: '确 定',
693
             cancelButtonText: '取 消',
700
             cancelButtonText: '取 消',
695
          }).then(() => {
702
          }).then(() => {
696
               const params = {
703
               const params = {
697
                 id:id,
704
                 id:id,
698
-              }
705
+              };
699
             deleteDurg(params).then(response => {
706
             deleteDurg(params).then(response => {
700
               if (response.data.state == 1) {
707
               if (response.data.state == 1) {
701
-                  var msg = response.data.data.msg
708
+                  var msg = response.data.data.msg;
702
                   this.list.splice(index, 1);
709
                   this.list.splice(index, 1);
703
                   this.$message.success("删除成功")
710
                   this.$message.success("删除成功")
704
               } else {
711
               } else {
719
           is_inject: this.is_inject,
726
           is_inject: this.is_inject,
720
           manufacturer:this.manufacturer,
727
           manufacturer:this.manufacturer,
721
           is_record:this.is_record
728
           is_record:this.is_record
722
-        }
729
+        };
723
         getBaseDrugLibList(params).then(response => {
730
         getBaseDrugLibList(params).then(response => {
724
           if (response.data.state == 0) {
731
           if (response.data.state == 0) {
725
-            this.$message.error(response.data.msg)
732
+            this.$message.error(response.data.msg);
726
             return false
733
             return false
727
           } else {
734
           } else {
728
-            this.total = response.data.data.total
729
-            this.list = []
730
-           
735
+            this.total = response.data.data.total;
736
+            this.list = [];
737
+
731
             for (let i = 0; i < response.data.data.list.length; i++) {
738
             for (let i = 0; i < response.data.data.list.length; i++) {
732
               this.list.push(response.data.data.list[i])
739
               this.list.push(response.data.data.list[i])
733
             }
740
             }
738
         return getDataConfig(module, filed_name)
745
         return getDataConfig(module, filed_name)
739
       },
746
       },
740
       putOnUnRecord(id){
747
       putOnUnRecord(id){
741
-        var that = this
748
+        var that = this;
742
         let params = {
749
         let params = {
743
           ids:id.toString(),
750
           ids:id.toString(),
744
           record_type: 1,
751
           record_type: 1,
745
           admin_user_id:this.$store.getters.xt_user.user.id
752
           admin_user_id:this.$store.getters.xt_user.user.id
746
-        }
753
+        };
747
         axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
754
         axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
748
           if (response.data.state == 0) {
755
           if (response.data.state == 0) {
749
-            that.$message.error(response.data.data.msg)
756
+            that.$message.error(response.data.data.msg);
750
             return false
757
             return false
751
           } else {
758
           } else {
752
             if(response.data.data.failed_code == -10){
759
             if(response.data.data.failed_code == -10){
753
-              that.$message.error(response.data.data.msg)
760
+              // that.$message.error(response.data.data.msg)
761
+              that.$confirm(response.data.data.msg, '医保错误信息', {
762
+                confirmButtonText: '确 定',
763
+                type: 'warning'
764
+              }).then(() => {
765
+
766
+              }).catch(() => {
767
+              })
768
+
754
             }else{
769
             }else{
755
               // for (let i = 0; i < that.tableData.length; i++) {
770
               // for (let i = 0; i < that.tableData.length; i++) {
756
               //   if (that.tableData[i].id == that.currentObject.id) {
771
               //   if (that.tableData[i].id == that.currentObject.id) {
764
         })
779
         })
765
       },
780
       },
766
       putOnRecord(id){
781
       putOnRecord(id){
767
-        var that = this
782
+        var that = this;
768
 
783
 
769
         let params = {
784
         let params = {
770
           ids:id.toString(),
785
           ids:id.toString(),
771
           record_type: 1,
786
           record_type: 1,
772
           admin_user_id:this.$store.getters.xt_user.user.id
787
           admin_user_id:this.$store.getters.xt_user.user.id
773
-        }
788
+        };
774
 
789
 
775
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
790
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
776
           if (response.data.state == 0) {
791
           if (response.data.state == 0) {
777
-            that.$message.error(response.data.data.msg)
792
+            that.$message.error(response.data.data.msg);
778
             return false
793
             return false
779
           } else {
794
           } else {
780
             if(response.data.data.failed_code == -10){
795
             if(response.data.data.failed_code == -10){
781
-              that.$message.error(response.data.data.msg)
796
+              // that.$message.error(response.data.data.msg)
797
+              that.$confirm(response.data.data.msg, '医保错误信息', {
798
+                confirmButtonText: '确 定',
799
+                type: 'warning'
800
+              }).then(() => {
801
+
802
+              }).catch(() => {
803
+              })
782
             }else{
804
             }else{
783
 
805
 
784
 
806
 
804
       //   })
826
       //   })
805
       // },
827
       // },
806
       toReturn(id,isMark){
828
       toReturn(id,isMark){
807
-     
808
-         var that = this
829
+
830
+         var that = this;
809
          let params = {
831
          let params = {
810
              'id':id,
832
              'id':id,
811
              'type_id':1,
833
              'type_id':1,
812
              'is_mark':isMark,
834
              'is_mark':isMark,
813
              'admin_user_id':this.$store.getters.xt_user.user.id
835
              'admin_user_id':this.$store.getters.xt_user.user.id
814
-          }
836
+          };
815
          axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
837
          axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
816
           if (response.data.state == 0) {
838
           if (response.data.state == 0) {
817
-               that.$message.error(response.data.data.msg)
839
+               that.$message.error(response.data.data.msg);
818
                return false
840
                return false
819
             } else {
841
             } else {
820
               if(response.data.data.msg == ""){
842
               if(response.data.data.msg == ""){
821
-                  that.$message.success("备案成功!")
843
+                  that.$message.success("备案成功!");
822
                   that.getList()
844
                   that.getList()
823
                }
845
                }
824
                if(response.data.data.msg!=""){
846
                if(response.data.data.msg!=""){
825
-                  that.$message.error(response.data.data.msg)
847
+                  that.$message.error(response.data.data.msg);
826
                   that.getList()
848
                   that.getList()
827
                }
849
                }
828
 
850
 
878
           idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
900
           idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
879
         }
901
         }
880
 
902
 
881
-        var idss = ids.join(',')
903
+        var idss = ids.join(',');
882
         let params = {
904
         let params = {
883
           ids:idss,
905
           ids:idss,
884
           admin_user_id:this.$store.getters.xt_user.user.id
906
           admin_user_id:this.$store.getters.xt_user.user.id
885
-        }
907
+        };
886
 
908
 
887
-        var that = this
909
+        var that = this;
888
         axios.get('http://127.0.0.1:9532/sz/api/drug/get',{ params: params }).then(function(response) {
910
         axios.get('http://127.0.0.1:9532/sz/api/drug/get',{ params: params }).then(function(response) {
889
          if (response.data.state == 0) {
911
          if (response.data.state == 0) {
890
 
912
 
891
-               that.$message.error(response.data.data.msg)
913
+               that.$message.error(response.data.data.msg);
892
                return false
914
                return false
893
             } else {
915
             } else {
894
                if(response.data.data.msg == ""){
916
                if(response.data.data.msg == ""){
895
-                  that.$message.success("备案成功!")
917
+                  that.$message.success("备案成功!");
896
                   that.getList()
918
                   that.getList()
897
                }
919
                }
898
                if(response.data.data.msg!=""){
920
                if(response.data.data.msg!=""){
899
-                  that.$message.error(response.data.data.msg)
921
+                  that.$message.error(response.data.data.msg);
900
                    that.getList()
922
                    that.getList()
901
                }
923
                }
902
              }
924
              }
906
      },
928
      },
907
 
929
 
908
       handleSuccessTwo({ results, header }) {
930
       handleSuccessTwo({ results, header }) {
909
-     
931
+
910
         if (header != undefined && header.length > 0) {
932
         if (header != undefined && header.length > 0) {
911
-            
912
-          var isHasDrugName = header.includes('*药品名称')
913
-         
914
-          var isHasDrugSpec = header.includes('*药品规格')
915
-        
916
-          var isHasDrugType =  header.includes('*药品类型')
917
-        
918
-          var isHasDrugStockLimit =  header.includes('*库存警戒')
919
-         
920
-          var isHasDrugOriginPlace= header.includes('*产地')
921
-         
922
-          var isHasDrugDosageForm = header.includes('*药品剂型')
923
-        
924
-          var isHasMaxUnit= header.includes('*最大单位')
925
-
926
-          var isHasMinUnit= header.includes('*最小单位')
927
-
928
-          var isHasUnitMatrixing= header.includes("*单位换算")
929
-        
930
-          var isHasRetailPrice = header.includes('*单零售价')
931
-        
932
-          var isHasLastPrice = header.includes('*上次进价')
933
-
934
-          var isHasDrugClassifye = header.includes('*药物分类')
935
-
936
-         var isHasManufacturer = header.includes('*生产厂商')
937
-
938
-         var isHasDrugDose = header.includes('*剂量')
939
-           
940
-         var isDrugDoseUnit = header.includes('*剂量单位')
941
-     
933
+
934
+          var isHasDrugName = header.includes('*药品名称');
935
+
936
+          var isHasDrugSpec = header.includes('*药品规格');
937
+
938
+          var isHasDrugType =  header.includes('*药品类型');
939
+
940
+          var isHasDrugStockLimit =  header.includes('*库存警戒');
941
+
942
+          var isHasDrugOriginPlace= header.includes('*产地');
943
+
944
+          var isHasDrugDosageForm = header.includes('*药品剂型');
945
+
946
+          var isHasMaxUnit= header.includes('*最大单位');
947
+
948
+          var isHasMinUnit= header.includes('*最小单位');
949
+
950
+          var isHasUnitMatrixing= header.includes("*单位换算");
951
+
952
+          var isHasRetailPrice = header.includes('*单零售价');
953
+
954
+          var isHasLastPrice = header.includes('*上次进价');
955
+
956
+          var isHasDrugClassifye = header.includes('*药物分类');
957
+
958
+         var isHasManufacturer = header.includes('*生产厂商');
959
+
960
+         var isHasDrugDose = header.includes('*剂量');
961
+
962
+         var isDrugDoseUnit = header.includes('*剂量单位');
963
+
942
           if (!(isHasDrugName  && isHasDrugSpec && isHasDrugType && isHasDrugStockLimit && isHasDrugOriginPlace && isHasDrugDosageForm && isHasMaxUnit &&  isHasMinUnit && isHasUnitMatrixing &&  isHasRetailPrice && isHasLastPrice && isHasDrugClassifye && isHasManufacturer && isHasDrugDose && isDrugDoseUnit)) {
964
           if (!(isHasDrugName  && isHasDrugSpec && isHasDrugType && isHasDrugStockLimit && isHasDrugOriginPlace && isHasDrugDosageForm && isHasMaxUnit &&  isHasMinUnit && isHasUnitMatrixing &&  isHasRetailPrice && isHasLastPrice && isHasDrugClassifye && isHasManufacturer && isHasDrugDose && isDrugDoseUnit)) {
943
-            this.dialogVisible = true
965
+            this.dialogVisible = true;
944
             return
966
             return
945
           }
967
           }
946
         }else {
968
         }else {
947
-          this.dialogVisible = true
969
+          this.dialogVisible = true;
948
           return
970
           return
949
         }
971
         }
950
-       
951
-       var tableData = []
972
+
973
+       var tableData = [];
952
        for(let i=1;i<results.length;i++){
974
        for(let i=1;i<results.length;i++){
953
-         let obj = {"drug_type_id":0,"drug_dosage_form_id":0,"medical_insurance_level_id":0,"drug_classify_id":0,"manufacturer_id":0,"dealer_id":0,"statistics_category_id":0,"drug_control_id":0,"pharmacology_category_id":0,"drug_category_id":0}
975
+         let obj = {"drug_type_id":0,"drug_dosage_form_id":0,"medical_insurance_level_id":0,"drug_classify_id":0,"manufacturer_id":0,"dealer_id":0,"statistics_category_id":0,"drug_control_id":0,"pharmacology_category_id":0,"drug_category_id":0};
954
          for (var key in results[i]) {
976
          for (var key in results[i]) {
955
 
977
 
956
            if (results[i]['*药品名称'] === undefined) {
978
            if (results[i]['*药品名称'] === undefined) {
985
                obj['drug_type'] = results[i][key].replace(/\s/g,"")
1007
                obj['drug_type'] = results[i][key].replace(/\s/g,"")
986
               }
1008
               }
987
            }
1009
            }
988
-           
1010
+
989
 
1011
 
990
            if (results[i]['*库存警戒'] === undefined) {
1012
            if (results[i]['*库存警戒'] === undefined) {
991
                 obj['drug_stock_limit'] = ''
1013
                 obj['drug_stock_limit'] = ''
1052
                obj['retail_price'] = results[i][key].replace(/\s/g,"")
1074
                obj['retail_price'] = results[i][key].replace(/\s/g,"")
1053
               }
1075
               }
1054
            }
1076
            }
1055
-           
1077
+
1056
 
1078
 
1057
          if (results[i]['*上次进价'] === undefined) {
1079
          if (results[i]['*上次进价'] === undefined) {
1058
                 obj['last_price'] = ''
1080
                 obj['last_price'] = ''
1103
               }
1125
               }
1104
            }
1126
            }
1105
 
1127
 
1106
-          
1128
+
1107
 
1129
 
1108
             if (results[i]['别名拼音'] === undefined) {
1130
             if (results[i]['别名拼音'] === undefined) {
1109
                 obj['drug_alias_pinyin'] = ''
1131
                 obj['drug_alias_pinyin'] = ''
1232
                 obj['social_security_directory_code'] = results[i][key].replace(/\s/g,"")
1254
                 obj['social_security_directory_code'] = results[i][key].replace(/\s/g,"")
1233
               }
1255
               }
1234
            }
1256
            }
1235
-           
1257
+
1236
 
1258
 
1237
             if (results[i]['备案日期'] === undefined) {
1259
             if (results[i]['备案日期'] === undefined) {
1238
                 obj['record_date'] = ''
1260
                 obj['record_date'] = ''
1292
 
1314
 
1293
 
1315
 
1294
          }
1316
          }
1295
-         var newArr = []
1296
-         tableData.push(obj)
1297
-       
1298
-        for(let i=0;i<tableData.length;i++){ 
1299
-          
1317
+         var newArr = [];
1318
+         tableData.push(obj);
1319
+
1320
+        for(let i=0;i<tableData.length;i++){
1321
+
1300
          if(tableData[i].is_special_diseases == ""){
1322
          if(tableData[i].is_special_diseases == ""){
1301
             tableData[i].is_special_diseases = 0
1323
             tableData[i].is_special_diseases = 0
1302
          }
1324
          }
1308
             tableData[i].is_special_diseases = 2
1330
             tableData[i].is_special_diseases = 2
1309
          }
1331
          }
1310
 
1332
 
1311
-      
1312
-          
1333
+
1334
+
1313
           if(tableData[i].is_record == ""){
1335
           if(tableData[i].is_record == ""){
1314
              tableData[i].is_record = 0
1336
              tableData[i].is_record = 0
1315
           }
1337
           }
1319
           if(tableData[i].is_record == "否"){
1341
           if(tableData[i].is_record == "否"){
1320
             tableData[i].is_record = 2
1342
             tableData[i].is_record = 2
1321
           }
1343
           }
1322
-         
1344
+
1323
           if(tableData[i].prescription_mark == ""){
1345
           if(tableData[i].prescription_mark == ""){
1324
               tableData[i].prescription_mark = 0
1346
               tableData[i].prescription_mark = 0
1325
           }
1347
           }
1327
              tableData[i].prescription_mark =1
1349
              tableData[i].prescription_mark =1
1328
           }
1350
           }
1329
           if(tableData[i].prescription_mark == "否"){
1351
           if(tableData[i].prescription_mark == "否"){
1330
-            tableData[i].prescription_mark =2 
1352
+            tableData[i].prescription_mark =2
1331
           }
1353
           }
1332
 
1354
 
1333
           if(tableData[i].hosp_appr_flag == ""){
1355
           if(tableData[i].hosp_appr_flag == ""){
1334
              tableData[i].hosp_appr_flag = 0
1356
              tableData[i].hosp_appr_flag = 0
1335
-          } 
1336
-          
1357
+          }
1358
+
1337
           if(tableData[i].hosp_appr_flag == "无需审批"){
1359
           if(tableData[i].hosp_appr_flag == "无需审批"){
1338
               tableData[i].hosp_appr_flag = 1
1360
               tableData[i].hosp_appr_flag = 1
1339
           }
1361
           }
1346
           if(tableData[i].lmt_used_flag == ""){
1368
           if(tableData[i].lmt_used_flag == ""){
1347
              tableData[i].lmt_used_flag = 0
1369
              tableData[i].lmt_used_flag = 0
1348
           }
1370
           }
1349
-          
1371
+
1350
           if(tableData[i].lmt_used_flag == "否"){
1372
           if(tableData[i].lmt_used_flag == "否"){
1351
               tableData[i].lmt_used_flag = 0
1373
               tableData[i].lmt_used_flag = 0
1352
           }
1374
           }
1353
 
1375
 
1354
-            
1376
+
1355
           if(tableData[i].lmt_used_flag == "是"){
1377
           if(tableData[i].lmt_used_flag == "是"){
1356
               tableData[i].lmt_used_flag = 1
1378
               tableData[i].lmt_used_flag = 1
1357
           }
1379
           }
1358
-      
1380
+
1359
         }
1381
         }
1360
        }
1382
        }
1361
-     
1383
+
1362
        let params = {
1384
        let params = {
1363
-          'drugs':tableData 
1364
-        }
1365
-   
1385
+          'drugs':tableData
1386
+        };
1387
+
1366
         postDrugInformation(params).then(response=>{
1388
         postDrugInformation(params).then(response=>{
1367
            if(response.data.state == 1){
1389
            if(response.data.state == 1){
1368
-             var msg =  response.data.data.msg
1369
-             this.getList()
1370
-             this.getAllManufacturer()
1371
-             this.GetAllConfig()
1390
+             var msg =  response.data.data.msg;
1391
+             this.getList();
1392
+             this.getAllManufacturer();
1393
+             this.GetAllConfig();
1372
              this.$message.success("导入成功!")
1394
              this.$message.success("导入成功!")
1373
 
1395
 
1374
            }else{
1396
            }else{
1377
         })
1399
         })
1378
       },
1400
       },
1379
       generateTxt: function(log) {
1401
       generateTxt: function(log) {
1380
-        var content = ''
1381
-        var errlog = log.err_logs
1382
-        content = this.getContent(log)
1402
+        var content = '';
1403
+        var errlog = log.err_logs;
1404
+        content = this.getContent(log);
1383
         for (let i = 0; i < errlog.length; i++) {
1405
         for (let i = 0; i < errlog.length; i++) {
1384
           if (content.length == 0) {
1406
           if (content.length == 0) {
1385
             content = errlog[i].err_msg
1407
             content = errlog[i].err_msg
1388
           }
1410
           }
1389
         }
1411
         }
1390
 
1412
 
1391
-        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
1413
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' });
1392
         if (typeof url === 'object' && url instanceof Blob) {
1414
         if (typeof url === 'object' && url instanceof Blob) {
1393
           url = URL.createObjectURL(url) // 创建blob地址
1415
           url = URL.createObjectURL(url) // 创建blob地址
1394
         }
1416
         }
1395
-        const aLink = document.createElement('a')
1396
-        aLink.href = url
1397
-        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
1417
+        const aLink = document.createElement('a');
1418
+        aLink.href = url;
1419
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt';
1398
         aLink.click()
1420
         aLink.click()
1399
 
1421
 
1400
       },
1422
       },
1402
         return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
1424
         return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
1403
       },
1425
       },
1404
       timestampToTime(timestamp) {
1426
       timestampToTime(timestamp) {
1405
-        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
1406
-        var Y = date.getFullYear() + '年'
1407
-        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
1408
-        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
1409
-        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
1410
-        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
1411
-        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
1427
+        var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
1428
+        var Y = date.getFullYear() + '年';
1429
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月';
1430
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 ';
1431
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时';
1432
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分';
1433
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒';
1412
         return Y + M + D + h + m + s
1434
         return Y + M + D + h + m + s
1413
       },
1435
       },
1414
        generateLog() {
1436
        generateLog() {
1415
         let params = {
1437
         let params = {
1416
           'log_type': 4
1438
           'log_type': 4
1417
-        }
1439
+        };
1418
         generateLog(params).then(
1440
         generateLog(params).then(
1419
           response => {
1441
           response => {
1420
             if (response.data.state === 1) {
1442
             if (response.data.state === 1) {
1421
-              this.logs = response.data.data.logs
1443
+              this.logs = response.data.data.logs;
1422
               this.exportLogVisible = true
1444
               this.exportLogVisible = true
1423
             } else {
1445
             } else {
1424
               this.$message.error(response.data.msg)
1446
               this.$message.error(response.data.msg)
1429
       getDictionaryDataConfig(module,filed_name){
1451
       getDictionaryDataConfig(module,filed_name){
1430
         return getDictionaryDataConfig(module,filed_name)
1452
         return getDictionaryDataConfig(module,filed_name)
1431
       },
1453
       },
1432
-     
1454
+
1433
     },
1455
     },
1434
     created() {
1456
     created() {
1435
-     
1436
-      this.getList()
1437
-      this.getAllManufacturer()
1457
+
1458
+      this.getList();
1459
+      this.getAllManufacturer();
1438
       this.GetAllConfig()
1460
       this.GetAllConfig()
1439
-      
1461
+
1440
     }
1462
     }
1441
   }
1463
   }
1442
 </script>
1464
 </script>

+ 101 - 80
src/xt_pages/data/components/project.vue Прегледај датотеку

239
     },
239
     },
240
     methods:{
240
     methods:{
241
       putOnUnRecord(id){
241
       putOnUnRecord(id){
242
-        var that = this
242
+        var that = this;
243
         let params = {
243
         let params = {
244
           ids:id.toString(),
244
           ids:id.toString(),
245
           record_type: 3,
245
           record_type: 3,
246
           admin_user_id:this.$store.getters.xt_user.user.id
246
           admin_user_id:this.$store.getters.xt_user.user.id
247
-        }
247
+        };
248
         axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
248
         axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
249
           if (response.data.state == 0) {
249
           if (response.data.state == 0) {
250
-            that.$message.error(response.data.data.msg)
250
+            that.$message.error(response.data.data.msg);
251
             return false
251
             return false
252
           } else {
252
           } else {
253
             if(response.data.data.failed_code == -10){
253
             if(response.data.data.failed_code == -10){
254
-              that.$message.error(response.data.data.msg)
254
+              // that.$message.error(response.data.data.msg)
255
+              that.$confirm(response.data.data.msg, '医保错误信息', {
256
+                confirmButtonText: '确 定',
257
+                type: 'warning'
258
+              }).then(() => {
259
+
260
+              }).catch(() => {
261
+              })
255
             }else{
262
             }else{
256
               // for (let i = 0; i < that.tableData.length; i++) {
263
               // for (let i = 0; i < that.tableData.length; i++) {
257
               //   if (that.tableData[i].id == that.currentObject.id) {
264
               //   if (that.tableData[i].id == that.currentObject.id) {
265
         })
272
         })
266
       },
273
       },
267
       putOnRecord(id){
274
       putOnRecord(id){
268
-        var that = this
275
+        var that = this;
269
 
276
 
270
         let params = {
277
         let params = {
271
           ids:id.toString(),
278
           ids:id.toString(),
272
           record_type: 3,
279
           record_type: 3,
273
           admin_user_id:this.$store.getters.xt_user.user.id
280
           admin_user_id:this.$store.getters.xt_user.user.id
274
-        }
281
+        };
275
 
282
 
276
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
283
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
277
           if (response.data.state == 0) {
284
           if (response.data.state == 0) {
278
-            that.$message.error(response.data.data.msg)
285
+            that.$message.error(response.data.data.msg);
279
             return false
286
             return false
280
           } else {
287
           } else {
281
             if(response.data.data.failed_code == -10){
288
             if(response.data.data.failed_code == -10){
282
-              that.$message.error(response.data.data.msg)
289
+              // that.$message.error(response.data.data.msg)
290
+              that.$confirm(response.data.data.msg, '医保错误信息', {
291
+                confirmButtonText: '确 定',
292
+                type: 'warning'
293
+              }).then(() => {
294
+
295
+              }).catch(() => {
296
+              })
283
             }else{
297
             }else{
284
 
298
 
285
 
299
 
292
         })
306
         })
293
       },
307
       },
294
       GDYBBatchPutOnRecord(){
308
       GDYBBatchPutOnRecord(){
295
-        var that = this
309
+        var that = this;
296
         var ids = [];
310
         var ids = [];
297
         var idMap = {};
311
         var idMap = {};
298
         for (const index in this.selectDrug) {
312
         for (const index in this.selectDrug) {
303
           ids:ids.join(','),
317
           ids:ids.join(','),
304
           record_type: 3,
318
           record_type: 3,
305
           admin_user_id:this.$store.getters.xt_user.user.id
319
           admin_user_id:this.$store.getters.xt_user.user.id
306
-        }
320
+        };
307
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
321
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
308
           if (response.data.state == 0) {
322
           if (response.data.state == 0) {
309
-            that.$message.error(response.data.data.msg)
323
+            that.$message.error(response.data.data.msg);
310
             return false
324
             return false
311
           } else {
325
           } else {
312
             if(response.data.data.failed_code == -10){
326
             if(response.data.data.failed_code == -10){
313
-              that.$message.error(response.data.data.msg)
327
+              // that.$message.error(response.data.data.msg)
328
+              that.$confirm(response.data.data.msg, '医保错误信息', {
329
+                confirmButtonText: '确 定',
330
+                type: 'warning'
331
+              }).then(() => {
332
+
333
+              }).catch(() => {
334
+              })
314
             }else{
335
             }else{
315
 
336
 
316
 
337
 
324
          this.getlist()
345
          this.getlist()
325
         },
346
         },
326
         handleSizeChange(val) {
347
         handleSizeChange(val) {
327
-            this.limit = val
348
+            this.limit = val;
328
             this.getlist()
349
             this.getlist()
329
         },
350
         },
330
         handleCurrentChange(val) {
351
         handleCurrentChange(val) {
331
-            this.page = val
352
+            this.page = val;
332
             this.getlist()
353
             this.getlist()
333
         },
354
         },
334
         searchAction(){
355
         searchAction(){
346
            this.$refs.editProject.show(id)
367
            this.$refs.editProject.show(id)
347
         },
368
         },
348
         getCostClassify(id){
369
         getCostClassify(id){
349
-          var costClassify = getDictionaryDataConfig('system','cost_classify')
350
-          var name = ""
370
+          var costClassify = getDictionaryDataConfig('system','cost_classify');
371
+          var name = "";
351
           for(let i=0;i<costClassify.length;i++){
372
           for(let i=0;i<costClassify.length;i++){
352
              if(id == costClassify[i].id){
373
              if(id == costClassify[i].id){
353
                name = costClassify[i].name
374
                name = costClassify[i].name
356
           return name
377
           return name
357
         },
378
         },
358
         getExecutiveSection(id){
379
         getExecutiveSection(id){
359
-          var executiveSection =  this.departMentList
360
-          var name = ""
380
+          var executiveSection =  this.departMentList;
381
+          var name = "";
361
           for(let i=0;i<executiveSection.length;i++){
382
           for(let i=0;i<executiveSection.length;i++){
362
             if(id == executiveSection[i].id){
383
             if(id == executiveSection[i].id){
363
                name = executiveSection[i].name
384
                name = executiveSection[i].name
374
                limit:this.limit,
395
                limit:this.limit,
375
                page:this.page,
396
                page:this.page,
376
                is_mark:this.is_mark,
397
                is_mark:this.is_mark,
377
-            }
398
+            };
378
 
399
 
379
           getProjectList(params).then(response=>{
400
           getProjectList(params).then(response=>{
380
              if(response.data.state == 1){
401
              if(response.data.state == 1){
381
-               var projecList = response.data.data.projecList
382
-              
383
-               this.tableData = projecList
384
-               var total = response.data.data.total
385
-            
402
+               var projecList = response.data.data.projecList;
403
+
404
+               this.tableData = projecList;
405
+               var total = response.data.data.total;
406
+
386
                this.total = total
407
                this.total = total
387
              }
408
              }
388
           })
409
           })
395
            }).then(() => {
416
            }).then(() => {
396
             deleteHisProject(id).then(response => {
417
             deleteHisProject(id).then(response => {
397
                if (response.data.state == 1) {
418
                if (response.data.state == 1) {
398
-                 var msg = response.data.data.msg
399
-                 this.$message.success("删除成功")
419
+                 var msg = response.data.data.msg;
420
+                 this.$message.success("删除成功");
400
                 this.tableData.splice(index, 1);
421
                 this.tableData.splice(index, 1);
401
                 }
422
                 }
402
              });
423
              });
408
         },
429
         },
409
 
430
 
410
         toRecord(){
431
         toRecord(){
411
-         var that = this
432
+         var that = this;
412
          axios.get('http://127.0.0.1:9532/sz/api/treatment/get').then(function(response) {
433
          axios.get('http://127.0.0.1:9532/sz/api/treatment/get').then(function(response) {
413
           if (response.data.state == 0) {
434
           if (response.data.state == 0) {
414
-               that.$message.error(response.data.msg)
435
+               that.$message.error(response.data.msg);
415
                return false
436
                return false
416
             } else {
437
             } else {
417
-              that.$message({ message: '备案成功', type: 'success' })
438
+              that.$message({ message: '备案成功', type: 'success' });
418
               that.getlist()
439
               that.getlist()
419
              }
440
              }
420
            }).catch(function(error) {
441
            }).catch(function(error) {
422
       },
443
       },
423
 
444
 
424
      toReturn(id,isMark){
445
      toReturn(id,isMark){
425
-      
426
-         var that = this
446
+
447
+         var that = this;
427
          let params = {
448
          let params = {
428
              'id':id,
449
              'id':id,
429
              'type_id':2,
450
              'type_id':2,
430
              'is_mark':isMark,
451
              'is_mark':isMark,
431
              'admin_user_id':this.$store.getters.xt_user.user.id,
452
              'admin_user_id':this.$store.getters.xt_user.user.id,
432
-          }
433
-      
453
+          };
454
+
434
 
455
 
435
          axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
456
          axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
436
           if (response.data.state == 0) {
457
           if (response.data.state == 0) {
437
-               that.$message.error(response.data.data.msg)
458
+               that.$message.error(response.data.data.msg);
438
                return false
459
                return false
439
             } else {
460
             } else {
440
               if(response.data.data.msg == ""){
461
               if(response.data.data.msg == ""){
441
-                  that.$message.success("备案成功!")
462
+                  that.$message.success("备案成功!");
442
                   that.getlist()
463
                   that.getlist()
443
                }
464
                }
444
                if(response.data.data.msg!=""){
465
                if(response.data.data.msg!=""){
445
-                  that.$message.error(response.data.data.msg)
466
+                  that.$message.error(response.data.data.msg);
446
                   that.getlist()
467
                   that.getlist()
447
                }
468
                }
448
              }
469
              }
478
           idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
499
           idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
479
         }
500
         }
480
 
501
 
481
-        var idss = ids.join(',')
502
+        var idss = ids.join(',');
482
         let params = {
503
         let params = {
483
           ids:idss,
504
           ids:idss,
484
           admin_user_id:this.$store.getters.xt_user.user.id
505
           admin_user_id:this.$store.getters.xt_user.user.id
485
-        }
486
-      
487
-        var that = this
506
+        };
507
+
508
+        var that = this;
488
         axios.get('http://127.0.0.1:9532/sz/api/treatment/get',{ params: params }).then(function(response) {
509
         axios.get('http://127.0.0.1:9532/sz/api/treatment/get',{ params: params }).then(function(response) {
489
          if (response.data.state == 0) {
510
          if (response.data.state == 0) {
490
-               that.$message.error(response.data.data.msg)
511
+               that.$message.error(response.data.data.msg);
491
                return false
512
                return false
492
             } else {
513
             } else {
493
               if(response.data.data.msg == ""){
514
               if(response.data.data.msg == ""){
494
-                  that.$message.success("备案成功!")
515
+                  that.$message.success("备案成功!");
495
                   that.getlist()
516
                   that.getlist()
496
                }
517
                }
497
                if(response.data.data.msg!=""){
518
                if(response.data.data.msg!=""){
498
-                  that.$message.error(response.data.data.msg)
519
+                  that.$message.error(response.data.data.msg);
499
                   that.getlist()
520
                   that.getlist()
500
                }
521
                }
501
              }
522
              }
508
         var params = {
529
         var params = {
509
             limit:this.limit,
530
             limit:this.limit,
510
             page:this.page,
531
             page:this.page,
511
-        }
532
+        };
512
         getDePartmentList(params).then(response=>{
533
         getDePartmentList(params).then(response=>{
513
             if(response.data.state == 1){
534
             if(response.data.state == 1){
514
-            var department =   response.data.data.departMentList
515
-           
535
+            var department =   response.data.data.departMentList;
536
+
516
             this.departMentList = department
537
             this.departMentList = department
517
             }
538
             }
518
         })
539
         })
521
 
542
 
522
         if (header != undefined && header.length > 0) {
543
         if (header != undefined && header.length > 0) {
523
 
544
 
524
-          var isHasProjectName = header.includes('*项目名称')
545
+          var isHasProjectName = header.includes('*项目名称');
525
 
546
 
526
-          var isHasProjectPrice = header.includes('*零价')
547
+          var isHasProjectPrice = header.includes('*零价');
527
 
548
 
528
-          var isHasProjectUnit = header.includes('*单位')
549
+          var isHasProjectUnit = header.includes('*单位');
529
 
550
 
530
-          var isHasProjectCostClassify = header.includes('*费用类别')
551
+          var isHasProjectCostClassify = header.includes('*费用类别');
531
 
552
 
532
-          var isHasProjectExecutiveSection = header.includes('*执行科室')
553
+          var isHasProjectExecutiveSection = header.includes('*执行科室');
533
 
554
 
534
-          var isHasProjectMedicalCoverage = header.includes('*医保等级')
555
+          var isHasProjectMedicalCoverage = header.includes('*医保等级');
535
 
556
 
536
           if (!(isHasProjectName && isHasProjectPrice && isHasProjectUnit && isHasProjectCostClassify && isHasProjectExecutiveSection && isHasProjectMedicalCoverage )) {
557
           if (!(isHasProjectName && isHasProjectPrice && isHasProjectUnit && isHasProjectCostClassify && isHasProjectExecutiveSection && isHasProjectMedicalCoverage )) {
537
-            this.dialogVisible = true
558
+            this.dialogVisible = true;
538
             return
559
             return
539
           }
560
           }
540
         }else {
561
         }else {
541
-          this.dialogVisible = true
562
+          this.dialogVisible = true;
542
           return
563
           return
543
         }
564
         }
544
 
565
 
545
-       var tableData = []
566
+       var tableData = [];
546
        for(let i=1;i<results.length;i++){
567
        for(let i=1;i<results.length;i++){
547
-         let obj = {"cost_classify_id":0,"medical_insurance_level_id":0,"executive_section_id":0,"tube_color_id":0,"statistical_classification_id":0,"category":0,"specail_project":0,"medical_status":0}
568
+         let obj = {"cost_classify_id":0,"medical_insurance_level_id":0,"executive_section_id":0,"tube_color_id":0,"statistical_classification_id":0,"category":0,"specail_project":0,"medical_status":0};
548
          for (var key in results[i]) {
569
          for (var key in results[i]) {
549
            if (results[i]['*项目名称'] === undefined) {
570
            if (results[i]['*项目名称'] === undefined) {
550
                 obj['project_name'] = ''
571
                 obj['project_name'] = ''
738
               }
759
               }
739
           }
760
           }
740
          }
761
          }
741
-         tableData.push(obj)
742
-         
762
+         tableData.push(obj);
763
+
743
 
764
 
744
         for(let i=0;i<tableData.length;i++){
765
         for(let i=0;i<tableData.length;i++){
745
 
766
 
805
        }
826
        }
806
        let params = {
827
        let params = {
807
           'projects':tableData
828
           'projects':tableData
808
-        }
809
-       console.log("params222",params)
829
+        };
830
+       console.log("params222",params);
810
 
831
 
811
         postProjectInformation(params).then(response=>{
832
         postProjectInformation(params).then(response=>{
812
            if(response.data.state == 1){
833
            if(response.data.state == 1){
813
-             var msg =  response.data.data.msg
814
-             this.$message.success("导入成功!")
834
+             var msg =  response.data.data.msg;
835
+             this.$message.success("导入成功!");
815
              this.getlist()
836
              this.getlist()
816
            }else{
837
            }else{
817
              this.$message.error("导入失败")
838
              this.$message.error("导入失败")
819
         })
840
         })
820
       },
841
       },
821
       generateTxt: function(log) {
842
       generateTxt: function(log) {
822
-        var content = ''
823
-        var errlog = log.err_logs
824
-        content = this.getContent(log)
843
+        var content = '';
844
+        var errlog = log.err_logs;
845
+        content = this.getContent(log);
825
         for (let i = 0; i < errlog.length; i++) {
846
         for (let i = 0; i < errlog.length; i++) {
826
           if (content.length == 0) {
847
           if (content.length == 0) {
827
             content = errlog[i].err_msg
848
             content = errlog[i].err_msg
830
           }
851
           }
831
         }
852
         }
832
 
853
 
833
-        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
854
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' });
834
         if (typeof url === 'object' && url instanceof Blob) {
855
         if (typeof url === 'object' && url instanceof Blob) {
835
           url = URL.createObjectURL(url) // 创建blob地址
856
           url = URL.createObjectURL(url) // 创建blob地址
836
         }
857
         }
837
-        const aLink = document.createElement('a')
838
-        aLink.href = url
839
-        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
858
+        const aLink = document.createElement('a');
859
+        aLink.href = url;
860
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt';
840
         aLink.click()
861
         aLink.click()
841
 
862
 
842
       },
863
       },
843
       getContent(log) {
864
       getContent(log) {
844
-       
865
+
845
         return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
866
         return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
846
       },
867
       },
847
       timestampToTime(timestamp) {
868
       timestampToTime(timestamp) {
848
-        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
849
-        var Y = date.getFullYear() + '年'
850
-        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
851
-        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
852
-        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
853
-        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
854
-        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
869
+        var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
870
+        var Y = date.getFullYear() + '年';
871
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月';
872
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 ';
873
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时';
874
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分';
875
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒';
855
         return Y + M + D + h + m + s
876
         return Y + M + D + h + m + s
856
       },
877
       },
857
        generateLog() {
878
        generateLog() {
858
         let params = {
879
         let params = {
859
           'log_type': 6
880
           'log_type': 6
860
-        }
881
+        };
861
         generateLog(params).then(
882
         generateLog(params).then(
862
           response => {
883
           response => {
863
             if (response.data.state === 1) {
884
             if (response.data.state === 1) {
864
-              this.logs = response.data.data.logs
885
+              this.logs = response.data.data.logs;
865
               this.exportLogVisible = true
886
               this.exportLogVisible = true
866
             } else {
887
             } else {
867
               this.$message.error(response.data.msg)
888
               this.$message.error(response.data.msg)
874
       },
895
       },
875
     },
896
     },
876
     created(){
897
     created(){
877
-      this.getlist()
898
+      this.getlist();
878
       this.getDartmentList()
899
       this.getDartmentList()
879
 
900
 
880
     }
901
     }

+ 1 - 1
src/xt_pages/hospitalStation/components/deskPrescription.vue Прегледај датотеку

1941
             isLoading = true;
1941
             isLoading = true;
1942
             createHisPrescription(data, params).then(response => {
1942
             createHisPrescription(data, params).then(response => {
1943
               if (response.data.state == 1) {
1943
               if (response.data.state == 1) {
1944
-                this.$emit('change');
1944
+                this.$emit('change',this.patientInfo.id);
1945
                 this.$message.success('保存成功')
1945
                 this.$message.success('保存成功')
1946
               }
1946
               }
1947
             })
1947
             })

+ 40 - 10
src/xt_pages/hospitalStation/doctorDesk.vue Прегледај датотеку

197
         radio: 1,
197
         radio: 1,
198
         record_date: '',
198
         record_date: '',
199
         crumbs: [
199
         crumbs: [
200
-          {path: false, name: '门诊医生站'},
200
+          {path: false, name: '住院工作站'},
201
           {path: false, name: '医生工作台'}
201
           {path: false, name: '医生工作台'}
202
         ],
202
         ],
203
         titleType: '电子处方',
203
         titleType: '电子处方',
232
       }
232
       }
233
     },
233
     },
234
     methods: {
234
     methods: {
235
-      changeOther(){
235
+      changeOther(patient_id){
236
         this.radio = 2;
236
         this.radio = 2;
237
-        this.change()
237
+
238
+        let params = {
239
+          'record_date': this.record_date,
240
+          'type': this.radio
241
+        };
242
+        this.patientTableData = [];
243
+
244
+        getHospitalPatientList(params).then(response => {
245
+          if (response.data.state == 0) {
246
+            this.$message.error(response.data.msg);
247
+            return false
248
+          } else {
249
+            this.patientTableData = response.data.data.list;
250
+            this.patientTableDataTwo = response.data.data.list;
251
+            this.cal_one = response.data.data.total_one;
252
+            this.cal_two = response.data.data.total_two;
253
+            this.admin_info = response.data.data.info;
254
+            if (this.patientTableData.length > 0) {
255
+              for(let i = 0; i < this.patientTableData.length; i++){
256
+                if (this.patientTableData[i].id == patient_id){
257
+                  this.$refs.tab.setCurrentRow(this.patientTableData[i]);
258
+                  this.oldCurrentRow = this.patientTableData[i];
259
+                  this.getPatientInfo(this.patientTableData[i])
260
+                }
261
+              }
262
+            }
263
+            this.prescriptionList = response.data.data.list.prescription
264
+            // this.patientid = this.patientTableData[0].patient_id
265
+
266
+          }
267
+        })
268
+
238
 
269
 
239
       },
270
       },
240
       setData(val) {
271
       setData(val) {
293
       //   })
324
       //   })
294
       //
325
       //
295
       // },
326
       // },
296
-      change(patient_id) {
327
+
328
+      change() {
297
         let params = {
329
         let params = {
298
           'record_date': this.record_date,
330
           'record_date': this.record_date,
299
           'type': this.radio
331
           'type': this.radio
311
             this.cal_two = response.data.data.total_two;
343
             this.cal_two = response.data.data.total_two;
312
             this.admin_info = response.data.data.info;
344
             this.admin_info = response.data.data.info;
313
 
345
 
314
-
315
-
316
-
317
             if (this.patientTableData.length > 0) {
346
             if (this.patientTableData.length > 0) {
318
-              this.$refs.tab.setCurrentRow(this.patientTableData[0]);
319
-              this.oldCurrentRow = this.patientTableData[0];
320
 
347
 
321
-              this.getPatientInfo(this.patientTableData[0])
348
+                this.$refs.tab.setCurrentRow(this.patientTableData[0]);
349
+                this.oldCurrentRow = this.patientTableData[0];
350
+                this.getPatientInfo(this.patientTableData[0])
351
+
322
             }
352
             }
323
 
353
 
324
             this.prescriptionList = response.data.data.list.prescription
354
             this.prescriptionList = response.data.data.list.prescription

+ 8 - 1
src/xt_pages/hospitalStation/index.vue Прегледај датотеку

544
                 } else {
544
                 } else {
545
                   that.loadingone = false;
545
                   that.loadingone = false;
546
                   if (response.data.data.failed_code == -10) {
546
                   if (response.data.data.failed_code == -10) {
547
-                    that.$message.error(response.data.data.msg)
547
+                    // that.$message.error(response.data.data.msg)
548
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
549
+                      confirmButtonText: '确 定',
550
+                      type: 'warning'
551
+                    }).then(() => {
552
+
553
+                    }).catch(() => {
554
+                    })
548
                   } else {
555
                   } else {
549
                     that.$message({message: '登记成功', type: 'success'});
556
                     that.$message({message: '登记成功', type: 'success'});
550
                     that.form.name = '';
557
                     that.form.name = '';

+ 8 - 1
src/xt_pages/hospitalStation/newStatementPrint.vue Прегледај датотеку

175
                 that.charge_admin = response.data.data.charge_admin;
175
                 that.charge_admin = response.data.data.charge_admin;
176
 
176
 
177
 
177
 
178
-                console.log(that.info);
178
+                that.info['p_admin'] =  that.p_admin;
179
+                that.info['charge_admin'] =  that.charge_admin;
180
+
181
+                that.info['date'] =  response.data.data.date;
182
+                that.info['number'] =  response.data.data.number;
183
+                that.info['order_infos'] =  response.data.data.order_infos;
184
+                that.info['diagnosis'] =  response.data.data.diagnosis;
185
+
179
 
186
 
180
                 that.info['bed_cost_total'] = response.data.data.bedCostTotal;
187
                 that.info['bed_cost_total'] = response.data.data.bedCostTotal;
181
                 that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal;
188
                 that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal;

+ 8 - 1
src/xt_pages/hospitalStation/newStatementPrintTwo.vue Прегледај датотеку

97
                 return false
97
                 return false
98
               } else {
98
               } else {
99
                 if (response.data.data.failed_code == -10) {
99
                 if (response.data.data.failed_code == -10) {
100
-                  that.$message.error(response.data.data.msg)
100
+                  // that.$message.error(response.data.data.msg)
101
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
102
+                    confirmButtonText: '确 定',
103
+                    type: 'warning'
104
+                  }).then(() => {
105
+
106
+                  }).catch(() => {
107
+                  })
101
 
108
 
102
                 } else {
109
                 } else {
103
 
110
 

+ 309 - 34
src/xt_pages/hospitalStation/outpatientChargesManagement.vue Прегледај датотеку

426
         curMonthPrescriptions: null,
426
         curMonthPrescriptions: null,
427
         month_total: 0,
427
         month_total: 0,
428
         crumbs: [
428
         crumbs: [
429
-          { path: false, name: '门诊收费' },
430
-          { path: false, name: '门诊收费管理' }
429
+          { path: false, name: '住院工作站' },
430
+          { path: false, name: '住院收费管理' }
431
         ],
431
         ],
432
         current_index: 0,
432
         current_index: 0,
433
         cal_one: '',
433
         cal_one: '',
594
               } else {
594
               } else {
595
                 if (response.data.data.failed_code == -10) {
595
                 if (response.data.data.failed_code == -10) {
596
 
596
 
597
-                  that.$message.error(response.data.data.msg)
597
+                  // that.$message.error(response.data.data.msg)
598
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
599
+                    confirmButtonText: '确 定',
600
+                    type: 'warning'
601
+                  }).then(() => {
602
+
603
+                  }).catch(() => {
604
+                  })
598
 
605
 
599
                 } else {
606
                 } else {
600
-                  that.changeRadio(2);
607
+                  that.changeRadioAndPatient(2);
601
                   that.radio = 2;
608
                   that.radio = 2;
602
                   that.$refs.charge.hide();
609
                   that.$refs.charge.hide();
603
                   that.state = '已收费';
610
                   that.state = '已收费';
630
               } else {
637
               } else {
631
                 if (response.data.data.failed_code == -10) {
638
                 if (response.data.data.failed_code == -10) {
632
 
639
 
633
-                  that.$message.error(response.data.data.msg)
640
+                  // that.$message.error(response.data.data.msg)
641
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
642
+                    confirmButtonText: '确 定',
643
+                    type: 'warning'
644
+                  }).then(() => {
645
+
646
+                  }).catch(() => {
647
+                  })
634
 
648
 
635
                 } else {
649
                 } else {
636
-                  that.changeRadio(2);
650
+                  that.changeRadioAndPatient(2);
637
                   that.radio = 2;
651
                   that.radio = 2;
638
                   that.$refs.charge.hide();
652
                   that.$refs.charge.hide();
639
                   that.loadingtwo = false;
653
                   that.loadingtwo = false;
658
               return false
672
               return false
659
             } else {
673
             } else {
660
               this.$refs.charge.hide();
674
               this.$refs.charge.hide();
661
-              this.changeRadio(2);
675
+              this.changeRadioAndPatient(2);
662
               this.radio = 2;
676
               this.radio = 2;
663
 
677
 
664
               this.loadingtwo = false;
678
               this.loadingtwo = false;
697
                 return false
711
                 return false
698
               } else {
712
               } else {
699
                 if (response.data.data.failed_code == -10) {
713
                 if (response.data.data.failed_code == -10) {
700
-                  that.$message.error(response.data.data.msg);
714
+                  // that.$message.error(response.data.data.msg);
715
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
716
+                    confirmButtonText: '确 定',
717
+                    type: 'warning'
718
+                  }).then(() => {
719
+
720
+                  }).catch(() => {
721
+                  })
701
 
722
 
702
                 } else {
723
                 } else {
703
                   that.$refs.register9504.hide();
724
                   that.$refs.register9504.hide();
782
                 return false
803
                 return false
783
               } else {
804
               } else {
784
                 if (response.data.data.failed_code == -10) {
805
                 if (response.data.data.failed_code == -10) {
785
-                  that.$message.error(response.data.data.msg);
806
+                  // that.$message.error(response.data.data.msg);
807
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
808
+                    confirmButtonText: '确 定',
809
+                    type: 'warning'
810
+                  }).then(() => {
811
+
812
+                  }).catch(() => {
813
+                  })
786
 
814
 
787
                 } else {
815
                 } else {
788
                   that.$refs.register.hide();
816
                   that.$refs.register.hide();
855
                 return false
883
                 return false
856
               } else {
884
               } else {
857
                 if (response.data.data.failed_code == -10) {
885
                 if (response.data.data.failed_code == -10) {
858
-                  that.$message.error(response.data.data.msg);
886
+                  // that.$message.error(response.data.data.msg);
887
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
888
+                    confirmButtonText: '确 定',
889
+                    type: 'warning'
890
+                  }).then(() => {
891
+
892
+                  }).catch(() => {
893
+                  })
859
 
894
 
860
                 } else {
895
                 } else {
861
                   that.$refs.register.hide();
896
                   that.$refs.register.hide();
1417
                   return false
1452
                   return false
1418
                 } else {
1453
                 } else {
1419
                   if (response.data.data.failed_code == -10) {
1454
                   if (response.data.data.failed_code == -10) {
1420
-                    that.$message.error(response.data.data.msg)
1455
+                    // that.$message.error(response.data.data.msg)
1456
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
1457
+                      confirmButtonText: '确 定',
1458
+                      type: 'warning'
1459
+                    }).then(() => {
1460
+
1461
+                    }).catch(() => {
1462
+                    })
1421
                   } else {
1463
                   } else {
1422
                     that.$message.success("出院成功");
1464
                     that.$message.success("出院成功");
1423
-                    that.changeRadio(1);
1465
+                    that.changeRadioAndPatient(1);
1424
                   }
1466
                   }
1425
 
1467
 
1426
                 }
1468
                 }
1513
                     return false
1555
                     return false
1514
                   } else {
1556
                   } else {
1515
                     if (response.data.data.failed_code == -10) {
1557
                     if (response.data.data.failed_code == -10) {
1516
-                      that.$message.error(response.data.data.msg)
1558
+                      // that.$message.error(response.data.data.msg)
1559
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
1560
+                        confirmButtonText: '确 定',
1561
+                        type: 'warning'
1562
+                      }).then(() => {
1563
+
1564
+                      }).catch(() => {
1565
+                      })
1517
                     } else {
1566
                     } else {
1518
-                      that.changeRadio(1);
1567
+                      that.changeRadioAndPatient(1);
1519
                       that.$message({ message: '退费成功', type: 'success', duration: 5000 });
1568
                       that.$message({ message: '退费成功', type: 'success', duration: 5000 });
1520
                       that.loadingtwo = false
1569
                       that.loadingtwo = false
1521
                     }
1570
                     }
1551
                   return false
1600
                   return false
1552
                 } else {
1601
                 } else {
1553
                   this.radio = 1;
1602
                   this.radio = 1;
1554
-                  this.changeRadio(1);
1603
+                  this.changeRadioAndPatient(1);
1555
                   this.$message({ message: '退费成功', type: 'success' });
1604
                   this.$message({ message: '退费成功', type: 'success' });
1556
                   this.loadingtwo = false
1605
                   this.loadingtwo = false
1557
 
1606
 
1599
                   return false
1648
                   return false
1600
                 } else {
1649
                 } else {
1601
                   if (response.data.data.failed_code == -10) {
1650
                   if (response.data.data.failed_code == -10) {
1602
-                    that.$message.error(response.data.data.msg)
1651
+                    // that.$message.error(response.data.data.msg)
1652
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
1653
+                      confirmButtonText: '确 定',
1654
+                      type: 'warning'
1655
+                    }).then(() => {
1656
+
1657
+                    }).catch(() => {
1658
+                    })
1603
                   } else {
1659
                   } else {
1604
-                    that.changeRadio(1);
1660
+                    that.changeRadioAndPatient(1);
1605
 
1661
 
1606
                     that.$message({ message: '撤销出院成功', type: 'success', duration: 5000 })
1662
                     that.$message({ message: '撤销出院成功', type: 'success', duration: 5000 })
1607
                   }
1663
                   }
1642
                   return false
1698
                   return false
1643
                 } else {
1699
                 } else {
1644
                   if (response.data.data.failed_code == -10) {
1700
                   if (response.data.data.failed_code == -10) {
1645
-                    that.$message.error(response.data.data.msg)
1701
+                    // that.$message.error(response.data.data.msg)
1702
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
1703
+                      confirmButtonText: '确 定',
1704
+                      type: 'warning'
1705
+                    }).then(() => {
1706
+
1707
+                    }).catch(() => {
1708
+                    })
1646
                   } else {
1709
                   } else {
1647
-                    that.changeRadio(1);
1710
+                    that.changeRadioAndPatient(1);
1648
 
1711
 
1649
                     that.$message({ message: '撤销入院成功', type: 'success', duration: 5000 })
1712
                     that.$message({ message: '撤销入院成功', type: 'success', duration: 5000 })
1650
                   }
1713
                   }
1682
                   return false
1745
                   return false
1683
                 } else {
1746
                 } else {
1684
                   if (response.data.data.failed_code == -10) {
1747
                   if (response.data.data.failed_code == -10) {
1685
-                    that.$message.error(response.data.data.msg)
1748
+                    // that.$message.error(response.data.data.msg)
1749
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
1750
+                      confirmButtonText: '确 定',
1751
+                      type: 'warning'
1752
+                    }).then(() => {
1753
+
1754
+                    }).catch(() => {
1755
+                    })
1686
                   } else {
1756
                   } else {
1687
                     that.radio = 1;
1757
                     that.radio = 1;
1688
-                    that.changeRadio(1);
1758
+                    that.changeRadioAndPatient(1);
1689
                     that.$message({ message: '退号成功', type: 'success', duration: 5000 })
1759
                     that.$message({ message: '退号成功', type: 'success', duration: 5000 })
1690
                   }
1760
                   }
1691
 
1761
 
1977
                 return false
2047
                 return false
1978
               } else {
2048
               } else {
1979
                 if (response.data.data.failed_code == -10) {
2049
                 if (response.data.data.failed_code == -10) {
1980
-                  that.$message.error(response.data.data.msg)
2050
+                  // that.$message.error(response.data.data.msg)
2051
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
2052
+                    confirmButtonText: '确 定',
2053
+                    type: 'warning'
2054
+                  }).then(() => {
2055
+
2056
+                  }).catch(() => {
2057
+                  })
1981
                 } else {
2058
                 } else {
1982
                   that.$message.success("上传明细成功");
2059
                   that.$message.success("上传明细成功");
1983
-                  that.changeRadio(1);
2060
+                  that.changeRadioAndPatient(1);
1984
                 }
2061
                 }
1985
 
2062
 
1986
               }
2063
               }
2009
                   return false
2086
                   return false
2010
                 } else {
2087
                 } else {
2011
                   if (response.data.data.failed_code == -10) {
2088
                   if (response.data.data.failed_code == -10) {
2012
-                    that.$message.error(response.data.data.msg)
2089
+                    // that.$message.error(response.data.data.msg)
2090
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
2091
+                      confirmButtonText: '确 定',
2092
+                      type: 'warning'
2093
+                    }).then(() => {
2094
+
2095
+                    }).catch(() => {
2096
+                    })
2013
                   } else {
2097
                   } else {
2014
                     that.$message.success("撤销明细成功");
2098
                     that.$message.success("撤销明细成功");
2015
 
2099
 
2016
-                    that.changeRadio(1);
2100
+                    that.changeRadioAndPatient(1);
2017
                   }
2101
                   }
2018
 
2102
 
2019
                 }
2103
                 }
2030
         console.log(id);
2114
         console.log(id);
2031
         this.radioStatus = id;
2115
         this.radioStatus = id;
2032
         this.getPatientList()
2116
         this.getPatientList()
2117
+      },      changeRadioAndPatient(id) {
2118
+        // console.log(id)
2119
+        // this.radioStatus = id
2120
+        // this.getPatientList()
2121
+        let temp_id = id;
2122
+
2123
+        let params = {
2124
+          'record_date': this.record_date
2125
+        };
2126
+        GetHisHospitalChargePatientList(params).then(response => {
2127
+          if (response.data.state == 0) {
2128
+            this.$message.error(response.data.msg);
2129
+            return false
2130
+          } else {
2131
+            this.patientTableData = [];
2132
+            this.hisPatientDatas = [];
2133
+            this.all_table_data = [];
2134
+            let one_count = 0;
2135
+            let two_count = 0;
2136
+            let three_count = 0;
2137
+
2138
+            if (this.activeName == 'first') { //日结
2139
+
2140
+              for (let i = 0; i < response.data.data.list.length; i++) {
2141
+                this.all_table_data.push(response.data.data.list[i]);
2142
+                if (response.data.data.list[i].his_patient.order.order_status == 0 || response.data.data.list[i].his_patient.order.order_status == 1 || response.data.data.list[i].his_patient.order.order_status == 3) {
2143
+                  one_count = one_count + 1
2144
+                }
2145
+
2146
+                if (response.data.data.list[i].his_patient.order.order_status == 2) {
2147
+                  two_count = two_count + 1
2148
+                }
2149
+
2150
+                // if (response.data.data.list[i].order.order_status == 3) {
2151
+                //   three_count = three_count + 1
2152
+                // }
2153
+              }
2154
+
2155
+            } else { //月结
2156
+
2157
+              for (let i = 0; i < response.data.data.list_two.length; i++) {
2158
+                this.hisPatientDatas.push(response.data.data.list_two[i]);
2159
+                if (response.data.data.list_two[i].his_patient.order.order_status == 0 || response.data.data.list_two[i].his_patient.order.order_status == 1) {
2160
+                  one_count = one_count + 1
2161
+                }
2162
+
2163
+                if (response.data.data.list_two[i].his_patient.order.order_status == 2) {
2164
+                  two_count = two_count + 1
2165
+                }
2166
+
2167
+                if (response.data.data.list_two[i].his_patient.order.order_status == 3) {
2168
+                  three_count = three_count + 1
2169
+                }
2170
+              }
2171
+
2172
+            }
2173
+
2174
+            this.cal_one = one_count;
2175
+            this.cal_two = two_count;
2176
+            this.cal_three = three_count;
2177
+
2178
+            switch (temp_id) {
2179
+
2180
+              case 1:
2181
+                this.patientTableData = [];
2182
+                if (this.activeName == 'first') {
2183
+
2184
+                  for (let i = 0; i < this.all_table_data.length; i++) {
2185
+                    if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1) {
2186
+                      this.patientTableData.push(this.all_table_data[i])
2187
+                    }
2188
+
2189
+                  }
2190
+
2191
+                } else {
2192
+                  for (let i = 0; i < this.hisPatientDatas.length; i++) {
2193
+                    if (this.hisPatientDatas[i].his_patient.order.order_status == 0 || this.hisPatientDatas[i].his_patient.order.order_status == 1) {
2194
+                      this.patientTableData.push(this.hisPatientDatas[i])
2195
+                    }
2196
+
2197
+                  }
2198
+
2199
+                }
2200
+
2201
+                break;
2202
+              case 2:
2203
+                this.patientTableData = [];
2204
+                if (this.activeName == 'first') {
2205
+
2206
+                  for (let i = 0; i < this.all_table_data.length; i++) {
2207
+                    if (this.all_table_data[i].his_patient.order.order_status == 2) {
2208
+                      this.patientTableData.push(this.all_table_data[i])
2209
+                    }
2210
+
2211
+                  }
2212
+                } else {
2213
+                  for (let i = 0; i < this.hisPatientDatas.length; i++) {
2214
+                    if (this.hisPatientDatas[i].his_patient.order.order_status == 2) {
2215
+                      this.patientTableData.push(this.hisPatientDatas[i])
2216
+                    }
2217
+                  }
2218
+
2219
+                }
2220
+                break;
2221
+              case 3:
2222
+                this.patientTableData = [];
2223
+
2224
+                if (this.activeName == 'first') {
2225
+
2226
+                  for (let i = 0; i < this.all_table_data.length; i++) {
2227
+
2228
+                    if (this.all_table_data[i].his_patient.order.order_status == 3) {
2229
+                      this.patientTableData.push(this.all_table_data[i])
2230
+                    }
2231
+
2232
+                  }
2233
+                } else {
2234
+
2235
+                  for (let i = 0; i < this.hisPatientDatas.length; i++) {
2236
+
2237
+                    if (this.hisPatientDatas[i].his_patient.order.order_status == 3) {
2238
+                      this.patientTableData.push(this.hisPatientDatas[i])
2239
+                    }
2240
+
2241
+                  }
2242
+
2243
+                }
2244
+                break;
2245
+              case 4:
2246
+                this.patientTableData = [];
2247
+                if (this.activeName == 'first') {
2248
+
2249
+                  this.patientTableData = this.all_table_data
2250
+                } else {
2251
+
2252
+                  this.patientTableData = this.hisPatientDatas
2253
+                }
2254
+                break
2255
+
2256
+            }
2257
+
2258
+
2259
+            for(let i = 0; i < this.patientTableData.length; i++){
2260
+              if(this.patientInfo.id == this.patientTableData[i].id){
2261
+                this.current_index = i;
2262
+                this.$refs.tab.setCurrentRow(this.patientTableData[i]);
2263
+                this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].his_patient.order.number,this.patientTableData[i].his_patient.id)
2264
+
2265
+              }
2266
+            }
2267
+
2268
+          }
2269
+        })
2270
+
2033
       },
2271
       },
2272
+
2034
       changeRadio(id) {
2273
       changeRadio(id) {
2035
         // console.log(id)
2274
         // console.log(id)
2036
         // this.radioStatus = id
2275
         // this.radioStatus = id
2179
           }
2418
           }
2180
         })
2419
         })
2181
 
2420
 
2182
-      }, formatDecimal(num, decimal) {
2421
+      },
2422
+      formatDecimal(num, decimal) {
2183
         num = num.toString();
2423
         num = num.toString();
2184
         let index = num.indexOf('.');
2424
         let index = num.indexOf('.');
2185
         if (index !== -1) {
2425
         if (index !== -1) {
2656
                 } else {
2896
                 } else {
2657
 
2897
 
2658
                   if (response.data.data.failed_code == -10) {
2898
                   if (response.data.data.failed_code == -10) {
2659
-                    that.$message.error(response.data.data.msg)
2899
+                    // that.$message.error(response.data.data.msg)
2900
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
2901
+                      confirmButtonText: '确 定',
2902
+                      type: 'warning'
2903
+                    }).then(() => {
2904
+
2905
+                    }).catch(() => {
2906
+                    })
2660
 
2907
 
2661
                   } else {
2908
                   } else {
2662
-                    that.changeRadio(1);
2909
+                    that.changeRadioAndPatient(1);
2663
                     that.$message({ message: '预结算成功', type: 'success' })
2910
                     that.$message({ message: '预结算成功', type: 'success' })
2664
                   }
2911
                   }
2665
 
2912
 
2698
                     return false
2945
                     return false
2699
                   } else {
2946
                   } else {
2700
                     if (response.data.data.failed_code == -10) {
2947
                     if (response.data.data.failed_code == -10) {
2701
-                      that.$message.error(response.data.data.msg)
2948
+                      // that.$message.error(response.data.data.msg)
2949
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
2950
+                        confirmButtonText: '确 定',
2951
+                        type: 'warning'
2952
+                      }).then(() => {
2953
+
2954
+                      }).catch(() => {
2955
+                      })
2702
 
2956
 
2703
                     } else {
2957
                     } else {
2704
-                      that.changeRadio(1);
2958
+                      that.changeRadioAndPatient(1);
2705
                       that.$message({ message: '退费成功', type: 'success' })
2959
                       that.$message({ message: '退费成功', type: 'success' })
2706
                     }
2960
                     }
2707
                   }
2961
                   }
2727
                   return false
2981
                   return false
2728
                 } else {
2982
                 } else {
2729
                   if (response.data.data.failed_code == -10) {
2983
                   if (response.data.data.failed_code == -10) {
2730
-                    that.$message.error(response.data.data.msg)
2984
+                    // that.$message.error(response.data.data.msg)
2985
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
2986
+                      confirmButtonText: '确 定',
2987
+                      type: 'warning'
2988
+                    }).then(() => {
2989
+
2990
+                    }).catch(() => {
2991
+                    })
2731
                   } else {
2992
                   } else {
2732
                     that.$message({ message: '查询成功', type: 'success' })
2993
                     that.$message({ message: '查询成功', type: 'success' })
2733
                   }
2994
                   }
2754
                 } else {
3015
                 } else {
2755
                   if (response.data.data.failed_code == -10) {
3016
                   if (response.data.data.failed_code == -10) {
2756
 
3017
 
2757
-                    that.$message.error(response.data.data.msg)
3018
+                    // that.$message.error(response.data.data.msg)
3019
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
3020
+                      confirmButtonText: '确 定',
3021
+                      type: 'warning'
3022
+                    }).then(() => {
3023
+
3024
+                    }).catch(() => {
3025
+                    })
2758
 
3026
 
2759
                   } else {
3027
                   } else {
2760
 
3028
 
2801
                     return false
3069
                     return false
2802
                   } else {
3070
                   } else {
2803
                     if (response.data.data.failed_code == -10) {
3071
                     if (response.data.data.failed_code == -10) {
2804
-                      that.$message.error(response.data.data.msg)
3072
+                      // that.$message.error(response.data.data.msg)
3073
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
3074
+                        confirmButtonText: '确 定',
3075
+                        type: 'warning'
3076
+                      }).then(() => {
3077
+
3078
+                      }).catch(() => {
3079
+                      })
2805
 
3080
 
2806
                     } else {
3081
                     } else {
2807
-                      that.changeRadio(1);
3082
+                      that.changeRadioAndPatient(1);
2808
                       that.$message({ message: '退号成功', type: 'success' })
3083
                       that.$message({ message: '退号成功', type: 'success' })
2809
                     }
3084
                     }
2810
                   }
3085
                   }

+ 188 - 0
src/xt_pages/hospitalStation/pastInquiries.vue Прегледај датотеку

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div class="cell clearfix">
8
+        <el-input size="small" style="width:150px;" v-model="keywords"
9
+                  class="filter-item"/>
10
+        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
11
+        </el-button>
12
+        <el-date-picker v-model="record_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
13
+                        :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
14
+                        format="yyyy-MM-dd"
15
+                        value-format="yyyy-MM-dd"
16
+                        placeholder="选择日期时间" align="right"></el-date-picker>
17
+      </div>
18
+      <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }"
19
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
20
+        <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
21
+        <el-table-column align="center" prop="name" label="姓名" width="100">
22
+          <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
23
+        </el-table-column>
24
+        <el-table-column align="center" prop="name" label="处方日期" width="200">
25
+          <template slot-scope="scope"> {{scope.row.info?getTimes(scope.row.info.ctime):''}}</template>
26
+
27
+        </el-table-column>
28
+        <!--<el-table-column align="center" prop="name" label="患者类型">-->
29
+          <!--<template slot-scope="scope">{{}}</template>-->
30
+        <!--</el-table-column>-->
31
+        <el-table-column align="center" prop="name" label="处方号">
32
+          <template slot-scope="scope">{{scope.row.info?scope.row.info.prescription_number:''}}</template>
33
+        </el-table-column>
34
+        <el-table-column align="center" prop="name" label="开立医生">
35
+          <template slot-scope="scope">{{scope.row.info?scope.row.info.doctor:''}}</template>
36
+        </el-table-column>
37
+        <el-table-column align="center" prop="name" label="诊断">
38
+          <template slot-scope="scope">{{getDiagnosis(scope.row.info.diagnosis)}}</template>
39
+        </el-table-column>
40
+        <el-table-column align="center" prop="name" label="状态" width="100">
41
+          <template slot-scope="scope">
42
+            <div v-if=" scope.row.info && scope.row.info.id > 0">已就诊</div>
43
+            <div v-else>未就诊</div>
44
+          </template>
45
+        </el-table-column>
46
+        <el-table-column align="center" prop="name" label="操作" width="100">
47
+          <template slot-scope="scope">
48
+            <el-button size="mini" type="primary" @click="handerShowDetail(scope.row)">详情</el-button>
49
+          </template>
50
+        </el-table-column>
51
+      </el-table>
52
+      <el-pagination
53
+        @size-change="handleSizeChange"
54
+        @current-change="handleCurrentChange"
55
+        :page-sizes="[10, 50, 100]"
56
+        :page-size="10"
57
+        background
58
+        style="margin-top:20px;float: right"
59
+        layout="total, sizes, prev, pager, next, jumper"
60
+        :total="total"
61
+
62
+      >
63
+      </el-pagination>
64
+      <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
65
+    </div>
66
+  </div>
67
+</template>
68
+
69
+<script>
70
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
71
+  import inquiriesDetail from './components/inquiriesDetail'
72
+  import { getHisHospitalPrescriptionList } from '@/api/his/his'
73
+  import { uParseTime } from '@/utils/tools'
74
+  import { getInitData} from '@/api/his/his'
75
+  export default {
76
+    components: {
77
+      BreadCrumb,
78
+      inquiriesDetail
79
+    },
80
+    data() {
81
+      return {
82
+        keywords:"",
83
+        total:0,
84
+        record_date:"",
85
+        page:1,
86
+        limit:10,
87
+        crumbs: [
88
+          { path: false, name: '住院工作站' },
89
+          { path: false, name: '既往查询' }
90
+        ],
91
+        tableData: [],
92
+        diagnoses:[]
93
+      }
94
+    },
95
+    methods: {
96
+      searchAction(){
97
+        this.page = 1;
98
+        this.limit = 10;
99
+        this.getHisPrescriptionList()
100
+
101
+      },
102
+      handleScheduleDateChange(){
103
+        this.page = 1;
104
+        this.limit = 10;
105
+        this.getHisPrescriptionList()
106
+
107
+      },
108
+      handleCurrentChange(page) {
109
+        this.page = page;
110
+        this.getHisPrescriptionList()
111
+
112
+      },
113
+
114
+      handleSizeChange(limit) {
115
+        this.limit = limit;
116
+        this.getHisPrescriptionList()
117
+
118
+
119
+      },
120
+      getTimes(time) {
121
+        return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
122
+      },
123
+      handerShowDetail(row) {
124
+        if(row.info.id == 0){
125
+          this.$message.error("未就诊");
126
+          return
127
+        }
128
+        this.$refs.inquiriesDetail.show(row.info.id)
129
+      }, getHisPrescriptionList() {
130
+        let params = {
131
+          record_date:this.record_date,
132
+          page: this.page,
133
+          limit: this.limit,
134
+          keywords: this.keywords,
135
+        };
136
+        getHisPrescriptionList(params).then(response => {
137
+          if (response.data.state == 0) {
138
+            this.$message.error(response.data.msg);
139
+            return false
140
+          } else {
141
+            this.tableData = response.data.data.order;
142
+            this.total = response.data.data.total;
143
+            this.$nextTick(() => {
144
+              this.$refs.table.doLayout(); //解决表格错位
145
+            });
146
+          }
147
+        })
148
+
149
+      },
150
+       getInitData() {
151
+        getInitData().then(response => {
152
+          if (response.data.state == 0) {
153
+            this.$message.error(response.data.msg);
154
+            return false
155
+          } else {
156
+            this.diagnoses = response.data.data.diagnose;
157
+            console.log("诊断列表",this.diagnoses)
158
+          }
159
+        })
160
+      },
161
+      getDiagnosis(id){
162
+        var name = "";
163
+        for(let i=0;i<this.diagnoses.length;i++){
164
+           if(id == this.diagnoses[i].id){
165
+              name = this.diagnoses[i].class_name
166
+           }
167
+        }
168
+        return name
169
+      }
170
+    }, created() {
171
+      var nowDate = new Date();
172
+      var nowYear = nowDate.getFullYear();
173
+      var nowMonth = nowDate.getMonth() + 1;
174
+      var nowDay = nowDate.getDate();
175
+      this.record_date =
176
+        nowYear +
177
+        '-' +
178
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
179
+        '-' +
180
+        (nowDay < 10 ? '0' + nowDay : nowDay);
181
+
182
+
183
+      this.getHisPrescriptionList();
184
+      this.getInitData()
185
+
186
+    }
187
+  }
188
+</script>

+ 21 - 7
src/xt_pages/hospitalStation/statementTemplate/printOne.vue Прегледај датотеку

83
       </tr>
83
       </tr>
84
       <tr>
84
       <tr>
85
         <td>住院号</td>
85
         <td>住院号</td>
86
-        <td></td>
86
+        <td>{{info.number}}</td>
87
         <td>科别</td>
87
         <td>科别</td>
88
         <td width="100"></td>
88
         <td width="100"></td>
89
         <td>床号</td>
89
         <td>床号</td>
90
         <td></td>
90
         <td></td>
91
         <td>入院日期</td>
91
         <td>入院日期</td>
92
-        <td></td>
92
+        <td>{{info.begndate}}</td>
93
         <td>出院日期</td>
93
         <td>出院日期</td>
94
-        <td width="100"></td>
94
+        <td width="100">{{info.enddate}}</td>
95
         <td>住院天数</td>
95
         <td>住院天数</td>
96
-        <td></td>
96
+        <td>{{getDay(info.begndate,info.enddate)}}</td>
97
+
97
       </tr>
98
       </tr>
98
       <tr>
99
       <tr>
99
         <td>险种</td>
100
         <td>险种</td>
278
       </tr>
279
       </tr>
279
       <tr>
280
       <tr>
280
         <td>收款人:</td>
281
         <td>收款人:</td>
281
-        <td colspan="2">{{charge_admin.user_name}}</td>
282
+        <td colspan="2">{{info.charge_admin.user_name}}</td>
282
         <td>审核人:</td>
283
         <td>审核人:</td>
283
-        <td colspan="2"></td>
284
+        <td colspan="2">{{info.p_admin.user_name}}</td>
284
         <td>制单人:</td>
285
         <td>制单人:</td>
285
-        <td colspan="2">{{p_admin.user_name}}</td>
286
+        <td colspan="2">{{info.p_admin.user_name}}</td>
286
         <td>打印日期</td>
287
         <td>打印日期</td>
287
         <td colspan="2">{{getNowTime()}}</td>
288
         <td colspan="2">{{getNowTime()}}</td>
288
       </tr>
289
       </tr>
321
         }
322
         }
322
       }
323
       }
323
     },methods:{
324
     },methods:{
325
+      getDay(dateString1,dateString2){
326
+          var  startDate = Date.parse(dateString1);
327
+          var  endDate = Date.parse(dateString2);
328
+          if (startDate>endDate){
329
+            return 0;
330
+          }
331
+          if (startDate==endDate){
332
+            return 1;
333
+          }
334
+          var days=(endDate - startDate)/(1*24*60*60*1000);
335
+          return  days;
336
+
337
+        },
324
       getNowTime: function () {
338
       getNowTime: function () {
325
         let dateTime;
339
         let dateTime;
326
         let yy = new Date().getFullYear();
340
         let yy = new Date().getFullYear();

+ 16 - 2
src/xt_pages/hospitalStation/summary.vue Прегледај датотеку

250
             } else {
250
             } else {
251
 
251
 
252
               if (response.data.data.failed_code == -10) {
252
               if (response.data.data.failed_code == -10) {
253
-                that.$message.error(response.data.data.msg)
253
+                // that.$message.error(response.data.data.msg)
254
+                that.$confirm(response.data.data.msg, '医保错误信息', {
255
+                  confirmButtonText: '确 定',
256
+                  type: 'warning'
257
+                }).then(() => {
258
+
259
+                }).catch(() => {
260
+                })
254
 
261
 
255
               } else {
262
               } else {
256
                 that.$message.success("上传成功");
263
                 that.$message.success("上传成功");
300
                   return false
307
                   return false
301
                 } else {
308
                 } else {
302
                   if (response.data.data.failed_code == -10) {
309
                   if (response.data.data.failed_code == -10) {
303
-                    that.$message.error(response.data.data.msg)
310
+                    // that.$message.error(response.data.data.msg)
311
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
312
+                      confirmButtonText: '确 定',
313
+                      type: 'warning'
314
+                    }).then(() => {
315
+
316
+                    }).catch(() => {
317
+                    })
304
                   } else {
318
                   } else {
305
                     that.$message({message: '退费成功', type: 'success', duration: 5000});
319
                     that.$message({message: '退费成功', type: 'success', duration: 5000});
306
                     that.getHisOrderList()
320
                     that.getHisOrderList()

+ 7 - 1
src/xt_pages/hospitalStation/treatTemplate/printOne.vue Прегледај датотеку

364
               return false
364
               return false
365
             } else {
365
             } else {
366
               if (response.data.data.failed_code == -10) {
366
               if (response.data.data.failed_code == -10) {
367
-                that.$message.error(response.data.data.msg)
367
+                that.$confirm(response.data.data.msg, '医保错误信息', {
368
+                  confirmButtonText: '确 定',
369
+                  type: 'warning'
370
+                }).then(() => {
371
+
372
+                }).catch(() => {
373
+                })
368
               } else {
374
               } else {
369
                 that.result = response.data.data.result;
375
                 that.result = response.data.data.result;
370
 
376
 

+ 41 - 34
src/xt_pages/outpatientCharges/newStatementPrintTwo.vue Прегледај датотеку

87
       },
87
       },
88
       getInfo(obj) {
88
       getInfo(obj) {
89
         if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
89
         if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
90
-          var that = this
90
+          var that = this;
91
           axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
91
           axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
92
             params: obj
92
             params: obj
93
           })
93
           })
94
             .then(function (response) {
94
             .then(function (response) {
95
               if (response.data.state == 0) {
95
               if (response.data.state == 0) {
96
-                this.$message.error(response.data.msg)
96
+                this.$message.error(response.data.msg);
97
                 return false
97
                 return false
98
               } else {
98
               } else {
99
                 if (response.data.data.failed_code == -10) {
99
                 if (response.data.data.failed_code == -10) {
100
-                  that.$message.error(response.data.data.msg)
100
+                  // that.$message.error(response.data.data.msg)
101
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
102
+                    confirmButtonText: '确 定',
103
+                    type: 'warning'
104
+                  }).then(() => {
105
+
106
+                  }).catch(() => {
107
+                  })
101
 
108
 
102
                 } else {
109
                 } else {
103
 
110
 
104
-                  console.log("~~~~")
105
-                  that.info = response.data.data.result
106
-                  console.log(that.info)
111
+                  console.log("~~~~");
112
+                  that.info = response.data.data.result;
113
+                  console.log(that.info);
107
 
114
 
108
-                  that.info['org_code'] = response.data.data.org_code
109
-                  that.info['patient_name'] = response.data.data.patient_name
110
-                  that.info['doctor_code'] = response.data.data.doctor_code
111
-                  that.info['doctor_name'] = response.data.data.doctor_name
115
+                  that.info['org_code'] = response.data.data.org_code;
116
+                  that.info['patient_name'] = response.data.data.patient_name;
117
+                  that.info['doctor_code'] = response.data.data.doctor_code;
118
+                  that.info['doctor_name'] = response.data.data.doctor_name;
112
                   if(response.data.data.health_card_no_two.length == 0){
119
                   if(response.data.data.health_card_no_two.length == 0){
113
                     that.info['health_card_no'] = response.data.data.health_card_no
120
                     that.info['health_card_no'] = response.data.data.health_card_no
114
                   }else{
121
                   }else{
115
                     that.info['health_card_no'] = response.data.data.health_card_no_two
122
                     that.info['health_card_no'] = response.data.data.health_card_no_two
116
                   }
123
                   }
117
 
124
 
118
-                  that.info['order_number'] = response.data.data.order_number
125
+                  that.info['order_number'] = response.data.data.order_number;
119
 
126
 
120
-                  that.info['department'] =  response.data.data.department
121
-                  that.info['yiliao_leibie'] =  response.data.data.yiliao_leibie
127
+                  that.info['department'] =  response.data.data.department;
128
+                  that.info['yiliao_leibie'] =  response.data.data.yiliao_leibie;
122
 
129
 
123
-                  that.info['before_money'] =  response.data.data.before_money
124
-                  that.info['after_money'] =   response.data.data.after_money
130
+                  that.info['before_money'] =  response.data.data.before_money;
131
+                  that.info['after_money'] =   response.data.data.after_money;
125
 
132
 
126
-                  that.info['org_name'] = that.$store.getters.xt_user.org.org_name
127
-                  console.log("~~~~" + that.info)
133
+                  that.info['org_name'] = that.$store.getters.xt_user.org.org_name;
134
+                  console.log("~~~~" + that.info);
128
 
135
 
129
-                  var name_arr = []
130
-                  var spec_arr = []
131
-                  var count_arr = []
132
-                  var price_arr = []
133
-                  var total_arr = []
136
+                  var name_arr = [];
137
+                  var spec_arr = [];
138
+                  var count_arr = [];
139
+                  var price_arr = [];
140
+                  var total_arr = [];
134
                   for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
141
                   for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
135
-                    name_arr.push(that.info.transBody.outputlist1[i].ake006)
136
-                    spec_arr.push(that.info.transBody.outputlist1[i].aka074)
137
-                    count_arr.push(that.info.transBody.outputlist1[i].akc226)
138
-                    price_arr.push(that.info.transBody.outputlist1[i].akc225)
142
+                    name_arr.push(that.info.transBody.outputlist1[i].ake006);
143
+                    spec_arr.push(that.info.transBody.outputlist1[i].aka074);
144
+                    count_arr.push(that.info.transBody.outputlist1[i].akc226);
145
+                    price_arr.push(that.info.transBody.outputlist1[i].akc225);
139
                     total_arr.push(that.info.transBody.outputlist1[i].akc264)
146
                     total_arr.push(that.info.transBody.outputlist1[i].akc264)
140
                   }
147
                   }
141
 
148
 
142
-                  console.log("~~~" + that.info)
149
+                  console.log("~~~" + that.info);
143
 
150
 
144
-                  that.info['name_arr'] = name_arr
145
-                  that.info['spec_arr'] = spec_arr
146
-                  that.info['count_arr'] = count_arr
147
-                  that.info['price_arr'] = price_arr
148
-                  that.info['total_arr'] = total_arr
149
-                  that.info['record_date'] = obj.record_time
151
+                  that.info['name_arr'] = name_arr;
152
+                  that.info['spec_arr'] = spec_arr;
153
+                  that.info['count_arr'] = count_arr;
154
+                  that.info['price_arr'] = price_arr;
155
+                  that.info['total_arr'] = total_arr;
156
+                  that.info['record_date'] = obj.record_time;
150
 
157
 
151
                   console.log("~~" + that.info)
158
                   console.log("~~" + that.info)
152
 
159
 
167
     watch:{
174
     watch:{
168
       paramsObj:{//深度监听,可监听到对象、数组的变化
175
       paramsObj:{//深度监听,可监听到对象、数组的变化
169
         handler(val, oldVal){
176
         handler(val, oldVal){
170
-          this.paramsObj = val
177
+          this.paramsObj = val;
171
           this.getInfo(this.paramsObj)
178
           this.getInfo(this.paramsObj)
172
 
179
 
173
         },
180
         },

+ 268 - 26
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Прегледај датотеку

628
               } else {
628
               } else {
629
                 if (response.data.data.failed_code == -10) {
629
                 if (response.data.data.failed_code == -10) {
630
 
630
 
631
-                  that.$message.error(response.data.data.msg)
631
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
632
+                    confirmButtonText: '确 定',
633
+                    type: 'warning'
634
+                  }).then(() => {
635
+
636
+                  }).catch(() => {
637
+                  })
638
+
632
 
639
 
633
                 } else {
640
                 } else {
634
-                  that.changeRadio(2);
641
+                  that.changeRadioAndPatient(2);
635
                   that.radio = 2;
642
                   that.radio = 2;
636
                   that.$refs.charge.hide();
643
                   that.$refs.charge.hide();
637
                   that.state = '已收费';
644
                   that.state = '已收费';
663
                 return false
670
                 return false
664
               } else {
671
               } else {
665
                 if (response.data.data.failed_code == -10) {
672
                 if (response.data.data.failed_code == -10) {
673
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
674
+                    confirmButtonText: '确 定',
675
+                    type: 'warning'
676
+                  }).then(() => {
677
+
678
+                  }).catch(() => {
679
+                  })
666
 
680
 
667
-                  that.$message.error(response.data.data.msg)
668
 
681
 
669
                 } else {
682
                 } else {
670
-                  that.changeRadio(2);
683
+                  that.changeRadioAndPatient(2);
671
                   that.radio = 2;
684
                   that.radio = 2;
672
-
673
                   that.$refs.charge.hide();
685
                   that.$refs.charge.hide();
674
                   that.loadingtwo = false;
686
                   that.loadingtwo = false;
675
                   that.state = '已收费';
687
                   that.state = '已收费';
678
                   that.cal_one = this.cal_one - 1;
690
                   that.cal_one = this.cal_one - 1;
679
                   that.cal_two = this.cal_two + 1;
691
                   that.cal_two = this.cal_two + 1;
680
                   that.patientTableData.splice(this.current_index, 1)
692
                   that.patientTableData.splice(this.current_index, 1)
693
+
694
+
681
                 }
695
                 }
682
               }
696
               }
683
             })
697
             })
693
               return false
707
               return false
694
             } else {
708
             } else {
695
               this.$refs.charge.hide();
709
               this.$refs.charge.hide();
696
-              this.changeRadio(2);
710
+              this.changeRadioAndPatient(2);
697
               this.radio = 2;
711
               this.radio = 2;
698
 
712
 
699
               this.loadingtwo = false;
713
               this.loadingtwo = false;
732
                 return false
746
                 return false
733
               } else {
747
               } else {
734
                 if (response.data.data.failed_code == -10) {
748
                 if (response.data.data.failed_code == -10) {
735
-                  that.$message.error(response.data.data.msg);
749
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
750
+                    confirmButtonText: '确 定',
751
+                    type: 'warning'
752
+                  }).then(() => {
753
+
754
+                  }).catch(() => {
755
+                  })
756
+
736
 
757
 
737
                 } else {
758
                 } else {
738
                   that.$refs.register9504.hide();
759
                   that.$refs.register9504.hide();
817
                 return false
838
                 return false
818
               } else {
839
               } else {
819
                 if (response.data.data.failed_code == -10) {
840
                 if (response.data.data.failed_code == -10) {
820
-                  that.$message.error(response.data.data.msg);
841
+                  // that.$message.error(response.data.data.msg);
842
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
843
+                    confirmButtonText: '确 定',
844
+                    type: 'warning'
845
+                  }).then(() => {
846
+
847
+                  }).catch(() => {
848
+                  })
821
 
849
 
822
                 } else {
850
                 } else {
823
                   that.$refs.register.hide();
851
                   that.$refs.register.hide();
890
                 return false
918
                 return false
891
               } else {
919
               } else {
892
                 if (response.data.data.failed_code == -10) {
920
                 if (response.data.data.failed_code == -10) {
893
-                  that.$message.error(response.data.data.msg);
921
+                  // that.$message.error(response.data.data.msg);
922
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
923
+                    confirmButtonText: '确 定',
924
+                    type: 'warning'
925
+                  }).then(() => {
926
+
927
+                  }).catch(() => {
928
+                  })
894
 
929
 
895
                 } else {
930
                 } else {
896
                   that.$refs.register.hide();
931
                   that.$refs.register.hide();
1527
                     return false
1562
                     return false
1528
                   } else {
1563
                   } else {
1529
                     if (response.data.data.failed_code == -10) {
1564
                     if (response.data.data.failed_code == -10) {
1530
-                      that.$message.error(response.data.data.msg)
1565
+                      // that.$message.error(response.data.data.msg)
1566
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
1567
+                        confirmButtonText: '确 定',
1568
+                        type: 'warning'
1569
+                      }).then(() => {
1570
+
1571
+                      }).catch(() => {
1572
+                      })
1573
+
1531
                     } else {
1574
                     } else {
1532
-                      that.changeRadio(1);
1575
+                      that.changeRadioAndPatient(1);
1533
                       that.$message({ message: '退费成功', type: 'success', duration: 5000 });
1576
                       that.$message({ message: '退费成功', type: 'success', duration: 5000 });
1534
                       that.loadingtwo = false
1577
                       that.loadingtwo = false
1535
                     }
1578
                     }
1565
                   return false
1608
                   return false
1566
                 } else {
1609
                 } else {
1567
                   this.radio = 1;
1610
                   this.radio = 1;
1568
-                  this.changeRadio(1);
1611
+                  this.changeRadioAndPatient(1);
1569
                   this.$message({ message: '退费成功', type: 'success' });
1612
                   this.$message({ message: '退费成功', type: 'success' });
1570
                   this.loadingtwo = false
1613
                   this.loadingtwo = false
1571
 
1614
 
1670
                   return false
1713
                   return false
1671
                 } else {
1714
                 } else {
1672
                   if (response.data.data.failed_code == -10) {
1715
                   if (response.data.data.failed_code == -10) {
1673
-                    that.$message.error(response.data.data.msg)
1716
+                    // that.$message.error(response.data.data.msg)
1717
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
1718
+                      confirmButtonText: '确 定',
1719
+                      type: 'warning'
1720
+                    }).then(() => {
1721
+
1722
+                    }).catch(() => {
1723
+                    })
1724
+
1674
                   } else {
1725
                   } else {
1675
                     that.radio = 1;
1726
                     that.radio = 1;
1676
-                    that.changeRadio(1);
1727
+                    that.changeRadioAndPatient(1);
1677
                     that.$message({ message: '退号成功', type: 'success', duration: 5000 })
1728
                     that.$message({ message: '退号成功', type: 'success', duration: 5000 })
1678
                   }
1729
                   }
1679
 
1730
 
1945
         console.log(id);
1996
         console.log(id);
1946
         this.radioStatus = id;
1997
         this.radioStatus = id;
1947
         this.getPatientList()
1998
         this.getPatientList()
1999
+      },      changeRadioAndPatient(id) {
2000
+        // console.log(id)
2001
+        // this.radioStatus = id
2002
+        // this.getPatientList()
2003
+        let temp_id = id;
2004
+
2005
+        let params = {
2006
+          'record_date': this.record_date
2007
+        };
2008
+        getChargeHisPatientList(params).then(response => {
2009
+          if (response.data.state == 0) {
2010
+            this.$message.error(response.data.msg);
2011
+            return false
2012
+          } else {
2013
+            this.patientTableData = [];
2014
+            this.hisPatientDatas = [];
2015
+            this.all_table_data = [];
2016
+            let one_count = 0;
2017
+            let two_count = 0;
2018
+            let three_count = 0;
2019
+
2020
+            if (this.activeName == 'first') { //日结
2021
+
2022
+              for (let i = 0; i < response.data.data.list.length; i++) {
2023
+                this.all_table_data.push(response.data.data.list[i]);
2024
+                if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
2025
+                  one_count = one_count + 1
2026
+                }
2027
+
2028
+                if (response.data.data.list[i].order.order_status == 2) {
2029
+                  two_count = two_count + 1
2030
+                }
2031
+
2032
+                // if (response.data.data.list[i].order.order_status == 3) {
2033
+                //   three_count = three_count + 1
2034
+                // }
2035
+              }
2036
+
2037
+            } else { //月结
2038
+
2039
+              for (let i = 0; i < response.data.data.list_two.length; i++) {
2040
+                this.hisPatientDatas.push(response.data.data.list_two[i]);
2041
+                if (response.data.data.list_two[i].order.order_status == 0 || response.data.data.list_two[i].order.order_status == 1) {
2042
+                  one_count = one_count + 1
2043
+                }
2044
+
2045
+                if (response.data.data.list_two[i].order.order_status == 2) {
2046
+                  two_count = two_count + 1
2047
+                }
2048
+
2049
+                if (response.data.data.list_two[i].order.order_status == 3) {
2050
+                  three_count = three_count + 1
2051
+                }
2052
+              }
2053
+
2054
+            }
2055
+
2056
+            this.cal_one = one_count;
2057
+            this.cal_two = two_count;
2058
+            this.cal_three = three_count;
2059
+
2060
+            switch (temp_id) {
2061
+
2062
+              case 1:
2063
+                this.patientTableData = [];
2064
+                if (this.activeName == 'first') {
2065
+
2066
+                  for (let i = 0; i < this.all_table_data.length; i++) {
2067
+                    if ((this.all_table_data[i].order && this.all_table_data[i].order.order_status == 0) || (this.all_table_data[i].order && this.all_table_data[i].order.order_status == 1)) {
2068
+                      this.patientTableData.push(this.all_table_data[i])
2069
+                    }
2070
+
2071
+                  }
2072
+
2073
+                } else {
2074
+                  for (let i = 0; i < this.hisPatientDatas.length; i++) {
2075
+                    if (this.hisPatientDatas[i].order.order_status == 0 || this.hisPatientDatas[i].order.order_status == 1) {
2076
+                      this.patientTableData.push(this.hisPatientDatas[i])
2077
+                    }
2078
+
2079
+                  }
2080
+
2081
+                }
2082
+
2083
+                break;
2084
+              case 2:
2085
+                this.patientTableData = [];
2086
+                if (this.activeName == 'first') {
2087
+
2088
+                  for (let i = 0; i < this.all_table_data.length; i++) {
2089
+                    if (this.all_table_data[i].order.order_status == 2) {
2090
+                      this.patientTableData.push(this.all_table_data[i])
2091
+                    }
2092
+
2093
+                  }
2094
+                } else {
2095
+                  for (let i = 0; i < this.hisPatientDatas.length; i++) {
2096
+                    if (this.hisPatientDatas[i].order.order_status == 2) {
2097
+                      this.patientTableData.push(this.hisPatientDatas[i])
2098
+                    }
2099
+                  }
2100
+
2101
+                }
2102
+                break;
2103
+              case 3:
2104
+                this.patientTableData = [];
2105
+
2106
+                if (this.activeName == 'first') {
2107
+
2108
+                  for (let i = 0; i < this.all_table_data.length; i++) {
2109
+
2110
+                    if (this.all_table_data[i].order.order_status == 3) {
2111
+                      this.patientTableData.push(this.all_table_data[i])
2112
+                    }
2113
+
2114
+                  }
2115
+                } else {
2116
+
2117
+                  for (let i = 0; i < this.hisPatientDatas.length; i++) {
2118
+
2119
+                    if (this.hisPatientDatas[i].order.order_status == 3) {
2120
+                      this.patientTableData.push(this.hisPatientDatas[i])
2121
+                    }
2122
+
2123
+                  }
2124
+
2125
+                }
2126
+                break;
2127
+              case 4:
2128
+                this.patientTableData = [];
2129
+                if (this.activeName == 'first') {
2130
+
2131
+                  this.patientTableData = this.all_table_data
2132
+                } else {
2133
+
2134
+                  this.patientTableData = this.hisPatientDatas
2135
+                }
2136
+                break
2137
+
2138
+            }
2139
+
2140
+            this.current_index = 0;
2141
+
2142
+            for (let i = 0; i < this.patientTableData.length; i++){
2143
+              if(this.patientInfo.id == this.patientTableData[i].id)
2144
+              this.$refs.tab.setCurrentRow(this.patientTableData[i]);
2145
+              this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number)
2146
+            }
2147
+
2148
+          }
2149
+        })
2150
+
1948
       },
2151
       },
2152
+
1949
       changeRadio(id) {
2153
       changeRadio(id) {
1950
         // console.log(id)
2154
         // console.log(id)
1951
         // this.radioStatus = id
2155
         // this.radioStatus = id
2014
                 if (this.activeName == 'first') {
2218
                 if (this.activeName == 'first') {
2015
 
2219
 
2016
                   for (let i = 0; i < this.all_table_data.length; i++) {
2220
                   for (let i = 0; i < this.all_table_data.length; i++) {
2017
-                    if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
2221
+                    if ((this.all_table_data[i].order && this.all_table_data[i].order.order_status == 0) || (this.all_table_data[i].order && this.all_table_data[i].order.order_status == 1)) {
2018
                       this.patientTableData.push(this.all_table_data[i])
2222
                       this.patientTableData.push(this.all_table_data[i])
2019
                     }
2223
                     }
2020
 
2224
 
2088
             }
2292
             }
2089
 
2293
 
2090
             this.current_index = 0;
2294
             this.current_index = 0;
2091
-            this.$refs.tab.setCurrentRow(this.patientTableData[0]);
2092
-            this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order.number)
2295
+
2296
+            for (let i = 0; i < this.patientTableData.length; i++){
2297
+                this.$refs.tab.setCurrentRow(this.patientTableData[0]);
2298
+                this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order.number)
2299
+            }
2093
 
2300
 
2094
           }
2301
           }
2095
         })
2302
         })
2096
 
2303
 
2097
-      }, formatDecimal(num, decimal) {
2304
+      },
2305
+      formatDecimal(num, decimal) {
2098
         num = num.toString();
2306
         num = num.toString();
2099
         let index = num.indexOf('.');
2307
         let index = num.indexOf('.');
2100
         if (index !== -1) {
2308
         if (index !== -1) {
2571
                 } else {
2779
                 } else {
2572
 
2780
 
2573
                   if (response.data.data.failed_code == -10) {
2781
                   if (response.data.data.failed_code == -10) {
2574
-                    that.$message.error(response.data.data.msg)
2782
+
2783
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
2784
+                      confirmButtonText: '确 定',
2785
+                      type: 'warning'
2786
+                    }).then(() => {
2787
+
2788
+                    }).catch(() => {
2789
+                    })
2575
 
2790
 
2576
                   } else {
2791
                   } else {
2577
-                    that.changeRadio(1);
2792
+                    that.changeRadioAndPatient(1);
2578
                     that.$message({ message: '预结算成功', type: 'success' })
2793
                     that.$message({ message: '预结算成功', type: 'success' })
2579
                   }
2794
                   }
2580
 
2795
 
2613
                     return false
2828
                     return false
2614
                   } else {
2829
                   } else {
2615
                     if (response.data.data.failed_code == -10) {
2830
                     if (response.data.data.failed_code == -10) {
2616
-                      that.$message.error(response.data.data.msg)
2831
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
2832
+                        confirmButtonText: '确 定',
2833
+                        type: 'warning'
2834
+                      }).then(() => {
2835
+
2836
+                      }).catch(() => {
2837
+                      })
2617
 
2838
 
2618
                     } else {
2839
                     } else {
2619
-                      that.changeRadio(1);
2840
+                      that.changeRadioAndPatient(1);
2620
                       that.$message({ message: '退费成功', type: 'success' })
2841
                       that.$message({ message: '退费成功', type: 'success' })
2621
                     }
2842
                     }
2622
                   }
2843
                   }
2642
                   return false
2863
                   return false
2643
                 } else {
2864
                 } else {
2644
                   if (response.data.data.failed_code == -10) {
2865
                   if (response.data.data.failed_code == -10) {
2645
-                    that.$message.error(response.data.data.msg)
2866
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
2867
+                      confirmButtonText: '确 定',
2868
+                      type: 'warning'
2869
+                    }).then(() => {
2870
+
2871
+                    }).catch(() => {
2872
+                    })
2873
+
2646
                   } else {
2874
                   } else {
2647
                     that.$message({ message: '查询成功', type: 'success' })
2875
                     that.$message({ message: '查询成功', type: 'success' })
2648
                   }
2876
                   }
2669
                 } else {
2897
                 } else {
2670
                   if (response.data.data.failed_code == -10) {
2898
                   if (response.data.data.failed_code == -10) {
2671
 
2899
 
2672
-                    that.$message.error(response.data.data.msg)
2900
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
2901
+                      confirmButtonText: '确 定',
2902
+                      type: 'warning'
2903
+                    }).then(() => {
2904
+
2905
+                    }).catch(() => {
2906
+                    })
2907
+
2673
 
2908
 
2674
                   } else {
2909
                   } else {
2675
 
2910
 
2716
                     return false
2951
                     return false
2717
                   } else {
2952
                   } else {
2718
                     if (response.data.data.failed_code == -10) {
2953
                     if (response.data.data.failed_code == -10) {
2719
-                      that.$message.error(response.data.data.msg)
2954
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
2955
+                        confirmButtonText: '确 定',
2956
+                        type: 'warning'
2957
+                      }).then(() => {
2958
+
2959
+                      }).catch(() => {
2960
+                      })
2961
+
2720
 
2962
 
2721
                     } else {
2963
                     } else {
2722
-                      that.changeRadio(1);
2964
+                      that.changeRadioAndPatient(1);
2723
                       that.$message({ message: '退号成功', type: 'success' })
2965
                       that.$message({ message: '退号成功', type: 'success' })
2724
                     }
2966
                     }
2725
                   }
2967
                   }

+ 57 - 53
src/xt_pages/outpatientCharges/settlementPrint.vue Прегледај датотеку

77
 
77
 
78
       const style =
78
       const style =
79
         '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
79
         '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
80
-        const style1 = "@media print{#prescription-print{font-size:14px;}.title{text-align: center;font-size: 22px;font-weight: bold;}.row{display: flex;justify-content: space-between;}.under_line{border-bottom: 1px solid #999;width: 95%;text-align: center;margin-left: 2px;display: inline-block;}.inline_block{display: inline-block;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 14px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; /* 解决边框冲突 */border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid;text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}}"
80
+        const style1 = "@media print{#prescription-print{font-size:14px;}.title{text-align: center;font-size: 22px;font-weight: bold;}.row{display: flex;justify-content: space-between;}.under_line{border-bottom: 1px solid #999;width: 95%;text-align: center;margin-left: 2px;display: inline-block;}.inline_block{display: inline-block;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 14px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; /* 解决边框冲突 */border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid;text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}}";
81
         printJS({
81
         printJS({
82
             printable: "prescription-print",
82
             printable: "prescription-print",
83
             type: "html",
83
             type: "html",
97
     getAllDoctorList(){
97
     getAllDoctorList(){
98
       getAllDoctorList().then(response=>{
98
       getAllDoctorList().then(response=>{
99
         if(response.data.state == 1){
99
         if(response.data.state == 1){
100
-               var doctor =  response.data.data.doctor
100
+               var doctor =  response.data.data.doctor;
101
 
101
 
102
                this.doctorList = doctor
102
                this.doctorList = doctor
103
              }
103
              }
106
     getAllHisPatientList(){
106
     getAllHisPatientList(){
107
          const params = {
107
          const params = {
108
            record_date:this.record_date
108
            record_date:this.record_date
109
-         }
109
+         };
110
       getAllHisPatientList(params).then(response=>{
110
       getAllHisPatientList(params).then(response=>{
111
          if(response.data.state == 1){
111
          if(response.data.state == 1){
112
-            this.patientTableData = response.data.data.list
113
-            this.patientTableDataTwo = response.data.data.list
112
+            this.patientTableData = response.data.data.list;
113
+            this.patientTableDataTwo = response.data.data.list;
114
 
114
 
115
-            console.log('222', this.patientTableData)
116
-            let cal_one = 0
117
-            let cal_two = 0
115
+            console.log('222', this.patientTableData);
116
+            let cal_one = 0;
117
+            let cal_two = 0;
118
             for (let i = 0; i < response.data.data.list.length; i++) {
118
             for (let i = 0; i < response.data.data.list.length; i++) {
119
               if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
119
               if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
120
                 cal_one = cal_one + 1
120
                 cal_one = cal_one + 1
126
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
126
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
127
             // console.log(this.patientTableData[0])
127
             // console.log(this.patientTableData[0])
128
             // this.choosePatient(this.patientTableData[0])
128
             // this.choosePatient(this.patientTableData[0])
129
-            this.cal_one = cal_one
129
+            this.cal_one = cal_one;
130
             this.cal_two = cal_two
130
             this.cal_two = cal_two
131
          }
131
          }
132
       })
132
       })
133
     },
133
     },
134
 
134
 
135
     changePatient(row){
135
     changePatient(row){
136
-      console.log("row",row)
137
-      this.patient_id = row.patient_id
138
-      this.record_date = this.record_date
136
+      console.log("row",row);
137
+      this.patient_id = row.patient_id;
138
+      this.record_date = this.record_date;
139
       this.prescription_id = this.prescription_id
139
       this.prescription_id = this.prescription_id
140
       //   var params = {
140
       //   var params = {
141
       //     patient_id:row.patient_id,
141
       //     patient_id:row.patient_id,
164
     getInfo(order_id) {
164
     getInfo(order_id) {
165
       if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 ||  this.$store.getters.xt_user.org_id == 10106  ||  this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9990 || this.$store.getters.xt_user.org_id == 0) {
165
       if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 ||  this.$store.getters.xt_user.org_id == 10106  ||  this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9990 || this.$store.getters.xt_user.org_id == 0) {
166
 
166
 
167
-        var that = this
167
+        var that = this;
168
 
168
 
169
         axios.get('http://127.0.0.1:9532/api/settle/query', {
169
         axios.get('http://127.0.0.1:9532/api/settle/query', {
170
           params: {
170
           params: {
175
         })
175
         })
176
           .then(function (response) {
176
           .then(function (response) {
177
             if (response.data.state == 0) {
177
             if (response.data.state == 0) {
178
-              this.$message.error(response.data.msg)
178
+              this.$message.error(response.data.msg);
179
               return false
179
               return false
180
             } else {
180
             } else {
181
-              console.log("logloglog")
181
+              console.log("logloglog");
182
+
183
+              console.log(response.data.data.info);
184
+              that.info = response.data.data.info;
185
+              that.p_admin = response.data.data.printor_admin;
186
+              that.charge_admin = response.data.data.charge_admin;
187
+              console.log(that.info);
188
+
182
 
189
 
183
-              console.log(response.data.data.info)
184
-              that.info = response.data.data.info
185
-              that.p_admin = response.data.data.printor_admin
186
-              that.charge_admin = response.data.data.charge_admin
187
-              console.log(that.info)
190
+              // that.info['bed_cost_total'] = response.data.data.bedCostTotal
188
 
191
 
189
-              that.info['bed_cost_total'] = response.data.data.bedCostTotal
190
-              that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal
191
-              that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal
192
 
192
 
193
-              that.info['operation_cost_total'] = response.data.data.operationCostTotal
194
-              that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal
195
-              that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal
193
+              that.info['bed_cost_total'] = response.data.data.bedCostTotal;
194
+              that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal;
195
+              that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal;
196
 
196
 
197
-              that.info['other_cost_total'] = response.data.data.otherCostTotal
198
-              that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal
199
-              that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal
197
+              that.info['operation_cost_total'] = response.data.data.operationCostTotal;
198
+              that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal;
199
+              that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal;
200
 
200
 
201
-              that.info['material_cost_total'] = response.data.data.materialCostTotal
202
-              that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal
203
-              that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal
201
+              that.info['other_cost_total'] = response.data.data.otherCostTotal;
202
+              that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal;
203
+              that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal;
204
 
204
 
205
-              that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal
206
-              that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal
207
-              that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal
205
+              that.info['material_cost_total'] = response.data.data.materialCostTotal;
206
+              that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal;
207
+              that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal;
208
 
208
 
209
-              that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal
210
-              that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal
211
-              that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal
209
+              that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal;
210
+              that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal;
211
+              that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal;
212
 
212
 
213
+              that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal;
214
+              that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal;
215
+              that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
213
 
216
 
214
-              that.info['check_cost_total'] = response.data.data.checkCostTotal
215
-              that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal
216
-              that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal
217
 
217
 
218
+              that.info['check_cost_total'] = response.data.data.checkCostTotal;
219
+              that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal;
220
+              that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal;
218
 
221
 
219
-              that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal
220
-              that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal
221
-              that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal
222
 
222
 
223
-              that.info['treat_cost_total'] = response.data.data.treatCostTotal
224
-              that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal
225
-              that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal
226
-              that.info['date'] =  response.data.data.date
227
-              that.info['number'] =  response.data.data.number
228
-              that.info['order_infos'] =  response.data.data.order_infos
223
+              that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal;
224
+              that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal;
225
+              that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal;
226
+
227
+              that.info['treat_cost_total'] = response.data.data.treatCostTotal;
228
+              that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal;
229
+              that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal;
230
+              that.info['date'] =  response.data.data.date;
231
+              that.info['number'] =  response.data.data.number;
232
+              that.info['order_infos'] =  response.data.data.order_infos;
229
               that.info['diagnosis'] =  response.data.data.diagnosis
233
               that.info['diagnosis'] =  response.data.data.diagnosis
230
 
234
 
231
             }
235
             }
237
     }
241
     }
238
   },
242
   },
239
   created() {
243
   created() {
240
-    this.getInfo(this.paramsObj.order_id)
244
+    this.getInfo(this.paramsObj.order_id);
241
     this.org_id = this.$store.getters.xt_user.org_id
245
     this.org_id = this.$store.getters.xt_user.org_id
242
   },
246
   },
243
   watch:{
247
   watch:{
244
     paramsObj:{//深度监听,可监听到对象、数组的变化
248
     paramsObj:{//深度监听,可监听到对象、数组的变化
245
       handler(val, oldVal){
249
       handler(val, oldVal){
246
-        this.paramsObj = val
250
+        this.paramsObj = val;
247
         this.getInfo(this.paramsObj.order_id)
251
         this.getInfo(this.paramsObj.order_id)
248
 
252
 
249
       },
253
       },
299
 }
303
 }
300
 .actionBar{
304
 .actionBar{
301
     display: flex;
305
     display: flex;
302
-    justify-content: space-between; 
306
+    justify-content: space-between;
303
     line-height: 24px;
307
     line-height: 24px;
304
     padding:0 10px;
308
     padding:0 10px;
305
 }
309
 }

+ 8 - 1
src/xt_pages/outpatientCharges/summary.vue Прегледај датотеку

269
                   return false
269
                   return false
270
                 } else {
270
                 } else {
271
                   if (response.data.data.failed_code == -10) {
271
                   if (response.data.data.failed_code == -10) {
272
-                    that.$message.error(response.data.data.msg)
272
+                    // that.$message.error(response.data.data.msg)
273
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
274
+                      confirmButtonText: '确 定',
275
+                      type: 'warning'
276
+                    }).then(() => {
277
+
278
+                    }).catch(() => {
279
+                    })
273
                   } else {
280
                   } else {
274
                     that.$message({ message: '退费成功', type: 'success', duration: 5000 });
281
                     that.$message({ message: '退费成功', type: 'success', duration: 5000 });
275
                     that.getHisOrderList()
282
                     that.getHisOrderList()

+ 102 - 95
src/xt_pages/outpatientCharges/treatTemplate/printOne.vue Прегледај датотеку

215
       getItemName(number) {
215
       getItemName(number) {
216
         switch (number) {
216
         switch (number) {
217
           case '01':
217
           case '01':
218
-            return '床位费'
219
-            break
218
+            return '床位费';
219
+            break;
220
           case '02':
220
           case '02':
221
-            return '西药费'
221
+            return '西药费';
222
 
222
 
223
-            break
223
+            break;
224
           case '03':
224
           case '03':
225
-            return '中药费'
225
+            return '中药费';
226
 
226
 
227
-            break
227
+            break;
228
           case '04':
228
           case '04':
229
-            return '中成药费'
229
+            return '中成药费';
230
 
230
 
231
-            break
231
+            break;
232
           case '05':
232
           case '05':
233
-            return '中草药费'
233
+            return '中草药费';
234
 
234
 
235
-            break
235
+            break;
236
           case '06':
236
           case '06':
237
-            return '检查费'
237
+            return '检查费';
238
 
238
 
239
-            break
239
+            break;
240
           case '07':
240
           case '07':
241
-            return '治疗费'
241
+            return '治疗费';
242
 
242
 
243
-            break
243
+            break;
244
           case '08':
244
           case '08':
245
-            return '放射费'
245
+            return '放射费';
246
 
246
 
247
-            break
247
+            break;
248
           case '09':
248
           case '09':
249
-            return '手术费'
249
+            return '手术费';
250
 
250
 
251
-            break
251
+            break;
252
           case '10':
252
           case '10':
253
-            return '化验费'
253
+            return '化验费';
254
 
254
 
255
-            break
255
+            break;
256
           case '11':
256
           case '11':
257
-            return '输血费'
257
+            return '输血费';
258
 
258
 
259
-            break
259
+            break;
260
           case '12':
260
           case '12':
261
-            return '输氧费'
261
+            return '输氧费';
262
 
262
 
263
-            break
263
+            break;
264
           case '13':
264
           case '13':
265
-            return '其它费'
265
+            return '其它费';
266
 
266
 
267
-            break
267
+            break;
268
           case '14':
268
           case '14':
269
-            return '麻醉费'
269
+            return '麻醉费';
270
 
270
 
271
-            break
271
+            break;
272
           case '15':
272
           case '15':
273
-            return '材料费'
273
+            return '材料费';
274
 
274
 
275
-            break
275
+            break;
276
           case '16':
276
           case '16':
277
-            return '特殊检查费'
277
+            return '特殊检查费';
278
 
278
 
279
-            break
279
+            break;
280
           case '17':
280
           case '17':
281
-            return '特殊治疗费'
281
+            return '特殊治疗费';
282
 
282
 
283
-            break
283
+            break;
284
           case '18':
284
           case '18':
285
-            return '诊疗费(诊查费)'
285
+            return '诊疗费(诊查费)';
286
 
286
 
287
-            break
287
+            break;
288
           case '19':
288
           case '19':
289
-            return '护理费'
289
+            return '护理费';
290
 
290
 
291
-            break
291
+            break;
292
           case '20':
292
           case '20':
293
-            return '诊金'
293
+            return '诊金';
294
 
294
 
295
-            break
295
+            break;
296
           case '21':
296
           case '21':
297
-            return '检查费(CT)'
297
+            return '检查费(CT)';
298
 
298
 
299
-            break
299
+            break;
300
           case '22':
300
           case '22':
301
-            return '检查费(MRT)'
301
+            return '检查费(MRT)';
302
 
302
 
303
-            break
303
+            break;
304
           case '23':
304
           case '23':
305
-            return '检查费(其他)'
305
+            return '检查费(其他)';
306
 
306
 
307
-            break
307
+            break;
308
           case '24':
308
           case '24':
309
-            return '特需服务费'
309
+            return '特需服务费';
310
 
310
 
311
-            break
311
+            break;
312
           case '25':
312
           case '25':
313
-            return '杂费'
313
+            return '杂费';
314
 
314
 
315
-            break
315
+            break;
316
           case '26':
316
           case '26':
317
-            return '挂号费'
317
+            return '挂号费';
318
             break
318
             break
319
 
319
 
320
         }
320
         }
325
           record_date: record_date,
325
           record_date: record_date,
326
           patient_id: patient_id,
326
           patient_id: patient_id,
327
           prescription_id: prescription_id
327
           prescription_id: prescription_id
328
-        }
329
-        console.log('params', params)
328
+        };
329
+        console.log('params', params);
330
         getChargePrint(params).then(response => {
330
         getChargePrint(params).then(response => {
331
           if (response.data.state == 1) {
331
           if (response.data.state == 1) {
332
-            var list = response.data.data.list
333
-            console.log('list9999999999', list)
334
-            this.list = list
335
-            var prescription = response.data.data.prescription
336
-            console.log('prescription', prescription)
337
-            this.prescription = prescription
338
-            var patient = response.data.data.patient
339
-            console.log('patient', patient)
340
-            this.patient = patient
341
-            var histpatient = response.data.data.hisPatient
332
+            var list = response.data.data.list;
333
+            console.log('list9999999999', list);
334
+            this.list = list;
335
+            var prescription = response.data.data.prescription;
336
+            console.log('prescription', prescription);
337
+            this.prescription = prescription;
338
+            var patient = response.data.data.patient;
339
+            console.log('patient', patient);
340
+            this.patient = patient;
341
+            var histpatient = response.data.data.hisPatient;
342
             console.log('hispatient', histpatient)
342
             console.log('hispatient', histpatient)
343
           }
343
           }
344
         })
344
         })
347
     created() {
347
     created() {
348
 
348
 
349
       if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
349
       if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
350
-        this.orgname = xtuser.org.org_name
350
+        this.orgname = xtuser.org.org_name;
351
         var form = {
351
         var form = {
352
           'order_id': this.paramsObj.order_id,
352
           'order_id': this.paramsObj.order_id,
353
           'patient_id': this.paramsObj.patient_id,
353
           'patient_id': this.paramsObj.patient_id,
354
           'record_time': this.paramsObj.record_date,
354
           'record_time': this.paramsObj.record_date,
355
           'admin_user_id': this.$store.getters.xt_user.user.id
355
           'admin_user_id': this.$store.getters.xt_user.user.id
356
-        }
357
-        var that = this
356
+        };
357
+        var that = this;
358
         axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
358
         axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
359
           params: form
359
           params: form
360
         })
360
         })
361
           .then(function(response) {
361
           .then(function(response) {
362
             if (response.data.state == 0) {
362
             if (response.data.state == 0) {
363
-              that.$message.error(response.data.msg)
363
+              that.$message.error(response.data.msg);
364
               return false
364
               return false
365
             } else {
365
             } else {
366
               if (response.data.data.failed_code == -10) {
366
               if (response.data.data.failed_code == -10) {
367
-                that.$message.error(response.data.data.msg)
367
+                // that.$message.error(response.data.data.msg)
368
+                that.$confirm(response.data.data.msg, '医保错误信息', {
369
+                  confirmButtonText: '确 定',
370
+                  type: 'warning'
371
+                }).then(() => {
372
+
373
+                }).catch(() => {
374
+                })
368
               } else {
375
               } else {
369
-                that.result = response.data.data.result
370
-
371
-                that.org_code = response.data.data.org_code
372
-                that.patient_name = response.data.data.patient_name
373
-                that.doctor_code = response.data.data.doctor_code
374
-                that.doctor_name = response.data.data.doctor_name
375
-                that.name_arr = []
376
-                that.spec_arr = []
377
-                that.count_arr = []
378
-                that.price_arr = []
379
-                that.total_arr = []
376
+                that.result = response.data.data.result;
377
+
378
+                that.org_code = response.data.data.org_code;
379
+                that.patient_name = response.data.data.patient_name;
380
+                that.doctor_code = response.data.data.doctor_code;
381
+                that.doctor_name = response.data.data.doctor_name;
382
+                that.name_arr = [];
383
+                that.spec_arr = [];
384
+                that.count_arr = [];
385
+                that.price_arr = [];
386
+                that.total_arr = [];
380
                 for (let i = 0; i < that.result.transBody.outputlist1.length; i++) {
387
                 for (let i = 0; i < that.result.transBody.outputlist1.length; i++) {
381
-                  that.name_arr.push(that.result.transBody.outputlist1[i].ake006)
382
-                  that.spec_arr.push(that.result.transBody.outputlist1[i].aka074)
383
-                  that.count_arr.push(that.result.transBody.outputlist1[i].akc226)
384
-                  that.price_arr.push(that.result.transBody.outputlist1[i].akc225)
388
+                  that.name_arr.push(that.result.transBody.outputlist1[i].ake006);
389
+                  that.spec_arr.push(that.result.transBody.outputlist1[i].aka074);
390
+                  that.count_arr.push(that.result.transBody.outputlist1[i].akc226);
391
+                  that.price_arr.push(that.result.transBody.outputlist1[i].akc225);
385
                   that.total_arr.push(that.result.transBody.outputlist1[i].akc264)
392
                   that.total_arr.push(that.result.transBody.outputlist1[i].akc264)
386
                 }
393
                 }
387
 
394
 
394
           })
401
           })
395
 
402
 
396
       } else {
403
       } else {
397
-        var record_date = this.paramsObj.record_date
398
-        console.log('record_date', record_date)
399
-        var patient_id = this.paramsObj.patient_id
400
-        console.log('patient_id', patient_id)
401
-        var prescription_id = this.paramsObj.prescription_id
402
-        this.getChargePrint(record_date, patient_id, prescription_id)
403
-        var xtuser = this.$store.getters.xt_user
404
+        var record_date = this.paramsObj.record_date;
405
+        console.log('record_date', record_date);
406
+        var patient_id = this.paramsObj.patient_id;
407
+        console.log('patient_id', patient_id);
408
+        var prescription_id = this.paramsObj.prescription_id;
409
+        this.getChargePrint(record_date, patient_id, prescription_id);
410
+        var xtuser = this.$store.getters.xt_user;
404
         this.orgname = xtuser.org.org_name
411
         this.orgname = xtuser.org.org_name
405
 
412
 
406
       }
413
       }
409
     watch: {
416
     watch: {
410
       paramsObj: {//深度监听,可监听到对象、数组的变化
417
       paramsObj: {//深度监听,可监听到对象、数组的变化
411
         handler(val, oldVal) {
418
         handler(val, oldVal) {
412
-          this.paramsObj = val
413
-          this.patient_id = this.paramsObj.patient_id
414
-          var record_date = this.paramsObj.record
415
-          this.record_date = record_date
416
-          var prescription_id = this.paramsObj.prescription_id
419
+          this.paramsObj = val;
420
+          this.patient_id = this.paramsObj.patient_id;
421
+          var record_date = this.paramsObj.record;
422
+          this.record_date = record_date;
423
+          var prescription_id = this.paramsObj.prescription_id;
417
           this.prescription_id = prescription_id
424
           this.prescription_id = prescription_id
418
 
425
 
419
         },
426
         },

+ 3 - 3
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Прегледај датотеку

482
         ],
482
         ],
483
         isLastOrNextVisible: false,
483
         isLastOrNextVisible: false,
484
         multipleTableHeight: '',
484
         multipleTableHeight: '',
485
-        register_type: '',
485
+        register_type: 1,
486
         value: '0',
486
         value: '0',
487
         search_project_keyword: '',
487
         search_project_keyword: '',
488
         form: {
488
         form: {
515
         departmentOptions: [],
515
         departmentOptions: [],
516
         departmentValue: '',
516
         departmentValue: '',
517
         total: 0,
517
         total: 0,
518
-        state1: '',
518
+        state1: 1,
519
         request_record_date: '',
519
         request_record_date: '',
520
         state2: '',
520
         state2: '',
521
         customTabIndex: 1,
521
         customTabIndex: 1,
550
         department: [],
550
         department: [],
551
         sick: [],
551
         sick: [],
552
         diagnoses: [],
552
         diagnoses: [],
553
-        diagnose: '',
553
+        diagnose: 1,
554
         curTotal: 0,
554
         curTotal: 0,
555
         prescription_id: 0,
555
         prescription_id: 0,
556
         tempDrugs: [],
556
         tempDrugs: [],

+ 34 - 2
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Прегледај датотеку

232
       }
232
       }
233
     },
233
     },
234
     methods: {
234
     methods: {
235
-      changeOther(){
235
+      changeOther(patient_id){
236
         this.radio = 2;
236
         this.radio = 2;
237
-        this.change()
237
+        let params = {
238
+          'record_date': this.record_date,
239
+          'type': this.radio
240
+        };
241
+        this.patientTableData = [];
242
+
243
+        getSchedulePatientList(params).then(response => {
244
+          if (response.data.state == 0) {
245
+            this.$message.error(response.data.msg);
246
+            return false
247
+          } else {
248
+            this.patientTableData = response.data.data.list;
249
+            this.patientTableDataTwo = response.data.data.list;
250
+            this.cal_one = response.data.data.total_one;
251
+            this.cal_two = response.data.data.total_two;
252
+            this.admin_info = response.data.data.info;
253
+
254
+
255
+            if (this.patientTableData.length > 0) {
256
+              for(let i = 0; i < this.patientTableData.length; i++){
257
+                if (this.patientTableData[i].id == patient_id){
258
+                  this.$refs.tab.setCurrentRow(this.patientTableData[i]);
259
+                  this.oldCurrentRow = this.patientTableData[i];
260
+                  this.getPatientInfo(this.patientTableData[i])
261
+                }
262
+              }
263
+
264
+            }
265
+
266
+            this.prescriptionList = response.data.data.list.prescription
267
+
268
+          }
269
+        })
238
 
270
 
239
       },
271
       },
240
       setData(val) {
272
       setData(val) {

+ 71 - 50
src/xt_pages/outpatientRecord/outpatientRecord.vue Прегледај датотеку

279
     },
279
     },
280
     methods: {
280
     methods: {
281
       changeStatus(id){
281
       changeStatus(id){
282
-        this.keywords = ""
282
+        this.keywords = "";
283
         this.getList()
283
         this.getList()
284
       },
284
       },
285
       getName(value){
285
       getName(value){
286
-        console.log(value)
286
+        console.log(value);
287
         for(let i = 0; i < this.insutype_arr.length; i++){
287
         for(let i = 0; i < this.insutype_arr.length; i++){
288
-          console.log(this.insutype_arr[i].value)
288
+          console.log(this.insutype_arr[i].value);
289
           if(this.insutype_arr[i].value == value){
289
           if(this.insutype_arr[i].value == value){
290
             return this.insutype_arr[i].label
290
             return this.insutype_arr[i].label
291
           }
291
           }
296
         let params ={
296
         let params ={
297
           id_card_no:this.currentObject.id_card_no,
297
           id_card_no:this.currentObject.id_card_no,
298
           admin_user_id:  this.$store.getters.xt_user.user.id,
298
           admin_user_id:  this.$store.getters.xt_user.user.id,
299
-        }
300
-        var that = this
299
+        };
300
+        var that = this;
301
         axios.get('http://127.0.0.1:9532/api/patient/info', {
301
         axios.get('http://127.0.0.1:9532/api/patient/info', {
302
           params: params
302
           params: params
303
         })
303
         })
304
           .then(function(response) {
304
           .then(function(response) {
305
             if (response.data.state == 0) {
305
             if (response.data.state == 0) {
306
-              that.$message.error(response.data.msg)
306
+              that.$message.error(response.data.msg);
307
               return false
307
               return false
308
             } else {
308
             } else {
309
 
309
 
310
               if(response.data.data.failed_code == -10){
310
               if(response.data.data.failed_code == -10){
311
-                that.$message.error(response.data.data.msg)
311
+                // that.$message.error(response.data.data.msg)
312
+                that.$confirm(response.data.data.msg, '医保错误信息', {
313
+                  confirmButtonText: '确 定',
314
+                  type: 'warning'
315
+                }).then(() => {
316
+
317
+                }).catch(() => {
318
+                })
312
               }else{
319
               }else{
313
-                that.dialogFormVisible = true
314
-                that.insutypes = []
315
-                that.psn_no =  response.data.data.info.output.baseinfo.psn_no
320
+                that.dialogFormVisible = true;
321
+                that.insutypes = [];
322
+                that.psn_no =  response.data.data.info.output.baseinfo.psn_no;
316
                 for (let i =0; i < response.data.data.info.output.insuinfo.length; i++){
323
                 for (let i =0; i < response.data.data.info.output.insuinfo.length; i++){
317
                   let obj = {
324
                   let obj = {
318
                     value:response.data.data.info.output.insuinfo[i].insutype,
325
                     value:response.data.data.info.output.insuinfo[i].insutype,
319
                     label:""
326
                     label:""
320
-                  }
327
+                  };
321
                   for(let b = 0; b < that.insutype_arr.length; b++){
328
                   for(let b = 0; b < that.insutype_arr.length; b++){
322
                     if(that.insutype_arr[b].value == response.data.data.info.output.insuinfo[i].insutype){
329
                     if(that.insutype_arr[b].value == response.data.data.info.output.insuinfo[i].insutype){
323
                       obj.label = that.insutype_arr[b].label
330
                       obj.label = that.insutype_arr[b].label
342
       },
349
       },
343
       putOnRecord(type, row) {
350
       putOnRecord(type, row) {
344
         if (type == 1) {
351
         if (type == 1) {
345
-          this.currentObject = row
352
+          this.currentObject = row;
346
 
353
 
347
           this.getGdybPatientInfo()
354
           this.getGdybPatientInfo()
348
 
355
 
356
               'id': row.record.id,
363
               'id': row.record.id,
357
               'admin_user_id': this.$store.getters.xt_user.user.id
364
               'admin_user_id': this.$store.getters.xt_user.user.id
358
 
365
 
359
-            }
360
-            var that = this
366
+            };
367
+            var that = this;
361
             axios.get('http://127.0.0.1:9532/api/psn/ncds/unputonrecord', {
368
             axios.get('http://127.0.0.1:9532/api/psn/ncds/unputonrecord', {
362
               params: params
369
               params: params
363
             })
370
             })
364
               .then(function(response) {
371
               .then(function(response) {
365
                 if (response.data.state == 0) {
372
                 if (response.data.state == 0) {
366
-                  that.$message.error(response.data.msg)
373
+                  that.$message.error(response.data.msg);
367
                   return false
374
                   return false
368
                 } else {
375
                 } else {
369
 
376
 
370
                   if(response.data.data.failed_code == -10){
377
                   if(response.data.data.failed_code == -10){
371
-                    that.$message.error(response.data.data.msg)
378
+                    // that.$message.error(response.data.data.msg)
379
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
380
+                      confirmButtonText: '确 定',
381
+                      type: 'warning'
382
+                    }).then(() => {
383
+
384
+                    }).catch(() => {
385
+                    })
372
                   }else{
386
                   }else{
373
-                    row.record.is_cancel = 2
387
+                    row.record.is_cancel = 2;
374
                     that.$message({ message: '撤销成功', type: 'success' })
388
                     that.$message({ message: '撤销成功', type: 'success' })
375
                   }
389
                   }
376
                 }
390
                 }
400
       getInitData() {
414
       getInitData() {
401
         getInitData().then(response => {
415
         getInitData().then(response => {
402
           if (response.data.state == 0) {
416
           if (response.data.state == 0) {
403
-            this.$message.error(response.data.msg)
417
+            this.$message.error(response.data.msg);
404
             return false
418
             return false
405
           } else {
419
           } else {
406
-            this.doctorList = response.data.data.doctors
407
-            this.department = response.data.data.department
420
+            this.doctorList = response.data.data.doctors;
421
+            this.department = response.data.data.department;
408
             this.sick = response.data.data.sick
422
             this.sick = response.data.data.sick
409
 
423
 
410
           }
424
           }
416
       },
430
       },
417
       confirm() {
431
       confirm() {
418
         if(this.currentObject.record.doctor_id == '' || this.currentObject.record.doctor_id  == 0){
432
         if(this.currentObject.record.doctor_id == '' || this.currentObject.record.doctor_id  == 0){
419
-          this.$message.error("请选择医生")
433
+          this.$message.error("请选择医生");
420
           return
434
           return
421
         }
435
         }
422
 
436
 
423
         if(this.currentObject.record.department_id == '' || this.currentObject.record.department_id  == 0){
437
         if(this.currentObject.record.department_id == '' || this.currentObject.record.department_id  == 0){
424
-          this.$message.error("请选择科室")
438
+          this.$message.error("请选择科室");
425
           return
439
           return
426
         }
440
         }
427
 
441
 
428
         if(this.currentObject.record.sick_type == '' || this.currentObject.record.sick_type  == 0){
442
         if(this.currentObject.record.sick_type == '' || this.currentObject.record.sick_type  == 0){
429
-          this.$message.error("请选择疾病类型")
443
+          this.$message.error("请选择疾病类型");
430
           return
444
           return
431
         }
445
         }
432
 
446
 
433
         if(this.currentObject.record.insutype_value == '' || this.currentObject.record.insutype_value  == 0){
447
         if(this.currentObject.record.insutype_value == '' || this.currentObject.record.insutype_value  == 0){
434
-          this.$message.error("请选择险种")
448
+          this.$message.error("请选择险种");
435
           return
449
           return
436
         }
450
         }
437
 
451
 
444
           doctor_id: this.currentObject.record.doctor_id,
458
           doctor_id: this.currentObject.record.doctor_id,
445
           department_id:this.currentObject.record.department_id,
459
           department_id:this.currentObject.record.department_id,
446
           admin_user_id: this.$store.getters.xt_user.user.id
460
           admin_user_id: this.$store.getters.xt_user.user.id
447
-        }
461
+        };
448
 
462
 
449
-        var that = this
463
+        var that = this;
450
         axios.get('http://127.0.0.1:9532/api/psn/ncds/putonrecord', {
464
         axios.get('http://127.0.0.1:9532/api/psn/ncds/putonrecord', {
451
           params: params
465
           params: params
452
         })
466
         })
453
           .then(function(response) {
467
           .then(function(response) {
454
             if (response.data.state == 0) {
468
             if (response.data.state == 0) {
455
-              that.$message.error(response.data.msg)
469
+              that.$message.error(response.data.msg);
456
               return false
470
               return false
457
             } else {
471
             } else {
458
               if(response.data.data.failed_code == -10){
472
               if(response.data.data.failed_code == -10){
459
-                that.$message.error(response.data.data.msg)
473
+                // that.$message.error(response.data.data.msg)
474
+                that.$confirm(response.data.data.msg, '医保错误信息', {
475
+                  confirmButtonText: '确 定',
476
+                  type: 'warning'
477
+                }).then(() => {
478
+
479
+                }).catch(() => {
480
+                })
460
               }else{
481
               }else{
461
-                that.$message.success("备案成功")
462
-                that.dialogFormVisible = false
482
+                that.$message.success("备案成功");
483
+                that.dialogFormVisible = false;
463
                 for (let i = 0; i < that.tableData.length; i++) {
484
                 for (let i = 0; i < that.tableData.length; i++) {
464
                   if (that.tableData[i].id == that.currentObject.id) {
485
                   if (that.tableData[i].id == that.currentObject.id) {
465
-                    that.tableData[i].record.is_cancel =response.data.data.result.is_cancel
466
-                    that.tableData[i].record.id = response.data.data.result.id
467
-                    that.tableData[i].record.trt_dcla_detl_sn = response.data.data.result.trt_dcla_detl_sn
468
-                    that.tableData[i].record.psn_no = response.data.data.result.psn_no
469
-                    that.tableData[i].record.doctor_id = response.data.data.result.doctor_id
470
-                    that.tableData[i].record.department_id = response.data.data.result.department_id
471
-                    that.tableData[i].record.ctime = response.data.data.result.ctime
472
-                    that.tableData[i].record.insutype = response.data.data.result.insutype
486
+                    that.tableData[i].record.is_cancel =response.data.data.result.is_cancel;
487
+                    that.tableData[i].record.id = response.data.data.result.id;
488
+                    that.tableData[i].record.trt_dcla_detl_sn = response.data.data.result.trt_dcla_detl_sn;
489
+                    that.tableData[i].record.psn_no = response.data.data.result.psn_no;
490
+                    that.tableData[i].record.doctor_id = response.data.data.result.doctor_id;
491
+                    that.tableData[i].record.department_id = response.data.data.result.department_id;
492
+                    that.tableData[i].record.ctime = response.data.data.result.ctime;
493
+                    that.tableData[i].record.insutype = response.data.data.result.insutype;
473
                     that.tableData[i].record.sick_type = response.data.data.result.sick_type
494
                     that.tableData[i].record.sick_type = response.data.data.result.sick_type
474
 
495
 
475
                   }
496
                   }
510
           'limit': this.limit,
531
           'limit': this.limit,
511
           'keywords': this.keywords,
532
           'keywords': this.keywords,
512
           'is_put_on_record':this.is_put_on_record
533
           'is_put_on_record':this.is_put_on_record
513
-        }
514
-        this.tableData = []
515
-        this.patientLoading = true
534
+        };
535
+        this.tableData = [];
536
+        this.patientLoading = true;
516
         getRecordList(params).then(response => {
537
         getRecordList(params).then(response => {
517
           if (response.data.state == 0) {
538
           if (response.data.state == 0) {
518
-            this.patientLoading = false
539
+            this.patientLoading = false;
519
 
540
 
520
-            this.$message.error(response.data.msg)
541
+            this.$message.error(response.data.msg);
521
             return false
542
             return false
522
           } else {
543
           } else {
523
-            this.patientLoading = false
524
-            this.tableData = response.data.data.list
525
-            this.total = response.data.data.total
544
+            this.patientLoading = false;
545
+            this.tableData = response.data.data.list;
546
+            this.total = response.data.data.total;
526
 
547
 
527
             for (let i = 0; i < this.tableData.length; i++) {
548
             for (let i = 0; i < this.tableData.length; i++) {
528
 
549
 
545
 
566
 
546
       },
567
       },
547
       handleSizeChange(limit) {
568
       handleSizeChange(limit) {
548
-        this.limit = limit
569
+        this.limit = limit;
549
         this.getList()
570
         this.getList()
550
       },
571
       },
551
       handleCurrentChange(page) {
572
       handleCurrentChange(page) {
552
-        this.page = page
573
+        this.page = page;
553
         this.getList()
574
         this.getList()
554
 
575
 
555
       }, searchAction() {
576
       }, searchAction() {
557
       }
578
       }
558
     },
579
     },
559
     created() {
580
     created() {
560
-      this.getList()
561
-      this.getInitData()
581
+      this.getList();
582
+      this.getInitData();
562
       this.fetchAllAdminUsers()
583
       this.fetchAllAdminUsers()
563
 
584
 
564
     }
585
     }

+ 32 - 4
src/xt_pages/outpatientRegistration/index.vue Прегледај датотеку

965
                     return false
965
                     return false
966
                   } else {
966
                   } else {
967
                     if (response.data.data.failed_code == -10) {
967
                     if (response.data.data.failed_code == -10) {
968
-                      that.$message.error(response.data.data.msg)
968
+                      // that.$message.error(response.data.data.msg)
969
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
970
+                        confirmButtonText: '确 定',
971
+                        type: 'warning'
972
+                      }).then(() => {
973
+
974
+                      }).catch(() => {
975
+                      })
969
                     } else {
976
                     } else {
970
                       that.$message({ message: '挂号成功', type: 'success' });
977
                       that.$message({ message: '挂号成功', type: 'success' });
971
                       that.form.settlementValue = '';
978
                       that.form.settlementValue = '';
1019
                     that.loadingone = false;
1026
                     that.loadingone = false;
1020
 
1027
 
1021
                     if (response.data.data.failed_code == -10) {
1028
                     if (response.data.data.failed_code == -10) {
1022
-                      that.$message.error(response.data.data.msg);
1029
+                      // that.$message.error(response.data.data.msg);
1030
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
1031
+                        confirmButtonText: '确 定',
1032
+                        type: 'warning'
1033
+                      }).then(() => {
1034
+
1035
+                      }).catch(() => {
1036
+                      })
1023
 
1037
 
1024
                     } else {
1038
                     } else {
1025
                       that.$message({ message: '挂号成功', type: 'success' });
1039
                       that.$message({ message: '挂号成功', type: 'success' });
1226
                     that.loadingone = false;
1240
                     that.loadingone = false;
1227
 
1241
 
1228
                     if (response.data.data.failed_code == -10) {
1242
                     if (response.data.data.failed_code == -10) {
1229
-                      that.$message.error(response.data.data.msg)
1243
+                      // that.$message.error(response.data.data.msg)
1244
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
1245
+                        confirmButtonText: '确 定',
1246
+                        type: 'warning'
1247
+                      }).then(() => {
1248
+
1249
+                      }).catch(() => {
1250
+                      })
1230
                     } else {
1251
                     } else {
1231
                       that.$message({ message: '挂号成功', type: 'success' });
1252
                       that.$message({ message: '挂号成功', type: 'success' });
1232
                       that.form.settlementValue = '';
1253
                       that.form.settlementValue = '';
1277
                   } else {
1298
                   } else {
1278
                     that.loadingone = false;
1299
                     that.loadingone = false;
1279
                     if (response.data.data.failed_code == -10) {
1300
                     if (response.data.data.failed_code == -10) {
1280
-                      that.$message.error(response.data.data.msg)
1301
+                      // that.$message.error(response.data.data.msg)
1302
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
1303
+                        confirmButtonText: '确 定',
1304
+                        type: 'warning'
1305
+                      }).then(() => {
1306
+
1307
+                      }).catch(() => {
1308
+                      })
1281
                     } else {
1309
                     } else {
1282
                       that.$message({ message: '挂号成功', type: 'success' });
1310
                       that.$message({ message: '挂号成功', type: 'success' });
1283
                       that.form.settlementValue = '';
1311
                       that.form.settlementValue = '';

+ 79 - 65
src/xt_pages/outpatientRegistration/registrationHistory.vue Прегледај датотеку

454
 </template>
454
 </template>
455
 
455
 
456
 <script>
456
 <script>
457
-  const moment = require('moment')
457
+  const moment = require('moment');
458
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
458
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
459
   import { changePatient, getHisPatient, getHisPatientHistory } from '@/api/project/project'
459
   import { changePatient, getHisPatient, getHisPatientHistory } from '@/api/project/project'
460
   import { uParseTime } from '@/utils/tools'
460
   import { uParseTime } from '@/utils/tools'
604
       // this.tableData = arr
604
       // this.tableData = arr
605
       //获取所有挂号号的患者
605
       //获取所有挂号号的患者
606
 
606
 
607
-      this.creator = this.$store.getters.xt_user.user.user_name
608
-      var today = moment().startOf('day').format('YYYY-MM-DD')
609
-      var todayUnix = Date.parse(today) / 1000
610
-      this.startUnix = todayUnix - 28800
607
+      this.creator = this.$store.getters.xt_user.user.user_name;
608
+      var today = moment().startOf('day').format('YYYY-MM-DD');
609
+      var todayUnix = Date.parse(today) / 1000;
610
+      this.startUnix = todayUnix - 28800;
611
 
611
 
612
-      this.getlist()
612
+      this.getlist();
613
       this.getDictionaryDataConfig()
613
       this.getDictionaryDataConfig()
614
     },
614
     },
615
     methods: {
615
     methods: {
634
       //     this.tableData = a
634
       //     this.tableData = a
635
       // },
635
       // },
636
       changeStart(val) {
636
       changeStart(val) {
637
-        this.start_time = val
637
+        this.start_time = val;
638
         this.getlist()
638
         this.getlist()
639
       },
639
       },
640
       changeEnd(val) {
640
       changeEnd(val) {
641
-        this.end_time = val
641
+        this.end_time = val;
642
         this.getlist()
642
         this.getlist()
643
       },
643
       },
644
       changeRegister(val) {
644
       changeRegister(val) {
645
         this.getlist()
645
         this.getlist()
646
       },
646
       },
647
       handleSizeChange(val) {
647
       handleSizeChange(val) {
648
-        this.limit = val
648
+        this.limit = val;
649
         this.getlist()
649
         this.getlist()
650
       },
650
       },
651
       handleCurrentChange(val) {
651
       handleCurrentChange(val) {
652
-        this.page = val
652
+        this.page = val;
653
         this.getlist()
653
         this.getlist()
654
       },
654
       },
655
       getlist() {
655
       getlist() {
660
           register_type: this.register_type,
660
           register_type: this.register_type,
661
           limit: this.limit,
661
           limit: this.limit,
662
           page: this.page
662
           page: this.page
663
-        }
664
-        console.log('params', params)
663
+        };
664
+        console.log('params', params);
665
         getHisPatientHistory(params).then(response => {
665
         getHisPatientHistory(params).then(response => {
666
           if (response.data.state == 1) {
666
           if (response.data.state == 1) {
667
-            var history = response.data.data.history
668
-
669
-            console.log('history', history)
670
-            this.tableData = history
671
-            var total = response.data.data.total
672
-            console.log('total', total)
673
-            this.total = total
674
-            var department = response.data.data.department
675
-            console.log('department', department)
676
-            this.departMent = department
677
-            var doctor = response.data.data.doctor
678
-            console.log('doctor', doctor)
667
+            var history = response.data.data.history;
668
+
669
+            console.log('history', history);
670
+            this.tableData = history;
671
+            var total = response.data.data.total;
672
+            console.log('total', total);
673
+            this.total = total;
674
+            var department = response.data.data.department;
675
+            console.log('department', department);
676
+            this.departMent = department;
677
+            var doctor = response.data.data.doctor;
678
+            console.log('doctor', doctor);
679
             this.doctorList = doctor
679
             this.doctorList = doctor
680
           }
680
           }
681
         })
681
         })
682
 
682
 
683
       },
683
       },
684
       getDepartMent(id) {
684
       getDepartMent(id) {
685
-        var name = ''
685
+        var name = '';
686
         for (let i = 0; i < this.departMent.length; i++) {
686
         for (let i = 0; i < this.departMent.length; i++) {
687
           if (id == this.departMent[i].id) {
687
           if (id == this.departMent[i].id) {
688
             name = this.departMent[i].name
688
             name = this.departMent[i].name
691
         return name
691
         return name
692
       },
692
       },
693
       getDoctor(id) {
693
       getDoctor(id) {
694
-        var user_name = ''
694
+        var user_name = '';
695
         for (let i = 0; i < this.doctorList.length; i++) {
695
         for (let i = 0; i < this.doctorList.length; i++) {
696
           if (id == this.doctorList[i].admin_user_id) {
696
           if (id == this.doctorList[i].admin_user_id) {
697
             user_name = this.doctorList[i].user_name
697
             user_name = this.doctorList[i].user_name
700
         return user_name
700
         return user_name
701
       },
701
       },
702
       getMedicalTreatment(id) {
702
       getMedicalTreatment(id) {
703
-        var name = ''
703
+        var name = '';
704
         for (let i = 0; i < this.medicalCare.length; i++) {
704
         for (let i = 0; i < this.medicalCare.length; i++) {
705
           if (this.medicalCare[i].id == id) {
705
           if (this.medicalCare[i].id == id) {
706
             name = this.medicalCare[i].name
706
             name = this.medicalCare[i].name
714
         }
714
         }
715
         return ''
715
         return ''
716
       }, toReturnSZPatient(val) {
716
       }, toReturnSZPatient(val) {
717
-        var that = this
717
+        var that = this;
718
         this.$confirm('是否退号', '退号', {
718
         this.$confirm('是否退号', '退号', {
719
           confirmButtonText: '确 定',
719
           confirmButtonText: '确 定',
720
           cancelButtonText: '取 消',
720
           cancelButtonText: '取 消',
730
           })
730
           })
731
             .then(function(response) {
731
             .then(function(response) {
732
               if (response.data.state == 0) {
732
               if (response.data.state == 0) {
733
-                that.$message.error(response.data.msg)
733
+                that.$message.error(response.data.msg);
734
                 return false
734
                 return false
735
               } else {
735
               } else {
736
                 if (response.data.data.failed_code == -10) {
736
                 if (response.data.data.failed_code == -10) {
737
-                  that.$message.error(response.data.data.msg)
737
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
738
+                    confirmButtonText: '确 定',
739
+                    type: 'warning'
740
+                  }).then(() => {
741
+
742
+                  }).catch(() => {
743
+                  })
744
+                  // that.$message.error(response.data.data.msg)
738
 
745
 
739
                 } else {
746
                 } else {
740
-                  that.getlist()
747
+                  that.getlist();
741
                   that.$message({ message: '退号成功', type: 'success' })
748
                   that.$message({ message: '退号成功', type: 'success' })
742
                 }
749
                 }
743
               }
750
               }
748
         })
755
         })
749
       },
756
       },
750
       toReturnPatient(row) {
757
       toReturnPatient(row) {
751
-        var that = this
758
+        var that = this;
752
         this.$confirm('确认退号吗?', '退号', {
759
         this.$confirm('确认退号吗?', '退号', {
753
           confirmButtonText: '确 定',
760
           confirmButtonText: '确 定',
754
           cancelButtonText: '取 消',
761
           cancelButtonText: '取 消',
760
             'patient_id': row.patient_id,
767
             'patient_id': row.patient_id,
761
             'record_time': this.getTime(row.record_date, '{y}-{m}-{d}'),
768
             'record_time': this.getTime(row.record_date, '{y}-{m}-{d}'),
762
             'admin_user_id': this.$store.getters.xt_user.user.id
769
             'admin_user_id': this.$store.getters.xt_user.user.id
763
-          }
770
+          };
764
           axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
771
           axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
765
             params: params
772
             params: params
766
           })
773
           })
767
             .then(function(response) {
774
             .then(function(response) {
768
               if (response.data.state == 0) {
775
               if (response.data.state == 0) {
769
-                that.$message.error(response.data.msg)
776
+                that.$message.error(response.data.msg);
770
                 return false
777
                 return false
771
               } else {
778
               } else {
772
                 if (response.data.data.failed_code == -10) {
779
                 if (response.data.data.failed_code == -10) {
773
-                  that.$message.error(response.data.data.msg)
780
+                  // that.$message.error(response.data.data.msg)
781
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
782
+                    confirmButtonText: '确 定',
783
+                    type: 'warning'
784
+                  }).then(() => {
785
+
786
+                  }).catch(() => {
787
+                  })
774
                 } else {
788
                 } else {
775
-                  that.$message({ message: '退号成功', type: 'success', duration: 5000 })
789
+                  that.$message({ message: '退号成功', type: 'success', duration: 5000 });
776
                   that.getlist()
790
                   that.getlist()
777
                 }
791
                 }
778
               }
792
               }
795
       },
809
       },
796
 
810
 
797
       querySearchAsync(keyword, cb) {
811
       querySearchAsync(keyword, cb) {
798
-        let key = ''
812
+        let key = '';
799
         if (keyword != undefined) {
813
         if (keyword != undefined) {
800
           key = keyword
814
           key = keyword
801
         }
815
         }
802
-        let searchArray = []
816
+        let searchArray = [];
803
 
817
 
804
         var params = {
818
         var params = {
805
           keyword: key
819
           keyword: key
806
-        }
807
-        console.log('params', params)
820
+        };
821
+        console.log('params', params);
808
         getHisPatient(params).then(response => {
822
         getHisPatient(params).then(response => {
809
           if (response.data.state == 1) {
823
           if (response.data.state == 1) {
810
-            searchArray = response.data.data.patient
811
-            console.log('searcharrya', searchArray)
824
+            searchArray = response.data.data.patient;
825
+            console.log('searcharrya', searchArray);
812
             cb(searchArray)
826
             cb(searchArray)
813
           }
827
           }
814
-        })
828
+        });
815
         return searchArray
829
         return searchArray
816
       },
830
       },
817
 
831
 
818
       handleSelect(val) {
832
       handleSelect(val) {
819
-        this.search_input = val.name
833
+        this.search_input = val.name;
820
         this.getlist()
834
         this.getlist()
821
       },
835
       },
822
       handleClose(done) {
836
       handleClose(done) {
823
         done()
837
         done()
824
       },
838
       },
825
       open(obj) {
839
       open(obj) {
826
-        this.dialogVisible = true
827
-        this.form = obj
840
+        this.dialogVisible = true;
841
+        this.form = obj;
828
         console.log(obj)
842
         console.log(obj)
829
       },
843
       },
830
       getDictionaryDataConfig(type) {
844
       getDictionaryDataConfig(type) {
831
-        let arr = getDictionaryDataConfig('system', 'social_type')
832
-        let str = ''
845
+        let arr = getDictionaryDataConfig('system', 'social_type');
846
+        let str = '';
833
         arr.map(item => {
847
         arr.map(item => {
834
           if (item.id == type) {
848
           if (item.id == type) {
835
             str = item.name
849
             str = item.name
836
           }
850
           }
837
-        })
851
+        });
838
         return str
852
         return str
839
       },
853
       },
840
       getCertificates(type) {
854
       getCertificates(type) {
841
-        let arr = this.certificates
842
-        let str = ''
855
+        let arr = this.certificates;
856
+        let str = '';
843
         arr.map(item => {
857
         arr.map(item => {
844
           if (item.value == type) {
858
           if (item.value == type) {
845
             str = item.label
859
             str = item.label
846
           }
860
           }
847
-        })
861
+        });
848
         return str
862
         return str
849
       },
863
       },
850
       getSettlement(type) {
864
       getSettlement(type) {
851
-        let arr = this.settlement
852
-        let str = ''
865
+        let arr = this.settlement;
866
+        let str = '';
853
         arr.map(item => {
867
         arr.map(item => {
854
           if (item.value == type) {
868
           if (item.value == type) {
855
             str = item.label
869
             str = item.label
856
           }
870
           }
857
-        })
871
+        });
858
         return str
872
         return str
859
       },
873
       },
860
       getMedicalCare(type) {
874
       getMedicalCare(type) {
861
-        let arr = this.medicalCare
862
-        let str = ''
875
+        let arr = this.medicalCare;
876
+        let str = '';
863
         arr.map(item => {
877
         arr.map(item => {
864
           if (item.id == type) {
878
           if (item.id == type) {
865
             str = item.name
879
             str = item.name
866
           }
880
           }
867
-        })
881
+        });
868
         return str
882
         return str
869
       },
883
       },
870
       getRegister(type) {
884
       getRegister(type) {
871
-        let arr = this.newRegister
872
-        let str = ''
885
+        let arr = this.newRegister;
886
+        let str = '';
873
         arr.map(item => {
887
         arr.map(item => {
874
           if (item.value == type) {
888
           if (item.value == type) {
875
             str = item.label
889
             str = item.label
876
           }
890
           }
877
-        })
891
+        });
878
         return str
892
         return str
879
       },
893
       },
880
       getDepartMent(type) {
894
       getDepartMent(type) {
881
-        let arr = this.departMent
882
-        let str = ''
895
+        let arr = this.departMent;
896
+        let str = '';
883
         arr.map(item => {
897
         arr.map(item => {
884
           if (item.id == type) {
898
           if (item.id == type) {
885
             str = item.name
899
             str = item.name
886
           }
900
           }
887
-        })
901
+        });
888
         return str
902
         return str
889
       },
903
       },
890
 
904
 
891
       getBanlance(id) {
905
       getBanlance(id) {
892
-        var label = ''
906
+        var label = '';
893
         for (let i = 0; i < this.settlement.length; i++) {
907
         for (let i = 0; i < this.settlement.length; i++) {
894
           if (id == this.settlement[i].value) {
908
           if (id == this.settlement[i].value) {
895
             label = this.settlement[i].label
909
             label = this.settlement[i].label