diff --git a/src/components/LcglSpList/index.vue b/src/components/LcglSpList/index.vue index 98dd224..516125e 100644 --- a/src/components/LcglSpList/index.vue +++ b/src/components/LcglSpList/index.vue @@ -48,9 +48,9 @@ import { getByYwIdAndYwTypeApi } from "@/api/base/lcglSpApi"; const props = withDefaults(defineProps<{ ywId: string, ywType: string, - showSqr: boolean, - showSpr: boolean, - showCsr: boolean, + showSqr?: boolean, + showSpr?: boolean, + showCsr?: boolean, }>(), { ywId: '', ywType: '', diff --git a/src/pages.json b/src/pages.json index 3b6a22a..355cc1d 100644 --- a/src/pages.json +++ b/src/pages.json @@ -561,6 +561,20 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/view/routine/xk/tf/detail", + "style": { + "navigationBarTitleText": "选课退费详情", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/view/routine/xk/tf/sp", + "style": { + "navigationBarTitleText": "选课退费审批", + "enablePullDownRefresh": false + } + }, { "path": "pages/view/routine/kefuxuncha/xcRecord", "style": { diff --git a/src/pages/view/routine/xk/components/XkPaySuccessXkkc/index.vue b/src/pages/view/routine/xk/components/XkPaySuccessXkkc/index.vue new file mode 100644 index 0000000..3aedf99 --- /dev/null +++ b/src/pages/view/routine/xk/components/XkPaySuccessXkkc/index.vue @@ -0,0 +1,146 @@ + + + + + \ No newline at end of file diff --git a/src/pages/view/routine/xk/components/XkPayXs/index.vue b/src/pages/view/routine/xk/components/XkPayXs/index.vue new file mode 100644 index 0000000..81ed846 --- /dev/null +++ b/src/pages/view/routine/xk/components/XkPayXs/index.vue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file diff --git a/src/pages/view/routine/xk/tf/detail.vue b/src/pages/view/routine/xk/tf/detail.vue index 8183fd0..f1ff0fa 100644 --- a/src/pages/view/routine/xk/tf/detail.vue +++ b/src/pages/view/routine/xk/tf/detail.vue @@ -1,22 +1,179 @@ - - diff --git a/src/pages/view/routine/xk/tf/sp.vue b/src/pages/view/routine/xk/tf/sp.vue index 8183fd0..e7bf72c 100644 --- a/src/pages/view/routine/xk/tf/sp.vue +++ b/src/pages/view/routine/xk/tf/sp.vue @@ -1,22 +1,210 @@ - - + .xkTf-card { + margin: 15px; + background-color: #fff; + border-radius: 8px; + padding: 15px; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); + + .card-body { + + .info-row { + display: flex; + margin-bottom: 10px; + + .label { + font-size: 14px; + color: #bbb; + width: 70px; + flex-shrink: 0; + margin-right: 8px; + } + + .value { + font-size: 14px; + color: #333; + flex: 1; + } + } + + .info-column { + display: flex; + flex-direction: column; + + .label { + font-size: 14px; + color: #bbb; + flex-shrink: 0; + margin-right: 8px; + width: 100%; + margin-bottom: 5px; + } + + .value { + font-size: 14px; + color: #333; + flex: 1; + margin-bottom: 10px; + } + } + } + } +} + \ No newline at end of file diff --git a/src/static/base/home/11222.png b/src/static/base/home/11222.png new file mode 100644 index 0000000..016e726 Binary files /dev/null and b/src/static/base/home/11222.png differ diff --git a/src/store/modules/data.ts b/src/store/modules/data.ts index 8c5ad4d..125d3f5 100644 --- a/src/store/modules/data.ts +++ b/src/store/modules/data.ts @@ -10,6 +10,7 @@ export const useDataStore = defineStore({ file: {}, xs: {}, // 学生专用 jcBz: {}, // 就餐标准 + tf: {} }), getters: { getData(): any { @@ -33,6 +34,9 @@ export const useDataStore = defineStore({ getJcBz(): any { return this.jcBz; }, + getTf(): any { + return this.tf; + }, }, actions: { setData(data: any) { @@ -55,6 +59,9 @@ export const useDataStore = defineStore({ }, setJcBz(data: any) { this.jcBz = data; + }, + setTf(data: any) { + this.tf = data; } }, persist: { diff --git a/src/utils/xkTfPageUtils.ts b/src/utils/xkTfPageUtils.ts new file mode 100644 index 0000000..68aad25 --- /dev/null +++ b/src/utils/xkTfPageUtils.ts @@ -0,0 +1,64 @@ +import { xxtsFindByIdApi } from "@/api/base/server"; +import { useUserStore } from "@/store/modules/user"; +import { useDataStore } from "@/store/modules/data"; + +const { loginByOpenId } = useUserStore(); +const { getData, setXxts, setData, getXxts } = useDataStore(); + +export const XkTfPageUtils = { + async init(data?: any) { + let ret = { + success: true, + dbFlag: false, + xkTfId: getData.id, + }; + if (!data || !data.from || data.from != "db") { + return ret; + } + // 从待办过来的,需要从后端获取数据 + ret.dbFlag = true; + // 检查登录状态 + const isLoggedIn = await loginByOpenId(data.openId); + if (!isLoggedIn) { + console.log("用户未登录,跳过处理"); + ret.success = false; + return ret; + } + let url = "/pages/base/message/index"; + try { + // 优先从后端根据url中的id去查询Xxts + const xxtsRes = await xxtsFindByIdApi({ id: data.id }); + if (xxtsRes && xxtsRes.result) { + const xxts = xxtsRes.result; + // 检查待办状态 + if (xxts.dbZt === "B") { + setData({ id: xxts.xxzbId }); + url = "/pages/view/routine/xk/tf/detail"; + uni.reLaunch({ url }); + ret.success = false; + } else { + setXxts(xxts); + ret.xkTfId = xxts.xxzbId; + } + } else { + uni.showToast({ + title: "获取消息推送数据失败", + icon: "error", + }); + uni.reLaunch({ url }); + ret.success = false; + } + return ret; + } catch (error) { + console.error("获取待办信息失败", error); + // 如果获取Xxts失败,回退到原来的逻辑 + const xxtsData = getXxts; + if (xxtsData && xxtsData.dbZt === "B") { + setData({ id: data.id }); + uni.reLaunch({ url }); + ret.success = false; + return ret; + } + } + } +} \ No newline at end of file