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

newStatementPrintTwo.vue 16KB

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