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