huangyw 2 yıl önce
ebeveyn
işleme
424c875ac4

+ 4 - 0
src/xt_pages/outpatientTool/components/gatherStatistics.vue Dosyayı Görüntüle

@@ -41,6 +41,7 @@
41 41
             end-placeholder="结束日期">
42 42
         </el-date-picker>
43 43
         <el-button  type="primary" size="small" @click="toPrint">打印</el-button>
44
+        <el-button  type="primary" size="small" @click="toPrintInvoice">发票打印</el-button>
44 45
       </div>
45 46
       <div>
46 47
       </div>
@@ -567,6 +568,9 @@ export default {
567 568
      toPrint(){
568 569
         this.$router.push({path:"/hisTool/gatherPrint?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords})
569 570
      },
571
+     toPrintInvoice(){
572
+       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})
573
+     }
570 574
   },
571 575
   created() {
572 576
     this.getGatherDetailList()

+ 296 - 243
src/xt_pages/outpatientTool/detailPrint.vue Dosyayı Görüntüle

@@ -1,299 +1,352 @@
1 1
 <template>
2
+  <div>
3
+    <div class="print_btn">
4
+      <el-button type="primary" @click="printtpage">打印</el-button>
5
+    </div>
2 6
     <div id="list-print" class="list-print">
3
-        <div >
4
-        <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用清单</div>
5
-        <div class="listInfo">
6
-            <div>患者姓名:{{patient.name}}</div>
7
-            <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
8
-            <div>结算类别:{{getType(his_patient.balance_accounts_type)}}</div>
9
-            <div>发票号码:</div>
10
-        </div>
11
-         <div class="listInfo">
12
-            <div>住院/门诊号:</div>
13
-            <div>科室:{{getDepartment(his_patient.departments)}}</div>
14
-            <div>就诊流水号:{{his_patient.number}}</div>
15
-        </div>
16
-        <div class="listInfo">
17
-            <div>总费用:{{getAllPice()}}</div>
18
-            <div>个人支付:{{getActPay()}}</div>
19
-            <div>基金支付记账:{{getFundPaySumamt()}}</div>
20
-            <div>补充医疗支付记账:{{getHifesPay()}}</div>
21
-        </div>
22
-        <div class="listInfo">
23
-            <div>救助支付金额:{{getMafPay()}}</div>
24
-        </div>
25
-        <table class="listTable" border="1">
26
-            <tr>
27
-                <td style="width:19%;text-align:center">序号</td>
28
-                <td style="width:10%;text-align:center">处方日期</td>
29
-                <td style="width:31%;text-align:center">费用编码</td>
30
-                <td style="width:14%;text-align:center">项目名称</td>
31
-                <td style="width:10%;text-align:center" >规格</td>
32
-                <td style="width:6%;text-align:center" >数量</td>
33
-                <td style="width:10%;text-align:center">单价(元)</td>
34
-                <td style="width:10%;text-align:center">金额</td>
35
-            </tr>
36
-            <tr v-for="(item, index) in tableData" :key="index">
37
-                <td style="width:19%;text-align:center" >{{index+1}}</td>
38
-                <td style="width:10%;text-align:center" >
39
-                   <span v-if="item.record_date > 0">{{getTimes(item.record_date)}}</span> 
40
-                </td>
41
-                <td style="width:31%;text-align:center" >{{item.number}}</td>
42
-                <td style="width:14%;text-align:center" >
43
-                    <span v-if="item.advice_id > 0">{{item.advice.advice_name}}</span>
44
-                    <span v-if="item.project_id > 0">
45
-                        <span v-if="item.project.type == 2">{{item.project.project.project_name}}</span>
46
-                        <span v-if="item.project.type == 3">{item.project.good_info.good_name}}</span>
47
-                    </span>   
48
-                </td>
49
-                <td style="width:10%;text-align:center" >
50
-                   <span v-if="item.advice_id > 0">{{item.advice.drug.dose}}{{item.advice.drug.dose_unit}}*{{item.advice.drug.min_number}}{{item.advice.drug.min_unit}}/{{item.advice.drug.max_unit}}</span>
51
-                    <span v-if="item.project_id > 0">
52
-                        <span v-if="item.project.type == 2">{{item.project.project.project_name}}</span>
53
-                        <span v-if="item.project.type == 3">{{item.project.good_info.specification_name}}</span>
54
-                    </span>   
55
-                </td>
56
-                <td style="width:6%;text-align:center" >
57
-                     {{item.cnt}}
58
-                </td>
59
-                <td style="width:10%;text-align:center" >
60
-                    {{item.pric}}
61
-                </td>
62
-                <td style="width:10%;text-align:center" >
63
-                     {{item.total_price}}
64
-                </td>
65
-            </tr>
66
-        </table>
67
-        </div>
7
+      <div class="listTitle">
8
+        {{ $store.getters.xt_user.org.org_name }}费用清单
9
+      </div>
10
+      <div class="listInfo">
11
+        <div>患者姓名:{{ patient.name }}</div>
12
+        <div>性别:{{ patient.gender == 1 ? "男" : "女" }}</div>
13
+        <div>结算类别:{{ getType(his_patient.balance_accounts_type) }}</div>
14
+        <div style="min-width:300px;">发票号码:</div>
15
+      </div>
16
+      <div class="listInfo">
17
+        <div>住院/门诊号:</div>
18
+        <div>科室:{{ getDepartment(his_patient.departments) }}</div>
19
+        <div style="min-width:350px;">就诊流水号:{{ his_patient.number }}</div>
20
+      </div>
21
+      <div class="listInfo">
22
+        <div>总费用:{{ getAllPice() }}</div>
23
+        <div>个人支付:{{ getActPay() }}</div>
24
+        <div>基金支付记账:{{ getFundPaySumamt() }}</div>
25
+        <div style="min-width:300px;">补充医疗支付记账:{{ getHifesPay() }}</div>
26
+      </div>
27
+      <div class="listInfo">
28
+        <div>救助支付金额:{{ getMafPay() }}</div>
29
+      </div>
30
+      <table class="listTable" border="1">
31
+        <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: 11%; text-align: center">单价(元)</td>
39
+          <td style="width: 10%; text-align: center">金额</td>
40
+        </tr>
41
+        <tr v-for="(item, index) in tableData" :key="index">
42
+          <td style="width: 19%; text-align: center">{{ index + 1 }}</td>
43
+          <td style="width: 10%; text-align: center">
44
+            <span v-if="item.record_date > 0">{{
45
+              getTimes(item.record_date)
46
+            }}</span>
47
+          </td>
48
+          <td style="width: 31%; text-align: center">{{ item.number }}</td>
49
+          <td style="width: 14%; text-align: center">
50
+            <span v-if="item.advice_id > 0">{{ item.advice.advice_name }}</span>
51
+            <span v-if="item.project_id > 0">
52
+              <span v-if="item.project.type == 2">{{
53
+                item.project.project.project_name
54
+              }}</span>
55
+              <span v-if="item.project.type == 3"
56
+                >{item.project.good_info.good_name}}</span
57
+              >
58
+            </span>
59
+          </td>
60
+          <td style="width: 10%; text-align: center">
61
+            <span v-if="item.advice_id > 0"
62
+              >{{ item.advice.drug.dose }}{{ item.advice.drug.dose_unit }}*{{
63
+                item.advice.drug.min_number
64
+              }}{{ item.advice.drug.min_unit }}/{{
65
+                item.advice.drug.max_unit
66
+              }}</span
67
+            >
68
+            <span v-if="item.project_id > 0">
69
+              <span v-if="item.project.type == 2">{{
70
+                item.project.project.project_name
71
+              }}</span>
72
+              <span v-if="item.project.type == 3">{{
73
+                item.project.good_info.specification_name
74
+              }}</span>
75
+            </span>
76
+          </td>
77
+          <td style="width: 6%; text-align: center">
78
+            {{ item.cnt }}
79
+          </td>
80
+          <td style="width: 10%; text-align: center">
81
+            {{ item.pric }}
82
+          </td>
83
+          <td style="width: 10%; text-align: center">
84
+            {{ item.total_price }}
85
+          </td>
86
+        </tr>
87
+      </table>
68 88
     </div>
