details.vue 2.9 KB

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