- <template>
- <up-list @scrolltolower="scrolltolower">
- <up-list-item>
- <view class="mb28 container-list-item" v-for="(item, index) in list" :key="item.id">
- <view class="flex-between flex" style="background: #FFF4E5;padding: 22rpx 42rpx">
- <view>{{ orderStatus[item.status] }}</view>
- <view>本单酬劳
- <text style="color: #FF530A">¥{{ item.orderGivePrice }}</text>
- </view>
- </view>
- <view class="container-list">
- <view class="flex-between flex mb28" v-for="(pet, index) in item.h5OrderVO.petVOList">
- <up-image style="flex-shrink:0" class="mr20" width="70px" height="70px"
- :src="pet.photo" shape="circle"></up-image>
- <view>
- <view class="font28 col3">服务天数: 共{{ pet.orderServiceText.length }}天 I {{ pet.orderServiceText.join(',') }}
- </view>
- <view style="margin: 18rpx 0">期望上门时间:早</view>
- <view>{{ pet.breed }}{{ pet.bodyType }} | {{ pet.productNameText.join('+') }}</view>
- </view>
- </view>
- <view class="mb28 address">{{ item.address }}</view>
- <view class="mb28" v-if="item.type == 0">订单为系统派发,请确认订单信息后再抢单</view>
- <view class="flex flex-between">
-
- <up-button type="primary" :text="btnTexts[item.orderStatus]" @click="toClock(item)" shape="circle"
- class="mr20" color="#FFAA48"></up-button>
-
- <up-button type="primary" text="宠物档案" @click="toPet(item)" shape="circle" class="mr20"
- color="#FFAA48"></up-button>
-
- <up-button type="primary" text="服务档案" @click="toService(item)" shape="circle"
- color="#FFAA48"></up-button>
- </view>
- </view>
- </view>
- </up-list-item>
- </up-list>
- </template>
- <script setup>
- import { onMounted } from 'vue';
-
- const scrolltolower = () => {
-
- }
-
- onMounted(() => {
- console.log(props)
- })
-
- const props = defineProps({
- list: {
- type: Array,
- required: true
- },
- current: {
- type: Number,
- required: true
- }
- });
- const btnTexts = ['打卡', '打开记录', '订单详情']
- const orderStatus = ['待接单','进行中','已完成']
-
-
- function toClock(item) {
- const paths = [
- `/otherPages/myOrdersManage/clock/index?id=${item.id}`,
- `/otherPages/myOrdersManage/clock/detail?id=${item.id}`,
- `/otherPages/orderTakingManage/detail/index?id=${item.id}`,
- ]
- uni.navigateTo({
- url: paths[item.orderStatus]
- })
- }
-
- function toPet(item) {
- uni.navigateTo({
- url: "/otherPages/orderTakingManage/pet/index?id=" + item.orderId
- })
- }
-
- function toService(item) {
- uni.navigateTo({
- url: "/otherPages/myOrdersManage/service/index?id=" + item.orderId
- })
- }
- </script>
-
- <style scoped lang="scss">
- @import "../index";
- </style>
|