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

invoicePrint.vue 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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. </template>
  13. <div class="app-container" style="padding-top:40px;" v-if="org_id != 10217 && org_id != 10485 && org_id != 10375 && org_id != 10567 "><!--&& org_id != 10188 && org_id != 0-->
  14. <div class='dialysisPage'>
  15. <div v-if="org_id != 10106 && org_id != 10215 && org_id != 4 && org_id != 10188 && org_id != 10217 && org_id != 10387&& org_id != 10210 && org_id != 10387 && org_id != 10480 && org_id != 0 " >
  16. <printOne v-if="org_id != 10088 && org_id != 10510 && org_id != 0" :paramsObj="invoiceParams"></printOne>
  17. <printThree v-if="org_id == 10088 " :paramsObj="invoiceParams"></printThree>
  18. <printfifteen v-if="org_id == 10510 " :paramsObj="invoiceParams"></printfifteen>
  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. <printthirteen v-if="org_id == 10188 || org_id == 0 " :paramsObj="invoiceParams"></printthirteen>
  24. <!-- <printEight v-if="org_id == 10387 || org_id == 0" :paramsObj="invoiceParams"></printEight>-->
  25. <print-eight v-if="org_id == 10387" :paramsObj="invoiceParams"></print-eight>
  26. <PrintNight v-if="org_id == 10210" :paramsObj="invoiceParams"></PrintNight>
  27. <!-- <PrintTen v-if="org_id == 10375 ||org_id == 0 " :paramsObj="invoiceParams"></PrintTen> -->
  28. <printtwelve :paramsObj="invoiceParams" v-if="org_id == 10480 "></printtwelve>
  29. </div>
  30. </div>
  31. <div class="app-container" style="padding-top:40px;" v-if="org_id == 10485">
  32. <div class='dialysisPage'>
  33. <print-eleven :paramsObj="invoiceParams"></print-eleven>
  34. </div>
  35. </div>
  36. <div class="app-container" style="" v-if="org_id == 10217 ">
  37. <div class='dialysisPage'>
  38. <printSix :paramsObj="invoiceParams"></printSix>
  39. </div>
  40. </div>
  41. <div class="app-container" style="padding-top:40px;" v-if="org_id == 10375">
  42. <div class='dialysisPage'>
  43. <print-ten :paramsObj="invoiceParams"></print-ten>
  44. </div>
  45. </div>
  46. <!-- <div class="app-container" v-if="org_id == 10567 ">
  47. <div class='dialysisPage'>
  48. <printfourteen :paramsObj="invoiceParams"></printfourteen>
  49. </div>
  50. </div> -->
  51. <!-- <div class="app-container" style="padding-top:30px;" v-if="org_id == 10188 || org_id == 0 ">
  52. <div class='dialysisPage'>
  53. <printthirteen :paramsObj="invoiceParams"></printthirteen>
  54. </div>
  55. </div> -->
  56. <!-- <div class="app-container" style="padding-top:40px;" v-if="org_id == 0">
  57. <div class='dialysisPage'>
  58. <printthirteen :paramsObj="invoiceParams"></printthirteen>
  59. </div>
  60. </div> -->
  61. </div>
  62. </template>
  63. <script>
  64. import printOne from './invoiceTemplate/printOne'
  65. import printTwo from './invoiceTemplate/printTwo'
  66. import printThree from './invoiceTemplate/printThree'
  67. import printFour from './invoiceTemplate/printFour'
  68. import printFive from './invoiceTemplate/printFive'
  69. import printSix from './invoiceTemplate/printSix'
  70. import printSeven from './invoiceTemplate/printSeven'
  71. import PrintEight from "./invoiceTemplate/printEight";
  72. import PrintNight from "./invoiceTemplate/PrintNight";
  73. import PrintTen from './invoiceTemplate/printTen'
  74. import PrintEleven from './invoiceTemplate/printEleven'
  75. import printtwelve from './invoiceTemplate/printtwelve'
  76. import printthirteen from './invoiceTemplate/printthirteen'
  77. import printfourteen from './invoiceTemplate/printfourteen'
  78. import printfifteen from './invoiceTemplate/printfifteen'
  79. export default {
  80. name: "invoicePrint",
  81. components: {
  82. PrintEleven,
  83. PrintNight,
  84. PrintEight,
  85. printOne,
  86. printTwo,
  87. printThree,
  88. printFour,
  89. printFive,
  90. printSix,
  91. printSeven,
  92. PrintTen,
  93. printtwelve,
  94. printthirteen,
  95. printfourteen,
  96. printfifteen
  97. },
  98. props:{
  99. invoiceParams:Object
  100. },
  101. data() {
  102. return {
  103. childResponse: {},
  104. // invoiceParams:{},
  105. org_id:''
  106. };
  107. },
  108. methods: {
  109. getAdminUser(id) {
  110. if (id == 0) {
  111. return "";
  112. }
  113. if (id == undefined) {
  114. return "";
  115. }
  116. for (let i = 0; i < this.adminUser.length; i++) {
  117. if (this.adminUser[i].id == id) {
  118. return this.adminUser[i].name;
  119. }
  120. }
  121. },
  122. getTime(value, temp) {
  123. if (value == 0) {
  124. return "";
  125. }
  126. if (value != undefined) {
  127. return uParseTime(value, temp);
  128. }
  129. return "";
  130. },
  131. printThisPage() {
  132. if (this.org_id == 10217){
  133. const style =
  134. // '@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;}}';
  135. '@media print {#invoice-print{font-size:12px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;}.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;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;}.actionBar div{width:150px;}}';
  136. printJS({
  137. printable: "invoice-print",
  138. type: "html",
  139. style: style,
  140. scanStyles: false
  141. });
  142. }else{
  143. const style =
  144. '@media print {#invoice-print{font-size:15px;}.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;}}';
  145. printJS({
  146. printable: "invoice-print",
  147. type: "html",
  148. style: style,
  149. scanStyles: false
  150. });
  151. }
  152. // if (this.org_template_info.template_id == 1) {
  153. // printJS({
  154. // printable: "dialysis-print-box",
  155. // type: "html",
  156. // style: style,
  157. // scanStyles: false
  158. // });
  159. // }
  160. },
  161. },
  162. created() {
  163. console.log('this.invoiceParams',this.invoiceParams)
  164. this.org_id = this.$store.getters.xt_user.org_id
  165. },
  166. watch:{
  167. paramsObj:{//深度监听,可监听到对象、数组的变化
  168. handler(val, oldVal){
  169. this.invoiceParams = val
  170. },
  171. deep:true
  172. }
  173. }
  174. };
  175. </script>
  176. <style lang="scss" scoped>
  177. .printTitle{
  178. font-size: 22px;
  179. text-align: center;
  180. font-weight: bold;
  181. }
  182. .infoMain{
  183. display: flex;
  184. flex-wrap: wrap;
  185. border-bottom: 2px solid #000;
  186. padding:0 10px;
  187. }
  188. .infoMain .infoP{
  189. width: 33%;
  190. line-height: 24px;
  191. }
  192. .prescriptionBox{
  193. padding:0 10px;
  194. height:600px;
  195. }
  196. .Rp{
  197. font-size: 22px;
  198. font-weight: bold;
  199. }
  200. .drugsBox{
  201. padding-left: 40px;
  202. margin-bottom: 10px;
  203. }
  204. .drugsBox p{
  205. line-height: 30px;
  206. }
  207. .drugsOne{
  208. line-height: 24px;
  209. }
  210. .drugsOne span{
  211. margin-right: 20px;
  212. }
  213. .doctorBox{
  214. display: flex;
  215. justify-content: space-between;
  216. padding:0 10px;
  217. line-height: 24px;
  218. border-bottom: 2px solid #000;
  219. }
  220. .actionBar{
  221. display: flex;
  222. justify-content: space-between;
  223. line-height: 24px;
  224. padding:0 10px;
  225. }
  226. .actionBar p{
  227. width:150px;
  228. }
  229. </style>