csx 2 年 前
コミット
c6416d67f8

+ 3 - 3
src/xt_pages/DepositManagement/DepositRefund.vue ファイルの表示

@@ -39,7 +39,7 @@
39 39
               />
40 40
             </div>
41 41
 
42
-            <div style="margin-right: 30px">
42
+            <div style="width: 287px;margin-right: 30px;white-space: nowrap;">
43 43
               退款类型:
44 44
               <el-select v-model="refundtype" placeholder="请选择" @change="updaterefundtype">
45 45
                 <el-option
@@ -52,7 +52,7 @@
52 52
               </el-select>
53 53
             </div>
54 54
 
55
-            <div style="margin-right: 30px">
55
+            <div style="width: 288px;margin-right: 30px;white-space: nowrap;">
56 56
               审核状态:
57 57
               <el-select v-model="examinetype" placeholder="请选择" @change="updateexaminetype">
58 58
                 <el-option
@@ -65,7 +65,7 @@
65 65
               </el-select>
66 66
             </div>
67 67
 
68
-            <div style="width: 465px">
68
+            <div style="width: 465px;white-space: nowrap;">
69 69
               <span>日期查询:</span>
70 70
               <el-date-picker
71 71
                 v-model="value1"

+ 1 - 0
src/xt_pages/DepositManagement/DepositSearch.vue ファイルの表示

@@ -47,6 +47,7 @@
47 47
           color: '#606266',
48 48
         }"
49 49
         :data="tableData"
50
+        
50 51
         border
51 52
       >
52 53
         <el-table-column type="index" label="序号" align="center" width="200">

+ 37 - 2
src/xt_pages/DepositManagement/Template/DeductionDetails.vue ファイルの表示

@@ -51,6 +51,9 @@
51 51
           color: '#606266',
52 52
         }"
53 53
         :data="tableData"
54
+        max-height="550"
55
+        show-summary
56
+        sum-text="押金支付金额合计"
54 57
         border
55 58
       >
56 59
         <el-table-column type="index" label="序号" align="center" width="100">
@@ -76,7 +79,7 @@
76 79
             <span>{{ scope.row.total	 ? scope.row.total	 : "" }}</span>
77 80
           </template>
78 81
         </el-table-column>
79
-        <el-table-column label="押金支付金额" align="center">
82
+        <el-table-column label="押金支付金额" align="center" prop="decimal">
80 83
           <template slot-scope="scope">
81 84
             <span>{{ scope.row.decimal	 ? scope.row.decimal	 : "" }}</span>
82 85
           </template>
@@ -99,7 +102,7 @@
99 102
         </el-table-column>
100 103
       </el-table>
101 104
 
102
-      <div>押金支付金额合计:<span>{{sum}}</span></div>
105
+      <!-- <div>押金支付金额合计:<span>{{sum}}</span></div> -->
103 106
     </div>
104 107
   </div>
105 108
 </template>
@@ -134,6 +137,38 @@ export default {
134 137
     this.search()
135 138
   },
136 139
   methods: {
140
+
141
+    // 合计表数据
142
+    getSummaries(param) {
143
+        let { columns, data } = param;
144
+        console.log(param,'oo')
145
+        let sums = [];
146
+        columns.forEach((column, index) => {
147
+          
148
+          if (index === 0) {
149
+            sums[index] = '总价';
150
+            return;
151
+          }
152
+          let values = data.map(item => Number(item[column.property]));
153
+          console.log(values,'values')
154
+          if (!values.every(value => isNaN(value))) {
155
+            sums[index] = values.reduce((prev, curr) => {
156
+              const value = Number(curr);
157
+              if (!isNaN(value)) {
158
+                return prev + curr;
159
+              } else {
160
+                return prev;
161
+              }
162
+            }, 0);
163
+            sums[index] += '';
164
+          } else {
165
+            sums[index] = '';
166
+          }
167
+        });
168
+
169
+        return sums;
170
+      },
171
+
137 172
     // 初始化数据
138 173
     init() {},
139 174
 

+ 6 - 2
src/xt_pages/DepositManagement/Template/DeductionSummary.vue ファイルの表示

@@ -51,6 +51,10 @@
51 51
           color: '#606266',
52 52
         }"
53 53
         :data="tableData"
54
+         show-summary
55
+        :summary-method="getSummaries"
56
+        max-height="550"
57
+        sum-text="押金支付金额合计"
54 58
         border
55 59
       >
56 60
         <el-table-column type="index" label="序号" align="center" width="200">
@@ -67,14 +71,14 @@
67 71
             <span>{{ scope.row.total	 ? scope.row.total	 : "" }}</span>
68 72
           </template>
69 73
         </el-table-column>
70
-        <el-table-column label="押金支付金额" align="center">
74
+        <el-table-column label="押金支付金额" align="center" prop="decimal">
71 75
           <template slot-scope="scope">
72 76
             <span>{{ scope.row.decimal	 ? scope.row.decimal	 : "" }}</span>
73 77
           </template>
74 78
         </el-table-column>
75 79
       </el-table>
76 80
 
77
-      <div>押金支付金额合计:<span>{{sum}}</span></div>
81
+      <!-- <div>押金支付金额合计:<span>{{sum}}</span></div> -->
78 82
     </div>
79 83
   </div>
80 84
 </template>

+ 6 - 3
src/xt_pages/DepositManagement/Template/RechargeDetails.vue ファイルの表示

@@ -50,7 +50,10 @@
50 50
           backgroundColor: 'rgb(245, 247, 250)',
51 51
           color: '#606266',
52 52
         }"
53
+        max-height="550"
53 54
         :data="tableData"
55
+        show-summary
56
+        sum-text="充值金额合计"
54 57
         border
55 58
       >
56 59
         <el-table-column type="index" label="序号" align="center" width="200">
@@ -66,7 +69,7 @@
66 69
           </template>
67 70
         </el-table-column>
68 71
 
69
-        <el-table-column label="充值金额" align="center">
72
+        <el-table-column label="充值金额" align="center" prop="deposit">
70 73
           <template slot-scope="scope">
71 74
             <span>{{ scope.row.deposit	 ? scope.row.deposit	 : "" }}</span>
72 75
           </template>
@@ -121,9 +124,9 @@
121 124
         </el-table-column>
122 125
       </el-table>
123 126
 
124
-      <div>
127
+      <!-- <div>
125 128
           充值金额合计:<span>{{sum}}</span>
126
-      </div>
129
+      </div> -->
127 130
     </div>
128 131
   </div>
129 132
 </template>

+ 6 - 3
src/xt_pages/DepositManagement/Template/RechargeSummary.vue ファイルの表示

@@ -50,7 +50,10 @@
50 50
           backgroundColor: 'rgb(245, 247, 250)',
51 51
           color: '#606266',
52 52
         }"
53
+        max-height="550"
53 54
         :data="tableData"
55
+        show-summary
56
+        sum-text="充值金额合计"
54 57
         border
55 58
       >
56 59
         <el-table-column type="index" label="序号" align="center" width="200">
@@ -62,7 +65,7 @@
62 65
           </template>
63 66
         </el-table-column>
64 67
 
65
-        <el-table-column label="充值金额" align="center">
68
+        <el-table-column label="充值金额" align="center" prop="sum_decimal">
66 69
           <template slot-scope="scope">
67 70
             <span>{{ scope.row.sum_decimal	 ? scope.row.sum_decimal	 : "" }}</span>
68 71
           </template>
@@ -74,10 +77,10 @@
74 77
         </el-table-column>
75 78
 
76 79
       </el-table>
77
-
80
+<!-- 
78 81
       <div>
79 82
           充值金额合计:<span>{{sum}}</span>
80
-      </div>
83
+      </div> -->
81 84
     </div>
82 85
   </div>
83 86
 </template>

+ 26 - 18
src/xt_pages/dialysis/template/DialysisPrintOrderFortyTwo.vue ファイルの表示

@@ -490,10 +490,10 @@
490 490
                         <label-box :isChecked="prescription.mode_id == 2 ? true : false" showValue="HDF"></label-box>
491 491
                       </td>
492 492
                       <td width="60">
493
-                        <label-box :isChecked="prescription.mode_id == 8 ? true : false" showValue="I-HDF"></label-box>
493
+                        <label-box :isChecked="prescription.mode_id == 24 ? true : false" showValue="I-HDF"></label-box>
494 494
                       </td>
495
-                      <td width="50">
496
-                        <label-box :isChecked="prescription.mode_id == 24 ? true : false" showValue="HP"></label-box>
495
+                      <td width="60">
496
+                        <label-box :isChecked="prescription.mode_id == 8 ? true : false" showValue="HFHD"></label-box>
497 497
                         <!-- <label-box :isChecked="prescription.mode_id == 4 ? true : false" showValue="HP"></label-box> -->
498 498
                       </td>
499 499
                       <td width="90">
@@ -504,18 +504,24 @@
504 504
                       <td width="100">
505 505
                         <div class="under-line">
506 506
                           &nbsp;
507
-                          <span v-if="prescription.mode_id > 5">{{ prescription.mode }}</span>
507
+                          <span v-if="prescription.mode_id != 1 &&
508
+                          prescription.mode_id != 2&&
509
+                          prescription.mode_id != 24&&
510
+                          prescription.mode_id != 8&&
511
+                          prescription.mode_id != 9">
512
+                          {{ prescription.mode }}
513
+                          </span>
508 514
                         </div>
509 515
                       </td>
510 516
 
511 517
                       <td width="140">透析器/灌流器型号:</td>
512 518
                       <td width="">
513 519
                         <div class="under-line">
514
-                            <span v-if="org_id ==9987 || org_id== 3877 || org_id == 4 || org_id == 9671">
520
+                            <span>
515 521
                               <span>{{prescription.dialysis_dialyszers}}</span>
516 522
                               <span v-if="prescription.dialysis_irrigation!=''">/{{prescription.dialysis_irrigation}}</span>
517 523
                             </span>
518
-                            <span v-else>{{ prescription.dialyzer_perfusion_apparatus }}</span>
524
+                            <!-- <span v-else>{{ prescription.dialyzer_perfusion_apparatus }}</span> -->
519 525
                         </div>
520 526
                       </td>
521 527
                     </tr>
@@ -927,7 +933,7 @@
927 933
                       <!-- <td width="70">其他记录:</td> -->
928 934
                       <td width="85">透析小结:</td>
929 935
                       <td width="">
930
-                        <div style="width: 95%;line-height: 25px;text-align: left;margin-left: 2px;text-underline-position: under; text-decoration: underline;">
936
+                        <div style="width: 95%;line-height: 25px;text-align: left;margin-left: 2px;">
931 937
                           {{ summary.dialysis_summary }}
932 938
                         </div>
933 939
                       </td>
