| 
					
				 | 
			
			
				@@ -13,6 +13,19 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <TypographyTitle :level="4">封面、配套保险、使用须知</TypographyTitle> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <Divider></Divider> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <template #tenant="{ model, field }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <ApiSelect 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :api="Business" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            labelField="name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            valueField="tenantId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :params="{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              orgCode: userInfo?.orgCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              type: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            v-model:value="model[field]" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            @change="handleOption" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ></ApiSelect> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <template #ZtCustomTable1="{ model, field }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <ZtCustomTable :tableColumn="ScheduleArrangementColums" :showAction="getIsMerchant" v-model:value="model[field]" :count="3"></ZtCustomTable> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -32,14 +45,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script lang="ts" setup name="business-management-schoolOpen"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { TypographyTitle, Divider } from 'ant-design-vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  import { BasicForm, useForm } from '/@/components/Form/index'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import { BasicForm, useForm, ApiSelect } from '/@/components/Form/index'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import ZtCustomTable from '/@/components/ZtCustomTable/index.vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import { Business } from '../gymnasiumBag/gymnasiumBag.api'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { useUserStore } from '/@/store/modules/user'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { formSchema, ScheduleArrangementColums } from './schoolOpen.data'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { getDetails, saveOrUpdate } from './schoolOpen.api'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { ref, unref } from 'vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { useRouter } from 'vue-router'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { storeToRefs } from 'pinia'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const { userInfo } = storeToRefs(useUserStore()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const router = useRouter(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const { getIsMerchant } = storeToRefs(useUserStore()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const [registerForm, { setProps, resetFields, setFieldsValue, updateSchema, validate, clearValidate, getFieldsValue }] = useForm({ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -90,6 +105,26 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   async function getData() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const res = await getDetails({ orgCode: useUserStore().userInfo?.orgCode }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (!res.teachingDay) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleCommonSet(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    console.log(JSON.parse(res.noTeachingDay)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  getData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  function handleClick() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    router.push({ path: '/informationManagement/teachorNoteach' }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  async function handleOption(options) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const res = await Business({ orgCode: useUserStore().userInfo?.orgCode, type: 0 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const orgCode = res.find((it) => it.tenantId == options).orgCode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (orgCode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const res = await getDetails({ orgCode: orgCode }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!res.noTeachingDay) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      handleCommonSet(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  function handleCommonSet(res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     setFieldsValue({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ...res, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       insureIds: res.insureIds.split(','), 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -102,11 +137,5 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return { ...it, time: [it.startTime, it.endTime] }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    console.log(JSON.parse(res.noTeachingDay)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  getData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  function handleClick() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    router.push({ path: '/informationManagement/teachorNoteach' }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </script> 
			 |