Parcourir la source

11月23 结算单

yq1 il y a 8 heures
Parent
révision
eaaba8be36

+ 18 - 7
src/api/inspection.js Voir le fichier

@@ -60,7 +60,6 @@ export function GetInitInspections(params) {
60 60
   })
61 61
 }
62 62
 
63
-
64 63
 export function CreatePatientPICInspection(id, data) {
65 64
   return request({
66 65
     url: '/api/patient/pic_inspection/create?patient=' + id,
@@ -77,7 +76,6 @@ export function editPatientPICInspection(id, data) {
77 76
   })
78 77
 }
79 78
 
80
-
81 79
 export function setRemind(params) {
82 80
   return request({
83 81
     url: '/api/patient/inspection_remind/set',
@@ -94,10 +92,8 @@ export function setRemindDialog(id,is_open) {
94 92
   })
95 93
 }
96 94
 
97
-
98
-
99 95
 export function getNewInspectionList(params){
100
- 
96
+
101 97
   return request({
102 98
     url:"/api/getnewinspectionList",
103 99
     method:"get",
@@ -114,9 +110,8 @@ export function getNewInspectionDetailList(params){
114 110
   })
115 111
 }
116 112
 
117
-
118 113
 export function EditPatientNewInspection(data){
119
- 
114
+
120 115
   return request({
121 116
     url:"/api/editpatientnewinspection",
122 117
     method:"post",
@@ -124,7 +119,23 @@ export function EditPatientNewInspection(data){
124 119
   })
125 120
 }
126 121
 
122
+// 新的检验检查接口
123
+export function getinspecitonbypatientgroup(params){
124
+  return request({//?patient_id=
125
+    url:'/api/getinspecitonbypatientgroup',
126
+    method:"Get",
127
+    params:params,
128
+  })
129
+}
127 130
 
131
+// 新的检验检查接口
132
+export function getinspectionchildlist(params){
133
+  return request({
134
+    url:'/api/getinspectionchildlist',
135
+    method:"Get",
136
+    params:params,
137
+  })
138
+}
128 139
 
129 140
 
130 141
 

+ 0 - 1
src/xt_pages/user/components/PatientSidebar.vue Voir le fichier

@@ -423,7 +423,6 @@ export default {
423 423
         console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhh")
424 424
        this.$router.push({path:'/patient/patient/'+this.id+'/deathSummary'})
425 425
       }
426
-
427 426
     },
428 427
     changePatient(value) {
429 428
       console.log(value)

+ 123 - 93
src/xt_pages/user/inspection_new.vue Voir le fichier

@@ -73,7 +73,7 @@
73 73
             >新增
74 74
             </el-button
75 75
             >
76
-            <el-button
76
+            <!-- <el-button
77 77
               size="small"
78 78
               class="filter-item"
79 79
               type="primary"
@@ -92,7 +92,7 @@
92 92
               :disabled="itemDate ? false : true"
93 93
             >删除
94 94
             </el-button
95
-            >
95
+            > -->
96 96
           </div>
97 97
           <div class="filter-container">
98 98
             <el-button class="filter-item" type="text" style="color:#000"
@@ -102,7 +102,7 @@
102 102
               ></el-button
103 103
             >
104 104
           </div>
105
-          <div v-if="!isPic">
105
+          <div>
106 106
             <el-table
107 107
               stripe
108 108
               :header-cell-style="{
@@ -115,7 +115,7 @@
115 115
               style="width: 100%"
116 116
               id="user-inspection-order"
117 117
               ref="inspect_table"
118
-            > 
118
+            >
119 119
               <el-table-column
120 120
                 fixed
121 121
                 prop="inspect_date"
@@ -125,15 +125,15 @@
125 125
                   {{ getTime(scope.row.inspect_date) }}
126 126
                 </template>
127 127
               </el-table-column>
128
-              
128
+
129 129
               <el-table-column v-for="(item,index) in list" :key="index"
130 130
                 :prop="item.item_id"
131 131
                 :label="item.item_name" align="center"
132 132
                 min-width="130"
133
-              > 
133
+              >
134 134
                 <template slot-scope="scope">
135 135
                   <span v-if="item.range_type == 3">
136
-                    {{ getItemValueOne(scope.row.inspect_date,item.item_name) }}
136
+                    {{ getItemValue(scope.row.inspect_date,item.item_name) }}
137 137
                   </span>
138 138
 
139 139
                   <span v-if="item.range_type == 2">
@@ -145,7 +145,7 @@
145 145
                     <span v-if="parseFloat(getItemValue(scope.row.inspect_date,item.item_name)) < parseFloat(getrange(item.range_min)) ">
146 146
                       {{ getItemValue(scope.row.inspect_date,item.item_name) }} <span style="color: blue;" v-if="getItemValue(scope.row.inspect_date,item.item_name)>0">↓</span>
147 147
                     </span>
148
-                    <span v-if="parseFloat(getrange(item.range_min))<= parseFloat( getItemValue(scope.row.inspect_date,item.item_name)) && 
148
+                    <span v-if="parseFloat(getrange(item.range_min))<= parseFloat( getItemValue(scope.row.inspect_date,item.item_name)) &&
149 149
                           parseFloat(getItemValue(scope.row.inspect_date,item.item_name))<= parseFloat(getrange(item.range_max)) ">
150 150
                       {{ getItemValue(scope.row.inspect_date,item.item_name) }}
151 151
                     </span>
@@ -159,9 +159,19 @@
159 159
                   </span>
160 160
                 </template>
161 161
               </el-table-column>
162
+              <el-table-column
163
+                fixed="right"
164
+                prop="inspect_date"
165
+                label="操作"
166
+                align="center" width="150" >
167
+                <template slot-scope="scope">
168
+                  <el-button size="small" type="primary" @click="openEdit(scope.row)">修改</el-button>
169
+                  <el-button size="small" type="danger" @click="deleteInspection(scope.row)">删除</el-button>
170
+                </template>
171
+              </el-table-column>
162 172
             </el-table>
163 173
           </div>
164
- 
174
+
165 175
           <!-- <el-pagination
166 176
             align="right"
167 177
             @current-change="handleCurrentChangePage"
@@ -236,6 +246,7 @@
236 246
       </div>
237 247
     </el-dialog>
238 248
 
249
+    <!-- 新增修改 -->
239 250
     <el-dialog
240 251
       :title="formTitle"
241 252
       :visible.sync="dialogFormVisible"
@@ -343,7 +354,7 @@
343 354
 <script>
344 355
 import PatientSidebar from './components/PatientSidebar'
345 356
 import { getToken } from '@/api/qiniu'
346
-
357
+import moment from "moment"
347 358
 import {
348 359
   CreatePatientInspection,
349 360
   CreatePatientPICInspection,
@@ -430,7 +441,7 @@ export default {
430 441
           return false
431 442
         }
432 443
         console.log('response.data.data11',response.data.data);
433
-        
444
+
434 445
       })
435 446
     },
436 447
     getchildlist(project){
@@ -447,11 +458,8 @@ export default {
447 458
           // inspection.forEach(item => {
448 459
           //   referenceList.forEach(ite => {
449 460
           //     item.Child.forEach(it =>{
450
-                
451 461
           //       if(ite.item_id == it.item_id){
452
-          //         it.range_type = ite.range_type
453
-          //         it.range_max = ite.range_max
454
-          //         it.range_min = ite.range_min
462
+          //         ite.inspect_value = it.inspect_value
455 463
           //       }
456 464
 
457 465
           //       // if()
@@ -462,14 +470,13 @@ export default {
462 470
           this.list = referenceList
463 471
           this.$nextTick(() => {
464 472
             this.$refs.inspect_table.doLayout();
465
-
466 473
             // table加ref="multipleTable"
467 474
           });
468 475
         }
469 476
         console.log('response.data.data22',response.data.data);
470 477
       })
471 478
     },
472
-    
479
+
473 480
     changeInput(item) {
474 481
 
475 482
       if (item.item_name == '血清铁' || item.item_name == '总铁结合力') {
@@ -488,7 +495,11 @@ export default {
488 495
         })
489 496
       }
490 497
     },
