Browse Source

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

csx 2 years ago
parent
commit
030e676114

+ 16 - 1
src/router/modules/hisTool.js View File

83
       component: () => import('@/xt_pages/outpatientTool/zeroSummary'),
83
       component: () => import('@/xt_pages/outpatientTool/zeroSummary'),
84
       name: 'zeroSummary',
84
       name: 'zeroSummary',
85
       meta: { title: 'zeroSummary', noCache: true }
85
       meta: { title: 'zeroSummary', noCache: true }
86
+    },
87
+    {
88
+      path: '/hisTool/detailPrint',
89
+      component: () => import('@/xt_pages/outpatientTool/detailPrint'),
90
+      name: 'detailPrint',
91
+      hidden: true,
92
+      is_menu: false,
93
+      meta: { title: 'detailPrint', noCache: true }
94
+    },
95
+    {
96
+      path: '/hisTool/gatherPrint',
97
+      component: () => import('@/xt_pages/outpatientTool/gatherPrint'),
98
+      name: 'gatherPrint',
99
+      hidden: true,
100
+      is_menu: false,
101
+      meta: { title: 'gatherPrint', noCache: true }
86
     }
102
     }
87
-
88
   ]
103
   ]
89
 }
104
 }

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

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

+ 2 - 2
src/xt_pages/hospitalStation/invoicePrint.vue View File

15
       <div class="dialysisPage">
15
       <div class="dialysisPage">
16
         <printOne
16
         <printOne
17
           v-if="
17
           v-if="
18
-            org_id != 10215 && org_id != 10265 && org_id != 4 && org_id != 0
18
+            org_id != 10215 && org_id != 10265 && org_id != 4 && org_id != 0 && org_id != 9675
19
           "
19
           "
20
           :paramsObj="invoiceParams"
20
           :paramsObj="invoiceParams"
21
         ></printOne>
21
         ></printOne>
22
         <printTwo v-if="org_id == 10215" :paramsObj="invoiceParams"></printTwo>
22
         <printTwo v-if="org_id == 10215" :paramsObj="invoiceParams"></printTwo>
23
         <printThree
23
         <printThree
24
-          v-if="org_id == 10265 || org_id == 0 || org_id == 4"
24
+          v-if="org_id == 10265 || org_id == 0 || org_id == 4 || org_id == 9675"
25
           :paramsObj="invoiceParams"
25
           :paramsObj="invoiceParams"
26
         ></printThree>
26
         ></printThree>
27
       </div>
27
       </div>

+ 9 - 9
src/xt_pages/hospitalStation/invoiceTemplate/printThree.vue View File

70
             <div style="position: absolute;top:190px;left:110px"></div>
70
             <div style="position: absolute;top:190px;left:110px"></div>
71
             <div style="position: absolute;top:190px;left:220px">治疗费</div>
71
             <div style="position: absolute;top:190px;left:220px">治疗费</div>
72
             <div style="position: absolute;top:190px;left:290px">{{list.treatCostTotal}}</div>
72
             <div style="position: absolute;top:190px;left:290px">{{list.treatCostTotal}}</div>
73
-            <div style="position: absolute;top:190px;left:400px">CT核磁</div>
73
+            <div style="position: absolute;top:190px;left:400px">护理费</div>
74
             <div style="position: absolute;top:190px;left:470px"></div>
74
             <div style="position: absolute;top:190px;left:470px"></div>
75
             <div style="position: absolute;top:190px;left:580px">床位费</div>
75
             <div style="position: absolute;top:190px;left:580px">床位费</div>
76
             <div style="position: absolute;top:190px;left:650px"></div>
76
             <div style="position: absolute;top:190px;left:650px"></div>
154
 
154
 
155
         <div style="position: absolute;top:310px;left:40px">
155
         <div style="position: absolute;top:310px;left:40px">
156
             <!-- 个人账户支付 -->
156
             <!-- 个人账户支付 -->
157
-          个人账户支付:{{list.order.acct_pay?list.order.acct_pay:''}}
157
+          个人账户支付:{{list.order.acct_pay?list.order.acct_pay:'0'}}
158
         </div>
158
         </div>
159
         <div style="position: absolute;top:310px;left:250px">
159
         <div style="position: absolute;top:310px;left:250px">
160
             <!-- 统筹支付 -->
160
             <!-- 统筹支付 -->
161
-          统筹支付:{{list.order.hifp_pay?list.order.hifp_pay:''}}
161
+          统筹支付:{{list.order.hifp_pay?list.order.hifp_pay:'0'}}
162
         </div>
162
         </div>
163
         <div style="position: absolute;top:310px;left:480px">
163
         <div style="position: absolute;top:310px;left:480px">
164
-          现金支付:{{list.order.psn_cash_pay?list.order.psn_cash_pay:''}}
164
+          现金支付:{{list.order.psn_cash_pay?list.order.psn_cash_pay:'0'}}
165
           <!-- 现金支付 -->
165
           <!-- 现金支付 -->
166
         </div>
166
         </div>
167
         <div style="position: absolute;top:340px;left:40px">
167
         <div style="position: absolute;top:340px;left:40px">
168
-          公务员补助:{{list.order.cvlserv_pay?list.order.cvlserv_pay:''}}
168
+          公务员补助:{{list.order.cvlserv_pay?list.order.cvlserv_pay:'0'}}
169
           <!-- 公务员补助 -->
169
           <!-- 公务员补助 -->
170
         </div>
170
         </div>
171
         <div style="position: absolute;top:340px;left:250px">
171
         <div style="position: absolute;top:340px;left:250px">
172
-          医疗救助:{{list.order.maf_pay?list.order.maf_pay:''}}
172
+          医疗救助:{{list.order.maf_pay?list.order.maf_pay:'0'}}
173
           <!-- 医疗救助 -->
173
           <!-- 医疗救助 -->
174
         </div>
174
         </div>
175
         <!-- 大病 -->
175
         <!-- 大病 -->
184
         </div> -->
184
         </div> -->
185
         <div style="position: absolute;top:370px;left:40px">
185
         <div style="position: absolute;top:370px;left:40px">
186
             <!-- 预交款合计 -->
186
             <!-- 预交款合计 -->
187
-            预交款合计:
187
+            预交款合计:0
188
         </div>
188
         </div>
189
         <div style="position: absolute;top:370px;left:250px">
189
         <div style="position: absolute;top:370px;left:250px">
