浏览代码

结算单

test_user 2 年前
父节点
当前提交
ed58755f1c

+ 28 - 13
src/xt_pages/outpatientCharges/components/chargeDialog.vue 查看文件

@@ -58,7 +58,7 @@
58 58
       </el-form-item>
59 59
 
60 60
 
61
-      <el-form-item label="个账使用标识:" prop="acct_used_flag" v-if="this.$store.getters.xt_user.org_id == 10387">
61
+      <el-form-item label="个账使用标识:" prop="acct_used_flag" >
62 62
         <el-select style="margin-right:5px;width:100px;"
63 63
                    v-model="form.acct_used_flag"  placeholder="">
64 64
           <el-option
@@ -71,20 +71,31 @@
71 71
       </el-form-item>
72 72
 
73 73
 
74
-      <el-form-item label="" style="width:100%;">
74
+      <el-form-item label="" style="width:100%;" v-if="this.$store.getters.xt_user.org.id != 10138 && this.$store.getters.xt_user.org.id != 10278 && this.$store.getters.xt_user.org.id != 0 ">
75 75
 
76 76
         <el-radio-group v-model="form.pay_way">
77 77
           <el-radio :label="item.value" v-for="(item,index) in payWays" :key="index">{{ item.label }}</el-radio>
78 78
         </el-radio-group>
79 79
       </el-form-item>
80 80
 
81
+      <el-form-item label="" style="width:100%;" v-if="this.$store.getters.xt_user.org.id == 10138 || this.$store.getters.xt_user.org.id == 10278 || this.$store.getters.xt_user.org.id == 0">
82
+
83
+        <el-checkbox-group v-model="form.pay_ways">
84
+          <el-checkbox :label="item.value" v-for="(item,index) in payWays" :key="item.value">{{ item.label }}</el-checkbox>
85
+        </el-checkbox-group>
86
+      </el-form-item>
87
+
88
+
89
+      <el-form-item label="其他说明:">
90
+        <el-input class="number_style" v-model="form.oth_desc" ></el-input>
91
+      </el-form-item>
81 92
 
82 93
       <el-form-item label="付款金额:" prop="id_card" :validate-event="is_Name">
83 94
         <el-input class="number_style" type="number" v-model="form.pay_price" :disabled="true"></el-input>
84 95
       </el-form-item>
85 96
 
86 97
 
87
-      <el-form-item label="付款卡号:" prop="id_card" :validate-event="is_Name">
98
+      <el-form-item label="付款详情:" prop="id_card" :validate-event="is_Name">
88 99
         <el-input v-model="form.pay_card_no"></el-input>
89 100
       </el-form-item>
90 101
 
@@ -145,6 +156,7 @@
145 156
     data() {
146 157
 
147 158
       return {
159
+        IsShow:false,
148 160
         tmp_pay:"",//临时付款金额
149 161
         isshow:false,
150 162
         id:0,
@@ -158,10 +170,12 @@
158 170
         form: {
159 171
           medical_insurance_price:0,
160 172
           private_price:'',//自费12
161
-          pay_way:'',
173
+          pay_way:"",
174
+          pay_ways:[],
162 175
           dec_way:'false',//是否使用押金支付
163 176
           tmp_decimal:"",//本次使用的押金
164 177
           pay_price:'',
178
+          oth_desc:"",
165 179
           pay_card_no:'',
166 180
           discount_price:'',
167 181
           preferential_price:'',
@@ -176,15 +190,17 @@
176 190
           overlmt_self_pay:'',
177 191
           acct_mulaid_pay:'',
178 192
           fulamt_ownpay_amt:'',
179
-          acct_used_flag:'',
193
+          acct_used_flag:0,
180 194
         },
181 195
         payWays: [
182
-          {value: 1, label: '现金'},
183
-          {value: 2, label: '银行卡'},
184
-          {value: 3, label: '微信'},
185
-          {value: 5, label: '支付宝'},
186
-          {value: 7, label: '积分'},
187
-          {value: 4, label: '医保卡'},
196
+          {value: "1", label: '现金'},
197
+          {value: "2", label: '银行卡'},
198
+          {value: "3", label: '微信'},
199
+          {value: "5", label: '支付宝'},
200
+          {value: "7", label: '积分'},
201
+          {value: "4", label: '医保卡'},
202
+          {value: "8", label: '其他'},
203
+
188 204
 
189 205
         ],
190 206
         total:"",
@@ -408,8 +424,7 @@
408 424
         (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
409 425
         '-' +
410 426
         (nowDay < 10 ? '0' + nowDay : nowDay)+" "+(nowHours < 10 ? '0' + nowHours : nowHours)+":"+(nowMin < 10 ? '0' + nowMin : nowMin)
411
-    }
412
-
427
+    },
413 428
   }
