From aade658a2f8e488f92f34fe7992aad4cc9d3f062 Mon Sep 17 00:00:00 2001 From: lihang Date: Tue, 28 May 2024 17:48:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9Estyle=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E6=96=87=E4=BB=B6=20TML-226=E5=8E=82=E5=95=86?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=90=88=E4=BD=9C=E6=8E=88=E6=9D=83=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/manufacturer/index.ts | 51 +++++ src/const/manufacturer/index.ts | 9 + src/main.ts | 1 + src/router/routes/modules/manufacturer.ts | 46 ++++ src/styles/index.css | 5 + src/types/manufacturer/index.ts | 43 ++++ src/views/manufacturer/index.vue | 98 +++++++++ src/views/manufacturer/modules/detail.vue | 135 ++++++++++++ src/views/manufacturer/modules/operate.vue | 233 +++++++++++++++++++++ 9 files changed, 621 insertions(+) create mode 100644 src/api/manufacturer/index.ts create mode 100644 src/const/manufacturer/index.ts create mode 100644 src/router/routes/modules/manufacturer.ts create mode 100644 src/styles/index.css create mode 100644 src/types/manufacturer/index.ts create mode 100644 src/views/manufacturer/index.vue create mode 100644 src/views/manufacturer/modules/detail.vue create mode 100644 src/views/manufacturer/modules/operate.vue diff --git a/src/api/manufacturer/index.ts b/src/api/manufacturer/index.ts new file mode 100644 index 0000000..44d291f --- /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 0000000..d37cdae --- /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 8fa46e6..6f44964 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 0000000..574329b --- /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 0000000..2728ad4 --- /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 0000000..79c1ed6 --- /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 0000000..a502e0f --- /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 0000000..753e600 --- /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 0000000..4616d58 --- /dev/null +++ b/src/views/manufacturer/modules/operate.vue @@ -0,0 +1,233 @@ + + + -- 2.24.1