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

printOne.vue 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <div id='prescription-print' class="prescription-print">
  3. <div style="display:flex;justify-content: space-between;font-weight:bold;">
  4. <p style="width:300px;display:flex;justify-content: space-between;font-weight:bold;">
  5. <span>费别</span>
  6. <span>自费</span>
  7. <span>公费</span>
  8. <span>保险</span>
  9. <span>其他</span>
  10. </p>
  11. <p>就诊日期:{{this.$route.query.record}}</p>
  12. </div>
  13. <div class="printTitle">血液透析中心</div>
  14. <div class="printTitle">处方、治疗单</div>
  15. <div class="infoTitle">
  16. <p>门诊编号:34567876532345678</p>
  17. <p>电脑号:</p>
  18. </div>
  19. <div class="infoMain">
  20. <p style="margin-bottom: 10px;width:25%">姓名:{{patient.name}}</p>
  21. <p style="margin-bottom: 10px;width:25%">性别:
  22. <span v-if="patient.gender == 1">男</span>
  23. <span v-if="patient.gender == 2">女</span>
  24. </p>
  25. <p style="margin-bottom: 10px;width:25%">年龄:
  26. <span>{{patient.age}}</span>
  27. </p>
  28. <p style="margin-bottom: 10px;width:25%">参保类型:</p>
  29. <p style="margin-bottom: 10px;width:50%;">联系电话:{{patient.phone}}</p>
  30. <p style="width:50%;">地址:{{patient.unit_address}}</p>
  31. <p style="width:50%;">诊断:{{patient.diagnose}}</p>
  32. </div>
  33. <div class="prescriptionBox">
  34. <table style="width:100%;text-align:center;line-height:25px;">
  35. <tr>
  36. <td>序号</td>
  37. <td>项目名称</td>
  38. <td>数量</td>
  39. <td>单位</td>
  40. <td>单价</td>
  41. <td>部位</td>
  42. <td>备注</td>
  43. <td>天数</td>
  44. </tr>
  45. <tr v-for="(item,index) in this.tableData" :key="index">
  46. <td>{{index+1}}</td>
  47. <td>{{item.project_name}}</td>
  48. <td>{{item.single_dose}}</td>
  49. <td>{{item.unit}}</td>
  50. <td>{{item.price}}</td>
  51. <td></td>
  52. <td>{{item.remark}}</td>
  53. <td>{{item.day}}</td>
  54. </tr>
  55. </table>
  56. </div>
  57. <div class="infoTitle">
  58. <p>开单医生:{{getDoctor(this.prescriptionInfo[0].creator)?getDoctor(this.prescriptionInfo[0].creator):""}}</p>
  59. <p>签章:</p>
  60. </div>
  61. <div class="actionBar">
  62. <p>执行医生:{{getDoctor(this.prescriptionInfo[0].creator)?getDoctor(this.prescriptionInfo[0].creator):""}}</p>
  63. <p>费用:</p>
  64. </div>
  65. <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
  66. <tr>
  67. <td style="width:16%;">治疗时间</td>
  68. <td style="width:16%;"></td>
  69. <td style="width:16%;"></td>
  70. <td style="width:16%;"></td>
  71. <td style="width:16%;"></td>
  72. <td style="width:16%;"></td>
  73. </tr>
  74. <tr>
  75. <td style="width:16%;">医生签字</td>
  76. <td style="width:16%;"></td>
  77. <td style="width:16%;"></td>
  78. <td style="width:16%;"></td>
  79. <td style="width:16%;"></td>
  80. <td style="width:16%;"></td>
  81. </tr>
  82. <tr>
  83. <td style="width:16px;">患者签字</td>
  84. <td style="width:16px;"></td>
  85. <td style="width:16px;"></td>
  86. <td style="width:16px;"></td>
  87. <td style="width:16px;"></td>
  88. <td style="width:16px;"></td>
  89. </tr>
  90. </table>
  91. </div>
  92. </template>
  93. <script>
  94. import { jsGetAge, uParseTime } from '@/utils/tools'
  95. import {getAllDoctorList,getPrescriptionPrint} from "@/api/project/project"
  96. export default {
  97. props:{
  98. patient_id:Number,
  99. record_date:String,
  100. prescription_id:Number
  101. },
  102. data(){
  103. return {
  104. doctorList:[],
  105. advicePrint:{},
  106. patient:{},
  107. tableData:[],
  108. prescriptionInfo:[]
  109. }
  110. },
  111. methods:{
  112. printThisPage() {
  113. var ptime = Math.round(new Date().getTime() / 1000);
  114. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  115. const style =
  116. '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 1px;padding:0 10px;}.infoTitle p{width: 200px;}.otherInfo{display: flex;margin-top:10px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle p{width: 200px;}}';
  117. printJS({
  118. printable: "prescription-print",
  119. type: "html",
  120. style: style,
  121. scanStyles: false
  122. });
  123. },
  124. getAllDoctorList(){
  125. getAllDoctorList().then(response=>{
  126. if(response.data.state == 1){
  127. var doctor = response.data.data.doctor
  128. this.doctorList = doctor
  129. }
  130. })
  131. },
  132. getDoctor(id){
  133. var name = ""
  134. for(let i=0;i<this.doctorList.length;i++){
  135. if(id == this.doctorList[i].admin_user_id){
  136. name = this.doctorList[i].user_name
  137. }
  138. }
  139. return name
  140. },
  141. getTime(value, temp) {
  142. if (value != undefined) {
  143. return uParseTime(value, temp)
  144. }
  145. return ''
  146. },
  147. getPrescriptionPrint(){
  148. var params = {
  149. patient_id:this.patient_id,
  150. record_date:this.record_date,
  151. prescription_id:this.prescription_id,
  152. }
  153. console.log("params---",params)
  154. getPrescriptionPrint(params).then(response=>{
  155. if(response.data.state == 1){
  156. var advicePrint = response.data.data.advicePrint
  157. console.log("adviceprint",advicePrint)
  158. this.advicePrint = advicePrint
  159. var patient = response.data.data.patient
  160. console.log("patient",patient)
  161. this.patient = patient
  162. var doctorPorject = response.data.data.doctorPorject
  163. var arr = doctorPorject.project
  164. console.log("我的中谷歌",arr)
  165. for(let i=0;i<arr.length;i++){
  166. console.log("arr",arr[i].project_name)
  167. }
  168. this.tableData = arr
  169. console.log("3333",this.tableData)
  170. var prescriptioninfo = response.data.data.prescriptionInfo
  171. console.log("prescriptioninfo",prescriptioninfo)
  172. this.prescriptionInfo = prescriptioninfo
  173. }
  174. })
  175. }
  176. },
  177. created(){
  178. this.getAllDoctorList()
  179. },
  180. watch:{
  181. patient_id:function(val){
  182. console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
  183. this.getPrescriptionPrint()
  184. }
  185. }
  186. }
  187. </script>
  188. <style lang="scss" scoped>
  189. .printTitle{
  190. font-size: 22px;
  191. text-align: center;
  192. font-weight: bold;
  193. }
  194. .infoTitle{
  195. display: flex;
  196. border-bottom: 2px solid #000;
  197. margin-top:10px;
  198. line-height: 24px;
  199. padding:0 10px;
  200. }
  201. .infoTitle p{
  202. width: 300px;
  203. }
  204. .infoMain{
  205. display: flex;
  206. flex-wrap: wrap;
  207. border-bottom: 2px solid #000;
  208. padding:0 10px;
  209. }
  210. .infoMain p{
  211. width: 50%;
  212. line-height: 24px;
  213. }
  214. .prescriptionBox{
  215. padding:0 10px;
  216. min-height:600px;
  217. }
  218. .Rp{
  219. font-size: 22px;
  220. font-weight: bold;
  221. }
  222. .drugsBox{
  223. padding-left: 40px;
  224. margin-bottom: 10px;
  225. }
  226. .drugsBox p{
  227. line-height: 30px;
  228. }
  229. .drugsOne{
  230. line-height: 24px;
  231. }
  232. .drugsOne span{
  233. margin-right: 20px;
  234. }
  235. .actionBar{
  236. display: flex;
  237. justify-content: space-between;
  238. line-height: 24px;
  239. padding:0 10px;
  240. }
  241. .actionBar p{
  242. width:150px;
  243. }
  244. </style>