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

statementPrint.vue 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  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='dialysisPage' style="padding-top:40px;">
  15. <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. import { parseTime } from "@/utils";
  21. import { getDialysisRecord } from "@/api/dialysis";
  22. import { getDataConfig } from "@/utils/data";
  23. import { jsGetAge, uParseTime } from "@/utils/tools";
  24. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  25. import print from "print-js";
  26. import printOne from "./statementTemplate/printOne"
  27. import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
  28. export default {
  29. name: "dialysisPrintOrder",
  30. components: {
  31. BreadCrumb,
  32. printOne
  33. },
  34. props:{
  35. paramsObj:Object
  36. },
  37. data() {
  38. return {
  39. crumbs: [
  40. { path: false, name: '门诊医生站' },
  41. { path: false, name: '打印' }
  42. ],
  43. record_date:"",
  44. patientTableData:[],
  45. advicePrint:[],
  46. hisPatient:{},
  47. patient:{},
  48. search_input:"",
  49. loading:false,
  50. patient_id:0,
  51. prescription_id:0,
  52. ids:''
  53. };
  54. },
  55. methods:{
  56. printThisPage() {
  57. var ptime = Math.round(new Date().getTime() / 1000);
  58. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  59. const style =
  60. '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;}}';
  61. printJS({
  62. printable: "statement-print",
  63. type: "html",
  64. style: style,
  65. scanStyles: false
  66. });
  67. // if (this.org_template_info.template_id == 1) {
  68. // printJS({
  69. // printable: "dialysis-print-box",
  70. // type: "html",
  71. // style: style,
  72. // scanStyles: false
  73. // });
  74. // }
  75. },
  76. getAllDoctorList(){
  77. getAllDoctorList().then(response=>{
  78. if(response.data.state == 1){
  79. var doctor = response.data.data.doctor
  80. this.doctorList = doctor
  81. }
  82. })
  83. },
  84. getAllHisPatientList(){
  85. const params = {
  86. record_date:this.record_date
  87. }
  88. getAllHisPatientList(params).then(response=>{
  89. if(response.data.state == 1){
  90. this.patientTableData = response.data.data.list
  91. this.patientTableDataTwo = response.data.data.list
  92. console.log('222', this.patientTableData)
  93. let cal_one = 0
  94. let cal_two = 0
  95. for (let i = 0; i < response.data.data.list.length; i++) {
  96. if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
  97. cal_one = cal_one + 1
  98. }
  99. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  100. cal_two = cal_two + 1
  101. }
  102. }
  103. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  104. // console.log(this.patientTableData[0])
  105. // this.choosePatient(this.patientTableData[0])
  106. this.cal_one = cal_one
  107. this.cal_two = cal_two
  108. }
  109. })
  110. },
  111. changePatient(row){
  112. console.log("row",row)
  113. this.patient_id = row.patient_id
  114. this.record_date = this.record_date
  115. this.prescription_id = this.prescription_id
  116. // var params = {
  117. // patient_id:row.patient_id,
  118. // record_date:this.record_date,
  119. // prescription_id:this.prescription_id,
  120. // }
  121. // getPrescriptionPrint(params).then(response=>{
  122. // if(response.data.state == 1){
  123. // var advicePrint = response.data.data.advicePrint
  124. // console.log("adviceprint",advicePrint)
  125. // this.advicePrint = advicePrint
  126. // // var hisPatient = response.data.data.hisPatient
  127. // // console.log("hispatient",hisPatient)
  128. // // this.hisPatient = hisPatient
  129. // var patient = response.data.data.patient
  130. // console.log("patient",patient)
  131. // this.patient = patient
  132. // var doctorPorject = response.data.data.doctorPorject
  133. // console.log("doctorporject",doctorPorject)
  134. // }
  135. // })
  136. },
  137. searchAction(){
  138. }
  139. },
  140. created() {
  141. this.getAllDoctorList()
  142. var record_date = this.paramsObj.record
  143. this.record_date = record_date
  144. console.log("record_date",record_date)
  145. this.prescription_id = this.paramsObj.prescription_id
  146. this.patient_id = this.paramsObj.patient_id
  147. this.ids = this.paramsObj.ids
  148. this.getAllHisPatientList(record_date)
  149. },
  150. watch:{
  151. paramsObj:{//深度监听,可监听到对象、数组的变化
  152. handler(val, oldVal){
  153. this.paramsObj = val
  154. this.patient_id = this.paramsObj.patient_id
  155. var record_date = this.paramsObj.record
  156. this.record_date = record_date
  157. var prescription_id = this.paramsObj.prescription_id
  158. this.prescription_id = prescription_id
  159. this.ids = this.paramsObj.ids
  160. },
  161. deep:true
  162. }
  163. }
  164. };
  165. </script>
  166. <style>
  167. .dialysis-print-order {
  168. width: 960px;
  169. margin: 0 auto;
  170. }
  171. .dialysis-print-order .order-yy-name {
  172. margin: auto;
  173. text-align: center;
  174. font-size: 20px;
  175. letter-spacing: 5px;
  176. }
  177. .dialysis-print-order .order-title {
  178. margin: auto;
  179. font-weight: 600;
  180. text-align: center;
  181. font-size: 22px;
  182. padding: 10px;
  183. }
  184. .dialysis-print-order .table-box {
  185. width: 100%;
  186. line-height: 23px;
  187. font-size: 14px;
  188. }
  189. .dialysis-print-order .print-table {
  190. width: 100%;
  191. text-align: center;
  192. border-collapse: collapse;
  193. line-height: 40px;
  194. font-size: 14px;
  195. border-color: #000;
  196. }
  197. .dialysis-print-order .print-table-no {
  198. width: 100%;
  199. text-align: center;
  200. border-collapse: collapse;
  201. font-size: 14px;
  202. }
  203. .dialysis-print-order .under-line {
  204. border-bottom: 1px solid #999;
  205. width: 95%;
  206. text-align: center;
  207. margin-left: 2px;
  208. }
  209. .dialysis-print-order .title-box {
  210. text-align: center;
  211. font-size: 16px;
  212. }
  213. .dialysis-print-order .radio-lebel-box {
  214. font-weight: 400;
  215. cursor: pointer;
  216. }
  217. .dialysis-print-order .radio-no {
  218. opacity: 0;
  219. outline: none;
  220. position: absolute;
  221. margin: 0;
  222. width: 0;
  223. height: 0;
  224. z-index: -1;
  225. }
  226. .dialysis-print-order .radio-inner {
  227. white-space: nowrap;
  228. cursor: pointer;
  229. outline: none;
  230. display: inline-block;
  231. line-height: 1;
  232. position: relative;
  233. vertical-align: middle;
  234. }
  235. .dialysis-print-order .radio-fang {
  236. display: inline-block;
  237. position: relative;
  238. border: 1px solid #000;
  239. box-sizing: border-box;
  240. width: 14px;
  241. height: 14px;
  242. background-color: #fff;
  243. z-index: 1;
  244. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  245. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  246. }
  247. .dialysis-print-order .is-checked-radio::after {
  248. content: "√";
  249. font-size: 15px;
  250. }
  251. .dialysis-print-order .print-table-no tr td {
  252. padding: 8px 5px;
  253. line-height: 25px;
  254. }
  255. .dialysis-print-order .print-table tr td {
  256. padding: 1px 1px;
  257. /*line-height: 25px;*/
  258. }
  259. .es-img {
  260. height: 30px;
  261. }
  262. .advice-name {
  263. text-align: left;
  264. }
  265. .advice-children {
  266. display: flex;
  267. }
  268. .title-box-pro {
  269. border: 0 #fff;
  270. line-height: 25px;
  271. height: 25px;
  272. text-align: left;
  273. padding-left: 10px !important;
  274. }
  275. .title-box-pro-tr {
  276. border: 0 #fff;
  277. }
  278. .text-align-left {
  279. text-align: left !important;
  280. padding-left: 10px !important;
  281. font-size: 14px !important;
  282. line-height: 25px;
  283. }
  284. .print-table-tr-new td {
  285. line-height: 20px !important;
  286. }
  287. .border-top-solid {
  288. border: solid 1px #000;
  289. }
  290. .print-template-two tr {
  291. line-height: 30px;
  292. }
  293. .table-box1 {
  294. border: 1px solid #000;
  295. width: 100%;
  296. line-height: 30px;
  297. font-size: 14px;
  298. border-collapse: collapse;
  299. }
  300. .table-box1 tr {
  301. border-bottom: 1px solid #000;
  302. }
  303. </style>
  304. <style lang="scss">
  305. .newContainer{
  306. .dialysisPage::-webkit-scrollbar {
  307. height: 15px;
  308. }
  309. .el-date-editor{
  310. .el-input__inner{
  311. padding-right:0px;
  312. }
  313. }
  314. .el-table td, .el-table th{
  315. text-align: center;
  316. }
  317. }
  318. .newContainer::-webkit-scrollbar{
  319. height: 15px !important;
  320. }
  321. </style>