调整自动更新消息待办状态,即业务数据有审批结果,则自动更新为已处理
This commit is contained in:
parent
a367b946b9
commit
f51548a299
@ -158,21 +158,6 @@ export const dbBlApi = async (params: any) => {
|
||||
return await post("/api/db/bl", params);
|
||||
};
|
||||
|
||||
// 获取消息推送列表(替代待办)
|
||||
export const xxtsListApi = async (params: any) => {
|
||||
return await get("/api/xxts/findPage", params);
|
||||
};
|
||||
|
||||
// 处理消息推送(替代待办处理)
|
||||
export const xxtsBlApi = async (params: any) => {
|
||||
return await post("/api/xxts/bl", params);
|
||||
};
|
||||
|
||||
// 根据ID获取消息推送详情
|
||||
export const xxtsFindByIdApi = async (params: any) => {
|
||||
return await get("/api/xxts/findById", params);
|
||||
};
|
||||
|
||||
// 查询学生请假信息
|
||||
export const xsQjFindByIdApi = async (params: any) => {
|
||||
return await get("/api/xsQj/getDetail", params);
|
||||
|
||||
@ -1,6 +1,16 @@
|
||||
import { get } from "@/utils/request";
|
||||
import { get, post } from "@/utils/request";
|
||||
|
||||
// 根据ID获取消息推送详情
|
||||
export const xxtsFindByIdApi = async (params: any) => {
|
||||
return await get("/api/xxts/findById", params);
|
||||
};
|
||||
|
||||
// 获取消息推送列表(替代待办)
|
||||
export const xxtsListApi = async (params: any) => {
|
||||
return await get("/api/xxts/findPage", params);
|
||||
};
|
||||
|
||||
// 添加更新消息推送
|
||||
export const xxtsSaveApi = async (params: any) => {
|
||||
return await post("/api/xxts/save", params);
|
||||
};
|
||||
@ -43,7 +43,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref, onMounted, onActivated} from "vue";
|
||||
import { useLayout } from "@/components/BasicListLayout/hooks/useLayout";
|
||||
import { xxtsListApi } from "@/api/base/server";
|
||||
import { xxtsListApi } from "@/api/base/xxtsApi";
|
||||
import { getTimeAgo } from "@/utils/dateUtils";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
|
||||
@ -77,7 +77,7 @@ import { xsQjFindByIdApi, xsQjSpApi } from "@/api/base/server";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
import { ref, nextTick } from "vue";
|
||||
import { xxtsFindByIdApi } from "@/api/base/server";
|
||||
import { xxtsFindByIdApi } from "@/api/base/xxtsApi";
|
||||
|
||||
const { getJs, loginByOpenId } = useUserStore();
|
||||
const { getData, setXxts, setData, getXxts } = useDataStore();
|
||||
@ -197,6 +197,9 @@ onLoad(async (data: any) => {
|
||||
|
||||
// 根据主表ID去查询学生请假信息
|
||||
const res = await xsQjFindByIdApi({ id: xxts.xxzbId });
|
||||
const xsQj = res.result || {};
|
||||
// TODO: 判断是否需要更新待办状态
|
||||
|
||||
nextTick(() => {
|
||||
setData(res.result);
|
||||
});
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
</view>
|
||||
<template #bottom>
|
||||
<YwConfirm :api="xkTfSpApi" :params="spParams"
|
||||
@summit="submit" @reject="handleReject" />
|
||||
@summit="submit" @reject="handleReject" v-if="xkTf.id" />
|
||||
</template>
|
||||
</BasicLayout>
|
||||
</template>
|
||||
@ -35,6 +35,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
import { imagUrl } from "@/utils";
|
||||
import XkPayXs from "../components/XkPayXs/index.vue"
|
||||
import XkPaySuccessXkkc from "../components/XkPaySuccessXkkc/index.vue"
|
||||
@ -44,6 +45,7 @@ import YwConfirm from "@/pages/components/YwConfirm/index.vue";
|
||||
import { getXkTfDetailByIdApi, xkTfSpApi } from "@/api/base/xkTfApi";
|
||||
import { XkTfPageUtils } from "@/utils/xkTfPageUtils";
|
||||
const { getJs } = useUserStore();
|
||||
const { setTf, getXxts } = useDataStore();
|
||||
|
||||
const curXs = ref<any>({});
|
||||
const xkTf = ref<any>({});
|
||||
@ -87,9 +89,16 @@ const loadData = async (id: string) => {
|
||||
uni.showToast({ title: '未找到数据', icon: 'none' });
|
||||
goHome();
|
||||
}
|
||||
const data = res.result || {};
|
||||
if (data.xkTf && data.xkTf.spResult != "A" && getXxts && getXxts.dbZt === "A") {
|
||||
setTf(data);
|
||||
uni.reLaunch({ url: '/pages/view/routine/xk/tf/detail' });
|
||||
const flag = await XkTfPageUtils.updateXxts();
|
||||
} else {
|
||||
nextTick(() => {
|
||||
initData(res.result.xkTf, res.result.xs, res.result.xkTfQdList);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const submit = async () => {
|
||||
@ -106,6 +115,7 @@ onLoad(async (data?: any) => {
|
||||
if (!ret || !ret.success) {
|
||||
return;
|
||||
}
|
||||
xkTf.value = {};
|
||||
xkTfId.value = ret.xkTfId;
|
||||
dbFlag.value = ret.dbFlag;
|
||||
await loadData(xkTfId.value);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { xxtsFindByIdApi } from "@/api/base/server";
|
||||
import { xxtsFindByIdApi, xxtsSaveApi } from "@/api/base/xxtsApi";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
|
||||
@ -6,6 +6,7 @@ const { loginByOpenId } = useUserStore();
|
||||
const { getData, setXxts, setData, getXxts } = useDataStore();
|
||||
|
||||
export const QjPageUtils = {
|
||||
// 初始化校验
|
||||
async init(data?: any) {
|
||||
let ret = {
|
||||
success: true,
|
||||
@ -60,5 +61,18 @@ export const QjPageUtils = {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 检查待办状态是否需要更新
|
||||
async updateXxts() {
|
||||
// 如果没有查询过消息推送,表示不是从待办进入的,不自动更新,
|
||||
if (!getXxts || !getXxts.id) {
|
||||
return false;
|
||||
}
|
||||
// 更新待办状态
|
||||
await xxtsSaveApi({
|
||||
id: getXxts.id,
|
||||
dbZt: "B",
|
||||
});
|
||||
return true;
|
||||
},
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
import { xxtsFindByIdApi } from "@/api/base/server";
|
||||
import { xxtsFindByIdApi, xxtsSaveApi } from "@/api/base/xxtsApi";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
|
||||
@ -6,6 +6,7 @@ const { loginByOpenId } = useUserStore();
|
||||
const { getData, setXxts, setData, getXxts } = useDataStore();
|
||||
|
||||
export const XkTfPageUtils = {
|
||||
// 初始化校验
|
||||
async init(data?: any) {
|
||||
let ret = {
|
||||
success: true,
|
||||
@ -60,5 +61,18 @@ export const XkTfPageUtils = {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 检查待办状态是否需要更新
|
||||
async updateXxts() {
|
||||
// 如果没有查询过消息推送,表示不是从待办进入的,不自动更新,
|
||||
if (!getXxts || !getXxts.id) {
|
||||
return false;
|
||||
}
|
||||
// 更新待办状态
|
||||
await xxtsSaveApi({
|
||||
id: getXxts.id,
|
||||
dbZt: "B",
|
||||
});
|
||||
return true;
|
||||
},
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user