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

244 lines
4.7 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 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. <view v-if="orderList.length > 0" class="list">
  18. <view class="item"
  19. v-for="(item, index) in orderList"
  20. @click="toOrderDetail(item.id)"
  21. :key="index">
  22. <view class="top">
  23. <view class="service">
  24. <text>{{item.projectId_dictText}}</text>
  25. <text>{{item.type_dictText}}</text>
  26. </view>
  27. <view class="status">
  28. <text> {{item.state_dictText}}</text>
  29. </view>
  30. </view>
  31. <view class="content">
  32. <view class="left">
  33. <image mode="aspectFill" :src="item.image"></image>
  34. </view>
  35. <view class="right">
  36. <view class="text-hidden-1">
  37. 客户姓名{{item.name}}
  38. </view>
  39. <view class="text-hidden-1">
  40. 产品规格{{item.unit}}
  41. </view>
  42. <view class="text-hidden-1">
  43. 租赁地址{{item.address}}
  44. </view>
  45. <!-- <view class="text-hidden-1">
  46. 总计时间{{item.useTime}}分钟
  47. </view> -->
  48. </view>
  49. </view>
  50. <view class="bottom">
  51. <view class="price">
  52. 总价格<text class="num">{{item.money}}</text>
  53. </view>
  54. <view class="b1">
  55. 查看物流
  56. </view>
  57. <!-- <view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
  58. 立即付款
  59. </view>
  60. <view class="b1" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 3">
  61. 再来一单
  62. </view>
  63. <view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3">
  64. 立即评价
  65. </view>
  66. <view class="b2" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 4">
  67. 再来一单
  68. </view> -->
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. import { mapGetters } from 'vuex'
  76. export default {
  77. components : {
  78. },
  79. computed : {
  80. ...mapGetters(['userShop']),
  81. },
  82. data() {
  83. return {
  84. tabs: [
  85. {
  86. name: '遗产路径'
  87. },
  88. {
  89. name: '我要研学'
  90. },
  91. {
  92. name: '文创好物'
  93. },
  94. ],
  95. queryParams: {
  96. pageNo: 1,
  97. pageSize: 10
  98. },
  99. orderList: [
  100. {
  101. money : 99.99,
  102. address : '广东省广州市越秀区城南故事C3栋2802',
  103. name : '李**',
  104. phone : '150*****091',
  105. unit : '120*40*75【桌子尺寸】',
  106. image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
  107. state_dictText : '已完成',
  108. }
  109. ], //订单列表数据
  110. state : -1,
  111. }
  112. },
  113. computed : {
  114. },
  115. methods: {
  116. //点击tab栏
  117. clickTabs(index) {
  118. if (index == 0) {
  119. this.state = -1;
  120. } else {
  121. this.state = index - 1;
  122. }
  123. this.getOrderList()
  124. },
  125. //跳转订单详情页面
  126. toOrderDetail(id) {
  127. uni.navigateTo({
  128. url: '/pages_order/order/orderDetail?id=' + id
  129. })
  130. },
  131. getOrderList(){
  132. let queryParams = {
  133. ...this.queryParams,
  134. }
  135. if(this.state != -1){
  136. queryParams.state = this.state
  137. }
  138. this.$api('orderPage', queryParams, res => {
  139. if(res.code == 200){
  140. this.orderList = res.result
  141. }
  142. })
  143. },
  144. }
  145. }
  146. </script>
  147. <style scoped lang="scss">
  148. .page{
  149. padding-bottom: 200rpx;
  150. }
  151. .list {
  152. .item {
  153. width: calc(100% - 40rpx);
  154. background-color: #fff;
  155. margin: 20rpx;
  156. box-sizing: border-box;
  157. border-radius: 16rpx;
  158. padding: 30rpx;
  159. .top {
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. font-size: 30rpx;
  164. .service {}
  165. .status {
  166. font-size: 26rpx;
  167. font-weight: 600;
  168. }
  169. }
  170. .content {
  171. display: flex;
  172. margin: 10rpx 0;
  173. .left {
  174. width: 150rpx;
  175. height: 150rpx;
  176. border-radius: 10rpx;
  177. image {
  178. width: 150rpx;
  179. height: 150rpx;
  180. border-radius: 10rpx;
  181. }
  182. }
  183. .right {
  184. width: calc(100% - 160rpx);
  185. color: #777;
  186. font-size: 24rpx;
  187. padding-left: 20rpx;
  188. line-height: 40rpx;
  189. background-color: #F8F8F8;
  190. }
  191. }
  192. .bottom {
  193. display: flex;
  194. justify-content: space-between;
  195. font-size: 25rpx;
  196. .price {
  197. font-weight: 900;
  198. text {
  199. color: #ff780099;
  200. font-size: 30rpx;
  201. }
  202. }
  203. .b1 {
  204. border: 1px solid #777;
  205. color: #777;
  206. box-sizing: border-box;
  207. }
  208. .b2 {
  209. background: linear-gradient(178deg, #4FD3BC, #60C285);
  210. color: #fff;
  211. }
  212. view {
  213. margin: 12rpx;
  214. border-radius: 28rpx;
  215. padding: 8rpx 28rpx;
  216. margin-bottom: 0;
  217. }
  218. }
  219. }
  220. }
  221. </style>