Browse Source

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 years ago
parent
commit
d774e79cfe

+ 18 - 0
src/api/config.js View File

@@ -119,6 +119,24 @@ export function generateLog(params) {
119 119
 
120 120
 
121 121
 
122
+export function getAllIsOpenInit() {
123
+  return request({
124
+    url: '/api/isopen/init',
125
+    method: 'get',
126
+  })
127
+}
128
+
129
+
130
+export function postXtHisIsOpen(params) {
131
+  return request({
132
+    url: '/api/xtconfig/isopen',
133
+    method: 'post',
134
+    params: params
135
+  })
136
+}
137
+
138
+
139
+
122 140
 
123 141
 
124 142
 

+ 1 - 1
src/api/his/his.js View File

@@ -134,7 +134,7 @@ export function getHisPrescriptionList(params) {
134 134
 
135 135
 export function getHisPrescriptionInfo(params){
136 136
   return request({
137
-    url:"",
137
+    url:"/api/hisprescription/info",
138 138
     method:"get",
139 139
     params:params
140 140
   })

+ 101 - 40
src/xt_pages/data/basicConfig.vue View File

@@ -5,43 +5,50 @@
5 5
     </div>
6 6
     <div class="app-container">
7 7
         <p style="font-size:18px">开关配置</p>
8
-        <div class="configBox">
9
-            <p>收费发药</p>
10
-            <p style="font-size:14px;margin-top:5px;">开启收费发药分离后,处方发药的工作需要到收费发药页面完成</p>
11
-            <p style="margin-top:20px;">收费,发药分离:
12
-                <el-switch v-model="value"></el-switch>
13
-            </p>
14
-        </div>
15
-        <div class="configBox">
16
-            <p>药品,耗材出库</p>
17
-            <p style="font-size:14px;margin-top:5px;">开启药品,耗材出库自动扣减则医生开完医嘱或处方可直接出库,不开启则由发药动作或出库按钮手动出库</p>
18
-            <div style="display:flex;margin-top:20px;">
19
-                <p style="margin-right:20px;">药品出库:
20
-                    <el-switch v-model="value"></el-switch>
21
-                </p>
22
-                <p>耗材出库:
23
-                    <el-switch v-model="value"></el-switch>
24
-                </p>
25
-            </div>
26
-        </div>
27
-        <div class="configBox">
28
-            <p style="margin-bottom:20px;">药品有效期预警设置(药品即将失效的预警提示)</p>
29
-            <el-select v-model="value" placeholder="请选择">
30
-                <el-option
31
-                v-for="item in options"
32
-                :key="item.value"
33
-                :label="item.label"
34
-                :value="item.value">
35
-                </el-option>
36
-            </el-select>
37
-        </div>
38
-        <div class="configBox">
39
-            <p>处方单价锁定</p>
40
-            <p style="font-size:14px;margin-top:5px;">开启处方单价锁定后,开处方是无法修改药品或者诊疗项目以及附加费用单价</p>
41
-            <p style="margin-top:20px;">收费单价锁定:
42
-                <el-switch v-model="value"></el-switch>
43
-            </p>
44
-        </div>
8
+        <!--<div class="configBox">-->
9
+            <!--<p>收费发药</p>-->
10
+            <!--<p style="font-size:14px;margin-top:5px;">开启收费发药分离后,处方发药的工作需要到收费发药页面完成</p>-->
11
+            <!--<p style="margin-top:20px;">收费,发药分离:-->
12
+                <!--<el-switch v-model="value"></el-switch>-->
13
+            <!--</p>-->
14
+        <!--</div>-->
15
+      <div class="configBox">
16
+      <p>血透His互通</p>
17
+      <p style="font-size:14px;margin-top:5px;">血透His互通</p>
18
+      <p style="margin-top:20px;">血透His互通
19
+      <el-switch v-model="is_open_xt_his" @change="changeFuncOne"></el-switch>
20
+      </p>
21
+      </div>
22
+        <!--<div class="configBox">-->
23
+            <!--<p>药品,耗材出库</p>-->
24
+            <!--<p style="font-size:14px;margin-top:5px;">开启药品,耗材出库自动扣减则医生开完医嘱或处方可直接出库,不开启则由发药动作或出库按钮手动出库</p>-->
25
+            <!--<div style="display:flex;margin-top:20px;">-->
26
+                <!--<p style="margin-right:20px;">药品出库:-->
27
+                    <!--<el-switch v-model="value" @change="changeFuncTwo"></el-switch>-->
28
+                <!--</p>-->
29
+                <!--<p>耗材出库:-->
30
+                    <!--<el-switch v-model="value"></el-switch>-->
31
+                <!--</p>-->
32
+            <!--</div>-->
33
+        <!--</div>-->
34
+        <!--<div class="configBox">-->
35
+            <!--<p style="margin-bottom:20px;">药品有效期预警设置(药品即将失效的预警提示)</p>-->
36
+            <!--<el-select v-model="value" placeholder="请选择">-->
37
+                <!--<el-option-->
38
+                <!--v-for="item in options"-->
39
+                <!--:key="item.value"-->
40
+                <!--:label="item.label"-->
41
+                <!--:value="item.value">-->
42
+                <!--</el-option>-->
43
+            <!--</el-select>-->
44
+        <!--</div>-->
45
+        <!--<div class="configBox">-->
46
+            <!--<p>处方单价锁定</p>-->
47
+            <!--<p style="font-size:14px;margin-top:5px;">开启处方单价锁定后,开处方是无法修改药品或者诊疗项目以及附加费用单价</p>-->
48
+            <!--<p style="margin-top:20px;">收费单价锁定:-->
49
+                <!--<el-switch v-model="value"></el-switch>-->
50
+            <!--</p>-->
51
+        <!--</div>-->
45 52
         <div class="configBox">
46 53
             <p>打印预览设置</p>
47 54
             <p style="font-size:14px;margin-top:5px;">开启直接打印后,处方单,售药单,收费发票等打印时跳过预览</p>
@@ -55,6 +62,7 @@
55 62
 
56 63
 <script>
57 64
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
65
+import { getAllIsOpenInit,postXtHisIsOpen } from '@/api/config'
58 66
 
59 67
 export default {
60 68
   name: "printTemplate",
@@ -66,14 +74,67 @@ export default {
66 74
         { path: false, name: "管理中心" },
67 75
         { path: false, name: "基础配置" }
68 76
       ],
69
-      value:false
77
+      value:false,
78
+      is_open_xt_his:false,
70 79
     };
71 80
   },
72 81
   methods: {
73
-    
82
+    getInitIsOpenConfig(){
83
+      getAllIsOpenInit().then(
84
+        response => {
85
+          if (response.data.state === 1) {
86
+            if(response.data.data.is_open_xt_his == 1) {
87
+              this.is_open_xt_his = true
88
+            }else{
89
+              this.is_open_xt_his = false
90
+            }
91
+
92
+          } else {
93
+            this.$message.error(response.data.msg)
94
+          }
95
+        }
96
+      )
97
+
98
+    },
99
+    changeFuncOne(val){
100
+      if(this.is_open_xt_his){
101
+        let params={
102
+          is_open:this.is_open_xt_his
103
+        }
104
+        postXtHisIsOpen(params).then(
105
+          response => {
106
+            if (response.data.state === 1) {
107
+              this.is_open_xt_his = response.data.data.is_open
108
+
109
+            } else {
110
+              this.$message.error(response.data.msg)
111
+            }
112
+          }
113
+        )
114
+      }else{
115
+        let params={
116
+          is_open:this.is_open_xt_his
117
+        }
118
+        postXtHisIsOpen(params).then(
119
+          response => {
120
+            if (response.data.state === 1) {
121
+              this.is_open_xt_his = response.data.data.is_open
122
+
123
+            } else {
124
+              this.$message.error(response.data.msg)
125
+            }
126
+          }
127
+        )
128
+      }
129
+
130
+
131
+
132
+    }
133
+
74 134
   },
75 135
   created() {
76
-    
136
+    this.getInitIsOpenConfig()
137
+
77 138
   }
78 139
 };
79 140
 </script>

+ 99 - 60
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -42,13 +42,16 @@
42 42
             </el-select>
43 43
           </el-form-item>
44 44
           <el-form-item label="诊断:" prop="name">
45
-            <el-autocomplete
46
-              style="width:100%;"
47
-              class="inline-input"
48
-              v-model="state1"
49
-              :fetch-suggestions="querySearch"
50
-              placeholder="请输入内容"
51
-            ></el-autocomplete>
45
+
46
+            <el-select style="margin-right:5px;" v-model="state1" placeholder="">
47
+              <el-option
48
+                v-for="(item,index) in sick"
49
+                :key="index"
50
+                :label="item.class_name"
51
+                :value="item.id">
52
+              </el-option>
53
+            </el-select>
54
+
52 55
           </el-form-item>
53 56
           <el-form-item label="过敏病史: " prop="name">
54 57
             <el-autocomplete
@@ -83,7 +86,7 @@
83 86
         </div>
84 87
         <div class="costBox">
85 88
           <span>医生:</span>
86
-          <el-select style="margin-right:5px;" v-model="doctorValue" placeholder="">
89
+          <el-select style="margin-right:5px;" v-model="doctorValue" placeholder="" @change="changeDoctor">
87 90
             <el-option
88 91
               v-for="(item,index) in doctors"
89 92
               :key="index"
@@ -94,15 +97,15 @@
94 97
           <span>科室:</span>
95 98
           <el-select style="margin-right:5px;" v-model="departmentValue" placeholder="">
96 99
             <el-option
97
-              v-for="(item,index) in getDictionaryDataConfig('system','department')"
100
+              v-for="(item,index) in department"
98 101
               :key="index"
99 102
               :label="item.name"
100
-              :value="item.name">
103
+              :value="item.id">
101 104
             </el-option>
102 105
           </el-select>
103
-          <span>总:</span>
106
+          <span>总:</span>
104 107
           <span style="color:red;">{{ getTotal() }}</span>元
105
-          <span >{{order_status}}</span>
108
+          <span>{{order_status}}</span>
106 109
 
107 110
         </div>
108 111
       </div>
@@ -116,7 +119,8 @@
116 119
             <el-tabs class="rightTabs" v-model="activeName">
117 120
               <el-tab-pane label="药品列表" name="1">
118 121
                 <div style="margin-bottom:5px;display:flex;">
119
-                  <el-input style="width:50%;"  @keyup.enter.native='searchAction' v-model.trim="search_keyword" placeholder=""></el-input>
122
+                  <el-input style="width:50%;"  @input="searchAction" @keyup.enter.native='searchAction' v-model.trim="search_keyword"
123
+                            placeholder="请输入药品名字"></el-input>
120 124
                   <el-select style="margin-left:5px;width:50%;" v-model="value" placeholder="" @change="changeKind">
121 125
                     <el-option
122 126
                       label="全部"
@@ -130,7 +134,8 @@
130 134
                     </el-option>
131 135
                   </el-select>
132 136
                 </div>
133
-                <el-table ref="multipleTable" :data="drugs" border @select='selectDrugs' style="width: 100%;flex:1;overflow-y: auto;"
137
+                <el-table ref="multipleTable" :data="drugs" border @select='selectDrugs'
138
+                          style="width: 100%;flex:1;overflow-y: auto;"
134 139
                           :row-style="{ color: '#303133' }"
135 140
                           @select-all="changeAllGoodInfoTableData"
136 141
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
@@ -152,15 +157,16 @@
152 157
                 <div style="margin-bottom:5px;">
153 158
                   <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
154 159
                   <el-select style="float: right;width: 49%;" v-model="value" placeholder="">
155
-                      <el-option
160
+                    <el-option
156 161
                       v-for="item in options"
157 162
                       :key="item.value"
158 163
                       :label="item.label"
159 164
                       :value="item.value">
160
-                      </el-option>
165
+                    </el-option>
161 166
                   </el-select>
162 167
                 </div>
163
-                <el-table ref="multipleTableTwo" :data="advices_template" border style="width: 100%;flex:1;overflow-y: auto;"
168
+                <el-table ref="multipleTableTwo" :data="advices_template" border
169
+                          style="width: 100%;flex:1;overflow-y: auto;"
164 170
                           :row-style="{ color: '#303133' }"
165 171
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
166 172
                           highlight-current-row>
@@ -185,7 +191,8 @@
185 191
           <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showTwo">
186 192
             <el-tabs class="rightTabs" v-model="activeName">
187 193
               <el-tab-pane label="项目列表" name="1">
188
-                <el-table ref="tables" :data="tabProject" border @select='selectChange' style="width: 100%;flex:1;overflow-y: auto;"
194
+                <el-table ref="tables" :data="tabProject" border @select='selectChange'
195
+                          style="width: 100%;flex:1;overflow-y: auto;"
189 196
                           :row-style="{ color: '#303133' }"
190 197
                           @select-all="changeAllGoodInfoTableDataTwo"
191 198
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
@@ -203,7 +210,8 @@
203 210
                 </el-table>
204 211
               </el-tab-pane>
205 212
               <el-tab-pane label="项目组套" name="2">
206
-                <el-table :data="tabPrjectTeam"  border style="width: 100%;flex:1;overflow-y: auto;" :row-style="{ color: '#303133' }"
213
+                <el-table :data="tabPrjectTeam" border style="width: 100%;flex:1;overflow-y: auto;"
214
+                          :row-style="{ color: '#303133' }"
207 215
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
208 216
                           highlight-current-row
209 217
                           @select='selectTeam'>
@@ -266,7 +274,7 @@
266 274
       hisPatientInfo: Object,
267 275
       prescriptions: Array,
268 276
       record_date: String,
269
-      search_keyword:"",
277
+      search_keyword: '',
270 278
 
271 279
       other_sick: {
272 280
         type: Array,
@@ -326,17 +334,31 @@
326 334
         doctors: [],
327 335
         departMent: [],
328 336
         curStatus: 0,
329
-        order_status:"",
337
+        order_status: '',
330 338
         register_types: [
331 339
           { id: 1, name: '医保' },
332 340
           { id: 2, name: '自费' }
333 341
 
334
-        ]
342
+        ],
343
+        department:[],
344
+        sick:[]
335 345
       }
