调整教师请假单独使用
This commit is contained in:
parent
2d2314c336
commit
fc7578aae2
@ -61,13 +61,13 @@ import YwConfirm from "@/pages/components/YwConfirm/index.vue";
|
||||
import { XkTfPageUtils } from "@/utils/xkTfPageUtils";
|
||||
|
||||
const { getJs, loginByOpenId } = useUserStore();
|
||||
const { getData, setXxts, setData, getXxts } = useDataStore();
|
||||
const { getQjData, setXxts, setQjData, getXxts } = useDataStore();
|
||||
|
||||
const dbFlag = ref(false);
|
||||
|
||||
// 从URL参数获取请假ID
|
||||
const qjId = computed(() => {
|
||||
return getData.id || '';
|
||||
return getQjData.id || '';
|
||||
})
|
||||
|
||||
const spParams = computed(() => {
|
||||
@ -78,7 +78,7 @@ const spParams = computed(() => {
|
||||
});
|
||||
|
||||
// 请假基础数据
|
||||
const qjData = computed(() => getData || {});
|
||||
const qjData = computed(() => getQjData || {});
|
||||
const xxtsData = ref<any>({})
|
||||
|
||||
onLoad(async (data: any) => {
|
||||
@ -101,7 +101,7 @@ onLoad(async (data: any) => {
|
||||
xxtsData.value = xxts;
|
||||
// 检查待办状态
|
||||
if (xxts.dbZt === "B") {
|
||||
setData({ id: xxts.xxzbId });
|
||||
setQjData({ id: xxts.xxzbId });
|
||||
let url = "/pages/base/xs/qj/detail";
|
||||
uni.navigateTo({ url });
|
||||
return;
|
||||
@ -116,7 +116,7 @@ onLoad(async (data: any) => {
|
||||
const flag = await XkTfPageUtils.updateXxts();
|
||||
} else {
|
||||
nextTick(() => {
|
||||
setData(xsQj);
|
||||
setQjData(xsQj);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -125,14 +125,14 @@ onLoad(async (data: any) => {
|
||||
// 如果获取Xxts失败,回退到原来的逻辑
|
||||
const xxtsData = getXxts;
|
||||
if (xxtsData && xxtsData.dbZt === "B") {
|
||||
setData({ id: data.id });
|
||||
setQjData({ id: data.id });
|
||||
let url = "/pages/base/xs/qj/detail";
|
||||
uni.navigateTo({ url });
|
||||
return;
|
||||
}
|
||||
const res = await xsQjFindByIdApi({ id: data.id });
|
||||
nextTick(() => {
|
||||
setData(res.result);
|
||||
setQjData(res.result);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
import { ref } from "vue";
|
||||
import JsQjDkEdit from "./jsQjDkEdit.vue";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
const { getData } = useDataStore();
|
||||
const { getQjData } = useDataStore();
|
||||
|
||||
// 定义一个上级传入的emit响应事件用于接收数据变更
|
||||
const emit = defineEmits(["submit"]);
|
||||
@ -38,7 +38,7 @@ const dkRef = ref<any>(null);
|
||||
const dlgFlag = ref(false);
|
||||
const spRemark = ref("");
|
||||
const qjData = computed(() => {
|
||||
return getData;
|
||||
return getQjData;
|
||||
});
|
||||
|
||||
const showDlg = (type: string) => {
|
||||
|
||||
@ -38,7 +38,7 @@ import { findQjListApi } from "@/api/base/jsQjApi";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
const { getJs } = useUserStore();
|
||||
const { setData } = useDataStore();
|
||||
const { setQjData } = useDataStore();
|
||||
|
||||
let pageParams = ref({
|
||||
rows: 10,
|
||||
@ -53,7 +53,7 @@ const [register, { reload }] = useLayout({
|
||||
|
||||
// 查看详情或新增处理函数
|
||||
const goToDetail = (item: any | null) => {
|
||||
setData({
|
||||
setQjData({
|
||||
...item,
|
||||
from: 'list'
|
||||
});
|
||||
|
||||
@ -39,7 +39,7 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||
import { QjPageUtils } from "@/utils/qjPageUtils";
|
||||
import { xxtsFindByIdApi } from "@/api/base/xxtsApi";
|
||||
|
||||
const { getData, setData, getXxts } = useDataStore();
|
||||
const { getQjData, setQjData, getXxts } = useDataStore();
|
||||
|
||||
const dbFlag = ref(false);
|
||||
const qjId = ref('');
|
||||
@ -51,7 +51,7 @@ const handleQjDataLoaded = (data: any) => {
|
||||
if (data.spResult != "A" && getXxts && getXxts.dbZt === "A") {
|
||||
QjPageUtils.updateXxts();
|
||||
}
|
||||
setData(data);
|
||||
setQjData(data);
|
||||
const dkfs = typeof (data.dkfs) === "string" ? parseInt(data.dkfs) : (data.dkfs || 2);
|
||||
const bpmStatus = typeof (data.bpmStatus) === "string" ? parseInt(data.bpmStatus) : (data.bpmStatus || 1);
|
||||
showDkFlag.value = dkfs === 0 || (dkfs === 1 && bpmStatus > 4);
|
||||
@ -67,17 +67,17 @@ const handleDkListLoaded = (list: any[]) => {
|
||||
};
|
||||
|
||||
const goHome = () => {
|
||||
setData({});
|
||||
setQjData({});
|
||||
uni.reLaunch({
|
||||
url: '/pages/base/service/index',
|
||||
});
|
||||
};
|
||||
|
||||
onLoad(async (data) => {
|
||||
if (getData && getData.id && (
|
||||
getData.from === "xxts-B" || getData.from === "list"
|
||||
if (getQjData && getQjData.id && (
|
||||
getQjData.from === "xxts-B" || getQjData.from === "list"
|
||||
)) {
|
||||
qjId.value = getData.id;
|
||||
qjId.value = getQjData.id;
|
||||
// 从列表推送过来和消息推送过来的,跳过其他处理
|
||||
return;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ import LcglSp from "@/components/LcglSp/index.vue";
|
||||
import { QjPageUtils } from "@/utils/qjPageUtils";
|
||||
|
||||
const { getJs } = useUserStore();
|
||||
const { setData, getXxts } = useDataStore();
|
||||
const { setQjData, getXxts } = useDataStore();
|
||||
|
||||
|
||||
const dbFlag = ref(false);
|
||||
@ -99,7 +99,7 @@ const spParams = computed(() => {
|
||||
|
||||
const handleQjDataLoaded = async (data: any) => {
|
||||
data = data || {};
|
||||
setData(data);
|
||||
setQjData(data);
|
||||
if (data.spResult != "A" && getXxts && getXxts.dbZt === "A") {
|
||||
uni.reLaunch({ url: '/pages/base/xs/qj/detail' });
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { get } from "lodash";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
export const useDataStore = defineStore({
|
||||
@ -12,6 +13,7 @@ export const useDataStore = defineStore({
|
||||
jcBz: {}, // 就餐标准
|
||||
tf: {}, // 退费时使用
|
||||
lcgl: {}, // 流程管理使用
|
||||
qjData: {}, // 请假数据
|
||||
}),
|
||||
getters: {
|
||||
getData(): any {
|
||||
@ -40,7 +42,10 @@ export const useDataStore = defineStore({
|
||||
},
|
||||
getLcgl(): any {
|
||||
return this.lcgl;
|
||||
},
|
||||
},
|
||||
getQjData(): any {
|
||||
return this.qjData;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setData(data: any) {
|
||||
@ -69,7 +74,10 @@ export const useDataStore = defineStore({
|
||||
},
|
||||
setLcgl(data: any) {
|
||||
this.lcgl = data;
|
||||
}
|
||||
},
|
||||
setQjData(data: any) {
|
||||
this.qjData = data;
|
||||
},
|
||||
},
|
||||
persist: {
|
||||
enabled: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user