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

299 lines
6.1 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
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="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.state_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.unit}}
  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 != 0 && item.type == 1">
  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. <tabber select="2" v-if="!uid"/>
  89. </view>
  90. </template>
  91. <script>
  92. import tabber from '@/components/base/tabbar.vue'
  93. import { mapGetters } from 'vuex'
  94. export default {
  95. components : {
  96. tabber,
  97. },
  98. computed : {
  99. ...mapGetters(['userShop']),
  100. },
  101. data() {
  102. return {
  103. tabs: [{
  104. name: '全部'
  105. },
  106. {
  107. name: '租赁押金'
  108. },
  109. {
  110. name: '水洗租赁'
  111. },
  112. {
  113. name: '破损换货'
  114. },
  115. {
  116. name: '退货退款'
  117. }
  118. ],
  119. queryParams: {
  120. pageNo: 1,
  121. pageSize: 10
  122. },
  123. // orderList: [
  124. // {
  125. // money : 99.99,
  126. // address : '广东省广州市越秀区城南故事C3栋2802',
  127. // name : '李**',
  128. // phone : '150*****091',
  129. // unit : '120*40*75【桌子尺寸】',
  130. // image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
  131. // state_dictText : '已完成',
  132. // }
  133. // ], //订单列表数据
  134. orderList : {
  135. records : [],
  136. total : 0,
  137. },
  138. type : -1,
  139. uid : 0,
  140. }
  141. },
  142. onLoad(args) {
  143. this.uid = args.uid
  144. },
  145. onShow() {
  146. this.orderPage()
  147. },
  148. //滚动到屏幕底部
  149. onReachBottom() {
  150. if(this.queryParams.pageSize < this.orderList.total){
  151. this.queryParams.pageSize += 10
  152. this.orderPage()
  153. }
  154. },
  155. methods: {
  156. orderPage(){
  157. let queryParams = {
  158. ...this.queryParams,
  159. }
  160. if(this.type != -1){
  161. queryParams.type = this.type
  162. }
  163. // 水洗店查询用户订单
  164. if(this.uid != 0){
  165. queryParams.uid = this.uid
  166. }
  167. this.$api('orderPage', queryParams, res => {
  168. if(res.code == 200){
  169. this.orderList = res.result
  170. }
  171. })
  172. },
  173. //点击tab栏
  174. clickTabs({ index, name }) {
  175. if (index == 0) {
  176. this.type = -1;
  177. } else {
  178. this.type = index - 1;
  179. }
  180. this.queryParams.pageSize = 10
  181. this.orderPage()
  182. },
  183. //跳转订单详情页面
  184. toOrderDetail(id) {
  185. uni.navigateTo({
  186. url: '/pages_order/order/orderDetail?id=' + id
  187. })
  188. },
  189. getOrderList(){
  190. },
  191. }
  192. }
  193. </script>
  194. <style scoped lang="scss">
  195. .page{
  196. }
  197. .list {
  198. .item {
  199. width: calc(100% - 40rpx);
  200. background-color: #fff;
  201. margin: 20rpx;
  202. box-sizing: border-box;
  203. border-radius: 16rpx;
  204. padding: 30rpx;
  205. .top {
  206. display: flex;
  207. justify-content: space-between;
  208. align-items: center;
  209. font-size: 30rpx;
  210. .service {}
  211. .status {
  212. font-size: 26rpx;
  213. font-weight: 600;
  214. }
  215. }
  216. .content {
  217. display: flex;
  218. margin: 10rpx 0;
  219. .left {
  220. width: 150rpx;
  221. height: 150rpx;
  222. border-radius: 10rpx;
  223. image {
  224. width: 150rpx;
  225. height: 150rpx;
  226. border-radius: 10rpx;
  227. }
  228. }
  229. .right {
  230. width: calc(100% - 160rpx);
  231. color: #777;
  232. font-size: 24rpx;
  233. padding-left: 20rpx;
  234. line-height: 40rpx;
  235. background-color: #F8F8F8;
  236. }
  237. }
  238. .bottom {
  239. display: flex;
  240. justify-content: space-between;
  241. font-size: 25rpx;
  242. .price {
  243. font-weight: 900;
  244. text {
  245. color: #ff780099;
  246. font-size: 30rpx;
  247. }
  248. }
  249. .b1 {
  250. border: 1px solid #777;
  251. color: #777;
  252. box-sizing: border-box;
  253. display: flex;
  254. justify-content: center;
  255. align-items: center;
  256. }
  257. .b2 {
  258. background: linear-gradient(178deg, #4FD3BC, #60C285);
  259. color: #fff;
  260. }
  261. .b1,.b2 {
  262. margin: 12rpx;
  263. border-radius: 28rpx;
  264. padding: 8rpx 28rpx;
  265. margin-bottom: 0;
  266. }
  267. }
  268. }
  269. }
  270. </style>