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

dialysisDrugs_print.vue 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <el-row style="float:right;">
  6. <el-col :span="24">
  7. <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
  8. </el-col>
  9. </el-row>
  10. </div>
  11. <div class="app-container" style="background-color: white;">
  12. <div id="print_content">
  13. <div class="print_main_content">
  14. <div class="order_title_panl">
  15. <span class="main_title">透析参数统计表</span>
  16. </div>
  17. <div style="display:flex;justify-content: space-between;margin-bottom:10px;">
  18. <p>统计时间:{{start_time}}-{{end_time}}</p>
  19. <p>打印单日期:{{print_time}}</p>
  20. </div>
  21. <div class="table_panel">
  22. <table class="table">
  23. <thead>
  24. <tr>
  25. <td width="120">商品类型</td>
  26. <td width="120">规格名称</td>
  27. <td width="120">数量</td>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. <tr v-for='(item,index) in tableData' :key="index">
  32. <td>抗凝剂</td>
  33. <td>
  34. <span v-if="item.anticoagulant==1">无肝素</span>
  35. <span v-if="item.anticoagulant==2">普通肝素</span>
  36. <span v-if="item.anticoagulant==3">低分子肝素</span>
  37. <span v-if="item.anticoagulant==4">阿加曲班</span>
  38. <span v-if="item.anticoagulant==5">枸橼酸钠</span>
  39. <span v-if="item.anticoagulant==6">低分子肝素钙</span>
  40. <span v-if="item.anticoagulant==7">低分子肝素钠</span>
  41. <span v-if="item.anticoagulant==8">依诺肝素</span>
  42. <span v-if="item.anticoagulant==9">达肝素</span>
  43. <span v-if="item.anticoagulant==10">体外抗凝</span>
  44. <span v-if="item.anticoagulant==11">那屈肝素</span>
  45. </td>
  46. <td>
  47. {{item.count}}
  48. </td>
  49. </tr>
  50. </tbody>
  51. </table>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </template>
  58. <script>
  59. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  60. import { GetAnticoagulantCount} from "@/api/consumable"
  61. import print from 'print-js'
  62. const moment = require('moment')
  63. export default {
  64. components:{
  65. BreadCrumb
  66. },
  67. data(){
  68. return{
  69. crumbs: [
  70. { path: false, name: '耗材药品' },
  71. { path: false, name: '打印' }
  72. ],
  73. tableData:[],
  74. start_time:"",
  75. end_time:"",
  76. print_time:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  77. }
  78. },
  79. methods:{
  80. printAction: function() {
  81. const style = '@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
  82. printJS({
  83. printable: 'print_content',
  84. type: 'html',
  85. documentTitle: ' ',
  86. style: style,
  87. scanStyles: false
  88. })
  89. },
  90. getlist(startime,endtime){
  91. const params= {
  92. start_time:startime,
  93. end_time:endtime
  94. }
  95. GetAnticoagulantCount(params).then(response=>{
  96. if(response.data.state == 1){
  97. var count = response.data.data.count
  98. console.log("99999count",count)
  99. this.tableData = count
  100. }
  101. })
  102. }
  103. },
  104. created(){
  105. var startime = this.$route.query.startime
  106. console.log("startime3333",startime)
  107. var endtime = this.$route.query.endtime
  108. console.log("endtime6666",endtime)
  109. this.getlist(startime,endtime)
  110. this.start_time = startime
  111. this.end_time = endtime
  112. }
  113. }
  114. </script>
  115. <style rel="stylesheet/scss" lang="scss" scoped>
  116. .print_main_content {
  117. background-color: white;
  118. max-width: 1500px;
  119. margin: 0 auto;
  120. padding: 0 0 20px 0;
  121. .order_title_panl {
  122. text-align: center;
  123. .main_title {
  124. font-size: 18px;
  125. line-height: 40px;
  126. font-weight: 500;
  127. }
  128. }
  129. .table_panel {
  130. .table {
  131. width: 100%;
  132. border: 1px solid;
  133. border-collapse: collapse;
  134. padding: 2px;
  135. thead {
  136. tr {
  137. td {
  138. border: 1px solid;
  139. text-align: center;
  140. font-size: 20px;
  141. padding: 15px 5px;
  142. }
  143. }
  144. }
  145. tbody {
  146. tr {
  147. td {
  148. border: 1px solid;
  149. text-align: center;
  150. font-size: 18px;
  151. padding: 10px 5px;
  152. .proj {
  153. padding: 5px 0;
  154. text-align: left;
  155. .proj_title {
  156. font-size: 16px;
  157. font-weight: 500;
  158. line-height: 25px;
  159. }
  160. .proj_item {
  161. font-size: 15px;
  162. line-height: 20px;
  163. .zone_name {
  164. font-weight: 500;
  165. }
  166. }
  167. }
  168. }
  169. }
  170. }
  171. }
  172. }
  173. }
  174. </style>