调整教师请假
This commit is contained in:
parent
48c2f73396
commit
39db11f7fe
@ -4,23 +4,59 @@
|
|||||||
import { get, post } from "@/utils/request";
|
import { get, post } from "@/utils/request";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起请假
|
* 申请
|
||||||
*/
|
*/
|
||||||
export const addQjApi = async (params: any) => {
|
export const jsQjSqApi = async (params: any) => {
|
||||||
return await post("/api/jsQj/save", params);
|
return await post("/api/qj/sq", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批
|
||||||
|
*/
|
||||||
|
export const jsQjSpApi = async (params: any) => {
|
||||||
|
return await post("/api/qj/sp", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教务处确认
|
||||||
|
*/
|
||||||
|
export const jsQjJwcQrApi = async (params: any) => {
|
||||||
|
return await post("/api/qj/jwc/qr", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教务处协调
|
||||||
|
*/
|
||||||
|
export const jsQjJwcXtApi = async (params: any) => {
|
||||||
|
return await post("/api/qj/jwc/xt", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代课确认
|
||||||
|
*/
|
||||||
|
export const jsQjDkQrApi = async (params: any) => {
|
||||||
|
return await post("/api/qj/dk/qr", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询请假信息
|
* 查询请假信息
|
||||||
*/
|
*/
|
||||||
export const findQjById = async (params: any) => {
|
export const findQjById = async (params: any) => {
|
||||||
return await get("/api/jsQj/findById", params);
|
return await get("/api/qj/findById", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询代课信息
|
||||||
|
* params: { jsId, startTime, endTime }
|
||||||
|
*/
|
||||||
|
export const getPkkbByJsRangeTimeApi = async (params: any) => {
|
||||||
|
return await get("/mobile/js/pkkb/getListByJsRangeTime", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询代课信息
|
* 查询代课信息
|
||||||
*/
|
*/
|
||||||
export const findDkById = async (params: any) => {
|
export const findDkByIdApi = async (params: any) => {
|
||||||
return await get("/api/qjDk/findById", params);
|
return await get("/api/qjDk/findById", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -28,7 +64,7 @@ export const findDkById = async (params: any) => {
|
|||||||
* 查询请假列表
|
* 查询请假列表
|
||||||
*/
|
*/
|
||||||
export const findQjListApi = async (params: any) => {
|
export const findQjListApi = async (params: any) => {
|
||||||
return await get("/api/jsQj/findPage", params);
|
return await get("/api/qj/findPage", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
<u-radio-group
|
<u-radio-group
|
||||||
v-model="newValue"
|
v-model="newValue"
|
||||||
v-bind="attrs.componentProps"
|
v-bind="attrs.componentProps"
|
||||||
|
@change="handleChange"
|
||||||
>
|
>
|
||||||
<u-radio
|
<u-radio
|
||||||
:customStyle="customStyle"
|
:customStyle="customStyle"
|
||||||
@ -22,6 +23,7 @@
|
|||||||
<u-checkbox-group
|
<u-checkbox-group
|
||||||
v-model="newValue"
|
v-model="newValue"
|
||||||
v-bind="attrs.componentProps"
|
v-bind="attrs.componentProps"
|
||||||
|
@change="handleChange"
|
||||||
>
|
>
|
||||||
<u-checkbox
|
<u-checkbox
|
||||||
:customStyle="customStyle"
|
:customStyle="customStyle"
|
||||||
@ -113,4 +115,11 @@ initapi()
|
|||||||
if (attrs.componentProps) {
|
if (attrs.componentProps) {
|
||||||
attrs.componentProps['activeColor'] = THEMECOLOR
|
attrs.componentProps['activeColor'] = THEMECOLOR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleChange(e: any) {
|
||||||
|
newValue.value = e
|
||||||
|
if (attrs.componentProps.change && isFunction(attrs.componentProps.change)) {
|
||||||
|
attrs.componentProps.change(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -284,7 +284,7 @@ const sections = reactive<Section[]>([
|
|||||||
icon: "draftfill",
|
icon: "draftfill",
|
||||||
text: "请假申请",
|
text: "请假申请",
|
||||||
show: true,
|
show: true,
|
||||||
path: "/pages/view/hr/leaveApplication/index",
|
path: "/pages/view/hr/qj/index",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "hr2",
|
id: "hr2",
|
||||||
|
|||||||
238
src/pages/view/hr/qj/components/jsQjDkEdit.vue
Normal file
238
src/pages/view/hr/qj/components/jsQjDkEdit.vue
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
<template>
|
||||||
|
<view class="back-f8f8f8">
|
||||||
|
<view class="flex-row items-center justify-between py-15 global-bg-color">
|
||||||
|
<view>
|
||||||
|
<BasicTitle line title="代课明细" :isBorder="false" />
|
||||||
|
</view>
|
||||||
|
<view @click="getPkkbList">
|
||||||
|
<BasicIcon type="refreshempty" size="25" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="dkList.xl.length > 0">
|
||||||
|
<template v-for="(item, index) in dkList.xl" :key="index">
|
||||||
|
<view class="dk-card">
|
||||||
|
<view class="card-header">
|
||||||
|
<text class="applicant-name">{{ item.dktime }}的{{ item.jcmc }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-body">
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="label">排课名称:</text>
|
||||||
|
<text class="value">{{ item.pkName }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="label">上课时间:</text>
|
||||||
|
<text class="value">{{ item.startTime }}-{{ item.endTime }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row" @click="clickChangeJs">
|
||||||
|
<text class="label">代课老师:</text>
|
||||||
|
<view class="value">
|
||||||
|
<text class="data" v-if="item.dkJsId">{{ item.dkJsName }}</text>
|
||||||
|
<text class="data" style="color: #999;" v-else>请选择代课老师</text>
|
||||||
|
</view>
|
||||||
|
<uni-icons type="arrowright" size="16" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
<view v-else class="p-15 flex-row-center color-9 font-13 white-bg-color">暂无数据</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { getPkkbByJsRangeTimeApi } from "@/api/base/qjApi";
|
||||||
|
|
||||||
|
// 接收外部传入属性
|
||||||
|
const props = withDefaults(defineProps<{
|
||||||
|
data: any
|
||||||
|
}>(), {
|
||||||
|
data: () => ({
|
||||||
|
jsId: "",
|
||||||
|
qjkstime: "", // 请假开始时间
|
||||||
|
qjjstime: "", // 请假结束时间
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
// const schema = reactive<FormsSchema[]>([
|
||||||
|
// {
|
||||||
|
// field: "dktime", // 排课日期(pktime)
|
||||||
|
// label: "代课日期",
|
||||||
|
// component: "BasicInput",
|
||||||
|
// componentProps: {
|
||||||
|
// readonly: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// field: "pkmc",
|
||||||
|
// label: "排课名称",
|
||||||
|
// component: "BasicInput",
|
||||||
|
// componentProps: {
|
||||||
|
// readonly: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// field: "jcmc", // 节次类型(jcType)+节次(jc)
|
||||||
|
// label: "节次",
|
||||||
|
// component: "BasicInput",
|
||||||
|
// componentProps: {
|
||||||
|
// readonly: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// field: "njbjmx", // bc + bjmc
|
||||||
|
// label: "年级班级",
|
||||||
|
// component: "BasicInput",
|
||||||
|
// componentProps: {
|
||||||
|
// readonly: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// field: "startTime", // startTime
|
||||||
|
// label: "开始时间",
|
||||||
|
// component: "BasicInput",
|
||||||
|
// componentProps: {
|
||||||
|
// readonly: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// field: "endTime", // endTime
|
||||||
|
// label: "结束时间",
|
||||||
|
// component: "BasicInput",
|
||||||
|
// componentProps: {
|
||||||
|
// readonly: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// field: "jsId",
|
||||||
|
// label: "代课老师",
|
||||||
|
// component: "BasicInput",
|
||||||
|
// required: true,
|
||||||
|
// componentProps: {},
|
||||||
|
// },
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
const dkList = reactive<any>({
|
||||||
|
xl: [],
|
||||||
|
});
|
||||||
|
|
||||||
|
const jsTypeMc: any = {
|
||||||
|
"ZAM": '早自习',
|
||||||
|
"AM": '上午',
|
||||||
|
"PM": '下午',
|
||||||
|
};
|
||||||
|
|
||||||
|
const getPkkbList = async () => {
|
||||||
|
const res = await getPkkbByJsRangeTimeApi({
|
||||||
|
jsId: props.data.jsId,
|
||||||
|
startTime: props.data.qjkstime.split(" ")[0],
|
||||||
|
endTime: props.data.qjjstime.split(" ")[0],
|
||||||
|
});
|
||||||
|
// 记录原始选课的数据
|
||||||
|
const srcData: any = {};
|
||||||
|
dkList.xl.map((item: any) => {
|
||||||
|
const key = item.dktime + item.jcType + item.jc;
|
||||||
|
srcData[key] = {
|
||||||
|
dkJsId: item.dkJsId,
|
||||||
|
dkJsName: item.dkJsName
|
||||||
|
};
|
||||||
|
});
|
||||||
|
dkList.xl = res.result.map((item: any) => {
|
||||||
|
item.dktime = item.kbtime.split(" ")[0];
|
||||||
|
item.njbjmx = item.bc + item.bjmc;
|
||||||
|
item.jcmc = jsTypeMc[item.jcType] + "第" + item.jc + "节";
|
||||||
|
const key = item.dktime + item.jcType + item.jc;
|
||||||
|
const src = srcData[key];
|
||||||
|
if (src) {
|
||||||
|
item.dkJsId = src.dkJsId;
|
||||||
|
item.dkJsName = src.dkJsName;
|
||||||
|
} else {
|
||||||
|
item.dkJsId = "";
|
||||||
|
item.dkJsName = "";
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const clickChangeJs = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 暴露接口给ref调用
|
||||||
|
function getDkList() {
|
||||||
|
return dkList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 暴露接口给外部调用
|
||||||
|
defineExpose({
|
||||||
|
getPkkbList,
|
||||||
|
getDkList
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.dk-card {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
|
||||||
|
.applicant-name {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding: 15px;
|
||||||
|
|
||||||
|
.info-row {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
width: 70px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
.data {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer {
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-top: 1px solid #f0f0f0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #888;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.arrow {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -3,27 +3,7 @@
|
|||||||
<view class="p-15">
|
<view class="p-15">
|
||||||
<BasicForm @register="register">
|
<BasicForm @register="register">
|
||||||
<template #dkmx>
|
<template #dkmx>
|
||||||
<view class="back-f8f8f8">
|
<JsQjDkEdit :data="formData" ref="dkRef" v-if="formData.dkfs === 0" />
|
||||||
<view class="flex-row items-center justify-between py-15 global-bg-color">
|
|
||||||
<view>
|
|
||||||
<BasicTitle line title="代课明细" :isBorder="false" />
|
|
||||||
</view>
|
|
||||||
<view @click="addDk">
|
|
||||||
<BasicIcon type="icon-tianjia" size="25" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="dkList.xl.length > 0">
|
|
||||||
<template v-for="(item, index) in dkList.xl" :key="index">
|
|
||||||
<view class="po-re mb-15">
|
|
||||||
<BasicForm v-model="item.value" :schema="schema" :formsProps="{ labelWidth: 100 }" />
|
|
||||||
<view @click="delDk(index, item.value)" class="delete-icon">
|
|
||||||
<BasicIcon type="clear" size="30" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</view>
|
|
||||||
<view v-else class="p-15 flex-row-center color-9 font-13 white-bg-color">暂无数据</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
</BasicForm>
|
</BasicForm>
|
||||||
</view>
|
</view>
|
||||||
@ -39,33 +19,39 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import JsQjDkEdit from "./jsQjDkEdit.vue"
|
||||||
import { navigateBack } from "@/utils/uniapp";
|
import { navigateBack } from "@/utils/uniapp";
|
||||||
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
||||||
import { addQjApi } from "@/api/base/qjApi";
|
import { jsQjSqApi } from "@/api/base/qjApi";
|
||||||
import { showToast } from "@/utils/uniapp";
|
import { showToast } from "@/utils/uniapp";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { cloneDeep } from "lodash";
|
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
import { useDicStore } from "@/store/modules/dic";
|
import { useDicStore } from "@/store/modules/dic";
|
||||||
|
import { update } from "lodash";
|
||||||
const { getJs, getUser } = useUserStore();
|
const { getJs, getUser } = useUserStore();
|
||||||
const { findByPid } = useDicStore();
|
const { findByPid } = useDicStore();
|
||||||
|
|
||||||
// 接收外部传入属性
|
// 接收外部传入属性
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
data: any
|
data?: any
|
||||||
}>(), {
|
}>(), {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
id: "",
|
id: "",
|
||||||
qjlx: "事假",
|
qjlx: "事假",
|
||||||
qjkssj: "2025-07-07 09:00:00",
|
qjkstime: "2025-07-07 09:00:00",
|
||||||
qjjssj: "2025-07-08 10:00:00",
|
qjjstime: "2025-07-08 10:00:00",
|
||||||
qjsc: "25小时",
|
qjsc: "25小时",
|
||||||
qjsy: "我有事情",
|
qjsy: "我有事情",
|
||||||
dkfs: "1",
|
dkfs: 0,
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
let formData = ref<any>({});
|
const dkRef = ref<any>(null);
|
||||||
|
|
||||||
|
let formData = ref<any>({
|
||||||
|
...props.data,
|
||||||
|
jsId: getJs.id,
|
||||||
|
});
|
||||||
|
|
||||||
const [register, { setValue, getValue }] = useForm({
|
const [register, { setValue, getValue }] = useForm({
|
||||||
schema: [
|
schema: [
|
||||||
@ -81,7 +67,6 @@ const [register, { setValue, getValue }] = useForm({
|
|||||||
savaKey: "dictionaryCode",
|
savaKey: "dictionaryCode",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ interval: true },
|
|
||||||
{
|
{
|
||||||
field: "qjkstime",
|
field: "qjkstime",
|
||||||
label: "开始时间",
|
label: "开始时间",
|
||||||
@ -111,7 +96,6 @@ const [register, { setValue, getValue }] = useForm({
|
|||||||
placeholder: "请输入选择开始时间和结束时间"
|
placeholder: "请输入选择开始时间和结束时间"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ interval: true },
|
|
||||||
{
|
{
|
||||||
field: "qjsy",
|
field: "qjsy",
|
||||||
label: "请假事由",
|
label: "请假事由",
|
||||||
@ -149,59 +133,16 @@ const [register, { setValue, getValue }] = useForm({
|
|||||||
{ value: 1, text: "教科处协调" },
|
{ value: 1, text: "教科处协调" },
|
||||||
{ value: 2, text: "无须代课" },
|
{ value: 2, text: "无须代课" },
|
||||||
],
|
],
|
||||||
|
change: (value: any) => {
|
||||||
|
formData.value.dkfs = value;
|
||||||
|
updateDk();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ colSlot: "dkmx" },
|
{ colSlot: "dkmx" },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const schema = reactive<FormsSchema[]>([
|
|
||||||
{
|
|
||||||
field: "dktime",
|
|
||||||
label: "日期",
|
|
||||||
component: "BasicDateTimes",
|
|
||||||
required: true,
|
|
||||||
componentProps: {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "nl",
|
|
||||||
label: "年级班级",
|
|
||||||
component: "BasicInput",
|
|
||||||
required: true,
|
|
||||||
componentProps: {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "yhzgx",
|
|
||||||
label: "节次",
|
|
||||||
component: "BasicInput",
|
|
||||||
required: true,
|
|
||||||
componentProps: {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "yhzgx",
|
|
||||||
label: "代课老师",
|
|
||||||
component: "BasicInput",
|
|
||||||
required: true,
|
|
||||||
componentProps: {},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const dkList = reactive<any>({
|
|
||||||
xl: [{ value: {} }],
|
|
||||||
});
|
|
||||||
|
|
||||||
function addDk() {
|
|
||||||
dkList.xl.push({ value: {} });
|
|
||||||
}
|
|
||||||
|
|
||||||
function delDk(index: number, item: any) {
|
|
||||||
const list = cloneDeep(dkList.xl);
|
|
||||||
list.splice(index, 1);
|
|
||||||
dkList.xl = list;
|
|
||||||
}
|
|
||||||
|
|
||||||
setValue(props.data)
|
|
||||||
|
|
||||||
const changeKsTime = (selectedTime?: string) => {
|
const changeKsTime = (selectedTime?: string) => {
|
||||||
if (!selectedTime) {
|
if (!selectedTime) {
|
||||||
return;
|
return;
|
||||||
@ -236,9 +177,22 @@ const validateTime = () => {
|
|||||||
// 计算请假时长(小时)
|
// 计算请假时长(小时)
|
||||||
data.qjsc = Math.round((jsTime - ksTime) / (1000 * 60 * 60)) + "小时";
|
data.qjsc = Math.round((jsTime - ksTime) / (1000 * 60 * 60)) + "小时";
|
||||||
setValue({ qjsc: data.qjsc });
|
setValue({ qjsc: data.qjsc });
|
||||||
|
updateDk();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const updateDk = () => {
|
||||||
|
if (formData.value.dkfs === 0) {
|
||||||
|
nextTick(() => {
|
||||||
|
dkRef.value.getPkkbList();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 初始化
|
||||||
|
setValue(props.data)
|
||||||
|
updateDk();
|
||||||
|
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
const fd = await getValue();
|
const fd = await getValue();
|
||||||
if (!validateTime()) {
|
if (!validateTime()) {
|
||||||
@ -254,7 +208,7 @@ const submit = async () => {
|
|||||||
}
|
}
|
||||||
params.flag = 2;
|
params.flag = 2;
|
||||||
uni.showLoading({ title: "提交中..." });
|
uni.showLoading({ title: "提交中..." });
|
||||||
await addQjApi(params).then(() => {
|
await jsQjSqApi(params).then(() => {
|
||||||
showToast({ title: "提交成功", icon: "success" });
|
showToast({ title: "提交成功", icon: "success" });
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pages/base/home/index"
|
url: "/pages/base/home/index"
|
||||||
|
|||||||
@ -54,7 +54,7 @@ const [register, { reload }] = useLayout({
|
|||||||
// 查看详情或新增处理函数
|
// 查看详情或新增处理函数
|
||||||
const goToDetail = (item: any | null) => {
|
const goToDetail = (item: any | null) => {
|
||||||
setData(item);
|
setData(item);
|
||||||
let url = '/pages/view/hr/leaveApplication/detail'; // 使用新路径
|
let url = '/pages/view/hr/qj/detail'; // 使用新路径
|
||||||
uni.navigateTo({ url });
|
uni.navigateTo({ url });
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -6,18 +6,18 @@
|
|||||||
:current="curTabIndex" @change="switchTab"
|
:current="curTabIndex" @change="switchTab"
|
||||||
/>
|
/>
|
||||||
<view class="leave-edit" v-if="curTabIndex === 0">
|
<view class="leave-edit" v-if="curTabIndex === 0">
|
||||||
<XsQjEdit />
|
<JsQjEdit />
|
||||||
</view>
|
</view>
|
||||||
<view class="leave-list" v-else>
|
<view class="leave-list" v-else>
|
||||||
<XsQjList />
|
<JsQjList />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import XsQjEdit from "./components/xsQjEdit.vue"
|
import JsQjEdit from "./components/jsQjEdit.vue"
|
||||||
import XsQjList from "./components/xsQjList.vue"
|
import JsQjList from "./components/jsQjList.vue"
|
||||||
|
|
||||||
const tabList = ref([
|
const tabList = ref([
|
||||||
{ name: "请假申请", id: "leave-edit" },
|
{ name: "请假申请", id: "leave-edit" },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user