商城类、订单类uniapp模板,多角色
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.

236 lines
4.5 KiB

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