414 429
 </script>
415 430
 

+ 230 - 2
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

@@ -83,7 +83,7 @@
83 83
 
84 84
         <div class="mainCell fixedCell" style="margin-bottom:10px;">
85 85
 
86
-          <div v-if="org_id == 10340 || org_id == 0">
86
+          <div v-if="org_id == 10340">
87 87
                         <el-button  size="small"
88 88
                                    @click="openZb(4)"
89 89
                                    v-if=" this.order.id == 0"
@@ -91,7 +91,7 @@
91 91
                         </el-button>
92 92
           </div>
93 93
 
94
-          <div  v-if="org_id != 10340 && org_id != 0">
94
+          <div  v-if="org_id != 10340">
95 95
 <!--            <el-button size="small"-->
96 96
 <!--                       @click="openZb(1)"-->
97 97
 <!--                       type="primary">登记-->
@@ -122,6 +122,35 @@
122 122
                        @click="open(20)"
123 123
                        type="primary">查询备案信息
124 124
             </el-button>
125
+
126
+
127
+
128
+            <el-button  size="small"  v-if="org_id == 10138 || org_id == 10278"
129
+                       @click="openZF(1)"
130
+                       type="primary">自费门诊就医上传(4205)
131
+            </el-button>
132
+
133
+            <el-button  size="small" v-if="org_id == 10138  || org_id == 10278"
134
+                        @click="openZF(2)"
135
+                        type="primary">自费就诊明细上传成功(4203)
136
+            </el-button>
137
+
138
+            <el-button  size="small" v-if="org_id == 10138  || org_id == 10278"
139
+                        @click="openZF(3)"
140
+                        type="primary">自费就医明细费用查询(4207)
141
+            </el-button>
142
+
143
+            <el-button  size="small" v-if="org_id == 10138  || org_id == 10278"
144
+                        @click="openZF(4)"
145
+                        type="primary">自费就医就诊信息查询(4208)
146
+            </el-button>
147
+            <el-button  size="small" v-if="org_id == 10138  || org_id == 10278"
148
+                        @click="openZF(4)"
149
+                        type="primary">自费就医诊断查询(4209)
150
+            </el-button>
151
+
152
+
153
+
125 154
             <el-button size="small" @click="open(5)" type="primary"
126 155
                        v-if="this.radio == 2  && this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2">
127 156
               退费
@@ -333,6 +362,18 @@
333 362
                             value-format="yyyy-MM-dd HH:mm:ss">
334 363
                         </el-date-picker>
335 364
                       </el-form-item>
365
+
366
+                      <el-form-item label="个账使用标识:" prop="acct_used_flag">
367
+                        <el-select style="margin-right:5px;width:100px;"
368
+                                   v-model="form.acct_used_flag"  placeholder="">
369
+                          <el-option
370
+                            v-for="(item,index) in acct_used_flags"
371
+                            :key="index"
372
+                            :label="item.name"
373
+                            :value="item.id">
374
+                          </el-option>
375
+                        </el-select>
376
+                      </el-form-item>
336 377
                     </el-form>
337 378
                   </div>
338 379
                   <p class="centerRightTitle">人员信息</p>
@@ -540,6 +581,18 @@
540 581
                         </el-date-picker>
541 582
                       </el-form-item>
542 583
 
584
+                      <el-form-item label="个账使用标识:" prop="acct_used_flag">
585
+                        <el-select style="margin-right:5px;width:100px;"
586
+                                   v-model="form.acct_used_flag"  placeholder="">
587
+                          <el-option
588
+                            v-for="(item,index) in acct_used_flags"
589
+                            :key="index"
590
+                            :label="item.name"
591
+                            :value="item.id">
592
+                          </el-option>
593
+                        </el-select>
594
+                      </el-form-item>
595
+
543 596
                     </el-form>
544 597
 
545 598
                   </div>
