printOne.vue 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <div id="list-print" class="list-print">
  3. <div v-for='(i,index) in pageArr.length' :key="index">
  4. <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用清单</div>
  5. <div class="listInfo">
  6. <div>患者姓名:{{patient.name}}</div>
  7. <div v-if="$store.getters.xt_user.org.id != 10191">透析号:{{patient.dialysis_no}}</div>
  8. <div v-if="$store.getters.xt_user.org.id == 10191">身份证号:{{patient.id_card_no}}</div>
  9. <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
  10. <div>年龄:{{patient.age}} 岁</div>
  11. <div v-if="order.settle_type == 1">收费日期:{{getTimes(order.settle_accounts_date)}}</div>
  12. <div v-if="order.settle_type == 2">收费日期:{{getTimes(order.settle_start_time)}} 至 {{getTimes(order.settle_end_time)}}</div>
  13. </div>
  14. <table class="listTable" border="1">
  15. <tr>
  16. <td style="width:15%">开方日期</td>
  17. <td style="width:10%">类别</td>
  18. <td style="width:10%">医保编码</td>
  19. <td style="width:30%">项目名称</td>
  20. <td style="width:10%">规格</td>
  21. <td style="width:10%">单价(元)</td>
  22. <td style="width:6%">数量</td>
  23. <td style="width:10%">金额(元)</td>
  24. </tr>
  25. <tr v-for="item in list.slice(index * 13,(index * 13) + pageArr[index])">
  26. <td style="width:15%">{{item.p_time}}</td>
  27. <td style="width:10%">{{item.med_chrgitm_type}}</td>
  28. <td style="width:10%">{{item.code}}</td>
  29. <td style="width:30%">{{item.name}}</td>
  30. <td style="width:10%">{{item.spec}}</td>
  31. <td style="width:10%">{{item.price}}</td>
  32. <td style="width:6%">{{item.count}}{{item.unit}}</td>
  33. <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
  34. </tr>
  35. </table>
  36. <div class="tableBottom">
  37. <div class="tableBottomOne">制表人:{{admin.user_name}}</div>
  38. <div class="tableBottomOne">制表日期:{{ getNowTime()}}</div>
  39. <div class="tableBottomOne">总费用:{{order.medfee_sumamt}}元</div>
  40. <div class="tableBottomOne">基金总额:{{order.fund_pay_sumamt}}元</div>
  41. <div class="tableBottomOne">统筹支付:{{order.hifp_pay}}元</div>
  42. <div class="tableBottomOne">医疗救助:{{order.maf_pay}}元</div>
  43. <div class="tableBottomOne">医保报销:{{order.fund_pay_sumamt}}元</div>
  44. <div class="tableBottomOne">个人支付:{{order.psn_cash_pay}}元</div>
  45. </div>
  46. </div>
  47. </div>
  48. </template>
  49. <script>
  50. import { uParseTime } from '@/utils/tools'
  51. export default {
  52. props: {
  53. list: {
  54. type: Array,
  55. default: function () {
  56. return [];
  57. }
  58. },
  59. patient: {
  60. type: Object,
  61. default: function () {
  62. return {};
  63. }
  64. }, order: {
  65. type: Object,
  66. default: function () {
  67. return {};
  68. }
  69. }, admin: {
  70. type: Object,
  71. default: function () {
  72. return {};
  73. }
  74. },
  75. },
  76. data(){
  77. return{
  78. page:1,
  79. pageArr:[],
  80. }
  81. },
  82. // mounted(){
  83. // this.getPage()
  84. // },
  85. methods:{
  86. getNowTime: function () {
  87. let dateTime
  88. let yy = new Date().getFullYear()
  89. let mm = new Date().getMonth() + 1
  90. let dd = new Date().getDate()
  91. let hh = new Date().getHours()
  92. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
  93. :
  94. new Date().getMinutes()
  95. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
  96. :
  97. new Date().getSeconds()
  98. dateTime = yy + '-' + mm + '-' + dd
  99. return dateTime
  100. },
  101. getTimes(time) {
  102. return uParseTime(time, '{y}-{m}-{d}')
  103. },
  104. getPage(){
  105. if(this.list.length <= 15){
  106. this.page = 1
  107. this.pageArr.push(this.list.length)
  108. }else if(this.list.length > 15){
  109. this.page = parseInt(this.list.length / 15)
  110. let num = this.list.length % 15
  111. for (var i=0;i<this.page;i++){
  112. this.pageArr.push(15)
  113. }
  114. if(num != 0){
  115. this.pageArr.push(num)
  116. }
  117. }
  118. }
  119. },
  120. watch:{
  121. list: {
  122. handler(newVal) {
  123. this.getPage()
  124. },
  125. deep: true
  126. }
  127. }
  128. }
  129. </script>
  130. <style lang="scss" scoped>
  131. .list-print{
  132. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  133. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  134. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  135. margin-bottom: 20px;
  136. padding:20px 10px;
  137. }
  138. .listTitle{
  139. font-size: 24px;
  140. text-align: center;
  141. font-weight: bold;
  142. margin-bottom: 10px;
  143. }
  144. .listInfo{
  145. display: flex;
  146. font-size: 16px;
  147. justify-content: space-between;
  148. margin: 10px 0;
  149. }
  150. .listTable{
  151. width: 100%;
  152. text-align: center;
  153. border-collapse: collapse;
  154. line-height: 20px;
  155. font-size: 14px;
  156. border-color: #000;
  157. text-align: left;
  158. }
  159. .listTable tr td {
  160. padding: 0 5px;
  161. }
  162. .tableBottom{
  163. font-size: 12px;
  164. display: flex;
  165. margin-top: 20px;
  166. }
  167. .tableBottomOne{
  168. margin-right: 20px;
  169. }
  170. </style>