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/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/modules/manufacturer.ts b/src/router/routes/modules/manufacturer.ts new file mode 100644 index 0000000000000000000000000000000000000000..574329bf544fbd7dbf768708d169cf557768a1e0 --- /dev/null +++ b/src/router/routes/modules/manufacturer.ts @@ -0,0 +1,46 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { LAYOUT } from '/@/router/constant'; + +const manufacturer: AppRouteModule = { + path: '/manufacturer', + name: 'manufacturer', + component: LAYOUT, + redirect: '/manufacturer/index', + meta: { + hideChildrenInMenu: true, + orderNo: 200, + icon: 'ion:grid-outline', + title: '厂商管理', + }, + children: [ + { + path: 'index', + name: 'Index', + component: () => import('/@/views/manufacturer/index.vue'), + meta: { + title: '合作厂商列表', + }, + }, + { + path: 'operate', + name: 'operate', + component: () => import('/@/views/manufacturer/modules/operate.vue'), + meta: { + title: '新增厂商', + hideMenu:true + }, + }, + { + path: 'detail', + name: 'detail', + component: () => import('/@/views/manufacturer/modules/detail.vue'), + meta: { + title: '厂商详情', + hideMenu:true + }, + }, + ], +}; + +export default manufacturer; 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 @@ + + +