336 346
     },
337 347
     methods: {
338
-      searchAction(){
339
-        console.log(this.search_keyword)
348
+      searchAction() {
349
+        if(this.search_keyword.length == 0){
350
+          this.drugs = this.allDrugs
351
+        }else{
352
+          let arr = []
353
+          for (let i = 0; i < this.drugs.length; i++){
354
+            if(this.drugs[i].drug_name.indexOf(this.search_keyword) != -1){
355
+              arr = arr.concat(this.drugs[i])
356
+            }
357
+          }
358
+          this.drugs = arr
359
+
360
+        }
361
+
340 362
 
341 363
       },
342 364
       getTotal() {
@@ -408,6 +430,10 @@
408 430
             this.allDrugs = response.data.data.drugs
409 431
             this.advices_template = response.data.data.advices_template
410 432
             this.doctors = response.data.data.doctors
433
+            this.department = response.data.data.department
434
+            this.sick = response.data.data.sick
435
+
436
+
411 437
 
412 438
           }
413 439
         })
@@ -485,21 +511,19 @@
485 511
         this.departmentValue = info.departments
486 512
         this.register_type = info.register_type
487 513
 
488
-        if(info.prescription_status == 1 || info.prescription_status == 2){
489
-          this.order_status  = "未收费"
514
+        if (info.prescription_status == 1 || info.prescription_status == 2) {
515
+          this.order_status = '未收费'
490 516
 
491 517
         }
492 518
 
493
-        if(info.prescription_status == 3){
494
-          this.order_status  = "已结算"
519
+        if (info.prescription_status == 3) {
520
+          this.order_status = '已结算'
495 521
         }
496 522
 
497
-
498
-        if(info.prescription_status == 4){
499
-          this.order_status  = "已退费"
523
+        if (info.prescription_status == 4) {
524
+          this.order_status = '已退费'
500 525
         }
501 526
 
502
-
503 527
         // console.log(this.$refs)
504 528
         // this.$nextTick(() => {
505 529
         //   this.$refs.prescription_tables.setNewData(this.prescriptions[0])
@@ -511,7 +535,7 @@
511 535
         }
512 536
       },
513 537
       open(index) {
514
-        if(this.curPrescriptions.order_status >= 2){
538
+        if (this.curPrescriptions.order_status >= 2) {
515 539
           this.$message.error('当前处方处于结算或者退费状态,无法保存')
516 540
           return
517 541
         }
@@ -574,22 +598,21 @@
574 598
 
575 599
       },
576 600
       addTab(targetName) {
577
-        if(this.curPrescriptions.order_status >= 2){
601
+        if (this.curPrescriptions.order_status >= 2) {
578 602
           this.$message.error('该处方已经结算或者退费,无法继续添加处方')
579 603
           return
580 604
         }
581
-        if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0 ){
605
+        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
582 606
           this.$message.error('当前处方无数据,新增数据后才能新增处方')
583 607
           return
584 608
         }
585 609
 
586
-
587 610
         ++this.tabIndex
588 611
         let newTabName = '处方' + this.tabIndex
589 612
         this.prescriptions.push({
590 613
           id: 0,
591 614
           name: newTabName,
592
-          order_status:0,
615
+          order_status: 0,
593 616
           advices: [],
594 617
           project: []
595 618
 
@@ -599,11 +622,11 @@
599 622
         this.curStatus = 0
600 623
       },
601 624
       removeTab(targetName) {
602
-        if(this.curPrescriptions.order_status == 2){
625
+        if (this.curPrescriptions.order_status == 2) {
603 626
           this.$message.error('该处方已经结算,无法删除')
604 627
           return
605 628
         }
606
-        if(targetName == "处方1"){
629
+        if (targetName == '处方1') {
607 630
           this.$message.error('该处方无法删除')
608 631
           return
609 632
         }
@@ -765,7 +788,7 @@
765 788
         this.curDrugs = selection
766 789
       },
767 790
       comfirm() {
768
-        if(this.curPrescriptions.order_status >= 2){
791
+        if (this.curPrescriptions.order_status >= 2) {
769 792
           this.$message.error('该处方已经结算或者退费,无法继续添加药品或者项目')
770 793
           this.teamList = []
771 794
           this.curDrugs = []
@@ -910,7 +933,7 @@
910 933
         })
911 934
       },
912 935
       selectTeam(row) {
913
-        console.log("row------",row)
936
+        console.log('row------', row)
914 937
         var arr = []
915 938
         for (let i = 0; i < row.length; i++) {
916 939
           arr.push(row[i].project_id)
@@ -936,7 +959,7 @@
936 959
         const params = {
937 960
           project_id: idstr
938 961
         }
939
-        console.log("params",params)
962
+        console.log('params', params)
940 963
         getPojectListById(params).then(response => {
941 964
           if (response.data.state == 1) {
942 965
             var project = response.data.data.project
@@ -945,6 +968,14 @@
945 968
             this.teamList = project
946 969
           }
947 970
         })
971
+      },changeDoctor(val){
972
+        console.log(val)
973
+        console.log(this.doctors)
974
+        for (let i = 0; i < this.doctors.length;i++){
975
+          if(this.doctors[i].admin_user_id == this.doctorValue){
976
+            this.departmentValue = this.doctors[i].department_id
977
+          }
978
+        }
948 979
       }
949 980
     },
950 981
     created() {
@@ -1049,10 +1080,12 @@
1049 1080
     height: 100%;
1050 1081
     display: flex;
1051 1082
     flex-direction: column;
1052
-    .el-tabs__content{
1053
-      flex:1;
1054
-      overflow-y: auto;
1055
-    }
1083
+
1084
+  .el-tabs__content {
1085
+    flex: 1;
1086
+    overflow-y: auto;
1087
+  }
1088
+
1056 1089
   }
1057 1090
 
1058 1091
   .costBox {
@@ -1106,10 +1139,11 @@
1106 1139
   }
1107 1140
 
1108 1141
   }
1109
-  .rightTabs{
1142
+  .rightTabs {
1110 1143
     display: flex;
1111 1144
     flex-direction: column;
1112 1145
   }
1146
+
1113 1147
   .comfirmBox {
1114 1148
     width: 100%;
1115 1149
     height: 60px;
@@ -1165,22 +1199,27 @@
1165 1199
 
1166 1200
   }
1167 1201
   .preTabs {
1168
-    .el-tabs__content{
1169
-      flex:1;
1170
-      overflow-y: auto;
1171
-    }
1202
+
1203
+  .el-tabs__content {
1204
+    flex: 1;
1205
+    overflow-y: auto;
1206
+  }
1207
+
1172 1208
   }
1173 1209
   .rightTabs {
1174 1210
     height: 100%;
1175
-    .el-tabs__content{
1176
-      flex:1;
1177
-      overflow-y: auto;
1178
-    }
1179
-    .el-tab-pane{
1180
-      display: flex;
1181
-      flex-direction: column;
1182
-      height:100%;
1183
-    }
1211
+
1212
+  .el-tabs__content {
1213
+    flex: 1;
1214
+    overflow-y: auto;
1215
+  }
1216
+
1217
+  .el-tab-pane {
1218
+    display: flex;
1219
+    flex-direction: column;
1220
+    height: 100%;
1221
+  }
1222
+
1184 1223
   }
1185 1224
   #tab-more {
1186 1225
 

+ 4 - 4
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -44,13 +44,13 @@
44 44
             <el-radio-button label="电子处方"></el-radio-button>
45 45
             <el-radio-button label="电子病历"></el-radio-button>
46 46
           </el-radio-group>
47
-          <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子处方'">
47
+          <div class="mainCell fixedCell" style="float:right" v-show="titleType == '电子处方'">
48 48
             <el-button size="small" ref="button_one"   @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
49 49
             <el-button size="small" ref="button_two"   @click="open(2)" type="primary">打印</el-button>
50 50
             <el-button size="small" ref="button_three" @click="open(4)" type="primary">选择模板</el-button>
51 51
             <el-button size="small" ref="button_four"  @click="open(5)" type="primary">存模板</el-button>
52 52
           </div>
53
-          <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子病历'">
53
+          <div class="mainCell fixedCell" style="float:right" v-show="titleType == '电子病历'">
54 54
             <el-button size="small" @click="opentwo(1)" type="primary" style="margin-left:10px;">保存</el-button>
55 55
             <el-button size="small" @click="opentwo(2)" type="primary">打印</el-button>
56 56
             <el-button size="small" @click="opentwo(3)" type="primary">病历调用</el-button>
@@ -62,9 +62,9 @@
62 62
         <desk-prescription  :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
63 63
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
64 64
                            :hisPatientInfo="hisPatientInfo"
65
-                           v-show="titleType == '处方'" style="flex:1;"></desk-prescription>
65
+                           v-show="titleType == '电子处方'" style="flex:1;"></desk-prescription>
66 66
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
67
-                     :hisPatientInfo="hisPatientInfo"   v-show="titleType == '病历'" :detalid="detalid" ref="child"></desk-record>
67
+                     :hisPatientInfo="hisPatientInfo"   v-show="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
68 68
 
69 69
          <medicalRecord ref='medicalRecord' @func="getMsgFormSon" ></medicalRecord>
70 70
          <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>