190
             <!-- 补交款 -->
190
             <!-- 补交款 -->
191
-            补交款:
191
+            补交款:0
192
         </div>
192
         </div>
193
         <div style="position: absolute;top:370px;left:480px">
193
         <div style="position: absolute;top:370px;left:480px">
194
             <!-- 应退款 -->
194
             <!-- 应退款 -->
195
-            应退款:
195
+            应退款:0
196
         </div>
196
         </div>
197
         <div>
197
         <div>
198
             <div style="position: absolute;top:400px;left:40px">
198
             <div style="position: absolute;top:400px;left:40px">

+ 61 - 19
src/xt_pages/outpatientTool/components/detailStatistics.vue View File

17
         </el-select>
17
         </el-select>
18
 
18
 
19
         <el-input
19
         <el-input
20
-            size="small"
21
-            style="width: 150px"
22
-            v-model="keywords"
23
-            class="filter-item"
20
+          size="small"
21
+          style="width: 150px"
22
+          v-model="keywords"
23
+          class="filter-item"
24
+          placeholder="请输入患者姓名"
24
         />
25
         />
25
         <el-button
26
         <el-button
26
-            size="small"
27
-            style="margin: 0 10px"
28
-            class="filter-item"
29
-            type="primary"
30
-            @click="searchAction"
27
+          size="small"
28
+          style="margin: 0 10px"
29
+          class="filter-item"
30
+          type="primary"
31
+          @click="searchAction"
31
         >搜索
32
         >搜索
32
         </el-button>
33
         </el-button>
33
         <el-date-picker
34
         <el-date-picker
39
             @change="changeDate"
40
             @change="changeDate"
40
             end-placeholder="结束日期">
41
             end-placeholder="结束日期">
41
         </el-date-picker>
42
         </el-date-picker>
43
+        <el-button  type="primary" size="small" @click="toPrint">打印</el-button>
42
       </div>
44
       </div>
43
       <div>
45
       <div>
44
       </div>
46
       </div>
99
      
101
      
100
     </el-table>
102
     </el-table>
101
      <div>总费用:{{getAllPice()}}</div>
103
      <div>总费用:{{getAllPice()}}</div>
102
-     <div>个人支付:</div>
103
-     <div>基金支付记账:</div>
104
-     <div>补充医疗支付记账:</div>
105
-    <div>救助支付金额:</div>
104
+     <div>个人支付:{{getActPay()}}</div>
105
+     <div>基金支付记账:{{getFundPaySumamt()}}</div>
106
+     <div>补充医疗支付记账:{{getHifesPay()}}</div>
107
+    <div>救助支付金额:{{getMafPay()}}</div>
106
   </div>
108
   </div>
107
 
109
 
108
   <!-- </div> -->
110
   <!-- </div> -->
144
         { id: 3, name: '耗材' },
146
         { id: 3, name: '耗材' },
145
         { id: 2, name: '项目' }
147
         { id: 2, name: '项目' }
146
 
148
 
147
-      ]
149
+      ],
150
+      list:[],
148
 
151
 
149
     }
152
     }
150
   },
153
   },
160
       }
163
       }
161
      },
164
      },
162
     searchAction(){
165
     searchAction(){
163
-
164
-
166
+     this.getHisSummaryDetailList()
165
     },
167
     },
166
     changeDate() {
168
     changeDate() {
167
       this.getHisSummaryDetailList()
169
       this.getHisSummaryDetailList()
182
      getHisSummaryDetailList(params).then(response=>{
184
      getHisSummaryDetailList(params).then(response=>{
183
        if(response.data.state == 1){
185
        if(response.data.state == 1){
184
           var list =  response.data.data.list
186
           var list =  response.data.data.list
187
+          console.log("list23323232323232232323",list)
188
+          this.list = list
185
           this.tableData = []
189
           this.tableData = []
186
-          // console.log("list23232332232322323",list)
187
           for(let i=0;i<list.length;i++){
190
           for(let i=0;i<list.length;i++){
188
             for(let j=0;j<list[i].orders.length;j++){
191
             for(let j=0;j<list[i].orders.length;j++){
189
               for(let z=0;z<list[i].orders[j].order_info.length;z++){
192
               for(let z=0;z<list[i].orders[j].order_info.length;z++){
202
           }
205
           }
203
           obj.total_price = (obj.total_price).toFixed(2)
206
           obj.total_price = (obj.total_price).toFixed(2)
204
           this.tableData.push(obj)
207
           this.tableData.push(obj)
205
-          
206
-          // console.log("tabledata",this.tableData)
207
        }
208
        }
208
      })
209
      })
209
     },
210
     },
215
         }
216
         }
216
       }
217
       }
217
       return total_price
218
       return total_price
219
+    },
220
+    getActPay(){
221
+      console.log("hh23h323223323",this.list)
222
+      var act_pay = 0
223
+      for(let i=0;i<this.list.length;i++){
224
+        for(let j=0;j<this.list[i].orders.length;j++){
225
+           act_pay +=this.list[i].orders[j].acct_pay
226
+        }
227
+      }
228
+      return act_pay
229
+    },
230
+    getFundPaySumamt(){
231
+      var fund_pay_sumamt = 0
232
+      for(let i=0;i<this.list.length;i++){
233
+        for(let j=0;j<this.list[i].orders.length;j++){
234
+           fund_pay_sumamt +=this.list[i].orders[j].fund_pay_sumamt
235
+        }
236
+      }
237
+      return fund_pay_sumamt
238
+    },
239
+    getHifesPay(){
240
+      var hifes_pay = 0
241
+      for(let i=0;i<this.list.length;i++){
242
+        for(let j=0;j<this.list[i].orders.length;j++){
243
+          hifes_pay +=this.list[i].orders[j].hifes_pay
244
+        }
245
+      }
246
+      return hifes_pay
247
+    },
248
+    getMafPay(){
249
+      var maf_pay = 0
250
+      for(let i=0;i<this.list.length;i++){
251
+        for(let j=0;j<this.list[i].orders.length;j++){
252
+          maf_pay +=this.list[i].orders[j].maf_pay
253
+        }
254
+      }
255
+      return maf_pay
256
+    },
257
+    toPrint(){
258
+      this.$router.push({path:"/hisTool/detailPrint?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords})
218
     }
259
     }
260
+
219
   },
261
   },
