酒店桌布为微信小程序
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.

283 lines
5.7 KiB

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