景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

252 lines
4.8 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="page">
  3. <navbar
  4. title="订单中心"
  5. leftClick
  6. @leftClick="$utils.navigateBack"
  7. />
  8. <view class=""
  9. style="background-color: #fff;">
  10. <uv-tabs :list="tabs"
  11. lineColor="#B12026"
  12. lineHeight="8rpx"
  13. lineWidth="50rpx"
  14. :scrollable="false"
  15. @click="clickTabs"></uv-tabs>
  16. </view>
  17. <uv-empty
  18. v-if="orderList.length == 0"
  19. text="还没有订单呢!"
  20. textSize="30rpx"
  21. iconSize="200rpx"
  22. icon="list"></uv-empty>
  23. <view v-if="orderList.length > 0" class="list">
  24. <view class="item"
  25. v-for="(item, index) in orderList"
  26. @click="toOrderDetail(item.id)"
  27. :key="index">
  28. <view class="top">
  29. <view class="service">
  30. <text>{{item.travelWares.waresTitle}}</text>
  31. <!-- <text>{{item.type_dictText}}</text> -->
  32. </view>
  33. <view class="status">
  34. <text> {{item.state_dictText}}</text>
  35. </view>
  36. </view>
  37. <view class="content">
  38. <view class="left">
  39. <image mode="aspectFill"
  40. :src="item.travelWares.waresImage"></image>
  41. </view>
  42. <view class="right">
  43. <view class="text-hidden-1">
  44. 商品名称{{item.travelWares.waresTitle}}
  45. </view>
  46. <view class="text-hidden-1">
  47. 客户姓名{{item.travelWaresOrder.userName}}
  48. </view>
  49. <view class="text-hidden-1">
  50. 收货地址{{item.travelWaresOrder.userAddress}}
  51. </view>
  52. </view>
  53. </view>
  54. <view class="bottom">
  55. <view class="price">
  56. 总价格<text class="num">{{item.travelWaresOrder.price}}</text>
  57. </view>
  58. <!-- <view class="b1">
  59. 查看物流
  60. </view> -->
  61. <!-- <view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
  62. 立即付款
  63. </view>
  64. <view class="b1" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 3">
  65. 再来一单
  66. </view>
  67. <view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3">
  68. 立即评价
  69. </view>
  70. <view class="b2" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 4">
  71. 再来一单
  72. </view> -->
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. import { mapGetters } from 'vuex'
  80. export default {
  81. components : {
  82. },
  83. computed : {
  84. ...mapGetters(['userShop']),
  85. },
  86. data() {
  87. return {
  88. tabs: [
  89. {
  90. name: '全部'
  91. },
  92. {
  93. name: '待支付'
  94. },
  95. {
  96. name: '待发货'
  97. },
  98. {
  99. name: '待收货'
  100. },
  101. {
  102. name: '已完成'
  103. },
  104. ],
  105. queryParams: {
  106. pageNo: 1,
  107. pageSize: 10
  108. },
  109. orderList: [], //订单列表数据
  110. state : -1,
  111. total : 0,
  112. }
  113. },
  114. computed : {
  115. },
  116. onShow() {
  117. this.getOrderList()
  118. },
  119. methods: {
  120. //点击tab栏
  121. clickTabs(index) {
  122. if (index == 0) {
  123. this.state = -1;
  124. } else {
  125. this.state = index - 1;
  126. }
  127. this.getOrderList()
  128. },
  129. //跳转订单详情页面
  130. toOrderDetail(id) {
  131. uni.navigateTo({
  132. url: '/pages_order/order/orderDetail?id=' + id
  133. })
  134. },
  135. getOrderList(){
  136. let queryParams = {
  137. ...this.queryParams,
  138. }
  139. if(this.state != -1){
  140. queryParams.state = this.state
  141. }
  142. this.$api('queryWaresOrderList', queryParams, res => {
  143. if(res.code == 200){
  144. this.orderList = res.result
  145. }
  146. })
  147. },
  148. }
  149. }
  150. </script>
  151. <style scoped lang="scss">
  152. .page{
  153. padding-bottom: 200rpx;
  154. }
  155. .list {
  156. .item {
  157. width: calc(100% - 40rpx);
  158. background-color: #fff;
  159. margin: 20rpx;
  160. box-sizing: border-box;
  161. border-radius: 16rpx;
  162. padding: 30rpx;
  163. .top {
  164. display: flex;
  165. justify-content: space-between;
  166. align-items: center;
  167. font-size: 30rpx;
  168. .service {}
  169. .status {
  170. font-size: 26rpx;
  171. font-weight: 600;
  172. }
  173. }
  174. .content {
  175. display: flex;
  176. margin: 10rpx 0;
  177. .left {
  178. width: 150rpx;
  179. height: 150rpx;
  180. border-radius: 10rpx;
  181. image {
  182. width: 150rpx;
  183. height: 150rpx;
  184. border-radius: 10rpx;
  185. }
  186. }
  187. .right {
  188. width: calc(100% - 160rpx);
  189. color: #777;
  190. font-size: 24rpx;
  191. padding-left: 20rpx;
  192. line-height: 40rpx;
  193. background-color: #F8F8F8;
  194. display: flex;
  195. flex-direction: column;
  196. justify-content: space-around;
  197. }
  198. }
  199. .bottom {
  200. display: flex;
  201. justify-content: space-between;
  202. font-size: 25rpx;
  203. .price {
  204. font-weight: 900;
  205. text {
  206. color: #ff780099;
  207. font-size: 30rpx;
  208. }
  209. }
  210. .b1 {
  211. border: 1px solid #777;
  212. color: #777;
  213. box-sizing: border-box;
  214. }
  215. .b2 {
  216. background: linear-gradient(178deg, #4FD3BC, #60C285);
  217. color: #fff;
  218. }
  219. view {
  220. margin: 12rpx;
  221. border-radius: 28rpx;
  222. padding: 8rpx 28rpx;
  223. margin-bottom: 0;
  224. }
  225. }
  226. }
  227. }
  228. </style>