491
-    deleteInspection() {
498
+    deleteInspection(row) {
499
+      this.project =row
500
+      this.itemDate = this.getTime(row.inspect_date)
501
+      console.log('itemDate',this.itemDate);
502
+
492 503
       if (this.project == null || this.itemDate == '') {
493 504
         this.$message.error('请先选择删除删除的记录')
494 505
         return false
@@ -505,6 +516,8 @@ export default {
505 516
             date: this.itemDate,
506 517
             project_id: this.project.project_id
507 518
           }
519
+          console.log('params');
520
+
508 521
           DeletePatientInspection(params).then(response => {
509 522
             if (response.data.state == 0) {
510 523
               this.$message.error(response.data.msg)
@@ -517,18 +530,18 @@ export default {
517 530
                 duration: 2000
518 531
               })
519 532
 
520
-              for (var index in this.projects) {
521
-                if (this.projects[index].project_id == params.project_id) {
522
-                  this.projects[index].count--
523
-                  break
524
-                }
525
-              }
526
-              this.total -= 1
533
+              // for (var index in this.projects) {
534
+              //   if (this.projects[index].project_id == params.project_id) {
535
+              //     this.projects[index].count--
536
+              //     break
537
+              //   }
538
+              // }
539
+              // this.total -= 1
527 540
               this.itemDate = ''
528 541
               this.items = []
529 542
               if (this.total > 0) {
530 543
                 this.queryParams.page = 1
531
-                this.fetchPatientInspections(this.queryParams)
544
+                this.getchildlist(this.project.project_id)
532 545
               }
533 546
             }
534 547
           })
@@ -585,19 +598,18 @@ export default {
585 598
           this.dialogRemindFormVisible = false
586 599
         }
587 600
       })
