printOne.vue 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. <template>
  2. <div>
  3. <div id='prescription-print' class="prescription-print">
  4. <div v-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">
  5. <div class="printTitle">{{orgname}}&nbsp;&nbsp;医药费收据及收费项目清单</div>
  6. <div class="infoMain">
  7. <div class="infoP">医院(药店)编号:{{org_code}}</div>
  8. <div class="infoP">名称:{{orgname}}</div>
  9. <div class="infoP">医生工号:{{doctor_code}}</div>
  10. <div class="infoP">门诊流水号:{{result.transBody.akc190}}</div>
  11. <div class="infoP">科别:{{全科}}</div>
  12. <div class="infoP">处方单据号:</div>
  13. <div class="infoP">姓名:{{patient_name}}</div>
  14. <div class="infoP">医疗账号:</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-for="(item,index) in result.transBody.outputlist2" :key="index">
  34. <p style="width:50%;">{{getItemName(item.aka111)}}</p>
  35. <p style="width:50%;">{{item.bka058}}</p>
  36. </div>
  37. <div class="chargeUl" style="border-top:1px solid #000;">
  38. <p style="width:50%;">费用合计</p>
  39. <p style="width:50%;">{{result.transBody.akc264}}</p>
  40. </div>
  41. <div class="chargeUl" style="border-top:1px solid #000;">
  42. <p style="width:50%;">记账支付</p>
  43. <p style="width:50%;">{{result.transBody.akb068}}</p>
  44. </div>
  45. <div class="chargeUl" style="border-top:1px solid #000;">
  46. <p style="width:50%;">个人账号</p>
  47. <p style="width:50%;">{{result.transBody.akc264}}</p>
  48. </div>
  49. <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
  50. <p style="width:50%;">现金支付</p>
  51. <p style="width:50%;">{{result.transBody.akb067}}</p>
  52. </div>
  53. </div>
  54. <div style="width:80%;display:flex;height:300px;">
  55. <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
  56. <p v-for="(item,i) in name_arr" :key="i" class="chargeP">
  57. {{item}}</p>
  58. </div>
  59. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  60. <p v-for="(item,y) in spec_arr" :key="y" class="chargeP">
  61. {{item}}</p>
  62. </div>
  63. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  64. <p v-for="(item,z) in count_arr" :key="z" class="chargeP">
  65. {{item}}次</p>
  66. </div>
  67. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  68. <p v-for="(item,f) in price_arr" :key="f" class="chargeP">{{item}}</p>
  69. </div>
  70. <div style="width:15%;text-align:center;">
  71. <p v-for="(item,d) in total_arr" :key="d" class="chargeP">{{item}}</p>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="moneyBox">
  77. <p>实收金:{{result.transBody.akc264}}</p>
  78. <p>记账前金额:{{0.00}}</p>
  79. <p>扣款金额:{{0.00}}</p>
  80. <p>记账后金额:{{0.00}}</p>
  81. <p>找赎金:{{0.00}}</p>
  82. </div>
  83. <div class="actionBar">
  84. <div>收费员:{{doctor_name}}</div>
  85. <div>日期:{{this.$route.query.record_date}}</div>
  86. </div>
  87. </div>
  88. <div v-else>
  89. <div class="printTitle">{{orgname}}&nbsp;&nbsp;医药费收据及收费项目清单</div>
  90. <div class="infoMain">
  91. <div class="infoP">医院(药店)编号:</div>
  92. <div class="infoP">名称:{{orgname}}</div>
  93. <div class="infoP">医生工号:</div>
  94. <div class="infoP">门诊流水号:</div>
  95. <div class="infoP">科别:{{list.p_info.departments?list.p_info.departments:''}}</div>
  96. <div class="infoP">处方单据号:</div>
  97. <div class="infoP">姓名:{{patient.name}}</div>
  98. <div class="infoP">医疗账号:</div>
  99. <div class="infoP">医疗类别:普通</div>
  100. </div>
  101. <div class="chargeBox">
  102. <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;">
  103. <div class="chargeUl" style="width:20%;">
  104. <p style="width:50%;border-right:1px solid #000;">费用类型</p>
  105. <p style="width:50%;border-right:1px solid #000;">金额</p>
  106. </div>
  107. <div class="chargeUl" style="width:80%;">
  108. <p style="width:40%;border-right:1px solid #000;">明细名称</p>
  109. <p style="width:15%;border-right:1px solid #000;">规格</p>
  110. <p style="width:15%;border-right:1px solid #000;">数量</p>
  111. <p style="width:15%;border-right:1px solid #000;">单价</p>
  112. <p style="width:15%;">金额</p>
  113. </div>
  114. </div>
  115. <div style="display:flex;justify-content: space-between;">
  116. <div style="width:20%;">
  117. <div class="chargeUl" v-for="(item,index) in 1" :key="index">
  118. <p style="width:50%;">材料费</p>
  119. <p style="width:50%;"></p>
  120. </div>
  121. <div class="chargeUl" style="border-top:1px solid #000;">
  122. <p style="width:50%;">费用合计</p>
  123. <p style="width:50%;">
  124. {{list.order_info.medfee_sumamt?list.order_info.medfee_sumamt:''}}</p>
  125. </div>
  126. <div class="chargeUl" style="border-top:1px solid #000;">
  127. <p style="width:50%;">记账支付</p>
  128. <p style="width:50%;"></p>
  129. </div>
  130. <div class="chargeUl" style="border-top:1px solid #000;">
  131. <p style="width:50%;">个人账号</p>
  132. <p style="width:50%;"></p>
  133. </div>
  134. <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
  135. <p style="width:50%;">现金支付</p>
  136. <p style="width:50%;">{{list.order_info.psn_cash_pay}}</p>
  137. </div>
  138. </div>
  139. <div style="width:80%;display:flex;height:300px;">
  140. <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
  141. <p v-for="(item,i) in prescription[0].advices" :key="i" class="chargeP">
  142. {{item.advice_name}}</p>
  143. </div>
  144. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  145. <p v-for="(item,y) in prescription[0].advices" :key="y" class="chargeP">
  146. {{item.advice_desc}}</p>
  147. </div>
  148. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  149. <p v-for="(item,z) in prescription[0].advices" :key="z" class="chargeP">
  150. {{item.single_dose}}个</p>
  151. </div>
  152. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  153. <p v-for="(item,f) in prescription[0].advices" :key="f" class="chargeP">
  154. {{item.price}}</p>
  155. </div>
  156. <div style="width:15%;text-align:center;">
  157. <p v-for="(item,d) in prescription[0].advices" :key="d" class="chargeP">
  158. {{item.single_dose *
  159. item.price}}</p>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="moneyBox">
  165. <p>实收金:{{list.order_info.medfee_sumamt?list.order_info.medfee_sumamt:''}}</p>
  166. <p>记账前金额:{{list.order_info.preselfpay_amt?list.order_info.preselfpay_amt:''}}</p>
  167. <p>扣款金额:</p>
  168. <p>记账后金额:</p>
  169. <p>找赎金:</p>
  170. </div>
  171. <div class="actionBar">
  172. <div>收费员:{{}}</div>
  173. <div>日期:{{this.$route.query.record_date}}</div>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. </template>
  179. <script>
  180. import axios from 'axios'
  181. import { getChargePrint } from '@/api/project/project'
  182. export default {
  183. data() {
  184. return {
  185. list: {},
  186. prescription: [],
  187. patient: {},
  188. orgname: '',
  189. result: {},
  190. org_code: '',
  191. patient_name: '',
  192. doctor_code: '',
  193. doctor_name: '',
  194. name_arr: [],
  195. spec_arr: [],
  196. count_arr: [],
  197. price_arr: [],
  198. total_arr: []
  199. }
  200. },
  201. props: {
  202. paramsObj: Object
  203. },
  204. methods: {
  205. getItemName(number) {
  206. switch (number) {
  207. case '01':
  208. return '床位费';
  209. break;
  210. case '02':
  211. return '西药费';
  212. break;
  213. case '03':
  214. return '中药费';
  215. break;
  216. case '04':
  217. return '中成药费';
  218. break;
  219. case '05':
  220. return '中草药费';
  221. break;
  222. case '06':
  223. return '检查费';
  224. break;
  225. case '07':
  226. return '治疗费';
  227. break;
  228. case '08':
  229. return '放射费';
  230. break;
  231. case '09':
  232. return '手术费';
  233. break;
  234. case '10':
  235. return '化验费';
  236. break;
  237. case '11':
  238. return '输血费';
  239. break;
  240. case '12':
  241. return '输氧费';
  242. break;
  243. case '13':
  244. return '其它费';
  245. break;
  246. case '14':
  247. return '麻醉费';
  248. break;
  249. case '15':
  250. return '材料费';
  251. break;
  252. case '16':
  253. return '特殊检查费';
  254. break;
  255. case '17':
  256. return '特殊治疗费';
  257. break;
  258. case '18':
  259. return '诊疗费(诊查费)';
  260. break;
  261. case '19':
  262. return '护理费';
  263. break;
  264. case '20':
  265. return '诊金';
  266. break;
  267. case '21':
  268. return '检查费(CT)';
  269. break;
  270. case '22':
  271. return '检查费(MRT)';
  272. break;
  273. case '23':
  274. return '检查费(其他)';
  275. break;
  276. case '24':
  277. return '特需服务费';
  278. break;
  279. case '25':
  280. return '杂费';
  281. break;
  282. case '26':
  283. return '挂号费';
  284. break
  285. }
  286. },
  287. getChargePrint(record_date, patient_id, prescription_id) {
  288. var params = {
  289. record_date: record_date,
  290. patient_id: patient_id,
  291. prescription_id: prescription_id
  292. };
  293. console.log('params', params);
  294. getChargePrint(params).then(response => {
  295. if (response.data.state == 1) {
  296. var list = response.data.data.list;
  297. console.log('list9999999999', list);
  298. this.list = list;
  299. var prescription = response.data.data.prescription;
  300. console.log('prescription', prescription);
  301. this.prescription = prescription;
  302. var patient = response.data.data.patient;
  303. console.log('patient', patient);
  304. this.patient = patient;
  305. var histpatient = response.data.data.hisPatient;
  306. console.log('hispatient', histpatient)
  307. }
  308. })
  309. }
  310. },
  311. created() {
  312. 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) {
  313. this.orgname = xtuser.org.org_name;
  314. var form = {
  315. 'order_id': this.paramsObj.order_id,
  316. 'patient_id': this.paramsObj.patient_id,
  317. 'record_time': this.paramsObj.record_date,
  318. 'admin_user_id': this.$store.getters.xt_user.user.id
  319. };
  320. var that = this;
  321. axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
  322. params: form
  323. })
  324. .then(function(response) {
  325. if (response.data.state == 0) {
  326. that.$message.error(response.data.msg);
  327. return false
  328. } else {
  329. if (response.data.data.failed_code == -10) {
  330. // that.$message.error(response.data.data.msg)
  331. that.$confirm(response.data.data.msg, '医保错误信息', {
  332. confirmButtonText: '确 定',
  333. type: 'warning'
  334. }).then(() => {
  335. }).catch(() => {
  336. })
  337. } else {
  338. that.result = response.data.data.result;
  339. that.org_code = response.data.data.org_code;
  340. that.patient_name = response.data.data.patient_name;
  341. that.doctor_code = response.data.data.doctor_code;
  342. that.doctor_name = response.data.data.doctor_name;
  343. that.name_arr = [];
  344. that.spec_arr = [];
  345. that.count_arr = [];
  346. that.price_arr = [];
  347. that.total_arr = [];
  348. for (let i = 0; i < that.result.transBody.outputlist1.length; i++) {
  349. that.name_arr.push(that.result.transBody.outputlist1[i].ake006);
  350. that.spec_arr.push(that.result.transBody.outputlist1[i].aka074);
  351. that.count_arr.push(that.result.transBody.outputlist1[i].akc226);
  352. that.price_arr.push(that.result.transBody.outputlist1[i].akc225);
  353. that.total_arr.push(that.result.transBody.outputlist1[i].akc264)
  354. }
  355. }
  356. }
  357. })
  358. .catch(function(error) {
  359. })
  360. } else {
  361. var record_date = this.paramsObj.record_date;
  362. console.log('record_date', record_date);
  363. var patient_id = this.paramsObj.patient_id;
  364. console.log('patient_id', patient_id);
  365. var prescription_id = this.paramsObj.prescription_id;
  366. this.getChargePrint(record_date, patient_id, prescription_id);
  367. var xtuser = this.$store.getters.xt_user;
  368. this.orgname = xtuser.org.org_name
  369. }
  370. },
  371. watch: {
  372. paramsObj: {//深度监听,可监听到对象、数组的变化
  373. handler(val, oldVal) {
  374. this.paramsObj = val;
  375. this.patient_id = this.paramsObj.patient_id;
  376. var record_date = this.paramsObj.record;
  377. this.record_date = record_date;
  378. var prescription_id = this.paramsObj.prescription_id;
  379. this.prescription_id = prescription_id
  380. },
  381. deep: true
  382. }
  383. }
  384. }
  385. </script>
  386. <style lang="scss" scoped>
  387. .prescription-print {
  388. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  389. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  390. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  391. margin-bottom: 20px;
  392. padding: 20px 10px;
  393. }
  394. .printTitle {
  395. font-size: 22px;
  396. text-align: center;
  397. font-weight: bold;
  398. }
  399. .infoMain {
  400. display: flex;
  401. flex-wrap: wrap;
  402. padding: 0 10px;
  403. margin-top: 10px;
  404. }
  405. .infoMain .infoP {
  406. width: 33%;
  407. line-height: 24px;
  408. }
  409. .chargeBox {
  410. border: 1px solid #000;
  411. }
  412. .chargeUl {
  413. display: flex;
  414. justify-content: space-between;
  415. text-align: center;
  416. }
  417. .chargeUl p {
  418. height: 40px;
  419. line-height: 40px;
  420. }
  421. .chargeP {
  422. height: 40px;
  423. line-height: 40px;
  424. }
  425. .moneyBox {
  426. display: flex;
  427. justify-content: space-between;
  428. padding: 0 10px;
  429. background: #eee;
  430. height: 40px;
  431. align-items: center;
  432. border: 1px solid #000;
  433. border-top: none
  434. }
  435. .actionBar {
  436. display: flex;
  437. justify-content: space-between;
  438. line-height: 24px;
  439. padding: 0 10px;
  440. }
  441. .actionBar div {
  442. width: 150px;
  443. }
  444. </style>