220
   created() {
262
   created() {
221
     this.getHisSummaryDetailList()
263
     this.getHisSummaryDetailList()

+ 108 - 22
src/xt_pages/outpatientTool/components/gatherStatistics.vue View File

39
             @change="changeDate"
39
             @change="changeDate"
40
             end-placeholder="结束日期">
40
             end-placeholder="结束日期">
41
         </el-date-picker>
41
         </el-date-picker>
42
+        <el-button  type="primary" size="small" @click="toPrint">打印</el-button>
42
       </div>
43
       </div>
43
       <div>
44
       <div>
44
       </div>
45
       </div>
54
       </el-table-column>
55
       </el-table-column>
55
       <el-table-column align="center" prop="name" label="处方日期">
56
       <el-table-column align="center" prop="name" label="处方日期">
56
         <template slot-scope="scope">
57
         <template slot-scope="scope">
57
-          {{getTime(scope.row.record_date)}}
58
+          <span v-if="scope.row.record_date > 0">{{getTimes(scope.row.record_date)}} </span> 
58
         </template>
59
         </template>
59
       </el-table-column>
60
       </el-table-column>
60
       <el-table-column align="center" prop="name" label="费用分类">
61
       <el-table-column align="center" prop="name" label="费用分类">
84
       </el-table-column>
85
       </el-table-column>
85
       <el-table-column align="center" prop="name" label="金额">
86
       <el-table-column align="center" prop="name" label="金额">
86
         <template slot-scope="scope">
87
         <template slot-scope="scope">
87
-          {{ (scope.row.price * scope.row.count).toFixed(2) }}
88
+          <span v-if="scope.row.is_total == 1">{{ scope.row.total }}</span>  
89
+          <span v-if="scope.row.is_total == 2">{{ (scope.row.price * scope.row.count).toFixed(2) }}</span>  
88
         </template>
90
         </template>
89
       </el-table-column>
91
       </el-table-column>
90
       <el-table-column align="center" prop="name" label="医保类别">
92
       <el-table-column align="center" prop="name" label="医保类别">
91
-        <template slot-scope="scope"></template>
93
+        <template slot-scope="scope">
94
+         <span v-if="scope.row.chrgitm_lv== '01'">甲类</span>
95
+         <span v-if="scope.row.chrgitm_lv== '02'">乙类</span>
96
+         <span v-if="scope.row.chrgitm_lv== '03'">自费</span>
97
+        </template>
92
       </el-table-column>
98
       </el-table-column>
93
 
99
 
94
     </el-table>
100
     </el-table>
163
             return false
169
             return false
164
           } else {
170
           } else {
165
             this.order = response.data.data.order
171
             this.order = response.data.data.order
166
-            this.order['bedCostTotal'] = response.data.data.bedCostTotal
167
-            this.order['operationCostTotal'] = response.data.data.operationCostTotal
168
-            this.order['otherCostTotal'] = response.data.data.otherCostTotal
169
-            this.order['materialCostTotal'] = response.data.data.materialCostTotal
170
-            this.order['westernMedicineCostTotal'] = response.data.data.westernMedicineCostTotal
171
-            this.order['chineseTraditionalMedicineCostTotal'] = response.data.data.chineseTraditionalMedicineCostTotal
172
-            this.order['checkCostTotal'] = response.data.data.checkCostTotal
173
-            this.order['zhenChaCostTotal'] = response.data.data.zhenChaCostTotal
174
-            this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
175
-            this.order['treatCostTotal'] = response.data.data.treatCostTotal
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
+         
176
             this.patient = response.data.data.patient
186
             this.patient = response.data.data.patient
177
             this.admin = response.data.data.admin_info
187
             this.admin = response.data.data.admin_info
178
             this.his_hospital = response.data.data.his_hospital
188
             this.his_hospital = response.data.data.his_hospital
179
             var order_info = response.data.data.order_info
189
             var order_info = response.data.data.order_info
180
-
190
+            // console.log("order_info2332323232323232323",order_info)
181
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
191
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
182
               //获取所有项目类型进行去重
192
               //获取所有项目类型进行去重
183
               let med_chrgitm_types = []
193
               let med_chrgitm_types = []
217
               
227
               
218
               this.list.push(newobj)
228
               this.list.push(newobj)
219
             }else{
229
             }else{
220
-              console.log("hh2332322323232332232332",order_info)
221
               //获取所有项目类型进行去重
230
               //获取所有项目类型进行去重
222
               let med_chrgitm_types = []
231
               let med_chrgitm_types = []
223
               for (let i = 0; i < order_info.length; i++) {
232
               for (let i = 0; i < order_info.length; i++) {
224
                 med_chrgitm_types.push(order_info[i].med_chrgitm_type)
233
                 med_chrgitm_types.push(order_info[i].med_chrgitm_type)
225
               }
234
               }
235
+              // console.log("med_chrgitm_types23323332233232232323232332322332233",med_chrgitm_types)
226
               const obj = {}
236
               const obj = {}
227
               med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
237
               med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
228
                 obj[next] ? '' : obj[next] = true && cur.push(next)
238
                 obj[next] ? '' : obj[next] = true && cur.push(next)
240
                     tempDetails.push(order_info[b])
250
                     tempDetails.push(order_info[b])
241
                   }
251
                   }
242
                 }
252
                 }
243
-                console.log("tempdetail2323323232322332233223",tempDetails)
253
+                // console.log("tempdetail2323323232322332233223",tempDetails)
244
                 obj.details = this.setNewData(tempDetails)
254
                 obj.details = this.setNewData(tempDetails)
245
 
255
 
246
                 obj.total = this.getTotal(obj.details)
256
                 obj.total = this.getTotal(obj.details)
248
                   total: obj.total,
258
                   total: obj.total,
249
                   is_total: 1,
259
                   is_total: 1,
250
                 })
260
                 })
251
-                console.log("obj3232232332323223",obj.details)
261
+                // console.log("obj3232232332323223",obj.details)
252
                 this.list =  this.list.concat(obj.details)
262
                 this.list =  this.list.concat(obj.details)
253
                 for(let i=0;i<this.list.length;i++){
263
                 for(let i=0;i<this.list.length;i++){
254
                   this.list[i].index = i+1
264
                   this.list[i].index = i+1
255
                 }
265
                 }
256
-                console.log("list32233223233332232323232323",this.list)
266
+                // console.log("list32233223233332232323232323",this.list)
257
              }
