Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

printOne.vue 4.9KB

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