【接单】 新增# 订单状态为已完成时添加上传拍照按钮
parent
2f9cc36776
commit
73ed247bec
|
@ -28,6 +28,7 @@
|
||||||
:appointTime="item.appointTime"
|
:appointTime="item.appointTime"
|
||||||
:appointTimeStartStr="item.appointTimeStart"
|
:appointTimeStartStr="item.appointTimeStart"
|
||||||
:isDispatch="item.isDispatch"
|
:isDispatch="item.isDispatch"
|
||||||
|
:uploadServiceImgBtn="item.uploadServiceImgBtn"
|
||||||
@refresh="queryList"
|
@refresh="queryList"
|
||||||
/>
|
/>
|
||||||
</order-card>
|
</order-card>
|
||||||
|
@ -36,10 +37,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch, nextTick, shallowRef, unref } from 'vue'
|
|
||||||
import orderCard from './order-card.vue'
|
|
||||||
import orderFooter from '@/components/order-footer/index.vue'
|
|
||||||
import { apiStaffOrderLists } from '@/api/order'
|
import { apiStaffOrderLists } from '@/api/order'
|
||||||
|
import orderFooter from '@/components/order-footer/index.vue'
|
||||||
|
import { nextTick, ref, shallowRef, unref, watch } from 'vue'
|
||||||
|
import orderCard from './order-card.vue'
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|
|
@ -125,10 +125,12 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
|
v-if="orderData.serviceImages"
|
||||||
class="card bg-white card normal text-base flex flex-col gap-[12rpx] rounded-[12rpx]"
|
class="card bg-white card normal text-base flex flex-col gap-[12rpx] rounded-[12rpx]"
|
||||||
>
|
>
|
||||||
<text>服务照片</text>
|
<text>服务照片</text>
|
||||||
<view class="flex gap-[12rpx] flex-wrap">
|
<view class="flex gap-[12rpx] flex-wrap">
|
||||||
|
<template v-if="orderData.serviceImages?.length > 0">
|
||||||
<u-image
|
<u-image
|
||||||
v-for="(image, index) in orderData.serviceImages"
|
v-for="(image, index) in orderData.serviceImages"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -137,6 +139,12 @@
|
||||||
height="200"
|
height="200"
|
||||||
@click="handlePreviewImage(index)"
|
@click="handlePreviewImage(index)"
|
||||||
></u-image>
|
></u-image>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view class="text-center w-full">
|
||||||
|
<u-empty text="暂无上传图片" mode="data"></u-empty>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- Main End -->
|
<!-- Main End -->
|
||||||
|
|
|
@ -94,6 +94,7 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
/** Life Cycle End **/
|
/** Life Cycle End **/
|
||||||
const setFileList = computed(() => list => {
|
const setFileList = computed(() => list => {
|
||||||
|
if (!list) return []
|
||||||
return list.map((item: string) => {
|
return list.map((item: string) => {
|
||||||
return {
|
return {
|
||||||
url: item
|
url: item
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { apiStaffOrderDetail } from '@/api/order'
|
import { apiServiceImages, apiStaffOrderDetail } from '@/api/order'
|
||||||
import { toast } from '@/utils/util'
|
import { toast } from '@/utils/util'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
@ -46,7 +46,7 @@ onLoad(option => {
|
||||||
const initOrderDetail = async () => {
|
const initOrderDetail = async () => {
|
||||||
const result = await apiStaffOrderDetail({ id: formData.value.id })
|
const result = await apiStaffOrderDetail({ id: formData.value.id })
|
||||||
formData.value.orderStatus = result.orderStatus
|
formData.value.orderStatus = result.orderStatus
|
||||||
formData.value.serviceImages = result.serviceImages
|
formData.value.serviceImages = result.serviceImages ?? []
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
@ -54,10 +54,11 @@ const handleSubmit = async () => {
|
||||||
if (!serviceImages.length) return toast('请上传服务图片')
|
if (!serviceImages.length) return toast('请上传服务图片')
|
||||||
try {
|
try {
|
||||||
const data = {
|
const data = {
|
||||||
...formData.value
|
...formData.value,
|
||||||
|
serviceImages
|
||||||
}
|
}
|
||||||
await apiServiceImages(data)
|
await apiServiceImages(data)
|
||||||
toast('提交成功', 'success')
|
toast('提交成功')
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,12 +59,19 @@
|
||||||
|
|
||||||
<!-- 联系客户 -->
|
<!-- 联系客户 -->
|
||||||
<template v-if="mobile && (confirmService || verification)">
|
<template v-if="mobile && (confirmService || verification)">
|
||||||
<button
|
<!-- <button
|
||||||
class="Btn flex-1 mr-2 bg-white text-sm text-black leading-[70rpx] h-[70rpx] rounded-full"
|
class="Btn flex-1 mr-2 bg-white text-sm text-black leading-[70rpx] h-[70rpx] rounded-full"
|
||||||
@click.stop="handleCustomerMobile()"
|
@click.stop="handleCustomerMobile()"
|
||||||
>
|
>
|
||||||
联系客户
|
联系客户
|
||||||
</button>
|
</button> -->
|
||||||
|
<view
|
||||||
|
class="px-[24rpx] items-center flex-1 mr-2 bg-white text-sm text-black leading-[70rpx] h-[70rpx] rounded-full"
|
||||||
|
style="border: 1px solid rgb(187, 187, 187)"
|
||||||
|
@click.stop="handleCustomerMobile()"
|
||||||
|
>
|
||||||
|
<u-icon size="40" name="phone"></u-icon>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 去支付 -->
|
<!-- 去支付 -->
|
||||||
|
@ -115,7 +122,7 @@
|
||||||
class="bg-primary text-sm text-white leading-[70rpx] h-[70rpx] rounded-full"
|
class="bg-primary text-sm text-white leading-[70rpx] h-[70rpx] rounded-full"
|
||||||
@click.stop="handleNavigate"
|
@click.stop="handleNavigate"
|
||||||
>
|
>
|
||||||
核
|
拍照上传
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -141,6 +148,15 @@
|
||||||
</view>
|
</view>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 已完成 -->
|
||||||
|
<template v-if="uploadServiceImgBtn && orderStatus == 3">
|
||||||
|
<button
|
||||||
|
class="bg-primary text-sm text-white leading-[70rpx] h-[70rpx] rounded-full"
|
||||||
|
@click.stop="handleNavigate"
|
||||||
|
>
|
||||||
|
拍照上传
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<u-popup
|
<u-popup
|
||||||
v-model="showConfirmPop"
|
v-model="showConfirmPop"
|
||||||
|
@ -251,6 +267,7 @@ const props = withDefaults(
|
||||||
staffMobile?: string | null // 师傅联系电话
|
staffMobile?: string | null // 师傅联系电话
|
||||||
contract: number | null
|
contract: number | null
|
||||||
goodsId?: number | string
|
goodsId?: number | string
|
||||||
|
uploadServiceImgBtn: number | string | boolean
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
orderId: '',
|
orderId: '',
|
||||||
|
@ -273,7 +290,8 @@ const props = withDefaults(
|
||||||
isDispatch: 0, // 是否派单 0=否 1=是 默认为0
|
isDispatch: 0, // 是否派单 0=否 1=是 默认为0
|
||||||
staffMobile: '',
|
staffMobile: '',
|
||||||
contract: null,
|
contract: null,
|
||||||
goodsId: ''
|
goodsId: '',
|
||||||
|
uploadServiceImgBtn: false
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const code = ref<number | string>('') // 输入核销码
|
const code = ref<number | string>('') // 输入核销码
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 我的核销码 -->
|
<!-- 我的核销码 -->
|
||||||
<template v-if="orderData.orderStatus === 2">
|
<template v-if="orderData.orderStatus === 2 && orderData?.staff?.id">
|
||||||
<view class="card normal text-base">
|
<view class="card normal text-base">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view>我的核销码</view>
|
<view>我的核销码</view>
|
||||||
|
|
Loading…
Reference in New Issue