소스 검색

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

csx 3 년 전
부모
커밋
217aeb8933

+ 24 - 24
src/xt_pages/hospitalStation/outpatientChargesManagement.vue 파일 보기

61
                             <template slot-scope="scope">{{scope.row.name}}</template>
61
                             <template slot-scope="scope">{{scope.row.name}}</template>
62
                         </el-table-column>
62
                         </el-table-column>
63
                         <el-table-column align="center" prop="name" label="就诊号" width="110">
63
                         <el-table-column align="center" prop="name" label="就诊号" width="110">
64
-                            <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}
64
+                            <template slot-scope="scope">{{ scope.row ?scope.row.number:''}}
65
                             </template>
65
                             </template>
66
                         </el-table-column>
66
                         </el-table-column>
67
                     </el-table>
67
                     </el-table>
869
             let three_count = 0
869
             let three_count = 0
870
             for (let i = 0; i < response.data.data.list.length; i++) {
870
             for (let i = 0; i < response.data.data.list.length; i++) {
871
               this.all_table_data.push(response.data.data.list[i])
871
               this.all_table_data.push(response.data.data.list[i])
872
-              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) {
872
+              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) {
873
                 one_count = one_count + 1
873
                 one_count = one_count + 1
874
               }
874
               }
875
 
875
 
876
-              if (response.data.data.list[i].his_patient.order.order_status == 2) {
876
+              if (response.data.data.list[i].order.order_status == 2) {
877
                 two_count = two_count + 1
877
                 two_count = two_count + 1
878
               }
878
               }
879
 
879
 
895
                 this.patientTableData = []
895
                 this.patientTableData = []
896
 
896
 
897
                 for (let i = 0; i < this.all_table_data.length; i++) {
897
                 for (let i = 0; i < this.all_table_data.length; i++) {
898
-                  if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1) {
898
+                  if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
899
                     this.patientTableData.push(this.all_table_data[i])
899
                     this.patientTableData.push(this.all_table_data[i])
900
                   }
900
                   }
901
 
901
 
902
                 }
902
                 }
903
                 if (this.patientTableData.length > 0) {
903
                 if (this.patientTableData.length > 0) {
904
                   for (let i = 0; i < this.patientTableData.length; i++) {
904
                   for (let i = 0; i < this.patientTableData.length; i++) {
905
-                    if (this.patientTableData[i].id == this.patientInfo.id) {
905
+                    if (this.patientTableData[i].patient_id == this.patientInfo.id) {
906
                       this.$refs.tab.setCurrentRow(this.patientTableData[i])
906
                       this.$refs.tab.setCurrentRow(this.patientTableData[i])
907
-                      this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id)
907
+                      this.getPatientInformation(this.patientTableData[i].patient_id, this.patientTableData[i].order.number, this.patientTableData[i].id)
908
                     }
908
                     }
909
                   }
909
                   }
910
                 }
910
                 }
986
 
986
 
987
             for (let i = 0; i < response.data.data.list_two.length; i++) {
987
             for (let i = 0; i < response.data.data.list_two.length; i++) {
988
               this.hisPatientDatas.push(response.data.data.list_two[i])
988
               this.hisPatientDatas.push(response.data.data.list_two[i])
989
-              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 || response.data.data.list_two[i].his_patient.order.order_status == 3) {
989
+              if (response.data.data.list_two[i].order.order_status == 0 || response.data.data.list_two[i].order.order_status == 1 || response.data.data.list_two[i].order.order_status == 3) {
990
                 one_count = one_count + 1
990
                 one_count = one_count + 1
991
               }
991
               }
992
 
992
 
993
-              if (response.data.data.list_two[i].his_patient.order.order_status == 2) {
993
+              if (response.data.data.list_two[i].order.order_status == 2) {
994
                 two_count = two_count + 1
994
                 two_count = two_count + 1
995
               }
995
               }
996
 
996
 
1010
                 this.patientTableData = []
1010
                 this.patientTableData = []
1011
 
1011
 
1012
                 for (let i = 0; i < this.hisPatientDatas.length; i++) {
1012
                 for (let i = 0; i < this.hisPatientDatas.length; i++) {
1013
-                  if (this.hisPatientDatas[i].his_patient.order.order_status == 0 || this.hisPatientDatas[i].his_patient.order.order_status == 1 || this.hisPatientDatas[i].his_patient.order.order_status == 3) {
1013
+                  if (this.hisPatientDatas[i].order.order_status == 0 || this.hisPatientDatas[i].order.order_status == 1 || this.hisPatientDatas[i].order.order_status == 3) {
1014
                     this.patientTableData.push(this.hisPatientDatas[i])
1014
                     this.patientTableData.push(this.hisPatientDatas[i])
1015
                   }
1015
                   }
1016
 
1016
 
1017
                 }
1017
                 }
1018
                 if (this.patientTableData.length > 0) {
1018
                 if (this.patientTableData.length > 0) {
1019
                   for (let i = 0; i < this.patientTableData.length; i++) {
1019
                   for (let i = 0; i < this.patientTableData.length; i++) {
1020
-                    if (this.patientTableData[i].id == this.patientInfo.id) {
1020
+                    if (this.patientTableData[i].patient_id == this.patientInfo.id) {
1021
                       this.$refs.tab.setCurrentRow(this.patientTableData[i])
1021
                       this.$refs.tab.setCurrentRow(this.patientTableData[i])
1022
-                      this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id)
1022
+                      this.getPatientInformation(this.patientTableData[i].patient_id, this.patientTableData[i].order.number, this.patientTableData[i].id)
1023
                     }
1023
                     }
1024
                   }
1024
                   }
1025
                 }
1025
                 }
