see999 3 years ago
parent
commit
0cd2026682

+ 42 - 4
src/xt_pages/outpatientCharges/newStatementPrintTwo.vue View File

@@ -16,7 +16,7 @@
16 16
             <!--<printOne :info="info"></printOne>-->
17 17
 
18 18
             <print-one v-if="org_id != 10138" :info="info"></print-one>
19
-            <print-two v-else  :info="info" :paramsObj="paramsObj"></print-two>
19
+            <print-two v-else :info="info" :paramsObj="paramsObj" :balanceAccounts="balanceAccounts"></print-two>
20 20
         </div>
21 21
     </div>
22 22
 </template>
@@ -63,7 +63,8 @@
63 63
         prescription_id:0,
64 64
         ids:'',
65 65
         info:null,
66
-        org_id:''
66
+        org_id:'',
67
+        balanceAccounts:{}
67 68
       };
68 69
     },
69 70
     methods:{
@@ -125,8 +126,44 @@
125 126
 
126 127
               return false
127 128
             } else {
128
-              console.log(response.data.data)
129
-
129
+              
130
+              this.balanceAccounts = response.data.data
131
+              let arr = []
132
+              let obj = {
133
+                type:1,
134
+                details: [],
135
+                total: 0
136
+              }
137
+              let obj2 = {
138
+                type:2,
139
+                details: [],
140
+                total: 0
141
+              }
142
+              let obj3 = {
143
+                type:3,
144
+                details: [],
145
+                total: 0
146
+              }
147
+              this.balanceAccounts.order_info.map(item => {
148
+                
149
+                if(item.advice_id > 0){
150
+                  obj.details.push(item)
151
+                  obj.total += (item.pric * item.advice.prescribing_number)
152
+                }else{
153
+                  if(item.project.type == 2){
154
+                    obj2.details.push(item)
155
+                    obj2.total += (item.pric * item.project.count)
156
+                  }else{
157
+                    obj3.details.push(item)
158
+                    obj3.total += (item.pric * item.project.count)
159
+                  }
160
+                }
161
+              })
162
+              this.balanceAccounts.new_detail_list = []
163
+              this.balanceAccounts.new_detail_list.push(obj)
164
+              this.balanceAccounts.new_detail_list.push(obj2)
165
+              this.balanceAccounts.new_detail_list.push(obj3)
166
+              console.log(111,this.balanceAccounts)
130 167
             }
131 168
           })
132 169
 
@@ -261,6 +298,7 @@
261 298
 
262 299
     created() {
263 300
       this.org_id = this.$store.getters.xt_user.org_id
301
+      
264 302
       this.getInfo(this.paramsObj)
265 303
     },