89
+  </div>
69 90
 </template>
70 91
 
71 92
 <script>
72
-  import { uParseTime } from '@/utils/tools'
73
-  import { getHisSummaryDetailList } from '@/api/his/his_tools'
74
-  export default {
75
-    data(){
76
-        return{
77
-          patient:{},
78
-          tableData:[],
79
-          list:[],
80
-          his_patient:{},
81
-          hisDepatment:[],
82
-          settlement: [
83
-            {value: 1, label: '医保'},
84
-            {value: 2, label: '自费'},
85
-            {value: 3, label: '公费'},
86
-            {value: 4, label: '农保'},
87
-            {value: 5, label: '会员'},
88
-            {value: 6, label: '职工'},
89
-            {value: 7, label: '合同'},
90
-            {value: 8, label: '医保自费'},
93
+import print from "print-js";
94
+import { uParseTime } from "@/utils/tools";
95
+import { getHisSummaryDetailList } from "@/api/his/his_tools";
96
+export default {
97
+  data() {
98
+    return {
99
+      patient: {},
100
+      tableData: [],
101
+      list: [],
102
+      his_patient: {},
103
+      hisDepatment: [],
104
+      settlement: [
105
+        { value: 1, label: "医保" },
106
+        { value: 2, label: "自费" },
107
+        { value: 3, label: "公费" },
108
+        { value: 4, label: "农保" },
109
+        { value: 5, label: "会员" },
110
+        { value: 6, label: "职工" },
111
+        { value: 7, label: "合同" },
112
+        { value: 8, label: "医保自费" },
113
+      ],
114
+    };
115
+  },
116
+  methods: {
117
+    printtpage() {
118
+      const style =
119
+        '@media print {.list-print{width:960px;margin:0 auto} .listTitle {font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo {display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;}.listTable {width: 100%;text-align: center;border-collapse: collapse;line-height: 25px;font-size: 14px;border-color: #000;text-align: left;} .listTable tr td {padding: 0 5px;}.tableBottom {font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne {margin-right: 40px;}';
120
+      printJS({
121
+        printable: "list-print",
122
+        type: "html",
123
+        style: style,
124
+        scanStyles: false,
125
+      });
126
+    },
91 127
 
92
-         ],
93
-        }
128
+    getNowTime: function () {
129
+      let dateTime;
130
+      let yy = new Date().getFullYear();
131
+      let mm = new Date().getMonth() + 1;
132
+      let dd = new Date().getDate();
133
+      let hh = new Date().getHours();
134
+      let mf =
135
+        new Date().getMinutes() < 10
136
+          ? "0" + new Date().getMinutes()
137
+          : new Date().getMinutes();
138
+      let ss =
139
+        new Date().getSeconds() < 10
140
+          ? "0" + new Date().getSeconds()
141
+          : new Date().getSeconds();
142
+      dateTime = yy + "-" + mm + "-" + dd + " " + hh + ":" + mf + ":" + ss;
143
+      return dateTime;
94 144
     },
95
-    methods:{
96
-      getNowTime: function () {
97
-        let dateTime;
98
-        let yy = new Date().getFullYear();
99
-        let mm = new Date().getMonth() + 1;
100
-        let dd = new Date().getDate();
101
-        let hh = new Date().getHours();
102
-        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
103
-          :
104
-          new Date().getMinutes();
105
-        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
106
-          :
107
-          new Date().getSeconds();
108
-        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
109
-        return dateTime
110
-      },
111
-      getTimes(time) {
112
-        return uParseTime(time, '{y}-{m}-{d}')
113
-      },
114
-      getHisSummaryDetailList() {
115
-        let start_time = this.$route.query.start_time
116
-        let end_time = this.$route.query.end_time
117
-        let params = {
118
-            patient_id:this.$route.query.patient_id,
119
-            start_time: start_time,
120
-            end_time: end_time,
121
-            type: this.$route.query.type,
122
-            keyword:this.$route.query.keyword,
123
-        }
124
-     getHisSummaryDetailList(params).then(response=>{
125
-       if(response.data.state == 1){
126
-          var list =  response.data.data.list
127
-          this.list = list
128
-          this.patient = response.data.data.patient
129
-          
130
-          this.his_patient = response.data.data.his_patient
131
-          console.log("his_patinet233232322323232323",this.his_patient)
145
+    getTimes(time) {
146
+      return uParseTime(time, "{y}-{m}-{d}");
147
+    },
148
+    getHisSummaryDetailList() {
149
+      let start_time = this.$route.query.start_time;
150
+      let end_time = this.$route.query.end_time;
151
+      let params = {
152
+        patient_id: this.$route.query.patient_id,
153
+        start_time: start_time,
154
+        end_time: end_time,
155
+        type: this.$route.query.type,
156
+        keyword: this.$route.query.keyword,
157
+      };
158
+      getHisSummaryDetailList(params).then((response) => {
159
+        if (response.data.state == 1) {
160
+          var list = response.data.data.list;
161
+          this.list = list;
162
+          this.patient = response.data.data.patient;
163
+
164
+          this.his_patient = response.data.data.his_patient;
165
+          console.log("his_patinet233232322323232323", this.his_patient);
132 166
 
133
-          this.hisDepatment = response.data.data.hisDepatment
134
-          console.log("部门23233232322323",this.hisDepatment)
135
-          this.tableData = []
136
-          for(let i=0;i<list.length;i++){
137
-            for(let j=0;j<list[i].orders.length;j++){
138
-              for(let z=0;z<list[i].orders[j].order_info.length;z++){
139
-                  list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
140
-                  list[i].orders[j].order_info[z].number = list[i].orders[j].number
141
-                  this.tableData.push(list[i].orders[j].order_info[z])
142
-               }
167
+          this.hisDepatment = response.data.data.hisDepatment;
168
+          console.log("部门23233232322323", this.hisDepatment);
169
+          this.tableData = [];
170
+          for (let i = 0; i < list.length; i++) {
171
+            for (let j = 0; j < list[i].orders.length; j++) {
172
+              for (let z = 0; z < list[i].orders[j].order_info.length; z++) {
173
+                list[i].orders[j].order_info[z].record_date =
174
+                  list[i].orders[j].settle_accounts_date;
175
+                list[i].orders[j].order_info[z].number =
176
+                  list[i].orders[j].number;
177
+                this.tableData.push(list[i].orders[j].order_info[z]);
178
+              }
143 179
             }
144 180
           }
145
-          var obj = {index:"合计",total_price:0,record_date:"0"}
146
-          for(let i=0;i<this.tableData.length;i++){
147
-            this.tableData[i].index = i+1
148
-            this.tableData[i].total_price = 0
149
-            this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
150
-            obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
181
+          var obj = { index: "合计", total_price: 0, record_date: "0" };
182
+          for (let i = 0; i < this.tableData.length; i++) {
183
+            this.tableData[i].index = i + 1;
184
+            this.tableData[i].total_price = 0;
185
+            this.tableData[i].total_price = (
186
+              this.tableData[i].cnt * this.tableData[i].pric
187
+            ).toFixed(2);
188
+            obj.total_price += this.tableData[i].cnt * this.tableData[i].pric;
151 189
           }
152
-          obj.total_price = (obj.total_price).toFixed(2)
153
-          this.tableData.push(obj)
154
-          if(this.$route.query.keyword!=""){
155
-            for(let i=0;i<this.tableData.length;i++){
156
-              if(this.tableData[i].index!="合计"){
157
-                if(this.tableData[i].advice_id > 0){
158
-                  if(this.tableData[i].advice.advice_name.indexOf(this.$route.query.keyword) > -1){
159
-                  new_arr.push(this.tableData[i])
160
-                }
190
+          obj.total_price = obj.total_price.toFixed(2);
191
+          this.tableData.push(obj);
192
+          if (this.$route.query.keyword != "") {
193
+            for (let i = 0; i < this.tableData.length; i++) {
194
+              if (this.tableData[i].index != "合计") {
195
+                if (this.tableData[i].advice_id > 0) {
196
+                  if (
197
+                    this.tableData[i].advice.advice_name.indexOf(
198
+                      this.$route.query.keyword
199
+                    ) > -1
200
+                  ) {
201
+                    new_arr.push(this.tableData[i]);
202
+                  }
161 203
                 }
162
-                if(this.tableData[i].project_id >0){
163
-                  if(this.tableData[i].project.type == 2){
164
-                    if(this.tableData[i].project.project.project_name.indexOf(this.$route.query.keyword) > -1){
165
-                        new_arr.push(this.tableData[i])
204
+                if (this.tableData[i].project_id > 0) {
205
+                  if (this.tableData[i].project.type == 2) {
206
+                    if (
207
+                      this.tableData[i].project.project.project_name.indexOf(
208
+                        this.$route.query.keyword
209
+                      ) > -1
210
+                    ) {
211
+                      new_arr.push(this.tableData[i]);
166 212
                     }
167 213
                   }
168
-                  if(this.tableData[i].project.type == 3){
169
-                    if(this.tableData[i].project.good_info.good_name.indexOf(this.$route.query.keyword)> - 1){
170
-                      new_arr.push(this.tableData[i])   
214
+                  if (this.tableData[i].project.type == 3) {
215
+                    if (
216
+                      this.tableData[i].project.good_info.good_name.indexOf(
217
+                        this.$route.query.keyword
218
+                      ) > -1
219
+                    ) {
220
+                      new_arr.push(this.tableData[i]);
171 221
                     }
172 222
                   }
173 223
                 }
174 224
               }
175 225
             }
176
-            if(this.$route.query.keyword!=""){
177
-              this.tableData.push(obj)
226
+            if (this.$route.query.keyword != "") {
227
+              this.tableData.push(obj);
178 228
             }
179
-            this.tableData = new_arr
229
+            this.tableData = new_arr;
180 230
           }
181
-          console.log("tabledata32233223323232",this.tableData)
182
-       }
183
-     })
231
+          console.log("tabledata32233223323232", this.tableData);
232
+        }
233
+      });
184 234
     },
185
-    getAllPice(){
186
-      var total_price = 0
187
-      for(let i=0;i<this.tableData.length;i++){
188
-        if(this.tableData[i].index =="合计"){
189
-          total_price = this.tableData[i].total_price
235
+    getAllPice() {
236
+      var total_price = 0;
237
+      for (let i = 0; i < this.tableData.length; i++) {
238
+        if (this.tableData[i].index == "合计") {
239
+          total_price = this.tableData[i].total_price;
190 240
         }
191 241
       }
192
-      return total_price
242
+      return total_price;
193 243
     },
194
-    getActPay(){
195
-      console.log("hh23h323223323",this.list)
196
-      var act_pay = 0
197
-      for(let i=0;i<this.list.length;i++){
198
-        for(let j=0;j<this.list[i].orders.length;j++){
199
-           act_pay +=this.list[i].orders[j].acct_pay
244
+    getActPay() {
245
+      console.log("hh23h323223323", this.list);
246
+      var act_pay = 0;
247
+      for (let i = 0; i < this.list.length; i++) {
248
+        for (let j = 0; j < this.list[i].orders.length; j++) {
249
+          act_pay += this.list[i].orders[j].acct_pay;
200 250
         }
201 251
       }
202
-      return act_pay
252
+      return act_pay;
203 253
     },
204
-    getFundPaySumamt(){
205
-      var fund_pay_sumamt = 0
206
-      for(let i=0;i<this.list.length;i++){
207
-        for(let j=0;j<this.list[i].orders.length;j++){
208
-           fund_pay_sumamt +=this.list[i].orders[j].fund_pay_sumamt
254
+    getFundPaySumamt() {
255
+      var fund_pay_sumamt = 0;
256
+      for (let i = 0; i < this.list.length; i++) {
257
+        for (let j = 0; j < this.list[i].orders.length; j++) {
258
+          fund_pay_sumamt += this.list[i].orders[j].fund_pay_sumamt;
209 259
         }
210 260
       }
211
-      return fund_pay_sumamt
261
+      return fund_pay_sumamt;
212 262
     },
213
-    getHifesPay(){
214
-      var hifes_pay = 0
215
-      for(let i=0;i<this.list.length;i++){
216
-        for(let j=0;j<this.list[i].orders.length;j++){
217
-          hifes_pay +=this.list[i].orders[j].hifes_pay
263
+    getHifesPay() {
264
+      var hifes_pay = 0;
265
+      for (let i = 0; i < this.list.length; i++) {
266
+        for (let j = 0; j < this.list[i].orders.length; j++) {
267
+          hifes_pay += this.list[i].orders[j].hifes_pay;
218 268
         }
219 269
       }
220
-      return hifes_pay
270
+      return hifes_pay;
221 271
     },
222
-    getMafPay(){
223
-      var maf_pay = 0
224
-      for(let i=0;i<this.list.length;i++){
225
-        for(let j=0;j<this.list[i].orders.length;j++){
226
-          maf_pay +=this.list[i].orders[j].maf_pay
272
+    getMafPay() {
273
+      var maf_pay = 0;
274
+      for (let i = 0; i < this.list.length; i++) {
275
+        for (let j = 0; j < this.list[i].orders.length; j++) {
276
+          maf_pay += this.list[i].orders[j].maf_pay;
227 277
         }
228 278
       }
229
-      return maf_pay
279
+      return maf_pay;
230 280
     },
231
-    getDepartment(id){
232
-      var name = ""
233
-      for(let i=0;i<this.hisDepatment.length;i++){
234
-        if(id == this.hisDepatment[i].id){
235
-           name = this.hisDepatment[i].name
281
+    getDepartment(id) {
282
+      var name = "";
283
+      for (let i = 0; i < this.hisDepatment.length; i++) {
284
+        if (id == this.hisDepatment[i].id) {
285
+          name = this.hisDepatment[i].name;
236 286
         }
237 287
       }
238
-      return name
288
+      return name;
239 289
     },
240
-    getType(id){
241
-      var name = ""
242
-      for(let i=0;i<this.settlement.length;i++){
243
-        if(id == this.settlement[i].value){
244
-         name = this.settlement[i].label
290
+    getType(id) {
291
+      var name = "";
292
+      for (let i = 0; i < this.settlement.length; i++) {
293
+        if (id == this.settlement[i].value) {
294
+          name = this.settlement[i].label;
245 295
         }
246 296
       }
247
-      return name
248
-    }
297
+      return name;
249 298
     },
250
-    created(){
251
-      this.getHisSummaryDetailList()   
252
-    }
253
-
254
-  }
255
-
256
-
299
+  },
300
+  created() {
301
+    this.getHisSummaryDetailList();
302
+  },
303
+};
257 304
 </script>
258 305
 
259 306
 <style lang="scss" scoped>
260
-.list-print{
261
-    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
262
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
263
-    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
264
-    margin-bottom: 20px;
265
-    padding:20px 10px;
307
+.list-print {
308
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
309
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
310
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
311
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
312
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
313
+  margin-bottom: 20px;
314
+  padding: 20px 10px;
266 315
 }
267
-.listTitle{
268
-    font-size: 24px;
269
-    text-align: center;
270
-    font-weight: bold;
271
-    margin-bottom: 10px;
316
+.listTitle {
317
+  font-size: 24px;
318
+  text-align: center;
319
+  font-weight: bold;
320
+  margin-bottom: 10px;
272 321
 }
273
-.listInfo{
274
-    display: flex;
275
-    font-size: 16px;
276
-    justify-content: space-between;
277
-    margin: 10px 0;
322
+.listInfo {
323
+  display: flex;
324
+  font-size: 16px;
325
+  justify-content: space-between;
326
+  margin: 10px 0;
278 327
 }
279
-.listTable{
280
-    width: 100%;
281
-    text-align: center;
282
-    border-collapse: collapse;
283
-    line-height: 40px;
284
-    font-size: 14px;
285
-    border-color: #000;
286
-    text-align: left;
328
+.listTable {
329
+  width: 100%;
330
+  text-align: center;
331
+  border-collapse: collapse;
332
+  line-height: 25px;
333
+  font-size: 14px;
334
+  border-color: #000;
335
+  text-align: left;
287 336
 }
288 337
 .listTable tr td {
289
-    padding: 0 5px;
338
+  padding: 0 5px;
339
+}
340
+.tableBottom {
341
+  font-size: 16px;
342
+  display: flex;
343
+  margin-top: 20px;
290 344
 }
291
-.tableBottom{
292
-    font-size: 16px;
293
-    display: flex;
294
-    margin-top: 20px;
345
+.tableBottomOne {
346
+  margin-right: 40px;
295 347
 }
296
-.tableBottomOne{
297
-    margin-right: 40px;
348
+.print_btn {
349
+  display: flex;
350
+  justify-content: flex-end;
298 351
 }
299 352
 </style>

+ 29 - 10
src/xt_pages/outpatientTool/gatherPrint.vue Dosyayı Görüntüle

@@ -1,8 +1,11 @@
1 1
 <template>
2
-    <div id="list-print" class="list-print">
3
-        <div >
2
+    <div>
3
+      <div class="print_btn">
4
+      <el-button type="primary" @click="printtpage">打印</el-button>
5
+    </div>
6
+        <div id="list-print" class="list-print">
4 7
         <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用清单</div>
5
-         <div class="listInfo">
8
+         <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 10px;">
6 9
             <div>医疗机构名称:{{$store.getters.xt_user.org.org_name}}</div>
7 10
         </div>
8 11
         <div class="listInfo">
@@ -11,7 +14,7 @@
11 14
             <div>门诊号:{{his_patient.number}}</div>
12 15
             <div>姓名:{{patient.name}}</div>
13 16
         </div>
14
-         <div class="listInfo">
17
+         <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 20px;">
15 18
             <div>预交款:</div>
16 19
             <div>总费用:{{getAllPice()}}</div>
17 20
             <div>门诊日期:</div>
@@ -36,19 +39,19 @@
36 39
             <div>护理费:</div>
37 40
             <div>床位费:{{bedCostTotal}}</div>
38 41
         </div>
39
-        <div class="listInfo">
42
+        <div class="listInfo" style="margin-bottom: 20px;">
40 43
             <div>麻醉费:</div>
41 44
             <div>材料费:{{materialCostTotal}}</div>
42 45
             <div>其他:{{otherCostTotal}}</div>
43 46
         </div>
44 47
         <table class="listTable" border="1">
45 48
             <tr>
46
-                <td style="width:19%;text-align:center" >费用分类</td>
47
-                <td style="width:10%;text-align:center">项目名称</td>
48
-                <td style="width:31%;text-align:center">规格</td>
49
-                <td style="width:14%;text-align:center">单价</td>
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>
50 53
                 <td style="width:10%;text-align:center" >数量</td>
51
-                <td style="width:6%;text-align:center">金额</td>
54
+                <td style="width:10%;text-align:center">金额</td>
52 55
                 <td style="width:10%;text-align:center" >医保类型</td>
53 56
             </tr>
54 57
             <tr v-for="(item, index) in list" :key="index">
@@ -83,6 +86,7 @@
83 86
 </template>
84 87
 
85 88
 <script>
89
+  import print from "print-js";
86 90
   import { uParseTime } from '@/utils/tools'
87 91
   import { getGatherDetailList } from '@/api/his/his_tools'
88 92
   export default {
@@ -105,6 +109,17 @@
105 109
         }
106 110
     },
107 111
     methods:{
112
+      printtpage() {
113
+      const style =
114
+        '@media print {.list-print{width:960px;margin:0 auto} .listTitle {font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo {display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;}.listTable {width: 100%;text-align: center;border-collapse: collapse;line-height: 25px;font-size: 14px;border-color: #000;text-align: left;} .listTable tr td {padding: 0 5px;}.tableBottom {font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne {margin-right: 40px;}';
115
+      printJS({
116
+        printable: "list-print",
117
+        type: "html",
118
+        style: style,
119
+        scanStyles: false,
120
+      });
121
+    },
122
+
108 123
       getNowTime: function () {
109 124
         let dateTime;
110 125
         let yy = new Date().getFullYear();
@@ -574,4 +589,8 @@
574 589
 .tableBottomOne{
575 590
     margin-right: 40px;
576 591
 }
592
+.print_btn {
593
+  display: flex;
594
+  justify-content: flex-end;
595
+}
577 596
 </style>

+ 595 - 0
src/xt_pages/outpatientTool/gatherPrintInvoice.vue Dosyayı Görüntüle

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