details.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view>
  3. <view class="view">
  4. <!-- <view v-if="type === 0" class="listItemStyle">
  5. <u-text text="查看订单进度" color="rgb(0, 170, 255)" size="20"></u-text>
  6. </view> -->
  7. <u-list @scrolltolower="scrolltolower">
  8. <view v-if="dataList.length === 0" style="padding: 0 50px;">
  9. <image style="margin: 0 auto; width: 100%;" src="../../../static/img/page/empty_view.png"></image>
  10. </view>
  11. <view class="listItemStyle">
  12. <view style="padding: 10rpx;color: #848484;font-size: 30rpx;">
  13. 联系方式
  14. </view>
  15. <view style="padding: 5rpx 30rpx;color: #848484;">
  16. <view v-if="order.userName && order.phone">
  17. {{order.userName +" "+ order.phone}}
  18. </view>
  19. </view>
  20. <view style="padding: 10rpx;color: #848484;font-size: 30rpx;">
  21. 收货地址
  22. </view>
  23. <view style="padding: 5rpx 30rpx;color: #848484;">
  24. <view v-if="order.placeNumber">
  25. {{order.placeNumber}}
  26. </view>
  27. </view>
  28. </view>
  29. <u-list-item v-for="(item, index) in dataList" :key="index">
  30. <view v-if="item.amount !== 0 && item.amount" class="listItemStyle">
  31. <u-row>
  32. <u-col span="3">
  33. <u--image :showLoading="true" shape="circle" :src="baseURL+item.pictrue" width="70px"
  34. height="70px" style="margin: 10px;"></u--image>
  35. </u-col>
  36. <u-col span="7" style="margin-left: 5px;">
  37. <view>
  38. <u--text :text="item.name" size="20"></u--text>
  39. </view>
  40. <view style="margin-top: 10px;">
  41. <u--text :text="'¥'+item.price" size="20"></u--text>
  42. </view>
  43. </u-col>
  44. <u-col span="2">
  45. <view>
  46. <u--text :text="item.amount+'份'" size="25"></u--text>
  47. </view>
  48. </u-col>
  49. </u-row>
  50. </view>
  51. </u-list-item>
  52. </u-list>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. data() {
  59. return {
  60. baseURL: this.$BASE_URL,
  61. priceSum: 0.0,
  62. dateShow: false,
  63. data: {
  64. organizationName: "",
  65. },
  66. order: uni.getStorageSync('order'),
  67. from: {
  68. orderNumber: '',
  69. organizationCode: ''
  70. },
  71. dataList: [],
  72. dataListNow: [],
  73. type: uni.getStorageSync("tabType")
  74. }
  75. },
  76. onLoad() {
  77. this.submitOrder()
  78. },
  79. methods: {
  80. toJDPage() {
  81. this.$goto('../../../pageA/card/orderProcess')
  82. },
  83. async submitOrder() {
  84. this.from.orderNumber = this.order.orderNumber
  85. this.from.organizationCode = this.order.jgid
  86. // 发送请求
  87. const {
  88. data: res
  89. } = await this.$httpRequest({
  90. url: '/app/getOrderDetail',
  91. method: 'post',
  92. data: this.from,
  93. urlType: this.$getUrlType()
  94. });
  95. if (res.code === 200) {
  96. this.dataList = res.rows
  97. }
  98. },
  99. loadmore(data) {
  100. for (var i = 0; i < data.length; i++) {
  101. this.dataList.push(data[i])
  102. }
  103. },
  104. result(time, mode) {
  105. const timeFormat = uni.$u.timeFormat
  106. switch (mode) {
  107. case 'datetime':
  108. return timeFormat(time, 'yyyy-mm-dd hh:MM')
  109. case 'date':
  110. return timeFormat(time, 'yyyy-mm-dd')
  111. case 'year-month':
  112. return timeFormat(time, 'yyyy-mm')
  113. case 'time':
  114. return time
  115. default:
  116. return ''
  117. }
  118. }
  119. }
  120. }
  121. </script>
  122. <style>
  123. .view {
  124. background-color: #ebebeb;
  125. padding-top: 10px;
  126. }
  127. .listTermDate {
  128. padding: 10px 0;
  129. }
  130. .listItemStyle {
  131. margin: 5px 12px;
  132. padding: 10px;
  133. border-radius: 15px;
  134. background-color: #fafafa;
  135. }
  136. </style>