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

invoicePrint.vue 4.5KB

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