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

printOne.vue 5.2KB

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