From d4b5164f79218ad5cdccb8c37af7391a44f0991a Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Thu, 27 Feb 2025 18:07:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=80=97=E6=9D=90=E5=88=86=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 12 +- src/views/inventory/PaymentRecord.vue | 8 +- src/views/inventory/classification.vue | 10 ++ .../inventory/classification/Content.vue | 157 ++++++++++++++++++ src/views/inventory/classification/api.ts | 73 ++++++++ .../classification/component/AddButton.vue | 11 ++ .../classification/component/Paging.vue | 24 +++ .../classification/component/Table.vue | 42 +++++ .../consumablesconfig/component/AddButton.vue | 2 +- .../indexconfig/component/Table.vue | 12 +- 10 files changed, 339 insertions(+), 12 deletions(-) create mode 100644 src/views/inventory/classification.vue create mode 100644 src/views/inventory/classification/Content.vue create mode 100644 src/views/inventory/classification/api.ts create mode 100644 src/views/inventory/classification/component/AddButton.vue create mode 100644 src/views/inventory/classification/component/Paging.vue create mode 100644 src/views/inventory/classification/component/Table.vue diff --git a/src/router/index.ts b/src/router/index.ts index 8e63269..8f4e28b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -542,6 +542,16 @@ export const constantRoutes: RouteRecordRaw[] = [ hidden: true }, }, + { + path: "classification", + component: () => import("@/views/inventory/classification.vue"), + name: "classification", + meta: { + title: "分类管理", + affix: false, + hidden: true + }, + }, ], }, @@ -619,7 +629,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "index", component: () => import("@/views/mytemplate/index.vue"), - name: "orderIndex", + name: "mytemplate", meta: { title: "我的模板", affix: false, diff --git a/src/views/inventory/PaymentRecord.vue b/src/views/inventory/PaymentRecord.vue index 6d4c921..e772bc0 100644 --- a/src/views/inventory/PaymentRecord.vue +++ b/src/views/inventory/PaymentRecord.vue @@ -1,12 +1,12 @@ \ No newline at end of file diff --git a/src/views/inventory/classification/Content.vue b/src/views/inventory/classification/Content.vue new file mode 100644 index 0000000..713a5db --- /dev/null +++ b/src/views/inventory/classification/Content.vue @@ -0,0 +1,157 @@ + + + \ No newline at end of file diff --git a/src/views/inventory/classification/api.ts b/src/views/inventory/classification/api.ts new file mode 100644 index 0000000..1f8cb7b --- /dev/null +++ b/src/views/inventory/classification/api.ts @@ -0,0 +1,73 @@ +import request from "@/utils/request"; +const baseURL = "/product/admin/product/cons-group"; +// 耗材-配置 +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", + }); + }, + // 修改状态-启用 + onOff(id: number | String) { + return request({ + url: `${baseURL}/enable/${id}`, + method: "post", + }); + }, + // 修改状态-禁用 + onOff2(id: number | String) { + return request({ + url: `${baseURL}/disable/${id}`, + method: "post", + }); + } +}; +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/classification/component/AddButton.vue b/src/views/inventory/classification/component/AddButton.vue new file mode 100644 index 0000000..0738741 --- /dev/null +++ b/src/views/inventory/classification/component/AddButton.vue @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/src/views/inventory/classification/component/Paging.vue b/src/views/inventory/classification/component/Paging.vue new file mode 100644 index 0000000..ee9b056 --- /dev/null +++ b/src/views/inventory/classification/component/Paging.vue @@ -0,0 +1,24 @@ + + \ No newline at end of file diff --git a/src/views/inventory/classification/component/Table.vue b/src/views/inventory/classification/component/Table.vue new file mode 100644 index 0000000..607bccd --- /dev/null +++ b/src/views/inventory/classification/component/Table.vue @@ -0,0 +1,42 @@ + + + diff --git a/src/views/inventory/consumablesconfig/component/AddButton.vue b/src/views/inventory/consumablesconfig/component/AddButton.vue index 46b00fd..1f5e426 100644 --- a/src/views/inventory/consumablesconfig/component/AddButton.vue +++ b/src/views/inventory/consumablesconfig/component/AddButton.vue @@ -2,7 +2,7 @@ 新增 入库 出库 - 分类管理 + 分类管理 供应商管理