SeverDetails.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <view class="settle">
  3. <view class="fix">
  4. <view class="top"></view>
  5. <view class="head">
  6. <span class="cuIcon-back" @click="back"></span>
  7. <view class="case"> 结算详情 </view>
  8. </view>
  9. </view>
  10. <view class="settle-card">
  11. <view class="settle-header">
  12. <view class="amount">¥{{ settlementInfo.amountPayable }}</view>
  13. </view>
  14. <view class="settle-info">
  15. <view class="info">
  16. <view class="label">结算单号</view>
  17. <view class="value">{{ settlementInfo.statementNumber }}</view>
  18. </view>
  19. <view class="info">
  20. <view class="label">结算时间</view>
  21. <view class="value">{{ settlementInfo.settlementTime }}</view>
  22. </view>
  23. <view class="info">
  24. <view class="label">结算金额</view>
  25. <view class="value">¥{{ settlementInfo.amountPayable }}</view>
  26. </view>
  27. <view class="info">
  28. <view class="label">结算明细范围</view>
  29. <view class="value">{{ settlementInfo.settlementScopeStartTime }} -
  30. {{ settlementInfo.settlementScopeEndTime }}</view>
  31. </view>
  32. <view class="info">
  33. <view class="label">操作人</view>
  34. <view class="value">{{ settlementInfo.operator }}</view>
  35. </view>
  36. <view class="info">
  37. <view class="label">结算状态</view>
  38. <view class="value">{{ settlementInfo.settleStatusName }}</view>
  39. </view>
  40. <view class="info">
  41. <view class="label">结算单据</view>
  42. <view class="value">{{ settlementInfo.settlementDocument }}</view>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 订单列表 -->
  47. <view class="list-card">
  48. <OrderList :list="orderList" :jumpType="jumpType" :orderType="orderType"></OrderList>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import api from '@/api/account';
  54. import OrderList from './components/order-list.vue';
  55. export default {
  56. name: 'SettlementDetails',
  57. components: {
  58. OrderList,
  59. },
  60. data() {
  61. return {
  62. bizId: '',
  63. jumpType: '',
  64. // 结算信息
  65. settlementInfo: {},
  66. // 订单列表
  67. orderList: [],
  68. orderType: ''
  69. };
  70. },
  71. onLoad(options) {
  72. if (options.id) {
  73. this.bizId = options.id;
  74. this.jumpType = options.jumpType;
  75. this.orderType = options.orderType
  76. }
  77. },
  78. onShow() {
  79. this.getDetails(this.bizId, this.jumpType);
  80. },
  81. methods: {
  82. getDetails(id, jumpType) {
  83. api
  84. .settlementDetail({
  85. settlementId: id,
  86. jumpType
  87. })
  88. .then((res) => {
  89. if (res.data.code === 200) {
  90. this.settlementInfo = res.data.result;
  91. this.orderList = res.data.result.orderList || [];
  92. } else {
  93. uni.showToast({
  94. title: res.data.msg || '获取结算详情失败',
  95. icon: 'none',
  96. });
  97. }
  98. })
  99. .catch(() => {
  100. uni.showToast({
  101. title: '获取结算详情失败',
  102. icon: 'none',
  103. });
  104. });
  105. },
  106. back() {
  107. uni.navigateBack({
  108. delta: 1,
  109. });
  110. },
  111. },
  112. };
  113. </script>
  114. <style lang="scss" scoped>
  115. .settle {
  116. background: #f7f8fc;
  117. min-height: 100vh;
  118. font-family: Source Han Sans SC;
  119. padding-bottom: 100rpx;
  120. .fix {
  121. position: sticky;
  122. top: 0;
  123. /*#ifdef APP-PLUS*/
  124. .top {
  125. width: 100%;
  126. height: var(--status-bar-height);
  127. background: #fff;
  128. }
  129. /*#endif*/
  130. .head {
  131. width: 100%;
  132. height: 112rpx;
  133. padding: 20rpx;
  134. display: flex;
  135. align-items: center;
  136. background: #fff;
  137. position: relative;
  138. border-bottom: 1rpx solid #eeeeee;
  139. .cuIcon-back {
  140. font-size: 40rpx;
  141. margin-right: 40rpx;
  142. }
  143. .case {
  144. position: absolute;
  145. left: 50%;
  146. transform: translateX(-50%);
  147. font-weight: 500;
  148. font-size: 38rpx;
  149. color: #333333;
  150. }
  151. }
  152. }
  153. .settle-card {
  154. background-color: #fff;
  155. padding: 30rpx 31rpx 10rpx;
  156. }
  157. }
  158. .settle-header {
  159. display: flex;
  160. flex-direction: column;
  161. justify-content: center;
  162. align-items: center;
  163. font-weight: 500;
  164. .amount {
  165. font-weight: 500;
  166. font-size: 63rpx;
  167. color: #1f1f1f;
  168. margin-bottom: 41rpx;
  169. }
  170. }
  171. .settle-info {
  172. background-color: #fff;
  173. margin-bottom: 20rpx;
  174. }
  175. .info {
  176. display: flex;
  177. justify-content: space-between;
  178. align-items: center;
  179. padding-bottom: 21rpx;
  180. &:last-child {
  181. border-bottom: none;
  182. }
  183. .label {
  184. font-weight: 400;
  185. font-size: 31rpx;
  186. color: #666666;
  187. }
  188. .value {
  189. font-weight: 500;
  190. font-size: 31rpx;
  191. color: #333333;
  192. }
  193. }
  194. .list-card {
  195. height: 100%;
  196. flex: 1;
  197. overflow: hidden;
  198. margin: 21rpx 31rpx;
  199. background-color: #fff;
  200. }
  201. </style>