2069
 
2069
 
2070
             for (let i = 0; i < response.data.data.list.length; i++) {
2070
             for (let i = 0; i < response.data.data.list.length; i++) {
2071
               this.all_table_data.push(response.data.data.list[i])
2071
               this.all_table_data.push(response.data.data.list[i])
2072
-              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) {
2072
+              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) {
2073
                 one_count = one_count + 1
2073
                 one_count = one_count + 1
2074
               }
2074
               }
2075
 
2075
 
2085
               case 1:
2085
               case 1:
2086
                 this.patientTableData = []
2086
                 this.patientTableData = []
2087
                 for (let i = 0; i < this.all_table_data.length; i++) {
2087
                 for (let i = 0; i < this.all_table_data.length; i++) {
2088
-                  if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1) {
2088
+                  if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
2089
                     this.patientTableData.push(this.all_table_data[i])
2089
                     this.patientTableData.push(this.all_table_data[i])
2090
                   }
2090
                   }
2091
 
2091
 
2092
                 }
2092
                 }
2093
                 for (let i = 0; i < this.patientTableData.length; i++) {
2093
                 for (let i = 0; i < this.patientTableData.length; i++) {
2094
-                  if (this.patientInfo.id == this.patientTableData[i].id) {
2094
+                  if (this.patientInfo.id == this.patientTableData[i].patient_id) {
2095
                     this.current_index = i
2095
                     this.current_index = i
2096
                     this.$refs.tab.setCurrentRow(this.patientTableData[i])
2096
                     this.$refs.tab.setCurrentRow(this.patientTableData[i])
2097
-                    this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].his_patient.order.number, this.patientTableData[i].his_patient.id)
2097
+                    this.getPatientInformation(this.patientTableData[i].patient_id, this.patientTableData[i].order.number, this.patientTableData[i].id)
2098
 
2098
 
2099
                   }
2099
                   }
2100
                 }
2100
                 }
2199
 
2199
 
2200
               for (let i = 0; i < response.data.data.list.length; i++) {
2200
               for (let i = 0; i < response.data.data.list.length; i++) {
2201
                 this.all_table_data.push(response.data.data.list[i])
2201
                 this.all_table_data.push(response.data.data.list[i])
2202
-                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) {
2202
+                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) {
2203
                   one_count = one_count + 1
2203
                   one_count = one_count + 1
2204
                 }
2204
                 }
2205
 
2205
 
2216
 
2216
 
