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

newStatementPrintTwo.vue 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  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 && org_id != 10278" :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 || this.$store.getters.xt_user.org_id == 10278){
  76. setTimeout(() => {
  77. const style =
  78. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 47%;}}}';
  79. const style2 =
  80. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 50%;}}}';
  81. const style3 =
  82. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 55%;}}}';
  83. const style4 =
  84. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 58%;}}}';
  85. const style5 =
  86. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 61%;}}}';
  87. const style6 =
  88. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 66%;}}}';
  89. const style7 =
  90. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 71%;}}}';
  91. const style8 =
  92. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 75%;}}}';
  93. const style9 =
  94. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 80%;}}}';
  95. const style10 =
  96. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 85%;}}}';
  97. const style11 =
  98. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 87%;}}}';
  99. const style12 =
  100. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 89%;}}}';
  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 obj4 = {
  237. type:4,
  238. details: [],
  239. total: 0
  240. }
  241. let num = 0
  242. this.balanceAccounts.order_info.map(item => {
  243. if(item.advice_id > 0){
  244. obj.details.push(item)
  245. obj.total += (item.pric * item.advice.prescribing_number)
  246. num++
  247. }else{
  248. if(item.project.type == 2){
  249. if (item.project.team_id > 0) {
  250. obj2.details.push(item)
  251. obj2.total += (item.pric * item.project.count)
  252. num++
  253. }else{
  254. obj2.details.push(item)
  255. obj2.total += (item.pric * item.project.count)
  256. num++
  257. }
  258. }else{
  259. obj3.details.push(item)
  260. obj3.total += (item.pric * item.project.count)
  261. num++
  262. }
  263. }
  264. })
  265. this.balanceAccounts.new_detail_list = []
  266. this.balanceAccounts.new_detail_list.push(obj)
  267. this.balanceAccounts.new_detail_list.push(obj2)
  268. this.balanceAccounts.new_detail_list.push(obj3)
  269. console.log(111,this.balanceAccounts)
  270. this.num = num
  271. console.log('this.num',this.num)
  272. }
  273. })
  274. }else {
  275. 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) {
  276. var that = this;
  277. axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
  278. params: obj
  279. })
  280. .then(function(response) {
  281. if (response.data.state == 0) {
  282. // this.$message.error(response.data.msg);
  283. return false
  284. } else {
  285. if (response.data.data.failed_code == -10) {
  286. // that.$message.error(response.data.data.msg)
  287. that.$confirm(response.data.data.msg, '医保错误信息', {
  288. confirmButtonText: '确 定',
  289. type: 'warning'
  290. }).then(() => {
  291. }).catch(() => {
  292. })
  293. } else {
  294. console.log("~~~~");
  295. that.info = response.data.data.result;
  296. console.log(that.info);
  297. that.info['patient_info'] = response.data.data.patient_info
  298. that.info['dialysis_no'] = response.data.data.dialysis_no
  299. that.info['org_code'] = response.data.data.org_code;
  300. that.info['patient_name'] = response.data.data.patient_name;
  301. that.info['doctor_code'] = response.data.data.doctor_code;
  302. that.info['doctor_name'] = response.data.data.doctor_name;
  303. if (response.data.data.health_card_no_two.length == 0) {
  304. that.info['health_card_no'] = response.data.data.health_card_no
  305. } else {
  306. that.info['health_card_no'] = response.data.data.health_card_no_two
  307. }
  308. that.info['order_number'] = response.data.data.order_number;
  309. that.info['department'] = response.data.data.department;
  310. that.info['yiliao_leibie'] = response.data.data.yiliao_leibie;
  311. that.info['before_money'] = response.data.data.before_money;
  312. that.info['after_money'] = response.data.data.after_money;
  313. that.info['org_name'] = that.$store.getters.xt_user.org.org_name;
  314. console.log("~~~~" + that.info);
  315. var name_arr = [];
  316. var spec_arr = [];
  317. var count_arr = [];
  318. var price_arr = [];
  319. var total_arr = [];
  320. for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
  321. name_arr.push(that.info.transBody.outputlist1[i].ake006);
  322. spec_arr.push(that.info.transBody.outputlist1[i].aka074);
  323. count_arr.push(that.info.transBody.outputlist1[i].akc226);
  324. price_arr.push(that.info.transBody.outputlist1[i].akc225);
  325. total_arr.push(that.info.transBody.outputlist1[i].akc264)
  326. }
  327. that.info['name_arr'] = name_arr;
  328. that.info['spec_arr'] = spec_arr;
  329. that.info['count_arr'] = count_arr;
  330. that.info['price_arr'] = price_arr;
  331. that.info['total_arr'] = total_arr;
  332. that.info['record_date'] = obj.record_time;
  333. let type_arr = []
  334. for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
  335. type_arr.push(that.info.transBody.outputlist1[i].aka111)
  336. }
  337. let typeArr = that.unique(type_arr)
  338. that.info['new_detail_list'] = []
  339. for (let i = 0; i < typeArr.length; i++) {
  340. let obj = {
  341. aka111: typeArr[i],
  342. details: [],
  343. total: 0
  344. }
  345. for (let b = 0; b < that.info.transBody.outputlist1.length; b++) {
  346. if (typeArr[i] == that.info.transBody.outputlist1[b].aka111) {
  347. obj.details.push(that.info.transBody.outputlist1[b])
  348. obj.total += that.info.transBody.outputlist1[b].akc264
  349. }
  350. }
  351. that.info.new_detail_list.push(obj)
  352. }
  353. let num = 0
  354. that.info.new_detail_list.map(item => {
  355. if(item.details.length > 0){
  356. item.details.map(it => {
  357. num++
  358. })
  359. }
  360. })
  361. that.num = num
  362. if(that.org_id == 10138){
  363. let newTotal = 0
  364. for (var i = that.info.transBody.outputlist2.length - 1; i >= 0; i--) {
  365. if(that.info.transBody.outputlist2[i].aka111 == '07') {
  366. console.log('0707007')
  367. newTotal += that.info.transBody.outputlist2[i].bka058
  368. }
  369. if(that.info.transBody.outputlist2[i].aka111 == '19'){
  370. console.log('191919')
  371. newTotal += that.info.transBody.outputlist2[i].bka058
  372. }
  373. console.log(8888888,that.info.transBody.outputlist2)
  374. }
  375. console.log(1111111111111)
  376. let aka111obj = {
  377. aka111:'99',
  378. bka058:newTotal
  379. }
  380. console.log('aka111obj',aka111obj)
  381. let newOutputlist2 = []
  382. newOutputlist2.push(aka111obj)
  383. that.info.transBody.outputlist2.map(item => {
  384. if(item.aka111 != '07' && item.aka111 != '19'){
  385. newOutputlist2.push(item)
  386. }
  387. })
  388. that.info.transBody.outputlist2 = newOutputlist2
  389. }
  390. console.log('that.info.transBody.outputlist2',that.info.transBody.outputlist2)
  391. console.log('this.num222',that.num)
  392. }
  393. }
  394. })
  395. .catch(function(error) {
  396. });
  397. }
  398. }
  399. }, unique(array) {
  400. // res用来存储结果
  401. var res = []
  402. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  403. for (var j = 0, resLen = res.length; j < resLen; j++) {
  404. if (array[i] === res[j] ) {
  405. break
  406. }
  407. }
  408. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  409. if (j === resLen) {
  410. res.push(array[i])
  411. }
  412. }
  413. return res
  414. },
  415. },
  416. created() {
  417. this.org_id = this.$store.getters.xt_user.org_id
  418. this.getInfo(this.paramsObj)
  419. },
  420. watch:{
  421. paramsObj:{//深度监听,可监听到对象、数组的变化
  422. handler(val, oldVal){
  423. this.paramsObj = val;
  424. this.getInfo(this.paramsObj)
  425. },
  426. deep:true
  427. }
  428. }
  429. };
  430. </script>
  431. <style>
  432. .dialysis-print-order {
  433. width: 960px;
  434. margin: 0 auto;
  435. }
  436. .dialysis-print-order .order-yy-name {
  437. margin: auto;
  438. text-align: center;
  439. font-size: 20px;
  440. letter-spacing: 5px;
  441. }
  442. .dialysis-print-order .order-title {
  443. margin: auto;
  444. font-weight: 600;
  445. text-align: center;
  446. font-size: 22px;
  447. padding: 10px;
  448. }
  449. .dialysis-print-order .table-box {
  450. width: 100%;
  451. line-height: 23px;
  452. font-size: 14px;
  453. }
  454. .dialysis-print-order .print-table {
  455. width: 100%;
  456. text-align: center;
  457. border-collapse: collapse;
  458. line-height: 40px;
  459. font-size: 14px;
  460. border-color: #000;
  461. }
  462. .dialysis-print-order .print-table-no {
  463. width: 100%;
  464. text-align: center;
  465. border-collapse: collapse;
  466. font-size: 14px;
  467. }
  468. .dialysis-print-order .under-line {
  469. border-bottom: 1px solid #999;
  470. width: 95%;
  471. text-align: center;
  472. margin-left: 2px;
  473. }
  474. .dialysis-print-order .title-box {
  475. text-align: center;
  476. font-size: 16px;
  477. }
  478. .dialysis-print-order .radio-lebel-box {
  479. font-weight: 400;
  480. cursor: pointer;
  481. }
  482. .dialysis-print-order .radio-no {
  483. opacity: 0;
  484. outline: none;
  485. position: absolute;
  486. margin: 0;
  487. width: 0;
  488. height: 0;
  489. z-index: -1;
  490. }
  491. .dialysis-print-order .radio-inner {
  492. white-space: nowrap;
  493. cursor: pointer;
  494. outline: none;
  495. display: inline-block;
  496. line-height: 1;
  497. position: relative;
  498. vertical-align: middle;
  499. }
  500. .dialysis-print-order .radio-fang {
  501. display: inline-block;
  502. position: relative;
  503. border: 1px solid #000;
  504. box-sizing: border-box;
  505. width: 14px;
  506. height: 14px;
  507. background-color: #fff;
  508. z-index: 1;
  509. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  510. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  511. }
  512. .dialysis-print-order .is-checked-radio::after {
  513. content: "√";
  514. font-size: 15px;
  515. }
  516. .dialysis-print-order .print-table-no tr td {
  517. padding: 8px 5px;
  518. line-height: 25px;
  519. }
  520. .dialysis-print-order .print-table tr td {
  521. padding: 1px 1px;
  522. /*line-height: 25px;*/
  523. }
  524. .es-img {
  525. height: 30px;
  526. }
  527. .advice-name {
  528. text-align: left;
  529. }
  530. .advice-children {
  531. display: flex;
  532. }
  533. .title-box-pro {
  534. border: 0 #fff;
  535. line-height: 25px;
  536. height: 25px;
  537. text-align: left;
  538. padding-left: 10px !important;
  539. }
  540. .title-box-pro-tr {
  541. border: 0 #fff;
  542. }
  543. .text-align-left {
  544. text-align: left !important;
  545. padding-left: 10px !important;
  546. font-size: 14px !important;
  547. line-height: 25px;
  548. }
  549. .print-table-tr-new td {
  550. line-height: 20px !important;
  551. }
  552. .border-top-solid {
  553. border: solid 1px #000;
  554. }
  555. .print-template-two tr {
  556. line-height: 30px;
  557. }
  558. .table-box1 {
  559. border: 1px solid #000;
  560. width: 100%;
  561. line-height: 30px;
  562. font-size: 14px;
  563. border-collapse: collapse;
  564. }
  565. .table-box1 tr {
  566. border-bottom: 1px solid #000;
  567. }
  568. </style>
  569. <style lang="scss">
  570. .newContainer{
  571. .dialysisPage::-webkit-scrollbar {
  572. height: 15px;
  573. }
  574. .el-date-editor{
  575. .el-input__inner{
  576. padding-right:0px;
  577. }
  578. }
  579. .el-table td, .el-table th{
  580. text-align: center;
  581. }
  582. }
  583. .newContainer::-webkit-scrollbar{
  584. height: 15px !important;
  585. }
  586. </style>