猫妈狗爸伴宠师小程序前端代码
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.

90 lines
2.7 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <up-list @scrolltolower="scrolltolower">
  3. <up-list-item>
  4. <view class="mb28 container-list-item" v-for="(item, index) in list" :key="item.id">
  5. <view class="flex-between flex" style="background: #FFF4E5;padding: 22rpx 42rpx">
  6. <view>{{ orderStatus[item.status] }}</view>
  7. <view>本单酬劳
  8. <text style="color: #FF530A">{{ item.orderGivePrice }}</text>
  9. </view>
  10. </view>
  11. <view class="container-list">
  12. <view class="flex-between flex mb28" v-for="(pet, index) in item.h5OrderVO.petVOList">
  13. <up-image style="flex-shrink:0" class="mr20" width="70px" height="70px"
  14. :src="pet.photo" shape="circle"></up-image>
  15. <view>
  16. <view class="font28 col3">服务天数: {{ pet.orderServiceText.length }} I {{ pet.orderServiceText.join(',') }}
  17. </view>
  18. <view style="margin: 18rpx 0">期望上门时间</view>
  19. <view>{{ pet.breed }}{{ pet.bodyType }} | {{ pet.productNameText.join('+') }}</view>
  20. </view>
  21. </view>
  22. <view class="mb28 address">{{ item.address }}</view>
  23. <view class="mb28" v-if="item.type == 0">订单为系统派发请确认订单信息后再抢单</view>
  24. <view class="flex flex-between">
  25. <up-button type="primary" :text="btnTexts[item.orderStatus]" @click="toClock(item)" shape="circle"
  26. class="mr20" color="#FFAA48"></up-button>
  27. <up-button type="primary" text="宠物档案" @click="toPet(item)" shape="circle" class="mr20"
  28. color="#FFAA48"></up-button>
  29. <up-button type="primary" text="服务档案" @click="toService(item)" shape="circle"
  30. color="#FFAA48"></up-button>
  31. </view>
  32. </view>
  33. </view>
  34. </up-list-item>
  35. </up-list>
  36. </template>
  37. <script setup>
  38. import { onMounted } from 'vue';
  39. const scrolltolower = () => {
  40. }
  41. onMounted(() => {
  42. console.log(props)
  43. })
  44. const props = defineProps({
  45. list: {
  46. type: Array,
  47. required: true
  48. },
  49. current: {
  50. type: Number,
  51. required: true
  52. }
  53. });
  54. const btnTexts = ['打卡', '打卡', '打开记录']
  55. const orderStatus = ['待接单','进行中','已完成']
  56. function toClock(item) {
  57. const paths = [
  58. `/otherPages/myOrdersManage/clock/index?id=${item.orderId}`,
  59. `/otherPages/myOrdersManage/clock/index?id=${item.orderId}`,
  60. `/otherPages/orderTakingManage/detail/index?isRead=true&id=${item.orderId}`,
  61. ]
  62. uni.navigateTo({
  63. url: paths[item.orderStatus]
  64. })
  65. }
  66. function toPet(item) {
  67. uni.navigateTo({
  68. url: "/otherPages/orderTakingManage/pet/index?id=" + item.orderId
  69. })
  70. }
  71. function toService(item) {
  72. uni.navigateTo({
  73. url: "/otherPages/myOrdersManage/service/index?id=" + item.orderId
  74. })
  75. }
  76. </script>
  77. <style scoped lang="scss">
  78. @import "../index";
  79. </style>