statementPrint.vue 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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. >打印
  12. </el-button
  13. >
  14. </template>
  15. <div class='dialysisPage' style="padding-top:40px;" v-if="this.$store.getters.xt_user.org_id == 10215">
  16. <private-charge-print :info="info" v-if="this.paramsObj.balance_accounts_type == 2"></private-charge-print>
  17. <printOne :info="info" v-else></printOne>
  18. </div>
  19. <div class='dialysisPage' style="padding-top:40px;" v-if="this.$store.getters.xt_user.org_id == 10265">
  20. <!-- <private-charge-print :info="info" v-if="this.paramsObj.balance_accounts_type == 2"></private-charge-print>-->
  21. <!-- <printOne :info="info" v-else></printOne>-->
  22. <!-- <print-one :info="info" ></print-one>-->
  23. <hospital-settle-print :info="info"></hospital-settle-print>
  24. </div>
  25. <!-- <div class='dialysisPage' style="padding-top:40px;" v-else>-->
  26. <!-- <private-charge-print :info="info" v-if="this.paramsObj.balance_accounts_type == 2"></private-charge-print>-->
  27. <!-- <printOne :info="info" v-else></printOne>-->
  28. <!-- </div>-->
  29. </div>
  30. </template>
  31. <script>
  32. import { uParseTime } from '@/utils/tools'
  33. import axios from 'axios'
  34. import { getPrivateExpensesOrder } from '@/api/his/his'
  35. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  36. import printOne from './statementTemplate/printOne'
  37. // import printOne from './settlementTemplate/hospitalPrintOne'
  38. import printTwo from './statementTemplate/printTwo'
  39. import { getAllDoctorList, getAllHisPatientList } from '@/api/project/project'
  40. import PrivateChargePrint from '../outpatientCharges/statementTemplate/privateChargePrint'
  41. import HospitalSettlePrint from './settlementTemplate/hospitalSettlePrint'
  42. export default {
  43. name: 'dialysisPrintOrder',
  44. components: {
  45. HospitalSettlePrint,
  46. PrivateChargePrint,
  47. BreadCrumb,
  48. printOne,
  49. printTwo
  50. },
  51. props: {
  52. paramsObj: Object
  53. },
  54. data() {
  55. return {
  56. crumbs: [
  57. { path: false, name: '门诊医生站' },
  58. { path: false, name: '打印' }
  59. ],
  60. record_date: '',
  61. patientTableData: [],
  62. advicePrint: [],
  63. hisPatient: {},
  64. patient: {},
  65. search_input: '',
  66. loading: false,
  67. patient_id: 0,
  68. prescription_id: 0,
  69. ids: '',
  70. info: null,
  71. org_id: ''
  72. }
  73. },
  74. methods: {
  75. printThisPage() {
  76. var ptime = Math.round(new Date().getTime() / 1000)
  77. this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
  78. if(this.org_id == 10265){
  79. const style =
  80. '@media print {.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;}}';
  81. const style1 = "@media print{#prescription-print{font-size:14px;}.title{text-align: center;font-size: 22px;font-weight: bold;}.row{display: flex;justify-content: space-between;}.under_line{border-bottom: 1px solid #999;width: 95%;text-align: center;margin-left: 2px;display: inline-block;}.inline_block{display: inline-block;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 14px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; /* 解决边框冲突 */border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid;text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}}";
  82. printJS({
  83. printable: "prescription-print",
  84. type: "html",
  85. style: style1,
  86. scanStyles: false
  87. });
  88. }else{
  89. const style =
  90. '@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;}}'
  91. printJS({
  92. printable: 'statement-print',
  93. type: 'html',
  94. style: style,
  95. scanStyles: false
  96. })
  97. }
  98. // if (this.org_template_info.template_id == 1) {
  99. // printJS({
  100. // printable: "dialysis-print-box",
  101. // type: "html",
  102. // style: style,
  103. // scanStyles: false
  104. // });
  105. // }
  106. },
  107. getAllDoctorList() {
  108. getAllDoctorList().then(response => {
  109. if (response.data.state == 1) {
  110. var doctor = response.data.data.doctor
  111. this.doctorList = doctor
  112. }
  113. })
  114. },
  115. getAllHisPatientList() {
  116. const params = {
  117. record_date: this.record_date
  118. }
  119. getAllHisPatientList(params).then(response => {
  120. if (response.data.state == 1) {
  121. this.patientTableData = response.data.data.list
  122. this.patientTableDataTwo = response.data.data.list
  123. console.log('222', this.patientTableData)
  124. let cal_one = 0
  125. let cal_two = 0
  126. for (let i = 0; i < response.data.data.list.length; i++) {
  127. if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
  128. cal_one = cal_one + 1
  129. }
  130. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  131. cal_two = cal_two + 1
  132. }
  133. }
  134. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  135. // console.log(this.patientTableData[0])
  136. // this.choosePatient(this.patientTableData[0])
  137. this.cal_one = cal_one
  138. this.cal_two = cal_two
  139. }
  140. })
  141. },
  142. changePatient(row) {
  143. console.log('row', row)
  144. this.patient_id = row.patient_id
  145. this.record_date = this.record_date
  146. this.prescription_id = this.prescription_id
  147. // var params = {
  148. // patient_id:row.patient_id,
  149. // record_date:this.record_date,
  150. // prescription_id:this.prescription_id,
  151. // }
  152. // getPrescriptionPrint(params).then(response=>{
  153. // if(response.data.state == 1){
  154. // var advicePrint = response.data.data.advicePrint
  155. // console.log("adviceprint",advicePrint)
  156. // this.advicePrint = advicePrint
  157. // // var hisPatient = response.data.data.hisPatient
  158. // // console.log("hispatient",hisPatient)
  159. // // this.hisPatient = hisPatient
  160. // var patient = response.data.data.patient
  161. // console.log("patient",patient)
  162. // this.patient = patient
  163. // var doctorPorject = response.data.data.doctorPorject
  164. // console.log("doctorporject",doctorPorject)
  165. // }
  166. // })
  167. },
  168. searchAction() {
  169. },
  170. getInfo(order_id, balance_accounts_type) {
  171. console.log(balance_accounts_type)
  172. var that = this
  173. if (balance_accounts_type == 2) {
  174. let params = {
  175. id: order_id,
  176. order_id: order_id,
  177. admin_user_id: this.$store.getters.xt_user.user.id
  178. }
  179. getPrivateExpensesOrder(params).then((response) => {
  180. if (response.data.state == 0) {
  181. // this.$message.error(response.data.msg)
  182. return false
  183. } else {
  184. var that = this
  185. that.info = response.data.data.info
  186. that.p_admin = response.data.data.printor_admin
  187. that.charge_admin = response.data.data.charge_admin
  188. that.info['p_admin'] = that.p_admin
  189. that.info['charge_admin'] = that.charge_admin
  190. that.info['order_number'] = response.data.data.order_number
  191. that.info['patient'] = response.data.data.patient
  192. that.info['date'] = response.data.data.date
  193. that.info['number'] = response.data.data.number
  194. that.info['order_infos'] = response.data.data.order_infos
  195. that.info['diagnosis'] = response.data.data.diagnosis
  196. that.info['fixmedins_name'] = response.data.data.org_name
  197. that.info['fixmedins_code'] = response.data.data.org_code
  198. that.info['his'] = response.data.data.his_hospital
  199. // that.info["doctor_code"] = response.data.data.doctor_code;
  200. // that.info["department"] = response.data.data.department;
  201. // that.info["health_card_no"] = response.data.data.health_card_no;
  202. that.info['bed_cost_total'] = response.data.data.bedCostTotal
  203. that.info['bed_cost_self_total'] =
  204. response.data.data.bedCostSelfTotal
  205. that.info['bed_cost_part_self_total'] =
  206. response.data.data.bedCostPartSelfTotal
  207. that.info['operation_cost_total'] =
  208. response.data.data.operationCostTotal
  209. that.info['operation_cost_self_total'] =
  210. response.data.data.operationCostSelfTotal
  211. that.info['operation_cost_part_self_total'] =
  212. response.data.data.operationCostPartSelfTotal
  213. that.info['other_cost_total'] = response.data.data.otherCostTotal
  214. that.info['other_cost_self_total'] =
  215. response.data.data.otherCostSelfTotal
  216. that.info['other_cost_part_self_total'] =
  217. response.data.data.otherCostPartSelfTotal
  218. that.info['material_cost_total'] =
  219. response.data.data.materialCostTotal
  220. that.info['material_cost_self_total'] =
  221. response.data.data.materialCostSelfTotal
  222. that.info['material_cost_part_self_total'] =
  223. response.data.data.materialCostPartSelfTotal
  224. that.info['western_medicine_cost_total'] =
  225. response.data.data.westernMedicineCostTotal
  226. that.info['western_medicine_cost_self_total'] =
  227. response.data.data.westernMedicineCostSelfTotal
  228. that.info['western_medicine_cost_part_self_total'] =
  229. response.data.data.westernMedicineCostPartSelfTotal
  230. that.info['chinese_traditional_medicine_cost_total'] =
  231. response.data.data.chineseTraditionalMedicineCostTotal
  232. that.info['chinese_traditional_medicine_cost_self_total'] =
  233. response.data.data.chineseTraditionalMedicineCostSelfTotal
  234. that.info['chinese_traditional_medicine_cost_part_self_total'] =
  235. response.data.data.chineseTraditionalMedicineCostPartSelfTotal
  236. that.info['check_cost_total'] = response.data.data.checkCostTotal
  237. that.info['check_cost_self_total'] =
  238. response.data.data.checkCostSelfTotal
  239. that.info['check_cost_part_self_total'] =
  240. response.data.data.checkCostPartSelfTotal
  241. that.info['laboratory_cost_total'] =
  242. response.data.data.laboratoryCostTotal
  243. that.info['laboratory_cost_self_total'] =
  244. response.data.data.laboratoryCostSelfTotal
  245. that.info['laboratory_cost_part_self_total'] =
  246. response.data.data.laboratoryCostPartSelfTotal
  247. that.info['treat_cost_total'] = response.data.data.treatCostTotal
  248. that.info['treat_cost_self_total'] =
  249. response.data.data.treatCostSelfTotal
  250. that.info['treat_cost_part_self_total'] =
  251. response.data.data.treatCostPartSelfTotal
  252. that.info['date'] = response.data.data.date
  253. // that.info["number"] = response.data.data.number;
  254. that.info['order_infos'] = response.data.data.order_infos
  255. that.info['diagnosis'] = response.data.data.diagnosis
  256. }
  257. })
  258. } else {
  259. axios.get('http://127.0.0.1:9532/api/settle/query', {
  260. params: {
  261. order_id: order_id,
  262. admin_user_id: this.$store.getters.xt_user.user.id
  263. }
  264. })
  265. .then(function(response) {
  266. if (response.data.state == 0) {
  267. this.$message.error(response.data.msg)
  268. return false
  269. } else {
  270. console.log('logloglog')
  271. console.log(response.data.data.info)
  272. that.info = response.data.data.info
  273. console.log(that.info)
  274. that.p_admin = response.data.data.printor_admin
  275. that.charge_admin = response.data.data.charge_admin
  276. that.order_infos = response.data.data
  277. that.info['patient'] = response.data.data.patient
  278. that.info['diagnosis'] = response.data.data.diagnosis
  279. that.info['p_admin'] = that.p_admin
  280. that.info['charge_admin'] = that.charge_admin
  281. that.info['fixmedins_name'] = response.data.data.org_name
  282. that.info['fixmedins_code'] = response.data.data.org_code
  283. that.info['order'] = response.data.data.order
  284. that.info['date'] = response.data.data.date
  285. that.info['number'] = response.data.data.number
  286. that.info['order_infos'] = response.data.data.order_infos
  287. that.info['diagnosis'] = response.data.data.diagnosis
  288. that.info['dia_config'] = response.data.data.dia_config
  289. that.info['doctor_info'] = response.data.data.doctor_info
  290. that.info['bed_cost_total'] = response.data.data.bedCostTotal
  291. that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal
  292. that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal
  293. that.info['operation_cost_total'] = response.data.data.operationCostTotal
  294. that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal
  295. that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal
  296. that.info['other_cost_total'] = response.data.data.otherCostTotal
  297. that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal
  298. that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal
  299. that.info['material_cost_total'] = response.data.data.materialCostTotal
  300. that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal
  301. that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal
  302. that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal
  303. that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal
  304. that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal
  305. that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal
  306. that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal
  307. that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal
  308. that.info['check_cost_total'] = response.data.data.checkCostTotal
  309. that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal
  310. that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal
  311. that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal
  312. that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal
  313. that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal
  314. that.info['treat_cost_total'] = response.data.data.treatCostTotal
  315. that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal
  316. that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal
  317. that.info['date'] = response.data.data.date
  318. that.info['number'] = response.data.data.number
  319. that.info['order_infos'] = response.data.data.order_infos
  320. that.info['diagnosis'] = response.data.data.diagnosis
  321. that.info['his'] = response.data.data.his_hospital
  322. }
  323. })
  324. .catch(function(error) {
  325. })
  326. }
  327. }
  328. },
  329. created() {
  330. this.getInfo(this.paramsObj.order_id, this.paramsObj.balance_accounts_type)
  331. this.org_id = this.$store.getters.xt_user.org_id
  332. },
  333. watch: {
  334. paramsObj: {//深度监听,可监听到对象、数组的变化
  335. handler(val, oldVal) {
  336. this.paramsObj = val
  337. this.getInfo(this.paramsObj.order_id, this.paramsObj.balance_accounts_type)
  338. },
  339. deep: true
  340. }
  341. }
  342. }
  343. </script>
  344. <style>
  345. .dialysis-print-order {
  346. width: 960px;
  347. margin: 0 auto;
  348. }
  349. .dialysis-print-order .order-yy-name {
  350. margin: auto;
  351. text-align: center;
  352. font-size: 20px;
  353. letter-spacing: 5px;
  354. }
  355. .dialysis-print-order .order-title {
  356. margin: auto;
  357. font-weight: 600;
  358. text-align: center;
  359. font-size: 22px;
  360. padding: 10px;
  361. }
  362. .dialysis-print-order .table-box {
  363. width: 100%;
  364. line-height: 23px;
  365. font-size: 14px;
  366. }
  367. .dialysis-print-order .print-table {
  368. width: 100%;
  369. text-align: center;
  370. border-collapse: collapse;
  371. line-height: 40px;
  372. font-size: 14px;
  373. border-color: #000;
  374. }
  375. .dialysis-print-order .print-table-no {
  376. width: 100%;
  377. text-align: center;
  378. border-collapse: collapse;
  379. font-size: 14px;
  380. }
  381. .dialysis-print-order .under-line {
  382. border-bottom: 1px solid #999;
  383. width: 95%;
  384. text-align: center;
  385. margin-left: 2px;
  386. }
  387. .dialysis-print-order .title-box {
  388. text-align: center;
  389. font-size: 16px;
  390. }
  391. .dialysis-print-order .radio-lebel-box {
  392. font-weight: 400;
  393. cursor: pointer;
  394. }
  395. .dialysis-print-order .radio-no {
  396. opacity: 0;
  397. outline: none;
  398. position: absolute;
  399. margin: 0;
  400. width: 0;
  401. height: 0;
  402. z-index: -1;
  403. }
  404. .dialysis-print-order .radio-inner {
  405. white-space: nowrap;
  406. cursor: pointer;
  407. outline: none;
  408. display: inline-block;
  409. line-height: 1;
  410. position: relative;
  411. vertical-align: middle;
  412. }
  413. .dialysis-print-order .radio-fang {
  414. display: inline-block;
  415. position: relative;
  416. border: 1px solid #000;
  417. box-sizing: border-box;
  418. width: 14px;
  419. height: 14px;
  420. background-color: #fff;
  421. z-index: 1;
  422. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  423. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  424. }
  425. .dialysis-print-order .is-checked-radio::after {
  426. content: "√";
  427. font-size: 15px;
  428. }
  429. .dialysis-print-order .print-table-no tr td {
  430. padding: 8px 5px;
  431. line-height: 25px;
  432. }
  433. .dialysis-print-order .print-table tr td {
  434. padding: 1px 1px;
  435. /*line-height: 25px;*/
  436. }
  437. .es-img {
  438. height: 30px;
  439. }
  440. .advice-name {
  441. text-align: left;
  442. }
  443. .advice-children {
  444. display: flex;
  445. }
  446. .title-box-pro {
  447. border: 0 #fff;
  448. line-height: 25px;
  449. height: 25px;
  450. text-align: left;
  451. padding-left: 10px !important;
  452. }
  453. .title-box-pro-tr {
  454. border: 0 #fff;
  455. }
  456. .text-align-left {
  457. text-align: left !important;
  458. padding-left: 10px !important;
  459. font-size: 14px !important;
  460. line-height: 25px;
  461. }
  462. .print-table-tr-new td {
  463. line-height: 20px !important;
  464. }
  465. .border-top-solid {
  466. border: solid 1px #000;
  467. }
  468. .print-template-two tr {
  469. line-height: 30px;
  470. }
  471. .table-box1 {
  472. border: 1px solid #000;
  473. width: 100%;
  474. line-height: 30px;
  475. font-size: 14px;
  476. border-collapse: collapse;
  477. }
  478. .table-box1 tr {
  479. border-bottom: 1px solid #000;
  480. }
  481. </style>
  482. <style lang="scss">
  483. .newContainer {
  484. .dialysisPage::-webkit-scrollbar {
  485. height: 15px;
  486. }
  487. .el-date-editor {
  488. .el-input__inner {
  489. padding-right: 0px;
  490. }
  491. }
  492. .el-table td, .el-table th {
  493. text-align: center;
  494. }
  495. }
  496. .newContainer::-webkit-scrollbar {
  497. height: 15px !important;
  498. }
  499. </style>