提交 e96cbfc0 authored 作者: lidongxu's avatar lidongxu

refactor(mobile/router/index.js): 修改:勤策App_路由子页面的路由路径改变

上级 571a7413
......@@ -130,7 +130,7 @@ const handleCreateTask = () => {
})
// 校验通过,跳到稽查任务详情页
router.push({
path: '/inspectionTask',
path: '/audit_activity/inspectionTask',
query: {
rstId: res.data.rstId,
storeName: form.storeName,
......
......@@ -112,7 +112,7 @@ const handlerSearch = () => {
// 稽查记录
const clickRecord = () => {
router.push({
path: '/taskList'
path: '/audit_activity/taskList'
})
}
......@@ -126,7 +126,7 @@ const handleClickStore = (item) => {
cancelButtonText: '取消'
}).then(() => {
router.push({
path: '/inspectionTask',
path: '/audit_activity/inspectionTask',
query: {
storeName: item.storeName,
storeCode: item.storeCode,
......@@ -142,7 +142,7 @@ const handleClickStore = (item) => {
// 新建终端
const addNewTerminal = () => {
router.push({
path: '/newTerminal'
path: '/audit_activity/newTerminal'
})
}
</script>
......
......@@ -130,7 +130,7 @@ const resetFn = () => {
// 门店点击
const handleClickStore = (item) => {
router.push({
path: '/inspectionTask',
path: '/audit_activity/inspectionTask',
query: {
storeName: item.storeName,
storeCode: item.storeCode,
......
......@@ -213,7 +213,7 @@ getPlanDetail()
// 点击稽查按钮
const clickExamine = async () => {
if (examined.value) {
router.push({ path: `/examine/${examined.value}` })
router.push({ path: `/cp_activity/examine/${examined.value}` })
return
}
......@@ -240,7 +240,7 @@ const clickExamine = async () => {
}
newExamined.value = result.data.id
}
router.push({ path: `/examine/${examined?.value || newExamined.value}` })
router.push({ path: `/cp_activity/examine/${examined?.value || newExamined.value}` })
})
}
......
......@@ -110,7 +110,7 @@
:error-message="errorTemWlSctMessage">
<template #input>
<van-radio-group v-model="form.temWlSct"
@change="validatorTemWlSct"
@change="validatorTemWlSct"
direction="horizontal">
<van-radio icon-size="16px"
name="有"></van-radio>
......@@ -266,10 +266,9 @@ const init = async () => {
})
form.date = parseTime(new Date(form.date), "{y}-{m}-{d}")
form.inTime = parseTime(res.data.planInfo.clockInTime, "{h}:{i}").split(":")
form.noonInTime = parseTime(res.data.planInfo.noonClockInTime, "{h}:{i}").split(":")
form.noonOutTime = parseTime(res.data.planInfo.noonClockOutTime, "{h}:{i}").split(":")
form.noonInTime = res.data.planInfo.noonClockInTime ? parseTime(res.data.planInfo.noonClockInTime, "{h}:{i}").split(":") : []
form.noonOutTime = res.data.planInfo.noonClockOutTime ? parseTime(res.data.planInfo.noonClockOutTime, "{h}:{i}").split(":") : []
form.outTime = parseTime(res.data.planInfo.clockOutTime, "{h}:{i}").split(":")
editDealerId.value = res.data.planInfo.dealerId
}
if (planId) {
......
......@@ -105,7 +105,8 @@ const showSearch = ref(false)
// 从新增页面跳转回来需要刷新列表
watch(() => route.path, (newPath, oldPath) => {
if (oldPath.includes('/promotion_plan_editing') && newPath === '/promotion_plan') {
console.log(oldPath, newPath)
if (oldPath.includes('/cp_activity/promotion_plan_editing') && newPath === '/cp_activity/promotion_plan') {
planSearch.value.resetFn()
}
});
......@@ -184,8 +185,8 @@ const onRefresh = () => {
const clickDetail = (row) => {
// 当前处于长按状态 / 查看已删除列表,点击详情不做任何操作
if (showSelect.value || query.isDeleted) return
// router.push(`/promotion_plan_detail/${row.id}?isDeleted=${query.isDeleted}`)
router.push(`/promotion_plan_detail/${row.id}`)
// router.push(`/cp_activity/promotion_plan_detail/${row.id}?isDeleted=${query.isDeleted}`)
router.push(`/cp_activity/promotion_plan_detail/${row.id}`)
}
// 搜索表单
......@@ -204,7 +205,7 @@ const editPlan = (row) => {
if (!checkPlanChangeExpire(row)) {
return showNotify({ type: 'warning', message: '无法变更,日期小于等于今日' })
}
router.push(`/promotion_plan_editing/${row.id}`)
router.push(`/cp_activity/promotion_plan_editing/${row.id}`)
}
// 删除计划
......@@ -328,7 +329,7 @@ onUnmounted(() => {
const addNewPlan = () => {
// 后台设置按钮权限分配就能新增
if (proxy.checkPermi(['promotion:plan:create'])) {
router.push('/promotion_plan_editing')
router.push('/cp_activity/promotion_plan_editing')
} else {
showNotify({ type: 'warning', message: '规定日期内_无法新增计划' })
}
......
......@@ -14,6 +14,7 @@ export const constantMobileRoutes = [
path: '/m', // 勤策移动端内跳过来的地址是 /m,我们默认显示菜单页面
redirect: '/menu'
},
// 重点注意:菜单页面的按钮跳转的路由地址,是在后台管理系统配置的,不是在这里的,是需要在后台分配给某个人才有那个路由菜单的配置对象
{
path: '/',
component: () => import('@/views/mobile/index'),
......@@ -24,42 +25,43 @@ export const constantMobileRoutes = [
component: () => import('@/views/mobile/pages/menu'),
name: 'm_menu'
},
// CP 促销相关的子页面(暂未进行权限拦截,可以参考若依的 permissions 的字段限制)
{
path: 'promotion_plan_detail/:planId', // CP 促销计划,详情页
path: 'cp_activity/promotion_plan_detail/:planId', // CP 促销计划,详情页
component: () => import('@/views/mobile/pages/cp_activity/promotion/plan/detail'),
name: 'm_promotion_detail',
},
{
path: 'promotion_plan_editing/:planId?', // CP 促销计划,增加,修改
path: 'cp_activity/promotion_plan_editing/:planId?', // CP 促销计划,增加,修改
component: () => import('@/views/mobile/pages/cp_activity/promotion/plan/editing'),
name: 'm_promotion_editing',
},
{
path: 'examine/:examineId', // CP 促销计划,稽查
path: 'cp_activity/examine/:examineId', // CP 促销计划,稽查
component: () => import('@/views/mobile/pages/cp_activity/examine'),
name: 'm_promotion_examine',
},
// 售点稽查的子页面
{
path: 'logistics', // 物流信息页面
component: () => import('@/views/mobile/pages/other/logistics'),
name: 'logistics'
},
{
path: 'newTerminal', // 售点稽查_新建终端门店
path: 'audit_activity/newTerminal', // 售点稽查_新建终端门店
component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/newTerminal'),
name: 'newTerminal'
},
{
path: 'taskList', // 售点稽查_稽查记录列表
path: 'audit_activity/taskList', // 售点稽查_稽查记录列表
component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/taskList'),
name: 'taskList'
},
{
path: 'inspectionTask', // 售点稽查_稽查任务
path: 'audit_activity/inspectionTask', // 售点稽查_稽查任务
component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/inspectionTask/index'),
name: 'inspectionTask'
},
{
path: 'logistics', // 物流信息页面
component: () => import('@/views/mobile/pages/other/logistics'),
name: 'logistics'
}
]
}
]
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论