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

drugDamagePrint.vue 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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="printTitle">药品调价登记单</div>
  14. <div class="flex">
  15. <div>药库类别:</div>
  16. <div>调价日期:</div>
  17. </div>
  18. <div class="flex">
  19. <div>单据编号:</div>
  20. <div>打印日期:{{nowtime}}</div>
  21. </div>
  22. <div class="tableTitle">
  23. <div style="width:8%">货号</div>
  24. <div style="width:8%">药品名称</div>
  25. <div style="width:8%">规格</div>
  26. <div style="width:8%">单位</div>
  27. <div style="width:8%">批次</div>
  28. <div style="width:8%">调价数量</div>
  29. <div style="width:8%">原进货价</div>
  30. <div style="width:8%">新进货价</div>
  31. <div style="width:8%">进货差价</div>
  32. <div style="width:8%">原零售价</div>
  33. <div style="width:8%">新零售价</div>
  34. <div style="width:8%">零售差价</div>
  35. </div>
  36. <div class="tableTr" v-for="(item,index) in this.tableData" :key="index">
  37. <div style="width:8%"></div>
  38. <div style="width:8%">{{item.drug_name}}</div>
  39. <div style="width:8%"></div>
  40. <div style="width:8%">{{item.warehousing_unit}}</div>
  41. <div style="width:8%">{{item.number}}</div>
  42. <div style="width:8%">{{item.count}}</div>
  43. <div style="width:8%">{{item.retail_price}}</div>
  44. <div style="width:8%">{{item.new_price}}</div>
  45. <div style="width:8%"></div>
  46. <div style="width:8%">{{item.retail_price}}</div>
  47. <div style="width:8%">{{item.new_price}}</div>
  48. <div style="width:8%"></div>
  49. </div>
  50. <div class="tableBottom">
  51. <div style="width:8%">合计:</div>
  52. <div style="width:8%"></div>
  53. <div style="width:8%"></div>
  54. <div style="width:8%"></div>
  55. <div style="width:8%"></div>
  56. <div style="width:8%"></div>
  57. <div style="width:8%"></div>
  58. <div style="width:8%"></div>
  59. <div style="width:8%"></div>
  60. <div style="width:8%"></div>
  61. <div style="width:8%"></div>
  62. <div style="width:8%"></div>
  63. </div>
  64. <div style="display:flex;margin-top:1px;float:right;margin-top:10px;">
  65. <div style="width:80px;">审批:</div><div style="width:100px;"></div>
  66. <div style="width:100px;">药材主任:</div><div style="width:60px;"></div>
  67. <div style="width:50px;">会计:</div><div style="width:100px;"></div>
  68. <div style="width:50px;">审核:</div><div style="width:100px;"></div>
  69. <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </template>
  75. <script>
  76. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  77. const moment = require('moment');
  78. import { uParseTime } from '@/utils/tools'
  79. import { getDrugDamagePrint } from "@/api/drug/drug"
  80. export default {
  81. components:{
  82. BreadCrumb
  83. },
  84. data(){
  85. return{
  86. crumbs: [
  87. { path: false, name: '库存管理' },
  88. { path: false, name: '耗材管理' },
  89. { path: false, name: '药品调价打印' },
  90. ],
  91. ids:"",
  92. tableData:[],
  93. nowtime: moment(new Date()).format('YYYY-MM-DD'),
  94. }
  95. },
  96. methods:{
  97. printAction: function() {
  98. const style = '@media print { .printTitle{font-size: 22px;text-align: center;}.flex{display: flex;justify-content: space-between;}.tableTitle{display: flex;border-top:1px solid #000;border-bottom: 1px solid #000;padding: 10px 0;}.tableTr{display: flex;border-bottom: 1px dashed #000;padding: 10px 0;}.tableBottom{display: flex;border-bottom: 1px solid #000;padding: 10px 0;} }';
  99. printJS({
  100. printable: 'print_content',
  101. type: 'html',
  102. documentTitle: ' ',
  103. style: style,
  104. scanStyles: false
  105. })
  106. },
  107. getDrugDamagePrint(ids){
  108. var params = {
  109. ids:ids,
  110. }
  111. getDrugDamagePrint(params).then(response=>{
  112. if(response.data.state == 1){
  113. console.log("hhhhh",response.data.data.list)
  114. this.tableData = response.data.data.list
  115. }
  116. })
  117. }
  118. },
  119. created(){
  120. this.ids = this.$route.query.ids
  121. this.getDrugDamagePrint(this.ids)
  122. }
  123. }
  124. </script>
  125. <style rel="stylesheet/scss" lang="scss" scoped>
  126. .printTitle{font-size: 22px;text-align: center;}
  127. .flex{display: flex;justify-content: space-between;}
  128. .tableTitle{display: flex;border-top:1px solid #000;border-bottom: 1px solid #000;padding: 10px 0;}
  129. .tableTr{display: flex;border-bottom: 1px dashed #000;padding: 10px 0;}
  130. .tableBottom{display: flex;border-bottom: 1px solid #000;padding: 10px 0;}
  131. </style>