ソースを参照

refactor(agent): 优化任务详情页面样式和功能

-调整任务详情页面布局和样式
- 优化任务上报流程,添加成功提示
- 修复任务状态显示逻辑
- 优化数据加载和刷新机制
EvilDragon 3 ヶ月 前
コミット
91962e8e44

+ 8 - 0
packages/app/src/core/libs/models.ts

@@ -323,6 +323,11 @@ export interface Activity {
    * 类型补充字段
    */
   studyTravelList?: Schedule[]
+  surplus?: number
+  studyAllowType?: string
+  studyAllowCount?: number
+  planStudyEndTime?: string
+  planStudyStartTime?: string
 }
 export interface StudyTour {
   id: number
@@ -377,6 +382,8 @@ export interface StudyTour {
   activityStartTime?: any
   activityEndTime?: any
   activityAddr?: any
+  activityAllowType?: string
+  activityAllowCount?: number
 }
 /**
  * 游学/活动的报名信息
@@ -405,6 +412,7 @@ export interface ActivitySignUp {
    * 活动ID
    */
   activityId?: number
+  avatar?: string
 }
 export interface MyStudyTour {
   id: number

+ 22 - 26
packages/app/src/pages/home/activity/detail/index.vue

@@ -32,7 +32,7 @@ import signupListDialogBg from '@designer-hub/assets/src/libs/assets/signupListD
 import { getActivityStatusText, getCountsArr } from '../../../../core/utils/common'
 import { extractColorsFromImageData } from 'extract-colors/lib/extract-colors.mjs'
 import { group, mapEntries, sort } from 'radash'
-import { Activity, StudyTour } from '../../../../core/libs/models'
+import { Activity, ActivitySignUp, ResPageData, StudyTour } from '../../../../core/libs/models'
 import mapLocation from '@designer-hub/assets/src/libs/assets/mapLocation'
 import cameraWhite from '@designer-hub/assets/src/libs/assets/cameraWhite'
 import ButtonEvo from '@/components/button-evo.vue'
@@ -56,10 +56,10 @@ const activityTypes = ref({ activity: '活动', studyTour: '游学' })
 const tab = ref(0)
 const request = ref<() => Promise<IResData<Partial<StudyTour> | Partial<Activity>>>>()
 const { data, run: setData } = useRequest(() => request.value(), { initialData: {} })
-const { data: signups, run: setSignups } = useRequest(
-  () => getActivitySignups({ activityId: id.value }),
-  { initialData: { list: [], total: 0 } },
-)
+const signUpsReq = ref<() => Promise<IResData<ResPageData<ActivitySignUp>>>>()
+const { data: signups, run: setSignups } = useRequest(() => signUpsReq.value(), {
+  initialData: { list: [], total: 0 },
+})
 const { data: levels, run: setLevels } = useRequest(() => getAppMemberLevelConfigs(), {
   initialData: [],
 })
@@ -67,7 +67,7 @@ const { data: photos, run: setPhotos } = useRequest(
   () =>
     getPhotoList({
       bizId: id.value,
-      bizType: { studyTour: '2', activity: '1' }[type.value],
+      bizType: { studyTour: '2', activity: '1' }[type.value] as '1' | '2',
       pageSize: -1,
     }),
   { initialData: { list: [], total: 0 } },
@@ -78,12 +78,6 @@ const listShow = ref(false)
 const dominantColor = ref()
 const isActivity = computed(() => type.value === 'activity')
 const isStudyTour = computed(() => type.value === 'studyTour')
-const levelsById = computed(() =>
-  levels.value.reduce((acc, item) => {
-    acc[item.id] = item
-    return acc
-  }, {}),
-)
 const levelsByMemberLevel = computed(() =>
   levels.value.reduce((acc, item) => {
     acc[item.memberLevel] = item
@@ -181,9 +175,11 @@ onLoad(async (query: { id: string; type: 'activity' | 'studyTour' }) => {
   type.value = query.type
   if (type.value === 'activity') {
     request.value = () => getActivity(id.value)
+    signUpsReq.value = () => getActivitySignups({ activityId: id.value })
   }
   if (type.value === 'studyTour') {
     request.value = () => getStudyTour(id.value)
+    signUpsReq.value = () => getStudyTourSignups({ studyId: id.value })
   }
   await setData()
   const { path } = await uni.getImageInfo({ src: data.value.backgroundUrl })
@@ -243,20 +239,20 @@ onShareTimeline(() => ({ title: data.value.name, imageUrl: data.value.thumbnailU
       ></canvas>
       <ImageEvo :src="data?.backgroundUrl"></ImageEvo>
       <!-- <wd-img width="100%" height="100%" :src="data?.backgroundUrl"></wd-img> -->
-      <div class="absolute left-3.5 bottom-3" @click="listShow = true">
-        <div
-          v-if="isStudyTour"
-          class="bg-white/20 rounded-[20px] backdrop-blur-[6px] px-3.5 py-1 flex gap-2.5"
-        >
-          <wd-img width="20" height="20" :src="bell"></wd-img>
-          <div class="text-[#c1c1c1] text-base font-normal font-['PingFang_SC'] leading-normal">
-            白金会员王凯峰已报名
-          </div>
-          <div class="w-6 bg-black aspect-square rounded-full flex items-center justify-center">
-            <wd-img width="18" height="18" :src="rightFill"></wd-img>
-          </div>
-        </div>
-        <div v-if="isActivity" class="flex items-center gap-1.25">
+      <div class="absolute left-3.5 bottom-3" @click="isActivity && (listShow = true)">
+        <!--        <div-->
+        <!--          v-if="isStudyTour"-->
+        <!--          class="bg-white/20 rounded-[20px] backdrop-blur-[6px] px-3.5 py-1 flex gap-2.5"-->
+        <!--        >-->
+        <!--          <wd-img width="20" height="20" :src="bell"></wd-img>-->
+        <!--          <div class="text-[#c1c1c1] text-base font-normal font-['PingFang_SC'] leading-normal">-->
+        <!--            白金会员王凯峰已报名-->
+        <!--          </div>-->
+        <!--          <div class="w-6 bg-black aspect-square rounded-full flex items-center justify-center">-->
+        <!--            <wd-img width="18" height="18" :src="rightFill"></wd-img>-->
+        <!--          </div>-->
+        <!--        </div>-->
+        <div class="flex items-center gap-1.25">
           <AvatarGroupCasual
             :urls="signups.list.map((it) => it.headImgUrl || NetImages.DefaultAvatar)"
             :width="40"

+ 19 - 5
packages/app/src/pages/home/components/activity-as-of.vue

@@ -3,12 +3,15 @@ import dayjs from 'dayjs'
 
 const props = defineProps<{ startAt?: string | number; endAt?: string | number }>()
 const emits = defineEmits<{ end: [] }>()
+const currentDate = ref(new Date())
+const interval = ref()
 const status = computed(() => {
-  // 如果当前时间小于开始时间返回等待中,如果当前时间大于等于开始时间小于等于结束时间返回进行中,当前时间大于结束时间返回已结束
-  const now = new Date()
-  if (dayjs(now).isBefore(dayjs(props.startAt))) {
+  if (dayjs(currentDate.value).isBefore(dayjs(props.startAt))) {
     return 'waiting'
-  } else if (dayjs(now).isAfter(dayjs(props.startAt)) && dayjs(now).isBefore(dayjs(props.endAt))) {
+  } else if (
+    dayjs(currentDate.value).isAfter(dayjs(props.startAt)) &&
+    dayjs(currentDate.value).isBefore(dayjs(props.endAt))
+  ) {
     return 'running'
   } else {
     return 'overdue'
@@ -20,6 +23,14 @@ const time = computed(() =>
     'millisecond',
   ),
 )
+onMounted(() => {
+  interval.value = setInterval(() => {
+    currentDate.value = new Date()
+  }, 1000)
+})
+onUnmounted(() => {
+  clearInterval(interval.value)
+})
 </script>
 <template>
   <div>
@@ -49,7 +60,10 @@ const time = computed(() =>
           <span v-if="current.seconds && !current.minutes && !current.hours && !current.days">
           </span>
-          <span>后 报名{{ { waiting: '开始', running: '截止' }[status] }}</span>
+          <span v-if="current.days || current.hours || current.minutes || current.seconds">
+            后 报名{{ { waiting: '开始', running: '截止' }[status] }}
+          </span>
+          <span v-else>加载中...</span>
         </div>
       </template>
     </wd-count-down>

+ 3 - 1
packages/app/src/pages/home/components/register-card.vue

@@ -7,6 +7,7 @@ import { getActivitySignups } from '../../../core/libs/requests'
 import { NetImages } from '../../../core/libs/net-images'
 import { useRouter } from '../../../core/utils/router'
 import { getActivityStatusButtonText, getActivityStatusText } from '../../../core/utils/common'
+import AvatarGroupCasual from "@/components/avatar-group-casual/avatar-group-casual.vue";
 
 const props = defineProps<{
   customClass?: string
@@ -51,7 +52,8 @@ onMounted(async () => {
             {{ signups.total }}人已报名
           </div>
         </view>
-        <div class="bg-[#27130d]/50 rounded-bl-2xl rounded-br-2xl backdrop-blur-[20px] p-3.5">
+        <div class="w-full h-[46px] absolute top-0 bg-gradient-to-t from-black to-black/00"></div>
+        <div class="bg-[#010102]/50 rounded-bl-2xl rounded-br-2xl backdrop-blur-[20px] p-3.5">
           <div
             class="w-[293px] text-white text-xl font-normal font-['PingFang_SC'] leading-relaxed"
           >

+ 13 - 8
packages/app/src/pages/home/components/schedule-card.vue

@@ -54,13 +54,15 @@ onMounted(() => {
 </script>
 <template>
   <view class="flex flex-col items-center aspect-[1.28/1]" :class="[customClass]">
-    <SectionHeading title="我的游学日程" custom-class="w-full"></SectionHeading>
-    <div
-      class="w-full my-3.5 text-[#acacac] text-sm font-normal font-['PingFang_SC'] leading-normal"
-    >
-      <!-- 6月26日 第二天 -->
-      {{ dayjs().format('M月D日') }}
-      第{{ Object.keys(schedules).findIndex((it) => it === dayjs().format('YYYY-MM-DD')) + 1 }}天
+    <div class="px-3.5 w-full box-border">
+      <SectionHeading title="我的游学日程" custom-class="w-full"></SectionHeading>
+      <div
+        class="w-full my-3.5 text-[#acacac] text-sm font-normal font-['PingFang_SC'] leading-normal"
+      >
+        <!-- 6月26日 第二天 -->
+        {{ dayjs().format('M月D日') }}
+        第{{ Object.keys(schedules).findIndex((it) => it === dayjs().format('YYYY-MM-DD')) + 1 }}天
+      </div>
     </div>
     <div
       class="w-80 bg-gradient-to-r from-[#141414] to-[#4b4949] rounded-tl-2xl rounded-tr-2xl p-6 box-border"
@@ -81,7 +83,10 @@ onMounted(() => {
               {{ it?.title }}
             </div>
           </view>
-          <div class="ml-6.5 text-white/40 text-sm font-normal font-['PingFang_SC'] leading-normal">
+          <div
+            v-if="!(data?.length === 2 && index === data?.length - 1)"
+            class="ml-6.5 text-white/40 text-sm font-normal font-['PingFang_SC'] leading-normal line-clamp-2 text-ellipsis overflow-hidden"
+          >
             <!-- 学习灯光设计师课程 -->
             {{ it?.travelDesc }}
           </div>

+ 2 - 2
packages/app/src/pages/home/index.vue

@@ -84,7 +84,7 @@ const handleLike = async (options) => {
     userId: userInfo.value.userId,
     userName: userInfo.value.nickname,
   })
-  pageHelperRef.value?.refresh()
+  await pageHelperRef.value?.refresh()
 }
 const setHotActivities = async () => {
   const res = await Promise.all([
@@ -104,7 +104,7 @@ const handlePlay = async (id) => {
   await updateSetIndexConfig(body)
 }
 onShow(async () => {
-  pageHelperRef.value?.reload()
+  await pageHelperRef.value?.reload()
   const reqs = [setHotActivities()]
   if (isLogined.value) {
     reqs.push(setStudyTours())

+ 1 - 1
packages/app/src/pages/home/mall/confirm-order/index.vue

@@ -64,7 +64,7 @@ const handlePay = async () => {
 
   const couponList =
     selectedCoupons.value?.map((it) => ({
-      couponId: it.id,
+      couponId: it.couponId,
       projectIds: it.productIds,
       buinessId: it.buinessId,
     })) || []

+ 19 - 17
packages/app/src/pages/home/schedule/index.vue

@@ -110,26 +110,28 @@ onMounted(async () => {
                   {{ item.travelDesc }}
                 </span>
               </div>
-              <view class="flex items-center my-4">
-                <wd-img width="16" height="16" :src="camera"></wd-img>
+              <template v-if="item.clockExplainUrl">
+                <view class="flex items-center my-4">
+                  <wd-img width="16" height="16" :src="camera"></wd-img>
+                  <div
+                    class="ml-1 text-black/90 text-xs font-normal font-['PingFang_SC'] leading-normal"
+                  >
+                    打卡示例
+                  </div>
+                </view>
+                <div class="w-[285px]">
+                  <img
+                    v-if="item.clockExplainUrl"
+                    class="w-[285px] h-[157px] rounded-lg"
+                    :src="item.clockExplainUrl"
+                  />
+                </div>
                 <div
-                  class="ml-1 text-black/90 text-xs font-normal font-['PingFang_SC'] leading-normal"
+                  class="mt-2.5 text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
                 >
-                  打卡示例
+                  {{ item.clockExplainDesc }}
                 </div>
-              </view>
-              <div class="w-[285px]">
-                <img
-                  v-if="item.clockExplainUrl"
-                  class="w-[285px] h-[157px] rounded-lg"
-                  :src="item.clockExplainUrl"
-                />
-              </div>
-              <div
-                class="mt-2.5 text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
-              >
-                {{ item.clockExplainDesc }}
-              </div>
+              </template>
             </view>
           </view>
         </template>

+ 3 - 1
packages/app/src/pages/home/study-tour/components/register-card.vue

@@ -7,6 +7,7 @@ import { getActivitySignups, getStudyTourSignups } from '../../../../core/libs/r
 import { NetImages } from '../../../../core/libs/net-images'
 import { useRouter } from '../../../../core/utils/router'
 import { getActivityStatusButtonText, getActivityStatusText } from '../../../../core/utils/common'
+import AvatarGroupCasual from '@/components/avatar-group-casual/avatar-group-casual.vue'
 
 const props = defineProps<{
   customClass?: string
@@ -51,7 +52,8 @@ onMounted(async () => {
             {{ signups.total }}人已报名
           </div>
         </view>
-        <div class="bg-[#27130d]/50 rounded-bl-2xl rounded-br-2xl backdrop-blur-[20px] p-3.5">
+        <div class="w-full h-[46px] absolute top-0 bg-gradient-to-t from-black to-black/00"></div>
+        <div class="bg-[#010102]/50 rounded-bl-2xl rounded-br-2xl backdrop-blur-[20px] p-3.5">
           <div
             class="w-[293px] text-white text-xl font-normal font-['PingFang_SC'] leading-relaxed"
           >

+ 0 - 1
packages/app/src/pages/home/study-tour/index.vue

@@ -11,7 +11,6 @@ import Card from '@/components/card.vue'
 import MomentItem from '@/components/moment-item.vue'
 import SectionHeading from '@/components/section-heading.vue'
 import ClassItem from '../components/class-item.vue'
-import TimeLine from './components/time-line.vue'
 import {
   getAppMemberLevelConfigs,
   getBanners,

+ 10 - 1
packages/app/src/pages/messages/components/message-card.vue

@@ -27,7 +27,7 @@ const { data: coupons, run: setCoupons } = useRequest(
     }),
   { initialData: [] },
 )
-onMounted(async () => {
+const init = async () => {
   if (
     props.options.messageType === MessageType.Integral &&
     props.options.messageSubType === 31 &&
@@ -36,6 +36,15 @@ onMounted(async () => {
     await setCoupons()
     // console.log(coupons.value)
   }
+}
+watch(
+  () => props.options,
+  async () => {
+    await init()
+  },
+)
+onMounted(async () => {
+  // await init()
 })
 </script>
 <template>

+ 1 - 1
packages/app/src/pages/messages/index.vue

@@ -55,7 +55,7 @@ const handleCancel = async (message: Message) => {
     beforeConfirm: async ({ resolve }) => {
       if (!cancelReason.value) {
         resolve(false)
-        uni.showToast({ title: '请输入驳回原因', icon: 'none' })
+        await uni.showToast({title: '请输入驳回原因', icon: 'none'})
         return
       }
       await requestToast(

+ 1 - 1
packages/merchant/src/components/data-form.ts

@@ -1,5 +1,5 @@
 export interface DataFormProps {
-  defaultValue?: Date
+  defaultValue?: Date | string | number
   placeholder?: string
   columns?: { label: string; value: string | number }[]
   disabled?: boolean

+ 6 - 1
packages/merchant/src/components/data-form.vue

@@ -46,9 +46,13 @@ const verticalDefaultProps = {
   TextField: {
     noBorder: true,
     style: {},
-    customClass: 'rounded border border-[#e1e1e1] border-solid p-1',
+    // customClass: 'rounded border border-[#e1e1e1] border-solid p-1',
+    customClass: 'text-red! bg-[#f5f7f9]! py-2 px-4 rounded-lg',
     placeholder: ' ',
   },
+  Textarea: {
+    customClass: 'bg-[#f5f7f9]! rounded-lg',
+  },
   Submit: {
     customClass: 'w-full! rounded-lg! my-4!',
     block: true,
@@ -82,6 +86,7 @@ const themeVars: ConfigProviderThemeVars = {
   radioButtonBg: 'transparent',
   checkboxButtonRadius: '8rpx',
   checkboxButtonBg: 'transparent',
+  textareaBg: 'transparent',
 }
 const submit = () => {
   emits('submit', modelValue)

+ 3 - 3
packages/merchant/src/composables/task.ts

@@ -27,8 +27,8 @@ export const useTask = () => {
   return {
     types,
     getBgClass,
-    getColor: (type: number) => types.value[type].color,
-    getTypeTitle: (type: number) => types.value[type].title,
-    getBgStyle: (type: number) => types.value[type].bgStyle,
+    getColor: (type: number) => types.value[type]?.color,
+    getTypeTitle: (type: number) => types.value[type]?.title,
+    getBgStyle: (type: number) => types.value[type]?.bgStyle,
   }
 }

+ 76 - 47
packages/merchant/src/pages/agent/tasks/detail/index.vue

@@ -15,6 +15,7 @@ import dayjs from 'dayjs'
 import { DataFormSchema } from '../../../../components/data-form'
 import { ComponentExposed } from 'vue-component-type-helpers'
 import { useTask } from '../../../../composables/task'
+import { requestToast } from '@designer-hub/app/src/core/utils/common'
 
 const { getBgClass, getColor, getTypeTitle, getBgStyle } = useTask()
 const taskId = ref()
@@ -51,41 +52,46 @@ const customerRules = ref({
 const initData = async () => {
   await setTaskDetails()
 }
-const submitTask = async (data) => {
-  uni.showLoading()
-  const { valid } = await dataFormRef.value.validate()
+const submitTask = async () => {
+  await uni.showLoading()
+  const { valid } = await dataFormRef.value!.validate()
   if (!valid) {
     uni.hideLoading()
     return
   }
   console.log(formData.value)
-  const res = await appTaskReport({
-    brokerId: userInfo.value.userId,
-    taskId: taskId.value,
-    ...formData.value,
-  })
+  await requestToast(
+    () =>
+      appTaskReport({
+        brokerId: userInfo.value.userId,
+        taskId: taskId.value,
+        ...formData.value,
+      }),
+    { success: true, successTitle: '上报成功' },
+  )
   uni.hideLoading()
+  await setTaskDetails()
   publishState.value = false
 }
 const acceptingOrders = async () => {
-  uni.showLoading()
+  await uni.showLoading()
   const res = await taskReceive({
     brokerId: userInfo.value.userId,
     taskId: taskDetails.value.id,
     orders: true,
   })
   uni.hideLoading()
-  initData()
+  await initData()
 }
 const acceptingNoOrders = async () => {
-  uni.showLoading()
+  await uni.showLoading()
   const res = await taskReceive({
     brokerId: userInfo.value.userId,
     taskId: taskDetails.value.id,
     orders: false,
   })
   uni.hideLoading()
-  initData()
+  await initData()
 }
 onLoad(async (query?: Record<string | 'taskId', string>) => {
   taskId.value = query?.taskId
@@ -116,14 +122,18 @@ onLoad(async (query?: Record<string | 'taskId', string>) => {
         <div class="flex flex-row items-center justify-start gap-2">
           <div style="width: 50px; height: 50px">
             <wd-circle
-              :model-value="(taskDetails.completedNum / taskDetails.storeQuantity) * 100"
+              :model-value="
+                ((taskDetails?.completedNum ?? 0) / (taskDetails?.storeQuantity ?? 0)) * 100
+              "
               :size="50"
               :color="getColor(Number(taskDetails?.taskType))"
               :clockwise="false"
             >
               <div class="flex flex-col items-center">
                 <div class="w-[29.20px] h-[18.39px] text-black text-sm font-medium font-['DIN']">
-                  {{ (taskDetails.completedNum / taskDetails.storeQuantity) * 100 }}%
+                  {{
+                    ((taskDetails?.completedNum ?? 0) / (taskDetails?.storeQuantity ?? 0)) * 100
+                  }}%
                 </div>
                 <div
                   class="w-[22.71px] h-[10.82px] text-black/60 text-[7px] font-normal font-['PingFang_SC']"
@@ -161,7 +171,7 @@ onLoad(async (query?: Record<string | 'taskId', string>) => {
           <div class="flex items-center justify-center flex-col">
             <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">累计完成</div>
             <div class="text-black/90 text-lg font-medium font-['DIN'] leading-normal">
-              {{ taskDetails?.completedNum }}
+              {{ taskDetails?.completedNum ?? 0 }}
             </div>
           </div>
           <!--            </div>-->
@@ -247,26 +257,28 @@ onLoad(async (query?: Record<string | 'taskId', string>) => {
         <div class="mr-2.5 w-1 h-4 rotate-180 bg-[#2357e9] rounded-[20px]"></div>
         <SectionHeading title="数据明细" size="base"></SectionHeading>
       </div>
+      <!-- 到店打卡-->
       <div v-if="taskDetails?.finalType == '1'" class="flex flex-col gap-4 mt-5">
-        <template v-for="item in taskDetails?.brokerList" :key="item.id">
-          <div class="flex gap-2.5 p-3.5 bg-[#f7fbff] items-center rounded-[10px]">
-            <img class="w-11 h-11 rounded-full" :src="item.headImgUrl" />
-            <div class="flex-1 flex flex-col gap-2">
-              <div class="text-black/60 text-sm font-normal font-['PingFang_SC'] leading-normal">
-                {{ item.brokerName }}
-              </div>
-              <div class="text-black/30 text-sm font-normal font-['PingFang_SC'] leading-none">
-                {{ item.finalTypeName }}{{ item.shopNames }}
-              </div>
-            </div>
-            <div class="h-full flex items-start">
-              <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>
-          </div>
-        </template>
+        <!--        <template v-for="item in taskDetails?.brokerList" :key="item.id">-->
+        <!--          <div class="flex gap-2.5 p-3.5 bg-[#f7fbff] items-center rounded-[10px]">-->
+        <!--            <wd-img width="44" height="44" round :src="item.headImgUrl" />-->
+        <!--            <div class="flex-1 flex flex-col gap-2">-->
+        <!--              <div class="text-black/60 text-sm font-normal font-['PingFang_SC'] leading-normal">-->
+        <!--                {{ item.brokerName }}-->
+        <!--              </div>-->
+        <!--              <div class="text-black/30 text-sm font-normal font-['PingFang_SC'] leading-none">-->
+        <!--                {{ item.finalTypeName }}{{ item.shopNames }}-->
+        <!--              </div>-->
+        <!--            </div>-->
+        <!--            <div class="h-full flex items-start">-->
+        <!--              <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>-->
+        <!--          </div>-->
+        <!--        </template>-->
       </div>
+      <!-- 上报-->
       <div v-else>
         <template v-for="(item, i) in taskDetails?.reportList" :key="i">
           <div class="bg-[#f7fbff] rounded-[10px] py-[22px] px-[16px] mt-[20px]">
@@ -274,8 +286,21 @@ onLoad(async (query?: Record<string | 'taskId', string>) => {
               <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
+                class="text-xs font-normal font-['PingFang_SC'] leading-normal"
+                :class="
+                  { '0': 'text-[#16b032]', '1': 'text-[#2357e9]', '2': 'text-#ff2d2d' }[
+                    String(item.status)
+                  ]
+                "
+              >
+                {{
+                  String(item.status) === '0'
+                    ? '审核通过'
+                    : String(item.status) === '1'
+                      ? '审核中'
+                      : '驳回'
+                }}
               </div>
             </div>
             <div class="mt-[7px]">
@@ -297,6 +322,12 @@ onLoad(async (query?: Record<string | 'taskId', string>) => {
                 {{ item.remark }}
               </span>
             </div>
+            <template v-if="String(item.status) === '2'">
+              <div class="bg-[#e6e8f1] my-4 border-[0.5px] border-solid border-[#e6e8f1]"></div>
+              <div class="text-[#ff2d2d] text-xs font-normal font-['PingFang SC'] leading-none">
+                原因:{{ item.reason }}
+              </div>
+            </template>
           </div>
         </template>
       </div>
@@ -328,29 +359,27 @@ onLoad(async (query?: Record<string | 'taskId', string>) => {
         </div>
       </BottomAppBar>
     </template>
-    <template v-else>
+    <template v-if="!taskDetails?.receive && String(taskDetails?.finalType) === '2'">
       <BottomAppBar fixed placeholder>
-        <template v-if="!taskDetails?.receive && String(taskDetails.finalType) === '2'">
-          <div class="px-5 py-3 bg-[#2357e9] rounded-md justify-center items-center gap-1">
-            <div
-              @click="publishState = true"
-              class="text-center text-white text-base font-normal font-['PingFang_SC'] leading-normal"
-            >
-              上报
-            </div>
+        <div class="px-5 py-3 bg-[#2357e9] rounded-md justify-center items-center gap-1">
+          <div
+            @click="publishState = true"
+            class="text-center text-white text-base font-normal font-['PingFang_SC'] leading-normal"
+          >
+            上报
           </div>
-        </template>
+        </div>
       </BottomAppBar>
     </template>
 
     <wd-action-sheet v-model="publishState" title="" @close="publishState = false">
       <view class="flex flex-col p-4 mt-4">
-        <data-form
+        <DataForm
           ref="dataFormRef"
           :schema="customerSchema"
           :rules="customerRules"
           v-model="formData"
-        ></data-form>
+        ></DataForm>
         <div><wd-button block :round="false" @click="submitTask">提交</wd-button></div>
       </view>
     </wd-action-sheet>

+ 6 - 3
packages/merchant/src/pages/agent/todo/index.vue

@@ -36,11 +36,14 @@ const schema = ref<DataFormSchema>({
   executionTime: {
     type: 'TimePick',
     label: '时间:',
-    props: { defaultValue: dayjs().toDate(), labelWidth: 44 },
+    labelWidth: 44,
+    props: { defaultValue: dayjs().toDate().getTime() },
   },
-  content: { type: 'Textarea', label: '备注:', props: { labelWidth: 44 } },
+  content: { type: 'Textarea', label: '备注:', labelWidth: 44, props: {} },
+})
+const formData = ref({
+  // executionTime: '',
 })
-const formData = ref({})
 const handleAddTodo = () => {
   addSheetVisible.value = true
 }

+ 7 - 6
packages/merchant/src/pages/home/index.vue

@@ -129,7 +129,7 @@ onShareAppMessage(() => ({}))
                   <div class="flex flex-col py-6">
                     <template v-for="(it, index) in source?.list" :key="index">
                       <div>
-                        <div class="flex items-center gap-4">
+                        <div class="grid grid-cols-[56px_12px_1fr] items-center gap-4">
                           <div
                             class="w-14 text-end text-black text-base font-normal font-['PingFang_SC'] leading-none"
                           >
@@ -145,14 +145,15 @@ onShareAppMessage(() => ({}))
                               :class="`${it.status === 1 ? 'bg-[#517df8]' : 'bg-[#a8a8a8]'}`"
                             ></div>
                           </div>
-                          <div
-                            class="text-black/60 text-sm font-normal font-['PingFang_SC'] leading-none"
-                          >
+                          <div class="text-black/60 text-sm font-normal font-['PingFang_SC']">
                             {{ it.content }}
                           </div>
                         </div>
-                        <div v-if="index < (source?.list?.length ?? 0) - 1" class="flex gap-4">
-                          <div class="w-14"></div>
+                        <div
+                          v-if="index < (source?.list?.length ?? 0) - 1"
+                          class="grid grid-cols-[56px_12px_1fr] gap-4"
+                        >
+                          <div class=""></div>
                           <div class="w-3 flex justify-center">
                             <div class="w-.25 h-10 bg-[#EDEDED]"></div>
                           </div>