267
              }
258
           }
268
           }
259
         }
269
         }
278
      return project_name
288
      return project_name
279
     },
289
     },
280
     setNewData(details) {
290
     setNewData(details) {
281
-      console.log("detail233223233223",details)
291
+      // console.log("detail233223233223",details)
282
         let drug_ids = []
292
         let drug_ids = []
283
         let project_ids = []
293
         let project_ids = []
284
 
294
 
301
           }
311
           }
302
 
312
 
303
         }
313
         }
304
-   
314
+        // console.log("drug_ids232332322323",drug_ids)
315
+        // console.log("project_ids2323232332",project_ids)
305
         let new_drug_ids = this.unique(drug_ids)
316
         let new_drug_ids = this.unique(drug_ids)
306
         let new_project_ids = this.unique(project_ids)
317
         let new_project_ids = this.unique(project_ids)
318
+        // console.log("new23233232332322323323232",new_drug_ids)
319
+        // console.log("new_project_ids2332332323",new_project_ids)
307
         let list = []
320
         let list = []
308
         if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
321
         if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
309
           for (let i = 0; i < new_drug_ids.length; i++) {
322
           for (let i = 0; i < new_drug_ids.length; i++) {
319
                 obj['price'] = parseFloat(details[a].pric)
332
                 obj['price'] = parseFloat(details[a].pric)
320
                 obj['is_total'] = 2
333
                 obj['is_total'] = 2
321
                 obj['record_date'] = details[a].advice.record_date
334
                 obj['record_date'] = details[a].advice.record_date
335
+                obj['chrgitm_lv'] = details[a].chrgitm_lv
322
                 count = count + details[a].cnt
336
                 count = count + details[a].cnt
323
               }
337
               }
324
             }
338
             }
325
             obj['count'] = count
339
             obj['count'] = count
326
             list.push(obj)
340
             list.push(obj)
341
+
327
           }
342
           }
328
         }
343
         }
329
-
344
+        //  console.log("list我的2323232323233223322332",list)
330
         if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
345
         if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
331
           for (let i = 0; i < new_project_ids.length; i++) {
346
           for (let i = 0; i < new_project_ids.length; i++) {
332
             let obj = {}
347
             let obj = {}
348
                 obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
363
                 obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
349
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
364
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
350
                 obj['price'] = parseFloat(details[a].pric)
365
                 obj['price'] = parseFloat(details[a].pric)
366
+                obj['chrgitm_lv'] = details[a].chrgitm_lv
351
                 obj['is_total'] = 2
367
                 obj['is_total'] = 2
352
 
368
 
353
                 count = count + details[a].cnt
369
                 count = count + details[a].cnt
355
             }
371
             }
356
             obj['count'] = count
372
             obj['count'] = count
357
             list.push(obj)
373
             list.push(obj)
374
+          
358
           }
375
           }
359
         }
376
         }
377
+
378
+         if (new_drug_ids.length > 0 && new_project_ids.length > 0) {
379
+           for (let i = 0; i < new_drug_ids.length; i++) {
380
+            let obj = {}
381
+            let count = 0
382
+            for (let a = 0; a < details.length; a++) {
383
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
384
+                obj['name'] = details[a].advice.advice_name
385
+                obj['spec'] =   details[a].advice.drug.dose +   details[a].advice.drug.dose_unit+"*" +  details[a].advice.drug.min_number +   details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
386
+                obj['unit'] = details[a].advice.drug.min_unit
387
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
388
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
389
+                obj['price'] = parseFloat(details[a].pric)
390
+                obj['is_total'] = 2
391
+                obj['record_date'] = details[a].advice.record_date
392
+                obj['chrgitm_lv'] = details[a].chrgitm_lv
393
+                count = count + details[a].cnt
394
+              }
395
+            }
396
+            obj['count'] = count
397
+            list.push(obj)
398
+
399
+          }
400
+         
401
+          for (let i = 0; i < new_project_ids.length; i++) {
402
+            let obj = {}
403
+            let count = 0
404
+            for (let a = 0; a < details.length; a++) {
405
+              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
+              if( details[a].project.type == 2){
408
+                 obj['name'] = details[a].project.project.project_name
409
+                 obj['spec'] = ''
410
+                 obj['unit'] = details[a].project.project.unit
411
+
412
+               }else if(details[a].project.type == 3){
413
+                 obj['name'] = details[a].project.good_info.good_name
414
+                 obj['spec'] = ''
415
+                 obj['unit'] = details[a].project.good_info.packing_unit
416
+               }
417
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
418
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
419
+                obj['price'] = parseFloat(details[a].pric)
420
+                obj['is_total'] = 2
421
+                obj['record_date'] = details[a].project.record_date
422
+                obj['chrgitm_lv'] = details[a].chrgitm_lv
423
+                count = count + details[a].cnt
424
+              }
425
+            }
426
+            obj['count'] = count
427
+            list.push(obj)
428
+          
429
+          }
430
+         }
431
+
432
+        // console.log("list我的2323232323233223322332",list)
360
         return list
433
         return list
361
       }, 
434
       }, 
362
     
435
     
459
         return total.toFixed(2)
532
         return total.toFixed(2)
460
       },
533
       },
461
       getTimes(time) {
534
       getTimes(time) {
462
-       return uParseTime(time, '{y}-{m}-{d}')
535
+       if(time < 0){
536
+         return ""
537
+       }else{
538
+        return uParseTime(time, '{y}-{m}-{d}')
539
+       }
463
      },
540
      },
541
+     toPrint(){
542
+        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
+     }
464
   },
544
   },
465
   created() {
545
   created() {
466
     this.getGatherDetailList()
546
     this.getGatherDetailList()
467
 
547
 
548
+  },
549
+  watch:{
550
+    "patient_id":function(){
551
+      this.patient_id = this.patient_id
552
+      this.getHisSummaryDetailList()
553
+    }
468
   }
554
   }
469
 }
555
 }
470
 </script>
556
 </script>

+ 260 - 0
src/xt_pages/outpatientTool/detailPrint.vue View File

