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

newStatementPrintTwo.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  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. };
  61. },
  62. methods:{
  63. printThisPage() {
  64. var ptime = Math.round(new Date().getTime() / 1000);
  65. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  66. // const style =
  67. // '@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;}}';
  68. // printJS({
  69. // printable: "prescription-print",
  70. // type: "html",
  71. // style: style,
  72. // scanStyles: false
  73. // });
  74. if(this.org_id == 10138){
  75. setTimeout(() => {
  76. const style =
  77. '@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%;}}}';
  78. printJS({
  79. printable: "prescription-print",
  80. type: "html",
  81. style: style,
  82. scanStyles: false
  83. });
  84. },500)
  85. }else{
  86. const style =
  87. '@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;}}';
  88. printJS({
  89. printable: "prescription-print",
  90. type: "html",
  91. style: style,
  92. scanStyles: false
  93. });
  94. }
  95. // if (this.org_template_info.template_id == 1) {
  96. // printJS({
  97. // printable: "dialysis-print-box",
  98. // type: "html",
  99. // style: style,
  100. // scanStyles: false
  101. // });
  102. // }
  103. },
  104. searchAction(){
  105. },
  106. getInfo(obj) {
  107. if (obj.balance_accounts_type == 2){
  108. let params = {
  109. his_patient_id: obj.his_patient_id,
  110. id: obj.order_id,
  111. }
  112. getPrivateExpenses(params).then(response => {
  113. if (response.data.state == 0) {
  114. this.$message.error(response.data.msg)
  115. return false
  116. } else {
  117. this.balanceAccounts = response.data.data
  118. let arr = []
  119. let obj = {
  120. type:1,
  121. details: [],
  122. total: 0
  123. }
  124. let obj2 = {
  125. type:2,
  126. details: [],
  127. total: 0
  128. }
  129. let obj3 = {
  130. type:3,
  131. details: [],
  132. total: 0
  133. }
  134. this.balanceAccounts.order_info.map(item => {
  135. if(item.advice_id > 0){
  136. obj.details.push(item)
  137. obj.total += (item.pric * item.advice.prescribing_number)
  138. }else{
  139. if(item.project.type == 2){
  140. obj2.details.push(item)
  141. obj2.total += (item.pric * item.project.count)
  142. }else{
  143. obj3.details.push(item)
  144. obj3.total += (item.pric * item.project.count)
  145. }
  146. }
  147. })
  148. this.balanceAccounts.new_detail_list = []
  149. this.balanceAccounts.new_detail_list.push(obj)
  150. this.balanceAccounts.new_detail_list.push(obj2)
  151. this.balanceAccounts.new_detail_list.push(obj3)
  152. console.log(111,this.balanceAccounts)
  153. }
  154. })
  155. }else {
  156. 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) {
  157. var that = this;
  158. axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
  159. params: obj
  160. })
  161. .then(function(response) {
  162. if (response.data.state == 0) {
  163. this.$message.error(response.data.msg);
  164. return false
  165. } else {
  166. if (response.data.data.failed_code == -10) {
  167. // that.$message.error(response.data.data.msg)
  168. that.$confirm(response.data.data.msg, '医保错误信息', {
  169. confirmButtonText: '确 定',
  170. type: 'warning'
  171. }).then(() => {
  172. }).catch(() => {
  173. })
  174. } else {
  175. console.log("~~~~");
  176. that.info = response.data.data.result;
  177. console.log(that.info);
  178. that.info['patient_info'] = response.data.data.patient_info
  179. that.info['dialysis_no'] = response.data.data.dialysis_no
  180. that.info['org_code'] = response.data.data.org_code;
  181. that.info['patient_name'] = response.data.data.patient_name;
  182. that.info['doctor_code'] = response.data.data.doctor_code;
  183. that.info['doctor_name'] = response.data.data.doctor_name;
  184. if (response.data.data.health_card_no_two.length == 0) {
  185. that.info['health_card_no'] = response.data.data.health_card_no
  186. } else {
  187. that.info['health_card_no'] = response.data.data.health_card_no_two
  188. }
  189. that.info['order_number'] = response.data.data.order_number;
  190. that.info['department'] = response.data.data.department;
  191. that.info['yiliao_leibie'] = response.data.data.yiliao_leibie;
  192. that.info['before_money'] = response.data.data.before_money;
  193. that.info['after_money'] = response.data.data.after_money;
  194. that.info['org_name'] = that.$store.getters.xt_user.org.org_name;
  195. console.log("~~~~" + that.info);
  196. var name_arr = [];
  197. var spec_arr = [];
  198. var count_arr = [];
  199. var price_arr = [];
  200. var total_arr = [];
  201. for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
  202. name_arr.push(that.info.transBody.outputlist1[i].ake006);
  203. spec_arr.push(that.info.transBody.outputlist1[i].aka074);
  204. count_arr.push(that.info.transBody.outputlist1[i].akc226);
  205. price_arr.push(that.info.transBody.outputlist1[i].akc225);
  206. total_arr.push(that.info.transBody.outputlist1[i].akc264)
  207. }
  208. console.log("~~~" + that.info);
  209. that.info['name_arr'] = name_arr;
  210. that.info['spec_arr'] = spec_arr;
  211. that.info['count_arr'] = count_arr;
  212. that.info['price_arr'] = price_arr;
  213. that.info['total_arr'] = total_arr;
  214. that.info['record_date'] = obj.record_time;
  215. console.log("~~" + that.info)
  216. let type_arr = []
  217. for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
  218. type_arr.push(that.info.transBody.outputlist1[i].aka111)
  219. }
  220. let typeArr = that.unique(type_arr)
  221. that.info['new_detail_list'] = []
  222. for (let i = 0; i < typeArr.length; i++) {
  223. let obj = {
  224. aka111: typeArr[i],
  225. details: [],
  226. total: 0
  227. }
  228. for (let b = 0; b < that.info.transBody.outputlist1.length; b++) {
  229. if (typeArr[i] == that.info.transBody.outputlist1[b].aka111) {
  230. obj.details.push(that.info.transBody.outputlist1[b])
  231. obj.total += that.info.transBody.outputlist1[b].akc264
  232. }
  233. }
  234. that.info.new_detail_list.push(obj)
  235. }
  236. }
  237. }
  238. })
  239. .catch(function(error) {
  240. });
  241. }
  242. }
  243. }, unique(array) {
  244. // res用来存储结果
  245. var res = []
  246. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  247. for (var j = 0, resLen = res.length; j < resLen; j++) {
  248. if (array[i] === res[j] ) {
  249. break
  250. }
  251. }
  252. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  253. if (j === resLen) {
  254. res.push(array[i])
  255. }
  256. }
  257. return res
  258. },
  259. },
  260. created() {
  261. this.org_id = this.$store.getters.xt_user.org_id
  262. this.getInfo(this.paramsObj)
  263. },
  264. watch:{
  265. paramsObj:{//深度监听,可监听到对象、数组的变化
  266. handler(val, oldVal){
  267. this.paramsObj = val;
  268. this.getInfo(this.paramsObj)
  269. },
  270. deep:true
  271. }
  272. }
  273. };
  274. </script>
  275. <style>
  276. .dialysis-print-order {
  277. width: 960px;
  278. margin: 0 auto;
  279. }
  280. .dialysis-print-order .order-yy-name {
  281. margin: auto;
  282. text-align: center;
  283. font-size: 20px;
  284. letter-spacing: 5px;
  285. }
  286. .dialysis-print-order .order-title {
  287. margin: auto;
  288. font-weight: 600;
  289. text-align: center;
  290. font-size: 22px;
  291. padding: 10px;
  292. }
  293. .dialysis-print-order .table-box {
  294. width: 100%;
  295. line-height: 23px;
  296. font-size: 14px;
  297. }
  298. .dialysis-print-order .print-table {
  299. width: 100%;
  300. text-align: center;
  301. border-collapse: collapse;
  302. line-height: 40px;
  303. font-size: 14px;
  304. border-color: #000;
  305. }
  306. .dialysis-print-order .print-table-no {
  307. width: 100%;
  308. text-align: center;
  309. border-collapse: collapse;
  310. font-size: 14px;
  311. }
  312. .dialysis-print-order .under-line {
  313. border-bottom: 1px solid #999;
  314. width: 95%;
  315. text-align: center;
  316. margin-left: 2px;
  317. }
  318. .dialysis-print-order .title-box {
  319. text-align: center;
  320. font-size: 16px;
  321. }
  322. .dialysis-print-order .radio-lebel-box {
  323. font-weight: 400;
  324. cursor: pointer;
  325. }
  326. .dialysis-print-order .radio-no {
  327. opacity: 0;
  328. outline: none;
  329. position: absolute;
  330. margin: 0;
  331. width: 0;
  332. height: 0;
  333. z-index: -1;
  334. }
  335. .dialysis-print-order .radio-inner {
  336. white-space: nowrap;
  337. cursor: pointer;
  338. outline: none;
  339. display: inline-block;
  340. line-height: 1;
  341. position: relative;
  342. vertical-align: middle;
  343. }
  344. .dialysis-print-order .radio-fang {
  345. display: inline-block;
  346. position: relative;
  347. border: 1px solid #000;
  348. box-sizing: border-box;
  349. width: 14px;
  350. height: 14px;
  351. background-color: #fff;
  352. z-index: 1;
  353. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  354. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  355. }
  356. .dialysis-print-order .is-checked-radio::after {
  357. content: "√";
  358. font-size: 15px;
  359. }
  360. .dialysis-print-order .print-table-no tr td {
  361. padding: 8px 5px;
  362. line-height: 25px;
  363. }
  364. .dialysis-print-order .print-table tr td {
  365. padding: 1px 1px;
  366. /*line-height: 25px;*/
  367. }
  368. .es-img {
  369. height: 30px;
  370. }
  371. .advice-name {
  372. text-align: left;
  373. }
  374. .advice-children {
  375. display: flex;
  376. }
  377. .title-box-pro {
  378. border: 0 #fff;
  379. line-height: 25px;
  380. height: 25px;
  381. text-align: left;
  382. padding-left: 10px !important;
  383. }
  384. .title-box-pro-tr {
  385. border: 0 #fff;
  386. }
  387. .text-align-left {
  388. text-align: left !important;
  389. padding-left: 10px !important;
  390. font-size: 14px !important;
  391. line-height: 25px;
  392. }
  393. .print-table-tr-new td {
  394. line-height: 20px !important;
  395. }
  396. .border-top-solid {
  397. border: solid 1px #000;
  398. }
  399. .print-template-two tr {
  400. line-height: 30px;
  401. }
  402. .table-box1 {
  403. border: 1px solid #000;
  404. width: 100%;
  405. line-height: 30px;
  406. font-size: 14px;
  407. border-collapse: collapse;
  408. }
  409. .table-box1 tr {
  410. border-bottom: 1px solid #000;
  411. }
  412. </style>
  413. <style lang="scss">
  414. .newContainer{
  415. .dialysisPage::-webkit-scrollbar {
  416. height: 15px;
  417. }
  418. .el-date-editor{
  419. .el-input__inner{
  420. padding-right:0px;
  421. }
  422. }
  423. .el-table td, .el-table th{
  424. text-align: center;
  425. }
  426. }
  427. .newContainer::-webkit-scrollbar{
  428. height: 15px !important;
  429. }
  430. </style>