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

allSummaryDialog_print.vue 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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_date}}</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>
  33. <span v-if="item.stage == 1">{{item.type_name}}</span>
  34. <span v-if="item.stage == 2">抗凝剂</span>
  35. </td>
  36. <td>
  37. <span v-if="item.stage == 1">{{item.specification_name}}</span>
  38. <span v-if="item.stage == 2 && item.anticoagulant == 1">无肝素</span>
  39. <span v-if="item.stage == 2 && item.anticoagulant == 2">普通肝素</span>
  40. <span v-if="item.stage == 2 && item.anticoagulant == 3">低分子肝素</span>
  41. <span v-if="item.stage == 2 && item.anticoagulant == 4">阿加曲班</span>
  42. <span v-if="item.stage == 2 && item.anticoagulant == 5">枸橼酸钠</span>
  43. <span v-if="item.stage == 2 && item.anticoagulant == 6">低分子肝素钙</span>
  44. <span v-if="item.stage == 2 && item.anticoagulant == 7">低分子肝素钠</span>
  45. <span v-if="item.stage == 2 && item.anticoagulant == 8">依诺肝素</span>
  46. <span v-if="item.stage == 2 && item.anticoagulant == 9">达肝素</span>
  47. <span v-if="item.stage == 2 && item.anticoagulant == 10">体外抗凝</span>
  48. </td>
  49. <td>{{item.count}}</td>
  50. </tr>
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </template>
  59. <script>
  60. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  61. import print from 'print-js'
  62. import {getGatherList} from "@/api/consumable"
  63. const moment = require('moment')
  64. export default {
  65. components:{
  66. BreadCrumb
  67. },
  68. data(){
  69. return{
  70. crumbs: [
  71. { path: false, name: '耗材药品' },
  72. { path: false, name: '打印' }
  73. ],
  74. tableData:[],
  75. start_time:"",
  76. end_time:"",
  77. print_date:"",
  78. }
  79. },
  80. methods:{
  81. printAction: function() {
  82. 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; } }'
  83. printJS({
  84. printable: 'print_content',
  85. type: 'html',
  86. documentTitle: ' ',
  87. style: style,
  88. scanStyles: false
  89. })
  90. },
  91. getlist(startime,endtime){
  92. const params = {
  93. start_time:startime,
  94. end_time:endtime
  95. }
  96. getGatherList(params).then(response=>{
  97. if(response.data.state == 1){
  98. var arr = []
  99. var warehouselist = response.data.data.warehouselist
  100. for(let i=0;i<warehouselist.length;i++){
  101. warehouselist[i].stage = 1
  102. }
  103. console.log("warehouselist",warehouselist)
  104. arr.push(...warehouselist)
  105. var consumables = response.data.data.consumables
  106. var count = response.data.data.count
  107. for(let j=0;j<count.length;j++){
  108. count[j].stage = 2
  109. }
  110. arr.push(...count)
  111. console.log("arr344444",arr)
  112. this.tableData = arr
  113. }
  114. })
  115. }
  116. },
  117. created(){
  118. var startime = moment(new Date()).add('year',0).format("YYYY-MM-DD")
  119. this.print_date = startime
  120. var startime = this.$route.query.startime
  121. this.start_time = startime
  122. var endtime = this.$route.query.endtime
  123. this.end_time = endtime
  124. this.getlist(startime,endtime)
  125. }
  126. }
  127. </script>
  128. <style rel="stylesheet/scss" lang="scss" scoped>
  129. .print_main_content {
  130. background-color: white;
  131. max-width: 1500px;
  132. margin: 0 auto;
  133. padding: 0 0 20px 0;
  134. .order_title_panl {
  135. text-align: center;
  136. .main_title {
  137. font-size: 18px;
  138. line-height: 40px;
  139. font-weight: 500;
  140. }
  141. }
  142. .table_panel {
  143. .table {
  144. width: 100%;
  145. border: 1px solid;
  146. border-collapse: collapse;
  147. padding: 2px;
  148. thead {
  149. tr {
  150. td {
  151. border: 1px solid;
  152. text-align: center;
  153. font-size: 20px;
  154. padding: 15px 5px;
  155. }
  156. }
  157. }
  158. tbody {
  159. tr {
  160. td {
  161. border: 1px solid;
  162. text-align: center;
  163. font-size: 18px;
  164. padding: 10px 5px;
  165. .proj {
  166. padding: 5px 0;
  167. text-align: left;
  168. .proj_title {
  169. font-size: 16px;
  170. font-weight: 500;
  171. line-height: 25px;
  172. }
  173. .proj_item {
  174. font-size: 15px;
  175. line-height: 20px;
  176. .zone_name {
  177. font-weight: 500;
  178. }
  179. }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. }
  186. }
  187. </style>