2217
               for (let i = 0; i < response.data.data.list_two.length; i++) {
2217
               for (let i = 0; i < response.data.data.list_two.length; i++) {
2218
                 this.hisPatientDatas.push(response.data.data.list_two[i])
2218
                 this.hisPatientDatas.push(response.data.data.list_two[i])
2219
-                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) {
2219
+                if (response.data.data.list_two[i].order.order_status == 0 || response.data.data.list_two[i].order.order_status == 1) {
2220
                   one_count = one_count + 1
2220
                   one_count = one_count + 1
2221
                 }
2221
                 }
2222
 
2222
 
2243
                 if (this.activeName == 'first') {
2243
                 if (this.activeName == 'first') {
2244
 
2244
 
2245
                   for (let i = 0; i < this.all_table_data.length; i++) {
2245
                   for (let i = 0; i < this.all_table_data.length; i++) {
2246
-                    if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1) {
2246
+                    if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
2247
                       this.patientTableData.push(this.all_table_data[i])
2247
                       this.patientTableData.push(this.all_table_data[i])
2248
                     }
2248
                     }
2249
 
2249
 
2251
 
2251
 
2252
                 } else {
2252
                 } else {
2253
                   for (let i = 0; i < this.hisPatientDatas.length; i++) {
2253
                   for (let i = 0; i < this.hisPatientDatas.length; i++) {
2254
-                    if (this.hisPatientDatas[i].his_patient.order.order_status == 0 || this.hisPatientDatas[i].his_patient.order.order_status == 1) {
2254
+                    if (this.hisPatientDatas[i].order.order_status == 0 || this.hisPatientDatas[i].order.order_status == 1) {
2255
                       this.patientTableData.push(this.hisPatientDatas[i])
2255
                       this.patientTableData.push(this.hisPatientDatas[i])
2256
                     }
2256
                     }
2257
 
2257
 
2261
 
2261
 
2262
                 this.current_index = 0
2262
                 this.current_index = 0
2263
                 this.$refs.tab.setCurrentRow(this.patientTableData[0])
2263
                 this.$refs.tab.setCurrentRow(this.patientTableData[0])
2264
-                this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].his_patient.order.number, this.patientTableData[0].his_patient.id)
2264
+                this.getPatientInformation(this.patientTableData[0].patient_id, this.patientTableData[0].order.number, this.patientTableData[0].id)
2265
 
2265
 
2266
                 break
2266
                 break
2267
               case 2:
2267
               case 2:
2363
             let three_count = 0
2363
             let three_count = 0
2364
             for (let i = 0; i < response.data.data.list.length; i++) {
2364
             for (let i = 0; i < response.data.data.list.length; i++) {
2365
               this.all_table_data.push(response.data.data.list[i])
2365
               this.all_table_data.push(response.data.data.list[i])
2366
-              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) {
2366
+              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) {
2367
                 one_count = one_count + 1
2367
                 one_count = one_count + 1
2368
               }
2368
               }
2369
 
2369
 
2379
               case 1:
2379
               case 1:
2380
                 this.patientTableData = []
2380
                 this.patientTableData = []
2381
                 for (let i = 0; i < this.all_table_data.length; i++) {
2381
                 for (let i = 0; i < this.all_table_data.length; i++) {
2382
-                  if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1 || this.all_table_data[i].his_patient.order.order_status == 3) {
2382
+                  if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1 || this.all_table_data[i].order.order_status == 3) {
2383
                     this.patientTableData.push(this.all_table_data[i])
2383
                     this.patientTableData.push(this.all_table_data[i])
2384
                   }
2384
                   }
2385
                 }
2385
                 }
2386
 
2386
 
2387
                 this.$refs.tab.setCurrentRow(this.patientTableData[0])
2387
                 this.$refs.tab.setCurrentRow(this.patientTableData[0])
2388
-                this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].his_patient.order.number, this.patientTableData[0].his_patient.id)
2388
+                this.getPatientInformation(this.patientTableData[0].patient_id, this.patientTableData[0].order.number, this.patientTableData[0].id)
2389
 
2389
 
2390
                 break
2390
                 break
2391
               case 2:
2391
               case 2:
2620
         this.prescriptions = []
2620
         this.prescriptions = []
2621
         this.month_prescriptions = []
2621
         this.month_prescriptions = []