@@ -1496,30 +1502,32 @@ export default {
1496 1502
           var leftAdvice = []
1497 1503
           var rightAdvice = []
1498 1504
           var adlen = advices.length
1499
-
1505
+          console.log(adlen,'adlen')
1500 1506
           var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
1501
-          for (var i = 0; i < halfLen; i++) {
1507
+          for (var i = 0; i < adlen; i++) {
1502 1508
             leftAdvice.push(advices[i])
1503
-            rightAdvice.push(advices[i + halfLen])
1509
+            // rightAdvice.push(advices[i + halfLen])
1504 1510
           }
1505
-          if (halfLen < 5) {
1511
+          if (adlen < 5) {
1506 1512
             var nl = 5 - leftAdvice.length
1507 1513
             for (let index = 0; index < nl; index++) {
1508 1514
               leftAdvice.push([])
1509 1515
             }
1510
-            var nl = 5 - rightAdvice.length
1511
-            for (let index = 0; index < nl; index++) {
1512
-              rightAdvice.push([])
1513
-            }
1516
+            // var nl = 5 - rightAdvice.length
1517
+            // for (let index = 0; index < nl; index++) {
1518
+            //   rightAdvice.push([])
1519
+            // }
1514 1520
           }
1515
-
1521
+          
1516 1522
           this.advices = []
1517
-          for (var i = 0; i < halfLen; i++) {
1523
+          for (var i = 0; i < adlen; i++) {
1518 1524
             var item = []
1519 1525
             item.push(leftAdvice[i])
1520
-            item.push(rightAdvice[i])
1526
+            // item.push(rightAdvice[i])
1521 1527
             this.advices.push(item)
1522 1528
           }
1529
+          console.log(this.advices,'临时医嘱')
1530
+
1523 1531
           this.loading = false
1524 1532
 
1525 1533
           this.doctor_advices =

+ 2 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderOne.vue ファイルの表示

@@ -910,6 +910,8 @@
910 910
                 <img class="es-img" :src="setAdminUserES(advice[0].checker)" alt="" srcset="" v-else />
911 911
               </td>
912 912
               <td></td>
913
+
914
+              
913 915
               <td v-if="advice[1] != undefined">
914 916
                 <span v-if="advice[1].start_time">
915 917
                   <!-- {{advice[1].start_time | parseTime('{y}-{m}-{d} {h}:{i}')}} -->

+ 311 - 249
src/xt_pages/hospitalStation/components/chargeDialog.vue ファイルの表示

@@ -1,304 +1,361 @@
1 1
 <template>
2
-  <el-dialog width="854px" title="收费单" class="chargeDialog" :visible.sync="visibility" :close-on-click-modal="isClose"
3
-             :close-on-press-escape="isClose">
4
-
5
-    <el-form :model="form"  ref="formValue" label-width="100px">
6
-
7
-      <el-form-item label="日期:" style="width:100%;">
8
-        <div>{{record_date}}</div>
2
+  <el-dialog
3
+    width="854px"
4
+    title="收费单"
5
+    class="chargeDialog"
6
+    :visible.sync="visibility"
7
+    :close-on-click-modal="isClose"
8
+    :close-on-press-escape="isClose"
9
+  >
10
+    <el-form :model="form" ref="formValue" label-width="100px">
11
+      <el-form-item label="日期:" style="width: 100%">
12
+        <div>{{ record_date }}</div>
9 13
       </el-form-item>
10 14
 
11
-      <el-form-item label="总计:" prop="name" :validate-event="is_Name" style="width:33%;">
12
-        <el-input style="color: black" type="number" v-model="form.total" :disabled="true"></el-input>
15
+      <el-form-item
16
+        label="总计:"
17
+        prop="name"
18
+        :validate-event="is_Name"
19
+        style="width: 33%"
20
+      >
21
+        <el-input
22
+          style="color: black"
23
+          type="number"
24
+          v-model="form.total"
25
+          :disabled="true"
26
+        ></el-input>
13 27
       </el-form-item>
14
-      <el-form-item label="医保:" prop="name" :validate-event="is_Name" style="width:33%;">
15
-        <el-input style="color: black"  type="number" v-model="form.medical_insurance_price" :disabled="true"></el-input>
28
+      <el-form-item
29
+        label="医保:"
30
+        prop="name"
31
+        :validate-event="is_Name"
32
+        style="width: 33%"
33
+      >
34
+        <el-input
35
+          style="color: black"
36
+          type="number"
37
+          v-model="form.medical_insurance_price"
38
+          :disabled="true"
39
+        ></el-input>
16 40
       </el-form-item>
17 41
 
18
-
19
-      <el-form-item label="自费:" prop="age" :validate-event="is_Name" style="width:33%;">
20
-        <el-input style="color: black"  type="number" v-model="form.private_price" :disabled="true"></el-input>
42
+      <el-form-item
43
+        label="自费:"
44
+        prop="age"
45
+        :validate-event="is_Name"
46
+        style="width: 33%"
47
+      >
48
+        <el-input
49
+          style="color: black"
50
+          type="number"
51
+          v-model="form.private_price"
52
+          :disabled="true"
53
+        ></el-input>
21 54
       </el-form-item>
22 55
 
23
-      <el-form-item label="个账支出:" prop="age" :validate-event="is_Name" style="width:33%;">
24
-        <el-input style="color: black"  type="number" v-model="form.acct_pay" :disabled="true"></el-input>
56
+      <el-form-item
57
+        label="个账支出:"
58
+        prop="age"
59
+        :validate-event="is_Name"
60
+        style="width: 33%"
61
+      >
62
+        <el-input
63
+          style="color: black"
64
+          type="number"
65
+          v-model="form.acct_pay"
66
+          :disabled="true"
67
+        ></el-input>
25 68
       </el-form-item>
26 69
 
27
-
28
-      <el-form-item label="个人现金支出:" prop="age" :validate-event="is_Name" style="width:33%;">
29
-        <el-input style="color: black"  type="number" v-model="form.psn_pay" :disabled="true"></el-input>
70
+      <el-form-item
71
+        label="个人现金支出:"
72
+        prop="age"
73
+        :validate-event="is_Name"
74
+        style="width: 33%"
75
+      >
76
+        <el-input
77
+          style="color: black"
78
+          type="number"
79
+          v-model="form.psn_pay"
80
+          :disabled="true"
81
+        ></el-input>
30 82
       </el-form-item>
31 83
 
32
-
33
-
34
-      <el-form-item label="支付方式:" style="width:100%;">
35
-        <!-- <el-select v-model="form.pay_way" placeholder="请选择">
36
-          <el-option
37
-            v-for="(item,index) in payWays"
38
-            :key="index"
39
-            :label="item.label"
40
-            :value="item.value">
41
-          </el-option>
42
-        </el-select> -->
43
-        <el-radio-group v-model="form.pay_way">
84
+    <el-form-item label="支付方式:" style="width:100%;"> -->
85
+         <el-radio-group v-model="form.pay_way">
44 86
           <el-radio :label="index" v-for="(item,index) in payWays" :key="index">{{ item.label }}</el-radio>
45 87
         </el-radio-group>
46 88
       </el-form-item>
47 89
 
48
-
49
-
50
-      <el-form-item  v-if="form.pay_way == 5">
51
-          <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>
90
+      <el-form-item label="个人现金支付方式:" style="width: 100%">
91
+        <el-checkbox v-model="form.dec_way" @change="changedecimal">
92
+          使用押金余额抵扣(当前押金余额为¥{{ decimal }})
93
+        </el-checkbox>
94
+        <span v-if="form.dec_way == true">
95
+          <el-form-item class="specialFormItem">
96
+            <div style="display: flex">
97
+              <!--            这里不要改成el-input,因为使用el-input会导致一个奇怪的bug,千万不要改!!!!!!!!!!!!!!!!!!!!-->
98
+              <el-input v-model="form.tmp_decimal" @onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" @change="lilili">元</el-input>
99
+            </div>
100
+          </el-form-item>
101
+        </span>
52 102
       </el-form-item>
53 103
 
54
-
55 104
       <el-form-item label="付款金额:" prop="id_card" :validate-event="is_Name">
56
-        <el-input style="color: black"  type="number" v-model="form.pay_price" :disabled="true"></el-input>
105
+        <el-input
106
+          style="color: black"
107
+          type="number"
108
+          v-model="form.pay_price"
109
+          :disabled="true"
110
+        ></el-input>
57 111
       </el-form-item>
58 112
 
59
-
60 113
       <el-form-item label="付款卡号:" prop="id_card" :validate-event="is_Name">
61 114
         <el-input v-model="form.pay_card_no"></el-input>
62 115
       </el-form-item>
63 116
 
64 117
       <el-form-item class="specialFormItem" label="折扣金额:">
65
-        <div style="display:flex;">
66
-          <el-input style="color: black"  v-model="form.discount_price" :disabled="form.preferential_price != 0" @change="changeDiscountPrice"></el-input>
118
+        <div style="display: flex">
119
+          <el-input
120
+            style="color: black"
121
+            v-model="form.discount_price"
122
+            :disabled="form.preferential_price != 0"
123
+            @change="changeDiscountPrice"
124
+          ></el-input>
67 125
         </div>
68 126
       </el-form-item>
69 127
       <el-form-item class="specialFormItem" label="优惠金额:">
70
-        <div style="display:flex;">
71
-          <el-input style="color: black"  v-model="form.preferential_price" :disabled="form.discount_price != 0" @change="changePreferentialPrice"></el-input>
128
+        <div style="display: flex">
129
+          <el-input
130
+            style="color: black"
131
+            v-model="form.preferential_price"
132
+            :disabled="form.discount_price != 0"
133
+            @change="changePreferentialPrice"
134
+          ></el-input>
72 135
         </div>
73 136
       </el-form-item>
74 137
       <el-form-item label="实收金额:">
75
-        <div style="display:flex;">
76
-          <el-input style="color: black"  v-model="form.reality_price" @change="realityPrice"></el-input>
138
+        <div style="display: flex">
139
+          <el-input
140
+            style="color: black"
141
+            v-model="form.reality_price"
142
+            @change="realityPrice"
143
+          ></el-input>
77 144
         </div>
78 145
       </el-form-item>
79 146
       <el-form-item label="找回金额:">
80
-        <div style="display:flex;">
81
-          <el-input style="color: black"  v-model.number="form.found_price"></el-input>
147
+        <div style="display: flex">
148
+          <el-input
149
+            style="color: black"
150
+            v-model.number="form.found_price"
151
+          ></el-input>
82 152
         </div>
83 153
       </el-form-item>
84 154
 
85 155
       <el-form-item label="发票编码:">
86
-        <div style="display:flex;">
156
+        <div style="display: flex">
87 157
           <el-input v-model.number="form.fapiao_code"></el-input>
88 158
         </div>
89 159
       </el-form-item>
90 160
 
91
-
92 161
       <el-form-item label="发票号码:">
93
-        <div style="display:flex;">
162
+        <div style="display: flex">
94 163
           <el-input v-model.number="form.fapiao_number"></el-input>
95 164
         </div>
96 165
       </el-form-item>
97
-
98 166
     </el-form>
99 167
 
100 168
     <span slot="footer" class="dialog-footer">
101
-    <el-button @click="cancel('formValue')">取 消</el-button>
102
-    <el-button type="primary" @click="confirm('formValue')">确 定</el-button>
103
-  </span>
169
+      <el-button @click="cancel('formValue')">取 消</el-button>
170
+      <el-button type="primary" @click="confirm('formValue')">确 定</el-button>
171
+    </span>
104 172
   </el-dialog>
105
-
106 173
 </template>
107 174
 
108 175
 <script>
109
-  import { uParseTime } from '@/utils/tools'
110
-  import axios from "axios";
111
-  const moment = require('moment')
112
-  export default {
113
-    name: 'chargeDialog',
114
-
115
-    data() {
116
-
117
-      return {
118
-        record_date:'',
119
-        org_id:this.$store.getters.xt_user.org_id,
120
-        form: {
121
-          medical_insurance_price:0,
122
-          private_price:'',
123
-          pay_way:'',
124
-          pay_price:'',
125
-          pay_card_no:'',
126
-          discount_price:'',
127
-          preferential_price:'',
128
-          reality_price:'',
129
-          found_price:'',
130
-          total:0,
131
-          fapiao_code:"",
132
-          fapiao_number:"",
133
-          order:null,
134
-          acct_pay:'',
135
-          psn_pay:'',
136
-
137
-
138
-        },
139
-        payWays: [
140
-          {value: 1, label: '现金'},
141
-          {value: 2, label: '银行卡'},
142
-          {value: 3, label: '微信'},
143
-          {value: 4, label: '支付宝'},
144
-          {value: 5, label: '医保卡'},
145
-
146
-        ],
147
-        total:"",
148
-
149
-        visibility: false,
150
-        labelPosition: 'right',
151
-        isClose: false,
152
-
153
-        resetForm: {
154
-          medical_insurance_price:'',
155
-          private_price:'',
156
-          pay_way:'',
157
-          pay_price:'',
158
-          pay_card_no:'',
159
-          discount_price:'',
160
-          preferential_price:'',
161
-          reality_price:'',
162
-          found_price:'',
163
-          fapiao_code:"",
164
-          fapiao_number:"",
165
-          acct_pay:"",
166
-          psn_pay:"",
167
-        },
168
-
169
-      }
170
-    },
171
-    props: {
172
-
173
-      titles: {
174
-        type: String,
175
-        default: ''
176
+import { uParseTime } from "@/utils/tools";
177
+const moment = require("moment");
178
+export default {
179
+  name: "chargeDialog",
180
+
181
+  data() {
182
+    return {
183
+      record_date: "",
184
+      form: {
185
+        medical_insurance_price: 0,
186
+        private_price: "",
187
+        pay_way: "",
188
+        pay_price: "",
189
+        pay_card_no: "",
190
+        discount_price: "",
191
+        preferential_price: "",
192
+        reality_price: "",
193
+        found_price: "",
194
+        total: 0,
195
+        fapiao_code: "",
196
+        fapiao_number: "",
197
+        order: null,
198
+        acct_pay: "",
199
+        psn_pay: "",
176 200
       },
177
-      formValue: {
178
-        type: Object
201
+      pay_way_index: "",
202
+      payWays: [
203
+        { value: 1, label: "现金" },
204
+        { value: 2, label: "银行卡" },
205
+        { value: 3, label: "微信" },
206
+        { value: 4, label: "支付宝" },
207
+        { value: 5, label: "医保卡" },
208
+      ],
209
+      total: "",
210
+
211
+      visibility: false,
212
+      labelPosition: "right",
213
+      isClose: false,
214
+
215
+      resetForm: {
216
+        medical_insurance_price: "",
217
+        private_price: "",
218
+        pay_way: "",
219
+        pay_price: "",
220
+        pay_card_no: "",
221
+        discount_price: "",
222
+        preferential_price: "",
223
+        reality_price: "",
224
+        found_price: "",
225
+        fapiao_code: "",
226
+        fapiao_number: "",
227
+        acct_pay: "",
228
+        psn_pay: "",
179 229
       },
180
-      type: {
181
-        type: Number,
182
-        default: 1
183
-
184
-      },
185
-      isCreated: {
186
-        type: Number,
187
-        default: 1
188
-
189
-      }
230
+    };
231
+  },
232
+  props: {
233
+    titles: {
234
+      type: String,
235
+      default: "",
190 236
     },
191
-    methods: {
192
-      reading() {
193
-        var that = this
194
-        let params = {
195
-          'id_card_type': 1,
196
-          'admin_user_id': this.$store.getters.xt_user.user.id,
197
-          'certificates':1,
198
-        }
199
-        axios.get('http://127.0.0.1:9532/zh/api/readcard', {
200
-          params: params
201
-        })
202
-            .then(function(response) {
203
-              if (response.data.state == 0) {
204
-                that.$message.error(response.data.msg)
205
-                return false
206
-              } else {
207
-                that.form.medicalInsuranceCard = response.data.data.number
208
-                that.$message({ message: '读卡成功', type: 'success' })
209
-              }
210
-            })
211
-            .catch(function(error) {
212
-
213
-            })
214
-      },
215
-      show: function (total,order) {
216
-        this.record_date = moment(new Date()).add('year',0).format("YYYY-MM-DD HH:mm")
217
-        this.form.total = total
218
-        this.form.private_price = total
219
-        this.form.pay_price = total
220
-        this.form.total = total + this.form.medical_insurance_price
221
-        this.form.discount_price = 0.0
222
-        this.form.preferential_price = 0.0
223
-
224
-        this.form.fapiao_code =""
225
-        this.form.fapiao_number = ""
226
-        this.order = order
227
-
228
-        if(this.order && this.order.id > 0){
229
-          this.form.acct_pay = this.order.acct_pay
230
-          this.form.psn_pay = this.order.psn_cash_pay
231
-          this.form.total = this.order.medfee_sumamt
232
-          this.form.pay_price = this.order.medfee_sumamt
233
-          this.form.medical_insurance_price = this.order.fund_pay_sumamt
234
-          this.form.private_price =  this.order.psn_part_amt
235
-        }
236
-
237
-        this.visibility = true
237
+    formValue: {
238
+      type: Object,
239
+    },
240
+    type: {
241
+      type: Number,
242
+      default: 1,
243
+    },
244
+    isCreated: {
245
+      type: Number,
246
+      default: 1,
247
+    },
248
+  },
249
+  methods: {
250
+    show: function (total, order) {
251
+      this.record_date = moment(new Date())
252
+        .add("year", 0)
253
+        .format("YYYY-MM-DD HH:mm");
254
+      this.form.total = total;
255
+      this.form.private_price = total;
256
+      this.form.pay_price = total;
257
+      this.form.total = total + this.form.medical_insurance_price;
258
+      this.form.discount_price = 0.0;
259
+      this.form.preferential_price = 0.0;
260
+
261
+      this.form.fapiao_code = "";
262
+      this.form.fapiao_number = "";
263
+      this.order = order;
264
+
265
+      if (this.order && this.order.id > 0) {
266
+        this.form.acct_pay = this.order.acct_pay;
267
+        this.form.psn_pay = this.order.psn_cash_pay;
268
+        this.form.total = this.order.medfee_sumamt;
269
+        this.form.pay_price = this.order.medfee_sumamt;
270
+        this.form.medical_insurance_price = this.order.fund_pay_sumamt;
271
+        this.form.private_price = this.order.psn_part_amt;
272
+      }
238 273
 
239
-      }, hide: function () {
240
-        this.form = Object.assign({}, this.resetForm);
241
-        this.loadingtwo = false;
242
-        this.visibility = false
243
-      }, cancel: function (formName) {
244
-        this.$emit('cancel', this.getValue());
245
-        this.$refs['formValue'].resetFields()
246
-      },
247
-      confirm: function (formName) {
248
-        this.$refs['formValue'].validate((valid) => {
249
-          if (valid) {
250
-            let value = {};
251
-            value = this.getValue();
252
-            this.$emit('confirm', value);
253
-            this.loadingtwo = true
254
-          }
255
-        })
256
-      },
257
-      getValue: function () {
258
-        let form = {};
259
-        form = this.form;
260
-        return form
261
-      },
262
-      realityPrice(val){
263
-        if(val < (this.form.total - this.form.discount_price - this.form.preferential_price)){
264
-          this.$message.error('实收金额不能小于收费金额');
265
-          return
266
-        }
267
-        this.form.found_price = parseInt(val) - parseInt(this.form.total) + parseInt(this.form.discount_price) + parseInt(this.form.preferential_price)
268
-      },
269
-      changeDiscountPrice(val){
270
-        if(val > this.form.total){
271
-          this.$message.error('折扣金额不能超过费用总额');
272
-          return
273
-        }
274
-        this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.preferential_price)
275
-      },
276
-      changePreferentialPrice(val){
277
-        if(val > this.form.total){
278
-          this.$message.error('优惠金额不能超过费用总额');
279
-          return
274
+      this.visibility = true;
275
+    },
276
+    hide: function () {
277
+      this.form = Object.assign({}, this.resetForm);
278
+      this.loadingtwo = false;
279
+      this.visibility = false;
280
+    },
281
+    cancel: function (formName) {
282
+      this.$emit("cancel", this.getValue());
283
+      this.$refs["formValue"].resetFields();
284
+    },
285
+    confirm: function (formName) {
286
+      this.$refs["formValue"].validate((valid) => {
287
+        if (valid) {
288
+          let value = {};
289
+          value = this.getValue();
290
+          this.$emit("confirm", value);
291
+          this.loadingtwo = true;
280 292
         }
281
-        this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.discount_price)
293
+      });
294
+    },
295
+    getValue: function () {
296
+      let form = {};
297
+      form = this.form;
298
+      return form;
299
+    },
300
+    realityPrice(val) {
301
+      if (
302
+        val <
303
+        this.form.total -
304
+          this.form.discount_price -
305
+          this.form.preferential_price
306
+      ) {
307
+        this.$message.error("实收金额不能小于收费金额");
308
+        return;
282 309
       }
283
-    },mounted() {
284
-      var nowDate = new Date();
285
-      var nowYear = nowDate.getFullYear();
286
-      var nowMonth = nowDate.getMonth() + 1;
287
-      var nowDay = nowDate.getDate();
288
-
289
-      var nowHours = nowDate.getHours();
290
-      var nowMin = nowDate.getMinutes();
291
-      var nowSecond = nowDate.getSeconds();
292
-
293
-      this.record_date =
294
-        nowYear +
295
-        '-' +
296
-        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
297
-        '-' +
298
-        (nowDay < 10 ? '0' + nowDay : nowDay)+" "+(nowHours < 10 ? '0' + nowHours : nowHours)+":"+(nowMin < 10 ? '0' + nowMin : nowMin)
299
-    }
300
-
301
-  }
310
+      this.form.found_price =
311
+        parseInt(val) -
312
+        parseInt(this.form.total) +
313
+        parseInt(this.form.discount_price) +
314
+        parseInt(this.form.preferential_price);
315
+    },
316
+    changeDiscountPrice(val) {
317
+      if (val > this.form.total) {
318
+        this.$message.error("折扣金额不能超过费用总额");
319
+        return;
320
+      }
321
+      this.form.reality_price =
322
+        parseInt(this.form.total) -
323
+        parseInt(val) -
324
+        parseInt(this.form.preferential_price);
325
+    },
326
+    changePreferentialPrice(val) {
327
+      if (val > this.form.total) {
328
+        this.$message.error("优惠金额不能超过费用总额");
329
+        return;
330
+      }
331
+      this.form.reality_price =
332
+        parseInt(this.form.total) -
333
+        parseInt(val) -
334
+        parseInt(this.form.discount_price);
335
+    },
336
+  },
337
+  mounted() {
338
+    var nowDate = new Date();
339
+    var nowYear = nowDate.getFullYear();
340
+    var nowMonth = nowDate.getMonth() + 1;
341
+    var nowDay = nowDate.getDate();
342
+
343
+    var nowHours = nowDate.getHours();
344
+    var nowMin = nowDate.getMinutes();
345
+    var nowSecond = nowDate.getSeconds();
346
+
347
+    this.record_date =
348
+      nowYear +
349
+      "-" +
350
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
351
+      "-" +
352
+      (nowDay < 10 ? "0" + nowDay : nowDay) +
353
+      " " +
354
+      (nowHours < 10 ? "0" + nowHours : nowHours) +
355
+      ":" +
356
+      (nowMin < 10 ? "0" + nowMin : nowMin);
357
+  },
358
+};
302 359
 </script>
303 360
 
304 361
 
@@ -308,17 +365,22 @@
308 365
   font-size: 15px;
309 366
 }
310 367
 
311
-   /deep/.el-input__inner {
312
-     background-color: transparent !important;
313
-     border: 1px solid red;
314
-   }
315
-.chargeDialog{
316
-  .el-form{
368
+/deep/.el-input__inner {
369
+  background-color: transparent !important;
370
+  border: 1px solid red;
371
+}
372
+.chargeDialog {
373
+  .el-form {
317 374
     display: flex;
318 375
     flex-wrap: wrap;
319 376
   }
320
-  .el-form-item{
321
-    width:50%;
377
+  .el-form-item {
378
+    width: 50%;
322 379
   }
323 380
 }
381
+
382
+.input_style{
383
+  border-radius: 5px;
384
+  border: 1px solid #dbdbdb;
385
+}
324 386
 </style>

File diff suppressed because it is too large
+ 989 - 766
src/xt_pages/outpatientCharges/summary.vue


+ 1 - 0
src/xt_pages/outpatientCharges/summaryDetail.vue ファイルの表示

@@ -473,6 +473,7 @@ export default {
473 473
 
474 474
 
475 475
           var prescription = response.data.data.prescription
476
+          console.log("prescir233232322323232323",prescription)
476 477
           this.prescriptions = prescription
477 478
           this.setMonthPrescription(prescription)
478 479
 

+ 79 - 11
src/xt_pages/outpatientTool/components/detailStatistics.vue ファイルの表示

@@ -111,7 +111,10 @@
111 111
     </el-table>
112 112
     <div style="display:flex;justify-content: space-around;">
113 113
       <div>总费用:{{getAllPice()}}</div>
114
-     <div>个人支付:{{getActPay()}}</div>
114
+     <div>个人支付:
115
+        <span v-if="his_patient.balance_accounts_type == 2"></span> {{getAllPice()}}
116
+        <span v-if="his_patient.balance_accounts_type != 2"></span> {{getActPay()}}
117
+    </div>
115 118
      <div>基金支付记账:{{getFundPaySumamt()}}</div>
116 119
      <div>补充医疗支付记账:{{getHifesPay()}}</div>
117 120
     <div>救助支付金额:{{getMafPay()}}</div>
@@ -155,12 +158,13 @@ export default {
155 158
       item_type: '0',
156 159
       items: [
157 160
         { id: 1, name: '药品' },
161
+        { id: 2, name: '项目' },
158 162
         { id: 3, name: '耗材' },
159
-        { id: 2, name: '项目' }
160 163
 
161 164
       ],
162 165
       list:[],
163
-
166
+      his_patient:{},
167
+      id:0,
164 168
     }
165 169
   },
166 170
   methods: {
@@ -180,8 +184,10 @@ export default {
180 184
     changeDate() {
181 185
       this.getHisSummaryDetailList()
182 186
     },
183
-    changeItem() {
187
+    changeItem(id) {
188
+      this.id = id
184 189
       this.getHisSummaryDetailList()
190
+ 
185 191
     },
186 192
     getHisSummaryDetailList() {
187 193
       let start_time = this.chargeDate[0]
@@ -196,7 +202,7 @@ export default {
196 202
      getHisSummaryDetailList(params).then(response=>{
197 203
        if(response.data.state == 1){
198 204
           var list =  response.data.data.list
199
-         
205
+          this.his_patient = response.data.data.his_patient
200 206
           this.list = list
201 207
           this.tableData = []
202 208
           for(let i=0;i<list.length;i++){
@@ -217,7 +223,7 @@ export default {
217 223
           }
218 224
           obj.total_price = (obj.total_price).toFixed(2)
219 225
           this.tableData.push(obj)
220
-          console.log("tabl2332322332323232323232323",this.tableData)
226
+          console.log("tabledata23233232233232",this.tableData)
221 227
           var new_arr = []
222 228
        
223 229
           if(this.keywords!=""){
@@ -242,15 +248,70 @@ export default {
242 248
                 }
243 249
               }
244 250
             }
245
-            if(this.keywords!=""){
246
-              this.tableData.push(obj)
247
-            }
251
+            var objs = {index:"合计",total_price:0,record_date:"0"}
252
+            objs.total_price = this.getPrice(new_arr)
253
+            new_arr.push(objs)
254
+            
248 255
             this.tableData = new_arr
249 256
           }
257
+           if(this.id == 1){
258
+              var obj = {index:"合计",total_price:0,record_date:"0"}
259
+              var new_arr = []
260
+              for(let i=0;i<this.tableData.length;i++){
261
+                if(this.tableData[i].index!="合计"){
262
+                  if(this.tableData[i].advice_id > 0){
263
+                    new_arr.push(this.tableData[i])
264
+                  }
265
+                } 
266
+              }
267
+              this.tableData = []
268
+              obj.total_price = this.getPrice(new_arr)
269
+              new_arr.push(obj)
270
+              this.tableData = new_arr
271
+           }
272
+          if(this.id == 2){
273
+            var obj = {index:"合计",total_price:0,record_date:"0"}
274
+            var new_arr = []
275
+            for(let i=0;i<this.tableData.length;i++){
276
+              if(this.tableData[i].index!="合计"){
277
+                if(this.tableData[i].project_id > 0){
278
+                  if(this.tableData[i].project.type ==2){
279
+                    new_arr.push(this.tableData[i])
280
+                  }
281
+                }
282
+              } 
283
+            }
284
+            console.log("项目new_arr",new_arr)
285
+            this.tableData = []
286
+            obj.total_price = this.getPrice(new_arr)
287
+            console.log("ar3233223232",new_arr)
288
+            new_arr.push(obj)
289
+            this.tableData = new_arr
290
+            }
291
+
292
+          if(this.id == 3){
293
+            var new_arr = []
294
+            var obj = {index:"合计",total_price:0,record_date:"0"}
295
+            for(let i=0;i<this.tableData.length;i++){
296
+              if(this.tableData[i].index!="合计"){
297
+                if(this.tableData[i].project_id > 0){
298
+                  if(this.tableData[i].project.type == 3){
299
+                    new_arr.push(this.tableData[i])
300
+                  }
301
+                }
302
+              } 
303
+            }
304
+            this.tableData = []
305
+            obj.total_price = this.getPrice(new_arr)
306
+            new_arr.push(obj)
307
+            console.log("new_arr2332323232",new_arr)
308
+            this.tableData = new_arr
309
+          }          
250 310
        }
251 311
      })
252 312
     },
253 313
     getAllPice(){
314
+     console.log("表哥233323232323223",this.tableData)
254 315
       var total_price = 0
255 316
       for(let i=0;i<this.tableData.length;i++){
256 317
         if(this.tableData[i].index =="合计"){
@@ -260,7 +321,7 @@ export default {
260 321
       return total_price
261 322
     },
262 323
     getActPay(){
263
-      // console.log("hh23h323223323",this.list)
324
+      console.log("list2332323232323232",this.list)
264 325
       var act_pay = 0
265 326
       for(let i=0;i<this.list.length;i++){
266 327
         for(let j=0;j<this.list[i].orders.length;j++){
@@ -297,7 +358,14 @@ export default {
297 358
       return maf_pay
298 359
     },
299 360
     toPrint(){
300
-      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})
361
+      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+"&id="+this.id+"&balance_accounts_type="+this.his_patient.balance_accounts_type})
362
+    },
363
+    getPrice(val){
364
+      var total_price = 0
365
+      for(let i=0;i<val.length;i++){
366
+         total_price += val[i].cnt * val[i].pric
367
+      }
368
+      return total_price.toFixed(2)
301 369
     }
302 370
 
303 371
   },

+ 561 - 81
src/xt_pages/outpatientTool/components/gatherStatistics.vue ファイルの表示

@@ -46,7 +46,7 @@
46 46
       <div>
47 47
       </div>
48 48
     </div>
49
-    <el-table :data="list" border :row-style="{ color: '#303133' }" ref="table"
49
+    <el-table :data="tableList" border :row-style="{ color: '#303133' }" ref="table"
50 50
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
51 51
               max-height="600"
52 52
               v-loading="detail_loading"
@@ -61,7 +61,15 @@
61 61
       </el-table-column>
62 62
       <el-table-column align="center" prop="name" label="费用分类">
63 63
         <template slot-scope="scope">
64
-          {{ scope.row.med_chrgitm_type }}
64
+           <span v-if="scope.row.type == 1">
65
+              {{getAdviceMedChrgintmType(scope.row.name)}}
66
+           </span>
67
+           <span v-if="scope.row.type == 2">
68
+             {{getProjectMedChrgintmType(scope.row.project_id)}}
69
+           </span>
70
+          <span v-if="scope.row.type == 3">
71
+              {{getProjectMedChrgintmType(scope.row.project_id)}}
72
+           </span>
65 73
         </template>
66 74
       </el-table-column>
67 75
       <el-table-column align="center" prop="name" label="项目名称">
@@ -76,7 +84,8 @@
76 84
       </el-table-column>
77 85
       <el-table-column align="center" prop="name" label="数量">
78 86
         <template slot-scope="scope">
79
-          {{ scope.row.count }}{{ scope.row.unit }}
87
+          {{ scope.row.count }}
88
+          {{ scope.row.unit }}
80 89
         </template>
81 90
       </el-table-column>
82 91
       <el-table-column align="center" prop="name" label="单价">
@@ -92,38 +101,49 @@
92 101
       </el-table-column>
93 102
       <el-table-column align="center" prop="name" label="医保类别">
94 103
         <template slot-scope="scope">
95
-         <span v-if="scope.row.chrgitm_lv== '01'">甲类</span>
96
-         <span v-if="scope.row.chrgitm_lv== '02'">乙类</span>
97
-         <span v-if="scope.row.chrgitm_lv== '03'">自费</span>
104
+         <span v-if="balanceAccountsType == 2">{{getChrgitmLv(scope.row.chrgitm_lv)}}</span>
105
+
106
+         <span v-if="balanceAccountsType != 2">
107
+           <span v-if="scope.row.type == 1">
108
+              {{getAdviceMedChrgintmLv(scope.row.advice_id)}}
109
+           </span>
110
+           <span v-if="scope.row.type == 2">
111
+             {{getProjectMedChrgintmLv(scope.row.project_id)}}
112
+           </span>
113
+          <span v-if="scope.row.type == 3">
114
+              {{getProjectMedChrgintmLv(scope.row.project_id)}}
115
+           </span>
116
+         </span>
98 117
         </template>
99 118
       </el-table-column>
100 119
 
101 120
     </el-table>
102 121
      <div>
103 122
       <div class="listInfo">
104
-            <div>西药:</div>
105
-            <div>中成药:{{chineseTraditionalMedicineCostTotal}}</div>
106
-            <div>中草药:</div>
123
+            <!-- <div>西药:{{westernMedicineCostTotal}}</div> -->
124
+            <div>西药:{{getWesternMedicineCostTotal()}}</div>
125
+            <div>中成药:{{getChineseTraditionalMedicineCostTotal()}}</div>
126
+            <div>中草药:{{getChineseTotal()}}</div>
107 127
         </div>
108 128
         <div class="listInfo">
109
-            <div>检查费:{{checkCostTotal}}</div>
110
-            <div>输氧费:</div>
111
-            <div>手术费:</div>
129
+            <div>检查费:{{getCheckCostTotal()}}</div>
130
+            <div>输氧费:{{getOxygen()}}</div>
131
+            <div>手术费:{{getOperation()}}</div>
112 132
         </div>
113 133
         <div class="listInfo">
114
-            <div>化验费:{{laboratoryCostTotal}}</div>
115
-            <div>输血费:</div>
116
-            <div>诊断费:{{zhenChaCostTotal}}</div>
134
+            <div>化验费:{{getLaboratoryCostTotal()}}</div>
135
+            <div>输血费:{{getBlood()}}</div>
136
+            <div>诊断费:{{getZhenChaCostTotal()}}</div>
117 137
         </div>
118 138
          <div class="listInfo">
119
-            <div>治疗费:</div>
120
-            <div>护理费:</div>
121
-            <div>床位费:{{bedCostTotal}}</div>
139
+            <div>治疗费:{{getTreatement()}}</div>
140
+            <div>护理费:{{getNursing()}}</div>
141
+            <div>床位费:{{getBedCostTotal()}}</div>
122 142
         </div>
123 143
         <div class="listInfo" style="margin-bottom: 20px;">
124
-            <div>麻醉费:</div>
125
-            <div>材料费:{{materialCostTotal}}</div>
126
-            <div>其他:{{otherCostTotal}}</div>
144
+            <div>麻醉费:{{getAnesthesia()}}</div>
145
+            <div>材料费:{{getMaterialCostTotal()}}</div>
146
+            <div>其他:{{getOtherCostTotal()}}</div>
127 147
         </div>
128 148
     </div>
129 149
   </div>
@@ -170,6 +190,7 @@ export default {
170 190
       list:[],
171 191
       his_patient:{},
172 192
       hisDepatment:[],
193
+      westernMedicineCostTotal:0,
173 194
       chineseTraditionalMedicineCostTotal:0,
174 195
       checkCostTotal:0,
175 196
       laboratoryCostTotal:0,
@@ -177,17 +198,86 @@ export default {
177 198
       bedCostTotal:0,
178 199
       materialCostTotal:0,
179 200
       otherCostTotal:0,
201
+      tableList:[],
202
+      order_info_list:[],
203
+      balanceAccountsType:0,
204
+      medicalInsuranceLevelList:[],
180 205
     }
181 206
   },
182 207
   methods: {
183 208
     searchAction(){
184
-     this.getGatherDetailList()
209
+     var new_arr = []
210
+     if(this.keywords!=""){
211
+        for(let i=0;i<this.tableList.length;i++){
212
+          if(this.tableList[i].is_total!=1){
213
+            if(this.tableList[i].name.indexOf(this.keywords) >-1){
214
+                new_arr.push(this.tableList[i])
215
+              }
216
+            }
217
+        }
218
+        var obj ={index:"合计",is_total:1,total:0}
219
+        obj.total = this.getPrice(new_arr)
220
+        new_arr.push(obj)
221
+        this.tableList = []
222
+        this.tableList = new_arr
223
+      }else{
224
+        this.tableList = []
225
+        this.getGatherDetailList()
226
+      }
227
+    },
228
+    getPrice(val){
229
+      var total_price = 0
230
+      for(let i=0;i<val.length;i++){
231
+        total_price +=val[i].count * val[i].price
232
+      }
233
+      return total_price.toFixed(2)
185 234
     },
186 235
     changeDate() {
187 236
       this.getGatherDetailList()
188 237
     },
189
-    changeItem() {
190
-      this.getGatherDetailList()
238
+    changeItem(id) {
239
+      if(id == 0){
240
+        this.tableList = []
241
+        this.getGatherDetailList()
242
+      }
243
+      
244
+      if(id == 1){
245
+       var new_arr = []
246
+       for(let i=0;i<this.tableList.length;i++){
247
+        if(this.tableList[i].is_total != 1){
248
+          if(this.tableList[i].type == 1){
249
+            new_arr.push(this.tableList[i])
250
+          }  
251
+        }
252
+       }
253
+       this.tableList = []
254
+       this.tableList = new_arr
255
+      }
256
+      if(id == 2){
257
+       var new_arr = []
258
+     
259
+       for(let i=0;i<this.tableList.length;i++){
260
+        if(this.tableList[i].is_total != 1){
261
+          if(this.tableList[i].type == 2){
262
+            new_arr.push(this.tableList[i])
263
+          }  
264
+        }
265
+       }
266
+       this.tableList = []
267
+       this.tableList = new_arr
268
+      }
269
+      if(id == 3){
270
+       var new_arr = []
271
+       for(let i=0;i<this.tableList.length;i++){
272
+        if(this.tableList[i].is_total != 1){
273
+          if(this.tableList[i].type == 3){
274
+            new_arr.push(this.tableList[i])
275
+          }  
276
+        }
277
+       }
278
+       this.tableList = []
279
+       this.tableList = new_arr
280
+      }
191 281
     },
192 282
     getGatherDetailList() {
193 283
       let start_time = this.chargeDate[0]
@@ -208,8 +298,21 @@ export default {
208 298
             this.patient = response.data.data.patient
209 299
             this.admin = response.data.data.admin_info
210 300
             this.his_hospital = response.data.data.his_hospital
301
+
211 302
             var order_info = response.data.data.order_info
212
-            console.log(" 汇总order_info2332322323232323",order_info)
303
+           
304
+            for(let i=0;i<order_info.length;i++){
305
+              order_info[i].med_chrgitm_type = this.getType(order_info[i].med_chrgitm_type)
306
+              order_info[i].chrgitm_lv  = this.getMedicineInsuranceType(order_info[i].chrgitm_lv)
307
+            }
308
+            console.log("order_info32323232323232233232323232",order_info)
309
+            this.order_info_list = order_info
310
+            var prescription = response.data.data.prescription
311
+          
312
+            this.setMonthPrescription(prescription)
313
+            this.balanceAccountsType = response.data.data.balanceAccountsType
314
+
315
+            this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
213 316
             if(order_info!=undefined&&order_info ==null){
214 317
                this.list = []
215 318
                return
@@ -217,6 +320,14 @@ export default {
217 320
             this.his_patient = response.data.data.his_patient
218 321
             this.hisDepatment = response.data.data.hisDepatment
219 322
             this.list = []
323
+            this.westernMedicineCostTotal = response.data.data.westernMedicineCostTotal
324
+            this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
325
+            this.checkCostTotal = response.data.data.checkCostTotal
326
+            this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
327
+            this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
328
+            this.bedCostTotal = response.data.data.bedCostTotal
329
+            this.otherCostTotal = response.data.data.otherCostTotal
330
+            this.materialCostTotal = response.data.data.materialCostTotal
220 331
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
221 332
               //获取所有项目类型进行去重
222 333
               let med_chrgitm_types = []
@@ -230,7 +341,7 @@ export default {
230 341
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
231 342
 
232 343
               let tempOrderInfo = []
233
-              console.log("med_chrgitm_types3323232323232233",med_chrgitm_types)
344
+            
234 345
               for (let i = 0; i < med_chrgitm_types.length; i++) {
235 346
                 let obj = {
236 347
                   total: 0,
@@ -324,6 +435,7 @@ export default {
324 435
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
325 436
               let tempOrderInfo = []
326 437
               console.log("med_chrgitm_type323223322323233223",med_chrgitm_types)
438
+              console.log("order_info232322332323232322323",order_info)
327 439
               for (let i = 0; i < med_chrgitm_types.length; i++) {
328 440
                 let obj = {
329 441
                   total: 0,
@@ -335,9 +447,10 @@ export default {
335 447
                     tempDetails.push(order_info[b])
336 448
                   }
337 449
                 }
338
-                console.log("tempDetails2332323232",tempDetails)
450
+                console.log("tempDetails2332323232322323",tempDetails)
451
+              
339 452
                 obj.details = this.setNewData(tempDetails)
340
-                console.log("2332233232322323",obj.details)
453
+               
341 454
                 obj.total = this.getTotal(obj.details)
342 455
 
343 456
                 obj.details.push({
@@ -354,57 +467,7 @@ export default {
354 467
                   }
355 468
                  
356 469
                 }
357
-                console.log("list2323223232323",this.list)
358
-                var new_arr = []
359
-                if(this.keywords!=""){
360
-       
361
-                   for(let i=0;i<this.list.length;i++){
362
-                     if(this.list[i].is_total == 2){
363
-                        if(this.list[i].name.indexOf(this.keywords)>-1){
364
-                           new_arr.push(this.list[i])
365
-                       }
366
-                     }
367
-                   
368
-                  }
369
-                  var new_arr_two = []
370
-                  for(let i=0;i<tempDetails.length;i++){
371
-                    if(tempDetails[i].advice_id >0){
372
-                       tempDetails[i].name = tempDetails[i].advice.advice_name
373
-                    }
374
-                    if(tempDetails[i].project_id > 0){
375
-                       if(tempDetails[i].type == 2 ){
376
-                         tempDetails[i].name = tempDetails[i].project.project_name
377
-                       }
378
-                       if(tempDetails[i].type == 3){
379
-                         tempDetails[i].name = tempDetails[i].good_info.good_name
380
-                       }
381
-                    }
382
-                    if(tempDetails[i].name.indexOf(this.keywords) > -1){
383
-                       new_arr_two.push(tempDetails[i])
384
-                    }
385
-                  }
386
-                   this.list = []
387
-                
388
-                   
389
-                   this.list = new_arr
390
-                    obj.details = []
391
-                    obj.details = this.setNewData(new_arr_two)
392
-
393
-                    obj.total = this.getTotal(obj.details)
394
-                    obj.details.push({
395
-                      total: obj.total,
396
-                      is_total: 1,
397
-                    })
398
-                    for(let i=0;i<obj.details.length;i++){
399
-                       if(obj.details[i].is_total == 1){
400
-                          obj.details[i].index = "合计"
401
-                       }else{
402
-                         obj.details[i].index = i+1
403
-                       }
404
-                    }
405
-                    console.log("obj23323232323232323232",obj.details)
406
-                    this.list = obj.details
407
-                }
470
+               
408 471
              }
409 472
           }
410 473
         }
@@ -429,7 +492,7 @@ export default {
429 492
      return project_name
430 493
     },
431 494
     setNewData(details) {
432
-      // console.log("detail23332323232322332332322323232332",details)
495
+     
433 496
         let drug_ids = []
434 497
         let project_ids = []
435 498
 
@@ -683,15 +746,432 @@ export default {
683 746
      },
684 747
      toPrintInvoice(){
685 748
        this.$router.push({path:"/hisTool/gatherPrintInvoice?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords})
686
-     }
749
+     },
750
+     setMonthPrescription(month_prescriptions) {
751
+      let drug_month_prescriptions = {
752
+        advices: []
753
+      }
754
+      let drug_ids = []
755
+      let project_month_prescriptions = {
756
+        project: []
757
+
758
+      }
759
+      let project_ids = []
760
+
761
+      for (let i = 0; i < month_prescriptions.length; i++) {
762
+        if (month_prescriptions[i].type == 1) { //药品
763
+          for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
764
+            let obj = {
765
+              id: month_prescriptions[i].advices[a].drug_id,
766
+              price: month_prescriptions[i].advices[a].price
767
+
768
+            }
769
+            drug_ids.push(obj)
770
+            drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
771
+          }
772
+
773
+        } else if (month_prescriptions[i].type == 2) { //项目
774
+          for (let a = 0; a < month_prescriptions[i].project.length; a++) {
775
+            let obj = {
776
+              id: month_prescriptions[i].project[a].project_id,
777
+              price: month_prescriptions[i].project[a].price
778
+
779
+            }
780
+            project_ids.push(obj)
781
+            project_month_prescriptions.project.push(month_prescriptions[i].project[a])
782
+          }
783
+        }
784
+      }
785
+
786
+      drug_ids = this.unique(drug_ids)
787
+      project_ids= this.unique(project_ids)
788
+  
789
+      for (let i = 0; i < drug_ids.length; i++) {
790
+        let obj = {}
791
+        let count = 0
792
+        for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
793
+          if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
794
+            obj['advice_id'] = drug_month_prescriptions.advices[a].id
795
+            obj['name'] = drug_month_prescriptions.advices[a].advice_name
796
+            obj['statistical_classification'] = ''
797
+            obj['type'] = 1
798
+            obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
799
+            obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
800
+            obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
801
+            obj['day'] = drug_month_prescriptions.advices[a].day
802
+            obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
803
+            obj['remark'] = drug_month_prescriptions.advices[a].remark
804
+            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
805
+            obj['record_date'] = drug_month_prescriptions.advices[a].advice_date
806
+            obj['spec'] = drug_month_prescriptions.advices[a].drug.dose  + drug_month_prescriptions.advices[a].drug.dose_unit +"*" + drug_month_prescriptions.advices[a].drug.min_number + drug_month_prescriptions.advices[a].drug.min_unit + "/" + drug_month_prescriptions.advices[a].drug.max_unit
807
+            obj['is_total'] = 2
808
+            obj['chrgitm_lv'] =  drug_month_prescriptions.advices[a].drug.medical_insurance_level 
809
+            obj['unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
810
+            count = count + drug_month_prescriptions.advices[a].prescribing_number
811
+
812
+          }
813
+        }
814
+        obj['count'] = count
815
+        this.tableList.push(obj)
816
+      }
817
+
818
+      for (let i = 0; i < project_ids.length; i++) {
819
+        let obj = {}
820
+        let count = 0
821
+        for (let a = 0; a < project_month_prescriptions.project.length; a++) {
822
+          if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
823
+
824
+            if(project_month_prescriptions.project[a].type == 2){
825
+              obj['project_id'] = project_month_prescriptions.project[a].id
826
+              obj['name'] = project_month_prescriptions.project[a].project.project_name
827
+              obj['statistical_classification'] = ''
828
+              obj['project_type'] = 2
829
+              obj['spec'] =  project_month_prescriptions.project[a].project.project_name
830
+              obj['unit'] = project_month_prescriptions.project[a].unit
831
+              obj['chrgitm_lv'] =  project_month_prescriptions.project[a].project.medical_coverage
832
+            }else if (project_month_prescriptions.project[a].type == 3){
833
+              obj['project_id'] = project_month_prescriptions.project[a].id
834
+              obj['name'] = project_month_prescriptions.project[a].good_info.good_name
835
+              obj['statistical_classification'] = ''
836
+              obj['project_type'] = 3
837
+              obj['spec'] = project_month_prescriptions.project[a].good_info.specification_name
838
+              obj['unit'] = project_month_prescriptions.project[a].good_info.packing_unit
839
+              obj['chrgitm_lv'] =  project_month_prescriptions.project[a].good_info.medical_insurance_level
840
+            }
841
+            obj['single_dose'] = project_month_prescriptions.project[a].single_dose
842
+            obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
843
+            obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
844
+            obj['day'] = project_month_prescriptions.project[a].day
845
+            obj['single_dose_unit'] = project_month_prescriptions.project[a].unit
846
+            obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit
847
+           
848
+            count = count + parseFloat(project_month_prescriptions.project[a].count)
849
+            obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
850
+            obj['remark'] = project_month_prescriptions.project[a].remark
851
+            obj['type'] = 2
852
+            obj['record_date'] = project_month_prescriptions.project[a].record_date
853
+            obj['is_total'] = 2
854
+          }
855
+        }
856
+        obj['count'] = count
857
+        this.tableList.push(obj)
858
+
859
+      }
860
+      var objOne = {index:"合计",is_total:1,total:0}
861
+      objOne.total = this.getTotalPrice(this.tableList)
862
+      for(let i=0;i<this.tableList.length;i++){
863
+        this.tableList[i].index = i + 1
864
+      }
865
+      this.tableList.push(objOne)
866
+
867
+      console.log("hh2323323232322323233223",this.tableList)
868
+    },
869
+
870
+    getTotalPrice(val){
871
+      var total_price = 0
872
+      for(let i=0;i<val.length;i++){
873
+         total_price +=val[i].count * val[i].price
874
+      }
875
+      return total_price.toFixed(2)
876
+    },
877
+    getAdviceMedChrgintmType(name){
878
+      var med_chrgitm_type = ""
879
+      for(let i=0;i<this.order_info_list.length;i++){
880
+        if(name == this.order_info_list[i].advice.advice_name){
881
+          med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
882
+        }
883
+      }
884
+      return med_chrgitm_type
885
+    },
886
+    getProjectMedChrgintmType(project_id){
887
+      var med_chrgitm_type = ""
888
+      for(let i=0;i<this.order_info_list.length;i++){
889
+        if(project_id == this.order_info_list[i].project_id){
890
+          med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
891
+        }
892
+      }
893
+      return med_chrgitm_type
894
+    },
895
+    getChrgitmLv(value){
896
+      var name = ""
897
+      for(let i=0;i<this.medicalInsuranceLevelList.length;i++){
898
+        if(value == this.medicalInsuranceLevelList[i].value){
899
+           name = this.medicalInsuranceLevelList[i].name
900
+        }
901
+      }
902
+      return name
903
+    },
904
+    getAdviceMedChrgintmLv(advice_id){
905
+     var chrgitm_lv = ""
906
+      for(let i=0;i<this.order_info_list.length;i++){
907
+        if(advice_id == this.order_info_list[i].advice_id){
908
+          chrgitm_lv = this.order_info_list[i].chrgitm_lv
909
+        }
910
+      }
911
+      return chrgitm_lv
912
+    },
913
+    getProjectMedChrgintmLv(advice_id){
914
+     var chrgitm_lv = ""
915
+      for(let i=0;i<this.order_info_list.length;i++){
916
+        if(advice_id == this.order_info_list[i].advice_id){
917
+          chrgitm_lv = this.order_info_list[i].chrgitm_lv
918
+        }
919
+      }
920
+      return chrgitm_lv
921
+    },
922
+    getWesternMedicineCostTotal(){
923
+      var total_price = 0
924
+      for(let i=0;i<this.tableList.length;i++){
925
+         if(this.tableList[i].advice_id > 0){
926
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].name)
927
+         }
928
+         if(this.tableList[i].project_id > 0){
929
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
930
+         }
931
+         if(this.tableList[i].drug_type == "西药费"){
932
+            total_price += this.tableList[i].count * this.tableList[i].price
933
+         }
934
+      }
935
+      
936
+      return total_price.toFixed(2)
937
+    },
938
+    getChineseTraditionalMedicineCostTotal(){
939
+      var total_price = 0
940
+      for(let i=0;i<this.tableList.length;i++){
941
+         if(this.tableList[i].advice_id > 0){
942
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
943
+         }
944
+        if(this.tableList[i].project_id > 0){
945
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
946
+         }
947
+         if(this.tableList[i].drug_type == "中成药费"){
948
+            total_price += this.tableList[i].count * this.tableList[i].price
949
+         }
950
+      }
951
+      
952
+      return total_price.toFixed(2)
953
+    },
954
+    getChineseTotal(){
955
+      var total_price = 0
956
+      for(let i=0;i<this.tableList.length;i++){
957
+         if(this.tableList[i].advice_id > 0){
958
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
959
+         }
960
+        if(this.tableList[i].project_id > 0){
961
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
962
+         }
963
+         if(this.tableList[i].drug_type == "中草药"){
964
+            total_price += this.tableList[i].count * this.tableList[i].price
965
+         }
966
+      }
967
+      
968
+      return total_price.toFixed(2)
969
+    },
970
+    getCheckCostTotal(){
971
+      var total_price = 0
972
+      for(let i=0;i<this.tableList.length;i++){
973
+         if(this.tableList[i].advice_id > 0){
974
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
975
+         }
976
+        if(this.tableList.project_id > 0){
977
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
978
+         }
979
+         if(this.tableList[i].drug_type == "检查费"){
980
+            total_price += this.tableList[i].count * this.tableList[i].price
981
+         }
982
+      }
983
+      
984
+      return total_price.toFixed(2)
985
+    },
986
+    getOxygen(){
987
+      var total_price = 0
988
+      for(let i=0;i<this.tableList.length;i++){
989
+         if(this.tableList[i].advice_id > 0){
990
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
991
+         }
992
+        if(this.tableList[i].project_id > 0){
993
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
994
+         }
995
+         if(this.tableList[i].drug_type == "输氧费"){
996
+            total_price += this.tableList[i].count * this.tableList[i].price
997
+         }
998
+      }
999
+      
1000
+      return total_price.toFixed(2)
1001
+    },
1002
+    getOperation(){
1003
+      var total_price = 0
1004
+      for(let i=0;i<this.tableList.length;i++){
1005
+         if(this.tableList[i].advice_id > 0){
1006
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1007
+         }
1008
+        if(this.tableList.project_id > 0){
1009
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1010
+         }
1011
+         if(this.tableList[i].drug_type == "手术费"){
1012
+            total_price += this.tableList[i].count * this.tableList[i].price
1013
+         }
1014
+      }
1015
+      
1016
+      return total_price.toFixed(2)
1017
+    },
1018
+    getLaboratoryCostTotal(){
1019
+       var total_price = 0
1020
+      for(let i=0;i<this.tableList.length;i++){
1021
+         if(this.tableList[i].advice_id > 0){
1022
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1023
+         }
1024
+        if(this.tableList[i].project_id > 0){
1025
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1026
+         }
1027
+         console.log("化验23233223322323",this.tableList[i].drug_type)
1028
+         if(this.tableList[i].drug_type == "化验费"){
1029
+            total_price += this.tableList[i].count * this.tableList[i].price
1030
+         }
1031
+      }
1032
+      
1033
+      return total_price.toFixed(2)
1034
+    },
1035
+    getBlood(){
1036
+      var total_price = 0
1037
+      for(let i=0;i<this.tableList.length;i++){
1038
+         if(this.tableList[i].advice_id > 0){
1039
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1040
+         }
1041
+        if(this.tableList[i].project_id > 0){
1042
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1043
+         }
1044
+         if(this.tableList[i].drug_type == "输血费"){
1045
+            total_price += this.tableList[i].count * this.tableList[i].price
1046
+         }
1047
+      }
1048
+      
1049
+      return total_price.toFixed(2)
1050
+    },
1051
+    getZhenChaCostTotal(){
1052
+      var total_price = 0
1053
+      for(let i=0;i<this.tableList.length;i++){
1054
+         if(this.tableList[i].advice_id > 0){
1055
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1056
+         }
1057
+        if(this.tableList[i].project_id > 0){
1058
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1059
+         }
1060
+         if(this.tableList[i].drug_type == "诊察费"){
1061
+            total_price += this.tableList[i].count * this.tableList[i].price
1062
+         }
1063
+      }
1064
+      
1065
+      return total_price.toFixed(2) 
1066
+    },
1067
+    getTreatement(){
1068
+      var total_price = 0
1069
+      for(let i=0;i<this.tableList.length;i++){
1070
+         if(this.tableList[i].advice_id > 0){
1071
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1072
+         }
1073
+        if(this.tableList[i].project_id > 0){
1074
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1075
+         }
1076
+         
1077
+         if(this.tableList[i].drug_type == "治疗费"){
1078
+            total_price += this.tableList[i].count * this.tableList[i].price
1079
+         }
1080
+      }
1081
+      
1082
+      return total_price.toFixed(2) 
1083
+    },
1084
+    getNursing(){
1085
+      var total_price = 0
1086
+      for(let i=0;i<this.tableList.length;i++){
1087
+         if(this.tableList[i].advice_id > 0){
1088
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1089
+         }
1090
+        if(this.tableList[i].project_id > 0){
1091
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1092
+         }
1093
+         if(this.tableList[i].drug_type == "护理费"){
1094
+            total_price += this.tableList[i].count * this.tableList[i].price
1095
+         }
1096
+      }
1097
+      
1098
+      return total_price.toFixed(2) 
1099
+    },
1100
+    getBedCostTotal(){
1101
+      var total_price = 0
1102
+      for(let i=0;i<this.tableList.length;i++){
1103
+         if(this.tableList[i].advice_id > 0){
1104
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1105
+         }
1106
+        if(this.tableList[i].project_id > 0){
1107
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1108
+         }
1109
+         if(this.tableList[i].drug_type == "床位费"){
1110
+            total_price += this.tableList[i].count * this.tableList[i].price
1111
+         }
1112
+      }
1113
+      
1114
+      return total_price.toFixed(2)  
1115
+    },
1116
+    getAnesthesia(){
1117
+      var total_price = 0
1118
+      for(let i=0;i<this.tableList.length;i++){
1119
+         if(this.tableList[i].advice_id > 0){
1120
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1121
+         }
1122
+        if(this.tableList[i].project_id > 0){
1123
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1124
+         }
1125
+         if(this.tableList[i].drug_type == "麻醉费"){
1126
+            total_price += this.tableList[i].count * this.tableList[i].price
1127
+         }
1128
+      }
1129
+      
1130
+      return total_price.toFixed(2)  
1131
+    },
1132
+    getMaterialCostTotal(){
1133
+      var total_price = 0
1134
+      for(let i=0;i<this.tableList.length;i++){
1135
+         if(this.tableList[i].advice_id > 0){
1136
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1137
+         }
1138
+        if(this.tableList[i].project_id > 0){
1139
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1140
+         }
1141
+         if(this.tableList[i].drug_type == "材料费"){
1142
+            total_price += this.tableList[i].count * this.tableList[i].price
1143
+         }
1144
+      }
1145
+      
1146
+      return total_price.toFixed(2)  
1147
+    },
1148
+    getOtherCostTotal(){
1149
+      var total_price = 0
1150
+      for(let i=0;i<this.tableList.length;i++){
1151
+         if(this.tableList[i].advice_id > 0){
1152
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
1153
+         }
1154
+        if(this.tableList[i].project_id > 0){
1155
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1156
+         }
1157
+         if(this.tableList[i].drug_type == "其他费"){
1158
+            total_price += this.tableList[i].count * this.tableList[i].price
1159
+         }
1160
+      }
1161
+      
1162
+      return total_price.toFixed(2)  
1163
+    }
1164
+
687 1165
   },
688 1166
   created() {
1167
+    this.tableList = []
689 1168
     this.getGatherDetailList()
690 1169
 
691 1170
   },
692 1171
   watch:{
693 1172
     "patient_id":function(){
694 1173
       this.patient_id = this.patient_id
1174
+      this.tableList = []
695 1175
       this.getGatherDetailList()
696 1176
     }
697 1177
   }

+ 120 - 34
src/xt_pages/outpatientTool/detailPrint.vue ファイルの表示

@@ -11,16 +11,20 @@
11 11
         <div>患者姓名:{{ patient.name }}</div>
12 12
         <div>性别:{{ patient.gender == 1 ? "男" : "女" }}</div>
13 13
         <div>结算类别:{{ getType(his_patient.balance_accounts_type) }}</div>
14
-        <div style="min-width:300px;">发票号码:</div>
14
+        <div style="min-width:300px;">发票号码:{{order.fa_piao_number}}</div>
15 15
       </div>
16 16
       <div class="listInfo">
17
-        <div>住院/门诊号:</div>
17
+        <div>住院/门诊号:{{his_patient.number}}</div>
18 18
         <div>科室:{{ getDepartment(his_patient.departments) }}</div>
19 19
         <div style="min-width:350px;">就诊流水号:{{ his_patient.number }}</div>
20 20
       </div>
21 21
       <div class="listInfo">
22 22
         <div>总费用:{{ getAllPice() }}</div>
23
-        <div>个人支付:{{ getActPay() }}</div>
23
+        <div>个人支付:
24
+          <span v-if="this.$route.query.balance_accounts_type == 2">{{ getAllPice() }}</span>
25
+          <span v-if="this.$route.query.balance_accounts_type != 2">{{ getActPay() }}</span>
26
+
27
+        </div>
24 28
         <div>基金支付记账:{{ getFundPaySumamt() }}</div>
25 29
         <div style="min-width:300px;">补充医疗支付记账:{{ getHifesPay() }}</div>
26 30
       </div>
@@ -29,36 +33,37 @@
29 33
       </div>
30 34
       <table class="listTable" border="1">
31 35
         <tr style="height:45px">
32
-          <td style="width: 5%; text-align: center">序号</td>
33
-          <td style="width: 13%; text-align: center">处方日期</td>
34
-          <td style="width: 20%; text-align: center">费用编码</td>
35
-          <td style="width: 17%; text-align: center">项目名称</td>
36
-          <td style="width: 10%; text-align: center">规格</td>
37
-          <td style="width: 13%; text-align: center">数量</td>
38
-          <td style="width: 13%; text-align: center">单位</td>
39
-          <td style="width: 11%; text-align: center">单价(元)</td>
40
-          <td style="width: 10%; text-align: center">金额</td>
36
+          <td width="100" style="text-align: center">序号</td>
37
+          <td width="200" style="text-align: center">处方日期</td>
38
+          <td width="300" style="text-align: center">费用编码</td>
39
+          <td width="300" style="text-align: center">项目名称</td>
40
+          <td width="180" style="text-align: center">规格</td>
41
+          <td width="100" style="text-align: center">数量</td>
42
+          <td width="100" style="text-align: center">单位</td>
43
+          <td width="100" style="text-align: center">单价(元)</td>
44
+          <td width="150" style="text-align: center">金额</td>
41 45
         </tr>
42 46
         <tr v-for="(item, index) in tableData" :key="index">
43
-          <td style="width: 19%; text-align: center">{{ index + 1 }}</td>
44
-          <td style="width: 10%; text-align: center">
45
-            <span v-if="item.record_date > 0">{{
46
-              getTimes(item.record_date)
47
-            }}</span>
47
+          <td style="text-align: center">
48
+            <span v-if="item.is_total == 1">{{ index + 1 }}</span>
49
+            <span v-if="item.is_total == 2">合计</span>
50
+          </td>
51
+          <td style="text-align: center">
52
+            <span v-if="item.is_total == 1">{{getTimes(item.record_date)}}</span> 
48 53
           </td>
49
-          <td style="width: 31%; text-align: center">{{ item.number }}</td>
50
-          <td style="width: 14%; text-align: center">
54
+          <td width="80" style="text-align: center">{{ item.number }}</td>
55
+          <td style="text-align: center">
51 56
             <span v-if="item.advice_id > 0">{{ item.advice.advice_name }}</span>
52 57
             <span v-if="item.project_id > 0">
53 58
               <span v-if="item.project.type == 2">{{
54 59
                 item.project.project.project_name
55 60
               }}</span>
56 61
               <span v-if="item.project.type == 3"
57
-                >{item.project.good_info.good_name}}</span
62
+                >{{item.project.good_info.good_name}}</span
58 63
               >
59 64
             </span>
60 65
           </td>
61
-          <td style="width: 10%; text-align: center">
66
+          <td style="text-align: center">
62 67
             <span v-if="item.advice_id > 0"
63 68
               >{{ item.advice.drug.dose }}{{ item.advice.drug.dose_unit }}*{{
64 69
                 item.advice.drug.min_number
@@ -75,23 +80,24 @@
75 80
               }}</span>
76 81
             </span>
77 82
           </td>
78
-          <td style="width: 6%; text-align: center">
83
+          <td style="text-align: center">
79 84
             {{ item.cnt }}
80 85
           </td>
81
-           <td style="width: 6%; text-align: center">
86
+           <td style="text-align: center">
82 87
               <span v-if="item.advice_id > 0">{{item.advice.prescribing_number_unit}}</span>
83 88
               <span v-if="item.project_id > 0">
84 89
                 <span v-if="item.project.type == 2">{{item.project.project.unit}}</span>
85 90
                 <span v-if="item.project.type == 3">{{item.project.good_info.packing_unit}}</span>
86 91
               </span>
87 92
           </td>
88
-          <td style="width: 10%; text-align: center">
93
+          <td style="text-align: center">
89 94
             {{ item.pric }}
90 95
           </td>
91
-          <td style="width: 10%; text-align: center">
96
+          <td style="text-align: center">
92 97
             {{ item.total_price }}
93 98
           </td>
94 99
         </tr>
100
+
95 101
       </table>
96 102
     </div>
97 103
   </div>
@@ -119,6 +125,7 @@ export default {
119 125
         { value: 7, label: "合同" },
120 126
         { value: 8, label: "医保自费" },
121 127
       ],
128
+      order:{},
122 129
     };
123 130
   },
124 131
   methods: {
@@ -171,34 +178,39 @@ export default {
171 178
           this.patient = response.data.data.patient;
172 179
 
173 180
           this.his_patient = response.data.data.his_patient;
174
-         
181
+
175 182
 
176 183
           this.hisDepatment = response.data.data.hisDepatment;
177 184
 
185
+          this.order = response.data.data.order
178 186
           this.tableData = [];
179 187
           for (let i = 0; i < list.length; i++) {
180 188
             for (let j = 0; j < list[i].orders.length; j++) {
181 189
               for (let z = 0; z < list[i].orders[j].order_info.length; z++) {
182 190
                 list[i].orders[j].order_info[z].record_date =
183
-                  list[i].orders[j].settle_accounts_date;
191
+                list[i].orders[j].settle_accounts_date;
184 192
                 list[i].orders[j].order_info[z].number =
185
-                  list[i].orders[j].number;
193
+                list[i].orders[j].number;
186 194
                 this.tableData.push(list[i].orders[j].order_info[z]);
187 195
               }
188 196
             }
189 197
           }
190
-          var obj = { index: "合计", total_price: 0, record_date: "0" };
198
+          var obj = { index: "合计", total_price: 0, record_date: "0",is_total:2 };
191 199
           for (let i = 0; i < this.tableData.length; i++) {
192 200
             this.tableData[i].index = i + 1;
193 201
             this.tableData[i].total_price = 0;
202
+            this.tableData[i].is_total = 1
194 203
             this.tableData[i].total_price = (
195
-              this.tableData[i].cnt * this.tableData[i].pric
196
-            ).toFixed(2);
204
+            this.tableData[i].cnt * this.tableData[i].pric).toFixed(2);
197 205
             obj.total_price += this.tableData[i].cnt * this.tableData[i].pric;
198 206
           }
199 207
           obj.total_price = obj.total_price.toFixed(2);
200 208
           this.tableData.push(obj);
209
+
210
+
211
+          console.log("表哥233232323232233232322323",this.tableData)
201 212
           if (this.$route.query.keyword != "") {
213
+            var new_arr = []
202 214
             for (let i = 0; i < this.tableData.length; i++) {
203 215
               if (this.tableData[i].index != "合计") {
204 216
                 if (this.tableData[i].advice_id > 0) {
@@ -232,12 +244,79 @@ export default {
232 244
                 }
233 245
               }
234 246
             }
235
-            if (this.$route.query.keyword != "") {
236
-              this.tableData.push(obj);
247
+            var objs = {index:"合计",total_price:0,record_date:"0",is_total:2}
248
+            for(let i=0;i<new_arr.length;i++){
249
+               new_arr[i].is_total = 1
237 250
             }
251
+            objs.total_price = this.getPrice(new_arr)
252
+            new_arr.push(objs)
238 253
             this.tableData = new_arr;
254
+            console.log("表哥2333333333333333333333333333",this.tableData)
255
+          }
256
+
257
+          if(this.$route.query.id == 1){
258
+              var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
259
+              var new_arr = []
260
+              for(let i=0;i<this.tableData.length;i++){
261
+                if(this.tableData[i].index!="合计"){
262
+                  if(this.tableData[i].advice_id > 0){
263
+                    new_arr.push(this.tableData[i])
264
+                  }
265
+                }
266
+              }
267
+              this.tableData = []
268
+              obj.total_price = this.getPrice(new_arr)
269
+              for(let i=0;i<new_arr.length;i++){
270
+                new_arr[i].is_total = 1
271
+              }
272
+              new_arr.push(obj)
273
+              this.tableData = new_arr
274
+           }
275
+          if(this.$route.query.id == 2){
276
+            var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
277
+            var new_arr = []
278
+            for(let i=0;i<this.tableData.length;i++){
279
+              if(this.tableData[i].index!="合计"){
280
+                if(this.tableData[i].project_id > 0){
281
+                  if(this.tableData[i].project.type ==2){
282
+                    new_arr.push(this.tableData[i])
283
+                  }
284
+                }
285
+              }
286
+            }
287
+            console.log("项目new_arr",new_arr)
288
+            this.tableData = []
289
+            obj.total_price = this.getPrice(new_arr)
290
+            console.log("ar3233223232",new_arr)
291
+            for(let i=0;i<new_arr.length;i++){
292
+              new_arr[i].is_total = 1
293
+            }
294
+            new_arr.push(obj)
295
+            this.tableData = new_arr
296
+            }
297
+
298
+          if(this.$route.query.id == 3){
299
+            var new_arr = []
300
+            var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
301
+            for(let i=0;i<this.tableData.length;i++){
302
+              if(this.tableData[i].index!="合计"){
303
+                if(this.tableData[i].project_id > 0){
304
+                  if(this.tableData[i].project.type == 3){
305
+                    new_arr.push(this.tableData[i])
306
+                  }
307
+                }
308
+              }
309
+            }
310
+            this.tableData = []
311
+            obj.total_price = this.getPrice(new_arr)
312
+            for(let i=0;i<new_arr.length;i++){
313
+              new_arr[i].is_total = 1
314
+            }
315
+            new_arr.push(obj)
316
+            console.log("new_arr2332323232",new_arr)
317
+            this.tableData = new_arr
239 318
           }
240
-          console.log("tabledata32233223323232", this.tableData);
319
+
241 320
         }
242 321
       });
243 322
     },
@@ -305,6 +384,13 @@ export default {
305 384
       }
306 385
       return name;
307 386
     },
387
+    getPrice(val){
388
+      var total_price = 0
389
+      for(let i=0;i<val.length;i++){
390
+         total_price += val[i].cnt * val[i].pric
391
+      }
392
+      return total_price.toFixed(2)
393
+    }
308 394
   },
309 395
   created() {
310 396
     this.getHisSummaryDetailList();

+ 532 - 178
src/xt_pages/outpatientTool/gatherPrint.vue ファイルの表示

@@ -4,7 +4,7 @@
4 4
       <el-button type="primary" @click="printtpage">打印</el-button>
5 5
     </div>
6 6
         <div id="list-print" class="list-print">
7
-        <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用清单</div>
7
+        <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用汇总</div>
8 8
          <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 10px;">
9 9
             <div>医疗机构名称:{{$store.getters.xt_user.org.org_name}}</div>
10 10
         </div>
@@ -17,67 +17,84 @@
17 17
          <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 20px;">
18 18
             <div>预交款:</div>
19 19
             <div>总费用:{{getAllPice()}}</div>
20
-            <div>门诊日期:</div>
20
+            <div>门诊日期:{{this.$route.query.end_time}}</div>
21 21
         </div>
22 22
         <div class="listInfo">
23
-            <div>西药:</div>
24
-            <div>中成药:{{chineseTraditionalMedicineCostTotal}}</div>
25
-            <div>中草药:</div>
23
+            <div>西药:{{getWesternMedicineCostTotal()}}</div>
24
+            <div>中成药:{{getChineseTraditionalMedicineCostTotal()}}</div>
25
+            <div>中草药:{{getChineseTotal()}}</div>
26 26
         </div>
27 27
         <div class="listInfo">
28
-            <div>检查费:{{checkCostTotal}}</div>
29
-            <div>输氧费:</div>
30
-            <div>手术费:</div>
28
+            <div>检查费:{{getCheckCostTotal()}}</div>
29
+            <div>输氧费:{{getOxygen()}}</div>
30
+            <div>手术费:{{getOperation()}}</div>
31 31
         </div>
32 32
         <div class="listInfo">
33
-            <div>化验费:{{laboratoryCostTotal}}</div>
34
-            <div>输血费:</div>
35
-            <div>诊断费:{{zhenChaCostTotal}}</div>
33
+            <div>化验费:{{getLaboratoryCostTotal()}}</div>
34
+            <div>输血费:{{getBlood()}}</div>
35
+            <div>诊断费:{{getZhenChaCostTotal()}}</div>
36 36
         </div>
37 37
          <div class="listInfo">
38
-            <div>治疗费:</div>
39
-            <div>护理费:</div>
40
-            <div>床位费:{{bedCostTotal}}</div>
38
+            <div>治疗费:{{getTreatement()}}</div>
39
+            <div>护理费:{{getNursing()}}</div>
40
+            <div>床位费:{{getBedCostTotal()}}</div>
41 41
         </div>
42 42
         <div class="listInfo" style="margin-bottom: 20px;">
43
-            <div>麻醉费:</div>
44
-            <div>材料费:{{materialCostTotal}}</div>
45
-            <div>其他:{{otherCostTotal}}</div>
43
+            <div>麻醉费:{{getAnesthesia()}}</div>
44
+            <div>材料费:{{getMaterialCostTotal()}}</div>
45
+            <div>其他:{{getOtherCostTotal()}}</div>
46 46
         </div>
47 47
         <table class="listTable" border="1">
48 48
             <tr>
49
-                <td style="width:14%;text-align:center" >费用分类</td>
50
-                <td style="width:22%;text-align:center">项目名称</td>
51
-                <td style="width:15%;text-align:center">规格</td>
52
-                <td style="width:9%;text-align:center">单价</td>
53
-                <td style="width:10%;text-align:center" >数量</td>
54
-                <td style="width:10%;text-align:center">金额</td>
55
-                <td style="width:10%;text-align:center" >医保类型</td>
49
+                <td style="text-align:center" >费用分类</td>
50
+                <td style="text-align:center">项目名称</td>
51
+                <td style="text-align:center">规格</td>
52
+                <td style="text-align:center">单价</td>
53
+                <td style="text-align:center" >数量</td>
54
+                <td style="text-align:center">金额</td>
55
+                <td style="text-align:center" >医保类型</td>
56 56
             </tr>
57
-            <tr v-for="(item, index) in list" :key="index">
58
-                <td style="width:19%;text-align:center" >
59
-                 {{ item.med_chrgitm_type }}
57
+            <tr v-for="(item, index) in tableList" :key="index">
58
+                <td style="text-align:center" >
59
+                  <span v-if="item.type == 1">
60
+                    {{getAdviceMedChrgintmType(item.name)}}
61
+                  </span>
62
+                   <span v-if="item.type == 2">
63
+                    {{getProjectMedChrgintmType(item.project_id)}}
64
+                   </span>
65
+                    <span v-if="item.type == 3">
66
+                        {{getProjectMedChrgintmType(item.project_id)}}
67
+                    </span>
60 68
                 </td>
61
-                <td style="width:10%;text-align:center" >
69
+                <td style="text-align:center" >
62 70
                   <span>{{item.name}}</span>  
63 71
                 </td>
64
-                <td style="width:31%;text-align:center" >
72
+                <td style="text-align:center" >
65 73
                   {{ item.spec }}
66 74
                 </td>
67
-                <td style="width:14%;text-align:center" >
75
+                <td style="text-align:center" >
68 76
                   {{item.price}}  
69 77
                 </td>
70
-                <td style="width:10%;text-align:center" >
78
+                <td style="text-align:center" >
71 79
                    {{item.count }}{{item.unit }}
72 80
                 </td>
73
-                <td style="width:6%;text-align:center" >
74
-                    <span v-if="item.is_total == 1">{{item.total}}</span>  
75
-                    <span v-if="item.is_total == 2">{{(item.price * item.count).toFixed(2) }}</span>  
81
+                <td style="text-align:center" >
82
+                   <span v-if="item.is_total == 1">{{ item.total }}</span>  
83
+                   <span v-if="item.is_total == 2">{{ (item.price * item.count).toFixed(2) }}</span> 
76 84
                 </td>
77
-                <td style="width:10%;text-align:center" >
78
-                  <span v-if="item.chrgitm_lv== '01'">甲类</span>
79
-                  <span v-if="item.chrgitm_lv== '02'">乙类</span>
80
-                  <span v-if="item.chrgitm_lv== '03'">自费</span>
85
+                <td style="text-align:center" >
86
+                     <span v-if="balanceAccountsType == 2">{{getChrgitmLv(item.chrgitm_lv)}}</span>
87
+                      <span v-if="balanceAccountsType != 2">
88
+                        <span v-if="item.type == 1">
89
+                            {{getAdviceMedChrgintmLv(item.advice_id)}}
90
+                        </span>
91
+                        <span v-if="item.type == 2">
92
+                          {{getProjectMedChrgintmLv(item.project_id)}}
93
+                        </span>
94
+                        <span v-if="item.type == 3">
95
+                            {{getProjectMedChrgintmLv(item.project_id)}}
96
+                        </span>
97
+                      </span>
81 98
                 </td>
82 99
             </tr>
83 100
         </table>
@@ -106,6 +123,10 @@
106 123
           operationCostTotal:"",//材料费
107 124
           zhenChaCostTotal:"",//诊查费
108 125
           otherCostTotal:"",//其他费用
126
+          tableList:[],
127
+          order_info_list:[],
128
+          balanceAccountsType:0,
129
+          medicalInsuranceLevelList:[],
109 130
         }
110 131
     },
111 132
     methods:{
@@ -138,15 +159,14 @@
138 159
       getTimes(time) {
139 160
         return uParseTime(time, '{y}-{m}-{d}')
140 161
       },
141
-    getGatherDetailList() {
142
-      let start_time = this.$route.query.start_time
143
-      let end_time = this.$route.query.end_time
162
+     getGatherDetailList() {
163
+      
144 164
       let params = {
145 165
         patient_id:this.$route.query.patient_id,
146
-        start_time: start_time,
147
-        end_time: end_time,
148
-        type: this.$route.query.type,
149
-        keyword: this.$route.query.keyword,
166
+        start_time: this.$route.query.start_time,
167
+        end_time: this.$route.query.end_time,
168
+        type:this.$route.query.type,
169
+        keyword: this.$route.query.keyword
150 170
       }
151 171
      getGatherDetailList(params).then(response=>{
152 172
           if (response.data.state == 0) {
@@ -154,14 +174,39 @@
154 174
             return false
155 175
           } else {
156 176
             this.order = response.data.data.order
157
-          
158 177
             this.patient = response.data.data.patient
159 178
             this.admin = response.data.data.admin_info
160 179
             this.his_hospital = response.data.data.his_hospital
180
+
161 181
             var order_info = response.data.data.order_info
182
+           
183
+            for(let i=0;i<order_info.length;i++){
184
+              order_info[i].med_chrgitm_type = this.getType(order_info[i].med_chrgitm_type)
185
+              order_info[i].chrgitm_lv  = this.getMedicineInsuranceType(order_info[i].chrgitm_lv)
186
+            }
187
+           
188
+            this.order_info_list = order_info
189
+            var prescription = response.data.data.prescription
190
+            console.log("prescription23323232323233232323232233233223",prescription)
191
+            this.setMonthPrescription(prescription)
192
+            this.balanceAccountsType = response.data.data.balanceAccountsType
193
+
194
+            this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
195
+            if(order_info!=undefined&&order_info ==null){
196
+               this.list = []
197
+               return
198
+            }
162 199
             this.his_patient = response.data.data.his_patient
163 200
             this.hisDepatment = response.data.data.hisDepatment
164
-            console.log("order_info2332332232332232323",order_info)
201
+            this.list = []
202
+            this.westernMedicineCostTotal = response.data.data.westernMedicineCostTotal
203
+            this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
204
+            this.checkCostTotal = response.data.data.checkCostTotal
205
+            this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
206
+            this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
207
+            this.bedCostTotal = response.data.data.bedCostTotal
208
+            this.otherCostTotal = response.data.data.otherCostTotal
209
+            this.materialCostTotal = response.data.data.materialCostTotal
165 210
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
166 211
               //获取所有项目类型进行去重
167 212
               let med_chrgitm_types = []
@@ -175,7 +220,7 @@
175 220
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
176 221
 
177 222
               let tempOrderInfo = []
178
-
223
+            
179 224
               for (let i = 0; i < med_chrgitm_types.length; i++) {
180 225
                 let obj = {
181 226
                   total: 0,
@@ -189,82 +234,29 @@
189 234
                   }
190 235
                 }
191 236
                 obj.details = this.setNewData(tempDetails)
192
-               
237
+                this.list = []
193 238
                 this.list =  this.list.concat(obj.details)
194 239
                 for(let i=0;i<this.list.length;i++){
195
-                  this.list[i].index = i
240
+                  if(this.list[i].is_total == 1){
241
+                     this.list[i].index = "合计"
242
+                  }else{
243
+                    this.list[i].index = i+1
244
+                  }
245
+                 
196 246
                 }
197 247
               }
198 248
               let newobj = {}
199 249
               newobj['total'] = this.order.medfee_sumamt
200 250
               newobj['is_total'] = 1
201
-              
251
+              this.list = []
202 252
               this.list.push(newobj)
203
-
204
-              var new_arr = []
205
-              if(this.$route.query.keyword!=""){
206
-       
207
-                   for(let i=0;i<this.list.length;i++){
208
-                     if(this.list[i].is_total == 2){
209
-                        if(this.list[i].name.indexOf(this.$route.query.keyword)>-1){
210
-                           new_arr.push(this.list[i])
211
-                       }
212
-                     }
213
-                   
214
-                  }
215
-                  var new_arr_two = []
216
-                  for(let i=0;i<tempDetails.length;i++){
217
-                    if(tempDetails[i].advice_id >0){
218
-                       tempDetails[i].name = tempDetails[i].advice.advice_name
219
-                    }
220
-                    if(tempDetails[i].project_id > 0){
221
-                       if(tempDetails[i].type == 2 ){
222
-                         tempDetails[i].name = tempDetails[i].project.project_name
223
-                       }
224
-                       if(tempDetails[i].type == 3){
225
-                         tempDetails[i].name = tempDetails[i].good_info.good_name
226
-                       }
227
-                    }
228
-                    if(tempDetails[i].name.indexOf(this.$route.query.keyword) > -1){
229
-                       new_arr_two.push(tempDetails[i])
230
-                    }
231
-                  }
232
-                   this.list = []
233
-                
234
-                   
235
-                   this.list = new_arr
236
-                    obj.details = []
237
-                    obj.details = this.setNewData(new_arr_two)
238
-
239
-                    obj.total = this.getTotal(obj.details)
240
-                    obj.details.push({
241
-                      total: obj.total,
242
-                      is_total: 1,
243
-                    })
244
-                    for(let i=0;i<obj.details.length;i++){
245
-                       if(obj.details[i].is_total == 1){
246
-                          obj.details[i].index = "合计"
247
-                       }else{
248
-                         obj.details[i].index = i+1
249
-                       }
250
-                    }
251
-                 
252
-                    this.list = obj.details
253
-                    this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
254
-                    this.checkCostTotal = response.data.data.checkCostTotal
255
-                    this.materialCostTotal = response.data.data.materialCostTotal
256
-                    this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
257
-                    this.bedCostTotal = response.data.data.bedCostTotal
258
-                    this.operationCostTotal = response.data.data.operationCostTotal
259
-                    this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
260
-                    this.otherCostTotal = response.data.data.otherCostTotal
261
-
262
-                }
263 253
             }else{
264 254
               //获取所有项目类型进行去重
265 255
               let med_chrgitm_types = []
266
-              for (let i = 0; i < order_info.length; i++) {
267
-                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
256
+              if(order_info!=undefined && order_info.length > 0){
257
+                for (let i = 0; i < order_info.length; i++) {
258
+                 med_chrgitm_types.push(order_info[i].med_chrgitm_type)
259
+               }
268 260
               }
269 261
              
270 262
               const obj = {}
@@ -273,6 +265,7 @@
273 265
                 return cur
274 266
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
275 267
               let tempOrderInfo = []
268
+             
276 269
               for (let i = 0; i < med_chrgitm_types.length; i++) {
277 270
                 let obj = {
278 271
                   total: 0,
@@ -286,78 +279,24 @@
286 279
                 }
287 280
                 
288 281
                 obj.details = this.setNewData(tempDetails)
289
-
282
+               
290 283
                 obj.total = this.getTotal(obj.details)
284
+
291 285
                 obj.details.push({
292 286
                   total: obj.total,
293 287
                   is_total: 1,
294 288
                 })
295
-               
289
+                this.list = []
296 290
                 this.list =  this.list.concat(obj.details)
297
-              
298 291
                 for(let i=0;i<this.list.length;i++){
299
-                  this.list[i].index = i+1
300
-                }
301
-              var new_arr = []
302
-              if(this.$route.query.keyword!=""){
303
-                console.log("锦鲤3332232332233223322332",this.list)
304
-                for(let i=0;i<this.list.length;i++){
305
-                     if(this.list[i].is_total == 2){
306
-                        if(this.list[i].name.indexOf(this.$route.query.keyword)>-1){
307
-                           new_arr.push(this.list[i])
308
-                       }
309
-                     }
310
-                   
311
-                  }
312
-                  var new_arr_two = []
313
-                  for(let i=0;i<tempDetails.length;i++){
314
-                    if(tempDetails[i].advice_id >0){
315
-                       tempDetails[i].name = tempDetails[i].advice.advice_name
316
-                    }
317
-                    if(tempDetails[i].project_id > 0){
318
-                       if(tempDetails[i].type == 2 ){
319
-                         tempDetails[i].name = tempDetails[i].project.project_name
320
-                       }
321
-                       if(tempDetails[i].type == 3){
322
-                         tempDetails[i].name = tempDetails[i].good_info.good_name
323
-                       }
324
-                    }
325
-                    if(tempDetails[i].name.indexOf(this.$route.query.keyword) > -1){
326
-                       new_arr_two.push(tempDetails[i])
327
-                    }
292
+                  if(this.list[i].is_total == 1){
293
+                     this.list[i].index = "合计"
294
+                  }else{
295
+                    this.list[i].index = i+1
328 296
                   }
329
-                  this.list = []
330
-                  console.log("new_arr2323232333333232",new_arr)
331
-                   
332
-                   this.list = new_arr
333
-                    obj.details = []
334
-                    obj.details = this.setNewData(new_arr_two)
335
-
336
-                    obj.total = this.getTotal(obj.details)
337
-                    obj.details.push({
338
-                      total: obj.total,
339
-                      is_total: 1,
340
-                    })
341
-                    for(let i=0;i<obj.details.length;i++){
342
-                       if(obj.details[i].is_total == 1){
343
-                          obj.details[i].index = "合计"
344
-                       }else{
345
-                         obj.details[i].index = i+1
346
-                       }
347
-                    }
348
-                    console.log("obj23323232323232323232",obj.details)
349
-                    this.list = obj.details
350
-              }
351
-                this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
352
-                this.checkCostTotal = response.data.data.checkCostTotal
353
-                this.materialCostTotal = response.data.data.materialCostTotal
354
-                this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
355
-                this.bedCostTotal = response.data.data.bedCostTotal
356
-                this.operationCostTotal = response.data.data.operationCostTotal
357
-                this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
358
-                this.otherCostTotal = response.data.data.otherCostTotal
359
-
360
-              
297
+                 
298
+                }
299
+               
361 300
              }
362 301
           }
363 302
         }
@@ -638,7 +577,7 @@
638 577
       return name
639 578
     },
640 579
     getAllPice(){
641
-      console.log("liust23322332323223",this.list)
580
+
642 581
       var total_price = 0
643 582
       for(let i=0;i<this.list.length;i++){
644 583
         if(this.list[i].is_total ==2){
@@ -651,6 +590,418 @@
651 590
         return total_price
652 591
       }
653 592
      
593
+    },
594
+    setMonthPrescription(month_prescriptions) {
595
+      let drug_month_prescriptions = {
596
+        advices: []
597
+      }
598
+      let drug_ids = []
599
+      let project_month_prescriptions = {
600
+        project: []
601
+
602
+      }
603
+      let project_ids = []
604
+
605
+      for (let i = 0; i < month_prescriptions.length; i++) {
606
+        if (month_prescriptions[i].type == 1) { //药品
607
+          for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
608
+            let obj = {
609
+              id: month_prescriptions[i].advices[a].drug_id,
610
+              price: month_prescriptions[i].advices[a].price
611
+
612
+            }
613
+            drug_ids.push(obj)
614
+            drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
615
+          }
616
+
617
+        } else if (month_prescriptions[i].type == 2) { //项目
618
+          for (let a = 0; a < month_prescriptions[i].project.length; a++) {
619
+            let obj = {
620
+              id: month_prescriptions[i].project[a].project_id,
621
+              price: month_prescriptions[i].project[a].price
622
+
623
+            }
624
+            project_ids.push(obj)
625
+            project_month_prescriptions.project.push(month_prescriptions[i].project[a])
626
+          }
627
+        }
628
+      }
629
+
630
+      drug_ids = this.unique(drug_ids)
631
+      project_ids= this.unique(project_ids)
632
+  
633
+      for (let i = 0; i < drug_ids.length; i++) {
634
+        let obj = {}
635
+        let count = 0
636
+        for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
637
+          if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
638
+            obj['advice_id'] = drug_month_prescriptions.advices[a].id
639
+            obj['name'] = drug_month_prescriptions.advices[a].advice_name
640
+            obj['statistical_classification'] = ''
641
+            obj['type'] = 1
642
+            obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
643
+            obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
644
+            obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
645
+            obj['day'] = drug_month_prescriptions.advices[a].day
646
+            obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
647
+            obj['remark'] = drug_month_prescriptions.advices[a].remark
648
+            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
649
+            obj['record_date'] = drug_month_prescriptions.advices[a].advice_date
650
+            obj['spec'] = drug_month_prescriptions.advices[a].drug.dose  + drug_month_prescriptions.advices[a].drug.dose_unit +"*" + drug_month_prescriptions.advices[a].drug.min_number + drug_month_prescriptions.advices[a].drug.min_unit + "/" + drug_month_prescriptions.advices[a].drug.max_unit
651
+            obj['is_total'] = 2
652
+            obj['chrgitm_lv'] =  drug_month_prescriptions.advices[a].drug.medical_insurance_level 
653
+            obj['unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
654
+            count = count + drug_month_prescriptions.advices[a].prescribing_number
655
+
656
+          }
657
+        }
658
+        obj['count'] = count
659
+        this.tableList.push(obj)
660
+      }
661
+
662
+      for (let i = 0; i < project_ids.length; i++) {
663
+        let obj = {}
664
+        let count = 0
665
+        for (let a = 0; a < project_month_prescriptions.project.length; a++) {
666
+          if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
667
+
668
+            if(project_month_prescriptions.project[a].type == 2){
669
+              obj['project_id'] = project_month_prescriptions.project[a].id
670
+              obj['name'] = project_month_prescriptions.project[a].project.project_name
671
+              obj['statistical_classification'] = ''
672
+              obj['project_type'] = 2
673
+              obj['spec'] =  project_month_prescriptions.project[a].project.project_name
674
+              obj['unit'] = project_month_prescriptions.project[a].unit
675
+              obj['chrgitm_lv'] =  project_month_prescriptions.project[a].project.medical_coverage
676
+            }else if (project_month_prescriptions.project[a].type == 3){
677
+              obj['project_id'] = project_month_prescriptions.project[a].id
678
+              obj['name'] = project_month_prescriptions.project[a].good_info.good_name
679
+              obj['statistical_classification'] = ''
680
+              obj['project_type'] = 3
681
+              obj['spec'] = project_month_prescriptions.project[a].good_info.specification_name
682
+              obj['unit'] = project_month_prescriptions.project[a].good_info.packing_unit
683
+              obj['chrgitm_lv'] =  project_month_prescriptions.project[a].good_info.medical_insurance_level
684
+            }
685
+            obj['single_dose'] = project_month_prescriptions.project[a].single_dose
686
+            obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
687
+            obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
688
+            obj['day'] = project_month_prescriptions.project[a].day
689
+            obj['single_dose_unit'] = project_month_prescriptions.project[a].unit
690
+            obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit
691
+           
692
+            count = count + parseFloat(project_month_prescriptions.project[a].count)
693
+            obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
694
+            obj['remark'] = project_month_prescriptions.project[a].remark
695
+            obj['type'] = 2
696
+            obj['record_date'] = project_month_prescriptions.project[a].record_date
697
+            obj['is_total'] = 2
698
+          }
699
+        }
700
+        obj['count'] = count
701
+        this.tableList.push(obj)
702
+
703
+      }
704
+      var objOne = {index:"合计",is_total:1,total:0}
705
+      objOne.total = this.getTotalPrice(this.tableList)
706
+      for(let i=0;i<this.tableList.length;i++){
707
+        this.tableList[i].index = i + 1
708
+      }
709
+       this.tableList.push(objOne)
710
+    },
711
+
712
+    getTotalPrice(val){
713
+      var total_price = 0
714
+      for(let i=0;i<val.length;i++){
715
+         total_price +=val[i].count * val[i].price
716
+      }
717
+      return total_price.toFixed(2)
718
+    },
719
+    getAdviceMedChrgintmType(name){
720
+      var med_chrgitm_type = ""
721
+      for(let i=0;i<this.order_info_list.length;i++){
722
+        if(name == this.order_info_list[i].advice.advice_name){
723
+          med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
724
+        }
725
+      }
726
+      return med_chrgitm_type
727
+    },
728
+    getProjectMedChrgintmType(project_id){
729
+      var med_chrgitm_type = ""
730
+      for(let i=0;i<this.order_info_list.length;i++){
731
+        if(project_id == this.order_info_list[i].project_id){
732
+          med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
733
+        }
734
+      }
735
+      return med_chrgitm_type
736
+    },
737
+    getChrgitmLv(value){
738
+      var name = ""
739
+      for(let i=0;i<this.medicalInsuranceLevelList.length;i++){
740
+        if(value == this.medicalInsuranceLevelList[i].value){
741
+           name = this.medicalInsuranceLevelList[i].name
742
+        }
743
+      }
744
+      return name
745
+    },
746
+    getAdviceMedChrgintmLv(advice_id){
747
+     var chrgitm_lv = ""
748
+      for(let i=0;i<this.order_info_list.length;i++){
749
+        if(advice_id == this.order_info_list[i].advice_id){
750
+          chrgitm_lv = this.order_info_list[i].chrgitm_lv
751
+        }
752
+      }
753
+      return chrgitm_lv
754
+    },
755
+    getProjectMedChrgintmLv(advice_id){
756
+     var chrgitm_lv = ""
757
+      for(let i=0;i<this.order_info_list.length;i++){
758
+        if(advice_id == this.order_info_list[i].advice_id){
759
+          chrgitm_lv = this.order_info_list[i].chrgitm_lv
760
+        }
761
+      }
762
+      return chrgitm_lv
763
+    },
764
+    getWesternMedicineCostTotal(){
765
+      var total_price = 0
766
+      for(let i=0;i<this.tableList.length;i++){
767
+         if(this.tableList[i].advice_id > 0){
768
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].name)
769
+         }
770
+         if(this.tableList[i].project_id > 0){
771
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
772
+         }
773
+         if(this.tableList[i].drug_type == "西药费"){
774
+            total_price += this.tableList[i].count * this.tableList[i].price
775
+         }
776
+      }
777
+      
778
+      return total_price.toFixed(2)
779
+    },
780
+    getChineseTraditionalMedicineCostTotal(){
781
+      var total_price = 0
782
+      for(let i=0;i<this.tableList.length;i++){
783
+         if(this.tableList[i].advice_id > 0){
784
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
785
+         }
786
+        if(this.tableList[i].project_id > 0){
787
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
788
+         }
789
+         if(this.tableList[i].drug_type == "中成药费"){
790
+            total_price += this.tableList[i].count * this.tableList[i].price
791
+         }
792
+      }
793
+      
794
+      return total_price.toFixed(2)
795
+    },
796
+    getChineseTotal(){
797
+      var total_price = 0
798
+      for(let i=0;i<this.tableList.length;i++){
799
+         if(this.tableList[i].advice_id > 0){
800
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
801
+         }
802
+        if(this.tableList[i].project_id > 0){
803
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
804
+         }
805
+         if(this.tableList[i].drug_type == "中草药"){
806
+            total_price += this.tableList[i].count * this.tableList[i].price
807
+         }
808
+      }
809
+      
810
+      return total_price.toFixed(2)
811
+    },
812
+    getCheckCostTotal(){
813
+      var total_price = 0
814
+      for(let i=0;i<this.tableList.length;i++){
815
+         if(this.tableList[i].advice_id > 0){
816
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
817
+         }
818
+        if(this.tableList.project_id > 0){
819
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
820
+         }
821
+         if(this.tableList[i].drug_type == "检查费"){
822
+            total_price += this.tableList[i].count * this.tableList[i].price
823
+         }
824
+      }
825
+      
826
+      return total_price.toFixed(2)
827
+    },
828
+    getOxygen(){
829
+      var total_price = 0
830
+      for(let i=0;i<this.tableList.length;i++){
831
+         if(this.tableList[i].advice_id > 0){
832
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
833
+         }
834
+        if(this.tableList[i].project_id > 0){
835
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
836
+         }
837
+         if(this.tableList[i].drug_type == "输氧费"){
838
+            total_price += this.tableList[i].count * this.tableList[i].price
839
+         }
840
+      }
841
+      
842
+      return total_price.toFixed(2)
843
+    },
844
+    getOperation(){
845
+      var total_price = 0
846
+      for(let i=0;i<this.tableList.length;i++){
847
+         if(this.tableList[i].advice_id > 0){
848
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
849
+         }
850
+        if(this.tableList.project_id > 0){
851
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
852
+         }
853
+         if(this.tableList[i].drug_type == "手术费"){
854
+            total_price += this.tableList[i].count * this.tableList[i].price
855
+         }
856
+      }
857
+      
858
+      return total_price.toFixed(2)
859
+    },
860
+    getLaboratoryCostTotal(){
861
+       var total_price = 0
862
+      for(let i=0;i<this.tableList.length;i++){
863
+         if(this.tableList[i].advice_id > 0){
864
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
865
+         }
866
+        if(this.tableList[i].project_id > 0){
867
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
868
+         }
869
+         console.log("化验23233223322323",this.tableList[i].drug_type)
870
+         if(this.tableList[i].drug_type == "化验费"){
871
+            total_price += this.tableList[i].count * this.tableList[i].price
872
+         }
873
+      }
874
+      
875
+      return total_price.toFixed(2)
876
+    },
877
+    getBlood(){
878
+      var total_price = 0
879
+      for(let i=0;i<this.tableList.length;i++){
880
+         if(this.tableList[i].advice_id > 0){
881
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
882
+         }
883
+        if(this.tableList[i].project_id > 0){
884
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
885
+         }
886
+         if(this.tableList[i].drug_type == "输血费"){
887
+            total_price += this.tableList[i].count * this.tableList[i].price
888
+         }
889
+      }
890
+      
891
+      return total_price.toFixed(2)
892
+    },
893
+    getZhenChaCostTotal(){
894
+      var total_price = 0
895
+      for(let i=0;i<this.tableList.length;i++){
896
+         if(this.tableList[i].advice_id > 0){
897
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
898
+         }
899
+        if(this.tableList[i].project_id > 0){
900
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
901
+         }
902
+         if(this.tableList[i].drug_type == "诊察费"){
903
+            total_price += this.tableList[i].count * this.tableList[i].price
904
+         }
905
+      }
906
+      
907
+      return total_price.toFixed(2) 
908
+    },
909
+    getTreatement(){
910
+      var total_price = 0
911
+      for(let i=0;i<this.tableList.length;i++){
912
+         if(this.tableList[i].advice_id > 0){
913
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
914
+         }
915
+        if(this.tableList[i].project_id > 0){
916
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
917
+         }
918
+         
919
+         if(this.tableList[i].drug_type == "治疗费"){
920
+            total_price += this.tableList[i].count * this.tableList[i].price
921
+         }
922
+      }
923
+      
924
+      return total_price.toFixed(2) 
925
+    },
926
+    getNursing(){
927
+      var total_price = 0
928
+      for(let i=0;i<this.tableList.length;i++){
929
+         if(this.tableList[i].advice_id > 0){
930
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
931
+         }
932
+        if(this.tableList[i].project_id > 0){
933
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
934
+         }
935
+         if(this.tableList[i].drug_type == "护理费"){
936
+            total_price += this.tableList[i].count * this.tableList[i].price
937
+         }
938
+      }
939
+      
940
+      return total_price.toFixed(2) 
941
+    },
942
+    getBedCostTotal(){
943
+      var total_price = 0
944
+      for(let i=0;i<this.tableList.length;i++){
945
+         if(this.tableList[i].advice_id > 0){
946
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
947
+         }
948
+        if(this.tableList[i].project_id > 0){
949
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
950
+         }
951
+         if(this.tableList[i].drug_type == "床位费"){
952
+            total_price += this.tableList[i].count * this.tableList[i].price
953
+         }
954
+      }
955
+      
956
+      return total_price.toFixed(2)  
957
+    },
958
+    getAnesthesia(){
959
+      var total_price = 0
960
+      for(let i=0;i<this.tableList.length;i++){
961
+         if(this.tableList[i].advice_id > 0){
962
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
963
+         }
964
+        if(this.tableList[i].project_id > 0){
965
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
966
+         }
967
+         if(this.tableList[i].drug_type == "麻醉费"){
968
+            total_price += this.tableList[i].count * this.tableList[i].price
969
+         }
970
+      }
971
+      
972
+      return total_price.toFixed(2)  
973
+    },
974
+    getMaterialCostTotal(){
975
+      var total_price = 0
976
+      for(let i=0;i<this.tableList.length;i++){
977
+         if(this.tableList[i].advice_id > 0){
978
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
979
+         }
980
+        if(this.tableList[i].project_id > 0){
981
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
982
+         }
983
+         if(this.tableList[i].drug_type == "材料费"){
984
+            total_price += this.tableList[i].count * this.tableList[i].price
985
+         }
986
+      }
987
+      
988
+      return total_price.toFixed(2)  
989
+    },
990
+    getOtherCostTotal(){
991
+      var total_price = 0
992
+      for(let i=0;i<this.tableList.length;i++){
993
+         if(this.tableList[i].advice_id > 0){
994
+           this.tableList[i].drug_type = this.getAdviceMedChrgintmType(this.tableList[i].advice_id)
995
+         }
996
+        if(this.tableList[i].project_id > 0){
997
+           this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
998
+         }
999
+         if(this.tableList[i].drug_type == "其他费"){
1000
+            total_price += this.tableList[i].count * this.tableList[i].price
1001
+         }
1002
+      }
1003
+      
1004
+      return total_price.toFixed(2)  
654 1005
     }
655 1006
     },
656 1007
     created(){
@@ -681,6 +1032,9 @@
681 1032
     font-size: 16px;
682 1033
     justify-content: space-between;
683 1034
     margin: 10px 0;
1035
+    div{
1036
+      width: 200px;
1037
+    }
684 1038
 }
685 1039
 .listTable{
686 1040
     width: 100%;

File diff suppressed because it is too large
+ 753 - 163
src/xt_pages/outpatientTool/gatherPrintInvoice.vue