@@ -1453,6 +1506,7 @@ export default {
1453 1506
     },
1454 1507
     chargeConfirm(form) {
1455 1508
       this.newLoading = true
1509
+      form.pay_ways = form.pay_ways.join(",")
1456 1510
       form['id'] = this.patientInfo.id
1457 1511
       form['his_patient_id'] = this.hisPatientInfo.id
1458 1512
       form['record_time'] = this.record_date
@@ -2975,6 +3029,180 @@ export default {
2975 3029
           break
2976 3030
 
2977 3031
       }
3032
+    },openZF(index){
3033
+      var  that = this
3034
+      let params = {
3035
+        'order_id': this.order.id,
3036
+        'admin_user_id': this.$store.getters.xt_user.user.id,
3037
+
3038
+      }
3039
+      switch (index){
3040
+        case 1:
3041
+          axios.get('http://127.0.0.1:9532/api/4205', {
3042
+            params: params
3043
+          }).then(function(response) {
3044
+            if (response.data.state == 0) {
3045
+              that.$message.error(response.data.msg)
3046
+
3047
+              return false
3048
+            } else {
3049
+              if (response.data.data.failed_code == -10) {
3050
+                that.$confirm(response.data.data.msg, '医保错误信息', {
3051
+                  confirmButtonText: '确 定',
3052
+                  type: 'warning'
3053
+                }).then(() => {
3054
+
3055
+                }).catch(() => {
3056
+                })
3057
+
3058
+              } else {
3059
+                that.$message({ message: '上传成功', type: 'success', duration: 5000 })
3060
+
3061
+              }
3062
+
3063
+            }
3064
+          })
3065
+            .catch(function(error) {
3066
+
3067
+            })
3068
+          break
3069
+        case 2:
3070
+
3071
+          axios.get('http://127.0.0.1:9532/api/4203', {
3072
+            params: params
3073
+          }).then(function(response) {
3074
+            if (response.data.state == 0) {
3075
+              that.$message.error(response.data.msg)
3076
+              that.loadingtwo = false
3077
+              return false
3078
+            } else {
3079
+              if (response.data.data.failed_code == -10) {
3080
+                that.$confirm(response.data.data.msg, '医保错误信息', {
3081
+                  confirmButtonText: '确 定',
3082
+                  type: 'warning'
3083
+                }).then(() => {
3084
+
3085
+                }).catch(() => {
3086
+                })
3087
+
3088
+              } else {
3089
+                that.$message({ message: '确认成功', type: 'success', duration: 5000 })
3090
+
3091
+              }
3092
+
3093
+            }
3094
+          })
3095
+            .catch(function(error) {
3096
+
3097
+            })
3098
+          break
3099
+        case 3:
3100
+
3101
+          axios.get('http://127.0.0.1:9532/api/4207', {
3102
+            params: params
3103
+          }).then(function(response) {
3104
+            if (response.data.state == 0) {
3105
+              that.$message.error(response.data.msg)
3106
+              that.loadingtwo = false
3107
+              return false
3108
+            } else {
3109
+              if (response.data.data.failed_code == -10) {
3110
+                that.$confirm(response.data.data.msg, '医保错误信息', {
3111
+                  confirmButtonText: '确 定',
3112
+                  type: 'warning'
3113
+                }).then(() => {
3114
+
3115
+                }).catch(() => {
3116
+                })
3117
+
3118
+              } else {
3119
+                that.$confirm("具体内容请查看本地日志文件", '查询成功', {
3120
+                  confirmButtonText: '确 定',
3121
+                  type: 'warning'
3122
+                }).then(() => {
3123
+
3124
+                }).catch(() => {
3125
+                })
3126
+              }
3127
+
3128
+            }
3129
+          })
3130
+            .catch(function(error) {
3131
+
3132
+            })
3133
+          break
3134
+        case 4:
3135
+
3136
+          axios.get('http://127.0.0.1:9532/api/4208', {
3137
+            params: params
3138
+          }).then(function(response) {
3139
+            if (response.data.state == 0) {
3140
+              that.$message.error(response.data.msg)
3141
+              that.loadingtwo = false
3142
+              return false
3143
+            } else {
3144
+              if (response.data.data.failed_code == -10) {
3145
+                that.$confirm(response.data.data.msg, '医保错误信息', {
3146
+                  confirmButtonText: '确 定',
3147
+                  type: 'warning'
3148
+                }).then(() => {
3149
+
3150
+                }).catch(() => {
3151
+                })
3152
+
3153
+              } else {
3154
+
3155
+                that.$confirm("具体内容请查看本地日志文件", '查询成功', {
3156
+                  confirmButtonText: '确 定',
3157
+                  type: 'warning'
3158
+                }).then(() => {
3159
+
3160
+                }).catch(() => {
3161
+                })
3162
+
3163
+              }
3164
+
3165
+            }
3166
+          })
3167
+            .catch(function(error) {
3168
+
3169
+            })
3170
+          break
3171
+        case 5:
3172
+          axios.get('http://127.0.0.1:9532/api/4209', {
3173
+            params: params
3174
+          }).then(function(response) {
3175
+            if (response.data.state == 0) {
3176
+              that.$message.error(response.data.msg)
3177
+              that.loadingtwo = false
3178
+              return false
3179
+            } else {
3180
+              if (response.data.data.failed_code == -10) {
3181
+                that.$confirm(response.data.data.msg, '医保错误信息', {
3182
+                  confirmButtonText: '确 定',
3183
+                  type: 'warning'
3184
+                }).then(() => {
3185
+
3186
+                }).catch(() => {
3187
+                })
3188
+
3189
+              } else {
3190
+                that.$confirm("具体内容请查看本地日志文件", '查询成功', {
3191
+                  confirmButtonText: '确 定',
3192
+                  type: 'warning'
3193
+                }).then(() => {
3194
+
3195
+                }).catch(() => {
3196
+                })
3197
+              }
3198
+
3199
+            }
3200
+          })
3201
+            .catch(function(error) {
3202
+
3203
+            })
3204
+          break
3205
+      }
2978 3206
     },