588
-    }, 
589
-    openEdit() {
590
-
591
-      if (this.project == null) {
592
-        this.$message.error('请先选择项目')
593
-        return false
594
-      }
601
+    },
602
+    openEdit(row) {
603
+      console.log('row111',uParseTime(row.inspect_date, '{y}-{m}-{d} {h}:{i}'));
604
+      this.itemDate =''
605
+      this.itemDate = this.getTime(row.inspect_date)
606
+      this.project =row
595 607
       if(this.isPic){
596 608
         this.form.pic_method = 'edit'
597 609
         this.formTitle = '修改' + this.project.project_name
598 610
         this.form.project_id = this.project.project_id
599
-        this.form.inspect_date = this.itemDate
600
-        this.form.old_inspect_date = this.itemDate
611
+        this.form.inspect_date = this.project.inspect_date
612
+        this.form.old_inspect_date = this.project.inspect_date
601 613
         this.form.imgs = []
602 614
         this.form.delete_imgs = []
603 615
         for(var index in this.inspections){
@@ -610,12 +622,14 @@ export default {
610 622
         console.log(this.form.imgs)
611 623
         this.dialogPicFormVisible = true
612 624
       }else{
613
-        console.log("22222")
625
+        console.log("22222",this.itemDate)
614 626
         this.form.method = 'edit'
615 627
         this.formTitle = '修改' + this.project.project_name
616 628
         this.form.project_id = this.project.project_id
617 629
         this.form.inspect_date = this.itemDate
618 630
         this.form.old_inspect_date = this.itemDate
631
+        // this.form.inspect_date = this.project.inspect_date
632
+        // this.form.old_inspect_date = this.project.inspect_date
619 633
         if(this.form.project_id == 14) {
620 634
           this.form.remind_cycle = this.patient_info.remind_cycle
621 635
         }else{
@@ -623,42 +637,40 @@ export default {
623 637
         }
624 638
         console.log(this.form.remind_cycle)
625 639
 
626
-
627 640
         this.form.formItem = []
628
-        console.log("hhhhhhhhhhhhh",this.project.inspection_reference)
629
-        console.log("inspectionsMap",this.inspectionsMap)
630
-        for (var index in this.project.inspection_reference) {
641
+        console.log("hhhhhhhhhhhhh",this.list)
642
+        console.log("inspectionsMap",row)
643
+        for (var index in this.list) {
631 644
           if(this.org_id ==10138){
632 645
             this.form.formItem.push({
633
-              id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
634
-              project_id: this.project.inspection_reference[index].project_id,
635
-              project_name: this.project.inspection_reference[index].project_name,
636
-              item_id: this.project.inspection_reference[index].id,
637
-              item: this.project.inspection_reference[index].item,
638
-              item_name: this.project.inspection_reference[index].item_name,
639
-              range_type: this.project.inspection_reference[index].range_type,
640
-              value: this.project.inspection_reference[index].item_id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].item_id].inspect_value : '',
641
-              select_options: this.project.inspection_reference[index].range_options.split(','),
642
-              unit: this.project.inspection_reference[index].unit,
643
-              item_id:parseInt(this.project.inspection_reference[index].item_id) ,
646
+              id: this.list[index].id,
647
+              project_id: this.list[index].project_id,
648
+              project_name: this.list[index].project_name,
649
+              item_id: this.list[index].item_id,
650
+              item: this.list[index].item,
651
+              item_name: this.list[index].item_name,
652
+              range_type: this.list[index].range_type,
653
+              value: this.getvalue(this.list[index].item_id,row.inspect_date),
654
+              select_options: this.list[index].range_options.split(','),
655
+              unit: this.list[index].unit,
656
+              item_id:parseInt(this.list[index].item_id) ,
644 657
             })
645 658
           }else{
646 659
             this.form.formItem.push({
647
-            id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
648
-            project_id: this.project.inspection_reference[index].project_id,
649
-            project_name: this.project.inspection_reference[index].project_name,
650
-            item_id: this.project.inspection_reference[index].id,
651
-            item: this.project.inspection_reference[index].item,
652
-            item_name: this.project.inspection_reference[index].item_name,
653
-            range_type: this.project.inspection_reference[index].range_type,
654
-            value: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].inspect_value : '',
655
-            select_options: this.project.inspection_reference[index].range_options.split(','),
656
-            unit: this.project.inspection_reference[index].unit
657
-          })
660
+              id: this.list[index].id,
661
+              project_id: this.list[index].project_id,
662
+              project_name: this.list[index].project_name,
663
+              item_id: this.list[index].item_id,
664
+              item_name: this.list[index].item_name,
665
+              range_type: this.list[index].range_type,
666
+              value: this.getvalue(this.list[index].item_id,row.inspect_date) ,
667
+              select_options: this.list[index].range_options.split(','),
668
+              unit: this.list[index].unit
669
+            })
658 670
           }
659 671
 
660 672
         }
661
-        console.log(this.form.formItem)
673
+        console.log('11111',this.form.formItem)
662 674
         this.dialogFormVisible = true
663 675
       }
