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

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