2979 3207
     open(index, med_type, order, prescriptions) {
2980 3208
 

+ 447 - 2
src/xt_pages/outpatientCharges/summary.vue 查看文件

@@ -109,7 +109,7 @@
109 109
           </el-button
110 110
           >
111 111
           <el-button v-if="$store.getters.xt_user.org_id == 10106 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
112
-          <el-button v-if="$store.getters.xt_user.org_id == 10318 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten_two">报表下载3</el-button>
112
+          <el-button v-if="$store.getters.xt_user.org_id == 10318 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten_four">报表下载3</el-button>
113 113
 <!--          <el-button  size="small" type="primary" @click="export_detail_ten_three">报表下载4</el-button>-->
114 114
 
115 115
 
@@ -398,7 +398,7 @@ import invoicePrint from "./invoicePrint";
398 398
 import settlementPrint from "./settlementPrint";
399 399
 import {jsGetAge, uParseTime} from "@/utils/tools";
400 400
 
401
-import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo,getAllOrders,exportOrderInfo} from "../../api/his/his";
401
+import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo,getAllOrders,exportOrderInfo,handleOne} from "../../api/his/his";
402 402
 
403 403
 import {handleData10106,handleData10318,handleData10138Two} from "../../api/his/his_export";
404 404
 import StatementListPrint from "./statementListPrint";
@@ -1540,7 +1540,452 @@ export default {
1540 1540
         }
1541 1541
       });
1542 1542
 
