青蛙卖大米小程序2024-11-24
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.

249 lines
4.7 KiB

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