铝交易,微信公众号
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.

263 lines
5.1 KiB

4 months 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.records"
  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. orderList : {
  114. records : [],
  115. total : 0,
  116. },
  117. state : -1,
  118. }
  119. },
  120. onShow() {
  121. this.orderPage()
  122. },
  123. //滚动到屏幕底部
  124. onReachBottom() {
  125. if(this.queryParams.pageSize < this.orderList.total){
  126. this.queryParams.pageSize += 10
  127. this.orderPage()
  128. }
  129. },
  130. methods: {
  131. orderPage(){
  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. //点击tab栏
  145. clickTabs(index) {
  146. if (index == 0) {
  147. this.state = -1;
  148. } else {
  149. this.state = index - 1;
  150. }
  151. this.queryParams.pageSize = 10
  152. this.orderPage()
  153. },
  154. //跳转订单详情页面
  155. toOrderDetail(id) {
  156. uni.navigateTo({
  157. url: '/pages_order/order/orderDetail?id=' + id
  158. })
  159. },
  160. getOrderList(){
  161. },
  162. }
  163. }
  164. </script>
  165. <style scoped lang="scss">
  166. .page{
  167. }
  168. .list {
  169. .item {
  170. width: calc(100% - 40rpx);
  171. background-color: #fff;
  172. margin: 20rpx;
  173. box-sizing: border-box;
  174. border-radius: 16rpx;
  175. padding: 30rpx;
  176. .top {
  177. display: flex;
  178. justify-content: space-between;
  179. align-items: center;
  180. font-size: 30rpx;
  181. .service {}
  182. .status {
  183. font-size: 26rpx;
  184. font-weight: 600;
  185. }
  186. }
  187. .content {
  188. display: flex;
  189. margin: 10rpx 0;
  190. .left {
  191. width: 150rpx;
  192. height: 150rpx;
  193. border-radius: 10rpx;
  194. image {
  195. width: 150rpx;
  196. height: 150rpx;
  197. border-radius: 10rpx;
  198. }
  199. }
  200. .right {
  201. width: calc(100% - 160rpx);
  202. color: #777;
  203. font-size: 24rpx;
  204. padding-left: 20rpx;
  205. line-height: 40rpx;
  206. background-color: #F8F8F8;
  207. }
  208. }
  209. .bottom {
  210. display: flex;
  211. justify-content: space-between;
  212. font-size: 25rpx;
  213. .price {
  214. font-weight: 900;
  215. text {
  216. color: #ff780099;
  217. font-size: 30rpx;
  218. }
  219. }
  220. .b1 {
  221. border: 1px solid #777;
  222. color: #777;
  223. box-sizing: border-box;
  224. }
  225. .b2 {
  226. background: linear-gradient(178deg, #4FD3BC, #60C285);
  227. color: #fff;
  228. }
  229. view {
  230. margin: 12rpx;
  231. border-radius: 28rpx;
  232. padding: 8rpx 28rpx;
  233. margin-bottom: 0;
  234. }
  235. }
  236. }
  237. }
  238. </style>