see999 3 years ago
parent
commit
3e276a7074
1 changed files with 87 additions and 70 deletions
  1. 87 70
      src/xt_pages/outpatientCharges/invoiceTemplate/printFive.vue

+ 87 - 70
src/xt_pages/outpatientCharges/invoiceTemplate/printFive.vue View File

@@ -1,79 +1,78 @@
1 1
 <template>
2 2
     <div id='invoice-print'>
3
-        <div style="display:flex;">
4
-            <div style="position: absolute;top:10px;left:70px;">{{ list.order_number }}</div>
5
-            <!-- <div>{{ list.id_card_no }}</div> -->
6
-        </div>
7
-        <div style="display:flex;justify-content: space-between;">
8
-            <div style="position: absolute;top:40px;left:80px;"> {{ paramsObj.name }}</div>
9
-        </div>
10
-        <div style="position: absolute;top:100px;left:80px">
11
-            <div v-if="list.westernMedicineCostTotal">西药 {{ list.westernMedicineCostTotal }}</div>
12
-            <div v-if="list.treatCostTotal">治疗费 {{ list.treatCostTotal }}</div>
13
-            <div v-if="list.bedCostTotal">床位费 {{ list.bedCostTotal }}</div>
14
-            <div v-if="list.chineseTraditionalMedicineCostTotal">中成药 {{ list.chineseTraditionalMedicineCostTotal }}</div>
15
-            <div v-if="list.laboratoryCostTotal">化验费 {{ list.laboratoryCostTotal }}</div>
16
-            <div v-if="list.operationCostTotal">手术费 {{ list.operationCostTotal }}</div>
17
-            <div v-if="list.otherCostTotal">其他费 {{ list.otherCostTotal }}</div>
18
-            <div v-if="list.materialCostTotal">材料费 {{ list.materialCostTotal }}</div>
19
-        </div>
20
-        <div style="position: absolute;top:100px;left:260px">
21
-            <div v-for="(item,index) in list.order_info" :key="index">
22
-                <span style="display:inline-block;width:200px;">
23
-                    <span v-if="item.advice.id == 0">
24
-                        <span v-if="item.project.type == 2">{{ item.project.project.project_name }}</span>
25
-                        <span v-if="item.project.type == 3">{{ item.project.good_info.good_name }}</span>
3
+        <div v-for='(i,index) in pageArr.length' :key="index">
4
+            <div :style="{position: 'absolute',top:(10 + (index * 500))  + 'px',left:70+ 'px',}">{{ list.order_number }}</div>
5
+            <div style="display:flex;justify-content: space-between;">
6
+                <div :style="{position: 'absolute',top:(40 + (index * 500))  + 'px',left:80+ 'px',}"> {{ paramsObj.name }}</div>
7
+            </div>
8
+            <div :style="{position: 'absolute',top:(100 + (index * 500))  + 'px',left:80+ 'px',}">
9
+                <div v-if="list.westernMedicineCostTotal">西药 {{ list.westernMedicineCostTotal }}</div>
10
+                <div v-if="list.treatCostTotal">治疗费 {{ list.treatCostTotal }}</div>
11
+                <div v-if="list.bedCostTotal">床位费 {{ list.bedCostTotal }}</div>
12
+                <div v-if="list.chineseTraditionalMedicineCostTotal">中成药 {{ list.chineseTraditionalMedicineCostTotal }}</div>
13
+                <div v-if="list.laboratoryCostTotal">化验费 {{ list.laboratoryCostTotal }}</div>
14
+                <div v-if="list.operationCostTotal">手术费 {{ list.operationCostTotal }}</div>
15
+                <div v-if="list.otherCostTotal">其他费 {{ list.otherCostTotal }}</div>
16
+                <div v-if="list.materialCostTotal">材料费 {{ list.materialCostTotal }}</div>
17
+            </div>
18
+            <div :style="{position: 'absolute',top:(100 + (index * 500))  + 'px',left:260+ 'px'}">
19
+                <div v-for="item in list.order_info.slice(index * 10,(index * 10) + pageArr[index])">
20
+                    <span style="display:inline-block;width:200px;">
21
+                        <span v-if="item.advice.id == 0">
22
+                            <span v-if="item.project.type == 2">{{ item.project.project.project_name }}</span>
23
+                            <span v-if="item.project.type == 3">{{ item.project.good_info.good_name }}</span>
24
+                        </span>
25
+                        <span v-else>{{ item.advice.advice_name }}</span>
26 26
                     </span>
