diff --git a/.env.production b/.env.production index edcba1dcea732798da1e9c73fb8386a4f864a99d..e00340397f0a9a7ea2f220f87e131b08578d415f 100644 --- a/.env.production +++ b/.env.production @@ -2,7 +2,7 @@ VITE_USE_MOCK = true # public path -VITE_PUBLIC_PATH = / +VITE_PUBLIC_PATH = 'https://tmallab.cn/ops/' # Delete console VITE_DROP_CONSOLE = true diff --git a/src/api/manufacturer/index.ts b/src/api/manufacturer/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..44d291f72f36151518d3989ebb7aab4658495247 --- /dev/null +++ b/src/api/manufacturer/index.ts @@ -0,0 +1,51 @@ +import { tmallabHttp } from '/@/utils/http/axios'; +import { List, Supplier, ParamsList, ParamsAdd, BrandList } from '/@/types/manufacturer'; + +type ResponseData = { + code: number; + data: T; + message: string; + success: boolean; + time: string; + traceId: string; +}; + +export const getManufacturerListApi = (data: ParamsList) => + tmallabHttp.post>({ + url: '/system/mfrCooperate/getList', + data, + }); + +// 获取供货商名称列表 +export const getSupplierApi = () => + tmallabHttp.post>({ + url: '/system/supplier/getSupplierComboBox', + }); + +// 新增厂商 +export const handleManufacturerAdd = (data: ParamsAdd) => + tmallabHttp.post>({ + url: '/system/mfrCooperate/add', + data, + }); + +// 合作品牌 +export const getBrandListApi = (data: { brand: string }) => + tmallabHttp.post>({ + url: '/system/supplierBrandQualification/getApproveList', + data, + }); + +// 获取详情 +export const getManuFactureDetail = (data: { supplierCode: string }) => + tmallabHttp.post>({ + url: '/system/mfrCooperate/getOne', + data, + }); + +// 编辑 +export const handleEditApi = (data: ParamsAdd) => + tmallabHttp.post>({ + url: '/system/mfrCooperate/edit', + data, + }); diff --git a/src/assets/images/notOpened.png b/src/assets/images/notOpened.png index 7eeac65929391f7f10b1070b34df64d3c409ee82..95ba87334e895ad3947d982d8282e4b97ba0dabb 100644 Binary files a/src/assets/images/notOpened.png and b/src/assets/images/notOpened.png differ diff --git a/src/const/manufacturer/index.ts b/src/const/manufacturer/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..d37cdae7a3c36497145fb144c2e18ccd25999db0 --- /dev/null +++ b/src/const/manufacturer/index.ts @@ -0,0 +1,9 @@ +export const Status = { + 0: '已中止', + 1: '进行中' +} + +export const DataContract = { + false: '不允许非厂商数据存在', + true: '允许非厂商数据存在' +} diff --git a/src/main.ts b/src/main.ts index 8fa46e6cd80f62c35729963d1331faadd01d91b3..6f44964780cd3e8fcf57e5930a703b769d885b1a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,6 +4,7 @@ import 'virtual:windi-components.css'; import 'virtual:windi-utilities.css'; // Register icon sprite import 'virtual:svg-icons-register'; +import './styles/index.css' import App from './App.vue'; import { createApp } from 'vue'; import { initAppConfigStore } from '/@/logics/initAppConfig'; diff --git a/src/router/routes/index.ts b/src/router/routes/index.ts index f1ef33f562fda9bccd443ab5ef32bbacc8b0e78f..42af1ba1ddefba41b87b883b51af0ee33a17877a 100644 --- a/src/router/routes/index.ts +++ b/src/router/routes/index.ts @@ -8,14 +8,14 @@ import { t } from '/@/hooks/web/useI18n'; const modules = import.meta.globEager('./modules/**/*.ts'); -const routeModuleList: AppRouteModule[] = []; - +let routeModuleList: AppRouteModule[] = []; +const hideModuleList: string[] = ['/arbitration', '/authorization', '/complaints']; Object.keys(modules).forEach((key) => { const mod = modules[key].default || {}; const modList = Array.isArray(mod) ? [...mod] : [mod]; routeModuleList.push(...modList); }); - +routeModuleList = routeModuleList.filter((v) => !hideModuleList.includes(v.path)); export const asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList]; export const RootRoute: AppRouteRecordRaw = { @@ -37,9 +37,4 @@ export const LoginRoute: AppRouteRecordRaw = { }; // Basic routing without permission -export const basicRoutes = [ - LoginRoute, - RootRoute, - ...mainOutRoutes, - PAGE_NOT_FOUND_ROUTE, -]; +export const basicRoutes = [LoginRoute, RootRoute, ...mainOutRoutes, PAGE_NOT_FOUND_ROUTE]; diff --git a/src/store/modules/multipleTab.ts b/src/store/modules/multipleTab.ts index 731b847e6bc9c5dfae67d1df545b4a2bf842d49d..4c25745c14aa68bd5522d222d4d74673bd5a1113 100644 --- a/src/store/modules/multipleTab.ts +++ b/src/store/modules/multipleTab.ts @@ -104,9 +104,18 @@ export const useMultipleTabStore = defineStore({ const go = useGo(router); const len = this.tabList.length; const { path } = unref(router.currentRoute); - let toPath: PageEnum | string = PageEnum.BASE_HOME; - + //切换角色不跳转工作面板,工作面板页面未开发完成 + const userStore = useUserStore(); + const roleList = toRaw(userStore.getRoleList) || []; + const isSuper = (roleList || []).find((item) => item === 'super'); + const isSupplier = (roleList || []).find((item) => item === 'supplier'); + if (isSuper) { + toPath = '/supplierInfoManage/index'; + } + if (isSupplier) { + toPath = '/product'; + } if (len > 0) { const page = this.tabList[len - 1]; const p = page.fullPath || page.path; diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index d578a80e9d5e394b1e6ebb36ebe8f9d9b94132c7..0d8575c91e1e09ec7a5f297bc0c0be3dda577086 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -150,6 +150,13 @@ export const useUserStore = defineStore({ routes.forEach((route) => { router.addRoute(route as unknown as RouteRecordRaw); }); + //系统管理员 + if (routes.findIndex((v) => v.path === '/supplierInfoManage') !== -1) { + userInfo.homePath = '/supplierInfoManage/index'; + //供货商 + } else { + userInfo.homePath = '/product'; + } router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw); permissionStore.setDynamicAddedRoute(true); } diff --git a/src/styles/index.css b/src/styles/index.css new file mode 100644 index 0000000000000000000000000000000000000000..2728ad43fa1b887d37e5af65e89aba596bb066ad --- /dev/null +++ b/src/styles/index.css @@ -0,0 +1,5 @@ + +:root { + --fy-bg-white: #fff; + --fy-border-bottom-bg: #cdcdcd +} diff --git a/src/types/manufacturer/index.ts b/src/types/manufacturer/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..79c1ed62980ab778c3f650feb1ee81f0c30cc99e --- /dev/null +++ b/src/types/manufacturer/index.ts @@ -0,0 +1,43 @@ +export type List = { + brandList: string[]; + cooperateStatus: number; + createName: string; + createTime: string; + createUsername: string; + dataControl: boolean; + mfrCode: string; + mfrName: string; + mfrShortName: string; + sysid: number; + total?: number; +}; + +export type Supplier = { + supplierCode: string; + supplierName: string; +}; + +export type ParamsList = { + currentPage: string; + pageSize: string; +}; + +export type ParamsAdd = { + ghsCode: string | undefined; + cooperateStatus: number; + brandList: string | string[]; + dataControl: boolean; + mfrName?:string; +}; + +export type BrandList = { + agentLevel: string; + applierName: string; + brand: string; + brandPass: string; + brandQualification: string; + count: number | null; + createTime: string; + expirationDate: string; + salePlat: number; +}; diff --git a/src/views/manufacturer/index.vue b/src/views/manufacturer/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..a502e0f9393cac2ef55f49537254cbf4d16dfbde --- /dev/null +++ b/src/views/manufacturer/index.vue @@ -0,0 +1,98 @@ + + + diff --git a/src/views/manufacturer/modules/detail.vue b/src/views/manufacturer/modules/detail.vue new file mode 100644 index 0000000000000000000000000000000000000000..753e60097b34c5ea97ae2ba2777507a08f1af322 --- /dev/null +++ b/src/views/manufacturer/modules/detail.vue @@ -0,0 +1,135 @@ + + + diff --git a/src/views/manufacturer/modules/operate.vue b/src/views/manufacturer/modules/operate.vue new file mode 100644 index 0000000000000000000000000000000000000000..4616d583c9e69c50a66b17aaaf9b74b8c6a0af12 --- /dev/null +++ b/src/views/manufacturer/modules/operate.vue @@ -0,0 +1,233 @@ + + + diff --git a/src/views/super/regionalSpotManage/index.vue b/src/views/super/regionalSpotManage/index.vue index 546c6bef432a5b21ad70d69bbce00d1021a76556..09739db9622e775ea882a1a62b081e46bc1253ea 100644 --- a/src/views/super/regionalSpotManage/index.vue +++ b/src/views/super/regionalSpotManage/index.vue @@ -312,6 +312,9 @@ if (res.success) { peopleData.value = res.data.filter((item) => item.type == 1); rootData.value = res.data.filter((item) => item.type == 0); + platOptions.value = platOptions.value.filter((item) => { + return !res.data.some((ele) => ele.platCode === item.platCode); + }); } else { message.error(res.message); } diff --git "a/src/views/super/supplierInfoManage/\344\276\233\350\264\247\345\225\206\344\277\241\346\201\257\347\256\241\347\220\206.vue" "b/src/views/super/supplierInfoManage/\344\276\233\350\264\247\345\225\206\344\277\241\346\201\257\347\256\241\347\220\206.vue" index e6709e44cdac93ba47b0be54db9b3c4b156adcec..500512da6c026efbe6cde16e58993a4e895aea54 100644 --- "a/src/views/super/supplierInfoManage/\344\276\233\350\264\247\345\225\206\344\277\241\346\201\257\347\256\241\347\220\206.vue" +++ "b/src/views/super/supplierInfoManage/\344\276\233\350\264\247\345\225\206\344\277\241\346\201\257\347\256\241\347\220\206.vue" @@ -30,7 +30,7 @@ 重置 - 搜索 + 查询 { if (res.success) { message.success(res.message);