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

invoicePrint.vue 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <div>
  3. <template>
  4. <el-button
  5. style="position:fixed;right:25px;z-index:999"
  6. :loading="loading"
  7. size="small"
  8. icon="el-icon-printer"
  9. @click="printThisPage"
  10. type="primary"
  11. >打印</el-button
  12. >
  13. </template>
  14. <div class="app-container" style="padding-top:40px;">
  15. <div class='dialysisPage'>
  16. <div v-if="org_id != 10106 && org_id != 10215 && org_id != 4" >
  17. <printOne v-if="org_id != 10088" :paramsObj="invoiceParams"></printOne>
  18. <printThree v-if="org_id == 10088" :paramsObj="invoiceParams"></printThree>
  19. </div>
  20. <printTwo v-if="org_id == 10106" :paramsObj="invoiceParams"></printTwo>
  21. <printFour v-if="org_id == 10215 || org_id == 4" :paramsObj="invoiceParams"></printFour>
  22. </div>
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. import printOne from './invoiceTemplate/printOne'
  28. import printTwo from './invoiceTemplate/printTwo'
  29. import printThree from './invoiceTemplate/printThree'
  30. import printFour from './invoiceTemplate/printFour'
  31. export default {
  32. name: "invoicePrint",
  33. components: {
  34. printOne,
  35. printTwo,
  36. printThree,
  37. printFour
  38. },
  39. props:{
  40. invoiceParams:Object
  41. },
  42. data() {
  43. return {
  44. childResponse: {},
  45. // invoiceParams:{},
  46. org_id:''
  47. };
  48. },
  49. methods: {
  50. getAdminUser(id) {
  51. if (id == 0) {
  52. return "";
  53. }
  54. if (id == undefined) {
  55. return "";
  56. }
  57. for (let i = 0; i < this.adminUser.length; i++) {
  58. if (this.adminUser[i].id == id) {
  59. return this.adminUser[i].name;
  60. }
  61. }
  62. },
  63. getTime(value, temp) {
  64. if (value == 0) {
  65. return "";
  66. }
  67. if (value != undefined) {
  68. return uParseTime(value, temp);
  69. }
  70. return "";
  71. },
  72. printThisPage() {
  73. const style =
  74. '@media print {#invoice-print{font-size:12px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
  75. printJS({
  76. printable: "invoice-print",
  77. type: "html",
  78. style: style,
  79. scanStyles: false
  80. });
  81. // if (this.org_template_info.template_id == 1) {
  82. // printJS({
  83. // printable: "dialysis-print-box",
  84. // type: "html",
  85. // style: style,
  86. // scanStyles: false
  87. // });
  88. // }
  89. },
  90. },
  91. created() {
  92. console.log('this.invoiceParams',this.invoiceParams)
  93. this.org_id = this.$store.getters.xt_user.org_id
  94. },
  95. watch:{
  96. paramsObj:{//深度监听,可监听到对象、数组的变化
  97. handler(val, oldVal){
  98. this.invoiceParams = val
  99. },
  100. deep:true
  101. }
  102. }
  103. };
  104. </script>
  105. <style lang="scss" scoped>
  106. .printTitle{
  107. font-size: 22px;
  108. text-align: center;
  109. font-weight: bold;
  110. }
  111. .infoMain{
  112. display: flex;
  113. flex-wrap: wrap;
  114. border-bottom: 2px solid #000;
  115. padding:0 10px;
  116. }
  117. .infoMain .infoP{
  118. width: 33%;
  119. line-height: 24px;
  120. }
  121. .prescriptionBox{
  122. padding:0 10px;
  123. height:600px;
  124. }
  125. .Rp{
  126. font-size: 22px;
  127. font-weight: bold;
  128. }
  129. .drugsBox{
  130. padding-left: 40px;
  131. margin-bottom: 10px;
  132. }
  133. .drugsBox p{
  134. line-height: 30px;
  135. }
  136. .drugsOne{
  137. line-height: 24px;
  138. }
  139. .drugsOne span{
  140. margin-right: 20px;
  141. }
  142. .doctorBox{
  143. display: flex;
  144. justify-content: space-between;
  145. padding:0 10px;
  146. line-height: 24px;
  147. border-bottom: 2px solid #000;
  148. }
  149. .actionBar{
  150. display: flex;
  151. justify-content: space-between;
  152. line-height: 24px;
  153. padding:0 10px;
  154. }
  155. .actionBar p{
  156. width:150px;
  157. }
  158. </style>