重命名

This commit is contained in:
ywyonui 2025-07-25 13:52:59 +08:00
parent e9e2827046
commit d91dd1bb19
15 changed files with 74 additions and 32 deletions

View File

@ -7,42 +7,42 @@ import { get, post } from "@/utils/request";
*
*/
export const jsQjSqApi = async (params: any) => {
return await post("/api/qj/sq", params);
return await post("/api/jsQj/sq", params);
};
/**
*
*/
export const jsQjSpApi = async (params: any) => {
return await post("/api/qj/sp", params);
return await post("/api/jsQj/sp", params);
};
/**
*
*/
export const jsQjJwcQrApi = async (params: any) => {
return await post("/api/qj/jwc/qr", params);
return await post("/api/jsQj/jwc/qr", params);
};
/**
*
*/
export const jsQjJwcXtApi = async (params: any) => {
return await post("/api/qj/jwc/xt", params);
return await post("/api/jsQj/jwc/xt", params);
};
/**
*
*/
export const jsQjDkQrApi = async (params: any) => {
return await post("/api/qj/dk/qr", params);
return await post("/api/jsQj/dk/qr", params);
};
/**
*
*/
export const findQjById = async (params: any) => {
return await get("/api/qj/findById", params);
return await get("/api/jsQj/findById", params);
};
/**
@ -57,14 +57,14 @@ export const getPkkbByJsRangeTimeApi = async (params: any) => {
*
*/
export const findDkByIdApi = async (params: any) => {
return await get("/api/qjDk/findById", params);
return await get("/api/jsQjDk/findById", params);
};
/**
*
*/
export const findQjListApi = async (params: any) => {
return await get("/api/qj/findPage", params);
return await get("/api/jsQj/findPage", params);
};
/**

View File

@ -252,7 +252,7 @@
}
},
{
"path": "pages/view/hr/qj/index",
"path": "pages/view/hr/jsQj/index",
"style": {
"navigationBarTitleText": "请假申请",
"enablePullDownRefresh": false
@ -273,42 +273,42 @@
}
},
{
"path": "pages/view/hr/qj/detail",
"path": "pages/view/hr/jsQj/detail",
"style": {
"navigationBarTitleText": "请假详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/view/hr/qj/sp",
"path": "pages/view/hr/jsQj/sp",
"style": {
"navigationBarTitleText": "请假审批",
"enablePullDownRefresh": false
}
},
{
"path": "pages/view/hr/qj/cxTj",
"path": "pages/view/hr/jsQj/cxTj",
"style": {
"navigationBarTitleText": "请假重新提交",
"enablePullDownRefresh": false
}
},
{
"path": "pages/view/hr/qj/jwcQr",
"path": "pages/view/hr/jsQj/jwcQr",
"style": {
"navigationBarTitleText": "请假代课教务处确认",
"enablePullDownRefresh": false
}
},
{
"path": "pages/view/hr/qj/jwcXt",
"path": "pages/view/hr/jsQj/jwcXt",
"style": {
"navigationBarTitleText": "请假代课教务处协调",
"enablePullDownRefresh": false
}
},
{
"path": "pages/view/hr/qj/dkQr",
"path": "pages/view/hr/jsQj/dkQr",
"style": {
"navigationBarTitleText": "请假代课教师确认",
"enablePullDownRefresh": false

View File

@ -291,7 +291,7 @@ const sections = reactive<Section[]>([
icon: "draftfill",
text: "请假申请",
show: true,
path: "/pages/view/hr/qj/index",
path: "/pages/view/hr/jsQj/index",
},
{
id: "hr2",

View File

@ -120,7 +120,6 @@ defineExpose({
});
onMounted(async () => {
console.log("排除列表:", props.excludeIds);
const res = await getAllJs()
jsListAll.value = res.result || [];
rebuildJsList();

View File

@ -74,7 +74,7 @@
<script setup lang="ts">
import JsPicker from "@/pages/components/JsPicker/index.vue";
import { getPkkbByJsRangeTimeApi } from "@/api/base/qjApi";
import { getPkkbByJsRangeTimeApi } from "@/api/base/jsQjApi";
import { useUserStore } from "@/store/modules/user";
const { getJs } = useUserStore();
@ -196,15 +196,35 @@ const changeJs = (selected: any, item: any) => {
item.dkJsName = selected.label;
}
const validate = async () => {
//
if (!dkList.value || !dkList.value.length) {
await getPkkbList();
}
const list = dkList.value;
// true
if (!list || !list.length) {
return true;
}
//
for (let i = 0; i < list.length; i++) {
const item = list[i];
if (!item.dkJsId) {
return false;
}
}
return true;
}
// ref
function getDkList() {
const getDkList = () => {
return dkList.value;
}
//
defineExpose({
getPkkbList,
validate,
getDkList
});
</script>

View File

@ -22,7 +22,7 @@
import JsQjDkEdit from "./jsQjDkEdit.vue"
import { navigateBack } from "@/utils/uniapp";
import { useForm } from "@/components/BasicForm/hooks/useForm";
import { jsQjSqApi } from "@/api/base/qjApi";
import { jsQjSqApi } from "@/api/base/jsQjApi";
import { showToast } from "@/utils/uniapp";
import dayjs from "dayjs";
import { useUserStore } from "@/store/modules/user";
@ -199,19 +199,42 @@ const submit = async () => {
return;
}
const params = { ...fd };
if (fd.dkfs === 0) {
const flag = await dkRef.value.validate();
if (!flag) {
uni.showToast({
title: "请选择代课教师",
icon: "none",
});
return;
}
let dkList = dkRef.value.getDkList() || [];
if (dkList.length) {
params.dkList = dkList.map((item: any) => {
const newItem = {...item};
newItem.jsId = item.dkJsId;
newItem.jsName = item.dkJsName;
newItem.pkkbId = item.id;
newItem.dktime = item.dktime + " " + item.startTime + ":00";
newItem.id = "";
newItem.qjId = "";
return newItem;
});
} else {
params.dkList = [];
}
}
if (props.data && props.data.id) {
params.id = props.data.id;
} else {
params.id = null;
params.jsId = getJs.bzrId; // ID
params.xqId = getJs.xqId; // ID
params.jsId = getJs.id;
}
params.flag = 2;
uni.showLoading({ title: "提交中..." });
await jsQjSqApi(params).then(() => {
showToast({ title: "提交成功", icon: "success" });
uni.reLaunch({
url: "/pages/base/home/index"
url: "/pages/base/service/index"
});
});
uni.hideLoading();

View File

@ -34,7 +34,7 @@
<script setup lang="ts">
import { useLayout } from "@/components/BasicListLayout/hooks/useLayout";
import { findQjListApi } from "@/api/base/qjApi";
import { findQjListApi } from "@/api/base/jsQjApi";
import { useUserStore } from "@/store/modules/user";
import { useDataStore } from "@/store/modules/data";
const { getJs } = useUserStore();
@ -54,7 +54,7 @@ const [register, { reload }] = useLayout({
//
const goToDetail = (item: any | null) => {
setData(item);
let url = '/pages/view/hr/qj/detail'; // 使
let url = '/pages/view/hr/jsQj/detail'; // 使
uni.navigateTo({ url });
};
</script>

View File

@ -30,7 +30,7 @@
</template>
<script setup lang="ts">
import { getQjActivitiHistoryApi } from "@/api/base/qjApi";
import { getQjActivitiHistoryApi } from "@/api/base/jsQjApi";
//
const props = withDefaults(defineProps<{
procInstId: string

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import { findQjById } from '@/api/base/qjApi';
import { findQjById } from '@/api/base/jsQjApi';
import { onLoad } from '@dcloudio/uni-app';
import { useDataStore } from "@/store/modules/data";
const { setData } = useDataStore();

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import { findQjById } from '@/api/base/qjApi';
import { findQjById } from '@/api/base/jsQjApi';
import { onLoad } from '@dcloudio/uni-app';
import { useDataStore } from "@/store/modules/data";
const { setData } = useDataStore();

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import { findQjById } from '@/api/base/qjApi';
import { findQjById } from '@/api/base/jsQjApi';
import { onLoad } from '@dcloudio/uni-app';
import { useDataStore } from "@/store/modules/data";
const { setData } = useDataStore();

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import { findQjById } from '@/api/base/qjApi';
import { findQjById } from '@/api/base/jsQjApi';
import { onLoad } from '@dcloudio/uni-app';
import { useDataStore } from "@/store/modules/data";
const { setData } = useDataStore();

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import { findQjById } from '@/api/base/qjApi';
import { findQjById } from '@/api/base/jsQjApi';
import { onLoad } from '@dcloudio/uni-app';
import { useDataStore } from "@/store/modules/data";
const { setData } = useDataStore();