printFour.vue 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <template>
  2. <div>
  3. <div v-if="paramsObj.balance_accounts_type != 2" id='prescription-print' class="prescription-print">
  4. <div v-for='(i,pageIndex) in pageArr.length' :key="pageIndex">
  5. <div class="printTitle">血液透析中心医药费收据及收费项目清单</div>
  6. <div class="infoMain">
  7. <div class="infoP">医院(药店)编号:{{info.org_code}}</div>
  8. <div class="infoP">名称:{{info.org_name}}</div>
  9. <div class="infoP">医生工号:{{info.doctor_code}}</div>
  10. <div class="infoP">门诊流水号:{{info.number}}</div>
  11. <div class="infoP">科别: {{info.department}}</div>
  12. <div class="infoP">处方单据号:{{info.order_number}}</div>
  13. <div class="infoP">姓名:{{info.patient.name}}</div>
  14. <div class="infoP">医疗账号:{{info.health_card_no}}</div>
  15. <div class="infoP">医疗类别:</div>
  16. </div>
  17. <div class="chargeBox">
  18. <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;">
  19. <div class="chargeUl" style="width:20%;">
  20. <p style="width:50%;border-right:1px solid #000;">费用类型</p>
  21. <p style="width:50%;border-right:1px solid #000;">金额</p>
  22. </div>
  23. <div class="chargeUl" style="width:80%;">
  24. <p style="width:40%;border-right:1px solid #000;">明细名称</p>
  25. <p style="width:15%;border-right:1px solid #000;">规格</p>
  26. <p style="width:15%;border-right:1px solid #000;">数量</p>
  27. <p style="width:15%;border-right:1px solid #000;">单价</p>
  28. <p style="width:15%;">金额</p>
  29. </div>
  30. </div>
  31. <div style="display:flex;justify-content: space-between;">
  32. <div style="width:20%;">
  33. <div class="chargeUl" v-if="info.bed_cost_total > 0">
  34. <p style="width:50%;">床位费</p>
  35. <p style="width:50%;">{{info.bed_cost_total?info.bed_cost_total:0}}元</p>
  36. </div>
  37. <div class="chargeUl" v-if="info.operation_cost_total > 0">
  38. <p style="width:50%;">手术费</p>
  39. <p style="width:50%;">{{info.operation_cost_total?info.operation_cost_total:0}}元</p>
  40. </div>
  41. <div class="chargeUl" v-if="info.other_cost_total > 0">
  42. <p style="width:50%;">其他费</p>
  43. <p style="width:50%;">{{info.other_cost_total?info.other_cost_total:0}}元</p>
  44. </div>
  45. <div class="chargeUl" v-if="info.material_cost_total > 0">
  46. <p style="width:50%;">材料费</p>
  47. <p style="width:50%;">{{info.material_cost_total?info.material_cost_total:0}}元</p>
  48. </div>
  49. <div class="chargeUl" v-if="info.western_medicine_cost_total > 0">
  50. <p style="width:50%;">西药费</p>
  51. <p style="width:50%;">{{info.western_medicine_cost_total?info.western_medicine_cost_total:0}}元</p>
  52. </div>
  53. <div class="chargeUl" v-if="info.chinese_traditional_medicine_cost_total > 0">
  54. <p style="width:50%;">中成费</p>
  55. <p style="width:50%;">{{info.chinese_traditional_medicine_cost_total?info.chinese_traditional_medicine_cost_total:0}}元</p>
  56. </div>
  57. <div class="chargeUl" v-if="info.check_cost_total > 0">
  58. <p style="width:50%;">检查费</p>
  59. <p style="width:50%;">{{info.check_cost_total?info.check_cost_total:0}}元</p>
  60. </div>
  61. <div class="chargeUl" v-if="info.laboratory_cost_total > 0">
  62. <p style="width:50%;">化验费</p>
  63. <p style="width:50%;">{{info.laboratory_cost_total?info.laboratory_cost_total:0}}元</p>
  64. </div>
  65. <div class="chargeUl" v-if="info.treat_cost_total > 0">
  66. <p style="width:50%;">治疗费</p>
  67. <p style="width:50%;">{{info.treat_cost_total?info.treat_cost_total:0}}元</p>
  68. </div>
  69. <div class="chargeUl" style="border-top:1px solid #000;">
  70. <p style="width:50%;">费用合计</p>
  71. <p style="width:50%;">{{info.medfee_sumamt?info.medfee_sumamt:0}}元</p>
  72. </div>
  73. <div class="chargeUl" style="border-top:1px solid #000;">
  74. <p style="width:50%;">记账支付</p>
  75. <p style="width:50%;">{{info.hifp_pay?info.hifp_pay:0}}元</p>
  76. </div>
  77. <div class="chargeUl" style="border-top:1px solid #000;">
  78. <p style="width:50%;">个人账号</p>
  79. <p style="width:50%;">{{info.acct_pay?info.acct_pay:0}}元</p>
  80. </div>
  81. <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
  82. <p style="width:50%;">现金支付</p>
  83. <p style="width:50%;">{{info.psn_pay?info.psn_pay:0}}元</p>
  84. </div>
  85. </div>
  86. <div style="width:80%;max-height:500px;">
  87. <div style="display:flex;" v-for="(item,i) in info.order_infos.slice(pageIndex * 13,(pageIndex * 13) + pageArr[pageIndex])" :key="i">
  88. <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
  89. <p class="chargeP">
  90. <span v-if='item.type == 1'>{{item.advice.advice_name}}</span>
  91. <span v-if='item.project.type == 2'>{{item.project.project.project_name}}</span>
  92. <span v-if='item.project.type == 3'>{{item.project.good_info.specification_name}}</span>
  93. </p>
  94. </div>
  95. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  96. <p class="chargeP">
  97. <span v-if='item.type == 1'>{{item.advice.drug.drug_spec}}</span>
  98. <span v-if='item.type == 2'>{{item.project.project.unit}}</span>
  99. <span v-if='item.type == 3'>{{item.project.unit}}</span>
  100. </p>
  101. </div>
  102. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  103. <p class="chargeP">
  104. <span>{{item.cnt}}次</span>
  105. </p>
  106. </div>
  107. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  108. <p class="chargeP">
  109. <span>{{item.pric}}元</span>
  110. </p>
  111. </div>
  112. <div style="width:15%;text-align:center;">
  113. <p class="chargeP">
  114. <span>{{(item.cnt * item.pric).toFixed(2)}}元</span>
  115. </p>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="moneyBox">
  122. <p>实收金:{{info.medfee_sumamt?info.medfee_sumamt:0}}元</p>
  123. <p>记账前金额:{{0.00}}元</p>
  124. <p>扣款金额:{{0.00}}元</p>
  125. <p>记账后金额:{{info.balc}}元</p>
  126. <p>找赎金:{{0.00}}元</p>
  127. </div>
  128. <div class="actionBar">
  129. <div>收费员:{{info.charge_admin.user_name}}</div>
  130. <div>日期:{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</div>
  131. </div>
  132. </div>
  133. </div>
  134. <div v-else id='prescription-print' class="prescription-print">
  135. <div v-for='(i,pageIndex) in pageArr.length' :key="pageIndex">
  136. <div class="printTitle">血液透析中心医药费收据及收费项目清单</div>
  137. <div class="infoMain">
  138. <div class="infoP">医院(药店)编号:{{balanceAccounts.org_config.code}}</div>
  139. <div class="infoP">名称:{{balanceAccounts.org_config.org_name}}</div>
  140. <div class="infoP">医生工号:</div>
  141. <div class="infoP">门诊流水号:{{balanceAccounts.his.number ? balanceAccounts.his.number : ''}}</div>
  142. <div class="infoP">科别: {{balanceAccounts.order.department_name ? balanceAccounts.order.department_name : ''}}</div>
  143. <div class="infoP">处方单据号:{{balanceAccounts.order.number ? balanceAccounts.order.number : ''}}</div>
  144. <div class="infoP">姓名:{{balanceAccounts.patient ? balanceAccounts.patient.name : ''}}</div>
  145. <div class="infoP">医疗账号:</div>
  146. <div class="infoP">医疗类别:自费</div>
  147. </div>
  148. <div class="chargeBox">
  149. <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;">
  150. <div class="chargeUl" style="width:20%;">
  151. <p style="width:50%;border-right:1px solid #000;">费用类型</p>
  152. <p style="width:50%;border-right:1px solid #000;">金额</p>
  153. </div>
  154. <div class="chargeUl" style="width:80%;">
  155. <p style="width:40%;border-right:1px solid #000;">明细名称</p>
  156. <p style="width:15%;border-right:1px solid #000;">规格</p>
  157. <p style="width:15%;border-right:1px solid #000;">数量</p>
  158. <p style="width:15%;border-right:1px solid #000;">单价</p>
  159. <p style="width:15%;">金额</p>
  160. </div>
  161. </div>
  162. <div style="display:flex;justify-content: space-between;">
  163. <div style="width:20%;">
  164. <div class="chargeUl" v-for="(item,i) in balanceAccounts.new_detail_list" :key="i">
  165. <p style="width:50%;">
  166. <span v-if="item.type == 1">药品费</span>
  167. <span v-if="item.type == 2">治疗费</span>
  168. <span v-if="item.type == 3">耗材费</span>
  169. </p>
  170. <p style="width:50%;">{{item.total?item.total:0}}元</p>
  171. </div>
  172. <div class="chargeUl" style="border-top:1px solid #000;">
  173. <p style="width:50%;">费用合计</p>
  174. <p style="width:50%;">{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</p>
  175. </div>
  176. <div class="chargeUl" style="border-top:1px solid #000;">
  177. <p style="width:50%;">记账支付</p>
  178. <p style="width:50%;">0元</p>
  179. </div>
  180. <div class="chargeUl" style="border-top:1px solid #000;">
  181. <p style="width:50%;">个人账号</p>
  182. <p style="width:50%;">0元</p>
  183. </div>
  184. <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
  185. <p style="width:50%;">现金支付</p>
  186. <p style="width:50%;">{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</p>
  187. </div>
  188. </div>
  189. <div style="width:80%;max-height:500px;">
  190. <div style="display:flex;" v-for="(item,i) in balanceAccounts.order_info.slice(pageIndex * 13,(pageIndex * 13) + pageArr[pageIndex])" :key="i">
  191. <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
  192. <p class="chargeP">
  193. <span v-if='item.advice_id > 0'>{{item.advice.advice_name}}</span>
  194. <span v-if='item.project.type == 2'>{{item.project.project.project_name}}</span>
  195. <span v-if='item.project.type == 3'>{{item.project.good_info.specification_name}}</span>
  196. </p>
  197. </div>
  198. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  199. <p class="chargeP">
  200. <span v-if='item.advice_id > 0'>{{item.advice.drug.drug_spec}}</span>
  201. <span v-if='item.project.type == 2'>{{item.project.project.unit}}</span>
  202. <span v-if='item.project.type == 3'>{{item.project.unit}}</span>
  203. </p>
  204. </div>
  205. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  206. <p class="chargeP">
  207. <span>{{item.cnt}}次</span>
  208. </p>
  209. </div>
  210. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  211. <p class="chargeP">
  212. <span>{{item.pric}}元</span>
  213. </p>
  214. </div>
  215. <div style="width:15%;text-align:center;">
  216. <p class="chargeP">
  217. <span>{{(item.cnt * item.pric).toFixed(2)}}元</span>
  218. </p>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. <div class="moneyBox">
  225. <p>实收金:{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</p>
  226. <p>记账前金额:{{0.00}}元</p>
  227. <p>扣款金额:{{0.00}}元</p>
  228. <p>记账后金额:{{0.00}}元</p>
  229. <p>找赎金:{{0.00}}元</p>
  230. </div>
  231. <div class="actionBar">
  232. <div>收费员:{{balanceAccounts.current_admin.user_name}}</div>
  233. <div>日期:{{getTime(balanceAccounts.order.settle_accounts_date,"{y}-{m}-{d}")?getTime(balanceAccounts.order.settle_accounts_date,"{y}-{m}-{d}"):""}}</div>
  234. </div>
  235. </div>
  236. </div>
  237. </div>
  238. </template>
  239. <script>
  240. import axios from 'axios'
  241. import { getChargePrint } from '@/api/project/project'
  242. import { uParseTime } from '@/utils/tools'
  243. export default {
  244. data() {
  245. return {
  246. list: {},
  247. prescription: [],
  248. patient: {},
  249. orgname: '',
  250. result: {},
  251. org_code: '',
  252. patient_name: '',
  253. doctor_code: '',
  254. doctor_name: '',
  255. name_arr: [],
  256. spec_arr: [],
  257. count_arr: [],
  258. price_arr: [],
  259. total_arr: [],
  260. page:1,
  261. pageArr:[],
  262. }
  263. },
  264. props: {
  265. paramsObj: Object,
  266. info: Object,
  267. balanceAccounts:Object
  268. },
  269. methods: {
  270. getItemName(number) {
  271. switch (number) {
  272. case '01':
  273. return '床位费'
  274. break
  275. case '02':
  276. return '西药费'
  277. break
  278. case '03':
  279. return '中药费'
  280. break
  281. case '04':
  282. return '中成药费'
  283. break
  284. case '05':
  285. return '中草药费'
  286. break
  287. case '06':
  288. return '检查费'
  289. break
  290. case '07':
  291. return '治疗费'
  292. break
  293. case '08':
  294. return '放射费'
  295. break
  296. case '09':
  297. return '手术费'
  298. break
  299. case '10':
  300. return '化验费'
  301. break
  302. case '11':
  303. return '输血费'
  304. break
  305. case '12':
  306. return '输氧费'
  307. break
  308. case '13':
  309. return '其它费'
  310. break
  311. case '14':
  312. return '麻醉费'
  313. break
  314. case '15':
  315. return '材料费'
  316. break
  317. case '16':
  318. return '特殊检查费'
  319. break
  320. case '17':
  321. return '特殊治疗费'
  322. break
  323. case '18':
  324. return '诊疗费(诊查费)'
  325. break
  326. case '19':
  327. return '护理费'
  328. break
  329. case '20':
  330. return '诊金'
  331. break
  332. case '21':
  333. return '检查费(CT)'
  334. break
  335. case '22':
  336. return '检查费(MRT)'
  337. break
  338. case '23':
  339. return '检查费(其他)'
  340. break
  341. case '24':
  342. return '特需服务费'
  343. break
  344. case '25':
  345. return '杂费'
  346. break
  347. case '26':
  348. return '挂号费'
  349. break
  350. }
  351. },
  352. getPage(){
  353. if(this.paramsObj.balance_accounts_type != 2){
  354. this.page = 1
  355. this.pageArr = []
  356. if(this.info.order_infos.length <= 13){
  357. this.page = 1
  358. this.pageArr.push(this.info.order_infos.length)
  359. console.log('this.pageArr',this.pageArr)
  360. }else if(this.info.order_infos.length > 13){
  361. this.page = parseInt(this.info.order_infos.length / 13)
  362. let num = this.info.order_infos.length % 13
  363. for (var i=0;i<this.page;i++){
  364. this.pageArr.push(13)
  365. }
  366. if(num != 0){
  367. this.pageArr.push(num)
  368. }
  369. }
  370. }else{
  371. this.page = 1
  372. this.pageArr = []
  373. if(this.balanceAccounts.order_info.length <= 13){
  374. this.page = 1
  375. this.pageArr.push(this.balanceAccounts.order_info.length)
  376. console.log('this.pageArr',this.pageArr)
  377. }else if(this.balanceAccounts.order_info.length > 13){
  378. this.page = parseInt(this.balanceAccounts.order_info.length / 13)
  379. let num = this.balanceAccounts.order_info.length % 13
  380. for (var i=0;i<this.page;i++){
  381. this.pageArr.push(13)
  382. }
  383. if(num != 0){
  384. this.pageArr.push(num)
  385. }
  386. }
  387. }
  388. },
  389. getTime(value, temp) {
  390. if (value != undefined) {
  391. return uParseTime(value, temp)
  392. }
  393. return ''
  394. }
  395. },
  396. created() {
  397. },
  398. watch:{
  399. info: {
  400. handler(newVal) {
  401. this.getPage()
  402. },
  403. deep: true,
  404. },
  405. balanceAccounts(){
  406. this.getPage()
  407. },
  408. deep: true
  409. }
  410. }
  411. </script>
  412. <style lang="scss" scoped>
  413. .prescription-print {
  414. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  415. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  416. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  417. margin-bottom: 20px;
  418. padding: 20px 10px;
  419. }
  420. .printTitle {
  421. font-size: 22px;
  422. text-align: center;
  423. font-weight: bold;
  424. }
  425. .infoMain {
  426. display: flex;
  427. flex-wrap: wrap;
  428. padding: 0 10px;
  429. margin-top: 10px;
  430. }
  431. .infoMain .infoP {
  432. width: 33%;
  433. line-height: 24px;
  434. }
  435. .chargeBox {
  436. border: 1px solid #000;
  437. }
  438. .chargeUl {
  439. display: flex;
  440. justify-content: space-between;
  441. text-align: center;
  442. }
  443. .chargeUl p {
  444. height: 40px;
  445. line-height: 40px;
  446. }
  447. .chargeP {
  448. height: 40px;
  449. line-height: 40px;
  450. }
  451. .moneyBox {
  452. display: flex;
  453. justify-content: space-between;
  454. padding: 0 10px;
  455. background: #eee;
  456. height: 40px;
  457. align-items: center;
  458. border: 1px solid #000;
  459. border-top: none
  460. }
  461. .actionBar {
  462. display: flex;
  463. justify-content: space-between;
  464. line-height: 24px;
  465. padding: 0 10px;
  466. }
  467. .actionBar div {
  468. width: 150px;
  469. }
  470. </style>