266 304
     watch:{

+ 118 - 3
src/xt_pages/outpatientCharges/newTreatTemplate/printTwo.vue View File

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
     <div>
3
-        <div id='prescription-print' class="prescription-print" style="position: relative;">
3
+        <div v-if="paramsObj.balance_accounts_type != 2" id='prescription-print' class="prescription-print" style="position: relative;">
4 4
             <img style="width:100%;height:80px" src="../../../assets/img/bailinTop.jpg" alt="">
5 5
             <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
6 6
             <div style="display:flex;">
@@ -76,12 +76,120 @@
76 76
             </div>
77 77
             <img style="width:100%;" src="../../../assets/img/bailinBottom.jpg" alt="">
78 78
         </div>
79
+        <div>
80
+          <img style="width:100%;height:80px" src="../../../assets/img/bailinTop.jpg" alt="">
81
+            <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
82
+            <div style="display:flex;">
83
+                <div>单据号:<span style="display:inline-block;width:200px;">{{balanceAccounts.his.number ? balanceAccounts.his.number : ''}}</span></div>
84
+                <div>透析号:<span style="display:inline-block;width:200px;">{{balanceAccounts.patient ? balanceAccounts.patient.dialysis_no : ''}}</span></div>
85
+            </div>
86
+            <div style="display:flex;justify-content: space-between;">
87
+                <div style="display:flex;">
88
+                  <div>姓名:<span style="display:inline-block;width:50px;">{{balanceAccounts.patient ? balanceAccounts.patient.name : ''}}</span></div>
89
+                  <div>性别:<span style="display:inline-block;width:30px;">{{balanceAccounts.patient == '1' ? '男' : '女'}}</span></div>
90
+                  <div>年龄:<span style="display:inline-block;width:50px;">{{balanceAccounts.patient ? balanceAccounts.patient.age : ''}}岁</span></div>
91
+                  <div>费别:<span style="display:inline-block;width:80px;">自费</span>
92
+                  </div>
93
+                  <div>电脑号:<span style="display:inline-block;width:80px;"></span></div>
94
+                  <div>收费日期:<span style="display:inline-block;width:80px;">{{getTime(new Date(),"{y}-{m}-{d}")?getTime(new Date(),"{y}-{m}-{d}"):""}}</span></div>
95
+                </div>
96
+                <div style="float:right">金额单位:元</div>
97
+            </div>
98
+            <div style="min-height: 300px;">
99
+              <table border='1' style="width:100%;" cellspacing="0">
100
+                  <tr>
101
+                      <td width="70">类别</td>
102
+                      <td>项目</td>
103
+                      <td width="80">规格</td>
104
+                      <td width="50">单位</td>
105
+                      <td width="50">数量</td>
106
+                      <td width="60">单价</td>
107
+                      <td width="70">总额</td>
108
+                      <td width="100">小计</td>
109
+                  </tr>
110
+                  <div v-for="(item,i) in balanceAccounts.new_detail_list" :key="i" style="width:100%;display: table-row-group;">
111
+                      <tr v-for="(subItem,index) in item.details" :key="index">
112
+                        <td>
113
+                          <span v-if="item.type == 1">药品费</span>
114
+                          <span v-if="item.type == 2">治疗费</span>
115
+                          <span v-if="item.type == 3">耗材费</span>
116
+                        </td>
117
+                        <td>
118
+                          <span v-if="item.type == 1">{{ subItem.advice.advice_name }}</span>
119
+                          <span v-if="item.type == 2">{{ subItem.project.project.project_name }}</span>
120
+                          <span v-if="item.type == 3">{{ subItem.project.good_info.good_name }}</span>
121
+                        </td>
122
+                        <td>
123
+                          <span v-if="item.type == 1"><span v-if="subItem.advice.drug.min_unit != subItem.advice.drug.dose_unit">{{subItem.advice.drug.dose}}{{subItem.advice.drug.dose_unit}}&nbsp;* &nbsp;</span>{{subItem.advice.drug.min_number}}{{subItem.advice.drug.min_unit}}/{{subItem.advice.drug.max_unit}}</span>
124
+                          <span v-if="item.type == 2"></span>
125
+                          <span v-if="item.type == 3">{{ subItem.project.good_info.specification_name }}</span>
126
+                        </td>
127
+                        <td>
128
+                          <span v-if="item.type == 1">{{ subItem.advice.drug.max_unit }}</span>
129
+                          <span v-if="item.type == 2">{{ subItem.project.unit }}</span>
130
+                          <span v-if="item.type == 3">{{ subItem.project.unit }}</span>
131
+                        </td>
132
+                        <td>
133
+                          <span v-if="item.type == 1">{{ subItem.advice.prescribing_number }}</span>
134
+                          <span v-if="item.type == 2">{{ subItem.project.count }}</span>
135
+                          <span v-if="item.type == 3">{{ subItem.project.count }}</span>
136
+                        </td>
137
+                        <td>
138
+                          <span v-if="item.type == 1">{{ subItem.pric }}</span>
139
+                          <span v-if="item.type == 2">{{ subItem.pric }}</span>
140
+                          <span v-if="item.type == 3">{{ subItem.pric }}</span>
141
+                        </td>
142
+                        <td>
143
+                          <span v-if="item.type == 1">{{ subItem.advice.prescribing_number * subItem.pric }}</span>
144
+                          <span v-if="item.type == 2">{{ subItem.project.count * subItem.pric }}</span>
145
+                          <span v-if="item.type == 3">{{ subItem.project.count * subItem.pric }}</span>
146
+                        </td>
147
+                        <td :rowspan="item.details.length" v-if="index == 0" style="vertical-align: middle;text-align: center;">{{ item.total.toFixed(2) }}</td>
148
+                      </tr>
149
+                  </div>
150
+                  <tr>
151
+                    <td colspan="7">
152
+                      <div style="display:flex;flez-wrap:wrap;">
153
+                        <div style="width:33%;" v-for="(item,index) in balanceAccounts.new_detail_list" :key="index">
154
+                          <span v-if="item.type == 1">药品费: {{ item.total.toFixed(2) }}</span>
155
+                          <span v-if="item.type == 2">治疗费: {{ item.total.toFixed(2) }}</span>
156
+                          <span v-if="item.type == 3">耗材费: {{ item.total.toFixed(2) }}</span>
157
+                        </div>
158
+                      </div>
159
+                    </td>
160
+                    <td>合计: {{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</td>
161
+                  </tr>
162
+                  <tr>
163
+                      <td colspan="7">
164
+                          <div style="display:flex;flez-wrap:wrap;">
165
+                              <div style="width:33%;">医疗费总额:0元</div>
166
+                              <div style="width:33%;">基金支付金额:0元</div>
167
+                              <div style="width:33%;">个人账户支付金额:0元</div>
168
+
169
+                          </div>
170
+                          <div style="display:flex;flez-wrap:wrap;">
171
+                              <div style="width:33%;">个人支付金额:0元</div>
172
+                              <div style="width:33%;">个人账户金额:0元</div>
173
+                          </div>
174
+                      </td>
175
+                      <td>合计:{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</td>
176
+                  </tr>
177
+
178
+              </table>
179
+            </div>
180
+            <div style="float:right;margin:10px 0;display:flex;">
181
+                <div>操作人:<span style="width:100px;display:inline-block;">{{balanceAccounts.admin_info.user_name}}</span></div>
182
+                <div>操作日期:<span style="width:100px;display:inline-block;">{{getTime(new Date(),"{y}-{m}-{d}")?getTime(new Date(),"{y}-{m}-{d}"):""}}</span></div>
183
+            </div>
184
+            <img style="width:100%;" src="../../../assets/img/bailinBottom.jpg" alt="">
185
+        </div>
79 186
     </div>
80 187
 
81 188
 </template>
82 189
 <script>
83 190
   import axios from 'axios'
84 191
   import { getChargePrint } from '@/api/project/project'
192
+  import { uParseTime } from '@/utils/tools'
85 193
 
86 194
   export default {
87 195
     data() {
@@ -107,7 +215,8 @@
107 215
     },
108 216
     props: {
109 217
       paramsObj: Object,
110
-      info: Object
218
+      info: Object,
219
+      balanceAccounts:Object
111 220
     },
112 221
     methods: {
113 222
       getName(list) {
@@ -315,7 +424,13 @@
315 424
             console.log('hispatient', histpatient)
316 425
           }
317 426
         })
318
-      }
427
+      },
428
+      getTime(value, temp) {
429
+        if (value != undefined) {
430
+            return uParseTime(value, temp)
431
+        }
432
+        return ''
433
+      },
319 434
     },
320 435
     mounted() {
321 436
       this.org_id = this.$store.getters.xt_user.org_id