1543
+    },    export_detail_ten_four() {
1544
+      let params = {
1545
+        start_time:"2022-01-01",
1546
+        end_time:"2022-04-30",
1547
+      };
1548
+      handleOne(params).then((response) => {
1549
+        if (response.data.state == 0) {
1550
+          this.$message.error(response.data.msg);
1551
+          return false;
1552
+        } else {
1553
+          let new_orders = []
1554
+
1555
+          let new_orders_3663 = []
1556
+          let new_orders_4059 = []
1557
+          let new_orders_4039 = []
1558
+
1559
+          for (let i = 0; i < response.data.data.order.length; i++) {
1560
+            let order = response.data.data.order[i];
1561
+            for(let b= 0; b< order.info.length; b++){
1562
+              order.info[b]['new_order'] = order
1563
+              order.info[b]['new_date'] = this.getTime(order.info[b].pre_time,"{y}-{m}")
1564
+              new_orders.push(order.info[b])
1565
+            }
1566
+          }
1567
+
1568
+          let new_list_four = []
1569
+          for (let i = 0; i < new_orders.length; i++) {
1570
+            let order = new_orders[i];
1571
+              new_list_four.push(order.p_info)
1572
+          }
1573
+
1574
+          const obj111 = {}
1575
+          new_list_four = new_list_four.reduce((cur, next) => {
1576
+            obj111[next.id] ? '' : obj111[next.id] = true && cur.push(next)
1577
+            return cur
1578
+          }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1579
+
1580
+
1581
+          let new_list_six = []
1582
+          for (let i = 0; i < new_list_four.length; i++) {
1583
+            let order = new_list_four[i];
1584
+            let obj = {
1585
+              p_id:order.id,
1586
+              patient_id:order.patient_id,
1587
+              cur_date:this.getTime(order.record_date,"{y}-{m}"),
1588
+              list:[],
1589
+            }
1590
+            for(let b = 0; b < new_orders.length; b++){
1591
+                if(order.id == new_orders[b].p_info.id){
1592
+                  obj.list.push(new_orders[b])
1593
+                }
1594
+            }
1595
+            new_list_six.push(obj)
1596
+          }
1597
+
1598
+
1599
+          console.log(new_list_six)
1600
+
1601
+
1602
+          for (let i = 0; i < new_list_six.length; i++) {
1603
+            let order = new_list_six[i];
1604
+            let islvguo = false
1605
+            for (let b = 0; b < order.list.length; b++) {
1606
+              for(let c = 0 ; c < order.list[b].project.length; c++){
1607
+                if (order.list[b].project[c].project.id == 78 && order.list[b].project[c].project.id != 79 && order.list[b].project[c].project.id!= 1074) {
1608
+                  islvguo = true
1609
+                }
1610
+              }
1611
+            }
1612
+            if(islvguo){
1613
+              new_orders_3663.push(order)
1614
+            }
1615
+          }
1616
+          console.log(new_orders_3663)
1617
+
1618
+
1619
+          for (let i = 0; i < new_list_six.length; i++) {
1620
+            let order = new_list_six[i];
1621
+            let islvguo = false
1622
+            for (let b = 0; b < order.list.length; b++) {
1623
+              for(let c = 0 ; c < order.list[b].project.length; c++){
1624
+                if (order.list[b].project[c].project.id == 1074 && order.list[b].project[c].project.id != 78 && order.list[b].project[c].project.id!= 79) {
1625
+                  islvguo = true
1626
+                }
1627
+              }
1628
+            }
1629
+            if(islvguo){
1630
+              new_orders_4059.push(order)
1631
+            }
1632
+          }
1633
+
1634
+          console.log(new_orders_4059)
1635
+
1636
+
1637
+          for (let i = 0; i < new_list_six.length; i++) {
1638
+            let order = new_list_six[i];
1639
+            let islvguo = false
1640
+            for (let b = 0; b < order.list.length; b++) {
1641
+              for(let c = 0 ; c < order.list[b].project.length; c++){
1642
+                if (order.list[b].project[c].project.id == 79 && order.list[b].project[c].project.id != 78 && order.list[b].project[c].project.id!= 1074) {
1643
+                  islvguo = true
1644
+                }
1645
+              }
1646
+            }
1647
+            if(islvguo){
1648
+              new_orders_4039.push(order)
1649
+            }
1650
+          }
1651
+
1652
+          console.log(new_orders_4039)
1653
+
1654
+
1655
+
1656
+
1657
+          var  months_3663 = []
1658
+          for(let i = 0; i < new_orders_3663.length;i++){
1659
+            months_3663.push(new_orders_3663[i].cur_date)
1660
+          }
1661
+          const obj = {}
1662
+          months_3663 = months_3663.reduce((cur, next) => {
1663
+            obj[next] ? '' : obj[next] = true && cur.push(next)
1664
+            return cur
1665
+          }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1666
+
1667
+
1668
+          var  months_4039 = []
1669
+          for(let i = 0; i < new_orders_4039.length;i++){
1670
+            months_4039.push(new_orders_4039[i].cur_date)
1671
+          }
1672
+          const obj2 = {}
1673
+          months_4039 = months_4039.reduce((cur, next) => {
1674
+            obj2[next] ? '' : obj2[next] = true && cur.push(next)
1675
+            return cur
1676
+          }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1677
+
1678
+
1679
+          var  months_4059 = []
1680
+
1681
+          for(let i = 0; i < new_orders_4059.length;i++){
1682
+
1683
+            months_4059.push(new_orders_4059[i].cur_date)
1684
+
1685
+          }
1686
+          const obj3 = {}
1687
+          months_4059 = months_4059.reduce((cur, next) => {
1688
+            obj3[next] ? '' : obj3[next] = true && cur.push(next)
1689
+            return cur
1690
+          }, [])
1691
+          // 设置cur默认类型为数组,并且初始值为空的数组
1692
+          let new_list = []
1693
+          for(let i = 0; i < months_3663.length;i++) {
1694
+            let obj = {
1695
+              cus_date:months_3663[i],
1696
+              info:[]
1697
+            }
1698
+            for (let b = 0; b < new_orders_3663.length; b++) {
1699
+                if(months_3663[i] == new_orders_3663[b].cur_date){
1700
+                  obj.info.push(new_orders_3663[b])
1701
+                }
1702
+            }
1703
+            new_list.push(obj)
1704
+          }
1705
+
1706
+          let new_list_two = []
1707
+          for(let i = 0; i < months_4039.length;i++) {
1708
+            let obj = {
1709
+              cus_date:months_4039[i],
1710
+              info:[]
1711
+            }
1712
+            for (let b = 0; b < new_orders_4039.length; b++) {
1713
+              if(months_4039[i] == new_orders_4039[b].cur_date){
1714
+                obj.info.push(new_orders_4039[b])
1715
+              }
1716
+            }
1717
+            new_list_two.push(obj)
1718
+          }
1719
+
1720
+
1721
+
1722
+          let new_list_three = []
1723
+          for(let i = 0; i < months_4059.length;i++) {
1724
+            let obj = {
1725
+              cus_date:months_4059[i],
1726
+              info:[]
1727
+            }
1728
+            for (let b = 0; b < new_orders_4059.length; b++) {
1729
+              if(months_4059[i] == new_orders_4059[b].cur_date){
1730
+                obj.info.push(new_orders_4059[b])
1731
+              }
1732
+            }
1733
+            new_list_three.push(obj)
1734
+          }
1735
+
1736
+
1737
+          console.log(new_list)
1738
+          console.log(new_list_two)
1739
+          console.log(new_list_three)
1740
+
1741
+
1742
+          var list_one = []
1743
+          var list_two = []
1744
+          var list_three = []
1745
+
1746
+          for(let b = 0; b < new_list.length; b++){
1747
+            let obj = {
1748
+              cur_date:new_list[b].cus_date,
1749
+              order_info:[],
1750
+              info_length:new_list[b].info.length
1751
+
1752
+            }
1753
+            for(let c = 0; c < new_list[b].info.length; c++) {
1754
+              for(let d = 0; d < new_list[b].info[c].list.length; d++) {
1755
+                if(new_list[b].info[c].list[d].advices.length > 0 && new_list[b].info[c].list[d].project.length == 0 ){
1756
+                  for(let e = 0; e < new_list[b].info[c].list[d].advices.length; e++) {
1757
+                    obj.order_info.push(new_list[b].info[c].list[d].advices[e].order_info)
1758
+                  }
1759
+
1760
+                  }
1761
+                if(new_list[b].info[c].list[d].advices.length == 0 && new_list[b].info[c].list[d].project.length > 0 ){
1762
+                  for(let e = 0; e < new_list[b].info[c].list[d].project.length; e++) {
1763
+                    obj.order_info.push(new_list[b].info[c].list[d].project[e].order_info)
1764
+
1765
+                  }
1766
+                }
1767
+              }
1768
+            }
1769
+            list_one.push(obj)
1770
+
1771
+          }
1772
+
1773
+          for(let b = 0; b < new_list_two.length; b++){
1774
+            let obj = {
1775
+              cur_date:new_list_two[b].cus_date,
1776
+              order_info:[],
1777
+              info_length:new_list_two[b].info.length
1778
+
1779
+            }
1780
+            for(let c = 0; c < new_list_two[b].info.length; c++) {
1781
+              for(let d = 0; d < new_list_two[b].info[c].list.length; d++) {
1782
+                if(new_list_two[b].info[c].list[d].advices.length > 0 && new_list_two[b].info[c].list[d].project.length == 0 ){
1783
+                  for(let e = 0; e < new_list_two[b].info[c].list[d].advices.length; e++) {
1784
+                    obj.order_info.push(new_list_two[b].info[c].list[d].advices[e].order_info)
1785
+                  }
1786
+
1787
+                }
1788
+                if(new_list_two[b].info[c].list[d].advices.length == 0 && new_list_two[b].info[c].list[d].project.length > 0 ){
1789
+                  for(let e = 0; e < new_list_two[b].info[c].list[d].project.length; e++) {
1790
+                    obj.order_info.push(new_list_two[b].info[c].list[d].project[e].order_info)
1791
+                  }
1792
+                }
1793
+              }
1794
+            }
1795
+            list_two.push(obj)
1796
+
1797
+
1798
+          }
1799
+
1800
+          for(let b = 0; b < new_list_three.length; b++){
1801
+            let obj = {
1802
+              cur_date:new_list_three[b].cus_date,
1803
+              order_info:[],
1804
+              info_length:new_list_three[b].info.length
1805
+            }
1806
+            for(let c = 0; c < new_list_three[b].info.length; c++) {
1807
+              for(let d = 0; d < new_list_three[b].info[c].list.length; d++) {
1808
+                if(new_list_three[b].info[c].list[d].advices.length > 0 && new_list_three[b].info[c].list[d].project.length == 0 ){
1809
+                  for(let e = 0; e < new_list_three[b].info[c].list[d].advices.length; e++) {
1810
+                    obj.order_info.push(new_list_three[b].info[c].list[d].advices[e].order_info)
1811
+                  }
1812
+
1813
+                }
1814
+                if(new_list_three[b].info[c].list[d].advices.length == 0 && new_list_three[b].info[c].list[d].project.length > 0 ){
1815
+                  for(let e = 0; e < new_list_three[b].info[c].list[d].project.length; e++) {
1816
+                    obj.order_info.push(new_list_three[b].info[c].list[d].project[e].order_info)
1817
+                  }
1818
+                }
1819
+              }
1820
+            }
1821
+            list_three.push(obj)
1822
+
1823
+          }
1824
+
1825
+
1826
+
1827
+          console.log(list_one)
1828
+          console.log(list_two)
1829
+          console.log(list_three)
1830
+
1831
+
1832
+          // list_one = []
1833
+          // list_one = list_two
1834
+
1835
+          // list_one = []
1836
+          // list_one = list_three
1837
+
1838
+          var tarList = []
1839
+          for (let i = 0; i < list_one.length; i++) {
1840
+              let obj = {
1841
+                "年月": list_one[i].cur_date,
1842
+                "总人数":  this.getTotalOneOne(list_one[i].order_info),
1843
+                "总人次":  list_one[i].info_length,
1844
+                "总费用":  this.getTotalOne(list_one[i].order_info),
1845
+                "总治疗费":  this.getTotalTwo(list_one[i].order_info),
1846
+                "总材料费": this.getTotalThree(list_one[i].order_info),
1847
+                "总检查检验费":  this.getTotalFour(list_one[i].order_info),
1848
+                "总药品费":  this.getTotalFive(list_one[i].order_info),
1849
+                "人均费用": this.getTotalOne(list_one[i].order_info) / this.getTotalOneOne(list_one[i].order_info),
1850
+                "次均费用":  this.getTotalOne(list_one[i].order_info) / list_one[i].info_length,
1851
+                "次均治疗费": this.getTotalTwo(list_one[i].order_info) / list_one[i].info_length,
1852
+                "次均材料费": this.getTotalThree(list_one[i].order_info) / list_one[i].info_length,
1853
+                "次均检查检验费": this.getTotalFour(list_one[i].order_info) / list_one[i].info_length,
1854
+                "次均药品费":this.getTotalFive(list_one[i].order_info) / list_one[i].info_length,
1855
+              }
1856
+              tarList.push(obj)
1857
+            }
1858
+          }
1859
+
1860
+          import("@/vendor/Export2Excel").then((excel) => {
1861
+            const tHeader = [
1862
+              "年月",
1863
+              "总人数",
1864
+              "总人次",
1865
+              "总费用",
1866
+              "总治疗费",
1867
+              "总材料费",
1868
+              "总检查检验费",
1869
+              "总药品费",
1870
+              "人均费用",
1871
+              "次均费用",
1872
+              "次均治疗费",
1873
+              "次均材料费",
1874
+              "次均检查检验费",
1875
+              "次均药品费",
1876
+            ];
1877
+            const filterVal = [
1878
+              "年月",
1879
+              "总人数",
1880
+              "总人次",
1881
+              "总费用",
1882
+              "总治疗费",
1883
+              "总材料费",
1884
+              "总检查检验费",
1885
+              "总药品费",
1886
+              "人均费用",
1887
+              "次均费用",
1888
+              "次均治疗费",
1889
+              "次均材料费",
1890
+              "次均检查检验费",
1891
+              "次均药品费",
1892
+            ];
1893
+            const data = this.formatJson(filterVal, tarList);
1894
+            excel.export_json_to_excel({
1895
+              header: tHeader,
1896
+              data,
1897
+              filename: "消费明细",
1898
+            });
1899
+          });
1900
+
1901
+
1902
+
1903
+
1904
+
1905
+
1906
+      });
1907
+
1908
+    },getTotalOneOne(order_info){
1909
+        var patient_ids = []
1910
+        for(var i = 0; i < order_info.length; i++){
1911
+          patient_ids.push(order_info[i].patient_id)
1912
+        }
1913
+      const obj2 = {}
1914
+      patient_ids = patient_ids.reduce((cur, next) => {
1915
+        obj2[next] ? '' : obj2[next] = true && cur.push(next)
1916
+        return cur
1917
+      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1918
+      return patient_ids.length
1919
+
1920
+    },getTotalOneTwo(order_info){
1921
+      let total = 0
1922
+      for(var i = 0;i < order_info.length; i++){
1923
+        total = total + order_info[i].det_item_fee_sumamt
1924
+      }
1925
+      return total.toFixed(2)
1926
+    },getTotalOne(order_info){
1927
+      let total = 0
1928
+      for(var i = 0;i < order_info.length; i++){
1929
+        total = total + order_info[i].det_item_fee_sumamt
1930
+      }
1931
+      return total.toFixed(2)
1932
+
1933
+    },getTotalTwo(order_info){
1934
+      let total = 0
1935
+      for(var i = 0;i < order_info.length; i++){
1936
+        if(order_info[i].med_chrgitm_type == "05") {
1937
+          total = total + order_info[i].det_item_fee_sumamt
1938
+        }
1939
+      }
1940
+      return total.toFixed(2)
1941
+
1942
+    },getTotalThree(order_info){
1943
+      let total = 0
1944
+      for(var i = 0;i < order_info.length; i++){
1945
+        if(order_info[i].med_chrgitm_type == "08") {
1946
+          total = total + order_info[i].det_item_fee_sumamt
1947
+        }
1948
+      }
1949
+      return total.toFixed(2)
1950
+
1951
+    },getTotalFour(order_info){
1952
+      let total = 0
1953
+      for(var i = 0;i < order_info.length; i++){
1954
+        if(order_info[i].med_chrgitm_type == "03" || order_info[i].med_chrgitm_type == "04") {
1955
+          total = total + order_info[i].det_item_fee_sumamt
1956
+        }
1957
+      }
1958
+      return total.toFixed(2)
1959
+
1960
+    },getTotalFive(order_info){
1961
+      let total = 0
1962
+      for(var i = 0;i < order_info.length; i++){
1963
+        if(order_info[i].med_chrgitm_type == "09" || order_info[i].med_chrgitm_type == "10" || order_info[i].med_chrgitm_type == "11" ) {
1964
+          total = total + order_info[i].det_item_fee_sumamt
1965
+        }
1966
+      }
1967
+      return total.toFixed(2)
1968
+
1969
+    },getTotalSix(order_info){
1970
+
1971
+
1972
+    },getTotalSeven(order_info){
1973
+
1974
+
1975
+    },getTotalEigth(order_info){
1976
+
1977
+
1978
+    },getTotalNine(order_info){
1979
+
1980
+
1981
+    },getTotalTen(order_info){
1982
+
1983
+
1984
+    },getTotalTenOne(order_info){
1985
+
1986
+
1543 1987
     },
1988
+
1544 1989
     export_detail_seven() {
1545 1990
       let params = {};
1546 1991
       handleData10106(params).then((response) => {