costListingDetails.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <view class="content_info">
  5. <text>{{ queryBean.Date }} {{ queryBean.Doctor }}</text>
  6. <text> | </text>
  7. <text>{{ queryBean.Dept }}</text>
  8. </view>
  9. <view class="tabel">
  10. <view class="table_box">
  11. <view class="tr">
  12. <view class="th name">项目</view>
  13. <view class="th unit">规格</view>
  14. <view class="th">数量</view>
  15. <view class="th refevalue">单价(元)</view>
  16. <view class="th refevalue">金额(元)</view>
  17. </view>
  18. <view class="tr" v-for="(item, key) in costDetailList" :key="key">
  19. <view class="td name">{{ item.Project }}</view>
  20. <view class="td unit">{{ item.Unit }}</view>
  21. <view class="td">{{ item.Number }}</view>
  22. <view class="td refevalue">{{ item.UnitPrice / 100 }}</view>
  23. <view class="td refevalue">{{ item.SumOfMoney / 100 }}</view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script lang="ts" setup>
  31. import { ref } from 'vue';
  32. import { useOnLoad } from '@/hook';
  33. import { common } from '@/utils';
  34. import {
  35. queryOutpatientCostTypeItem,
  36. queryInHospitalCostTypeItem
  37. } from '@/pagesPatient/service/costDetailedList';
  38. const app = getApp();
  39. const queryBean = ref<any>({});
  40. const costDetailList = ref<any[]>([]);
  41. const pageType = ref('');
  42. useOnLoad(async (options) => {
  43. let qBean = {};
  44. if (options.queryBean) {
  45. try {
  46. qBean = JSON.parse(options.queryBean);
  47. } catch (e) {
  48. console.error('参数解析失败', e);
  49. }
  50. }
  51. queryBean.value = qBean;
  52. pageType.value = options.pageType || '';
  53. await main();
  54. });
  55. const main = async () => {
  56. await getQueryOutpatientCostTypeItem(queryBean.value.ExpenseTypeCode);
  57. };
  58. /**
  59. * 获取门诊清单明细
  60. */
  61. const getQueryOutpatientCostTypeItem = async (code: string) => {
  62. let currentUser = app.globalData.currentUser || {};
  63. let queryData = {
  64. ExpenseTypeCode: code,
  65. Date: queryBean.value.Date,
  66. CardNo: currentUser.cardNo,
  67. CardType: currentUser.cardType,
  68. MemberId: currentUser.memberId,
  69. Store: {
  70. cardEncryptionStore: currentUser.encryptionStore || '',
  71. baseMemberEncryptionStore: currentUser.baseMemberEncryptionStore
  72. },
  73. };
  74. let resp;
  75. // 根据规范,必须解构返回值
  76. if (pageType.value == 'outpatient') {
  77. ({ resp } = await queryOutpatientCostTypeItem(queryData));
  78. } else {
  79. ({ resp } = await queryInHospitalCostTypeItem(queryData));
  80. }
  81. if (common.isNotEmpty(resp)) {
  82. costDetailList.value = resp;
  83. }
  84. };
  85. </script>
  86. <style lang="scss">
  87. .content_info {
  88. line-height: 100upx;
  89. background: rgba(255, 255, 255, 1);
  90. font-size: 30upx;
  91. font-weight: 400;
  92. color: rgba(0, 0, 0, 1);
  93. padding-left: 30upx;
  94. }
  95. .content_info text:nth-child(even) {
  96. color: #999;
  97. }
  98. /* 表格代码 */
  99. .tabel {
  100. background-color: #fff;
  101. }
  102. .table_box {
  103. border: 1px solid #eee;
  104. border-right: 0;
  105. border-bottom: 0;
  106. width: 100%;
  107. }
  108. .tr {
  109. width: 100%;
  110. display: flex;
  111. justify-content: space-between;
  112. background-color: #fff;
  113. }
  114. .th, .td {
  115. padding: 10upx;
  116. border-bottom: 1px solid #eee;
  117. border-right: 1px solid #eee;
  118. text-align: center;
  119. width: 19%;
  120. display: flex;
  121. align-items: center;
  122. justify-content: center;
  123. line-height: 24upx;
  124. }
  125. .td{
  126. word-break: break-all;
  127. }
  128. .table_box .th {
  129. height: 80upx;
  130. font-size: 28upx;
  131. color: #000;
  132. background-color: #f2f5f6;
  133. }
  134. .table_box .td {
  135. min-height: 90upx;
  136. font-size: 28upx;
  137. color: #555;
  138. }
  139. .th.name,.td.name{width: 24%}
  140. </style>