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

306 lines
6.2 KiB

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