MzFeePaymentDetail.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <window-size>
  3. <div class="barcode-wrapper">
  4. <svg id="barcode"></svg>
  5. </div>
  6. <van-cell title="开方科室" :value="params.deptName"></van-cell>
  7. <van-cell title="开方医生" :value="params.doctorName"></van-cell>
  8. <van-cell title="开方时间" :value="params.datetime"></van-cell>
  9. <van-cell title="总金额">
  10. <template #default>
  11. <span style="color: orangered">¥ {{ params.totalAmt }}</span>
  12. </template>
  13. </van-cell>
  14. <div style="height: 5px"></div>
  15. <div style="background: white; text-align: center; font-size: 12px; padding: 0 10px">
  16. <div style="height: 5px"></div>
  17. <van-row>
  18. <van-col :span="10">名称</van-col>
  19. <van-col :span="5">用法</van-col>
  20. <van-col :span="4">数量</van-col>
  21. <van-col :span="5">金额(¥)</van-col>
  22. </van-row>
  23. <div style="height: 10px"></div>
  24. <div v-for="(fee, index) in list" :key="index">
  25. <van-row>
  26. <van-col :span="10">{{ fee.xmmc }}</van-col>
  27. <van-col :span="5">{{ fee.ypyf }}</van-col>
  28. <van-col :span="4">{{ fee.zsl }}</van-col>
  29. <van-col :span="5">{{ fee.zfy }}</van-col>
  30. </van-row>
  31. <div style="height: 10px"></div>
  32. </div>
  33. </div>
  34. </window-size>
  35. </template>
  36. <script>
  37. import { onMounted, ref } from 'vue'
  38. import { useRouter } from 'vue-router'
  39. import { getMzPaidDetail } from '../../../api/pay-mz-fee'
  40. import JsBarcode from 'jsbarcode'
  41. export default {
  42. setup() {
  43. const router = useRouter()
  44. const params = router.currentRoute.value.params
  45. const list = ref([])
  46. const drawBarcode = (patNo) => {
  47. JsBarcode('#barcode', patNo, {
  48. lineColor: 'rgb(0, 80, 100)',
  49. width: 2, //线宽
  50. height: 50, //条码高度
  51. displayValue: true,
  52. fontSize: 16,
  53. background: 'rgb(251, 251, 255)',
  54. })
  55. }
  56. onMounted(() => {
  57. const hisOrdNum = params.hisOrdNum
  58. drawBarcode(hisOrdNum.split('_')[0])
  59. getMzPaidDetail(hisOrdNum).then((res) => {
  60. list.value = res
  61. })
  62. })
  63. return {
  64. params,
  65. list,
  66. }
  67. },
  68. }
  69. </script>
  70. <style scoped>
  71. .barcode-wrapper {
  72. display: flex;
  73. align-items: center;
  74. justify-content: center;
  75. }
  76. </style>