Просмотр исходного кода

feat(web-admin): register /m/crm/contract static routes.

Co-authored-by: Cursor <cursoragent@cursor.com>
wuzilong 3 недель назад
Родитель
Сommit
e54a168829

+ 30 - 0
web-admin/src/router/routes/staticRoutes.ts

@@ -231,6 +231,36 @@ export const staticRoutes: AppRouteRecordRaw[] = [
     component: () => import('@views/m/crm/quote/detail.vue'),
     meta: { title: '报价单详情', isHideTab: true, isMpWebview: true }
   },
+  {
+    path: '/m/crm/contract',
+    name: 'MpCrmContractList',
+    component: () => import('@views/m/crm/contract/index.vue'),
+    meta: { title: '合同管理', isHideTab: true, isMpWebview: true }
+  },
+  {
+    path: '/m/crm/contract/approval',
+    name: 'MpCrmContractApproval',
+    component: () => import('@views/m/crm/contract/approval.vue'),
+    meta: { title: '合同审批', isHideTab: true, isMpWebview: true }
+  },
+  {
+    path: '/m/crm/contract/new',
+    name: 'MpCrmContractNew',
+    component: () => import('@views/m/crm/contract/form.vue'),
+    meta: { title: '新增合同', isHideTab: true, isMpWebview: true }
+  },
+  {
+    path: '/m/crm/contract/:id/edit',
+    name: 'MpCrmContractEdit',
+    component: () => import('@views/m/crm/contract/form.vue'),
+    meta: { title: '编辑合同', isHideTab: true, isMpWebview: true }
+  },
+  {
+    path: '/m/crm/contract/:id',
+    name: 'MpCrmContractDetail',
+    component: () => import('@views/m/crm/contract/detail.vue'),
+    meta: { title: '合同详情', isHideTab: true, isMpWebview: true }
+  },
   {
     path: '/:pathMatch(.*)*',
     name: 'Exception404CatchAll',

+ 2 - 0
web-admin/src/utils/mp-webview.ts

@@ -3,6 +3,8 @@ export const MP_PLAN_LIST_PATH = '/m/pl/plan'
 export const MP_CRM_PRODUCT_LIST_PATH = '/m/crm/product'
 export const MP_CRM_QUOTE_LIST_PATH = '/m/crm/quote'
 export const MP_CRM_QUOTE_APPROVAL_PATH = '/m/crm/quote/approval'
+export const MP_CRM_CONTRACT_LIST_PATH = '/m/crm/contract'
+export const MP_CRM_CONTRACT_APPROVAL_PATH = '/m/crm/contract/approval'
 export const MINI_WORKBENCH_PATH = '/pages/workbench/workbench'
 /** H5 iframe / uni 壳页约定:内嵌页请求返回工作台 */
 export const MP_WEBVIEW_GO_WORKBENCH = 'MP_WEBVIEW_GO_WORKBENCH'

+ 17 - 0
web-admin/src/views/m/crm/contract/approval.vue

@@ -0,0 +1,17 @@
+<template>
+  <MpWebviewShell>
+    <header class="mp-wv-header">
+      <div class="mp-wv-header__row">
+        <h1 class="mp-wv-header__title">{{ title }}</h1>
+      </div>
+    </header>
+  </MpWebviewShell>
+</template>
+<script setup lang="ts">
+  import { computed } from 'vue'
+  import { useRoute } from 'vue-router'
+  import MpWebviewShell from '@/layouts/MpWebviewShell.vue'
+  import '@/styles/mp-webview.scss'
+  const route = useRoute()
+  const title = computed(() => String(route.meta.title || ''))
+</script>

+ 17 - 0
web-admin/src/views/m/crm/contract/detail.vue

@@ -0,0 +1,17 @@
+<template>
+  <MpWebviewShell>
+    <header class="mp-wv-header">
+      <div class="mp-wv-header__row">
+        <h1 class="mp-wv-header__title">{{ title }}</h1>
+      </div>
+    </header>
+  </MpWebviewShell>
+</template>
+<script setup lang="ts">
+  import { computed } from 'vue'
+  import { useRoute } from 'vue-router'
+  import MpWebviewShell from '@/layouts/MpWebviewShell.vue'
+  import '@/styles/mp-webview.scss'
+  const route = useRoute()
+  const title = computed(() => String(route.meta.title || ''))
+</script>

+ 17 - 0
web-admin/src/views/m/crm/contract/form.vue

@@ -0,0 +1,17 @@
+<template>
+  <MpWebviewShell>
+    <header class="mp-wv-header">
+      <div class="mp-wv-header__row">
+        <h1 class="mp-wv-header__title">{{ title }}</h1>
+      </div>
+    </header>
+  </MpWebviewShell>
+</template>
+<script setup lang="ts">
+  import { computed } from 'vue'
+  import { useRoute } from 'vue-router'
+  import MpWebviewShell from '@/layouts/MpWebviewShell.vue'
+  import '@/styles/mp-webview.scss'
+  const route = useRoute()
+  const title = computed(() => String(route.meta.title || ''))
+</script>

+ 17 - 0
web-admin/src/views/m/crm/contract/index.vue

@@ -0,0 +1,17 @@
+<template>
+  <MpWebviewShell>
+    <header class="mp-wv-header">
+      <div class="mp-wv-header__row">
+        <h1 class="mp-wv-header__title">{{ title }}</h1>
+      </div>
+    </header>
+  </MpWebviewShell>
+</template>
+<script setup lang="ts">
+  import { computed } from 'vue'
+  import { useRoute } from 'vue-router'
+  import MpWebviewShell from '@/layouts/MpWebviewShell.vue'
+  import '@/styles/mp-webview.scss'
+  const route = useRoute()
+  const title = computed(() => String(route.meta.title || ''))
+</script>