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

426 lines
8.7 KiB

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