1
+<template>
2
+    <div id="list-print" class="list-print">
3
+        <div >
4
+        <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用清单</div>
5
+        <div class="listInfo">
6
+            <div>患者姓名:{{patient.name}}</div>
7
+            <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
8
+            <div>结算类别:</div>
9
+            <div>发票号码:</div>
10
+        </div>
11
+         <div class="listInfo">
12
+            <div>住院/门诊号:</div>
13
+            <div>科室:</div>
14
+            <div>就诊流水号:</div>
15
+        </div>
16
+        <div class="listInfo">
17
+            <div>总费用:{{getAllPice()}}</div>
18
+            <div>个人支付:{{getActPay()}}</div>
19
+            <div>基金支付记账:{{getFundPaySumamt()}}</div>
20
+            <div>补充医疗支付记账:{{getHifesPay()}}</div>
21
+        </div>
22
+        <div class="listInfo">
23
+            <div>救助支付金额:</div>
24
+        </div>
25
+        <table class="listTable" border="1">
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>
35
+            </tr>
36
+            <tr v-for="(item, index) in tableData" :key="index">
37
+                <td style="width:19%;text-align:center" >{{index+1}}</td>
38
+                <td style="width:10%;text-align:center" >
39
+                   <span v-if="item.record_date > 0">{{getTimes(item.record_date)}}</span> 
40
+                </td>
41
+                <td style="width:31%;text-align:center" >{{item.number}}</td>
42
+                <td style="width:14%;text-align:center" >
43
+                    <span v-if="item.advice_id > 0">{{item.advice.advice_name}}</span>
44
+                    <span v-if="item.project_id > 0">
45
+                        <span v-if="item.project.type == 2">{{item.project.project.project_name}}</span>
46
+                        <span v-if="item.project.type == 3">{item.project.good_info.good_name}}</span>
47
+                    </span>   
48
+                </td>
49
+                <td style="width:10%;text-align:center" >
50
+                   <span v-if="item.advice_id > 0">{{item.advice.drug.dose}}{{item.advice.drug.dose_unit}}*{{item.advice.drug.min_number}}{{item.advice.drug.min_unit}}/{{item.advice.drug.max_unit}}</span>
51
+                    <span v-if="item.project_id > 0">
52
+                        <span v-if="item.project.type == 2">{{item.project.project.project_name}}</span>
53
+                        <span v-if="item.project.type == 3">{{item.project.good_info.specification_name}}</span>
54
+                    </span>   
55
+                </td>
56
+                <td style="width:6%;text-align:center" >
57
+                     {{item.cnt}}
58
+                </td>
59
+                <td style="width:10%;text-align:center" >
60
+                    {{item.pric}}
61
+                </td>
62
+                <td style="width:10%;text-align:center" >
63
+                     {{item.total_price}}
64
+                </td>
65
+            </tr>
66
+        </table>
67
+        </div>
68
+    </div>
69
+</template>
70
+
71
+<script>
72
+  import { uParseTime } from '@/utils/tools'
73
+  import { getHisSummaryDetailList } from '@/api/his/his_tools'
74
+  export default {
75
+    data(){
76
+        return{
77
+          patient:{},
78
+          tableData:[],
79
+          list:[],
80
+        }
81
+    },
82
+    methods:{
83
+      getNowTime: function () {
84
+        let dateTime;
85
+        let yy = new Date().getFullYear();
86
+        let mm = new Date().getMonth() + 1;
87
+        let dd = new Date().getDate();
88
+        let hh = new Date().getHours();
89
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
90
+          :
91
+          new Date().getMinutes();
92
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
93
+          :
94
+          new Date().getSeconds();
95
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
96
+        return dateTime
97
+      },
98
+      getTimes(time) {
99
+        return uParseTime(time, '{y}-{m}-{d}')
100
+      },
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
+      getHisSummaryDetailList() {
117
+        let start_time = this.$route.query.start_time
118
+        let end_time = this.$route.query.end_time
119
+        let params = {
120
+            patient_id:this.$route.query.patient_id,
121
+            start_time: start_time,
122
+            end_time: end_time,
123
+            type: this.$route.query.type,
124
+            keyword:this.$route.query.keywords,
125
+        }
126
+     getHisSummaryDetailList(params).then(response=>{
127
+       if(response.data.state == 1){
128
+          var list =  response.data.data.list
129
+          console.log("list23323232323232232323",list)
130
+          this.list = list
131
+          this.patient = response.data.data.patient
132
+          console.log("patient2323233223232332",this.patient)
133
+          this.tableData = []
134
+          for(let i=0;i<list.length;i++){
135
+            for(let j=0;j<list[i].orders.length;j++){
136
+              for(let z=0;z<list[i].orders[j].order_info.length;z++){
137
+                  list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
138
+                  list[i].orders[j].order_info[z].number = list[i].orders[j].number
139
+                  this.tableData.push(list[i].orders[j].order_info[z])
140
+               }
141
+            }
142
+          }
143
+          var obj = {index:"合计",total_price:0,record_date:"0"}
144
+          for(let i=0;i<this.tableData.length;i++){
145
+            this.tableData[i].index = i+1
146
+            this.tableData[i].total_price = 0
147
+            this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
148
+            obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
149
+          }
150
+          obj.total_price = (obj.total_price).toFixed(2)
151
+          this.tableData.push(obj)
152
+          console.log("tabledata32233223323232",this.tableData)
153
+       }
154
+     })
155
+    },
156
+    getAllPice(){
157
+      var total_price = 0
158
+      for(let i=0;i<this.tableData.length;i++){
159
+        if(this.tableData[i].index =="合计"){
160
+          total_price = this.tableData[i].total_price
161
+        }
162
+      }
163
+      return total_price
164
+    },
165
+    getActPay(){
166
+      console.log("hh23h323223323",this.list)
167
+      var act_pay = 0
168
+      for(let i=0;i<this.list.length;i++){
169
+        for(let j=0;j<this.list[i].orders.length;j++){
170
+           act_pay +=this.list[i].orders[j].acct_pay
171
+        }
172
+      }
173
+      return act_pay
174
+    },
175
+    getFundPaySumamt(){
176
+      var fund_pay_sumamt = 0
177
+      for(let i=0;i<this.list.length;i++){
178
+        for(let j=0;j<this.list[i].orders.length;j++){
179
+           fund_pay_sumamt +=this.list[i].orders[j].fund_pay_sumamt
180
+        }
181
+      }
182
+      return fund_pay_sumamt
183
+    },
184
+    getHifesPay(){
185
+      var hifes_pay = 0
186
+      for(let i=0;i<this.list.length;i++){
187
+        for(let j=0;j<this.list[i].orders.length;j++){
188
+          hifes_pay +=this.list[i].orders[j].hifes_pay
189
+        }
190
+      }
191
+      return hifes_pay
192
+    },
193
+    getMafPay(){
194
+      var maf_pay = 0
195
+      for(let i=0;i<this.list.length;i++){
196
+        for(let j=0;j<this.list[i].orders.length;j++){
197
+          maf_pay +=this.list[i].orders[j].maf_pay
198
+        }
199
+      }
200
+      return maf_pay
201
+    },
202
+    },
203
+    watch:{
204
+        list: {
205
+            handler(newVal) {
206
+                this.getPage()
207
+            },
208
+            deep: true
209
+        }
210
+    },
211
+    created(){
212
+      this.getHisSummaryDetailList()   
213
+    }
214
+
215
+  }
216
+
217
+
218
+</script>
219
+
220
+<style lang="scss" scoped>
221
+.list-print{
222
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
223
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
224
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
225
+    margin-bottom: 20px;
226
+    padding:20px 10px;
227
+}
228
+.listTitle{
229
+    font-size: 24px;
230
+    text-align: center;
231
+    font-weight: bold;
232
+    margin-bottom: 10px;
233
+}
234
+.listInfo{
235
+    display: flex;
236
+    font-size: 16px;
237
+    justify-content: space-between;
238
+    margin: 10px 0;
239
+}
240
+.listTable{
241
+    width: 100%;
242
+    text-align: center;
243
+    border-collapse: collapse;
244
+    line-height: 40px;
245
+    font-size: 14px;
246
+    border-color: #000;
247
+    text-align: left;
248
+}
249
+.listTable tr td {
250
+    padding: 0 5px;
251
+}
252
+.tableBottom{
253
+    font-size: 16px;
254
+    display: flex;
255
+    margin-top: 20px;
256
+}
257
+.tableBottomOne{
258
+    margin-right: 40px;
259
+}
260
+</style>