2622
         if(this.radio == 1){
2622
         if(this.radio == 1){
2623
-          this.getPatientInformation(val.id, val.his_patient.order.number, val.his_patient.id)
2623
+          this.getPatientInformation(val.patient_id, val.order.number, val.id)
2624
         }else{
2624
         }else{
2625
           this.getPatientInformation(val.id, val.number, val.his_patient_id)
2625
           this.getPatientInformation(val.id, val.number, val.his_patient_id)
2626
 
2626
 

+ 63 - 6
src/xt_pages/outpatientTool/components/detail.vue 파일 보기

12
                     <!--</el-button>-->
12
                     <!--</el-button>-->
13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
14
                               @keyup.enter.native='searchAction'
14
                               @keyup.enter.native='searchAction'
15
+                              placeholder="请输入患者姓名"
15
                               class="filter-item"/>
16
                               class="filter-item"/>
16
                     <el-select size="small" v-model="item_type" placeholder="请选择"
17
                     <el-select size="small" v-model="item_type" placeholder="请选择"
17
                                style="width:150px;margin-left:10px;" @change="changeItem">
18
                                style="width:150px;margin-left:10px;" @change="changeItem">
54
             <el-table :data="tableData" border :row-style="{ color: '#303133' }"
55
             <el-table :data="tableData" border :row-style="{ color: '#303133' }"
55
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
56
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
56
                       :span-method="merge"
57
                       :span-method="merge"
58
+                      show-summary
59
+                      :summary-method="getTotal"
60
+                      max-height="600"
61
+
57
                       v-loading="detail_loading"
62
                       v-loading="detail_loading"
58
                       highlight-current-row>
63
                       highlight-current-row>
59
 
64
 
79
                     </template>
84
                     </template>
80
                 </el-table-column>
85
                 </el-table-column>
81
 
86
 
82
-                <el-table-column align="center" prop="name" label="费用总额">
87
+                <el-table-column align="center" prop="total" label="费用总额">
83
                     <template slot-scope="scope">
88
                     <template slot-scope="scope">
84
                         <div>{{scope.row.total.toFixed(2)}}</div>
89
                         <div>{{scope.row.total.toFixed(2)}}</div>
85
                     </template>
90
                     </template>
107
       return {
112
       return {
108
         detail_loading:false,
113
         detail_loading:false,
109
         tempArr: [],
114
         tempArr: [],
115
+        pos:0,
116
+
110
         sameRowArr: [],
117
         sameRowArr: [],
111
         keywords: '',
118
         keywords: '',
112
         tableData: [],
119
         tableData: [],
207
                   newObj['price'] = orders[b].order_info[c].pric
214
                   newObj['price'] = orders[b].order_info[c].pric
208
                   if (orders[b].order_info[c].advice_id > 0 && orders[b].order_info[c].project_id == 0) {
215
                   if (orders[b].order_info[c].advice_id > 0 && orders[b].order_info[c].project_id == 0) {
209
                     newObj['type'] = 1
216
                     newObj['type'] = 1
210
-                    newObj['item_name'] = orders[b].order_info[c].advice.advice_name
217
+                    // newObj['item_name'] = orders[b].order_info[c].advice.advice_name
211
                     newObj['item_id'] = orders[b].order_info[c].advice.drug_id
218
                     newObj['item_id'] = orders[b].order_info[c].advice.drug_id
212
 
219
 
220
+                    if(orders[b].order_info[c].advice.drug.min_unit != orders[b].order_info[c].advice.drug.dose_unit) {
221
+                      newObj['item_name'] = orders[b].order_info[c].advice.advice_name + "( " + orders[b].order_info[c].advice.drug.dose + orders[b].order_info[c].advice.drug.dose_unit + "*" + orders[b].order_info[c].advice.drug.min_number + orders[b].order_info[c].advice.drug.min_unit + "/" + orders[b].order_info[c].advice.drug.max_unit + " )"
222
+                    }else{
223
+
224
+                      newObj['item_name'] = ""
225
+                    }
226
+
227
+
213
                   }
228
                   }
214
                   if (orders[b].order_info[c].advice_id == 0 && orders[b].order_info[c].project_id > 0) {
229
                   if (orders[b].order_info[c].advice_id == 0 && orders[b].order_info[c].project_id > 0) {
215
                     newObj['type'] = 2
230
                     newObj['type'] = 2
217
 
232
 
218
                     if (orders[b].order_info[c].project.type == 2) {
233
                     if (orders[b].order_info[c].project.type == 2) {
219
                       newObj['item_name'] = orders[b].order_info[c].project.project.project_name
234
                       newObj['item_name'] = orders[b].order_info[c].project.project.project_name
235
+
236
+
220
                     } else if (orders[b].order_info[c].project.type == 3) {
237
                     } else if (orders[b].order_info[c].project.type == 3) {
221
                       newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name + "( "+ orders[b].order_info[c].project.good_info.specification_name+" )"
238
                       newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name + "( "+ orders[b].order_info[c].project.good_info.specification_name+" )"
239
+
240
+
222
                     }
241
                     }
223
                   }
242
                   }
224
                   obj.order_info.push(newObj)
243
                   obj.order_info.push(newObj)
226
               }
245
               }
227
               tempPatientsTwo.push(obj)
246
               tempPatientsTwo.push(obj)
228
             }
247
             }