664 676
 
@@ -669,12 +681,14 @@ export default {
669 681
     setRemind(){
670 682
       this.dialogRemindFormVisible = true
671 683
     },
672
- 
684
+
673 685
     openNew() {
686
+      console.log('this.project',this.project);
674 687
       if (this.project == null) {
675 688
         this.$message.error('请先选择项目')
676 689
         return false
677 690
       }
691
+
678 692
       this.form.method = 'add'
679 693
       this.formTitle = '新增' + this.project.project_name
680 694
       this.form.project_id = this.project.project_id
@@ -683,31 +697,31 @@ export default {
683 697
       }
684 698
       // this.form.remind_cycle = this.patient_info.remind_cycle
685 699
       var today = new Date()
686
-      this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
700
+      this.form.inspect_date = this.getTime(today)
687 701
       this.form.formItem = []
688 702
 
689
-      console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhh",this.project.inspection_reference)
690
-      for (var index in this.project.inspection_reference) {
703
+      console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhh",this.list)
704
+      for (var index in this.list) {
691 705
         var item_id =0
692
-        if(this.project.inspection_reference[index].item_id == 0){
693
-            item_id =  parseInt(this.project.inspection_reference[index].id) 
706
+        if(this.list[index].item_id == 0){
707
+            item_id =  parseInt(this.list[index].id)
694 708
         }
695
-        if(this.project.inspection_reference[index].item_id > 0){
696
-          item_id = parseInt(this.project.inspection_reference[index].item_id) 
709
+        if(this.list[index].item_id > 0){
710
+          item_id = parseInt(this.list[index].item_id)
697 711
         }
698 712
         this.form.formItem.push({
699 713
           id: 0,
700
-          project_id: this.project.inspection_reference[index].project_id,
701
-          project_name: this.project.inspection_reference[index].project_name,
714
+          project_id: this.list[index].project_id,
715
+          project_name: this.list[index].project_name,
702 716
           item_id:item_id,
703
-          item: this.project.inspection_reference[index].item,
704
-          item_name: this.project.inspection_reference[index].item_name,
705
-          range_type: this.project.inspection_reference[index].range_type,
717
+          item: this.list[index].item,
718
+          item_name: this.list[index].item_name,
719
+          range_type: this.list[index].range_type,
706 720
           value: '',
707
-          select_options: this.project.inspection_reference[
721
+          select_options: this.list[
708 722
             index
709 723
             ].range_options.split(','),
710
-          unit: this.project.inspection_reference[index].unit
724
+          unit: this.list[index].unit
711 725
         })
712 726
       }
713 727
       console.log('form.formItem', this.form.formItem)
@@ -805,7 +819,7 @@ export default {
805 819
 
806 820
           console.log("this.form",this.form)
807 821
 
808
-         
822
+
809 823
           CreatePatientInspection(
810 824
             this.patientID,
811 825
             this.form,
@@ -893,7 +907,7 @@ export default {
893 907
         }
894 908
       })
895 909
     },
896
- 
910
+
897 911
     deletePic(item,index){
898 912
       if(item.id == 0){
899 913
         this.form.imgs.splice(index,1)
@@ -920,7 +934,7 @@ export default {
920 934
             this.patient_info = patient_info
921 935
             this.pageLoading = false
922 936
             console.log('11111',response.data.data);
923
-            
937
+
924 938
             // this.form.remind_cycle = this.patient_info.remind_cycle
925 939
           } else {
926 940
             this.$message.error(response.data.msg)
@@ -1034,14 +1048,14 @@ export default {
1034 1048
     //               }else{
1035 1049
     //                 console.log('执行3',inspectionsMap,item);
1036 1050
     //                 if(this.org_id == 10702 || this.org_id == 0){
1037
-    //                   if(item.project_name == '血常规'|| item.project_name == '透后肾功能' || 
1051
+    //                   if(item.project_name == '血常规'|| item.project_name == '透后肾功能' ||
1038 1052
     //                       item.project_name == '肝功能' || item.project_name == '电解质' || item.project_name == '透前肾功能'
1039 1053
     //                     ){
1040 1054
     //                     console.log('11111',inspectionsMap[items[index].id].inspect_value);
1041 1055
     //                     item.value = inspectionsMap[items[index].id].inspect_value.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
1042 1056
     //                     item.item_name = inspectionsMap[items[index].id].item_name
1043 1057
     //                   }else{
1044
-                        
1058
+
1045 1059
     //                     item.value = ''
1046 1060
     //                     item.item_name = ''
1047 1061
     //                   }
@@ -1055,7 +1069,7 @@ export default {
1055 1069
     //               item.value = inspectionsMap[items[index].item_id].inspect_value.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
1056 1070
     //               item.item_name = inspectionsMap[items[index].item_id].item_name
1057 1071
     //             }
1058
-               
1072
+
1059 1073
 
1060 1074
     //             if(this.org_id ==10191){
1061 1075
     //               if(item.project_name == "乙肝定性(五项)"){
@@ -1116,14 +1130,14 @@ export default {
1116 1130
     //   }, 1000)
1117 1131
     // },
1118 1132
     getTime(val) {
1119
-        if(val < 0){
1120
-          return ""
1121
-        }
1122
-        if(val == ""){
1133
+      if(val < 0){
1123 1134
         return ""
1124
-        }else {
1125
-        return uParseTime(val, '{y}-{m}-{d}')
1126
-        }
1135
+      }
1136
+      if(val == ""){
1137
+      return ""
1138
+      }else {
1139
+        return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1140
+      }
1127 1141
     },
1128 1142
     getItemValue(inspect_date,item_name){
1129 1143
       var inspect_value = ""
@@ -1142,7 +1156,23 @@ export default {
1142 1156
       }else{
1143 1157
         return ''
1144 1158
       }
1145
-      
1159
+
1160
+    },
1161
+    getvalue(val,time){
1162
+      console.log();
1163
+      const options = this.items
1164
+      for(let i in options){
1165
+        if( options[i].inspect_date == time){
1166
+          for(let j in options[i].Child){
1167
+            if(options[i].Child[j].item_id == val){
1168
+              console.log('options[i].inspect_value',options[i].inspect_value);
1169
+              return options[i].Child[j].inspect_value
1170
+            }
1171
+
1172
+          }
1173
+        }
1174
+
1175
+      }
1146 1176
     }
1147 1177
   },
1148 1178
   created() {
@@ -1161,7 +1191,7 @@ export default {
1161 1191
     // this.fetchInspectionReference()
1162 1192
   },
1163 1193
   mounted(){
1164
-    
1194
+
1165 1195
   }
1166 1196
 }
1167 1197
 </script>