景徳镇旅游微信小程序
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.

253 lines
4.9 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months 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.travelWaresOrder.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> {{ statusTitle[item.travelWaresOrder.status] }}</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. statusTitle : ['待支付', '待发货', '待收货', '已完成'],
  89. tabs: [
  90. {
  91. name: '全部'
  92. },
  93. {
  94. name: '待支付'
  95. },
  96. {
  97. name: '待发货'
  98. },
  99. {
  100. name: '待收货'
  101. },
  102. {
  103. name: '已完成'
  104. },
  105. ],
  106. queryParams: {
  107. pageNo: 1,
  108. pageSize: 10
  109. },
  110. orderList: [], //订单列表数据
  111. state : -1,
  112. total : 0,
  113. }
  114. },
  115. computed : {
  116. },
  117. onShow() {
  118. this.getOrderList()
  119. },
  120. methods: {
  121. //点击tab栏
  122. clickTabs({index}) {
  123. if (index == 0) {
  124. this.state = -1;
  125. } else {
  126. this.state = index - 1;
  127. }
  128. this.getOrderList()
  129. },
  130. //跳转订单详情页面
  131. toOrderDetail(id) {
  132. uni.navigateTo({
  133. url: '/pages_order/order/orderDetail?id=' + id
  134. })
  135. },
  136. getOrderList(){
  137. let queryParams = {
  138. ...this.queryParams,
  139. }
  140. if(this.state != -1){
  141. queryParams.status = this.state
  142. }
  143. this.$api('queryWaresOrderList', queryParams, res => {
  144. if(res.code == 200){
  145. this.orderList = res.result
  146. }
  147. })
  148. },
  149. }
  150. }
  151. </script>
  152. <style scoped lang="scss">
  153. .page{
  154. padding-bottom: 200rpx;
  155. }
  156. .list {
  157. .item {
  158. width: calc(100% - 40rpx);
  159. background-color: #fff;
  160. margin: 20rpx;
  161. box-sizing: border-box;
  162. border-radius: 16rpx;
  163. padding: 30rpx;
  164. .top {
  165. display: flex;
  166. justify-content: space-between;
  167. align-items: center;
  168. font-size: 30rpx;
  169. .service {}
  170. .status {
  171. font-size: 26rpx;
  172. font-weight: 600;
  173. }
  174. }
  175. .content {
  176. display: flex;
  177. margin: 10rpx 0;
  178. .left {
  179. width: 150rpx;
  180. height: 150rpx;
  181. border-radius: 10rpx;
  182. image {
  183. width: 150rpx;
  184. height: 150rpx;
  185. border-radius: 10rpx;
  186. }
  187. }
  188. .right {
  189. width: calc(100% - 160rpx);
  190. color: #777;
  191. font-size: 24rpx;
  192. padding-left: 20rpx;
  193. line-height: 40rpx;
  194. background-color: #F8F8F8;
  195. display: flex;
  196. flex-direction: column;
  197. justify-content: space-around;
  198. }
  199. }
  200. .bottom {
  201. display: flex;
  202. justify-content: space-between;
  203. font-size: 25rpx;
  204. .price {
  205. font-weight: 900;
  206. text {
  207. color: #ff780099;
  208. font-size: 30rpx;
  209. }
  210. }
  211. .b1 {
  212. border: 1px solid #777;
  213. color: #777;
  214. box-sizing: border-box;
  215. }
  216. .b2 {
  217. background: linear-gradient(178deg, #4FD3BC, #60C285);
  218. color: #fff;
  219. }
  220. view {
  221. margin: 12rpx;
  222. border-radius: 28rpx;
  223. padding: 8rpx 28rpx;
  224. margin-bottom: 0;
  225. }
  226. }
  227. }
  228. }
  229. </style>