27
-                    <span v-else>{{ item.advice.advice_name }}</span>
28
-                </span>
29
-                <span style="display:inline-block;width:50px;">
30
-                    <span v-if="item.advice.id == 0">
31
-                        <span v-if="item.project.type == 2">{{ item.project.count }}{{ item.project.unit }}</span>
32
-                        <span v-if="item.project.type == 3">{{ item.project.count }}{{ item.project.unit }}</span>
27
+                    <span style="display:inline-block;width:50px;">
28
+                        <span v-if="item.advice.id == 0">
29
+                            <span v-if="item.project.type == 2">{{ item.project.count }}{{ item.project.unit }}</span>
30
+                            <span v-if="item.project.type == 3">{{ item.project.count }}{{ item.project.unit }}</span>
31
+                        </span>
32
+                        <span v-else>{{ item.advice.prescribing_number }}{{ item.advice.prescribing_number_unit }}</span>
33 33
                     </span>
34
-                    <span v-else>{{ item.advice.prescribing_number }}{{ item.advice.prescribing_number_unit }}</span>
35
-                </span>
36
-                <span>
37
-                    <span v-if="item.advice.id == 0">
38
-                        <span v-if="item.project.type == 2">{{ (item.project.count * item.pric).toFixed(2) }}</span>
39
-                        <span v-if="item.project.type == 3">{{ (item.project.count * item.pric).toFixed(2) }}</span>
34
+                    <span>
35
+                        <span v-if="item.advice.id == 0">
36
+                            <span v-if="item.project.type == 2">{{ (item.project.count * item.pric).toFixed(2) }}</span>
37
+                            <span v-if="item.project.type == 3">{{ (item.project.count * item.pric).toFixed(2) }}</span>
38
+                        </span>
39
+                        <span v-else>{{ (item.advice.prescribing_number * item.pric).toFixed(2) }}</span>
40 40
                     </span>
41
-                    <span v-else>{{ (item.advice.prescribing_number * item.pric).toFixed(2) }}</span>
42
-                </span>
43
-            </div>
44
-        </div>
45
-        <div style="position: absolute;top:295px;left:110px">{{ zhongwen }}</div>
46
-        <div style="position: absolute;top:295px;left:460px">{{ list.medfee_sumamt }}</div>
47
-        <div style="position: absolute;top:315px;left:50px;width:100%">
48
-            <div style="display:flex;">
49
-                <div style="width:160px">医疗总费用:{{ list.medfee_sumamt }}</div>
50
-                <div style="width:160px">现金支出:{{ list.psn_cash_money }}</div>
51
-                <div style="width:160px">上次账户:0</div>
52
-                <div style="width:160px">本次账户:0</div>
41
+                </div>
53 42
             </div>
