调整请假流程
This commit is contained in:
parent
aaf1360f03
commit
2bf0fc57d8
@ -17,6 +17,13 @@ export const jsQjSpApi = async (params: any) => {
|
||||
return await post("/api/jsQj/sp", params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 重新提交
|
||||
*/
|
||||
export const jsQjCxtjApi = async (params: any) => {
|
||||
return await post("/api/jsQj/cxtj", params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 教务处确认
|
||||
*/
|
||||
|
||||
@ -256,12 +256,15 @@ const goToDetail = (data: any) => {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1 0 1px;
|
||||
width: 100%;
|
||||
width: 60px;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
padding: 0 10px;
|
||||
|
||||
&.db-xs-qj {
|
||||
background-color: #447ade;
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
|
||||
<view class="teacher-details">
|
||||
<view class="teacher-name">{{ js.jsxm }}</view>
|
||||
<view class="teacher-position">{{ js.dzzw }} {{ js.qtzw }}</view>
|
||||
<view class="teacher-position">{{ dzZwLabel }}</view>
|
||||
<view class="teacher-position">{{ qtZwLabel }}</view>
|
||||
<view class="teacher-class">{{ js.njz }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -89,17 +90,22 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { jsdfindJsByPhoneApi } from "@/api/base/server";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
import { useCommonStore } from "@/store/modules/common";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { imagUrl } from "@/utils";
|
||||
import { hideLoading, showLoading } from "@/utils/uniapp";
|
||||
import { set } from "lodash";
|
||||
import { reactive, ref } from "vue";
|
||||
const { logout, getUser, getJs, setJs } = useUserStore();
|
||||
const { getZwListByLx } = useCommonStore();
|
||||
|
||||
const jsTx = computed(() => imagUrl(getUser.profilePhoto));
|
||||
|
||||
const js = computed(() => getJs);
|
||||
|
||||
const dzZwLabel = ref<any>("");
|
||||
const qtZwLabel = ref<any>("");
|
||||
|
||||
// 教师工作信息
|
||||
const jsWork = ref<any>({
|
||||
jf: 88,
|
||||
@ -348,6 +354,33 @@ const handleGridItemClick = async (item: GridItem) => {
|
||||
}
|
||||
}, 200);
|
||||
};
|
||||
|
||||
// 初始化
|
||||
onMounted(async () => {
|
||||
let dzZw: any = [];
|
||||
let qtZw: any = [];
|
||||
if (getJs.dzzw && typeof getJs.dzzw == "string") {
|
||||
dzZw = getJs.dzzw.split(",");
|
||||
}
|
||||
if (getJs.qtzw && typeof getJs.qtzw == "string") {
|
||||
qtZw = getJs.qtzw.split(",");
|
||||
}
|
||||
if (dzZw && dzZw.length){
|
||||
const res = await getZwListByLx({ zwlx: '党政职务' });
|
||||
dzZwLabel.value = dzZw.map((zwId: string) => {
|
||||
const zw = res.result.find((zw: any) => zwId == zw.id);
|
||||
return zw ? zw.zwmc : '';
|
||||
}).join(', ');
|
||||
};
|
||||
if (qtZw && qtZw.length){
|
||||
const res = await getZwListByLx({ zwlx: '其他职务' });
|
||||
qtZwLabel.value = qtZw.map((zwId: string) => {
|
||||
const zw = res.result.find((zw: any) => zwId == zw.id);
|
||||
return zw ? zw.zwmc : '';
|
||||
}).join(', ');
|
||||
};
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -88,7 +88,7 @@ const [register, { getValue }] = useForm({
|
||||
},
|
||||
componentProps: {
|
||||
data: [
|
||||
{ value: 0, text: "同意" },
|
||||
{ value: 2, text: "同意" },
|
||||
{ value: 1, text: "拒绝" },
|
||||
],
|
||||
},
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="qjData.dkfs != 2">
|
||||
<view class="" v-if="qjData.dkfs != 2 && dkList && dkList.length">
|
||||
<view class="dk-title pl-15 pr-15">
|
||||
<BasicTitle line title="代课明细" :isBorder="false" />
|
||||
</view>
|
||||
@ -85,10 +85,8 @@
|
||||
<script setup lang="ts">
|
||||
import ProgressList from "./progressList.vue"
|
||||
import { findQjById, findDkPageApi } from "@/api/base/jsQjApi";
|
||||
import { showToast } from "@/utils/uniapp";
|
||||
import { useDicStore } from "@/store/modules/dic";
|
||||
import { update } from "lodash";
|
||||
const { findByPid } = useDicStore();
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
const { getDb } = useDataStore();
|
||||
|
||||
// 接收外部传入属性
|
||||
const props = withDefaults(defineProps<{
|
||||
@ -142,6 +140,9 @@ const init = async () => {
|
||||
return item;
|
||||
});
|
||||
}
|
||||
if (props.dbFlag) {
|
||||
qjData.value.dbZy = getDb.dbZy;
|
||||
}
|
||||
};
|
||||
|
||||
// 初始化
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<BasicIcon type="refreshempty" size="25" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="dk-tabs mb-10">
|
||||
<view class="dk-tabs mb-10" v-if="dkList && dkList.length">
|
||||
<BasicTabs class="type-tabs"
|
||||
ref="tabsRef" :list="tabList" bar-width="60px" scroll-count="4"
|
||||
:current="curTabIndex" @change="switchTab"
|
||||
|
||||
@ -22,12 +22,11 @@
|
||||
import JsQjDkEdit from "./jsQjDkEdit.vue"
|
||||
import { navigateBack } from "@/utils/uniapp";
|
||||
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
||||
import { jsQjSqApi } from "@/api/base/jsQjApi";
|
||||
import { jsQjSqApi, jsQjCxtjApi } from "@/api/base/jsQjApi";
|
||||
import { showToast } from "@/utils/uniapp";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDicStore } from "@/store/modules/dic";
|
||||
import { update } from "lodash";
|
||||
const { getJs, getUser } = useUserStore();
|
||||
const { findByPid } = useDicStore();
|
||||
|
||||
@ -224,15 +223,17 @@ const submit = async () => {
|
||||
params.dkList = [];
|
||||
}
|
||||
}
|
||||
let submitApi = jsQjSqApi;
|
||||
if (props.data && props.data.id) {
|
||||
params.id = props.data.id;
|
||||
submitApi = jsQjCxtjApi
|
||||
} else {
|
||||
params.id = null;
|
||||
params.jsId = getJs.id;
|
||||
params.jsName = getJs.jsxm;
|
||||
}
|
||||
uni.showLoading({ title: "提交中..." });
|
||||
await jsQjSqApi(params).then(() => {
|
||||
await submitApi(params).then(() => {
|
||||
showToast({ title: "提交成功", icon: "success" });
|
||||
uni.reLaunch({
|
||||
url: "/pages/base/service/index"
|
||||
|
||||
@ -1,17 +1,20 @@
|
||||
<template>
|
||||
<view class="leave-page">
|
||||
重新提交
|
||||
<JsQjEdit :data="qjData" v-if="qjData.id" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import JsQjEdit from "./components/jsQjEdit.vue"
|
||||
import { findQjById } from '@/api/base/jsQjApi';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
const { setData } = useDataStore();
|
||||
const { setData, getData } = useDataStore();
|
||||
|
||||
const dbFlag = ref(false);
|
||||
|
||||
const qjData = computed(() => getData);
|
||||
|
||||
onLoad(async (data: any) => {
|
||||
// 从待办过来的,需要从后端获取数据
|
||||
if (data && data.from && data.from == "db") {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<BasicLayout>
|
||||
<JsQjDetail :qjId="qjId" :dbFlag="false" />
|
||||
<JsQjDetail :qjId="qjId" :dbFlag="dbFlag" />
|
||||
</BasicLayout>
|
||||
</template>
|
||||
|
||||
|
||||
@ -1,33 +1,97 @@
|
||||
<template>
|
||||
<view class="leave-page">
|
||||
教务处确认
|
||||
</view>
|
||||
<BasicLayout>
|
||||
<JsQjDetail :qjId="qjId" :dbFlag="dbFlag" v-if="qjId && qjId.length" />
|
||||
<template #bottom>
|
||||
<view class="white-bg-color py-5">
|
||||
<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="ml-7 mr-7"
|
||||
:plain="true"
|
||||
@click="navigateBack"
|
||||
/>
|
||||
<u-button
|
||||
text="同意"
|
||||
class="mr-15 mr-7"
|
||||
type="primary"
|
||||
@click="submit"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</BasicLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { findQjById } from '@/api/base/jsQjApi';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import JsQjDetail from "./components/jsQjDetail.vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { navigateBack } from "@/utils/uniapp";
|
||||
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
||||
import { jsQjSpApi } from '@/api/base/jsQjApi';
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
const { setData } = useDataStore();
|
||||
const { getJs } = useUserStore();
|
||||
const { getData } = useDataStore();
|
||||
|
||||
const dbFlag = ref(false);
|
||||
|
||||
const qjId = ref<string>();
|
||||
|
||||
const [register, { getValue }] = useForm({
|
||||
schema: [
|
||||
{
|
||||
field: "spStatus",
|
||||
label: "审批意见",
|
||||
component: "BasicCheckbox",
|
||||
required: true,
|
||||
componentProps: {
|
||||
data: [
|
||||
{ value: 2, text: "同意" },
|
||||
{ value: 1, text: "拒绝" },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "spYj",
|
||||
label: "审批说明",
|
||||
component: "BasicInput",
|
||||
required: true,
|
||||
itemProps: {
|
||||
labelPosition: "top",
|
||||
},
|
||||
componentProps: {
|
||||
type: "textarea",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const submit = async () => {
|
||||
const data = await getValue();
|
||||
const params = { ...data };
|
||||
params.qjId = qjId.value;
|
||||
params.jsId = getJs.id;
|
||||
uni.showLoading({ title: "审批中..." });
|
||||
await jsQjSpApi(params);
|
||||
uni.hideLoading();
|
||||
navigateBack();
|
||||
};
|
||||
|
||||
onLoad(async (data: any) => {
|
||||
// 从待办过来的,需要从后端获取数据
|
||||
if (data && data.from && data.from == "db") {
|
||||
qjId.value = data.id;
|
||||
dbFlag.value = true;
|
||||
const res = await findQjById({ id: data.id });
|
||||
nextTick(() => {
|
||||
setData(res.result);
|
||||
});
|
||||
} else {
|
||||
qjId.value = getData.id;
|
||||
dbFlag.value = false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.leave-page {
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</script>
|
||||
|
||||
@ -1,33 +1,92 @@
|
||||
<template>
|
||||
<view class="leave-page">
|
||||
负责人审批
|
||||
</view>
|
||||
<BasicLayout>
|
||||
<JsQjDetail :qjId="qjId" :dbFlag="dbFlag" v-if="qjId && qjId.length" />
|
||||
<template #bottom>
|
||||
<view class="white-bg-color py-5">
|
||||
<view class="divider"></view>
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
</BasicLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { findQjById } from '@/api/base/jsQjApi';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import JsQjDetail from "./components/jsQjDetail.vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { navigateBack } from "@/utils/uniapp";
|
||||
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
||||
import { jsQjSpApi } from '@/api/base/jsQjApi';
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
const { setData } = useDataStore();
|
||||
const { getJs } = useUserStore();
|
||||
const { getData } = useDataStore();
|
||||
|
||||
const dbFlag = ref(false);
|
||||
|
||||
const qjId = ref<string>();
|
||||
|
||||
const [register, { getValue }] = useForm({
|
||||
schema: [
|
||||
{
|
||||
field: "spStatus",
|
||||
label: "审批意见",
|
||||
component: "BasicCheckbox",
|
||||
required: true,
|
||||
componentProps: {
|
||||
data: [
|
||||
{ value: 2, text: "同意" },
|
||||
{ value: 1, text: "拒绝" },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "spYj",
|
||||
label: "审批说明",
|
||||
component: "BasicInput",
|
||||
required: true,
|
||||
itemProps: {
|
||||
labelPosition: "top",
|
||||
},
|
||||
componentProps: {
|
||||
type: "textarea",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const submit = async () => {
|
||||
const data = await getValue();
|
||||
const params = { ...data };
|
||||
params.qjId = qjId.value;
|
||||
params.jsId = getJs.id;
|
||||
uni.showLoading({ title: "审批中..." });
|
||||
await jsQjSpApi(params);
|
||||
uni.hideLoading();
|
||||
navigateBack();
|
||||
};
|
||||
|
||||
onLoad(async (data: any) => {
|
||||
// 从待办过来的,需要从后端获取数据
|
||||
if (data && data.from && data.from == "db") {
|
||||
qjId.value = data.id;
|
||||
dbFlag.value = true;
|
||||
const res = await findQjById({ id: data.id });
|
||||
nextTick(() => {
|
||||
setData(res.result);
|
||||
});
|
||||
} else {
|
||||
qjId.value = getData.id;
|
||||
dbFlag.value = false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.leave-page {
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</script>
|
||||
|
||||
@ -57,6 +57,7 @@ export const useCommonStore = defineStore({
|
||||
// 根据职务类型获取职务列表
|
||||
async getZwListByLx(params: any): Promise<any> {
|
||||
if (!this.data.zw || !this.data.zw[params.zwlx]) {
|
||||
this.data.zw = this.data.zw || {};
|
||||
this.data.zw[params.zwlx] = await zwGetListByLxApi(params);
|
||||
}
|
||||
return Promise.resolve(this.data.zw[params.zwlx]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user