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

newStatementPrintTwo.vue 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  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. <print-one v-if="org_id != 10138" :info="info"></print-one>
  17. <print-two v-else :info="info" :paramsObj="paramsObj" :balanceAccounts="balanceAccounts"></print-two>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import { parseTime } from '@/utils'
  23. import { getDialysisRecord } from '@/api/dialysis'
  24. import { getDataConfig } from '@/utils/data'
  25. import { jsGetAge, uParseTime } from '@/utils/tools'
  26. import { getPrivateExpenses } from '@/api/his/his'
  27. import axios from 'axios'
  28. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  29. import printOne from './newTreatTemplate/printOne'
  30. import printTwo from './newTreatTemplate/printTwo'
  31. export default {
  32. name: "newStatementPrintTwo",
  33. components: {
  34. BreadCrumb,
  35. printOne,
  36. printTwo
  37. },
  38. props:{
  39. paramsObj:Object
  40. },
  41. data() {
  42. return {
  43. crumbs: [
  44. { path: false, name: '门诊医生站' },
  45. { path: false, name: '打印' }
  46. ],
  47. record_date:"",
  48. patientTableData:[],
  49. advicePrint:[],
  50. hisPatient:{},
  51. patient:{},
  52. search_input:"",
  53. loading:false,
  54. patient_id:0,
  55. prescription_id:0,
  56. ids:'',
  57. info:null,
  58. org_id:'',
  59. balanceAccounts:{},
  60. num:0
  61. };
  62. },
  63. methods:{
  64. printThisPage() {
  65. var ptime = Math.round(new Date().getTime() / 1000);
  66. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  67. // const style =
  68. // '@media print {.printTitle{font-size: 20px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;font-size:12px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;font-size:12px;}.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;font-size:12px;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;font-size:12px;}.actionBar div{width:150px;}}';
  69. // printJS({
  70. // printable: "prescription-print",
  71. // type: "html",
  72. // style: style,
  73. // scanStyles: false
  74. // });
  75. if(this.$store.getters.xt_user.org_id == 10138){
  76. setTimeout(() => {
  77. const style =
  78. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 49%;}}}';
  79. const style2 =
  80. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 52%;}}}';
  81. const style3 =
  82. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 55%;}}}';
  83. const style4 =
  84. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 58%;}}}';
  85. const style5 =
  86. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 61%;}}}';
  87. const style6 =
  88. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 66%;}}}';
  89. const style7 =
  90. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 71%;}}}';
  91. const style8 =
  92. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 75%;}}}';
  93. const style9 =
  94. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 80%;}}}';
  95. const style10 =
  96. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 90%;}}}';
  97. const style11 =
  98. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 91%;}}}';
  99. const style12 =
  100. '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 91%;}}}';
  101. if(this.num >= 13){
  102. printJS({
  103. printable: "prescription-print",
  104. type: "html",
  105. style: style,
  106. scanStyles: false
  107. });
  108. }else if(this.num == 12){
  109. printJS({
  110. printable: "prescription-print",
  111. type: "html",
  112. style: style2,
  113. scanStyles: false
  114. });
  115. }else if(this.num == 11){
  116. printJS({
  117. printable: "prescription-print",
  118. type: "html",
  119. style: style3,
  120. scanStyles: false
  121. });
  122. }else if(this.num == 10){
  123. printJS({
  124. printable: "prescription-print",
  125. type: "html",
  126. style: style4,
  127. scanStyles: false
  128. });
  129. }else if(this.num == 9){
  130. printJS({
  131. printable: "prescription-print",
  132. type: "html",
  133. style: style5,
  134. scanStyles: false
  135. });
  136. }else if(this.num == 8){
  137. printJS({
  138. printable: "prescription-print",
  139. type: "html",
  140. style: style6,
  141. scanStyles: false
  142. });
  143. }else if(this.num == 7){
  144. printJS({
  145. printable: "prescription-print",
  146. type: "html",
  147. style: style7,
  148. scanStyles: false
  149. });
  150. }else if(this.num == 6){
  151. printJS({
  152. printable: "prescription-print",
  153. type: "html",
  154. style: style8,
  155. scanStyles: false
  156. });
  157. }else if(this.num == 5){
  158. printJS({
  159. printable: "prescription-print",
  160. type: "html",
  161. style: style9,
  162. scanStyles: false
  163. });
  164. }else if(this.num == 4){
  165. printJS({
  166. printable: "prescription-print",
  167. type: "html",
  168. style: style10,
  169. scanStyles: false
  170. });
  171. }else if(this.num == 3){
  172. printJS({
  173. printable: "prescription-print",
  174. type: "html",
  175. style: style11,
  176. scanStyles: false
  177. });
  178. }else if(this.num <= 2){
  179. printJS({
  180. printable: "prescription-print",
  181. type: "html",
  182. style: style12,
  183. scanStyles: false
  184. });
  185. }
  186. },500)
  187. }else{
  188. const style =
  189. '@media print {.printTitle{font-size: 20px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;font-size:12px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;font-size:12px;}.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;font-size:12px;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;font-size:12px;}.actionBar div{width:150px;}}';
  190. printJS({
  191. printable: "prescription-print",
  192. type: "html",
  193. style: style,
  194. scanStyles: false
  195. });
  196. }
  197. // if (this.org_template_info.template_id == 1) {
  198. // printJS({
  199. // printable: "dialysis-print-box",
  200. // type: "html",
  201. // style: style,
  202. // scanStyles: false
  203. // });
  204. // }
  205. },
  206. searchAction(){
  207. },
  208. getInfo(obj) {
  209. if (obj.balance_accounts_type == 2){
  210. let params = {
  211. his_patient_id: obj.his_patient_id,
  212. id: obj.order_id,
  213. }
  214. getPrivateExpenses(params).then(response => {
  215. if (response.data.state == 0) {
  216. this.$message.error(response.data.msg)
  217. return false
  218. } else {
  219. this.balanceAccounts = response.data.data
  220. let arr = []
  221. let obj = {
  222. type:1,
  223. details: [],
  224. total: 0
  225. }
  226. let obj2 = {
  227. type:2,
  228. details: [],
  229. total: 0
  230. }
  231. let obj3 = {
  232. type:3,
  233. details: [],
  234. total: 0
  235. }
  236. let num = 0
  237. this.balanceAccounts.order_info.map(item => {
  238. if(item.advice_id > 0){
  239. obj.details.push(item)
  240. obj.total += (item.pric * item.advice.prescribing_number)
  241. num++
  242. }else{
  243. if(item.project.type == 2){
  244. obj2.details.push(item)
  245. obj2.total += (item.pric * item.project.count)
  246. num++
  247. }else{
  248. obj3.details.push(item)
  249. obj3.total += (item.pric * item.project.count)
  250. num++
  251. }
  252. }
  253. })
  254. this.balanceAccounts.new_detail_list = []
  255. this.balanceAccounts.new_detail_list.push(obj)
  256. this.balanceAccounts.new_detail_list.push(obj2)
  257. this.balanceAccounts.new_detail_list.push(obj3)
  258. console.log(111,this.balanceAccounts)
  259. this.num = num
  260. console.log('this.num',this.num)
  261. }
  262. })
  263. }else {
  264. if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
  265. var that = this;
  266. axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
  267. params: obj
  268. })
  269. .then(function(response) {
  270. if (response.data.state == 0) {
  271. // this.$message.error(response.data.msg);
  272. return false
  273. } else {
  274. if (response.data.data.failed_code == -10) {
  275. // that.$message.error(response.data.data.msg)
  276. that.$confirm(response.data.data.msg, '医保错误信息', {
  277. confirmButtonText: '确 定',
  278. type: 'warning'
  279. }).then(() => {
  280. }).catch(() => {
  281. })
  282. } else {
  283. console.log("~~~~");
  284. that.info = response.data.data.result;
  285. console.log(that.info);
  286. that.info['patient_info'] = response.data.data.patient_info
  287. that.info['dialysis_no'] = response.data.data.dialysis_no
  288. that.info['org_code'] = response.data.data.org_code;
  289. that.info['patient_name'] = response.data.data.patient_name;
  290. that.info['doctor_code'] = response.data.data.doctor_code;
  291. that.info['doctor_name'] = response.data.data.doctor_name;
  292. if (response.data.data.health_card_no_two.length == 0) {
  293. that.info['health_card_no'] = response.data.data.health_card_no
  294. } else {
  295. that.info['health_card_no'] = response.data.data.health_card_no_two
  296. }
  297. that.info['order_number'] = response.data.data.order_number;
  298. that.info['department'] = response.data.data.department;
  299. that.info['yiliao_leibie'] = response.data.data.yiliao_leibie;
  300. that.info['before_money'] = response.data.data.before_money;
  301. that.info['after_money'] = response.data.data.after_money;
  302. that.info['org_name'] = that.$store.getters.xt_user.org.org_name;
  303. console.log("~~~~" + that.info);
  304. var name_arr = [];
  305. var spec_arr = [];
  306. var count_arr = [];
  307. var price_arr = [];
  308. var total_arr = [];
  309. for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
  310. name_arr.push(that.info.transBody.outputlist1[i].ake006);
  311. spec_arr.push(that.info.transBody.outputlist1[i].aka074);
  312. count_arr.push(that.info.transBody.outputlist1[i].akc226);
  313. price_arr.push(that.info.transBody.outputlist1[i].akc225);
  314. total_arr.push(that.info.transBody.outputlist1[i].akc264)
  315. }
  316. console.log("~~~" + that.info);
  317. that.info['name_arr'] = name_arr;
  318. that.info['spec_arr'] = spec_arr;
  319. that.info['count_arr'] = count_arr;
  320. that.info['price_arr'] = price_arr;
  321. that.info['total_arr'] = total_arr;
  322. that.info['record_date'] = obj.record_time;
  323. console.log("~~" + that.info)
  324. let type_arr = []
  325. for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
  326. type_arr.push(that.info.transBody.outputlist1[i].aka111)
  327. }
  328. let typeArr = that.unique(type_arr)
  329. that.info['new_detail_list'] = []
  330. for (let i = 0; i < typeArr.length; i++) {
  331. let obj = {
  332. aka111: typeArr[i],
  333. details: [],
  334. total: 0
  335. }
  336. for (let b = 0; b < that.info.transBody.outputlist1.length; b++) {
  337. if (typeArr[i] == that.info.transBody.outputlist1[b].aka111) {
  338. obj.details.push(that.info.transBody.outputlist1[b])
  339. obj.total += that.info.transBody.outputlist1[b].akc264
  340. }
  341. }
  342. that.info.new_detail_list.push(obj)
  343. let num = 0
  344. that.info.new_detail_list.map(item => {
  345. num++
  346. })
  347. that.num = num
  348. console.log('this.num222',that.num)
  349. }
  350. }
  351. }
  352. })
  353. .catch(function(error) {
  354. });
  355. }
  356. }
  357. }, unique(array) {
  358. // res用来存储结果
  359. var res = []
  360. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  361. for (var j = 0, resLen = res.length; j < resLen; j++) {
  362. if (array[i] === res[j] ) {
  363. break
  364. }
  365. }
  366. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  367. if (j === resLen) {
  368. res.push(array[i])
  369. }
  370. }
  371. return res
  372. },
  373. },
  374. created() {
  375. this.org_id = this.$store.getters.xt_user.org_id
  376. this.getInfo(this.paramsObj)
  377. },
  378. watch:{
  379. paramsObj:{//深度监听,可监听到对象、数组的变化
  380. handler(val, oldVal){
  381. this.paramsObj = val;
  382. this.getInfo(this.paramsObj)
  383. },
  384. deep:true
  385. }
  386. }
  387. };
  388. </script>
  389. <style>
  390. .dialysis-print-order {
  391. width: 960px;
  392. margin: 0 auto;
  393. }
  394. .dialysis-print-order .order-yy-name {
  395. margin: auto;
  396. text-align: center;
  397. font-size: 20px;
  398. letter-spacing: 5px;
  399. }
  400. .dialysis-print-order .order-title {
  401. margin: auto;
  402. font-weight: 600;
  403. text-align: center;
  404. font-size: 22px;
  405. padding: 10px;
  406. }
  407. .dialysis-print-order .table-box {
  408. width: 100%;
  409. line-height: 23px;
  410. font-size: 14px;
  411. }
  412. .dialysis-print-order .print-table {
  413. width: 100%;
  414. text-align: center;
  415. border-collapse: collapse;
  416. line-height: 40px;
  417. font-size: 14px;
  418. border-color: #000;
  419. }
  420. .dialysis-print-order .print-table-no {
  421. width: 100%;
  422. text-align: center;
  423. border-collapse: collapse;
  424. font-size: 14px;
  425. }
  426. .dialysis-print-order .under-line {
  427. border-bottom: 1px solid #999;
  428. width: 95%;
  429. text-align: center;
  430. margin-left: 2px;
  431. }
  432. .dialysis-print-order .title-box {
  433. text-align: center;
  434. font-size: 16px;
  435. }
  436. .dialysis-print-order .radio-lebel-box {
  437. font-weight: 400;
  438. cursor: pointer;
  439. }
  440. .dialysis-print-order .radio-no {
  441. opacity: 0;
  442. outline: none;
  443. position: absolute;
  444. margin: 0;
  445. width: 0;
  446. height: 0;
  447. z-index: -1;
  448. }
  449. .dialysis-print-order .radio-inner {
  450. white-space: nowrap;
  451. cursor: pointer;
  452. outline: none;
  453. display: inline-block;
  454. line-height: 1;
  455. position: relative;
  456. vertical-align: middle;
  457. }
  458. .dialysis-print-order .radio-fang {
  459. display: inline-block;
  460. position: relative;
  461. border: 1px solid #000;
  462. box-sizing: border-box;
  463. width: 14px;
  464. height: 14px;
  465. background-color: #fff;
  466. z-index: 1;
  467. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  468. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  469. }
  470. .dialysis-print-order .is-checked-radio::after {
  471. content: "√";
  472. font-size: 15px;
  473. }
  474. .dialysis-print-order .print-table-no tr td {
  475. padding: 8px 5px;
  476. line-height: 25px;
  477. }
  478. .dialysis-print-order .print-table tr td {
  479. padding: 1px 1px;
  480. /*line-height: 25px;*/
  481. }
  482. .es-img {
  483. height: 30px;
  484. }
  485. .advice-name {
  486. text-align: left;
  487. }
  488. .advice-children {
  489. display: flex;
  490. }
  491. .title-box-pro {
  492. border: 0 #fff;
  493. line-height: 25px;
  494. height: 25px;
  495. text-align: left;
  496. padding-left: 10px !important;
  497. }
  498. .title-box-pro-tr {
  499. border: 0 #fff;
  500. }
  501. .text-align-left {
  502. text-align: left !important;
  503. padding-left: 10px !important;
  504. font-size: 14px !important;
  505. line-height: 25px;
  506. }
  507. .print-table-tr-new td {
  508. line-height: 20px !important;
  509. }
  510. .border-top-solid {
  511. border: solid 1px #000;
  512. }
  513. .print-template-two tr {
  514. line-height: 30px;
  515. }
  516. .table-box1 {
  517. border: 1px solid #000;
  518. width: 100%;
  519. line-height: 30px;
  520. font-size: 14px;
  521. border-collapse: collapse;
  522. }
  523. .table-box1 tr {
  524. border-bottom: 1px solid #000;
  525. }
  526. </style>
  527. <style lang="scss">
  528. .newContainer{
  529. .dialysisPage::-webkit-scrollbar {
  530. height: 15px;
  531. }
  532. .el-date-editor{
  533. .el-input__inner{
  534. padding-right:0px;
  535. }
  536. }
  537. .el-table td, .el-table th{
  538. text-align: center;
  539. }
  540. }
  541. .newContainer::-webkit-scrollbar{
  542. height: 15px !important;
  543. }
  544. </style>