Browse Source

518合并代码

XMLWAN 2 years ago
parent
commit
57d1cbc71c

+ 8 - 0
src/api/his/his_tools.js View File

@@ -22,3 +22,11 @@ export function getGatherDetailList(params) {
22 22
     params: params
23 23
   })
24 24
 }
25
+
26
+export function GetDetailPatients(params) {
27
+  return request({
28
+    url: '/api/his/getdetailpatients',
29
+    method: 'Get',
30
+    params: params
31
+  })
32
+}

+ 2 - 2
src/xt_pages/hospitalStation/components/deskRecord.vue View File

@@ -786,9 +786,9 @@ export default {
786 786
     this.getInitData();
787 787
     this.wayOptions = getDataConfig("patient", "reimbursement_ways");
788 788
 
789
-    if ((this.patientInfo.gender = 2)) {
789
+    if ((this.patientInfo.gender == 1)) {
790 790
       this.patientInfo.gender = "男";
791
-    } else if ((this.patientInfo.gender = 1)) {
791
+    } else if ((this.patientInfo.gender == 2)) {
792 792
       this.patientInfo.gender = "女";
793 793
     }
794 794
 

+ 1 - 0
src/xt_pages/outpatientCharges/allListPrint.vue View File

@@ -82,6 +82,7 @@
82 82
             this.admin = response.data.data.admin_info
83 83
             this.his_hospital = response.data.data.his_hospital
84 84
             var order_info = response.data.data.order_info
85
+            
85 86
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
86 87
               //获取所有项目类型进行去重
87 88
               let med_chrgitm_types = []

+ 1 - 0
src/xt_pages/outpatientCharges/allListTemplate/summaryPrint.vue View File

@@ -229,6 +229,7 @@ export default {
229 229
   },
230 230
   watch: {
231 231
     list: {
232
+     
232 233
       handler(newVal) {
233 234
         this.getPage();
234 235
       },

+ 2 - 2
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue View File

@@ -786,9 +786,9 @@ export default {
786 786
     this.getInitData();
787 787
     this.wayOptions = getDataConfig("patient", "reimbursement_ways");
788 788
 
789
-    if ((this.patientInfo.gender = 1)) {
789
+    if ((this.patientInfo.gender ==1)) {
790 790
       this.patientInfo.gender = "男";
791
-    } else if ((this.patientInfo.gender = 2)) {
791
+    } else if ((this.patientInfo.gender == 2)) {
792 792
       this.patientInfo.gender = "女";
793 793
     }
794 794
 

+ 33 - 2
src/xt_pages/outpatientTool/components/detailStatistics.vue View File

@@ -21,7 +21,7 @@
21 21
           style="width: 150px"
22 22
           v-model="keywords"
23 23
           class="filter-item"
24
-          placeholder="请输入患者姓名"
24
+          placeholder="请输入项目名称"
25 25
         />
26 26
         <el-button
27 27
           size="small"
@@ -181,10 +181,11 @@ export default {
181 181
         type: this.item_type,
182 182
         keyword: this.keywords
183 183
       }
184
+     console.log("patient_id 233232323232323",this.patient_id)
184 185
      getHisSummaryDetailList(params).then(response=>{
185 186
        if(response.data.state == 1){
186 187
           var list =  response.data.data.list
187
-          console.log("list23323232323232232323",list)
188
+         
188 189
           this.list = list
189 190
           this.tableData = []
190 191
           for(let i=0;i<list.length;i++){
@@ -204,7 +205,37 @@ export default {
204 205
             obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
205 206
           }
206 207
           obj.total_price = (obj.total_price).toFixed(2)
208
+          console.log("tabledate23232332233223",this.tableData)
207 209
           this.tableData.push(obj)
210
+          var new_arr = []
211
+       
212
+          if(this.keywords!=""){
213
+            for(let i=0;i<this.tableData.length;i++){
214
+              if(this.tableData[i].index!="合计"){
215
+                if(this.tableData[i].advice_id > 0){
216
+                  if(this.tableData[i].advice.advice_name.indexOf(this.keywords) > -1){
217
+                  new_arr.push(this.tableData[i])
218
+                }
219
+                }
220
+                if(this.tableData[i].project_id >0){
221
+                  if(this.tableData[i].project.type == 2){
222
+                    if(this.tableData[i].project.project.project_name.indexOf(this.keywords) > -1){
223
+                        new_arr.push(this.tableData[i])
224
+                    }
225
+                  }
226
+                  if(this.tableData[i].project.type == 3){
227
+                    if(this.tableData[i].project.good_info.good_name.indexOf(this.keywords)> - 1){
228
+                      new_arr.push(this.tableData[i])   
229
+                    }
230
+                  }
231
+                }
232
+              }
233
+            }
234
+            if(this.keywords!=""){
235
+              this.tableData.push(obj)
236
+            }
237
+            this.tableData = new_arr
238
+          }
208 239
        }
209 240
      })
210 241
     },

+ 63 - 37
src/xt_pages/outpatientTool/components/gatherStatistics.vue View File

@@ -21,6 +21,7 @@
21 21
             style="width: 150px"
22 22
             v-model="keywords"
23 23
             class="filter-item"
24
+            placeholder="请输入项目名称"
24 25
         />
25 26
         <el-button
26 27
             size="small"
@@ -140,18 +141,19 @@ export default {
140 141
 
141 142
       ],
142 143
       list:[],
144
+      his_patient:{},
145
+      hisDepatment:[],
143 146
     }
144 147
   },
145 148
   methods: {
146 149
     searchAction(){
147
-
148
-
150
+     this.getGatherDetailList()
149 151
     },
150 152
     changeDate() {
151
-      this.getSummaryDetailList()
153
+      this.getGatherDetailList()
152 154
     },
153 155
     changeItem() {
154
-      this.getSummaryDetailList()
156
+      this.getGatherDetailList()
155 157
     },
156 158
     getGatherDetailList() {
157 159
       let start_time = this.chargeDate[0]
@@ -169,25 +171,17 @@ export default {
169 171
             return false
170 172
           } else {
171 173
             this.order = response.data.data.order
172
-            // console.log("order23323232323232332322323",response.data.data.order)
173
-            // for(let i=0;i<this.order.length;i++){
174
-            //   this.order['bedCostTotal'] = response.data.data.bedCostTotal
175
-            //   this.order['operationCostTotal'] = response.data.data.operationCostTotal
176
-            //   this.order['otherCostTotal'] = response.data.data.otherCostTotal
177
-            //   this.order['materialCostTotal'] = response.data.data.materialCostTotal
178
-            //   this.order['westernMedicineCostTotal'] = response.data.data.westernMedicineCostTotal
179
-            //   this.order['chineseTraditionalMedicineCostTotal'] = response.data.data.chineseTraditionalMedicineCostTotal
180
-            //   this.order['checkCostTotal'] = response.data.data.checkCostTotal
181
-            //   this.order['zhenChaCostTotal'] = response.data.data.zhenChaCostTotal
182
-            //   this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
183
-            //   this.order['treatCostTotal'] = response.data.data.treatCostTotal
184
-            // }
185
-         
186 174
             this.patient = response.data.data.patient
187 175
             this.admin = response.data.data.admin_info
188 176
             this.his_hospital = response.data.data.his_hospital
189 177
             var order_info = response.data.data.order_info
190
-            // console.log("order_info2332323232323232323",order_info)
178
+            if(order_info!=undefined&&order_info ==null){
179
+               this.list = []
180
+               return
181
+            }
182
+            this.his_patient = response.data.data.his_patient
183
+            this.hisDepatment = response.data.data.hisDepatment
184
+            this.list = []
191 185
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
192 186
               //获取所有项目类型进行去重
193 187
               let med_chrgitm_types = []
@@ -215,7 +209,7 @@ export default {
215 209
                   }
216 210
                 }
217 211
                 obj.details = this.setNewData(tempDetails)
218
-               
212
+                this.list = []
219 213
                 this.list =  this.list.concat(obj.details)
220 214
                 for(let i=0;i<this.list.length;i++){
221 215
                   this.list[i].index = i
@@ -224,15 +218,33 @@ export default {
224 218
               let newobj = {}
225 219
               newobj['total'] = this.order.medfee_sumamt
226 220
               newobj['is_total'] = 1
227
-              
221
+              this.list = []
228 222
               this.list.push(newobj)
223
+              var new_arr = []
224
+              if(this.keywords!=""){
225
+                   let newobj = {}
226
+                   newobj['total'] = this.order.medfee_sumamt
227
+                   newobj['is_total'] = 1
228
+                   this.list.push(newobj)
229
+                   this.list =  this.list.concat(obj.details)
230
+                   for(let i=0;i<this.list.length;i++){
231
+                     if(this.list[i].is_total ==2){
232
+                        if(this.list[i].name.indexOf(this.keywords)>-1){
233
+                        new_arr.push(this.list[i])
234
+                       }
235
+                     }
236
+                  }
237
+                  this.list = []
238
+                  this.list = new_arr
239
+                }
229 240
             }else{
230 241
               //获取所有项目类型进行去重
231 242
               let med_chrgitm_types = []
232
-              for (let i = 0; i < order_info.length; i++) {
233
-                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
243
+              if(order_info!=undefined && order_info.length > 0){
244
+                for (let i = 0; i < order_info.length; i++) {
245
+                 med_chrgitm_types.push(order_info[i].med_chrgitm_type)
246
+               }
234 247
               }
235
-              // console.log("med_chrgitm_types23323332233232232323232332322332233",med_chrgitm_types)
236 248
               const obj = {}
237 249
               med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
238 250
                 obj[next] ? '' : obj[next] = true && cur.push(next)
@@ -250,7 +262,7 @@ export default {
250 262
                     tempDetails.push(order_info[b])
251 263
                   }
252 264
                 }
253
-                // console.log("tempdetail2323323232322332233223",tempDetails)
265
+               
254 266
                 obj.details = this.setNewData(tempDetails)
255 267
 
256 268
                 obj.total = this.getTotal(obj.details)
@@ -258,12 +270,31 @@ export default {
258 270
                   total: obj.total,
259 271
                   is_total: 1,
260 272
                 })
261
-                // console.log("obj3232232332323223",obj.details)
273
+                this.list = []
262 274
                 this.list =  this.list.concat(obj.details)
263 275
                 for(let i=0;i<this.list.length;i++){
264 276
                   this.list[i].index = i+1
265 277
                 }
266
-                // console.log("list32233223233332232323232323",this.list)
278
+                var new_arr = []
279
+                if(this.keywords!=""){
280
+                    obj.details.push({
281
+                      total: obj.total,
282
+                      is_total: 1,
283
+                    })
284
+                  
285
+                   this.list =  this.list.concat(obj.details)
286
+                   console.log("list233232232332323223",this.list)
287
+                   for(let i=0;i<this.list.length;i++){
288
+                     if(this.list[i].is_total == 2){
289
+                        if(this.list[i].name.indexOf(this.keywords)>-1){
290
+                           new_arr.push(this.list[i])
291
+                       }
292
+                     }
293
+                   
294
+                  }
295
+                  this.list = []
296
+                  this.list = new_arr
297
+                }
267 298
              }
268 299
           }
269 300
         }
@@ -288,7 +319,6 @@ export default {
288 319
      return project_name
289 320
     },
290 321
     setNewData(details) {
291
-      // console.log("detail233223233223",details)
292 322
         let drug_ids = []
293 323
         let project_ids = []
294 324
 
@@ -311,13 +341,10 @@ export default {
311 341
           }
312 342
 
313 343
         }
314
-        // console.log("drug_ids232332322323",drug_ids)
315
-        // console.log("project_ids2323232332",project_ids)
316 344
         let new_drug_ids = this.unique(drug_ids)
317 345
         let new_project_ids = this.unique(project_ids)
318
-        // console.log("new23233232332322323323232",new_drug_ids)
319
-        // console.log("new_project_ids2332332323",new_project_ids)
320 346
         let list = []
347
+       
321 348
         if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
322 349
           for (let i = 0; i < new_drug_ids.length; i++) {
323 350
             let obj = {}
@@ -341,7 +368,6 @@ export default {
341 368
 
342 369
           }
343 370
         }
344
-        //  console.log("list我的2323232323233223322332",list)
345 371
         if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
346 372
           for (let i = 0; i < new_project_ids.length; i++) {
347 373
             let obj = {}
@@ -403,7 +429,6 @@ export default {
403 429
             let count = 0
404 430
             for (let a = 0; a < details.length; a++) {
405 431
               if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
406
-                // console.log("hhha23322332233232332",details[a].project)
407 432
               if( details[a].project.type == 2){
408 433
                  obj['name'] = details[a].project.project.project_name
409 434
                  obj['spec'] = ''
@@ -429,7 +454,8 @@ export default {
429 454
           }
430 455
          }
431 456
 
432
-        // console.log("list我的2323232323233223322332",list)
457
+        
458
+
433 459
         return list
434 460
       }, 
435 461
     
@@ -540,7 +566,7 @@ export default {
540 566
      },
541 567
      toPrint(){
542 568
         this.$router.push({path:"/hisTool/gatherPrint?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords})
543
-     }
569
+     },
544 570
   },
545 571
   created() {
546 572
     this.getGatherDetailList()
@@ -549,7 +575,7 @@ export default {
549 575
   watch:{
550 576
     "patient_id":function(){
551 577
       this.patient_id = this.patient_id
552
-      this.getHisSummaryDetailList()
578
+      this.getGatherDetailList()
553 579
     }
554 580
   }
555 581
 }

+ 75 - 36
src/xt_pages/outpatientTool/detailPrint.vue View File

@@ -5,13 +5,13 @@
5 5
         <div class="listInfo">
6 6
             <div>患者姓名:{{patient.name}}</div>
7 7
             <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
8
-            <div>结算类别:</div>
8
+            <div>结算类别:{{getType(his_patient.balance_accounts_type)}}</div>
9 9
             <div>发票号码:</div>
10 10
         </div>
11 11
          <div class="listInfo">
12 12
             <div>住院/门诊号:</div>
13
-            <div>科室:</div>
14
-            <div>就诊流水号:</div>
13
+            <div>科室:{{getDepartment(his_patient.departments)}}</div>
14
+            <div>就诊流水号:{{his_patient.number}}</div>
15 15
         </div>
16 16
         <div class="listInfo">
17 17
             <div>总费用:{{getAllPice()}}</div>
@@ -20,18 +20,18 @@
20 20
             <div>补充医疗支付记账:{{getHifesPay()}}</div>
21 21
         </div>
22 22
         <div class="listInfo">
23
-            <div>救助支付金额:</div>
23
+            <div>救助支付金额:{{getMafPay()}}</div>
24 24
         </div>
25 25
         <table class="listTable" border="1">
26 26
             <tr>
27
-                <td style="width:19%" text-align="center">序号</td>
28
-                <td style="width:10%" text-align="center">处方日期</td>
29
-                <td style="width:31%" text-align="center">费用编码</td>
30
-                <td style="width:14%" text-align="center">项目名称</td>
31
-                <td style="width:10%" text-align="center">规格</td>
32
-                <td style="width:6%"  text-align="center">数量</td>
33
-                <td style="width:10%" text-align="center">单价(元)</td>
34
-                <td style="width:10%" text-align="center">金额</td>
27
+                <td style="width:19%;text-align:center">序号</td>
28
+                <td style="width:10%;text-align:center">处方日期</td>
29
+                <td style="width:31%;text-align:center">费用编码</td>
30
+                <td style="width:14%;text-align:center">项目名称</td>
31
+                <td style="width:10%;text-align:center" >规格</td>
32
+                <td style="width:6%;text-align:center" >数量</td>
33
+                <td style="width:10%;text-align:center">单价(元)</td>
34
+                <td style="width:10%;text-align:center">金额</td>
35 35
             </tr>
36 36
             <tr v-for="(item, index) in tableData" :key="index">
37 37
                 <td style="width:19%;text-align:center" >{{index+1}}</td>
@@ -77,6 +77,19 @@
77 77
           patient:{},
78 78
           tableData:[],
79 79
           list:[],
80
+          his_patient:{},
81
+          hisDepatment:[],
82
+          settlement: [
83
+            {value: 1, label: '医保'},
84
+            {value: 2, label: '自费'},
85
+            {value: 3, label: '公费'},
86
+            {value: 4, label: '农保'},
87
+            {value: 5, label: '会员'},
88
+            {value: 6, label: '职工'},
89
+            {value: 7, label: '合同'},
90
+            {value: 8, label: '医保自费'},
91
+
92
+         ],
80 93
         }
81 94
     },
82 95
     methods:{
@@ -98,21 +111,6 @@
98 111
       getTimes(time) {
99 112
         return uParseTime(time, '{y}-{m}-{d}')
100 113
       },
101
-      getPage(){
102
-        if(this.list.length <= 13){
103
-            this.page = 1;
104
-            this.pageArr.push(this.list.length)
105
-        }else if(this.list.length > 13){
106
-            this.page = parseInt(this.list.length / 13);
107
-            let num = this.list.length % 13;
108
-            for (var i=0;i<this.page;i++){
109
-                this.pageArr.push(13)
110
-            }
111
-            if(num != 0){
112
-                this.pageArr.push(num)
113
-            }
114
-        }
115
-      },
116 114
       getHisSummaryDetailList() {
117 115
         let start_time = this.$route.query.start_time
118 116
         let end_time = this.$route.query.end_time
@@ -121,15 +119,19 @@
121 119
             start_time: start_time,
122 120
             end_time: end_time,
123 121
             type: this.$route.query.type,
124
-            keyword:this.$route.query.keywords,
122
+            keyword:this.$route.query.keyword,
125 123
         }
126 124
      getHisSummaryDetailList(params).then(response=>{
127 125
        if(response.data.state == 1){
128 126
           var list =  response.data.data.list
129
-          console.log("list23323232323232232323",list)
130 127
           this.list = list
131 128
           this.patient = response.data.data.patient
132
-          console.log("patient2323233223232332",this.patient)
129
+          
130
+          this.his_patient = response.data.data.his_patient
131
+          console.log("his_patinet233232322323232323",this.his_patient)
132
+
133
+          this.hisDepatment = response.data.data.hisDepatment
134
+          console.log("部门23233232322323",this.hisDepatment)
133 135
           this.tableData = []
134 136
           for(let i=0;i<list.length;i++){
135 137
             for(let j=0;j<list[i].orders.length;j++){
@@ -149,6 +151,33 @@
149 151
           }
150 152
           obj.total_price = (obj.total_price).toFixed(2)
151 153
           this.tableData.push(obj)
154
+          if(this.$route.query.keyword!=""){
155
+            for(let i=0;i<this.tableData.length;i++){
156
+              if(this.tableData[i].index!="合计"){
157
+                if(this.tableData[i].advice_id > 0){
158
+                  if(this.tableData[i].advice.advice_name.indexOf(this.$route.query.keyword) > -1){
159
+                  new_arr.push(this.tableData[i])
160
+                }
161
+                }
162
+                if(this.tableData[i].project_id >0){
163
+                  if(this.tableData[i].project.type == 2){
164
+                    if(this.tableData[i].project.project.project_name.indexOf(this.$route.query.keyword) > -1){
165
+                        new_arr.push(this.tableData[i])
166
+                    }
167
+                  }
168
+                  if(this.tableData[i].project.type == 3){
169
+                    if(this.tableData[i].project.good_info.good_name.indexOf(this.$route.query.keyword)> - 1){
170
+                      new_arr.push(this.tableData[i])   
171
+                    }
172
+                  }
173
+                }
174
+              }
175
+            }
176
+            if(this.$route.query.keyword!=""){
177
+              this.tableData.push(obj)
178
+            }
179
+            this.tableData = new_arr
180
+          }
152 181
           console.log("tabledata32233223323232",this.tableData)
153 182
        }
154 183
      })
@@ -199,14 +228,24 @@
199 228
       }
200 229
       return maf_pay
201 230
     },
231
+    getDepartment(id){
232
+      var name = ""
233
+      for(let i=0;i<this.hisDepatment.length;i++){
234
+        if(id == this.hisDepatment[i].id){
235
+           name = this.hisDepatment[i].name
236
+        }
237
+      }
238
+      return name
202 239
     },
203
-    watch:{
204
-        list: {
205
-            handler(newVal) {
206
-                this.getPage()
207
-            },
208
-            deep: true
240
+    getType(id){
241
+      var name = ""
242
+      for(let i=0;i<this.settlement.length;i++){
243
+        if(id == this.settlement[i].value){
244
+         name = this.settlement[i].label
209 245
         }
246
+      }
247
+      return name
248
+    }
210 249
     },
211 250
     created(){
212 251
       this.getHisSummaryDetailList()   

+ 60 - 25
src/xt_pages/outpatientTool/gatherPrint.vue View File

@@ -6,50 +6,50 @@
6 6
             <div>医疗机构名称:{{$store.getters.xt_user.org.org_name}}</div>
7 7
         </div>
8 8
         <div class="listInfo">
9
-            <div>科别:</div>
9
+            <div>科别:{{getDepartment(his_patient.departments)}}</div>
10 10
             <div>床号:</div>
11
-            <div>门诊号:</div>
11
+            <div>门诊号:{{his_patient.number}}</div>
12 12
             <div>姓名:{{patient.name}}</div>
13 13
         </div>
14 14
          <div class="listInfo">
15 15
             <div>预交款:</div>
16
-            <div>总费用:</div>
16
+            <div>总费用:{{getAllPice()}}</div>
17 17
             <div>门诊日期:</div>
18 18
         </div>
19 19
         <div class="listInfo">
20 20
             <div>西药:</div>
21
-            <div>中成药:</div>
21
+            <div>中成药:{{chineseTraditionalMedicineCostTotal}}</div>
22 22
             <div>中草药:</div>
23 23
         </div>
24 24
         <div class="listInfo">
25
-            <div>检查费:</div>
25
+            <div>检查费:{{checkCostTotal}}</div>
26 26
             <div>输氧费:</div>
27 27
             <div>手术费:</div>
28 28
         </div>
29 29
         <div class="listInfo">
30
-            <div>化验费:</div>
30
+            <div>化验费:{{laboratoryCostTotal}}</div>
31 31
             <div>输血费:</div>
32
-            <div>诊断费:</div>
32
+            <div>诊断费:{{zhenChaCostTotal}}</div>
33 33
         </div>
34 34
          <div class="listInfo">
35 35
             <div>治疗费:</div>
36 36
             <div>护理费:</div>
37
-            <div>床位费:</div>
37
+            <div>床位费:{{bedCostTotal}}</div>
38 38
         </div>
39 39
         <div class="listInfo">
40 40
             <div>麻醉费:</div>
41
-            <div>材料费:</div>
42
-            <div>其他:</div>
41
+            <div>材料费:{{materialCostTotal}}</div>
42
+            <div>其他:{{otherCostTotal}}</div>
43 43
         </div>
44 44
         <table class="listTable" border="1">
45 45
             <tr>
46
-                <td style="width:19%" text-align="center">费用分类</td>
47
-                <td style="width:10%" text-align="center">项目名称</td>
48
-                <td style="width:31%" text-align="center">规格</td>
49
-                <td style="width:14%" text-align="center">单价</td>
50
-                <td style="width:10%" text-align="center">数量</td>
51
-                <td style="width:6%"  text-align="center">金额</td>
52
-                <td style="width:10%" text-align="center">医保类型</td>
46
+                <td style="width:19%;text-align:center" >费用分类</td>
47
+                <td style="width:10%;text-align:center">项目名称</td>
48
+                <td style="width:31%;text-align:center">规格</td>
49
+                <td style="width:14%;text-align:center">单价</td>
50
+                <td style="width:10%;text-align:center" >数量</td>
51
+                <td style="width:6%;text-align:center">金额</td>
52
+                <td style="width:10%;text-align:center" >医保类型</td>
53 53
             </tr>
54 54
             <tr v-for="(item, index) in list" :key="index">
55 55
                 <td style="width:19%;text-align:center" >
@@ -92,6 +92,16 @@
92 92
           tableData:[],
93 93
           list:[],
94 94
           order:[],
95
+          his_patient:{},
96
+          hisDepatment:[],
97
+          chineseTraditionalMedicineCostTotal:"",//中成药
98
+          checkCostTotal:"",//检查费
99
+          materialCostTotal:"",//材料费
100
+          laboratoryCostTotal:"",//化验费
101
+          bedCostTotal:"",//床位费,
102
+          operationCostTotal:"",//材料费
103
+          zhenChaCostTotal:"",//诊查费
104
+          otherCostTotal:"",//其他费用
95 105
         }
96 106
     },
97 107
     methods:{
@@ -129,11 +139,13 @@
129 139
             return false
130 140
           } else {
131 141
             this.order = response.data.data.order
132
-      
142
+          
133 143
             this.patient = response.data.data.patient
134 144
             this.admin = response.data.data.admin_info
135 145
             this.his_hospital = response.data.data.his_hospital
136 146
             var order_info = response.data.data.order_info
147
+            this.his_patient = response.data.data.his_patient
148
+            this.hisDepatment = response.data.data.hisDepatment
137 149
             console.log("order_info2332332232332232323",order_info)
138 150
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
139 151
               //获取所有项目类型进行去重
@@ -211,7 +223,14 @@
211 223
                 for(let i=0;i<this.list.length;i++){
212 224
                   this.list[i].index = i+1
213 225
                 }
214
-               
226
+                 this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
227
+                  this.checkCostTotal = response.data.data.checkCostTotal
228
+                  this.materialCostTotal = response.data.data.materialCostTotal
229
+                  this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
230
+                  this.bedCostTotal = response.data.data.bedCostTotal
231
+                  this.operationCostTotal = response.data.data.operationCostTotal
232
+                  this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
233
+                  this.otherCostTotal = response.data.data.otherCostTotal
215 234
              }
216 235
           }
217 236
         }
@@ -481,14 +500,30 @@
481 500
         return uParseTime(time, '{y}-{m}-{d}')
482 501
        }
483 502
      },
503
+    getDepartment(id){
504
+      var name = ""
505
+      for(let i=0;i<this.hisDepatment.length;i++){
506
+        if(id == this.hisDepatment[i].id){
507
+           name = this.hisDepatment[i].name
508
+        }
509
+      }
510
+      return name
484 511
     },
485
-    watch:{
486
-        list: {
487
-            handler(newVal) {
488
-                this.getPage()
489
-            },
490
-            deep: true
512
+    getAllPice(){
513
+      console.log("liust23322332323223",this.list)
514
+      var total_price = 0
515
+      for(let i=0;i<this.list.length;i++){
516
+        if(this.list[i].is_total ==2){
517
+          total_price += (this.list[i].price * parseInt(this.list[i].count))
491 518
         }
519
+      }
520
+      if(total_price > 0){
521
+        return total_price.toFixed(2)
522
+      }else{
523
+        return total_price
524
+      }
525
+     
526
+    }
492 527
     },
493 528
     created(){
494 529
       this.getGatherDetailList()   

+ 28 - 9
src/xt_pages/outpatientTool/statistics.vue View File

@@ -7,6 +7,20 @@
7 7
     <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
8 8
       <div class="mainLeft">
9 9
         <div>
10
+         <el-input
11
+          size="small"
12
+          style="width: 130px"
13
+          v-model="keywords"
14
+          class="filter-item"
15
+          placeholder="请输入患者名称"
16
+        />
17
+        <el-button
18
+          size="small"
19
+          class="filter-item"
20
+          type="primary"
21
+          @click="searchAction"
22
+        >搜索
23
+        </el-button>
10 24
           <el-table  :data="patientTableData" :height="tableHeight" border style="width: 100%;"
11 25
                      :row-style="{ color: '#303133' }"
12 26
                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
@@ -34,7 +48,7 @@
34 48
 
35 49
 <script>
36 50
 import {
37
-  GetAllPatients,
51
+  GetDetailPatients,
38 52
 } from '@/api/his/his_tools'
39 53
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
40 54
 
@@ -45,8 +59,6 @@ export default {
45 59
     GatherStatistics,
46 60
     DetailStatistics,
47 61
     BreadCrumb,
48
-
49
-
50 62
   },
51 63
   data() {
52 64
 
@@ -58,27 +70,34 @@ export default {
58 70
         { path: false, name: '明细汇总统计' }
59 71
       ],
60 72
       titleType: '明细',
61
-      patient_id:0
73
+      patient_id:0,
74
+      keywords:"",
62 75
     }
63 76
   },
64 77
   methods: {
65 78
     getPatientList(){
66
-      GetAllPatients().then(response => {
79
+       var params = {
80
+         keyword:this.keywords,
81
+       }
82
+      GetDetailPatients(params).then(response => {
67 83
         if (response.data.state == 0) {
68 84
           this.$message.error(response.data.msg)
69 85
           return false
70 86
         } else {
71
-          this.patientTableData = response.data.data.list
87
+          this.patientTableData = response.data.data.patient
72 88
           this.patient_id =  this.patientTableData[0].id
73 89
           this.$refs.singleTable.setCurrentRow(this.patientTableData[0])
74 90
         }
75 91
       })
76 92
     },
93
+    searchAction(){
94
+      this.getPatientList()
95
+    },
77 96
     handleCurrentChange(row){
78 97
       this.patient_id = 0
79
-      this.patient_id =  row.id
80
-      this.$refs.child.getHisSummaryDetailList()
81
-      this.$refs.childOne.getGatherDetailList()
98
+      this.patient_id = row.id
99
+      // this.$refs.child.getHisSummaryDetailList()
100
+      // this.$refs.childOne.getGatherDetailList()
82 101
     },
83 102
 
84 103
   },