2025-06-10 16:27:34 +08:00
|
|
|
<template>
|
|
|
|
|
<BasicLayout>
|
|
|
|
|
<view class="px-15 pb-15">
|
|
|
|
|
<BasicForm @register="register"> </BasicForm>
|
|
|
|
|
</view>
|
|
|
|
|
<template #bottom>
|
|
|
|
|
<view class="flex-row items-center pb-10 pt-5">
|
|
|
|
|
<u-button
|
|
|
|
|
text="上一步"
|
|
|
|
|
class="ml-15 mr-7"
|
|
|
|
|
:plain="true"
|
|
|
|
|
@click="navigateBack"
|
|
|
|
|
/>
|
|
|
|
|
<u-button
|
|
|
|
|
text="下一步"
|
|
|
|
|
class="mr-15 mr-7"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="submit"
|
|
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicLayout>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { navigateBack, navigateTo } from "@/utils/uniapp";
|
|
|
|
|
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
|
|
|
|
import { useDataStore } from "@/store/modules/data";
|
|
|
|
|
import dayjs from "dayjs";
|
2025-07-15 22:29:36 +08:00
|
|
|
import { useDicStore } from "@/store/modules/dic";
|
|
|
|
|
const { findByPid } = useDicStore();
|
2025-06-10 16:27:34 +08:00
|
|
|
|
|
|
|
|
const { getFile, setFile } = useDataStore();
|
|
|
|
|
|
|
|
|
|
const [register, { getValue, setValue }] = useForm({
|
|
|
|
|
schema: [
|
|
|
|
|
{
|
|
|
|
|
field: "zgxdId",
|
|
|
|
|
label: "教师资格学段",
|
|
|
|
|
component: "BasicPicker",
|
|
|
|
|
componentProps: {
|
2025-07-15 22:29:36 +08:00
|
|
|
api: findByPid,
|
2025-06-10 16:27:34 +08:00
|
|
|
param: { pid: 1680570189 },
|
|
|
|
|
rangeKey: "dictionaryValue",
|
|
|
|
|
savaKey: "dictionaryCode",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "zgxkId",
|
|
|
|
|
label: "教师资格学科",
|
|
|
|
|
component: "BasicPicker",
|
|
|
|
|
componentProps: {
|
2025-07-15 22:29:36 +08:00
|
|
|
api: findByPid,
|
2025-06-10 16:27:34 +08:00
|
|
|
param: { pid: 1029593616 },
|
|
|
|
|
rangeKey: "dictionaryValue",
|
|
|
|
|
savaKey: "dictionaryCode",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "zgzs",
|
|
|
|
|
label: "教师资格证书号",
|
|
|
|
|
component: "BasicInput",
|
|
|
|
|
componentProps: {},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "zgnytime",
|
|
|
|
|
label: "教师资格取得年月",
|
2025-06-10 23:40:49 +08:00
|
|
|
component: "BasicDateTime",
|
|
|
|
|
componentProps: {
|
|
|
|
|
mode: "year-month",
|
|
|
|
|
},
|
2025-06-10 16:27:34 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "zgzctime",
|
|
|
|
|
label: "当前教师资格注册时间",
|
|
|
|
|
component: "BasicDateTimes",
|
|
|
|
|
componentProps: {
|
|
|
|
|
change: (e: any) => {
|
|
|
|
|
if (e) {
|
|
|
|
|
// 计算5年后的日期
|
|
|
|
|
const nextDate = dayjs(e).add(5, 'year').format('YYYY-MM-DD');
|
|
|
|
|
setValue({ xczgzctime: nextDate });
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "xczgzctime",
|
|
|
|
|
label: "下次教师资格注册时间",
|
|
|
|
|
component: "BasicDateTimes",
|
|
|
|
|
componentProps: {},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
setValue(getFile);
|
|
|
|
|
|
|
|
|
|
async function submit() {
|
|
|
|
|
try {
|
|
|
|
|
const value = await getValue();
|
|
|
|
|
setFile({ ...getFile, ...value });
|
|
|
|
|
navigateTo("/pages/view/hr/teacherProfile/position");
|
|
|
|
|
} catch (error) {}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.delete-icon {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
}
|
|
|
|
|
</style>
|