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

printOne.vue 4.6KB

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