|
@@ -8,18 +8,20 @@ import Card from '@designer-hub/app/src/components/card.vue'
|
|
|
import SectionHeading from '@designer-hub/app/src/components/section-heading.vue'
|
|
|
import BottomAppBar from '@/components/bottom-app-bar.vue'
|
|
|
import DataForm from '@/components/data-form.vue'
|
|
|
-import {appTaskReport, getTaskDetail, taskReceive} from '../../../../core/libs/requests'
|
|
|
+import { appTaskReport, getTaskDetail, taskReceive } from '../../../../core/libs/requests'
|
|
|
import { useUserStore } from '../../../../store'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { DataFormSchema } from '../../../../components/data-form'
|
|
|
import { ComponentExposed } from 'vue-component-type-helpers'
|
|
|
+import { useTask } from '../../../../composables/task'
|
|
|
+
|
|
|
+const { getBgClass, getColor } = useTask()
|
|
|
const taskId = ref()
|
|
|
const types = ref({
|
|
|
1: { title: '到店', bg: '', bgClass: 'bg-gradient-to-r from-[#cfe0ff] to-[#e1ecff]' },
|
|
|
2: { title: '订单', bg: '', bgClass: 'bg-gradient-to-r from-[#ffe8cf] to-[#fff3e1]' },
|
|
|
})
|
|
|
-const current = ref<number>(10)
|
|
|
const type = ref(1)
|
|
|
const publishState = ref(false)
|
|
|
const formData = ref<any>({})
|
|
@@ -97,14 +99,15 @@ onLoad(async (query: { taskId: string }) => {
|
|
|
</script>
|
|
|
<template>
|
|
|
<view class="flex-grow flex flex-col p-4 gap-4" style="position: relative">
|
|
|
- <Card :custom-class="`${types[type].bgClass} px-0 py-0`">
|
|
|
+ <Card :custom-class="`${getBgClass(Number(taskDetails?.taskType))} px-0 py-0`">
|
|
|
<div class="flex items-center py-[20px] px-[15px]">
|
|
|
<div class="text-black/90 text-lg font-normal font-['PingFang SC'] leading-none">
|
|
|
{{ taskDetails?.name }}
|
|
|
</div>
|
|
|
<div class="flex-1"></div>
|
|
|
<div
|
|
|
- class="w-[47px] h-[23px] px-1 bg-[#2357e9] rounded border justify-center items-center gap-2.5 inline-flex"
|
|
|
+ class="w-[47px] h-[23px] px-1 rounded border justify-center items-center gap-2.5 inline-flex"
|
|
|
+ :style="{ backgroundColor: getColor(Number(taskDetails?.taskType)) }"
|
|
|
>
|
|
|
<div class="text-right text-white text-xs font-normal font-['PingFang_SC'] leading-tight">
|
|
|
{{ taskDetails?.statusName }}
|
|
@@ -117,7 +120,7 @@ onLoad(async (query: { taskId: string }) => {
|
|
|
<wd-circle
|
|
|
:model-value="(taskDetails.completedNum / taskDetails.storeQuantity) * 100"
|
|
|
:size="50"
|
|
|
- color="rgba(66, 113, 255, 1)"
|
|
|
+ :color="getColor(Number(taskDetails?.taskType))"
|
|
|
:clockwise="false"
|
|
|
>
|
|
|
<div class="flex flex-col items-center">
|
|
@@ -266,34 +269,36 @@ onLoad(async (query: { taskId: string }) => {
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div v-else class="bg-[#f7fbff] rounded-[10px] py-[22px] px-[16px] mt-[20px]">
|
|
|
+ <div v-else>
|
|
|
<template v-for="(item, i) in taskDetails?.reportList" :key="i">
|
|
|
- <div class="flex items-center justify-between">
|
|
|
- <div class="text-black/40 text-xs font-normal font-['PingFang SC'] leading-normal">
|
|
|
- {{ dayjs(item.createTime).format('YYYY/MM/DD HH:mm') }}
|
|
|
+ <div class="bg-[#f7fbff] rounded-[10px] py-[22px] px-[16px] mt-[20px]">
|
|
|
+ <div class="flex items-center justify-between">
|
|
|
+ <div class="text-black/40 text-xs font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ {{ dayjs(item.createTime).format('YYYY/MM/DD HH:mm') }}
|
|
|
+ </div>
|
|
|
+ <div class="text-[#2357e9] text-xs font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ {{ item.status == '0' ? '审核通过' : item.status == '1' ? '审核中' : '驳回' }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="text-[#2357e9] text-xs font-normal font-['PingFang SC'] leading-normal">
|
|
|
- {{ item.status == '0' ? '审核通过' : item.status == '1' ? '审核中' : '驳回' }}
|
|
|
+ <div class="mt-[7px]">
|
|
|
+ <span class="text-black/60 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ 个人完成量:
|
|
|
+ </span>
|
|
|
+ <span class="text-black/90 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ {{ item.num }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="mt-[2px]">
|
|
|
+ <span class="text-black/60 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ 上报说明
|
|
|
+ </span>
|
|
|
+ <span class="text-black/90 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ :
|
|
|
+ </span>
|
|
|
+ <span class="text-black/90 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ {{ item.remark }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="mt-[7px]">
|
|
|
- <span class="text-black/60 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
- 个人完成量:
|
|
|
- </span>
|
|
|
- <span class="text-black/90 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
- {{ item.num }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="mt-[2px]">
|
|
|
- <span class="text-black/60 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
- 上报说明
|
|
|
- </span>
|
|
|
- <span class="text-black/90 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
- :
|
|
|
- </span>
|
|
|
- <span class="text-black/90 text-sm font-normal font-['PingFang SC'] leading-normal">
|
|
|
- {{ item.remark }}
|
|
|
- </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|