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

newStatementPrint.vue 13KB

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