| 
					
				 | 
			
			
				@@ -8,11 +8,12 @@ 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' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// eslint-disable-next-line import/named 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { appTaskReport, getTaskDetail } from '@/core/libs/requests' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { useUserStore } from '@/store' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { appTaskReport, getTaskDetail } 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' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const taskId = ref() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const types = ref({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   1: { title: '到店', bg: '', bgClass: 'bg-gradient-to-r from-[#cfe0ff] to-[#e1ecff]' }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -24,32 +25,42 @@ const publishState = ref(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const formData = ref<any>({}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const userStore = useUserStore() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const { userInfo } = storeToRefs(userStore) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const taskDetails = ref() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const customerSchema = ref({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const { data: taskDetails, run: setTaskDetails } = useRequest(() => 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  getTaskDetail({ brokerId: userInfo.value.userId, taskId: taskId.value }), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const dataFormRef = ref<ComponentExposed<typeof DataForm>>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const customerSchema = ref<DataFormSchema>({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   num: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     type: 'TextField', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     label: '个人完成量:', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    required: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     props: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      labelWidth: '126rpx', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       placeholder: '请输入个人完成量', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   remark: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    type: 'textarea', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    type: 'Textarea', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     label: '上报说明:', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    required: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     props: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      labelWidth: '126rpx', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       placeholder: '请输入上报说明', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const customerRules = ref({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  num: [{ required: true, message: '请输入个人完成量', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  remark: [{ required: true, message: '请输入上报说明', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const initData = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  const res = await getTaskDetail({ brokerId: userInfo.value.userId, taskId: taskId.value }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  taskDetails.value = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  await setTaskDetails() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const submitTask = async (data) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   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, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -92,15 +103,31 @@ onLoad(async (query: { taskId: string }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div class="bg-[#f6f7ff]" style="border-top-left-radius: 8px; border-top-right-radius: 8px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div class="flex flex-row items-center justify-start p-[15px] gap-2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div style="width: 50px; height: 50px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <wd-circle v-model="current" :size="50" color="rgba(66, 113, 255, 1)"></wd-circle> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <wd-circle 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :model-value="(taskDetails.completedNum / taskDetails.storeQuantity) * 100" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :size="50" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              color="rgba(66, 113, 255, 1)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :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 }}% 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  class="w-[22.71px] h-[10.82px] text-black/60 text-[7px] font-normal font-['PingFang SC']" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  达成率 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </wd-circle> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div class="flex flex-row items-center justify-start ml-[37px]"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <div class="text-black/60 text-sm font-normal font-['PingFang_SC']">奖励积分:</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <div class="text-[#ff2d2d] text-[22px] font-medium font-['DIN'] leading-normal"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              {{ taskDetails?.pointsReward }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <div class="text-[#ff2d2d] text-xs font-normal font-['PingFang_SC'] leading-normal"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              积分 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <div class="flex items-end gap-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div class="text-[#ff2d2d] text-[22px] font-medium font-['DIN'] leading-22px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                {{ taskDetails?.pointsReward }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div class="text-[#ff2d2d] text-xs font-normal font-['PingFang_SC']">积分</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -190,7 +217,7 @@ onLoad(async (query: { taskId: string }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div class="flex items-center justify-start gap-3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <template v-for="item in taskDetails?.brokerList"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <template v-for="item in taskDetails?.brokerList" :key="item.id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <div class="my-[23px]"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <img class="w-[46px] h-[46px] rounded-full" :src="item.headImgUrl" alt="" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <div 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -208,8 +235,8 @@ onLoad(async (query: { 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"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <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"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -229,13 +256,13 @@ onLoad(async (query: { taskId: string }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div v-else class="bg-[#f7fbff] rounded-[10px] py-[22px] px-[16px] mt-[20px]"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <template v-for="item in taskDetails?.reportList"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <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> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <div class="text-[#2357e9] text-xs font-normal font-['PingFang SC'] leading-normal"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              {{ item.status == 0 ? '审核通过' : item.status == 1 ? '审核中' : '驳回' }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {{ item.status == '0' ? '审核通过' : item.status == '1' ? '审核中' : '驳回' }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div class="mt-[7px]"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -284,7 +311,7 @@ onLoad(async (query: { taskId: string }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <template v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <template v-if="!taskDetails?.receive && taskDetails?.finalType == 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <template v-if="!taskDetails?.receive && taskDetails?.finalType == '2'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div class="px-5 py-3 bg-[#2357e9] rounded-md justify-center items-center gap-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               @click="publishState = true" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -299,7 +326,12 @@ onLoad(async (query: { taskId: string }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <wd-action-sheet v-model="publishState" title="" @close="publishState = false"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <view class="flex flex-col p-4 mt-4"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <data-form :schema="customerSchema" v-model="formData"></data-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <data-form 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ref="dataFormRef" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :schema="customerSchema" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :rules="customerRules" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          v-model="formData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ></data-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div><wd-button block :round="false" @click="submitTask">提交</wd-button></div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </wd-action-sheet> 
			 |