From b6d9da738dd3e6353419f03b5d7a3f93b539a3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=BC=BA?= <1959055484@qq.com> Date: Tue, 23 Jul 2024 22:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=93=81=E7=89=8C=E3=80=81?= =?UTF-8?q?=E5=91=98=E5=B7=A5=E3=80=81=E5=AE=A2=E6=88=B7=E3=80=81=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=BB=84=E7=BB=87=20=E6=8E=A5=E5=8F=A3API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/brand/sysBrandApi.js | 32 +++++++++++++++++ src/api/base/customer/customerApi.js | 28 +++++++++++++++ src/api/base/customer/customerCategoryApi.js | 32 +++++++++++++++++ src/api/base/employee/employeeApi.js | 28 +++++++++++++++ src/api/base/employee/employeeCategoryApi.js | 32 +++++++++++++++++ .../productionOrganizationApi.js | 36 +++++++++++++++++++ 6 files changed, 188 insertions(+) create mode 100644 src/api/base/brand/sysBrandApi.js create mode 100644 src/api/base/customer/customerApi.js create mode 100644 src/api/base/customer/customerCategoryApi.js create mode 100644 src/api/base/employee/employeeApi.js create mode 100644 src/api/base/employee/employeeCategoryApi.js create mode 100644 src/api/base/production-organization/productionOrganizationApi.js diff --git a/src/api/base/brand/sysBrandApi.js b/src/api/base/brand/sysBrandApi.js new file mode 100644 index 0000000..7b962a8 --- /dev/null +++ b/src/api/base/brand/sysBrandApi.js @@ -0,0 +1,32 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/base/brand/` + url, ...arg) + +/** + * 品牌Api接口管理器 + * + * @author Luck + * @date 2024/07/23 16:20 + **/ +export default { + // 获取品牌分页 + sysBrandPage(data) { + return request('page', data, 'get') + }, + // 获取品牌列表 + sysBrandList(data) { + return request('list', data, 'get') + }, + // 提交品牌表单 edit为true时为编辑,默认为新增 + sysBrandSubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除品牌 + sysBrandDelete(data) { + return request('delete', data) + }, + // 获取品牌详情 + sysBrandDetail(data) { + return request('detail', data, 'get') + } +} diff --git a/src/api/base/customer/customerApi.js b/src/api/base/customer/customerApi.js new file mode 100644 index 0000000..6db76c4 --- /dev/null +++ b/src/api/base/customer/customerApi.js @@ -0,0 +1,28 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/base/customer/` + url, ...arg) + +/** + * 客户Api接口管理器 + * + * @author Luck + * @date 2024/07/23 16:31 + **/ +export default { + // 获取客户分页 + customerPage(data) { + return request('page', data, 'get') + }, + // 提交客户表单 edit为true时为编辑,默认为新增 + customerSubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除客户 + customerDelete(data) { + return request('delete', data) + }, + // 获取客户详情 + customerDetail(data) { + return request('detail', data, 'get') + } +} diff --git a/src/api/base/customer/customerCategoryApi.js b/src/api/base/customer/customerCategoryApi.js new file mode 100644 index 0000000..81f32c6 --- /dev/null +++ b/src/api/base/customer/customerCategoryApi.js @@ -0,0 +1,32 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/base/customerCategory/` + url, ...arg) + +/** + * 客户分类Api接口管理器 + * + * @author Luck + * @date 2024/07/23 17:02 + **/ +export default { + // 获取客户分类分页 + customerCategoryPage(data) { + return request('page', data, 'get') + }, + // 获取树结构 + customerCategoryTree(data) { + return request('tree', data, 'get') + }, + // 提交客户分类表单 edit为true时为编辑,默认为新增 + customerCategorySubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除客户分类 + customerCategoryDelete(data) { + return request('delete', data) + }, + // 获取客户分类详情 + customerCategoryDetail(data) { + return request('detail', data, 'get') + } +} diff --git a/src/api/base/employee/employeeApi.js b/src/api/base/employee/employeeApi.js new file mode 100644 index 0000000..ffe13cc --- /dev/null +++ b/src/api/base/employee/employeeApi.js @@ -0,0 +1,28 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/base/employee/` + url, ...arg) + +/** + * 员工Api接口管理器 + * + * @author Luck + * @date 2024/07/23 17:31 + **/ +export default { + // 获取员工分页 + employeePage(data) { + return request('page', data, 'get') + }, + // 提交员工表单 edit为true时为编辑,默认为新增 + employeeSubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除员工 + employeeDelete(data) { + return request('delete', data) + }, + // 获取员工详情 + employeeDetail(data) { + return request('detail', data, 'get') + } +} diff --git a/src/api/base/employee/employeeCategoryApi.js b/src/api/base/employee/employeeCategoryApi.js new file mode 100644 index 0000000..3474868 --- /dev/null +++ b/src/api/base/employee/employeeCategoryApi.js @@ -0,0 +1,32 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/base/employeeCategory/` + url, ...arg) + +/** + * 员工分类Api接口管理器 + * + * @author Luck + * @date 2024/07/23 17:05 + **/ +export default { + // 获取员工分类分页 + employeeCategoryPage(data) { + return request('page', data, 'get') + }, + // 获取员工分类 树结构 + employeeCategoryTree(data) { + return request('tree', data, 'get') + }, + // 提交员工分类表单 edit为true时为编辑,默认为新增 + employeeCategorySubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除员工分类 + employeeCategoryDelete(data) { + return request('delete', data) + }, + // 获取员工分类详情 + employeeCategoryDetail(data) { + return request('detail', data, 'get') + } +} diff --git a/src/api/base/production-organization/productionOrganizationApi.js b/src/api/base/production-organization/productionOrganizationApi.js new file mode 100644 index 0000000..f3e0451 --- /dev/null +++ b/src/api/base/production-organization/productionOrganizationApi.js @@ -0,0 +1,36 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/base/productionorganization/` + url, ...arg) + +/** + * 生产组织Api接口管理器 + * + * @author Luck + * @date 2024/07/23 15:26 + **/ +export default { + // 获取生产组织分页 + productionOrganizationPage(data) { + return request('page', data, 'get') + }, + // 获取生产组织 列表 + productionOrganizationList(data) { + return request('list', data, 'get') + }, + // 获取生产组织 树结构 + productionOrganizationTree(data) { + return request('tree', data, 'get') + }, + // 提交生产组织表单 edit为true时为编辑,默认为新增 + productionOrganizationSubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除生产组织 + productionOrganizationDelete(data) { + return request('delete', data) + }, + // 获取生产组织详情 + productionOrganizationDetail(data) { + return request('detail', data, 'get') + } +}