outpatientRefundDetail.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view class="container">
  3. <view class="content" v-if="!showNoData">
  4. <view :class="['displayFlexCol', isSuccess ? 'backgroundCustom' : 'back_fail']">
  5. <view class="back">
  6. <view class="state">
  7. <!-- 状态,0初始1退费中2全成功3部分失败4全部失败 -->
  8. <text>{{queryBean.State=='2'||queryBean.State=='3'?'退款到账':'退款失败'}}</text>
  9. <text class="ml20">{{queryBean.State=='2'?'全额到账':queryBean.State=='3'?'部分到账':''}}</text> </view>
  10. <view class="state">
  11. <text>到账金额</text>
  12. <text class="ml20"> ¥{{queryBean.RefundAmount/100}} 共{{queryBean.RefundCount}}笔</text> </view>
  13. </view>
  14. </view>
  15. <view class="record_box" v-for="(item, ind) in list" :key="ind">
  16. <view class="header_time border_bottom">
  17. <text>交易单号:{{item.OrderNum}}</text>
  18. </view>
  19. <view class="main_centent">
  20. <view class="record_info">
  21. <text>退款方式</text>
  22. <text >{{item.ChannelType}}</text>
  23. </view>
  24. <view class="record_info" v-if="item.RefundRemark">
  25. <text>退款原因</text>
  26. <text>{{item.RefundRemark}}</text>
  27. </view>
  28. <view class="record_info" v-if="item.BeginDate">
  29. <text>发起时间</text>
  30. <text>{{item.BeginDate}}</text>
  31. </view>
  32. <view class="record_info" v-if="item.EndDate">
  33. <text>到账时间</text>
  34. <text>{{item.EndDate}}</text>
  35. </view>
  36. </view>
  37. <view class="public_info_foot border_top displayFlexBetween">
  38. <view :class="['info_foot_name', item.PayState=='7'?'colorRed':'colorCustom']">¥{{item.RefundPrice/100}}</view>
  39. <view :class="['info_foot_item', item.PayState=='7'?'colorRed':'colorCustom']">{{item.FailReason||'退款成功'}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. <view v-else class="noData">
  44. <noData :value="noDataValue"></noData>
  45. </view>
  46. </view>
  47. </template>
  48. <script setup lang="ts">
  49. import { ref } from 'vue';
  50. import { onLoad } from '@dcloudio/uni-app';
  51. import common from '@/utils/common';
  52. import noData from '@/pages/st1/components/noData/noData.vue';
  53. import { querySelfRefundRecordInfo } from '@/pagesPatient/service/outpatient/index';
  54. const queryBean = ref<any>({});
  55. const isSuccess = ref(true);
  56. const list = ref<any[]>([]);
  57. const showNoData = ref(false); // Added showNoData ref, though original JS didn't explicitly set it, but template uses !showNoData. I should set it based on list length or response.
  58. const noDataValue = ref('暂无数据');
  59. onLoad((options) => {
  60. let bean = options.queryBean ? JSON.parse(options.queryBean) : {};
  61. queryBean.value = bean;
  62. isSuccess.value = bean.State != 4;
  63. main();
  64. });
  65. const main = async () => {
  66. let bean = queryBean.value;
  67. let queryData = {
  68. SelfRefundRecordId: bean.Id,
  69. };
  70. let resp = await querySelfRefundRecordInfo(queryData);
  71. list.value = resp || [];
  72. showNoData.value = common.isEmpty(list.value);
  73. };
  74. </script>
  75. <style lang="scss" scoped>
  76. .back {
  77. padding: 40upx 0 120upx;
  78. font-size: 36upx;
  79. font-family: Source Han Sans CN;
  80. font-weight: 500;
  81. }
  82. .back_fail {
  83. background-color: #ee5753;
  84. color: #fff;
  85. }
  86. .img {
  87. width: 154upx;
  88. height: 150upx;
  89. margin-right: 22upx;
  90. }
  91. .back .state {
  92. font-size: 32upx;
  93. font-weight: 500;
  94. color: rgba(255, 255, 255, 1);
  95. margin-bottom: 26upx;
  96. font-family: Source Han Sans CN;
  97. }
  98. .public_info_foot {
  99. height: 112upx;
  100. padding: 0 34upx;
  101. font-size: 30upx;
  102. justify-content: space-between;
  103. }
  104. .info_foot_name {
  105. font-weight: 400;
  106. }
  107. .info_foot_item {
  108. font-weight: 400;
  109. }
  110. .ml20 {
  111. margin-left: 20upx;
  112. }
  113. .record_box {
  114. background: white;
  115. margin: 30upx;
  116. border-radius: 24upx;
  117. margin-top: -94upx;
  118. }
  119. .header_time {
  120. height: 106upx;
  121. padding: 30upx;
  122. box-sizing: border-box;
  123. display: flex;
  124. flex-direction: row;
  125. justify-content: space-between;
  126. align-items: center;
  127. }
  128. .header_time text{
  129. font-size: 32upx;
  130. }
  131. .header_time text:nth-child(1){
  132. color: #333;
  133. font-weight: bold;
  134. }
  135. .main_centent {
  136. padding: 30upx;
  137. box-sizing: border-box;
  138. }
  139. .record_info {
  140. margin-bottom: 30upx;
  141. display: flex;
  142. flex-direction: row;
  143. justify-content: space-between;
  144. align-items: center;
  145. }
  146. .record_info:last-child{
  147. margin-bottom: 0 !important;
  148. }
  149. .record_info text:nth-child(1){
  150. width: 26%;
  151. display: inline-block;
  152. font-size: 30upx;
  153. color: #666;
  154. }
  155. .record_info text:nth-child(2){
  156. width: 74%;
  157. display: inline-block;
  158. font-size: 30upx;
  159. color: #666;
  160. }
  161. </style>