Browse Source

Merge branch 'main' of https://github.com/omnia96/designer-hub

Jake 3 months ago
parent
commit
fd7bec4c56

+ 10 - 6
packages/app/src/components/hot-activity-item.vue

@@ -17,7 +17,10 @@ const { listItemButtonText, statusText, status, difference, startAt, endAt, refr
   useActivity(activityOptions)
 </script>
 <template>
-  <view class="relative w-full h-full box-border flex m-a">
+  <view
+    class="relative w-full h-full box-border flex m-a"
+    @click="router.push(`/pages/home/activity/detail/index?id=${options?.id}&type=${type}`)"
+  >
     <view class="w-full h-full flex flex-col justify-between pt-14 box-border px-3.5">
       <!-- <view class="flex"></view> -->
       <div class="w-[321px] h-[88px] relative">
@@ -53,11 +56,12 @@ const { listItemButtonText, statusText, status, difference, startAt, endAt, refr
           :end-at="options?.applyEndTime"
           @end="refresh"
         ></ActivityCountDown>
-        <div>
-          <ButtonEvo
-            size="md"
-            @click="router.push(`/pages/home/activity/detail/index?id=${options?.id}&type=${type}`)"
-          >
+        <div
+          @click.stop="
+            router.push(`/pages/home/activity/detail/index?id=${options?.id}&type=${type}`)
+          "
+        >
+          <ButtonEvo size="md">
             <!-- 立即报名 -->
             {{ options?.ifSingnUp ? '已报名' : listItemButtonText }}
           </ButtonEvo>

+ 1 - 1
packages/app/src/components/hot-activity.vue

@@ -26,7 +26,7 @@ onMounted(() => {
     </view>
     <div class="absolute left-0 right-0 top-1 bottom-6 z-1 py-3.5">
       <div class="h-full w-full relative">
-        <swiper class="" @change="(e) => (current = e.detail.current)">
+        <swiper class="" autoplay @change="(e) => (current = e.detail.current)">
           <template v-for="it of items" :key="it.id">
             <swiper-item class="">
               <HotActivityItem ref="item" :options="it.data" :type="it.type"></HotActivityItem>

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

@@ -775,6 +775,28 @@ export interface Report {
   remark: string
   num: number
 }
+export interface ReportInfo {
+  id: number
+  brokerName: string
+  stylistId: number
+  /**
+   * 设计师姓名
+   */
+  stylistName: string
+  arrivalTime: number
+  shopName: string
+  receptionist: string
+  contactNumber: string
+  customerName: string
+  customerPhoneNumbe: string
+  customerAddress: string
+  createTime: number
+  reviewStatus: number
+  auditId: number
+  auditName: string
+  auditTime: number
+  reason: string
+}
 export interface AgentTask {
   id: number
   bearerId: number

+ 2 - 1
packages/app/src/core/libs/requests.ts

@@ -128,7 +128,7 @@ export const getByDictType = (
       status: number
     }[]
   >('/app-api/system/dict-data/type', { type })
-export const validateReferrerCode = (data: { code: string }) =>
+export const validateReferrerCode = (data: { code: string; channelSource: string }) =>
   httpPost('/app-api/member/user-auth-info/referrer-validate-code', {}, data)
 export const createUserAuthInfo = (
   data: Partial<{
@@ -1008,6 +1008,7 @@ export interface Circle {
   spaceAddr: string
   customerDemand: string
   bannerUrls: string[]
+  tagIds?: number[]
 }
 export interface CircleRes {
   id: number

+ 14 - 9
packages/app/src/pages/mine/authentication/index.vue

@@ -42,8 +42,8 @@ const schema = ref<DataFormSchema>({
   channelSource: {
     type: 'Select',
     label: '来源',
+    labelWidth: 63,
     props: {
-      labelWidth: 63,
       placeholder: '请选择通过哪个渠道入驻的筑巢荟',
       columns: [],
       disabled: userAuthInfo.value != null,
@@ -54,8 +54,8 @@ const schema = ref<DataFormSchema>({
     type: 'TextField',
     label: '推荐人',
     existing: true,
+    labelWidth: 63,
     props: {
-      labelWidth: 63,
       placeholder: '请填写推荐人编号',
       disabled: userAuthInfo.value != null,
     },
@@ -63,16 +63,16 @@ const schema = ref<DataFormSchema>({
   designerName: {
     type: 'TextField',
     label: '姓名',
+    labelWidth: 63,
     props: {
-      labelWidth: 63,
       placeholder: '请输入真实姓名',
     },
   },
   mobile: {
     type: 'TextField',
     label: '电话',
+    labelWidth: 63,
     props: {
-      labelWidth: 63,
       placeholder: '请输入电话号码',
       disabled: true,
     },
@@ -80,16 +80,16 @@ const schema = ref<DataFormSchema>({
   employer: {
     type: 'TextField',
     label: '公司',
+    labelWidth: 63,
     props: {
-      labelWidth: 63,
       placeholder: '请输入所在公司或自己公司名称',
     },
   },
   spatialExpertiseType: {
     type: 'Checkbox',
     label: '擅长空间类型',
+    labelWidth: 84,
     props: {
-      labelWidth: 84,
       placeholder: ' ',
       columns: [],
     },
@@ -108,11 +108,13 @@ const setReferrerExisting = (value: string) => {
 }
 const handleSubmit = async () => {
   console.log(formData.value)
-  // return
   if (!userAuthInfo.value) {
     if (formData.value.channelSource !== '4') {
       const { data, code: status } = await requestToast(() =>
-        validateReferrerCode({ code: formData.value.referrer }),
+        validateReferrerCode({
+          code: formData.value.referrer,
+          channelSource: formData.value.channelSource,
+        }),
       )
       if (data === false || status !== 0) {
         uni.showToast({ title: '推荐人编号不正确', icon: 'none' })
@@ -134,7 +136,10 @@ const handleSubmit = async () => {
   } else {
     if (formData.value.channelSource !== '4') {
       const { data, code: status } = await requestToast(() =>
-        validateReferrerCode({ code: formData.value.referrer }),
+        validateReferrerCode({
+          code: formData.value.referrer,
+          channelSource: formData.value.channelSource,
+        }),
       )
       if (data === false || status !== 0) {
         uni.showToast({ title: '推荐人编号不正确', icon: 'none' })

+ 6 - 3
packages/app/src/pages/publish/moment/index.vue

@@ -82,6 +82,7 @@ const rules = {
 const formData = ref({})
 const formInited = ref(false)
 const tagName = ref('')
+const tagIds = ref([])
 const publishing = ref(false)
 const handleChange = ({ fileList: files }) => {
   fileList.value = files
@@ -108,6 +109,7 @@ const handleSubmit = async () => {
     headUrl: userInfo.value.avatar,
     circleDesc: content.value,
     circleType: circleType.value,
+    tagIds: tagIds.value,
     ...formData.value,
   })
   if (code !== 0) {
@@ -119,12 +121,13 @@ const handleSubmit = async () => {
   publishing.value = false
   router.back()
 }
-const updateTagName = (tagNames: string[]) => {
-  if (tagNames.length === 0) {
+const updateTagName = (options: { tagNames: string[]; tagIds: string[] }) => {
+  if (options.tagNames.length === 0) {
     tagName.value = ''
     return
   }
-  tagName.value = tagNames.join(',')
+  tagName.value = options.tagNames.join(',')
+  tagIds.value = options.tagIds
 }
 onMounted(() => {
   uni.$on('updateTagName', updateTagName)

+ 11 - 4
packages/app/src/pages/publish/tags/index.vue

@@ -38,17 +38,24 @@ const { data: memberTags, run: setMemberTags } = useRequest(
   },
 )
 const selected = ref<string[]>([])
+const tagIds = ref<string[]>([])
 
-const handleClick = (tagName: string) => {
+const handleClick = ({ tagName, tagId, isReport }) => {
   if (selected.value.includes(tagName)) {
     selected.value = selected.value.filter((it) => it !== tagName)
   } else {
     selected.value.push(tagName)
   }
+  if (!isReport) return
+  if (tagIds.value.includes(tagId)) {
+    tagIds.value = tagIds.value.filter((it) => it !== tagId)
+  } else {
+    tagIds.value.push(tagId)
+  }
 }
 const handleSubmit = async () => {
   await uni.navigateBack()
-  uni.$emit('updateTagName', selected.value)
+  uni.$emit('updateTagName', { tagNames: selected.value, tagIds: tagIds.value })
 }
 const handleAddTag = async () => {
   await confirm({
@@ -115,7 +122,7 @@ onLoad(async (query: { tagName: string }) => {
           :key="id"
         >
           <wd-tag
-            @click="handleClick(labelName)"
+            @click="handleClick({ tagName: labelName, tagId: id, isReport: true })"
             :type="selected.includes(labelName) ? 'primary' : 'default'"
           >
             {{ labelName }}
@@ -137,7 +144,7 @@ onLoad(async (query: { tagName: string }) => {
           </div>
           <wd-tag
             custom-class="m-1"
-            @click="handleClick(it.tagName)"
+            @click="handleClick({ tagName: it.tagName, tagId: it.id, isReport: false })"
             :type="selected.includes(it.tagName) ? 'primary' : 'default'"
           >
             {{ it.tagName }}

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

@@ -8,7 +8,15 @@ export interface DataFormProps {
 }
 export interface DataFormSchema {
   [key: symbol | string]: {
-    type: 'TextField' | 'Select' | 'Radio' | 'Submit' | 'TimePick' | 'Textarea' | 'Checkbox'
+    type:
+      | 'TextField'
+      | 'Select'
+      | 'Radio'
+      | 'Submit'
+      | 'TimePick'
+      | 'Textarea'
+      | 'Checkbox'
+      | 'ImageUploader'
     label?: string
     labelWidth?: number
     hiddenLabel?: boolean

+ 26 - 8
packages/merchant/src/components/page-helper-evo.vue

@@ -75,7 +75,20 @@ defineExpose({
   },
   refresh: async () => {
     console.log('Page Helper Refresh')
+    console.log(items.value.length)
     await setData()
+    // 之前页的数据
+    const prevItems = items.value.slice(0, pageSize.value * (pageNo.value - 1))
+    console.log(prevItems.length)
+
+    // 之后页的数据
+    const nextItems = items.value.slice(pageSize.value * pageNo.value, items.value.length)
+    console.log(nextItems.length)
+
+    items.value = prevItems.concat(data.value?.list || [], nextItems)
+    console.log(items.value.length)
+
+    // console.log(items.value)
   },
 })
 </script>
@@ -94,13 +107,18 @@ defineExpose({
         <slot name="top"></slot>
       </div>
     </div>
-
-    <template v-if="!items?.length">
-      <wd-status-tip :image="NetImages.NotContent" tip="暂无内容"></wd-status-tip>
-    </template>
-    <slot :source="{ list: items }"></slot>
-    <template v-if="nomore">
-      <div class="my-4"><wd-divider>没有更多了</wd-divider></div>
-    </template>
+    <div class="flex-grow flex flex-col">
+      <template v-if="!items?.length">
+        <div class="flex-grow flex flex-col justify-center">
+          <wd-status-tip :image="NetImages.NotContent" tip="暂无内容"></wd-status-tip>
+        </div>
+      </template>
+      <div v-if="items.length" class="flex-grow flex flex-col">
+        <slot :source="{ list: items }"></slot>
+      </div>
+      <template v-if="nomore">
+        <div class="my-4"><wd-divider>没有更多了</wd-divider></div>
+      </template>
+    </div>
   </div>
 </template>

+ 29 - 0
packages/merchant/src/composables/task.ts

@@ -0,0 +1,29 @@
+export const useTask = () => {
+  const types = ref({
+    // 0: { title: '团队任务', bg: '', bgClass: 'bg-gradient-to-r from-[#cfe0ff] to-[#e1ecff]' },
+    1: {
+      title: '团队任务',
+      bg: '',
+      bgClass: 'bg-gradient-to-r from-[#cfe0ff] to-[#e1ecff]',
+      color: '#2357e9',
+    },
+    2: {
+      title: '抢单任务',
+      bg: '',
+      bgClass: 'bg-gradient-to-r from-[#ffcfcf] to-[#ffeae1]',
+      color: '#f04c47',
+    },
+    3: {
+      title: '指定任务',
+      bg: '',
+      bgClass: 'bg-gradient-to-r from-[#ffe8cf] to-[#fff3e1]',
+      color: '#f89a2e',
+    },
+  })
+  const getBgClass = (type: number) => types.value[type].bgClass
+  return {
+    types,
+    getBgClass,
+    getColor: (type: number) => types.value[type].color,
+  }
+}

+ 12 - 1
packages/merchant/src/core/libs/agent-requests.ts

@@ -1,4 +1,4 @@
-import { httpGet } from '../../utils/http'
+import { httpDelete, httpGet } from '../../utils/http'
 import {
   PointsOrder,
   ResPageData,
@@ -6,6 +6,7 @@ import {
   Agent,
   Designer,
   AgentTask,
+  ReportInfo,
 } from '@designer-hub/app/src/core/libs/models'
 
 /**
@@ -18,3 +19,13 @@ export const getDesigners = (query = {}) =>
  */
 export const getTasks = (query = {}) =>
   httpGet<ResPageData<AgentTask>>('/app-api/member/task/page', query)
+/**
+ * 关系报备
+ */
+export const getReportInfoPage = (query = {}) =>
+  httpGet<ResPageData<ReportInfo>>('/app-api/member/report-info/page', query)
+/**
+ * 删除关系报备
+ */
+export const deleteReportInfo = (id: number) =>
+  httpDelete(`/app-api/member/report-info/delete`, { id })

+ 18 - 0
packages/merchant/src/core/libs/enums.ts

@@ -8,6 +8,24 @@ export enum QrCodeBusinessType {
    */
   InStoreWriteOff = 'ISWO',
 }
+// 审核状态(0,审核通过,1、待审核、2、驳回),示例值(1,2,3)
+export enum ReportInfoReviewStatus {
+  /**
+   * 待审核
+   */
+  PendingReview = 1,
+  /**
+   * 驳回
+   */
+  Rejected = 2,
+  /**
+   * 审核通过
+   */
+  Approved = 0,
+}
+/**
+ *
+ */
 export enum NetImages {
   'default' = 'https://cdn.jsdelivr.net/gh/yangyang-yangyang/yangyang-yangyang.github.io@master/images/default.png',
   'avatar' = 'https://cdn.jsdelivr.net/gh/yangyang-yangyang/yangyang-yangyang.github.io@master/images/avatar.png',

+ 23 - 4
packages/merchant/src/layouts/tabbar.vue

@@ -2,7 +2,6 @@
 import TabbarEvo from '@/components/tabbar-evo.vue'
 import { currRoute } from '../utils'
 import { defaultThemeVars } from '../core/themes/default'
-// import DataForm from '@designer-hub/app/src/components/data-form.vue'
 import DataForm from '@/components/data-form.vue'
 import { useUserStore } from '../store'
 import { storeToRefs } from 'pinia'
@@ -13,6 +12,7 @@ import {
   channelTabbarMine,
   channelTabbarMineActive,
 } from '@designer-hub/assets/src/assets/svgs'
+import { DataFormSchema } from '../components/data-form'
 
 const userStore = useUserStore()
 const { userInfo, isAgent, isMerchant } = storeToRefs(userStore)
@@ -59,31 +59,46 @@ const items = computed(() => {
   ]
 })
 
-const schema = ref({
+const schema = ref<DataFormSchema>({
   user: {
+    required: true,
     type: 'TextField',
     label: '设计师',
+    labelWidth: 64,
   },
   dateTime: {
+    required: true,
     type: 'TextField',
     label: '时间',
+    labelWidth: 64,
   },
   type: {
-    type: 'TextField',
+    required: true,
+    type: 'Select',
     label: '类型',
+    labelWidth: 64,
+    props: {},
   },
   remark: {
+    required: true,
     type: 'TextField',
     label: '备注',
+    labelWidth: 64,
   },
   location: {
+    required: true,
     type: 'TextField',
     label: '地址',
+    labelWidth: 64,
   },
   images: {
+    required: true,
     type: 'ImageUploader',
     label: '图片',
-    max: 9,
+    labelWidth: 64,
+    props: {
+      // max: 9,
+    },
   },
 })
 const handleTabbarItemClick = (path: string) => {
@@ -93,6 +108,10 @@ const handleTabbarItemClick = (path: string) => {
   }
   uni.switchTab({ url: path })
 }
+const handleAdd = async (e) => {
+  console.log(e)
+  publishState.value = true
+}
 onMounted(async () => {})
 </script>
 

+ 8 - 0
packages/merchant/src/pages.json

@@ -143,6 +143,14 @@
       }
     },
     {
+      "path": "pages/home/agent/report-infos/index",
+      "type": "page",
+      "style": {
+        "navigationBarTitleText": "关系报备",
+        "navigationBarBackgroundColor": "#fff"
+      }
+    },
+    {
       "path": "pages/home/agent/todo/index",
       "type": "page",
       "style": {

+ 3 - 6
packages/merchant/src/pages/home/agent/components/task-card.vue

@@ -4,15 +4,12 @@ import { taskReceive } from '../../../../core/libs/requests'
 import { useUserStore } from '../../../../store'
 import Card from '@designer-hub/app/src/components/card.vue'
 import dayjs from 'dayjs'
+import { useTask } from '../../../../composables/task'
 const props = withDefaults(defineProps<{ options: any }>(), { options: () => ({}) })
 const userStore = useUserStore()
 const { userInfo } = storeToRefs(userStore)
-const types = ref({
-  // 0: { title: '团队任务', bg: '', bgClass: 'bg-gradient-to-r from-[#cfe0ff] to-[#e1ecff]' },
-  1: { title: '团队任务', bg: '', bgClass: 'bg-gradient-to-r from-[#cfe0ff] to-[#e1ecff]' },
-  2: { title: '抢单任务', bg: '', bgClass: 'bg-gradient-to-r from-[#ffcfcf] to-[#ffeae1]' },
-  3: { title: '指定任务', bg: '', bgClass: 'bg-gradient-to-r from-[#ffe8cf] to-[#fff3e1]' },
-})
+
+const { types } = useTask()
 const status = ref({
   1: {
     title: '未开始',

+ 140 - 0
packages/merchant/src/pages/home/agent/report-infos/index.vue

@@ -0,0 +1,140 @@
+<route lang="json">
+{ "style": { "navigationBarTitleText": "关系报备", "navigationBarBackgroundColor": "#fff" } }
+</route>
+<script setup lang="ts">
+import BottomAppBar from '@/components/bottom-app-bar.vue'
+import PageHelperEvo from '@/components/page-helper-evo.vue'
+import { deleteReportInfo, getReportInfoPage } from '../../../../core/libs/agent-requests'
+import { ReportInfoReviewStatus } from '../../../../core/libs/enums'
+import Card from '@designer-hub/app/src/components/card.vue'
+import dayjs from 'dayjs'
+import { ReportInfo } from '@designer-hub/app/src/core/libs/models'
+import { requestToast } from '@designer-hub/app/src/core/utils/common'
+import { ComponentExposed } from 'vue-component-type-helpers'
+
+const tab = ref(0)
+const tabs = [
+  { label: '全部', value: '' },
+  { label: '审核中', value: ReportInfoReviewStatus.PendingReview.toString() },
+  { label: '未通过', value: ReportInfoReviewStatus.Rejected.toString() },
+  { label: '已通过', value: ReportInfoReviewStatus.Approved.toString() },
+]
+const pageHelperRef = ref<ComponentExposed<typeof PageHelperEvo>>()
+const query = computed(() => (tab.value ? { reviewStatus: tabs[tab.value].value } : {}))
+const handleAdd = () => {
+  uni.navigateTo({ url: '/pages/home/merchant/add-reporting-information' })
+}
+const handleDelete = async (reportInfo: ReportInfo) => {
+  await requestToast(() => deleteReportInfo(reportInfo.id), {
+    success: true,
+    successTitle: '删除成功',
+  })
+  pageHelperRef.value?.refresh()
+}
+</script>
+<template>
+  <div class="flex-grow flex flex-col">
+    <!-- <PageHelperEvo
+      :request="
+        async () => ({
+          code: 0,
+          msg: '',
+          data: { list: [{ title: '', a: 1, sss: 444 }], total: 0 },
+        })
+      "
+    >
+      <template #default="{ source }">
+        {{ source.list[0].title }}
+        {{ source.list[0].a }}
+        {{ source.list[0].sss }}
+      </template>
+    </PageHelperEvo> -->
+
+    <PageHelperEvo ref="pageHelperRef" :request="getReportInfoPage" :query="query">
+      <template #top>
+        <wd-tabs v-model="tab">
+          <template v-for="(it, i) in tabs" :key="i">
+            <wd-tab :title="it.label"></wd-tab>
+          </template>
+        </wd-tabs>
+      </template>
+      <template #default="{ source }">
+        <div class="flex flex-col gap-4 p-4">
+          <template v-for="(it, i) in source.list" :key="i">
+            <Card>
+              <!-- {{ it.stylistName }} -->
+              <div class="flex items-center justify-between">
+                <div
+                  class="text-center text-black text-sm font-normal font-['PingFang_SC'] leading-normal"
+                >
+                  报备时间:
+                  <!-- 2024-02-21 10:12 -->
+                  {{ dayjs(it.createTime).format('YYYY-MM-DD HH:mm') }}
+                </div>
+                <div
+                  class="right-0 top-[15px] text-center text-sm font-normal font-['PingFang_SC'] leading-normal"
+                  :class="`${{ [ReportInfoReviewStatus.PendingReview]: 'text-[#2357e9]', [ReportInfoReviewStatus.Approved]: 'text-[#16b032]', [ReportInfoReviewStatus.Rejected]: 'text-[#ff2d2d]' }[it.reviewStatus]}`"
+                >
+                  {{ it.reviewStatus === ReportInfoReviewStatus.PendingReview ? '审核中' : '' }}
+                  {{ it.reviewStatus === ReportInfoReviewStatus.Rejected ? '未通过' : '' }}
+                  {{ it.reviewStatus === ReportInfoReviewStatus.Approved ? '已通过' : '' }}
+                </div>
+              </div>
+              <div class="my-3 w-full h-.25 bg-[#f4f4f4]"></div>
+              <div class="grid grid-cols-[1fr_2fr] gap-y-2.5">
+                <template
+                  v-for="(item, index) in [
+                    { label: '店面名称', value: it.shopName },
+                    { value: it.arrivalTime, label: '到店时间' },
+                    { value: it.receptionist, label: '接待人员' },
+                    { value: it.contactNumber, label: '联系电话' },
+                    { value: it.customerName, label: '客户姓名' },
+                    { value: it.customerPhoneNumbe, label: '客户电话' },
+                    { value: it.customerAddress, label: '客户地址' },
+                    { value: it.stylistName, label: '设计师姓名' },
+                  ]"
+                  :key="index"
+                >
+                  <!-- <div class="flex items-center"> -->
+                  <div
+                    class="left-0 top-0 text-black/40 text-sm font-normal font-['PingFang_SC'] leading-none"
+                  >
+                    {{ item.label }}
+                  </div>
+                  <div
+                    class="left-[105px] top-0 text-[#3f4c64] text-sm font-normal font-['PingFang_SC'] leading-none"
+                  >
+                    {{ item.value }}
+                  </div>
+                  <!-- </div> -->
+                </template>
+              </div>
+              <template v-if="it.reviewStatus === ReportInfoReviewStatus.Rejected">
+                <div class="my-3 w-full h-.25 bg-[#f4f4f4]"></div>
+                <div class="text-[#ff2d2d] text-sm font-normal font-['PingFang SC'] leading-none">
+                  原因:{{ it.reason }}
+                </div>
+                <div class="flex justify-end">
+                  <div>
+                    <wd-button
+                      :round="false"
+                      icon="delete"
+                      size="small"
+                      plain
+                      @click="handleDelete(it)"
+                    >
+                      删除
+                    </wd-button>
+                  </div>
+                </div>
+              </template>
+            </Card>
+          </template>
+        </div>
+      </template>
+    </PageHelperEvo>
+    <BottomAppBar fixed placeholder>
+      <div><wd-button block :round="false" @click="handleAdd">添加报备信息</wd-button></div>
+    </BottomAppBar>
+  </div>
+</template>

+ 24 - 18
packages/merchant/src/pages/home/index.vue

@@ -149,7 +149,7 @@ onShareAppMessage(() => ({}))
             </Card>
             <template v-for="(it, i) in tasks.list" :key="i">
               <div class="inline-block">
-                <div class="w-[calc(100vw-64rpx)]"><TaskCard :options="it"></TaskCard></div>
+                <div class="w-[calc(75vw)]"><TaskCard :options="it"></TaskCard></div>
               </div>
             </template>
           </div>
@@ -158,31 +158,37 @@ onShareAppMessage(() => ({}))
           <SectionHeading title="设计师" path="" custom-class="mb-5"></SectionHeading>
           <div class="flex flex-col gap-4">
             <template
-              v-for="{ label, color } of [
-                { label: '重点跟进设计师', color: '#FF523F' },
-                { label: '全部设计师', color: '#7199FF' },
-                { label: '本月新增设计师', color: '#FFE786' },
-                { label: '超过30天未跟进', color: '#89F4E3' },
-                { label: '超过60天未产生积分设计师', color: '#FFBA6A' },
-                { label: '超过60天未消耗积分设计师', color: '#C494FF' },
-                { label: '未成交过设计师', color: '#FF9EE2' },
+              v-for="{ label, color, ...it } of [
+                {
+                  label: '关系报备',
+                  color: 'white',
+                  path: '/pages/home/agent/report-infos/index',
+                },
+                { label: '重点跟进设计师', color: '#FF523F', path: '/pages/designer/index' },
+                { label: '全部设计师', color: '#7199FF', path: '/pages/designer/index' },
+                { label: '本月新增设计师', color: '#FFE786', path: '/pages/designer/index' },
+                { label: '超过30天未跟进', color: '#89F4E3', path: '/pages/designer/index' },
+                {
+                  label: '超过60天未产生积分设计师',
+                  color: '#FFBA6A',
+                  path: '/pages/designer/index',
+                },
+                {
+                  label: '超过60天未消耗积分设计师',
+                  color: '#C494FF',
+                  path: '/pages/designer/index',
+                },
+                { label: '未成交过设计师', color: '#FF9EE2', path: '/pages/designer/index' },
               ]"
               :key="label"
             >
-              <div
-                class="h-12 bg-white rounded-lg shadow flex items-center hover:bg-[#fff6f5]"
-                @click="toDesigner"
-              >
+              <div class="h-12 bg-white rounded-lg shadow flex items-center hover:bg-[#fff6f5]">
                 <div
                   class="w-1.5 h-12 rounded-tl-lg rounded-bl-lg shadow"
                   :style="{ background: color }"
                 ></div>
                 <div class="flex-1 mx-3">
-                  <SectionHeading
-                    :title="label"
-                    path="/pages/designer/index"
-                    size="sm"
-                  ></SectionHeading>
+                  <SectionHeading :title="label" :path="it.path" size="sm"></SectionHeading>
                 </div>
               </div>
             </template>

+ 21 - 19
packages/merchant/src/pages/home/merchant/add-reporting-information.vue

@@ -2,6 +2,8 @@
 { "style": { "navigationBarTitleText": "添加关系报备", "navigationBarBackgroundColor": "#fff" } }
 </route>
 <script setup lang="ts">
+import dayjs from 'dayjs'
+import { DataFormSchema } from '../../../components/data-form'
 import DataForm from '../../../components/data-form.vue'
 import { createReportInfo, getDesignerList } from '../../../core/libs/requests'
 import { useUserStore } from '../../../store'
@@ -9,18 +11,20 @@ import { storeToRefs } from 'pinia'
 
 const userStore = useUserStore()
 const { userInfo } = storeToRefs(userStore)
-const formData = ref<any>({})
+const formData = ref<any>({
+  arrivalTime: dayjs().toDate(),
+})
 const designerList = ref([])
 const stylistIdName = ref('')
-const merchantSchema = ref({
+const merchantSchema = ref<DataFormSchema>({
   stylistId: {
     type: 'Select',
     label: '设计师:',
+    labelWidth: 84,
+    required: true,
     props: {
-      labelWidth: '150rpx',
       placeholder: '请选择设计师',
       columns: [],
-      required: true,
       // disabled: userAuthInfo.value != null,
       'onUpdate:modelValue': (value) => {
         // console.log(value),
@@ -34,67 +38,65 @@ const merchantSchema = ref({
     },
   },
   arrivalTime: {
-    type: 'timePick',
+    type: 'TimePick',
     label: '到店时间:',
+    labelWidth: 84,
+    required: true,
     props: {
-      required: true,
-      labelWidth: '150rpx',
       placeholder: '请选择到店时间',
-      // disabled: userAuthInfo.value != null,
     },
   },
   shopName: {
     type: 'TextField',
     label: '店面名称',
     existing: true,
+    required: true,
+    labelWidth: 84,
     props: {
-      required: true,
-      labelWidth: '150rpx',
       placeholder: '店面名称',
-      // disabled: userAuthInfo.value != null,
     },
   },
   receptionist: {
     type: 'TextField',
     label: '接待人员:',
+    required: true,
+    labelWidth: 84,
     props: {
-      required: true,
-      labelWidth: '150rpx',
       placeholder: '请输入接待人员',
     },
   },
   contactNumber: {
     type: 'TextField',
     label: '联系电话:',
+    required: true,
+    labelWidth: 84,
     props: {
-      required: true,
-      labelWidth: '150rpx',
       placeholder: '请输入联系电话',
     },
   },
 })
-const customerSchema = ref({
+const customerSchema = ref<DataFormSchema>({
   customerName: {
     type: 'TextField',
     label: '客户姓名:',
+    labelWidth: 84,
     props: {
-      labelWidth: '126rpx',
       placeholder: '请输入客户姓名',
     },
   },
   customerPhoneNumbe: {
     type: 'TextField',
     label: '客户电话:',
+    labelWidth: 84,
     props: {
-      labelWidth: '126rpx',
       placeholder: '请输入客户电话',
     },
   },
   customerAddress: {
     type: 'TextField',
     label: '客户地址:',
+    labelWidth: 84,
     props: {
-      labelWidth: '126rpx',
       placeholder: '请输入客户地址',
     },
   },

+ 35 - 30
packages/merchant/src/pages/home/tasks/detail/index.vue

@@ -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>

+ 1 - 0
packages/merchant/src/types/uni-pages.d.ts

@@ -15,6 +15,7 @@ interface NavigateToOptions {
        "/pages/home/merchant/settlement" |
        "/pages/home/tasks/index" |
        "/pages/mine/merchant/merchant_settings" |
+       "/pages/home/agent/report-infos/index" |
        "/pages/home/agent/todo/index" |
        "/pages/home/tasks/detail/index" |
        "/pages/mine/merchant/orders/detail/index";