diff --git a/apps/web-antd/src/api/erp/finance/account/index.ts b/apps/web-antd/src/api/erp/finance/account/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..e180af65fc08f49d941b7c54e8969b5c9fc620b0 --- /dev/null +++ b/apps/web-antd/src/api/erp/finance/account/index.ts @@ -0,0 +1,68 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpAccountApi { + /** ERP 结算账户信息 */ + export interface Account { + id?: number; // 结算账户编号 + no: string; // 账户编码 + remark: string; // 备注 + status: number; // 开启状态 + sort: number; // 排序 + defaultStatus: boolean; // 是否默认 + name: string; // 账户名称 + } + + /** 结算账户分页查询参数 */ + export interface AccountPageParam extends PageParam { + name?: string; + no?: string; + status?: number; + } +} + +/** 查询结算账户分页 */ +export function getAccountPage(params: ErpAccountApi.AccountPageParam) { + return requestClient.get>( + '/erp/account/page', + { params }, + ); +} + +/** 查询结算账户精简列表 */ +export function getAccountSimpleList() { + return requestClient.get('/erp/account/simple-list'); +} + +/** 查询结算账户详情 */ +export function getAccount(id: number) { + return requestClient.get(`/erp/account/get?id=${id}`); +} + +/** 新增结算账户 */ +export function createAccount(data: ErpAccountApi.Account) { + return requestClient.post('/erp/account/create', data); +} + +/** 修改结算账户 */ +export function updateAccount(data: ErpAccountApi.Account) { + return requestClient.put('/erp/account/update', data); +} + +/** 修改结算账户默认状态 */ +export function updateAccountDefaultStatus(id: number, defaultStatus: boolean) { + return requestClient.put('/erp/account/update-default-status', null, { + params: { id, defaultStatus }, + }); +} + +/** 删除结算账户 */ +export function deleteAccount(id: number) { + return requestClient.delete(`/erp/account/delete?id=${id}`); +} + +/** 导出结算账户 Excel */ +export function exportAccount(params: any) { + return requestClient.download('/erp/account/export-excel', { params }); +} diff --git a/apps/web-antd/src/api/erp/finance/payment/index.ts b/apps/web-antd/src/api/erp/finance/payment/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..e9dc1847a650d499cccb2ba01a7b9b907c210c4f --- /dev/null +++ b/apps/web-antd/src/api/erp/finance/payment/index.ts @@ -0,0 +1,103 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpFinancePaymentApi { + /** 付款单信息 */ + export interface FinancePayment { + id?: number; // 付款单编号 + no: string; // 付款单号 + supplierId: number; // 供应商编号 + paymentTime: Date; // 付款时间 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 付款单分页查询参数 */ + export interface FinancePaymentPageParams extends PageParam { + no?: string; + supplierId?: number; + status?: number; + } + + /** 付款单状态更新参数 */ + export interface FinancePaymentStatusParams { + id: number; + status: number; + } +} + +/** + * 查询付款单分页 + */ +export function getFinancePaymentPage( + params: ErpFinancePaymentApi.FinancePaymentPageParams, +) { + return requestClient.get>( + '/erp/finance-payment/page', + { + params, + }, + ); +} + +/** + * 查询付款单详情 + */ +export function getFinancePayment(id: number) { + return requestClient.get( + `/erp/finance-payment/get?id=${id}`, + ); +} + +/** + * 新增付款单 + */ +export function createFinancePayment( + data: ErpFinancePaymentApi.FinancePayment, +) { + return requestClient.post('/erp/finance-payment/create', data); +} + +/** + * 修改付款单 + */ +export function updateFinancePayment( + data: ErpFinancePaymentApi.FinancePayment, +) { + return requestClient.put('/erp/finance-payment/update', data); +} + +/** + * 更新付款单的状态 + */ +export function updateFinancePaymentStatus( + params: ErpFinancePaymentApi.FinancePaymentStatusParams, +) { + return requestClient.put('/erp/finance-payment/update-status', null, { + params, + }); +} + +/** + * 删除付款单 + */ +export function deleteFinancePayment(ids: number[]) { + return requestClient.delete('/erp/finance-payment/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出付款单 Excel + */ +export function exportFinancePayment( + params: ErpFinancePaymentApi.FinancePaymentPageParams, +) { + return requestClient.download('/erp/finance-payment/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/finance/receipt/index.ts b/apps/web-antd/src/api/erp/finance/receipt/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..37b70e764977843f4a8a1ad0bb7fcd45e536f372 --- /dev/null +++ b/apps/web-antd/src/api/erp/finance/receipt/index.ts @@ -0,0 +1,103 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpFinanceReceiptApi { + /** 收款单信息 */ + export interface FinanceReceipt { + id?: number; // 收款单编号 + no: string; // 收款单号 + customerId: number; // 客户编号 + receiptTime: Date; // 收款时间 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 收款单分页查询参数 */ + export interface FinanceReceiptPageParams extends PageParam { + no?: string; + customerId?: number; + status?: number; + } + + /** 收款单状态更新参数 */ + export interface FinanceReceiptStatusParams { + id: number; + status: number; + } +} + +/** + * 查询收款单分页 + */ +export function getFinanceReceiptPage( + params: ErpFinanceReceiptApi.FinanceReceiptPageParams, +) { + return requestClient.get>( + '/erp/finance-receipt/page', + { + params, + }, + ); +} + +/** + * 查询收款单详情 + */ +export function getFinanceReceipt(id: number) { + return requestClient.get( + `/erp/finance-receipt/get?id=${id}`, + ); +} + +/** + * 新增收款单 + */ +export function createFinanceReceipt( + data: ErpFinanceReceiptApi.FinanceReceipt, +) { + return requestClient.post('/erp/finance-receipt/create', data); +} + +/** + * 修改收款单 + */ +export function updateFinanceReceipt( + data: ErpFinanceReceiptApi.FinanceReceipt, +) { + return requestClient.put('/erp/finance-receipt/update', data); +} + +/** + * 更新收款单的状态 + */ +export function updateFinanceReceiptStatus( + params: ErpFinanceReceiptApi.FinanceReceiptStatusParams, +) { + return requestClient.put('/erp/finance-receipt/update-status', null, { + params, + }); +} + +/** + * 删除收款单 + */ +export function deleteFinanceReceipt(ids: number[]) { + return requestClient.delete('/erp/finance-receipt/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出收款单 Excel + */ +export function exportFinanceReceipt( + params: ErpFinanceReceiptApi.FinanceReceiptPageParams, +) { + return requestClient.download('/erp/finance-receipt/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/product/category/index.ts b/apps/web-antd/src/api/erp/product/category/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..b16a91e3a804e92cef74626e8b2aa55a510f1ede --- /dev/null +++ b/apps/web-antd/src/api/erp/product/category/index.ts @@ -0,0 +1,60 @@ +import { requestClient } from '#/api/request'; + +export namespace ErpProductCategoryApi { + /** ERP 产品分类信息 */ + export interface ProductCategory { + id?: number; // 分类编号 + parentId: number; // 父分类编号 + name: string; // 分类名称 + code: string; // 分类编码 + sort: number; // 分类排序 + status: number; // 开启状态 + } +} + +/** 查询产品分类列表 */ +export function getProductCategoryList() { + return requestClient.get( + '/erp/product-category/list', + ); +} + +/** 查询产品分类精简列表 */ +export function getProductCategorySimpleList() { + return requestClient.get( + '/erp/product-category/simple-list', + ); +} + +/** 查询产品分类详情 */ +export function getProductCategory(id: number) { + return requestClient.get( + `/erp/product-category/get?id=${id}`, + ); +} + +/** 新增产品分类 */ +export function createProductCategory( + data: ErpProductCategoryApi.ProductCategory, +) { + return requestClient.post('/erp/product-category/create', data); +} + +/** 修改产品分类 */ +export function updateProductCategory( + data: ErpProductCategoryApi.ProductCategory, +) { + return requestClient.put('/erp/product-category/update', data); +} + +/** 删除产品分类 */ +export function deleteProductCategory(id: number) { + return requestClient.delete(`/erp/product-category/delete?id=${id}`); +} + +/** 导出产品分类 Excel */ +export function exportProductCategory(params: any) { + return requestClient.download('/erp/product-category/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/product/product/index.ts b/apps/web-antd/src/api/erp/product/product/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..157827fffe12fd6fb470770f9b5a255755e3af7b --- /dev/null +++ b/apps/web-antd/src/api/erp/product/product/index.ts @@ -0,0 +1,61 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpProductApi { + /** ERP 产品信息 */ + export interface Product { + id?: number; // 产品编号 + name: string; // 产品名称 + barCode: string; // 产品条码 + categoryId: number; // 产品类型编号 + unitId: number; // 单位编号 + unitName?: string; // 单位名字 + status: number; // 产品状态 + standard: string; // 产品规格 + remark: string; // 产品备注 + expiryDay: number; // 保质期天数 + weight: number; // 重量(kg) + purchasePrice: number; // 采购价格,单位:元 + salePrice: number; // 销售价格,单位:元 + minPrice: number; // 最低价格,单位:元 + } +} + +/** 查询产品分页 */ +export function getProductPage(params: PageParam) { + return requestClient.get>( + '/erp/product/page', + { params }, + ); +} + +/** 查询产品精简列表 */ +export function getProductSimpleList() { + return requestClient.get('/erp/product/simple-list'); +} + +/** 查询产品详情 */ +export function getProduct(id: number) { + return requestClient.get(`/erp/product/get?id=${id}`); +} + +/** 新增产品 */ +export function createProduct(data: ErpProductApi.Product) { + return requestClient.post('/erp/product/create', data); +} + +/** 修改产品 */ +export function updateProduct(data: ErpProductApi.Product) { + return requestClient.put('/erp/product/update', data); +} + +/** 删除产品 */ +export function deleteProduct(id: number) { + return requestClient.delete(`/erp/product/delete?id=${id}`); +} + +/** 导出产品 Excel */ +export function exportProduct(params: any) { + return requestClient.download('/erp/product/export-excel', { params }); +} diff --git a/apps/web-antd/src/api/erp/product/unit/index.ts b/apps/web-antd/src/api/erp/product/unit/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..317c09c85f1c34c1ece3260783201316cb1e7c37 --- /dev/null +++ b/apps/web-antd/src/api/erp/product/unit/index.ts @@ -0,0 +1,62 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpProductUnitApi { + /** ERP 产品单位信息 */ + export interface ProductUnit { + id?: number; // 单位编号 + name: string; // 单位名字 + status: number; // 单位状态 + } + + /** 产品单位分页查询参数 */ + export interface ProductUnitPageParam extends PageParam { + name?: string; + status?: number; + } +} + +/** 查询产品单位分页 */ +export function getProductUnitPage( + params: ErpProductUnitApi.ProductUnitPageParam, +) { + return requestClient.get>( + '/erp/product-unit/page', + { params }, + ); +} + +/** 查询产品单位精简列表 */ +export function getProductUnitSimpleList() { + return requestClient.get( + '/erp/product-unit/simple-list', + ); +} + +/** 查询产品单位详情 */ +export function getProductUnit(id: number) { + return requestClient.get( + `/erp/product-unit/get?id=${id}`, + ); +} + +/** 新增产品单位 */ +export function createProductUnit(data: ErpProductUnitApi.ProductUnit) { + return requestClient.post('/erp/product-unit/create', data); +} + +/** 修改产品单位 */ +export function updateProductUnit(data: ErpProductUnitApi.ProductUnit) { + return requestClient.put('/erp/product-unit/update', data); +} + +/** 删除产品单位 */ +export function deleteProductUnit(id: number) { + return requestClient.delete(`/erp/product-unit/delete?id=${id}`); +} + +/** 导出产品单位 Excel */ +export function exportProductUnit(params: any) { + return requestClient.download('/erp/product-unit/export-excel', { params }); +} diff --git a/apps/web-antd/src/api/erp/purchase/in/index.ts b/apps/web-antd/src/api/erp/purchase/in/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..fde2c0fbdec2ff280fae0f21cd72c27e0bcf145e --- /dev/null +++ b/apps/web-antd/src/api/erp/purchase/in/index.ts @@ -0,0 +1,102 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpPurchaseInApi { + /** 采购入库信息 */ + export interface PurchaseIn { + id?: number; // 入库工单编号 + no: string; // 采购入库号 + supplierId: number; // 供应商编号 + inTime: Date; // 入库时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + outCount: number; // 采购出库数量 + returnCount: number; // 采购退货数量 + } + + /** 采购入库分页查询参数 */ + export interface PurchaseInPageParams extends PageParam { + no?: string; + supplierId?: number; + status?: number; + } + + /** 采购入库状态更新参数 */ + export interface PurchaseInStatusParams { + id: number; + status: number; + } +} + +/** + * 查询采购入库分页 + */ +export function getPurchaseInPage( + params: ErpPurchaseInApi.PurchaseInPageParams, +) { + return requestClient.get>( + '/erp/purchase-in/page', + { + params, + }, + ); +} + +/** + * 查询采购入库详情 + */ +export function getPurchaseIn(id: number) { + return requestClient.get( + `/erp/purchase-in/get?id=${id}`, + ); +} + +/** + * 新增采购入库 + */ +export function createPurchaseIn(data: ErpPurchaseInApi.PurchaseIn) { + return requestClient.post('/erp/purchase-in/create', data); +} + +/** + * 修改采购入库 + */ +export function updatePurchaseIn(data: ErpPurchaseInApi.PurchaseIn) { + return requestClient.put('/erp/purchase-in/update', data); +} + +/** + * 更新采购入库的状态 + */ +export function updatePurchaseInStatus( + params: ErpPurchaseInApi.PurchaseInStatusParams, +) { + return requestClient.put('/erp/purchase-in/update-status', null, { + params, + }); +} + +/** + * 删除采购入库 + */ +export function deletePurchaseIn(ids: number[]) { + return requestClient.delete('/erp/purchase-in/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出采购入库 Excel + */ +export function exportPurchaseIn( + params: ErpPurchaseInApi.PurchaseInPageParams, +) { + return requestClient.download('/erp/purchase-in/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/purchase/order/index.ts b/apps/web-antd/src/api/erp/purchase/order/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..69c9a551f81e04fff6459d9184049ef2e72accf7 --- /dev/null +++ b/apps/web-antd/src/api/erp/purchase/order/index.ts @@ -0,0 +1,72 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpPurchaseOrderApi { + /** ERP 采购订单信息 */ + export interface PurchaseOrder { + id?: number; // 订单工单编号 + no: string; // 采购订单号 + supplierId: number; // 供应商编号 + orderTime: Date; // 订单时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + inCount: number; // 采购入库数量 + returnCount: number; // 采购退货数量 + } + + /** 采购订单分页查询参数 */ + export interface PurchaseOrderPageParam extends PageParam { + no?: string; + supplierId?: number; + status?: number; + } +} + +/** 查询采购订单分页 */ +export function getPurchaseOrderPage( + params: ErpPurchaseOrderApi.PurchaseOrderPageParam, +) { + return requestClient.get>( + '/erp/purchase-order/page', + { params }, + ); +} + +/** 查询采购订单详情 */ +export function getPurchaseOrder(id: number) { + return requestClient.get( + `/erp/purchase-order/get?id=${id}`, + ); +} + +/** 新增采购订单 */ +export function createPurchaseOrder(data: ErpPurchaseOrderApi.PurchaseOrder) { + return requestClient.post('/erp/purchase-order/create', data); +} + +/** 修改采购订单 */ +export function updatePurchaseOrder(data: ErpPurchaseOrderApi.PurchaseOrder) { + return requestClient.put('/erp/purchase-order/update', data); +} + +/** 更新采购订单的状态 */ +export function updatePurchaseOrderStatus(id: number, status: number) { + return requestClient.put('/erp/purchase-order/update-status', null, { + params: { id, status }, + }); +} + +/** 删除采购订单 */ +export function deletePurchaseOrder(ids: number[]) { + return requestClient.delete('/erp/purchase-order/delete', { + params: { ids: ids.join(',') }, + }); +} + +/** 导出采购订单 Excel */ +export function exportPurchaseOrder(params: any) { + return requestClient.download('/erp/purchase-order/export-excel', { params }); +} diff --git a/apps/web-antd/src/api/erp/purchase/return/index.ts b/apps/web-antd/src/api/erp/purchase/return/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..461a76f77eb3d1e7e4abb964da2a897cde69fca4 --- /dev/null +++ b/apps/web-antd/src/api/erp/purchase/return/index.ts @@ -0,0 +1,104 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpPurchaseReturnApi { + /** 采购退货信息 */ + export interface PurchaseReturn { + id?: number; // 采购退货编号 + no: string; // 采购退货号 + supplierId: number; // 供应商编号 + returnTime: Date; // 退货时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 采购退货分页查询参数 */ + export interface PurchaseReturnPageParams extends PageParam { + no?: string; + supplierId?: number; + status?: number; + } + + /** 采购退货状态更新参数 */ + export interface PurchaseReturnStatusParams { + id: number; + status: number; + } +} + +/** + * 查询采购退货分页 + */ +export function getPurchaseReturnPage( + params: ErpPurchaseReturnApi.PurchaseReturnPageParams, +) { + return requestClient.get>( + '/erp/purchase-return/page', + { + params, + }, + ); +} + +/** + * 查询采购退货详情 + */ +export function getPurchaseReturn(id: number) { + return requestClient.get( + `/erp/purchase-return/get?id=${id}`, + ); +} + +/** + * 新增采购退货 + */ +export function createPurchaseReturn( + data: ErpPurchaseReturnApi.PurchaseReturn, +) { + return requestClient.post('/erp/purchase-return/create', data); +} + +/** + * 修改采购退货 + */ +export function updatePurchaseReturn( + data: ErpPurchaseReturnApi.PurchaseReturn, +) { + return requestClient.put('/erp/purchase-return/update', data); +} + +/** + * 更新采购退货的状态 + */ +export function updatePurchaseReturnStatus( + params: ErpPurchaseReturnApi.PurchaseReturnStatusParams, +) { + return requestClient.put('/erp/purchase-return/update-status', null, { + params, + }); +} + +/** + * 删除采购退货 + */ +export function deletePurchaseReturn(ids: number[]) { + return requestClient.delete('/erp/purchase-return/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出采购退货 Excel + */ +export function exportPurchaseReturn( + params: ErpPurchaseReturnApi.PurchaseReturnPageParams, +) { + return requestClient.download('/erp/purchase-return/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/purchase/supplier/index.ts b/apps/web-antd/src/api/erp/purchase/supplier/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..fb74b9f3765dfd824a1de208c4886a4774428ac7 --- /dev/null +++ b/apps/web-antd/src/api/erp/purchase/supplier/index.ts @@ -0,0 +1,73 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpSupplierApi { + /** ERP 供应商信息 */ + export interface Supplier { + id?: number; // 供应商编号 + name: string; // 供应商名称 + contact: string; // 联系人 + mobile: string; // 手机号码 + telephone: string; // 联系电话 + email: string; // 电子邮箱 + fax: string; // 传真 + remark: string; // 备注 + status: number; // 开启状态 + sort: number; // 排序 + taxNo: string; // 纳税人识别号 + taxPercent: number; // 税率 + bankName: string; // 开户行 + bankAccount: string; // 开户账号 + bankAddress: string; // 开户地址 + } + + /** 供应商分页查询参数 */ + export interface SupplierPageParam extends PageParam { + name?: string; + mobile?: string; + status?: number; + } +} + +/** 查询供应商分页 */ +export function getSupplierPage(params: ErpSupplierApi.SupplierPageParam) { + return requestClient.get>( + '/erp/supplier/page', + { params }, + ); +} + +/** 获得供应商精简列表 */ +export function getSupplierSimpleList() { + return requestClient.get( + '/erp/supplier/simple-list', + ); +} + +/** 查询供应商详情 */ +export function getSupplier(id: number) { + return requestClient.get( + `/erp/supplier/get?id=${id}`, + ); +} + +/** 新增供应商 */ +export function createSupplier(data: ErpSupplierApi.Supplier) { + return requestClient.post('/erp/supplier/create', data); +} + +/** 修改供应商 */ +export function updateSupplier(data: ErpSupplierApi.Supplier) { + return requestClient.put('/erp/supplier/update', data); +} + +/** 删除供应商 */ +export function deleteSupplier(id: number) { + return requestClient.delete(`/erp/supplier/delete?id=${id}`); +} + +/** 导出供应商 Excel */ +export function exportSupplier(params: any) { + return requestClient.download('/erp/supplier/export-excel', { params }); +} diff --git a/apps/web-antd/src/api/erp/sale/customer/index.ts b/apps/web-antd/src/api/erp/sale/customer/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..6cebd018c587ccb32c7c9e35a4917815a7f5dd6b --- /dev/null +++ b/apps/web-antd/src/api/erp/sale/customer/index.ts @@ -0,0 +1,73 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpCustomerApi { + /** ERP 客户信息 */ + export interface Customer { + id?: number; // 客户编号 + name: string; // 客户名称 + contact: string; // 联系人 + mobile: string; // 手机号码 + telephone: string; // 联系电话 + email: string; // 电子邮箱 + fax: string; // 传真 + remark: string; // 备注 + status: number; // 开启状态 + sort: number; // 排序 + taxNo: string; // 纳税人识别号 + taxPercent: number; // 税率 + bankName: string; // 开户行 + bankAccount: string; // 开户账号 + bankAddress: string; // 开户地址 + } + + /** 客户分页查询参数 */ + export interface CustomerPageParam extends PageParam { + name?: string; + mobile?: string; + status?: number; + } +} + +/** 查询客户分页 */ +export function getCustomerPage(params: ErpCustomerApi.CustomerPageParam) { + return requestClient.get>( + '/erp/customer/page', + { params }, + ); +} + +/** 查询客户精简列表 */ +export function getCustomerSimpleList() { + return requestClient.get( + '/erp/customer/simple-list', + ); +} + +/** 查询客户详情 */ +export function getCustomer(id: number) { + return requestClient.get( + `/erp/customer/get?id=${id}`, + ); +} + +/** 新增客户 */ +export function createCustomer(data: ErpCustomerApi.Customer) { + return requestClient.post('/erp/customer/create', data); +} + +/** 修改客户 */ +export function updateCustomer(data: ErpCustomerApi.Customer) { + return requestClient.put('/erp/customer/update', data); +} + +/** 删除客户 */ +export function deleteCustomer(id: number) { + return requestClient.delete(`/erp/customer/delete?id=${id}`); +} + +/** 导出客户 Excel */ +export function exportCustomer(params: any) { + return requestClient.download('/erp/customer/export-excel', { params }); +} diff --git a/apps/web-antd/src/api/erp/sale/order/index.ts b/apps/web-antd/src/api/erp/sale/order/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..211a28e26140400c25286344f0372a61c6aed641 --- /dev/null +++ b/apps/web-antd/src/api/erp/sale/order/index.ts @@ -0,0 +1,70 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpSaleOrderApi { + /** ERP 销售订单信息 */ + export interface SaleOrder { + id?: number; // 订单工单编号 + no: string; // 销售订单号 + customerId: number; // 客户编号 + orderTime: Date; // 订单时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + outCount: number; // 销售出库数量 + returnCount: number; // 销售退货数量 + } + + /** 销售订单分页查询参数 */ + export interface SaleOrderPageParam extends PageParam { + no?: string; + customerId?: number; + status?: number; + } +} + +/** 查询销售订单分页 */ +export function getSaleOrderPage(params: ErpSaleOrderApi.SaleOrderPageParam) { + return requestClient.get>( + '/erp/sale-order/page', + { params }, + ); +} + +/** 查询销售订单详情 */ +export function getSaleOrder(id: number) { + return requestClient.get( + `/erp/sale-order/get?id=${id}`, + ); +} + +/** 新增销售订单 */ +export function createSaleOrder(data: ErpSaleOrderApi.SaleOrder) { + return requestClient.post('/erp/sale-order/create', data); +} + +/** 修改销售订单 */ +export function updateSaleOrder(data: ErpSaleOrderApi.SaleOrder) { + return requestClient.put('/erp/sale-order/update', data); +} + +/** 更新销售订单的状态 */ +export function updateSaleOrderStatus(id: number, status: number) { + return requestClient.put('/erp/sale-order/update-status', null, { + params: { id, status }, + }); +} + +/** 删除销售订单 */ +export function deleteSaleOrder(ids: number[]) { + return requestClient.delete('/erp/sale-order/delete', { + params: { ids: ids.join(',') }, + }); +} + +/** 导出销售订单 Excel */ +export function exportSaleOrder(params: any) { + return requestClient.download('/erp/sale-order/export-excel', { params }); +} diff --git a/apps/web-antd/src/api/erp/sale/out/index.ts b/apps/web-antd/src/api/erp/sale/out/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..62045216a39bc6c63f914a00d0e10e275fb23ff7 --- /dev/null +++ b/apps/web-antd/src/api/erp/sale/out/index.ts @@ -0,0 +1,92 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpSaleOutApi { + /** 销售出库信息 */ + export interface SaleOut { + id?: number; // 销售出库编号 + no: string; // 销售出库号 + customerId: number; // 客户编号 + outTime: Date; // 出库时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 销售出库分页查询参数 */ + export interface SaleOutPageParams extends PageParam { + no?: string; + customerId?: number; + status?: number; + } + + /** 销售出库状态更新参数 */ + export interface SaleOutStatusParams { + id: number; + status: number; + } +} + +/** + * 查询销售出库分页 + */ +export function getSaleOutPage(params: ErpSaleOutApi.SaleOutPageParams) { + return requestClient.get>( + '/erp/sale-out/page', + { + params, + }, + ); +} + +/** + * 查询销售出库详情 + */ +export function getSaleOut(id: number) { + return requestClient.get(`/erp/sale-out/get?id=${id}`); +} + +/** + * 新增销售出库 + */ +export function createSaleOut(data: ErpSaleOutApi.SaleOut) { + return requestClient.post('/erp/sale-out/create', data); +} + +/** + * 修改销售出库 + */ +export function updateSaleOut(data: ErpSaleOutApi.SaleOut) { + return requestClient.put('/erp/sale-out/update', data); +} + +/** + * 更新销售出库的状态 + */ +export function updateSaleOutStatus(params: ErpSaleOutApi.SaleOutStatusParams) { + return requestClient.put('/erp/sale-out/update-status', null, { + params, + }); +} + +/** + * 删除销售出库 + */ +export function deleteSaleOut(ids: number[]) { + return requestClient.delete('/erp/sale-out/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出销售出库 Excel + */ +export function exportSaleOut(params: ErpSaleOutApi.SaleOutPageParams) { + return requestClient.download('/erp/sale-out/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/sale/return/index.ts b/apps/web-antd/src/api/erp/sale/return/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..0ebcfc7529109eaee6636f5b9c0e20c8b471ff57 --- /dev/null +++ b/apps/web-antd/src/api/erp/sale/return/index.ts @@ -0,0 +1,100 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpSaleReturnApi { + /** 销售退货信息 */ + export interface SaleReturn { + id?: number; // 销售退货编号 + no: string; // 销售退货号 + customerId: number; // 客户编号 + returnTime: Date; // 退货时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 销售退货分页查询参数 */ + export interface SaleReturnPageParams extends PageParam { + no?: string; + customerId?: number; + status?: number; + } + + /** 销售退货状态更新参数 */ + export interface SaleReturnStatusParams { + id: number; + status: number; + } +} + +/** + * 查询销售退货分页 + */ +export function getSaleReturnPage( + params: ErpSaleReturnApi.SaleReturnPageParams, +) { + return requestClient.get>( + '/erp/sale-return/page', + { + params, + }, + ); +} + +/** + * 查询销售退货详情 + */ +export function getSaleReturn(id: number) { + return requestClient.get( + `/erp/sale-return/get?id=${id}`, + ); +} + +/** + * 新增销售退货 + */ +export function createSaleReturn(data: ErpSaleReturnApi.SaleReturn) { + return requestClient.post('/erp/sale-return/create', data); +} + +/** + * 修改销售退货 + */ +export function updateSaleReturn(data: ErpSaleReturnApi.SaleReturn) { + return requestClient.put('/erp/sale-return/update', data); +} + +/** + * 更新销售退货的状态 + */ +export function updateSaleReturnStatus( + params: ErpSaleReturnApi.SaleReturnStatusParams, +) { + return requestClient.put('/erp/sale-return/update-status', null, { + params, + }); +} + +/** + * 删除销售退货 + */ +export function deleteSaleReturn(ids: number[]) { + return requestClient.delete('/erp/sale-return/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出销售退货 Excel + */ +export function exportSaleReturn( + params: ErpSaleReturnApi.SaleReturnPageParams, +) { + return requestClient.download('/erp/sale-return/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/statistics/purchase/index.ts b/apps/web-antd/src/api/erp/statistics/purchase/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..170b9c117a3c7043e0a098d0bf4aa41400c85ad3 --- /dev/null +++ b/apps/web-antd/src/api/erp/statistics/purchase/index.ts @@ -0,0 +1,31 @@ +import { requestClient } from '#/api/request'; + +export namespace ErpPurchaseStatisticsApi { + /** ERP 采购全局统计 */ + export interface PurchaseSummary { + todayPrice: number; // 今日采购金额 + yesterdayPrice: number; // 昨日采购金额 + monthPrice: number; // 本月采购金额 + yearPrice: number; // 今年采购金额 + } + + /** ERP 采购时间段统计 */ + export interface PurchaseTimeSummary { + time: string; // 时间 + price: number; // 采购金额 + } +} + +/** 获得采购统计 */ +export function getPurchaseSummary() { + return requestClient.get( + '/erp/purchase-statistics/summary', + ); +} + +/** 获得采购时间段统计 */ +export function getPurchaseTimeSummary() { + return requestClient.get( + '/erp/purchase-statistics/time-summary', + ); +} diff --git a/apps/web-antd/src/api/erp/statistics/sale/index.ts b/apps/web-antd/src/api/erp/statistics/sale/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..c4c7986a8e2538d500012e86eeadb045aad00566 --- /dev/null +++ b/apps/web-antd/src/api/erp/statistics/sale/index.ts @@ -0,0 +1,31 @@ +import { requestClient } from '#/api/request'; + +export namespace ErpSaleStatisticsApi { + /** ERP 销售全局统计 */ + export interface SaleSummary { + todayPrice: number; // 今日销售金额 + yesterdayPrice: number; // 昨日销售金额 + monthPrice: number; // 本月销售金额 + yearPrice: number; // 今年销售金额 + } + + /** ERP 销售时间段统计 */ + export interface SaleTimeSummary { + time: string; // 时间 + price: number; // 销售金额 + } +} + +/** 获得销售统计 */ +export function getSaleSummary() { + return requestClient.get( + '/erp/sale-statistics/summary', + ); +} + +/** 获得销售时间段统计 */ +export function getSaleTimeSummary() { + return requestClient.get( + '/erp/sale-statistics/time-summary', + ); +} diff --git a/apps/web-antd/src/api/erp/stock/check/index.ts b/apps/web-antd/src/api/erp/stock/check/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..090d878675b72d88084dddd514873f0b9b6be70c --- /dev/null +++ b/apps/web-antd/src/api/erp/stock/check/index.ts @@ -0,0 +1,98 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpStockCheckApi { + /** 库存盘点单信息 */ + export interface StockCheck { + id?: number; // 盘点编号 + no: string; // 盘点单号 + checkTime: Date; // 盘点时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 库存盘点单分页查询参数 */ + export interface StockCheckPageParams extends PageParam { + no?: string; + status?: number; + } + + /** 库存盘点单状态更新参数 */ + export interface StockCheckStatusParams { + id: number; + status: number; + } +} + +/** + * 查询库存盘点单分页 + */ +export function getStockCheckPage( + params: ErpStockCheckApi.StockCheckPageParams, +) { + return requestClient.get>( + '/erp/stock-check/page', + { + params, + }, + ); +} + +/** + * 查询库存盘点单详情 + */ +export function getStockCheck(id: number) { + return requestClient.get( + `/erp/stock-check/get?id=${id}`, + ); +} + +/** + * 新增库存盘点单 + */ +export function createStockCheck(data: ErpStockCheckApi.StockCheck) { + return requestClient.post('/erp/stock-check/create', data); +} + +/** + * 修改库存盘点单 + */ +export function updateStockCheck(data: ErpStockCheckApi.StockCheck) { + return requestClient.put('/erp/stock-check/update', data); +} + +/** + * 更新库存盘点单的状态 + */ +export function updateStockCheckStatus( + params: ErpStockCheckApi.StockCheckStatusParams, +) { + return requestClient.put('/erp/stock-check/update-status', null, { + params, + }); +} + +/** + * 删除库存盘点单 + */ +export function deleteStockCheck(ids: number[]) { + return requestClient.delete('/erp/stock-check/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出库存盘点单 Excel + */ +export function exportStockCheck( + params: ErpStockCheckApi.StockCheckPageParams, +) { + return requestClient.download('/erp/stock-check/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/stock/in/index.ts b/apps/web-antd/src/api/erp/stock/in/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..119398bc382a1b08474ee1791937383da5d4a92d --- /dev/null +++ b/apps/web-antd/src/api/erp/stock/in/index.ts @@ -0,0 +1,92 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpStockInApi { + /** 其它入库单信息 */ + export interface StockIn { + id?: number; // 入库编号 + no: string; // 入库单号 + supplierId: number; // 供应商编号 + inTime: Date; // 入库时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 其它入库单分页查询参数 */ + export interface StockInPageParams extends PageParam { + no?: string; + supplierId?: number; + status?: number; + } + + /** 其它入库单状态更新参数 */ + export interface StockInStatusParams { + id: number; + status: number; + } +} + +/** + * 查询其它入库单分页 + */ +export function getStockInPage(params: ErpStockInApi.StockInPageParams) { + return requestClient.get>( + '/erp/stock-in/page', + { + params, + }, + ); +} + +/** + * 查询其它入库单详情 + */ +export function getStockIn(id: number) { + return requestClient.get(`/erp/stock-in/get?id=${id}`); +} + +/** + * 新增其它入库单 + */ +export function createStockIn(data: ErpStockInApi.StockIn) { + return requestClient.post('/erp/stock-in/create', data); +} + +/** + * 修改其它入库单 + */ +export function updateStockIn(data: ErpStockInApi.StockIn) { + return requestClient.put('/erp/stock-in/update', data); +} + +/** + * 更新其它入库单的状态 + */ +export function updateStockInStatus(params: ErpStockInApi.StockInStatusParams) { + return requestClient.put('/erp/stock-in/update-status', null, { + params, + }); +} + +/** + * 删除其它入库单 + */ +export function deleteStockIn(ids: number[]) { + return requestClient.delete('/erp/stock-in/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出其它入库单 Excel + */ +export function exportStockIn(params: ErpStockInApi.StockInPageParams) { + return requestClient.download('/erp/stock-in/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/stock/move/index.ts b/apps/web-antd/src/api/erp/stock/move/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..765d27eba702faf2db479d10108b2a2c2cef9388 --- /dev/null +++ b/apps/web-antd/src/api/erp/stock/move/index.ts @@ -0,0 +1,94 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpStockMoveApi { + /** 库存调拨单信息 */ + export interface StockMove { + id?: number; // 调拨编号 + no: string; // 调拨单号 + outTime: Date; // 调拨时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 库存调拨单分页查询参数 */ + export interface StockMovePageParams extends PageParam { + no?: string; + status?: number; + } + + /** 库存调拨单状态更新参数 */ + export interface StockMoveStatusParams { + id: number; + status: number; + } +} + +/** + * 查询库存调拨单分页 + */ +export function getStockMovePage(params: ErpStockMoveApi.StockMovePageParams) { + return requestClient.get>( + '/erp/stock-move/page', + { + params, + }, + ); +} + +/** + * 查询库存调拨单详情 + */ +export function getStockMove(id: number) { + return requestClient.get( + `/erp/stock-move/get?id=${id}`, + ); +} + +/** + * 新增库存调拨单 + */ +export function createStockMove(data: ErpStockMoveApi.StockMove) { + return requestClient.post('/erp/stock-move/create', data); +} + +/** + * 修改库存调拨单 + */ +export function updateStockMove(data: ErpStockMoveApi.StockMove) { + return requestClient.put('/erp/stock-move/update', data); +} + +/** + * 更新库存调拨单的状态 + */ +export function updateStockMoveStatus( + params: ErpStockMoveApi.StockMoveStatusParams, +) { + return requestClient.put('/erp/stock-move/update-status', null, { + params, + }); +} + +/** + * 删除库存调拨单 + */ +export function deleteStockMove(ids: number[]) { + return requestClient.delete('/erp/stock-move/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出库存调拨单 Excel + */ +export function exportStockMove(params: ErpStockMoveApi.StockMovePageParams) { + return requestClient.download('/erp/stock-move/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/stock/out/index.ts b/apps/web-antd/src/api/erp/stock/out/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..2224e2ddbfe4ee7c9db5c7199c41bc299047e975 --- /dev/null +++ b/apps/web-antd/src/api/erp/stock/out/index.ts @@ -0,0 +1,96 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpStockOutApi { + /** 其它出库单信息 */ + export interface StockOut { + id?: number; // 出库编号 + no: string; // 出库单号 + customerId: number; // 客户编号 + outTime: Date; // 出库时间 + totalCount: number; // 合计数量 + totalPrice: number; // 合计金额,单位:元 + status: number; // 状态 + remark: string; // 备注 + } + + /** 其它出库单分页查询参数 */ + export interface StockOutPageParams extends PageParam { + no?: string; + customerId?: number; + status?: number; + } + + /** 其它出库单状态更新参数 */ + export interface StockOutStatusParams { + id: number; + status: number; + } +} + +/** + * 查询其它出库单分页 + */ +export function getStockOutPage(params: ErpStockOutApi.StockOutPageParams) { + return requestClient.get>( + '/erp/stock-out/page', + { + params, + }, + ); +} + +/** + * 查询其它出库单详情 + */ +export function getStockOut(id: number) { + return requestClient.get( + `/erp/stock-out/get?id=${id}`, + ); +} + +/** + * 新增其它出库单 + */ +export function createStockOut(data: ErpStockOutApi.StockOut) { + return requestClient.post('/erp/stock-out/create', data); +} + +/** + * 修改其它出库单 + */ +export function updateStockOut(data: ErpStockOutApi.StockOut) { + return requestClient.put('/erp/stock-out/update', data); +} + +/** + * 更新其它出库单的状态 + */ +export function updateStockOutStatus( + params: ErpStockOutApi.StockOutStatusParams, +) { + return requestClient.put('/erp/stock-out/update-status', null, { + params, + }); +} + +/** + * 删除其它出库单 + */ +export function deleteStockOut(ids: number[]) { + return requestClient.delete('/erp/stock-out/delete', { + params: { + ids: ids.join(','), + }, + }); +} + +/** + * 导出其它出库单 Excel + */ +export function exportStockOut(params: ErpStockOutApi.StockOutPageParams) { + return requestClient.download('/erp/stock-out/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/stock/record/index.ts b/apps/web-antd/src/api/erp/stock/record/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..364091bfbcd684a07d9649cdf4dbf25b215f4b01 --- /dev/null +++ b/apps/web-antd/src/api/erp/stock/record/index.ts @@ -0,0 +1,47 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpStockRecordApi { + /** ERP 产品库存明细 */ + export interface StockRecord { + id?: number; // 编号 + productId: number; // 产品编号 + warehouseId: number; // 仓库编号 + count: number; // 出入库数量 + totalCount: number; // 总库存量 + bizType: number; // 业务类型 + bizId: number; // 业务编号 + bizItemId: number; // 业务项编号 + bizNo: string; // 业务单号 + } + + /** 库存记录分页查询参数 */ + export interface StockRecordPageParam extends PageParam { + productId?: number; + warehouseId?: number; + bizType?: number; + } +} + +/** 查询产品库存明细分页 */ +export function getStockRecordPage( + params: ErpStockRecordApi.StockRecordPageParam, +) { + return requestClient.get>( + '/erp/stock-record/page', + { params }, + ); +} + +/** 查询产品库存明细详情 */ +export function getStockRecord(id: number) { + return requestClient.get( + `/erp/stock-record/get?id=${id}`, + ); +} + +/** 导出产品库存明细 Excel */ +export function exportStockRecord(params: any) { + return requestClient.download('/erp/stock-record/export-excel', { params }); +} diff --git a/apps/web-antd/src/api/erp/stock/stock/index.ts b/apps/web-antd/src/api/erp/stock/stock/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..57d4ec22946e8bb2f723f8f9a95c5fd834cb0a0c --- /dev/null +++ b/apps/web-antd/src/api/erp/stock/stock/index.ts @@ -0,0 +1,70 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +namespace ErpStockApi { + /** 产品库存信息 */ + export interface Stock { + id?: number; // 编号 + productId: number; // 产品编号 + warehouseId: number; // 仓库编号 + count: number; // 库存数量 + } + + /** 产品库存分页查询参数 */ + export interface StockPageParams extends PageParam { + productId?: number; + warehouseId?: number; + } + + /** 产品库存查询参数 */ + export interface StockQueryParams { + productId: number; + warehouseId: number; + } +} + +/** + * 查询产品库存分页 + */ +export function getStockPage(params: ErpStockApi.StockPageParams) { + return requestClient.get>('/erp/stock/page', { + params, + }); +} + +/** + * 查询产品库存详情 + */ +export function getStock(id: number) { + return requestClient.get(`/erp/stock/get?id=${id}`); +} + +/** + * 根据产品和仓库查询库存详情 + */ +export function getStockByProductAndWarehouse( + params: ErpStockApi.StockQueryParams, +) { + return requestClient.get('/erp/stock/get', { + params, + }); +} + +/** + * 获得产品库存数量 + */ +export function getStockCount(productId: number) { + return requestClient.get('/erp/stock/get-count', { + params: { productId }, + }); +} + +/** + * 导出产品库存 Excel + */ +export function exportStock(params: ErpStockApi.StockPageParams) { + return requestClient.download('/erp/stock/export-excel', { + params, + }); +} diff --git a/apps/web-antd/src/api/erp/stock/warehouse/index.ts b/apps/web-antd/src/api/erp/stock/warehouse/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1cac8ead1e85a6d6da5f6050a9006439411a696 --- /dev/null +++ b/apps/web-antd/src/api/erp/stock/warehouse/index.ts @@ -0,0 +1,77 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace ErpWarehouseApi { + /** ERP 仓库信息 */ + export interface Warehouse { + id?: number; // 仓库编号 + name: string; // 仓库名称 + address: string; // 仓库地址 + sort: number; // 排序 + remark: string; // 备注 + principal: string; // 负责人 + warehousePrice: number; // 仓储费,单位:元 + truckagePrice: number; // 搬运费,单位:元 + status: number; // 开启状态 + defaultStatus: boolean; // 是否默认 + } + + /** 仓库分页查询参数 */ + export interface WarehousePageParam extends PageParam { + name?: string; + status?: number; + } +} + +/** 查询仓库分页 */ +export function getWarehousePage(params: ErpWarehouseApi.WarehousePageParam) { + return requestClient.get>( + '/erp/warehouse/page', + { params }, + ); +} + +/** 查询仓库精简列表 */ +export function getWarehouseSimpleList() { + return requestClient.get( + '/erp/warehouse/simple-list', + ); +} + +/** 查询仓库详情 */ +export function getWarehouse(id: number) { + return requestClient.get( + `/erp/warehouse/get?id=${id}`, + ); +} + +/** 新增仓库 */ +export function createWarehouse(data: ErpWarehouseApi.Warehouse) { + return requestClient.post('/erp/warehouse/create', data); +} + +/** 修改仓库 */ +export function updateWarehouse(data: ErpWarehouseApi.Warehouse) { + return requestClient.put('/erp/warehouse/update', data); +} + +/** 修改仓库默认状态 */ +export function updateWarehouseDefaultStatus( + id: number, + defaultStatus: boolean, +) { + return requestClient.put('/erp/warehouse/update-default-status', null, { + params: { id, defaultStatus }, + }); +} + +/** 删除仓库 */ +export function deleteWarehouse(id: number) { + return requestClient.delete(`/erp/warehouse/delete?id=${id}`); +} + +/** 导出仓库 Excel */ +export function exportWarehouse(params: any) { + return requestClient.download('/erp/warehouse/export-excel', { params }); +} diff --git a/apps/web-antd/src/views/erp/home/components/SummaryCard.vue b/apps/web-antd/src/views/erp/home/components/SummaryCard.vue new file mode 100644 index 0000000000000000000000000000000000000000..ff98e556a0585025c693719ccf4d058e64b3abf7 --- /dev/null +++ b/apps/web-antd/src/views/erp/home/components/SummaryCard.vue @@ -0,0 +1,69 @@ + + + diff --git a/apps/web-antd/src/views/erp/home/components/TimeSummaryChart.vue b/apps/web-antd/src/views/erp/home/components/TimeSummaryChart.vue new file mode 100644 index 0000000000000000000000000000000000000000..52bbcd76a523156b03a0032ee2b09df12312eab1 --- /dev/null +++ b/apps/web-antd/src/views/erp/home/components/TimeSummaryChart.vue @@ -0,0 +1,174 @@ + + + diff --git a/apps/web-antd/src/views/erp/home/index.vue b/apps/web-antd/src/views/erp/home/index.vue index ed90b24c376aa16b6596067be33acdd7e6d27df9..8befaf713178f48ac246c79b830510e026486010 100644 --- a/apps/web-antd/src/views/erp/home/index.vue +++ b/apps/web-antd/src/views/erp/home/index.vue @@ -1,7 +1,21 @@ - -
- + + +
+ + + + + + + + + + + + + + +
+