order-list.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="list">
  3. <view class="list_item" v-for="(item, index) in list" :key="index" @click="goDetails(item)">
  4. <view class="left">
  5. <view class="name">订单号:{{ item.orderId }}</view>
  6. <view class="value">{{ item.buyTime }}</view>
  7. </view>
  8. <view class="right">
  9. <view>+{{ jumpType == 'SETTLE_TSMAIN' ? item.payableToMerchant : item.orderPrice}}</view>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. props: {
  17. list: {
  18. type: Array,
  19. default: () => [],
  20. },
  21. jumpType: {
  22. type: String,
  23. default: '',
  24. },
  25. orderType: {
  26. type: String,
  27. default: '',
  28. },
  29. },
  30. onLoad(options) {
  31. if (options.orderType) {
  32. this.orderType = options.orderType;
  33. }
  34. },
  35. data() {
  36. return {
  37. orderType: '',
  38. }
  39. },
  40. methods: {
  41. goDetails(item) {
  42. const pathName = this.orderType == 2 ? 'groupMealDetails' : 'orderDetails';
  43. // uni.navigateTo({
  44. // url: `/pages/finance/${pathName}?id=${item.orderId}&jumpType=${this.jumpType}`,
  45. // });
  46. if( this.orderType==2){
  47. uni.navigateTo({
  48. url: `/pages/finance/groupMealDetails?id=${item.orderId}&settleStatus=${item.settleStatus}`
  49. });
  50. }else{
  51. uni.navigateTo({
  52. url: `/pages/finance/orderDetails?id=${item.orderId}&jumpType=${this.jumpType}`
  53. });
  54. }
  55. },
  56. },
  57. };
  58. </script>
  59. <style lang="scss" scoped>
  60. .list {
  61. border: 1rpx solid #f7f8fc;
  62. .list_item {
  63. width: 100%;
  64. padding: 21rpx;
  65. overflow: auto;
  66. display: flex;
  67. align-items: center;
  68. border-bottom: 1rpx solid #EEEEEE;
  69. font-weight: 400;
  70. &:last-child {
  71. border-bottom: none;
  72. }
  73. .left {
  74. flex: 1;
  75. margin-right: 16rpx;
  76. .name {
  77. width: 463rpx;
  78. font-size: 29rpx;
  79. color: #333333;
  80. margin-bottom: 5rpx;
  81. white-space: nowrap;
  82. overflow: hidden;
  83. text-overflow: ellipsis;
  84. }
  85. .value {
  86. font-size: 21rpx;
  87. color: #999999;
  88. }
  89. }
  90. .right {
  91. width: auto;
  92. text-align: right;
  93. display: flex;
  94. flex-direction: column;
  95. font-weight: 500;
  96. font-size: 31rpx;
  97. color: #333333;
  98. }
  99. }
  100. }
  101. </style>