From af5ba4c954c99c06d62f8b334307a8e83fca6142 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Thu, 27 Feb 2025 15:55:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BE=9B=E5=BA=94=E5=95=86=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/router/index.ts | 42 +++++ src/utils/eventBus.js | 3 + src/views/inventory/PaymentRecord.vue | 5 + .../inventory/consumablesconfig/Content.vue | 1 + .../consumablesconfig/DataStatistics.vue | 2 +- .../consumablesconfig/component/AddButton.vue | 11 +- src/views/inventory/supplier.vue | 14 ++ .../inventory/supplierconfig/Content.vue | 147 ++++++++++++++++++ src/views/inventory/supplierconfig/Search.vue | 52 +++++++ src/views/inventory/supplierconfig/api.ts | 60 +++++++ .../supplierconfig/component/AddButton.vue | 9 ++ .../supplierconfig/component/Paging.vue | 24 +++ .../supplierconfig/component/Table.vue | 49 ++++++ src/views/mytemplate/index.vue | 16 ++ src/views/mytemplate/indexconfig/Content.vue | 146 +++++++++++++++++ .../mytemplate/indexconfig/DataStatistics.vue | 103 ++++++++++++ src/views/mytemplate/indexconfig/Search.vue | 66 ++++++++ src/views/mytemplate/indexconfig/api.ts | 60 +++++++ .../indexconfig/component/AddButton.vue | 15 ++ .../indexconfig/component/Paging.vue | 24 +++ .../indexconfig/component/Table.vue | 34 ++++ 22 files changed, 881 insertions(+), 3 deletions(-) create mode 100644 src/utils/eventBus.js create mode 100644 src/views/inventory/PaymentRecord.vue create mode 100644 src/views/inventory/supplier.vue create mode 100644 src/views/inventory/supplierconfig/Content.vue create mode 100644 src/views/inventory/supplierconfig/Search.vue create mode 100644 src/views/inventory/supplierconfig/api.ts create mode 100644 src/views/inventory/supplierconfig/component/AddButton.vue create mode 100644 src/views/inventory/supplierconfig/component/Paging.vue create mode 100644 src/views/inventory/supplierconfig/component/Table.vue create mode 100644 src/views/mytemplate/index.vue create mode 100644 src/views/mytemplate/indexconfig/Content.vue create mode 100644 src/views/mytemplate/indexconfig/DataStatistics.vue create mode 100644 src/views/mytemplate/indexconfig/Search.vue create mode 100644 src/views/mytemplate/indexconfig/api.ts create mode 100644 src/views/mytemplate/indexconfig/component/AddButton.vue create mode 100644 src/views/mytemplate/indexconfig/component/Paging.vue create mode 100644 src/views/mytemplate/indexconfig/component/Table.vue diff --git a/package.json b/package.json index 293f5a3..5391db6 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "js-cookie": "^3.0.5", "jsencrypt": "^3.3.2", "lodash-es": "^4.17.21", + "mitt": "^3.0.1", "nprogress": "^0.2.0", "path-browserify": "^1.0.1", "path-to-regexp": "^8.2.0", diff --git a/src/router/index.ts b/src/router/index.ts index 89766ae..d530197 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -522,6 +522,26 @@ export const constantRoutes: RouteRecordRaw[] = [ keepAlive: true, }, }, + { + path: "supplier", + component: () => import("@/views/inventory/supplier.vue"), + name: "supplier", + meta: { + title: "供应商管理", + affix: false, + hidden: true + }, + }, { + path: "PaymentRecord", + component: () => import("@/views/inventory/PaymentRecord.vue"), + name: "PaymentRecord", + meta: { + title: "结款记录", + affix: false, + hidden: true + }, + }, + ], }, { @@ -585,6 +605,28 @@ export const constantRoutes: RouteRecordRaw[] = [ }, ], }, + { + path: "/mytemplate", + component: Layout, + meta: { + title: "我的模板", + icon: "tab", + alwaysShow: true, + hidden: true + }, + children: [ + { + path: "index", + component: () => import("@/views/mytemplate/index.vue"), + name: "orderIndex", + meta: { + title: "我的模板", + affix: false, + keepAlive: true, + }, + }, + ], + }, ]; /** diff --git a/src/utils/eventBus.js b/src/utils/eventBus.js new file mode 100644 index 0000000..5fcb19d --- /dev/null +++ b/src/utils/eventBus.js @@ -0,0 +1,3 @@ +import mitt from 'mitt' +const eventBus = mitt() +export default eventBus \ No newline at end of file diff --git a/src/views/inventory/PaymentRecord.vue b/src/views/inventory/PaymentRecord.vue new file mode 100644 index 0000000..400b736 --- /dev/null +++ b/src/views/inventory/PaymentRecord.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/inventory/consumablesconfig/Content.vue b/src/views/inventory/consumablesconfig/Content.vue index acaa56b..c1b88ca 100644 --- a/src/views/inventory/consumablesconfig/Content.vue +++ b/src/views/inventory/consumablesconfig/Content.vue @@ -18,6 +18,7 @@ import Paging from './component/Paging.vue' padding: 20px; background-color: #fff; border: 1px solid #e4e7ed; + margin-top: 20px; border-radius: 4px; } \ No newline at end of file diff --git a/src/views/inventory/consumablesconfig/DataStatistics.vue b/src/views/inventory/consumablesconfig/DataStatistics.vue index f5c93d9..cf1cb3a 100644 --- a/src/views/inventory/consumablesconfig/DataStatistics.vue +++ b/src/views/inventory/consumablesconfig/DataStatistics.vue @@ -71,7 +71,7 @@ async function getPage() { border: 1px solid #e4e7ed; background-color: #fff; border-radius: 4px; - margin: 20px 0; + margin-top: 20px; padding: 20px; display: flex; align-items: center; diff --git a/src/views/inventory/consumablesconfig/component/AddButton.vue b/src/views/inventory/consumablesconfig/component/AddButton.vue index 7d93775..46b00fd 100644 --- a/src/views/inventory/consumablesconfig/component/AddButton.vue +++ b/src/views/inventory/consumablesconfig/component/AddButton.vue @@ -3,5 +3,12 @@ 入库 出库 分类管理 - 供应商管理 - \ No newline at end of file + 供应商管理 + + \ No newline at end of file diff --git a/src/views/inventory/supplier.vue b/src/views/inventory/supplier.vue new file mode 100644 index 0000000..90a0056 --- /dev/null +++ b/src/views/inventory/supplier.vue @@ -0,0 +1,14 @@ + + \ No newline at end of file diff --git a/src/views/inventory/supplierconfig/Content.vue b/src/views/inventory/supplierconfig/Content.vue new file mode 100644 index 0000000..19ab057 --- /dev/null +++ b/src/views/inventory/supplierconfig/Content.vue @@ -0,0 +1,147 @@ + + + \ No newline at end of file diff --git a/src/views/inventory/supplierconfig/Search.vue b/src/views/inventory/supplierconfig/Search.vue new file mode 100644 index 0000000..ba031df --- /dev/null +++ b/src/views/inventory/supplierconfig/Search.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/src/views/inventory/supplierconfig/api.ts b/src/views/inventory/supplierconfig/api.ts new file mode 100644 index 0000000..6e9207d --- /dev/null +++ b/src/views/inventory/supplierconfig/api.ts @@ -0,0 +1,60 @@ +import request from "@/utils/request"; +const baseURL = "/product/admin/product/vendor"; +// 供应商管理 +const AuthAPI = { + // 列表 + getList(params: any) { + return request({ + url: `${baseURL}/list`, + method: "get", + params, + }); + }, + /** 分页*/ + getPage(params: any) { + return request({ + url: `${baseURL}/page`, + method: "get", + params, + }); + }, + // 新增 + add(data: any) { + return request({ + url: `${baseURL}`, + method: "post", + data: { ...data }, + }); + }, + // 详情 + getinfo(id: number) { + return request({ + url: `${baseURL}/${id}`, + method: "get", + }); + }, + // 编辑 + update(data: Object) { + return request({ + url: `${baseURL}`, + method: "put", + data, + }); + }, + // 删除 + deleteByIds(id: number | String) { + return request({ + url: `${baseURL}/${id}`, + method: "delete", + }); + }, + +}; +export interface Responseres { + code?: number | null; + data?: any; + msg?: null | string; + [property: string]: any; +} + +export default AuthAPI; \ No newline at end of file diff --git a/src/views/inventory/supplierconfig/component/AddButton.vue b/src/views/inventory/supplierconfig/component/AddButton.vue new file mode 100644 index 0000000..1070f35 --- /dev/null +++ b/src/views/inventory/supplierconfig/component/AddButton.vue @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/src/views/inventory/supplierconfig/component/Paging.vue b/src/views/inventory/supplierconfig/component/Paging.vue new file mode 100644 index 0000000..ee9b056 --- /dev/null +++ b/src/views/inventory/supplierconfig/component/Paging.vue @@ -0,0 +1,24 @@ + + \ No newline at end of file diff --git a/src/views/inventory/supplierconfig/component/Table.vue b/src/views/inventory/supplierconfig/component/Table.vue new file mode 100644 index 0000000..149289a --- /dev/null +++ b/src/views/inventory/supplierconfig/component/Table.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/mytemplate/index.vue b/src/views/mytemplate/index.vue new file mode 100644 index 0000000..613f6b3 --- /dev/null +++ b/src/views/mytemplate/index.vue @@ -0,0 +1,16 @@ + + \ No newline at end of file diff --git a/src/views/mytemplate/indexconfig/Content.vue b/src/views/mytemplate/indexconfig/Content.vue new file mode 100644 index 0000000..f4a1506 --- /dev/null +++ b/src/views/mytemplate/indexconfig/Content.vue @@ -0,0 +1,146 @@ + + + \ No newline at end of file diff --git a/src/views/mytemplate/indexconfig/DataStatistics.vue b/src/views/mytemplate/indexconfig/DataStatistics.vue new file mode 100644 index 0000000..cf1cb3a --- /dev/null +++ b/src/views/mytemplate/indexconfig/DataStatistics.vue @@ -0,0 +1,103 @@ + + + + + \ No newline at end of file diff --git a/src/views/mytemplate/indexconfig/Search.vue b/src/views/mytemplate/indexconfig/Search.vue new file mode 100644 index 0000000..ad584fa --- /dev/null +++ b/src/views/mytemplate/indexconfig/Search.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/src/views/mytemplate/indexconfig/api.ts b/src/views/mytemplate/indexconfig/api.ts new file mode 100644 index 0000000..c6da4ee --- /dev/null +++ b/src/views/mytemplate/indexconfig/api.ts @@ -0,0 +1,60 @@ +import request from "@/utils/request"; +const baseURL = "/product/admin/prod/group"; +// XXX-配置 +const AuthAPI = { + // 列表 + getList(params: any) { + return request({ + url: `${baseURL}/list`, + method: "get", + params, + }); + }, + /** 分页*/ + getPage(params: any) { + return request({ + url: `${baseURL}/page`, + method: "get", + params, + }); + }, + // 新增 + add(data: any) { + return request({ + url: `${baseURL}`, + method: "post", + data: { ...data }, + }); + }, + // 详情 + getinfo(id: number) { + return request({ + url: `${baseURL}/${id}`, + method: "get", + }); + }, + // 编辑 + update(data: Object) { + return request({ + url: `${baseURL}`, + method: "put", + data, + }); + }, + // 删除 + deleteByIds(id: number | String) { + return request({ + url: `${baseURL}/${id}`, + method: "delete", + }); + }, + +}; +export interface Responseres { + code?: number | null; + data?: any; + msg?: null | string; + [property: string]: any; +} + +export default AuthAPI; \ No newline at end of file diff --git a/src/views/mytemplate/indexconfig/component/AddButton.vue b/src/views/mytemplate/indexconfig/component/AddButton.vue new file mode 100644 index 0000000..9845bdd --- /dev/null +++ b/src/views/mytemplate/indexconfig/component/AddButton.vue @@ -0,0 +1,15 @@ + + \ No newline at end of file diff --git a/src/views/mytemplate/indexconfig/component/Paging.vue b/src/views/mytemplate/indexconfig/component/Paging.vue new file mode 100644 index 0000000..ee9b056 --- /dev/null +++ b/src/views/mytemplate/indexconfig/component/Paging.vue @@ -0,0 +1,24 @@ + + \ No newline at end of file diff --git a/src/views/mytemplate/indexconfig/component/Table.vue b/src/views/mytemplate/indexconfig/component/Table.vue new file mode 100644 index 0000000..31ef7ce --- /dev/null +++ b/src/views/mytemplate/indexconfig/component/Table.vue @@ -0,0 +1,34 @@ + + +