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

statementPrint.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  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 :info="info"></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 axios from 'axios'
  25. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  26. import print from "print-js";
  27. import printOne from "./statementTemplate/printOne"
  28. import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
  29. export default {
  30. name: "dialysisPrintOrder",
  31. components: {
  32. BreadCrumb,
  33. printOne
  34. },
  35. props:{
  36. paramsObj:Object
  37. },
  38. data() {
  39. return {
  40. crumbs: [
  41. { path: false, name: '门诊医生站' },
  42. { path: false, name: '打印' }
  43. ],
  44. record_date:"",
  45. patientTableData:[],
  46. advicePrint:[],
  47. hisPatient:{},
  48. patient:{},
  49. search_input:"",
  50. loading:false,
  51. patient_id:0,
  52. prescription_id:0,
  53. ids:'',
  54. info:null,
  55. };
  56. },
  57. methods:{
  58. printThisPage() {
  59. var ptime = Math.round(new Date().getTime() / 1000);
  60. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  61. const style =
  62. '@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: 16px;border-color: #000;}}';
  63. printJS({
  64. printable: "statement-print",
  65. type: "html",
  66. style: style,
  67. scanStyles: false
  68. });
  69. // if (this.org_template_info.template_id == 1) {
  70. // printJS({
  71. // printable: "dialysis-print-box",
  72. // type: "html",
  73. // style: style,
  74. // scanStyles: false
  75. // });
  76. // }
  77. },
  78. getAllDoctorList(){
  79. getAllDoctorList().then(response=>{
  80. if(response.data.state == 1){
  81. var doctor = response.data.data.doctor
  82. this.doctorList = doctor
  83. }
  84. })
  85. },
  86. getAllHisPatientList(){
  87. const params = {
  88. record_date:this.record_date
  89. }
  90. getAllHisPatientList(params).then(response=>{
  91. if(response.data.state == 1){
  92. this.patientTableData = response.data.data.list
  93. this.patientTableDataTwo = response.data.data.list
  94. console.log('222', this.patientTableData)
  95. let cal_one = 0
  96. let cal_two = 0
  97. for (let i = 0; i < response.data.data.list.length; i++) {
  98. if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
  99. cal_one = cal_one + 1
  100. }
  101. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  102. cal_two = cal_two + 1
  103. }
  104. }
  105. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  106. // console.log(this.patientTableData[0])
  107. // this.choosePatient(this.patientTableData[0])
  108. this.cal_one = cal_one
  109. this.cal_two = cal_two
  110. }
  111. })
  112. },
  113. changePatient(row){
  114. console.log("row",row)
  115. this.patient_id = row.patient_id
  116. this.record_date = this.record_date
  117. this.prescription_id = this.prescription_id
  118. // var params = {
  119. // patient_id:row.patient_id,
  120. // record_date:this.record_date,
  121. // prescription_id:this.prescription_id,
  122. // }
  123. // getPrescriptionPrint(params).then(response=>{
  124. // if(response.data.state == 1){
  125. // var advicePrint = response.data.data.advicePrint
  126. // console.log("adviceprint",advicePrint)
  127. // this.advicePrint = advicePrint
  128. // // var hisPatient = response.data.data.hisPatient
  129. // // console.log("hispatient",hisPatient)
  130. // // this.hisPatient = hisPatient
  131. // var patient = response.data.data.patient
  132. // console.log("patient",patient)
  133. // this.patient = patient
  134. // var doctorPorject = response.data.data.doctorPorject
  135. // console.log("doctorporject",doctorPorject)
  136. // }
  137. // })
  138. },
  139. searchAction(){
  140. },
  141. getInfo(order_id) {
  142. if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
  143. var that = this
  144. axios.get('http://127.0.0.1:9532/api/settle/query', {
  145. params: {
  146. order_id: order_id,
  147. }
  148. })
  149. .then(function (response) {
  150. if (response.data.state == 0) {
  151. this.$message.error(response.data.msg)
  152. return false
  153. } else {
  154. console.log("logloglog")
  155. console.log(response.data.data.info)
  156. that.info = response.data.data.info
  157. console.log(that.info)
  158. that.info['bed_cost_total'] = response.data.data.bedCostTotal
  159. that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal
  160. that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal
  161. that.info['operation_cost_total'] = response.data.data.operationCostTotal
  162. that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal
  163. that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal
  164. that.info['other_cost_total'] = response.data.data.otherCostTotal
  165. that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal
  166. that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal
  167. that.info['material_cost_total'] = response.data.data.materialCostTotal
  168. that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal
  169. that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal
  170. that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal
  171. that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal
  172. that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal
  173. that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal
  174. that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal
  175. that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal
  176. that.info['check_cost_total'] = response.data.data.checkCostTotal
  177. that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal
  178. that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal
  179. that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal
  180. that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal
  181. that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal
  182. that.info['treat_cost_total'] = response.data.data.treatCostTotal
  183. that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal
  184. that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal
  185. console.log(this.info)
  186. }
  187. })
  188. .catch(function (error) {
  189. });
  190. }
  191. }
  192. },
  193. created() {
  194. this.getInfo(this.paramsObj.order_id)
  195. },
  196. watch:{
  197. paramsObj:{//深度监听,可监听到对象、数组的变化
  198. handler(val, oldVal){
  199. this.paramsObj = val
  200. this.getInfo(this.paramsObj.order_id)
  201. },
  202. deep:true
  203. }
  204. }
  205. };
  206. </script>
  207. <style>
  208. .dialysis-print-order {
  209. width: 960px;
  210. margin: 0 auto;
  211. }
  212. .dialysis-print-order .order-yy-name {
  213. margin: auto;
  214. text-align: center;
  215. font-size: 20px;
  216. letter-spacing: 5px;
  217. }
  218. .dialysis-print-order .order-title {
  219. margin: auto;
  220. font-weight: 600;
  221. text-align: center;
  222. font-size: 22px;
  223. padding: 10px;
  224. }
  225. .dialysis-print-order .table-box {
  226. width: 100%;
  227. line-height: 23px;
  228. font-size: 14px;
  229. }
  230. .dialysis-print-order .print-table {
  231. width: 100%;
  232. text-align: center;
  233. border-collapse: collapse;
  234. line-height: 40px;
  235. font-size: 14px;
  236. border-color: #000;
  237. }
  238. .dialysis-print-order .print-table-no {
  239. width: 100%;
  240. text-align: center;
  241. border-collapse: collapse;
  242. font-size: 14px;
  243. }
  244. .dialysis-print-order .under-line {
  245. border-bottom: 1px solid #999;
  246. width: 95%;
  247. text-align: center;
  248. margin-left: 2px;
  249. }
  250. .dialysis-print-order .title-box {
  251. text-align: center;
  252. font-size: 16px;
  253. }
  254. .dialysis-print-order .radio-lebel-box {
  255. font-weight: 400;
  256. cursor: pointer;
  257. }
  258. .dialysis-print-order .radio-no {
  259. opacity: 0;
  260. outline: none;
  261. position: absolute;
  262. margin: 0;
  263. width: 0;
  264. height: 0;
  265. z-index: -1;
  266. }
  267. .dialysis-print-order .radio-inner {
  268. white-space: nowrap;
  269. cursor: pointer;
  270. outline: none;
  271. display: inline-block;
  272. line-height: 1;
  273. position: relative;
  274. vertical-align: middle;
  275. }
  276. .dialysis-print-order .radio-fang {
  277. display: inline-block;
  278. position: relative;
  279. border: 1px solid #000;
  280. box-sizing: border-box;
  281. width: 14px;
  282. height: 14px;
  283. background-color: #fff;
  284. z-index: 1;
  285. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  286. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  287. }
  288. .dialysis-print-order .is-checked-radio::after {
  289. content: "√";
  290. font-size: 15px;
  291. }
  292. .dialysis-print-order .print-table-no tr td {
  293. padding: 8px 5px;
  294. line-height: 25px;
  295. }
  296. .dialysis-print-order .print-table tr td {
  297. padding: 1px 1px;
  298. /*line-height: 25px;*/
  299. }
  300. .es-img {
  301. height: 30px;
  302. }
  303. .advice-name {
  304. text-align: left;
  305. }
  306. .advice-children {
  307. display: flex;
  308. }
  309. .title-box-pro {
  310. border: 0 #fff;
  311. line-height: 25px;
  312. height: 25px;
  313. text-align: left;
  314. padding-left: 10px !important;
  315. }
  316. .title-box-pro-tr {
  317. border: 0 #fff;
  318. }
  319. .text-align-left {
  320. text-align: left !important;
  321. padding-left: 10px !important;
  322. font-size: 14px !important;
  323. line-height: 25px;
  324. }
  325. .print-table-tr-new td {
  326. line-height: 20px !important;
  327. }
  328. .border-top-solid {
  329. border: solid 1px #000;
  330. }
  331. .print-template-two tr {
  332. line-height: 30px;
  333. }
  334. .table-box1 {
  335. border: 1px solid #000;
  336. width: 100%;
  337. line-height: 30px;
  338. font-size: 14px;
  339. border-collapse: collapse;
  340. }
  341. .table-box1 tr {
  342. border-bottom: 1px solid #000;
  343. }
  344. </style>
  345. <style lang="scss">
  346. .newContainer{
  347. .dialysisPage::-webkit-scrollbar {
  348. height: 15px;
  349. }
  350. .el-date-editor{
  351. .el-input__inner{
  352. padding-right:0px;
  353. }
  354. }
  355. .el-table td, .el-table th{
  356. text-align: center;
  357. }
  358. }
  359. .newContainer::-webkit-scrollbar{
  360. height: 15px !important;
  361. }
  362. </style>