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

373 lines
7.6 KiB

11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
11 months ago
9 months ago
11 months ago
11 months ago
9 months ago
11 months ago
9 months ago
11 months ago
11 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
11 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
11 months ago
11 months ago
10 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
11 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.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. <!-- 水洗店按钮 -->
  47. <view class="bottom" v-if="userShop">
  48. <view class="pay">
  49. <view
  50. v-if="item.washPay && item.type == 1">
  51. 水洗费用{{ item.washPay }}
  52. </view>
  53. </view>
  54. <!-- 待接单 -->
  55. <view
  56. v-if="[4, 18, 19].includes(item.status)"
  57. @click.stop="orderConfirmAccept(item)" class="b2">
  58. 确认接单
  59. </view>
  60. <!-- 待收货 -->
  61. <template v-if="item.status == 2">
  62. <view @click.stop="confirmReceiveGoods(item)" class="b2">
  63. 确认收货
  64. </view>
  65. <view @click.stop="" class="b1">
  66. 查看物流
  67. </view>
  68. </template>
  69. <!-- 待检查 -->
  70. <template v-if="item.status == 5">
  71. <view @click.stop="orderConfirmedDamage(item, 1)" class="b2"
  72. >
  73. 确认无破损
  74. </view>
  75. <!-- <view @click.stop="$utils.navigateTo
  76. (`/pages_order/order/damageReport?id=${item.id}`)" class="b1"
  77. >
  78. 破损上报
  79. </view> -->
  80. <view @click.stop="orderConfirmedDamage(item, 2)" class="b1"
  81. >
  82. 破损上报
  83. </view>
  84. </template>
  85. <view
  86. v-if="[6].includes(item.status)"
  87. @click.stop="orderFinishedWashing(item)" class="b2">
  88. 水洗完成
  89. </view>
  90. </view>
  91. <!-- 酒店按钮 -->
  92. <view class="bottom"
  93. v-else>
  94. <view class="pay">
  95. <!-- <view class="price"
  96. v-if="item.type != 0 && item.type != 1 && item.orderPay">
  97. 总金额<text class="num">{{ item.orderPay }}</text>
  98. </view> -->
  99. <view
  100. v-if="item.washPay && item.type == 1">
  101. 水洗费用{{ item.washPay }}
  102. </view>
  103. <view
  104. v-if="item.rentPay">
  105. 租赁费用{{ item.rentPay }}
  106. </view>
  107. </view>
  108. <!-- 待支付 -->
  109. <view @click.stop="payOrder(item.orderLogId)" class="b2"
  110. v-if="[0, 3, 10].includes(item.status)">
  111. {{ item.status == 10 ? '支付平台损失' : '立即付款' }}
  112. </view>
  113. <!-- 待收货 -->
  114. <template v-if="item.status == 2">
  115. <view @click.stop="confirmReceiveGoods(item)" class="b2">
  116. 确认收货
  117. </view>
  118. <view @click.stop="" class="b1">
  119. 查看物流
  120. </view>
  121. </template>
  122. </view>
  123. </view>
  124. </view>
  125. <uv-empty
  126. v-else
  127. text="空空如也"
  128. textSize="30rpx"
  129. iconSize="200rpx"
  130. icon="list"></uv-empty>
  131. <tabber select="2" v-if="!uid"/>
  132. </view>
  133. </template>
  134. <script>
  135. // 状态
  136. // 租赁订单:0待支付 1待发货 2待收货
  137. // 水洗订单:3待支付 4水洗店接单 5水洗店检查
  138. // 6开始清洗
  139. // 换货订单:7待回收 8待发货 9平台待收货
  140. // 10平台检查损失待用户支付 18待接单
  141. // 退货订单:11待回收 12待发货 13平台待收货
  142. // 14平台检查损失并且退还定金 19待接单
  143. // 15 已完成
  144. import tabber from '@/components/base/tabbar.vue'
  145. import { mapGetters } from 'vuex'
  146. import mixinOrder from '@/mixins/order.js'
  147. export default {
  148. components : {
  149. tabber,
  150. },
  151. mixins : [mixinOrder],
  152. computed : {
  153. ...mapGetters(['userShop']),
  154. },
  155. data() {
  156. return {
  157. tabs: [{
  158. name: '全部'
  159. },
  160. {
  161. name: '租赁押金'
  162. },
  163. {
  164. name: '水洗租赁'
  165. },
  166. {
  167. name: '破损换货'
  168. },
  169. {
  170. name: '退货退款'
  171. }
  172. ],
  173. queryParams: {
  174. pageNo: 1,
  175. pageSize: 10
  176. },
  177. // orderList: [
  178. // {
  179. // money : 99.99,
  180. // address : '广东省广州市越秀区城南故事C3栋2802',
  181. // name : '李**',
  182. // phone : '150*****091',
  183. // unit : '120*40*75【桌子尺寸】',
  184. // image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
  185. // status_dictText : '已完成',
  186. // }
  187. // ], //订单列表数据
  188. orderList : {
  189. records : [],
  190. total : 0,
  191. },
  192. type : -1,
  193. uid : 0,
  194. }
  195. },
  196. onLoad(args) {
  197. this.uid = args.uid || 0
  198. },
  199. onShow() {
  200. this.getData()
  201. },
  202. onPullDownRefresh() {
  203. this.getData()
  204. },
  205. //滚动到屏幕底部
  206. onReachBottom() {
  207. if(this.queryParams.pageSize < this.orderList.total){
  208. this.queryParams.pageSize += 10
  209. this.getData()
  210. }
  211. },
  212. methods: {
  213. getData(){
  214. let queryParams = {
  215. ...this.queryParams,
  216. }
  217. if(this.type != -1){
  218. queryParams.type = this.type
  219. }
  220. // 水洗店查询用户订单
  221. if(this.uid != 0){
  222. queryParams.uid = this.uid
  223. }
  224. this.$api('orderPage', queryParams, res => {
  225. uni.stopPullDownRefresh()
  226. if(res.code == 200){
  227. this.orderList = res.result
  228. }
  229. })
  230. },
  231. //点击tab栏
  232. clickTabs({ index, name }) {
  233. if (index == 0) {
  234. this.type = -1;
  235. } else {
  236. this.type = index - 1;
  237. }
  238. this.queryParams.pageSize = 10
  239. this.getData()
  240. },
  241. //跳转订单详情页面
  242. toOrderDetail(id) {
  243. uni.navigateTo({
  244. url: '/pages_order/order/orderDetail?id=' + id
  245. })
  246. },
  247. }
  248. }
  249. </script>
  250. <style scoped lang="scss">
  251. .page{
  252. }
  253. .list {
  254. .item {
  255. width: calc(100% - 40rpx);
  256. background-color: #fff;
  257. margin: 20rpx;
  258. box-sizing: border-box;
  259. border-radius: 16rpx;
  260. padding: 30rpx;
  261. .top {
  262. display: flex;
  263. justify-content: space-between;
  264. align-items: center;
  265. font-size: 30rpx;
  266. .service {}
  267. .status {
  268. font-size: 26rpx;
  269. font-weight: 600;
  270. }
  271. }
  272. .content {
  273. display: flex;
  274. margin: 10rpx 0;
  275. .left {
  276. width: 150rpx;
  277. height: 150rpx;
  278. border-radius: 10rpx;
  279. image {
  280. width: 150rpx;
  281. height: 150rpx;
  282. border-radius: 10rpx;
  283. }
  284. }
  285. .right {
  286. width: calc(100% - 160rpx);
  287. color: #777;
  288. font-size: 24rpx;
  289. padding-left: 20rpx;
  290. line-height: 40rpx;
  291. background-color: #F8F8F8;
  292. }
  293. }
  294. .bottom {
  295. display: flex;
  296. justify-content: flex-end;
  297. font-size: 25rpx;
  298. .pay{
  299. margin: 12rpx;
  300. margin-right: auto;
  301. }
  302. .price {
  303. font-weight: 900;
  304. text {
  305. color: #ff780099;
  306. font-size: 30rpx;
  307. }
  308. }
  309. .b1 {
  310. border: 1px solid #777;
  311. color: #777;
  312. box-sizing: border-box;
  313. display: flex;
  314. justify-content: center;
  315. align-items: center;
  316. }
  317. .b2 {
  318. background: $uni-color;
  319. color: #fff;
  320. }
  321. .b1,.b2 {
  322. margin: 12rpx;
  323. border-radius: 28rpx;
  324. padding: 8rpx 28rpx;
  325. margin-bottom: 0;
  326. }
  327. }
  328. }
  329. }
  330. </style>