229
-            console.log(tempPatientsTwo)
248
+
230
 
249
 
231
             for (let d = 0; d < tempPatientsTwo.length; d++) {
250
             for (let d = 0; d < tempPatientsTwo.length; d++) {
232
               tempPatientsTwo[d]['new_order_info'] = []
251
               tempPatientsTwo[d]['new_order_info'] = []
283
             for (let i = 0; i < tempPatientsTwo.length; i++) {
302
             for (let i = 0; i < tempPatientsTwo.length; i++) {
284
               let total = 0
303
               let total = 0
285
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
304
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
286
-                if (tempPatientsTwo[i].new_order_info[b].item_name.length != 0) {
305
+                let new_name = tempPatientsTwo[i].new_order_info[b].item_name
306
+                new_name=new_name.replace("( ","");
307
+                new_name=new_name.replace(" )","");
308
+                if (new_name.length != 0) {
287
                   total = parseFloat(total) + parseFloat((parseFloat(tempPatientsTwo[i].new_order_info[b].count.toString()) * parseFloat(tempPatientsTwo[i].new_order_info[b].price.toString().toString())).toFixed(2))
309
                   total = parseFloat(total) + parseFloat((parseFloat(tempPatientsTwo[i].new_order_info[b].count.toString()) * parseFloat(tempPatientsTwo[i].new_order_info[b].price.toString().toString())).toFixed(2))
288
                 }
310
                 }
289
               }
311
               }
293
             for (let i = 0; i < tempPatientsTwo.length; i++) {
315
             for (let i = 0; i < tempPatientsTwo.length; i++) {
294
               console.log(tempPatientsTwo[i].total)
316
               console.log(tempPatientsTwo[i].total)
295
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
317
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
296
-                if (tempPatientsTwo[i].new_order_info[b].item_name.length != 0) {
318
+                let new_name = tempPatientsTwo[i].new_order_info[b].item_name
319
+                new_name=new_name.replace("( ","");
320
+                new_name=new_name.replace(" )","");
321
+
322
+                if (new_name.length != 0) {
297
                   let obj = {
323
                   let obj = {
298
                     name: tempPatientsTwo[i].name,
324
                     name: tempPatientsTwo[i].name,
299
                     patient_id: tempPatientsTwo[i].patient_id,
325
                     patient_id: tempPatientsTwo[i].patient_id,
302
                     item_name: tempPatientsTwo[i].new_order_info[b].item_name,
328
                     item_name: tempPatientsTwo[i].new_order_info[b].item_name,
303
                     item_id: tempPatientsTwo[i].new_order_info[b].item_id,
329
                     item_id: tempPatientsTwo[i].new_order_info[b].item_id,
304
                     count: tempPatientsTwo[i].new_order_info[b].count,
330
                     count: tempPatientsTwo[i].new_order_info[b].count,
305
-                    total: tempPatientsTwo[i].total
331
+
332
+                  }
333
+                  if(b == 0){
334
+                    obj['total'] =  tempPatientsTwo[i].total
335
+                  }else{
336
+                    obj['total'] = 0
306
                   }
337
                   }
307
                   this.tableData.push(obj)
338
                   this.tableData.push(obj)
308
                 }
339
                 }
442
             colspan: _col
473
             colspan: _col
443
           }
474
           }
444
         }
475
         }
476
+      }, getTotal(param) {
477
+        const { columns, data } = param
478
+        const sums = []
479
+        columns.forEach((column, index) => {
480
+          if (index === 0) {
481
+            sums[index] = '合计'
482
+            return
483
+          }
484
+          console.log(data)
485
+          const values = data.map(item => Number(item[column.property]))
486
+          if (column.property === 'total') {
487
+            sums[index] = values.reduce((prev, curr) => {
488
+              const value = Number(curr)
489
+              if (!isNaN(value)) {
490
+                return prev + curr
491
+              } else {
492
+                return prev
493
+              }
494
+            }, 0)
495
+            sums[index] = sums[index].toFixed(2)
496
+          } else {
497
+            sums[index] = ''
498
+          }
499
+        })
500
+
501
+        return sums
445
       }
502
       }
446
     },
503
     },
