printFour.vue 22KB

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