+ 542 - 0
src/xt_pages/outpatientTool/gatherPrint.vue View File

1
+<template>
2
+    <div id="list-print" class="list-print">
3
+        <div >
4
+        <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用清单</div>
5
+         <div class="listInfo">
6
+            <div>医疗机构名称:{{$store.getters.xt_user.org.org_name}}</div>
7
+        </div>
8
+        <div class="listInfo">
9
+            <div>科别:</div>
10
+            <div>床号:</div>
11
+            <div>门诊号:</div>
12
+            <div>姓名:{{patient.name}}</div>
13
+        </div>
14
+         <div class="listInfo">
15
+            <div>预交款:</div>
16
+            <div>总费用:</div>
17
+            <div>门诊日期:</div>
18
+        </div>
19
+        <div class="listInfo">
20
+            <div>西药:</div>
21
+            <div>中成药:</div>
22
+            <div>中草药:</div>
23
+        </div>
24
+        <div class="listInfo">
25
+            <div>检查费:</div>
26
+            <div>输氧费:</div>
27
+            <div>手术费:</div>
28
+        </div>
29
+        <div class="listInfo">
30
+            <div>化验费:</div>
31
+            <div>输血费:</div>
32
+            <div>诊断费:</div>
33
+        </div>
34
+         <div class="listInfo">
35
+            <div>治疗费:</div>
36
+            <div>护理费:</div>
37
+            <div>床位费:</div>
38
+        </div>
39
+        <div class="listInfo">
40
+            <div>麻醉费:</div>
41
+            <div>材料费:</div>
42
+            <div>其他:</div>
43
+        </div>
44
+        <table class="listTable" border="1">
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>
53
+            </tr>
54
+            <tr v-for="(item, index) in list" :key="index">
55
+                <td style="width:19%;text-align:center" >
56
+                 {{ item.med_chrgitm_type }}
57
+                </td>
58
+                <td style="width:10%;text-align:center" >
59
+                  <span>{{item.name}}</span>  
60
+                </td>
61
+                <td style="width:31%;text-align:center" >
62
+                  {{ item.spec }}
63
+                </td>
64
+                <td style="width:14%;text-align:center" >
65
+                  {{item.price}}  
66
+                </td>
67
+                <td style="width:10%;text-align:center" >
68
+                   {{item.count }}{{item.unit }}
69
+                </td>
70
+                <td style="width:6%;text-align:center" >
71
+                    <span v-if="item.is_total == 1">{{item.total}}</span>  
72
+                    <span v-if="item.is_total == 2">{{(item.price * item.count).toFixed(2) }}</span>  
73
+                </td>
74
+                <td style="width:10%;text-align:center" >
75
+                  <span v-if="item.chrgitm_lv== '01'">甲类</span>
76
+                  <span v-if="item.chrgitm_lv== '02'">乙类</span>
77
+                  <span v-if="item.chrgitm_lv== '03'">自费</span>
78
+                </td>
79
+            </tr>
80
+        </table>
81
+        </div>
82
+    </div>
83
+</template>
84
+
85
+<script>
86
+  import { uParseTime } from '@/utils/tools'
87
+  import { getGatherDetailList } from '@/api/his/his_tools'
88
+  export default {
89
+    data(){
90
+        return{
91
+          patient:{},
92
+          tableData:[],
93
+          list:[],
94
+          order:[],
95
+        }
96
+    },
97
+    methods:{
98
+      getNowTime: function () {
99
+        let dateTime;
100
+        let yy = new Date().getFullYear();
101
+        let mm = new Date().getMonth() + 1;
102
+        let dd = new Date().getDate();
103
+        let hh = new Date().getHours();
104
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
105
+          :
106
+          new Date().getMinutes();
107
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
108
+          :
109
+          new Date().getSeconds();
110
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
111
+        return dateTime
112
+      },
113
+      getTimes(time) {
114
+        return uParseTime(time, '{y}-{m}-{d}')
115
+      },
116
+    getGatherDetailList() {
117
+      let start_time = this.$route.query.start_time
118
+      let end_time = this.$route.query.end_time
119
+      let params = {
120
+        patient_id:this.$route.query.patient_id,
121
+        start_time: start_time,
122
+        end_time: end_time,
123
+        type: this.$route.query.type,
124
+        keyword: this.$route.query.keyword,
125
+      }
126
+     getGatherDetailList(params).then(response=>{
127
+          if (response.data.state == 0) {
128
+            this.$message.error(response.data.msg)
129
+            return false
130
+          } else {
131
+            this.order = response.data.data.order
132
+      
133
+            this.patient = response.data.data.patient
134
+            this.admin = response.data.data.admin_info
135
+            this.his_hospital = response.data.data.his_hospital
136
+            var order_info = response.data.data.order_info
137
+            console.log("order_info2332332232332232323",order_info)
138
+            if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
139
+              //获取所有项目类型进行去重
140
+              let med_chrgitm_types = []
141
+              for (let i = 0; i < order_info.length; i++) {
142
+                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
143
+              }
144
+              const obj = {}
145
+              med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
146
+                obj[next] ? '' : obj[next] = true && cur.push(next)
147
+                return cur
148
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
149
+
150
+              let tempOrderInfo = []
151
+
152
+              for (let i = 0; i < med_chrgitm_types.length; i++) {
153
+                let obj = {
154
+                  total: 0,
155
+                  details: [],
156
+                  is_total:0,
157
+                }
158
+                let tempDetails = []
159
+                for (let b = 0; b < order_info.length; b++) {
160
+                  if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
161
+                    tempDetails.push(order_info[b])
162
+                  }
163
+                }
164
+                obj.details = this.setNewData(tempDetails)
165
+               
166
+                this.list =  this.list.concat(obj.details)
167
+                for(let i=0;i<this.list.length;i++){
168
+                  this.list[i].index = i
169
+                }
170
+              }
171
+              let newobj = {}
172
+              newobj['total'] = this.order.medfee_sumamt
173
+              newobj['is_total'] = 1
174
+              
175
+              this.list.push(newobj)
176
+            }else{
177
+              //获取所有项目类型进行去重
178
+              let med_chrgitm_types = []
179
+              for (let i = 0; i < order_info.length; i++) {
180
+                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
181
+              }
182
+             
183
+              const obj = {}
184
+              med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
185
+                obj[next] ? '' : obj[next] = true && cur.push(next)
186
+                return cur
187
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
188
+              let tempOrderInfo = []
189
+              for (let i = 0; i < med_chrgitm_types.length; i++) {
190
+                let obj = {
191
+                  total: 0,
192
+                  details: []
193
+                }
194
+                let tempDetails = []
195
+                for (let b = 0; b < order_info.length; b++) {
196
+                  if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
197
+                    tempDetails.push(order_info[b])
198
+                  }
199
+                }
200
+                
201
+                obj.details = this.setNewData(tempDetails)
202
+
203
+                obj.total = this.getTotal(obj.details)
204
+                obj.details.push({
205
+                  total: obj.total,
206
+                  is_total: 1,
207
+                })
208
+               
209
+                this.list =  this.list.concat(obj.details)
210
+                console.log("oh2323232323233223232323233",this.list)
211
+                for(let i=0;i<this.list.length;i++){
212
+                  this.list[i].index = i+1
213
+                }
214
+               
215
+             }
216
+          }
217
+        }
218
+     })
219
+    },
220
+     getAdviceName(id){
221
+      var drug_name = ""
222
+      for(let i= 0;i<this.tableData.length;i++){
223
+         if(id == this.tableData[i].advice_id){
224
+           drug_name = this.tableData[i].advice.advice_name
225
+         }
226
+      }
227
+      return drug_name
228
+    },
229
+    getProjectName(id){
230
+     var project_name = ""
231
+     for(let i=0;i<this.tableData.length;i++){
232
+       if(id == this.tableData[i].project_id){
233
+         project_name = this.tableData[i].project.project.project_name
234
+       }
235
+     }
236
+     return project_name
237
+    },
238
+    setNewData(details) {
239
+        let drug_ids = []
240
+        let project_ids = []
241
+
242
+        for (let i = 0; i < details.length; i++) {
243
+          if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
244
+            let obj = {
245
+              id: details[i].advice.drug_id,
246
+              price: details[i].advice.price,
247
+              record_date:details[i].advice.advice_date
248
+            }
249
+            drug_ids.push(obj)
250
+          } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
251
+            let obj = {
252
+              id: details[i].project.project_id,
253
+              price: details[i].project.price,
254
+              record_date:details[i].advice.record_date
255
+            }
256
+            project_ids.push(obj)
257
+
258
+          }
259
+
260
+        }
261
+      
262
+        let new_drug_ids = this.unique(drug_ids)
263
+        let new_project_ids = this.unique(project_ids)
264
+       
265
+        let list = []
266
+        if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
267
+          for (let i = 0; i < new_drug_ids.length; i++) {
268
+            let obj = {}
269
+            let count = 0
270
+            for (let a = 0; a < details.length; a++) {
271
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
272
+                obj['name'] = details[a].advice.advice_name
273
+                obj['spec'] =   details[a].advice.drug.dose +   details[a].advice.drug.dose_unit+"*" +  details[a].advice.drug.min_number +   details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
274
+                obj['unit'] = details[a].advice.drug.min_unit
275
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
276
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
277
+                obj['price'] = parseFloat(details[a].pric)
278
+                obj['is_total'] = 2
279
+                obj['record_date'] = details[a].advice.record_date
280
+                obj['chrgitm_lv'] = details[a].chrgitm_lv
281
+                count = count + details[a].cnt
282
+              }
283
+            }
284
+            obj['count'] = count
285
+            list.push(obj)
286
+
287
+          }
288
+        }
289
+        if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
290
+          for (let i = 0; i < new_project_ids.length; i++) {
291
+            let obj = {}
292
+            let count = 0
293
+            for (let a = 0; a < details.length; a++) {
294
+              if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
295
+               if( details[a].project.type == 2){
296
+                 obj['name'] = details[a].project.project.project_name
297
+                 obj['spec'] = ''
298
+                 obj['unit'] = details[a].project.project.unit
299
+                
300
+
301
+               }else if(details[a].project.type == 3){
302
+                 obj['name'] = details[a].project.good_info.good_name
303
+                 obj['spec'] = ''
304
+                 obj['unit'] = details[a].project.good_info.packing_unit
305
+               
306
+
307
+               }
308
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
309
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
310
+                obj['price'] = parseFloat(details[a].pric)
311
+                obj['is_total'] = 2
312
+                obj['chrgitm_lv'] = details[a].chrgitm_lv
313
+
314
+                count = count + details[a].cnt
315
+              }
316
+            }
317
+            obj['count'] = count
318
+            list.push(obj)
319
+          
320
+          }
321
+        }
322
+
323
+         if (new_drug_ids.length > 0 && new_project_ids.length > 0) {
324
+           for (let i = 0; i < new_drug_ids.length; i++) {
325
+            let obj = {}
326
+            let count = 0
327
+            for (let a = 0; a < details.length; a++) {
328
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
329
+                obj['name'] = details[a].advice.advice_name
330
+                obj['spec'] =   details[a].advice.drug.dose +   details[a].advice.drug.dose_unit+"*" +  details[a].advice.drug.min_number +   details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
331
+                obj['unit'] = details[a].advice.drug.min_unit
332
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
333
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
334
+                obj['price'] = parseFloat(details[a].pric)
335
+                obj['is_total'] = 2
336
+                obj['record_date'] = details[a].advice.record_date
337
+                obj['chrgitm_lv'] = details[a].chrgitm_lv
338
+                count = count + details[a].cnt
339
+              }
340
+            }
341
+            obj['count'] = count
342
+            list.push(obj)
343
+
344
+          }
345
+         
346
+          for (let i = 0; i < new_project_ids.length; i++) {
347
+            let obj = {}
348
+            let count = 0
349
+            for (let a = 0; a < details.length; a++) {
350
+             if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
351
+              if( details[a].project.type == 2){
352
+                 obj['name'] = details[a].project.project.project_name
353
+                 obj['spec'] = ''
354
+                 obj['unit'] = details[a].project.project.unit
355
+
356
+               }else if(details[a].project.type == 3){
357
+                 obj['name'] = details[a].project.good_info.good_name
358
+                 obj['spec'] = ''
359
+                 obj['unit'] = details[a].project.good_info.packing_unit
360
+               }
361
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
362
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
363
+                obj['price'] = parseFloat(details[a].pric)
364
+                obj['is_total'] = 2
365
+                obj['record_date'] = details[a].project.record_date
366
+                 obj['chrgitm_lv'] = details[a].chrgitm_lv
367
+                count = count + details[a].cnt
368
+              }
369
+            }
370
+            obj['count'] = count
371
+            list.push(obj)
372
+          
373
+          }
374
+         }
375
+         console.log("list232332322323332233223232323",list)
376
+        return list
377
+      }, 
378
+    
379
+      getMedicineInsuranceType(type) {
380
+        switch (type) {
381
+          case "01":
382
+            return '甲类'
383
+            break
384
+          case "02":
385
+            return '乙类'
386
+
387
+            break
388
+          case "03":
389
+            return '自费'
390
+            break
391
+
392
+        }
393
+
394
+      },
395
+       getType(med_chrgitm_type){
396
+        switch (med_chrgitm_type) {
397
+          case '01':
398
+            return '床位费'
399
+            break
400
+          case '02':
401
+            return '诊察费'
402
+
403
+            break
404
+          case '03':
405
+            return '检查费'
406
+
407
+            break
408
+          case '04':
409
+            return '化验费'
410
+            break
411
+          case '05':
412
+            return '治疗费'
413
+
414
+            break
415
+          case '06':
416
+            return '手术费'
417
+
418
+            break
419
+          case '07':
420
+            return '护理费'
421
+
422
+            break
423
+          case '08':
424
+            return '材料费'
425
+
426
+            break
427
+          case '09':
428
+            return '西药费'
429
+
430
+            break
431
+          case '10':
432
+            return '中药饮片费'
433
+
434
+            break
435
+          case '11':
436
+            return '中成药费'
437
+
438
+            break
439
+          case '12':
440
+            return '一般诊疗费'
441
+
442
+            break
443
+          case '13':
444
+            return '挂号费'
445
+
446
+            break
447
+          case '14':
448
+            return '其他费'
449
+
450
+            break
451
+
452
+        }
453
+      },
454
+      unique(array) {
455
+        // res用来存储结果
456
+        var res = []
457
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
458
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
459
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
460
+              break
461
+            }
462
+          }
463
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
464
+          if (j === resLen) {
465
+            res.push(array[i])
466
+          }
467
+        }
468
+        return res
469
+      },
470
+      getTotal:function(items){
471
+        let total = 0
472
+        for(let i = 0; i < items.length; i++){
473
+          total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
474
+        }
475
+        return total.toFixed(2)
476
+      },
477
+      getTimes(time) {
478
+       if(time < 0){
479
+         return ""
480
+       }else{
481
+        return uParseTime(time, '{y}-{m}-{d}')
482
+       }
483
+     },
484
+    },
485
+    watch:{
486
+        list: {
487
+            handler(newVal) {
488
+                this.getPage()
489
+            },
490
+            deep: true
491
+        }
492
+    },
493
+    created(){
494
+      this.getGatherDetailList()   
495
+    }
496
+
497
+  }
498
+
499
+
500
+</script>
501
+
502
+<style lang="scss" scoped>
503
+.list-print{
504
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
505
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
506
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
507
+    margin-bottom: 20px;
508
+    padding:20px 10px;
509
+}
510
+.listTitle{
511
+    font-size: 24px;
512
+    text-align: center;
513
+    font-weight: bold;
514
+    margin-bottom: 10px;
515
+}
516
+.listInfo{
517
+    display: flex;
518
+    font-size: 16px;
519
+    justify-content: space-between;
520
+    margin: 10px 0;
521
+}
522
+.listTable{
523
+    width: 100%;
524
+    text-align: center;
525
+    border-collapse: collapse;
526
+    line-height: 40px;
527
+    font-size: 14px;
528
+    border-color: #000;
529
+    text-align: left;
530
+}
531
+.listTable tr td {
532
+    padding: 0 5px;
533
+}
534
+.tableBottom{
535
+    font-size: 16px;
536
+    display: flex;
537
+    margin-top: 20px;
538
+}
539
+.tableBottomOne{
540
+    margin-right: 40px;
541
+}
542
+</style>

+ 2 - 1
src/xt_pages/outpatientTool/statistics.vue View File

75
       })
75
       })
76
     },
76
     },
77
     handleCurrentChange(row){
77
     handleCurrentChange(row){
78
+      this.patient_id = 0
78
       this.patient_id =  row.id
79
       this.patient_id =  row.id
79
       this.$refs.child.getHisSummaryDetailList()
80
       this.$refs.child.getHisSummaryDetailList()
80
-     
81
+      this.$refs.childOne.getGatherDetailList()
81
     },
82
     },
82
 
83
 
83
   },
84
   },