447
     created() {
504
     created() {

+ 8 - 4
src/xt_pages/outpatientTool/components/gather.vue 파일 보기

12
                     <!--</el-button>-->
12
                     <!--</el-button>-->
13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
14
                               @keyup.enter.native='searchAction'
14
                               @keyup.enter.native='searchAction'
15
+                              placeholder="请输入患者姓名"
16
+
15
                               class="filter-item"/>
17
                               class="filter-item"/>
16
                     <el-select size="small" v-model="item_type" placeholder="请选择"
18
                     <el-select size="small" v-model="item_type" placeholder="请选择"
17
                                style="width:150px;margin-left:10px;" @change="changeItem">
19
                                style="width:150px;margin-left:10px;" @change="changeItem">
104
         tempArr: [],
106
         tempArr: [],
105
         sameRowArr: [],
107
         sameRowArr: [],
106
         keywords: '',
108
         keywords: '',
109
+        pos:0,
107
 
110
 
108
         tableData: [],
111
         tableData: [],
109
         chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
112
         chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
271
                   obj['patient_id'] = tempPatientsTwo[d].patient_id
274
                   obj['patient_id'] = tempPatientsTwo[d].patient_id
272
                   this.tableData.push(obj)
275
                   this.tableData.push(obj)
273
 
276
 
274
-                  obj2['sum'] = price + price2 + price3
277
+                  obj2['sum'] = 0
275
                   obj2['price'] = price2
278
                   obj2['price'] = price2
276
                   obj2['item_name'] = '药品'
279
                   obj2['item_name'] = '药品'
277
                   obj2['name'] = tempPatientsTwo[d].name
280
                   obj2['name'] = tempPatientsTwo[d].name
278
                   obj2['patient_id'] = tempPatientsTwo[d].patient_id
281
                   obj2['patient_id'] = tempPatientsTwo[d].patient_id
279
                   this.tableData.push(obj2)
282
                   this.tableData.push(obj2)
280
 
283
 
281
-                  obj3['sum'] = price + price2 + price3
284
+                  obj3['sum'] = 0
282
                   obj3['price'] = price3
285
                   obj3['price'] = price3
283
                   obj3['item_name'] = '耗材'
286
                   obj3['item_name'] = '耗材'
284
                   obj3['name'] = tempPatientsTwo[d].name
287
                   obj3['name'] = tempPatientsTwo[d].name
458
             sums[index] = '合计'
461
             sums[index] = '合计'
459
             return
462
             return
460
           }
463
           }
464
+          console.log(data)
461
           const values = data.map(item => Number(item[column.property]))
465
           const values = data.map(item => Number(item[column.property]))
462
           if (column.property === 'sum') {
466
           if (column.property === 'sum') {
463
             sums[index] = values.reduce((prev, curr) => {
467
             sums[index] = values.reduce((prev, curr) => {
464
               const value = Number(curr)
468
               const value = Number(curr)
465
               if (!isNaN(value)) {
469
               if (!isNaN(value)) {
466
-                return prev+ curr
470
+                return prev + curr
467
               } else {
471
               } else {
468
                 return prev
472
                 return prev
469
               }
473
               }
470
             }, 0)
474
             }, 0)
471
             sums[index] = sums[index].toFixed(2)
475
             sums[index] = sums[index].toFixed(2)
472
           } else {
476
           } else {
473
-            sums[index] = '--'
477
+            sums[index] = ''
474
           }
478
           }
475
         })
479
         })
476
 
480
 

+ 20 - 9
src/xt_pages/outpatientTool/components/settle.vue 파일 보기

12
                     <!--</el-button>-->
12
                     <!--</el-button>-->
13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
14
                               @keyup.enter.native='searchAction'
14
                               @keyup.enter.native='searchAction'
15
+                              placeholder="请输入患者姓名"
15
                               class="filter-item"/>
16
                               class="filter-item"/>
16
                     <el-select size="small" v-model="item_type" placeholder="请选择"
17
                     <el-select size="small" v-model="item_type" placeholder="请选择"
17
                                style="width:150px;margin-left:10px;" @change="changeItem">
18
                                style="width:150px;margin-left:10px;" @change="changeItem">
69
                     </template>
70
                     </template>
70
                 </el-table-column>
71
                 </el-table-column>
71
 
72
 
72
-                <el-table-column align="center" prop="item_name" label="结算类型">
73
+                <el-table-column align="center" prop="is_medicine_insurance" label="结算类型">
73
                     <template slot-scope="scope">