54
-            <div style="display:flex;">
55
-                <div style="width:160px">账户余额:{{ list.order.balc }}</div>
56
-                <div style="width:160px">统筹支出:{{ list.order.hifp_pay }}</div>
57
-                <div style="width:160px">大病支出:0</div>
58
-                <div style="width:160px">民政支出:0</div>
43
+            <div :style="{position: 'absolute',top:(295 + (index * 500))  + 'px',left:110+ 'px'}">{{ zhongwen }}</div>
44
+            <div :style="{position: 'absolute',top:(295 + (index * 500))  + 'px',left:460+ 'px'}">{{ list.medfee_sumamt }}</div>
45
+            <div v-if="index == pageArr.length - 1" :style="{position: 'absolute',top:(315 + (index * 500))  + 'px',left:110+ 'px',width:100 + '%'}">
46
+                <div style="display:flex;">
47
+                    <div style="width:140px">医疗总费用:{{ list.medfee_sumamt }}</div>
48
+                    <div style="width:140px">现金支出:{{ list.psn_cash_money }}</div>
49
+                    <div style="width:140px">上次账户:0</div>
50
+                    <div style="width:140px">本次账户:0</div>
51
+                </div>
52
+                <div style="display:flex;">
53
+                    <div style="width:140px">账户余额:{{ list.order.balc }}</div>
54
+                    <div style="width:140px">统筹支出:{{ list.order.hifp_pay }}</div>
55
+                    <div style="width:140px">大病支出:0</div>
56
+                    <div style="width:140px">民政支出:0</div>
57
+                </div>
58
+                <div style="display:flex;">
59
+                    <div style="width:140px">大病补充保险支出:0</div>
60
+                    <div style="width:280px">企业补充医疗保险基金支出:{{ list.order.hifes_pay }}</div>
61
+                    <div style="width:140px">其他支出:{{ list.order.oth_pay }}</div>
62
+                </div>
59 63
             </div>
60
-            <div style="display:flex;">
61
-                <div style="width:160px">大病补充保险支出:0</div>
62
-                <div style="width:320px">企业补充医疗保险基金支出:{{ list.order.hifes_pay }}</div>
63
-                <div style="width:160px">其他支出:{{ list.order.oth_pay }}</div>
64
-            </div>
65
-        </div>
66
-        <div>
67
-            <div style="position: absolute;top:375px;left:80px">{{ org_name }}</div>
68
-            <div style="position: absolute;top:375px;left:340px">{{ paramsObj.chargeName }}</div>
69
-             <div  style="position: absolute;left:480px;top:375px;">
70
-                <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
71
-            </div>
72
-            <div  style="position: absolute;left:540px;top:375px;">
73
-                <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</span>
74
-            </div>
75
-            <div  style="position: absolute;left:580px;top:375px;">
76
-                <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</span>
64
+            <div>
65
+                <div :style="{position: 'absolute',top:(375 + (index * 500))  + 'px',left:80+ 'px'}">{{ org_name }}</div>
66
+                <div :style="{position: 'absolute',top:(375 + (index * 500))  + 'px',left:340+ 'px'}">{{ paramsObj.chargeName }}</div>
67
+                <div :style="{position: 'absolute',top:(375 + (index * 500))  + 'px',left:480+ 'px'}">
68
+                    <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
69
+                </div>
70
+                <div :style="{position: 'absolute',top:(375 + (index * 500))  + 'px',left:540+ 'px'}">
71
+                    <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</span>
72
+                </div>
73
+                <div :style="{position: 'absolute',top:(375 + (index * 500))  + 'px',left:580+ 'px'}">
74
+                    <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</span>
75
+                </div>
77 76
             </div>
78 77
         </div>
79 78
     </div>
@@ -94,7 +93,9 @@ export default {
94 93
             zhongwen:'',
95 94
             totalPrice:0.0,
96 95
             org_id:'',
97
-            org_name:''
96
+            org_name:'',
97
+            page:1,
98
+            pageArr:[],
98 99
         }
99 100
     },
100 101
     created(){
@@ -124,6 +125,7 @@ export default {
124 125
                 var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
125 126
                 var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
126 127
                 this.printDate = data.getFullYear() + "-" + month + "-" + date;
128
+                this.getPage()
127 129
             })
128 130
         },
129 131
         smalltoBIG(n) {
@@ -184,6 +186,21 @@ export default {
184 186
             }
185 187
             return ''
186 188
         },
189
+        getPage(){
190
+        if(this.list.order_info.length <= 10){
191
+            this.page = 1
192
+            this.pageArr.push(this.list.order_info.length)
193
+        }else if(this.list.order_info.length > 10){
194
+            this.page = parseInt(this.list.order_info.length / 10)
195
+            let num = this.list.order_info.length % 10
196
+            for (var i=0;i<this.page;i++){
197
+                this.pageArr.push(10)
198
+            }
199
+            if(num != 0){
200
+                this.pageArr.push(num)
201
+            }
202
+        }
203
+      }
187 204
 
188 205
     },
189 206
     watch:{