From 0fca538d9d7305af777dd0b5effb728530f74be2 Mon Sep 17 00:00:00 2001 From: kevin jiang Date: Sun, 7 Jun 2020 17:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=AE=A1=E7=90=86-=E5=A4=A7?= =?UTF-8?q?=E5=8C=BA=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 + .../organization/OrganizationCompany.vue | 13 + .../organization/OrganizationCustomer.vue | 13 + src/pages/organization/OrganizationMain.vue | 46 ++ src/pages/organization/OrganizationRegion.vue | 269 ++++++++++ src/pages/organization/OrganizationStore.vue | 13 + src/pages/shop/IncreaseStaffManager.vue | 5 +- src/router/index.js | 483 ++++++++++-------- .../organization/OrganizationService.js | 54 ++ 9 files changed, 674 insertions(+), 226 deletions(-) create mode 100644 src/pages/organization/OrganizationCompany.vue create mode 100644 src/pages/organization/OrganizationCustomer.vue create mode 100644 src/pages/organization/OrganizationMain.vue create mode 100644 src/pages/organization/OrganizationRegion.vue create mode 100644 src/pages/organization/OrganizationStore.vue create mode 100644 src/services/organization/OrganizationService.js diff --git a/src/App.vue b/src/App.vue index 7c867d9..1b5fdc7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -70,4 +70,8 @@ padding-right: 20px; float: right; } + +.table-margin-top { + margin-top: 20px; +} diff --git a/src/pages/organization/OrganizationCompany.vue b/src/pages/organization/OrganizationCompany.vue new file mode 100644 index 0000000..8df0b27 --- /dev/null +++ b/src/pages/organization/OrganizationCompany.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/pages/organization/OrganizationCustomer.vue b/src/pages/organization/OrganizationCustomer.vue new file mode 100644 index 0000000..0af1b0f --- /dev/null +++ b/src/pages/organization/OrganizationCustomer.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/pages/organization/OrganizationMain.vue b/src/pages/organization/OrganizationMain.vue new file mode 100644 index 0000000..066c902 --- /dev/null +++ b/src/pages/organization/OrganizationMain.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/src/pages/organization/OrganizationRegion.vue b/src/pages/organization/OrganizationRegion.vue new file mode 100644 index 0000000..6e6a338 --- /dev/null +++ b/src/pages/organization/OrganizationRegion.vue @@ -0,0 +1,269 @@ + + + + + diff --git a/src/pages/organization/OrganizationStore.vue b/src/pages/organization/OrganizationStore.vue new file mode 100644 index 0000000..8ebeb15 --- /dev/null +++ b/src/pages/organization/OrganizationStore.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/pages/shop/IncreaseStaffManager.vue b/src/pages/shop/IncreaseStaffManager.vue index 4794d86..73305ce 100644 --- a/src/pages/shop/IncreaseStaffManager.vue +++ b/src/pages/shop/IncreaseStaffManager.vue @@ -198,7 +198,7 @@ import staff from "../../services/staff/staff"; return { modal13: false, deleteId: null, - userId: 13, + userId: '', // 标记 1添加 2修改 flag: 1, prefixDefault: data.prefixDefault, @@ -301,7 +301,8 @@ import staff from "../../services/staff/staff"; } }, mounted() { - this.setMenuName("门店推广", "推广管理", "门店导购管理"); + this.userId = JSON.parse(sessionStorage.getItem("loginInfo")).userId; + this.setMenuName("门店推广", "推广管理", "门店导购管理"); this.listOfLogistics(); }, methods: { diff --git a/src/router/index.js b/src/router/index.js index 5523252..26a4166 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -35,246 +35,281 @@ import ActivityPlan from "@/pages/activity/ActivityPlan"; import ActivityCode from "@/pages/activity/ActivityCode"; import GuideCode from "@/pages/activity/GuideCode"; import Recruit from "@/pages/recruit/Recruit"; - +import OrganizationRegion from "@/pages/organization/OrganizationRegion"; +import OrganizationCompany from "@/pages/organization/OrganizationCompany"; +import OrganizationCustomer from "@/pages/organization/OrganizationCustomer"; +import OrganizationStore from "@/pages/organization/OrganizationStore"; +import OrganizationMain from "@/pages/organization/OrganizationMain" Vue.use(Router); const router = new Router({ - mode: "history", - base: "/youke", - routes: [ - { - path: "/", - redirect: "/login", - }, - { - path: "/login", - name: "login", - component: Login, - }, - { - path: "/external/contact", - name: "externalContact", - component: ExternalContact, - }, - { - path: "/home", - name: "Home", - component: Home, - children: [ - { - path: "/activity/manager", - name: "ActivityManager", - component: ActivityManager, - }, - { - path: "/activity/plan", - name: "ActivityPlan", - component: ActivityPlan, - children: [], - }, - { - path: "/activity/plan/code", - name: "ActivityCode", - component: ActivityCode, - }, - { - path: "/activity/plan/GuideCode", - name: "GuideCode", - component: GuideCode, - }, - { - path: "/activity/analysis", - name: "ActivityAnalysis", - component: ActivityAnalysis, - }, - { - path: "/account/manager", - name: "AccountManager", - component: AccountManager, - }, - { - path: "/account/management/add", - name: "AccountManagerAdd", - component: AccountManagerAdd, - }, - { - path: "/account/management/modify", - name: "AccountManagementModify", - component: AccountManagementModify, - }, - { - path: "/account/upload", - name: "AccountManagerUpload", - component: AccountManagerUpload, - }, - { - path: "/role/manager", - name: "RoleManager", - component: RoleManager, - }, - { - path: "/shop/increase/manager", - name: "IncreaseManager", - component: IncreaseManager, - children: [ - { - path: "/", - redirect: "/shop/increase/manager/store", - }, - { - path: "/shop/increase/manager/store", - name: "IncreaseStoreManager", - component: IncreaseStoreManager, - }, - { - path: "/shop/increase/manager/staff", - name: "IncreaseStaffManager", - component: IncreaseStaffManager, - }, - { - path: "/shop/increase/manager/staff/batch/add", - name: "IncreaseStaffManagerBatchAdd", - component: IncreaseStaffManagerBatchAdd, - }, - { - path: "/shop/increase/welcome/list", - component: () => import("@/pages/shop/IncreaseWelcomeList"), - }, - { - path: "/shop/increase/welcome/edit", - component: () => import("@/pages/shop/IncreaseWelcomeEdit"), - }, - ], - }, - { - path: "/table/analysis", - name: "TableAnalysis", - component: TableAnalysis, - children: [ - { - path: "/", - redirect: "/table/analysis/customer/add", - }, - { - path: "/table/analysis/customer/add", - name: "AddCustomerTable", - component: AddCustomerTable, - }, - { - path: "/table/analysis/customer/apply", - name: "ApplyCustomerTable", - component: ApplyCustomerTable, - }, - ], - }, - { - path: "/shop/increase/configure", - name: "IncreaseConfigure", - component: IncreaseConfigure, - children: [ - { - path: "/", - redirect: "/shop/increase/configure/welcome", - }, - { - path: "/shop/increase/configure/group", - name: "IncreaseGroupSendConfigure", - component: IncreaseGroupSendConfigure, - }, - { - path: "/shop/increase/configure/welcome", - name: "IncreaseWelcomeConfigure", - component: IncreaseWelcomeConfigure, - }, - { - path: "/shop/increase/configure/group/add", - name: "IncreaseGroupSendConfigureAdd", - component: IncreaseGroupSendConfigureAdd, - }, - ], - }, - { - path: "/shop/increase/data", - name: "IncreaseData", - component: IncreaseData, - children: [ - { - path: "/", - redirect: "/shop/increase/data/region", - }, - { - path: "/shop/increase/data/region", - name: "IncreaseDataCompany", - component: IncreaseDataCompany, - }, - { - path: "/shop/increase/data/store", - name: "IncreaseDataStore", - component: IncreaseDataStore, - }, - { - path: "/shop/increase/data/staff", - name: "IncreaseDataStaff", - component: IncreaseDataStaff, - }, - ], - }, - { - path: "/recruit", - component: Recruit, - children: [ - { - path: "/recruit/bulletin/index", - component: () => import("@/pages/recruit/BulletinIndex"), - }, - { - path: "/recruit/check/list", - component: () => import("@/pages/recruit/CheckList"), - }, - { - path: "/recruit/promoter/list", - component: () => import("@/pages/recruit/PromoterList"), - }, - ], - }, + mode: "history", + base: "/youke", + routes: [ { - path: "/customer/view", - name: "CustomerView", - component: CustomerView, + path: "/", + redirect: "/login", }, { - path: "/zero/extend/detail", - name: "ZeroExtendDetail", - component: ZeroExtendDetail, + path: "/login", + name: "login", + component: Login, }, { - path: "/customer/data/detail", - name: "CustomerDetail", - component: CustomerDetail, + path: "/external/contact", + name: "externalContact", + component: ExternalContact, }, { - path: '/store/data/detail', - name: 'StoreDetail', - component: StoreDetail, + path: "/home", + name: "Home", + component: Home, + children: [ + { + path: "/activity/manager", + name: "ActivityManager", + component: ActivityManager, + }, + { + path: "/activity/plan", + name: "ActivityPlan", + component: ActivityPlan, + children: [], + }, + { + path: "/activity/plan/code", + name: "ActivityCode", + component: ActivityCode, + }, + { + path: "/activity/plan/GuideCode", + name: "GuideCode", + component: GuideCode, + }, + { + path: "/activity/analysis", + name: "ActivityAnalysis", + component: ActivityAnalysis, + }, + { + path: "/account/manager", + name: "AccountManager", + component: AccountManager, + }, + { + path: "/account/management/add", + name: "AccountManagerAdd", + component: AccountManagerAdd, + }, + { + path: "/account/management/modify", + name: "AccountManagementModify", + component: AccountManagementModify, + }, + { + path: "/account/upload", + name: "AccountManagerUpload", + component: AccountManagerUpload, + }, + { + path: "/role/manager", + name: "RoleManager", + component: RoleManager, + }, + { + path: "/shop/increase/manager", + name: "IncreaseManager", + component: IncreaseManager, + children: [ + { + path: "/", + redirect: "/shop/increase/manager/store", + }, + { + path: "/shop/increase/manager/store", + name: "IncreaseStoreManager", + component: IncreaseStoreManager, + }, + { + path: "/shop/increase/manager/staff", + name: "IncreaseStaffManager", + component: IncreaseStaffManager, + }, + { + path: "/shop/increase/manager/staff/batch/add", + name: "IncreaseStaffManagerBatchAdd", + component: IncreaseStaffManagerBatchAdd, + }, + { + path: "/shop/increase/welcome/list", + component: () => import("@/pages/shop/IncreaseWelcomeList"), + }, + { + path: "/shop/increase/welcome/edit", + component: () => import("@/pages/shop/IncreaseWelcomeEdit"), + }, + ], + }, + { + path: "/table/analysis", + name: "TableAnalysis", + component: TableAnalysis, + children: [ + { + path: "/", + redirect: "/table/analysis/customer/add", + }, + { + path: "/table/analysis/customer/add", + name: "AddCustomerTable", + component: AddCustomerTable, + }, + { + path: "/table/analysis/customer/apply", + name: "ApplyCustomerTable", + component: ApplyCustomerTable, + }, + ], + }, + { + path: "/shop/increase/configure", + name: "IncreaseConfigure", + component: IncreaseConfigure, + children: [ + { + path: "/", + redirect: "/shop/increase/configure/welcome", + }, + { + path: "/shop/increase/configure/group", + name: "IncreaseGroupSendConfigure", + component: IncreaseGroupSendConfigure, + }, + { + path: "/shop/increase/configure/welcome", + name: "IncreaseWelcomeConfigure", + component: IncreaseWelcomeConfigure, + }, + { + path: "/shop/increase/configure/group/add", + name: "IncreaseGroupSendConfigureAdd", + component: IncreaseGroupSendConfigureAdd, + }, + ], + }, + { + path: "/shop/increase/data", + name: "IncreaseData", + component: IncreaseData, + children: [ + { + path: "/", + redirect: "/shop/increase/data/region", + }, + { + path: "/shop/increase/data/region", + name: "IncreaseDataCompany", + component: IncreaseDataCompany, + }, + { + path: "/shop/increase/data/store", + name: "IncreaseDataStore", + component: IncreaseDataStore, + }, + { + path: "/shop/increase/data/staff", + name: "IncreaseDataStaff", + component: IncreaseDataStaff, + }, + ], + }, + { + path: "/recruit", + component: Recruit, + children: [ + { + path: "/recruit/bulletin/index", + component: () => import("@/pages/recruit/BulletinIndex"), + }, + { + path: "/recruit/check/list", + component: () => import("@/pages/recruit/CheckList"), + }, + { + path: "/recruit/promoter/list", + component: () => import("@/pages/recruit/PromoterList"), + }, + ], + }, + { + path: "/customer/view", + name: "CustomerView", + component: CustomerView, + }, + { + path: "/zero/extend/detail", + name: "ZeroExtendDetail", + component: ZeroExtendDetail, + }, + { + path: "/customer/data/detail", + name: "CustomerDetail", + component: CustomerDetail, + }, + { + path: '/store/data/detail', + name: 'StoreDetail', + component: StoreDetail, + }, + { + path: '/no/permission', + name: 'NoPermission', + component: NoPermission, + }, + { + path: "/organization/main", + name: "OrganizationMain", + component: OrganizationMain, + children: [ + { + path: "/", + redirect: OrganizationStore, + }, + { + path: "/organization/customer", + name: "OrganizationCustomer", + component: OrganizationCustomer, + }, + { + path: "/organization/company", + name: "OrganizationCompany", + component: OrganizationCompany, + }, + { + path: "/organization/region", + name: "OrganizationRegion", + component: OrganizationRegion, + }, + { + path: "/organization/store", + name: "OrganizationStore", + component: OrganizationStore, + } + ], + }, + ], }, { - path: '/no/permission', - name: 'NoPermission', - component: NoPermission, + path: "/customer/view/home", + name: "CustomerViewHome", + component: CustomerViewHome, }, - ], - }, - { - path: "/customer/view/home", - name: "CustomerViewHome", - component: CustomerViewHome, - }, - ], + ], }); /* * 跳转前的处理事件 * */ -router.beforeEach(function(to, from, next) { - next(); +router.beforeEach(function (to, from, next) { + next(); }); export default router; diff --git a/src/services/organization/OrganizationService.js b/src/services/organization/OrganizationService.js new file mode 100644 index 0000000..4bcd529 --- /dev/null +++ b/src/services/organization/OrganizationService.js @@ -0,0 +1,54 @@ +/** + * 组织管理 server层 + * @author dexiang.jiang + * @date 2020/06/07 16:14 + */ + +import http from '../CommonHttp' + +/** + * 查询大区列表 + * @param params + * @param call + * @returns {Promise} + */ +export function getOrganizationRegionList(params, call, errorCallback) { + return http.get('/organization/region/list', params).then(call).catch(errorCallback) +} + +/** + * 修改大区 + * @param params + * @param call + * @returns {Promise} + */ +export function postOrganizationRegionModify(params, call, errorCallback) { + return http.post('/organization/region/modify', params).then(call).catch(errorCallback) +} + +/** + * 添加大区 + * @param params + * @param call + * @returns {Promise} + */ +export function postOrganizationRegionAdd(params, call, errorCallback) { + return http.post('/organization/region/add', params).then(call).catch(errorCallback) +} + +/** + * 删除 + * @param params + * @param call + * @returns {Promise} + */ +export function postOrganizationRemoveId(params, call, errorCallback) { + return http.post('/organization/remove/id', params).then(call).catch(errorCallback) +} + +export default { + getOrganizationRegionList, + postOrganizationRegionModify, + postOrganizationRegionAdd, + postOrganizationRemoveId +}