74
                     <template slot-scope="scope">
74
                         <div v-if="scope.row.is_medicine_insurance == 0">自费</div>
75
                         <div v-if="scope.row.is_medicine_insurance == 0">自费</div>
75
                         <div v-if="scope.row.is_medicine_insurance == 1">医保</div>
76
                         <div v-if="scope.row.is_medicine_insurance == 1">医保</div>
76
                     </template>
77
                     </template>
77
                 </el-table-column>
78
                 </el-table-column>
78
-                <el-table-column align="center" prop="item_name" label="处方类型">
79
+                <el-table-column align="center" prop="med_type" label="处方类型">
79
                     <template slot-scope="scope">
80
                     <template slot-scope="scope">
80
                         <div v-if="scope.row.med_type == '14'">门诊特殊病</div>
81
                         <div v-if="scope.row.med_type == '14'">门诊特殊病</div>
81
                         <div v-if="scope.row.med_type == '11'">普通门诊</div>
82
                         <div v-if="scope.row.med_type == '11'">普通门诊</div>
82
                     </template>
83
                     </template>
83
                 </el-table-column>
84
                 </el-table-column>
84
-                <el-table-column align="center" prop="item_name" label="医疗费总额">
85
+                <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
85
                     <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
86
                     <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
86
                 </el-table-column>
87
                 </el-table-column>
87
-                <el-table-column align="center" prop="item_name" label="基金支付金额">
88
+                <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
88
                     <template slot-scope="scope">{{scope.row.fund_pay_sumamt}}</template>
89
                     <template slot-scope="scope">{{scope.row.fund_pay_sumamt}}</template>
89
                 </el-table-column>
90
                 </el-table-column>
90
-                <el-table-column align="center" prop="item_name" label="个人账户支付金额">
91
+                <el-table-column align="center" prop="acct_pay" label="个人账户支付金额">
91
                     <template slot-scope="scope">{{scope.row.acct_pay}}</template>
92
                     <template slot-scope="scope">{{scope.row.acct_pay}}</template>
92
                 </el-table-column>
93
                 </el-table-column>
93
-                <el-table-column align="center" prop="item_name" label="个人支付金额">
94
+                <el-table-column align="center" prop="psn_cash_pay" label="个人支付金额">
94
                     <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
95
                     <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
95
                 </el-table-column>
96
                 </el-table-column>
96
                 <el-table-column align="center" prop="total" label="费用总额">
97
                 <el-table-column align="center" prop="total" label="费用总额">
208
             for (let i = 0; i < data.length; i++) {
209
             for (let i = 0; i < data.length; i++) {
209
               for (let b = 0; b < data[i].orders.length; b++) {
210
               for (let b = 0; b < data[i].orders.length; b++) {
210
                 let order = data[i].orders[b]
211
                 let order = data[i].orders[b]
211
-                order['total'] = data[i].total
212
+
213
+                if(b == 0){
214
+                  order['total'] = data[i].total
215
+
216
+                }else{
217
+                  order['total'] = 0
218
+
219
+                }
220
+
212
                 this.tableData.push(order)
221
                 this.tableData.push(order)
213
 
222
 
214
               }
223
               }
288
             colspan: _col
297
             colspan: _col
289
           }
298
           }
290
         }
299
         }
291
-      }, getTotal(param) {
300
+      },
301
+      getTotal(param) {
292
         const { columns, data } = param
302
         const { columns, data } = param
293
         const sums = []
303
         const sums = []
294
         columns.forEach((column, index) => {
304
         columns.forEach((column, index) => {
296
             sums[index] = '合计'
306
             sums[index] = '合计'
297
             return
307
             return
298
           }
308
           }
309
+          console.log(data)
299
           const values = data.map(item => Number(item[column.property]))
310
           const values = data.map(item => Number(item[column.property]))
300
           if (column.property === 'total') {
311
           if (column.property === 'total') {
301
             sums[index] = values.reduce((prev, curr) => {
312
             sums[index] = values.reduce((prev, curr) => {
308
             }, 0)
319
             }, 0)
309
             sums[index] = sums[index].toFixed(2)
320
             sums[index] = sums[index].toFixed(2)
310
           } else {
321
           } else {
311
-            sums[index] = '--'
322
+            sums[index] = ''
312
           }
323
           }
313
         })
324
         })
314
 
325