李红攀:V2.0.001仓库管理
This commit is contained in:
121
src/api/erp/purchase-requisition/index.ts
Normal file
121
src/api/erp/purchase-requisition/index.ts
Normal file
@@ -0,0 +1,121 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 请购单明细信息 */
|
||||
export interface PurchaseRequisitionItem {
|
||||
id?: number
|
||||
requisitionId?: number
|
||||
productId?: number
|
||||
productName?: string
|
||||
productUnitId?: number
|
||||
productUnitName?: string
|
||||
productSpec?: string
|
||||
productBarCode?: string
|
||||
productPrice?: number
|
||||
count?: number
|
||||
totalPrice?: number
|
||||
purpose?: string
|
||||
brandId?: number
|
||||
brandName?: string
|
||||
supplierId?: number
|
||||
supplierName?: string
|
||||
approveCount?: number
|
||||
purchaseCount?: number
|
||||
remark?: string
|
||||
createTime?: string
|
||||
saleOrderId?: number
|
||||
saleOrderNo?: string
|
||||
}
|
||||
|
||||
/** 请购单信息 */
|
||||
export interface PurchaseRequisition {
|
||||
id?: number
|
||||
no?: string
|
||||
type?: number
|
||||
priority?: number
|
||||
status?: number
|
||||
requesterId?: number
|
||||
requesterName?: string
|
||||
requesterNickname?: string
|
||||
requesterDeptId?: number
|
||||
requesterDeptName?: string
|
||||
requestTime?: string
|
||||
expectedTime?: string
|
||||
approverId?: number
|
||||
approverName?: string
|
||||
approveTime?: string
|
||||
approveRemark?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
additionalFee?: number
|
||||
emergencyDegree?: number
|
||||
fileUrl?: string
|
||||
remark?: string
|
||||
supplierId?: number
|
||||
supplierName?: string
|
||||
items?: PurchaseRequisitionItem[]
|
||||
hasApprovalRecords?: boolean
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取请购单分页列表 */
|
||||
export function getPurchaseRequisitionPage(params: PageParam) {
|
||||
return http.get<PageResult<PurchaseRequisition>>('/erp/purchase-requisition/page', params)
|
||||
}
|
||||
|
||||
/** 获取请购单详情 */
|
||||
export function getPurchaseRequisition(id: number) {
|
||||
return http.get<PurchaseRequisition>(`/erp/purchase-requisition/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建请购单 */
|
||||
export function createPurchaseRequisition(data: PurchaseRequisition) {
|
||||
return http.post<number>('/erp/purchase-requisition/create', data)
|
||||
}
|
||||
|
||||
/** 更新请购单 */
|
||||
export function updatePurchaseRequisition(data: PurchaseRequisition) {
|
||||
return http.put<boolean>('/erp/purchase-requisition/update', data)
|
||||
}
|
||||
|
||||
/** 删除请购单 */
|
||||
export function deletePurchaseRequisition(id: number) {
|
||||
return http.delete<boolean>(`/erp/purchase-requisition/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 更新请购单状态 */
|
||||
export function updatePurchaseRequisitionStatus(id: number, status: number) {
|
||||
return http.put<boolean>(`/erp/purchase-requisition/update-status?id=${id}&status=${status}`)
|
||||
}
|
||||
|
||||
/** 请购类型选项 */
|
||||
export const REQUISITION_TYPE_OPTIONS = [
|
||||
{ value: 1, label: '请购' },
|
||||
{ value: 2, label: '补货' },
|
||||
{ value: 3, label: '其他' },
|
||||
]
|
||||
|
||||
/** 优先级选项 */
|
||||
export const PRIORITY_OPTIONS = [
|
||||
{ value: 1, label: '低' },
|
||||
{ value: 2, label: '中' },
|
||||
{ value: 3, label: '高' },
|
||||
{ value: 4, label: '紧急' },
|
||||
]
|
||||
|
||||
/** 状态选项 */
|
||||
export const STATUS_OPTIONS = [
|
||||
{ value: 1, label: '待审核' },
|
||||
{ value: 2, label: '已审核' },
|
||||
{ value: 3, label: '已驳回' },
|
||||
{ value: 4, label: '已取消' },
|
||||
{ value: 5, label: '已采购' },
|
||||
]
|
||||
|
||||
/** 紧急程度选项 */
|
||||
export const EMERGENCY_OPTIONS = [
|
||||
{ value: 1, label: '普通' },
|
||||
{ value: 2, label: '较急' },
|
||||
{ value: 3, label: '紧急' },
|
||||
{ value: 4, label: '特急' },
|
||||
]
|
||||
64
src/api/erp/stock-check/index.ts
Normal file
64
src/api/erp/stock-check/index.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 盘点单项 */
|
||||
export interface StockCheckItem {
|
||||
id?: number
|
||||
stockCheckId?: number
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
productId?: number
|
||||
productName?: string
|
||||
productUnitName?: string
|
||||
stockCount?: number
|
||||
actualCount?: number
|
||||
count?: number
|
||||
productPrice?: number
|
||||
totalPrice?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/** 盘点单信息 */
|
||||
export interface StockCheck {
|
||||
id?: number
|
||||
no?: string
|
||||
checkTime?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
status?: number
|
||||
remark?: string
|
||||
items?: StockCheckItem[]
|
||||
productNames?: string
|
||||
creatorName?: string
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取盘点单分页列表 */
|
||||
export function getStockCheckPage(params: PageParam) {
|
||||
return http.get<PageResult<StockCheck>>('/erp/stock-check/page', params)
|
||||
}
|
||||
|
||||
/** 获取盘点单详情 */
|
||||
export function getStockCheck(id: number) {
|
||||
return http.get<StockCheck>(`/erp/stock-check/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建盘点单 */
|
||||
export function createStockCheck(data: StockCheck) {
|
||||
return http.post<number>('/erp/stock-check/create', data)
|
||||
}
|
||||
|
||||
/** 更新盘点单 */
|
||||
export function updateStockCheck(data: StockCheck) {
|
||||
return http.put<boolean>('/erp/stock-check/update', data)
|
||||
}
|
||||
|
||||
/** 更新盘点单状态 */
|
||||
export function updateStockCheckStatus(id: number, status: number) {
|
||||
return http.put<boolean>('/erp/stock-check/update-status', undefined, { id, status })
|
||||
}
|
||||
|
||||
/** 删除盘点单 */
|
||||
export function deleteStockCheck(ids: number[]) {
|
||||
return http.delete<boolean>('/erp/stock-check/delete', undefined, { ids: ids.join(',') })
|
||||
}
|
||||
63
src/api/erp/stock-gain/index.ts
Normal file
63
src/api/erp/stock-gain/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 报溢单项 */
|
||||
export interface StockGainItem {
|
||||
id?: number
|
||||
stockGainId?: number
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
productId?: number
|
||||
productName?: string
|
||||
productUnitName?: string
|
||||
count?: number
|
||||
productPrice?: number
|
||||
totalPrice?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/** 报溢单信息 */
|
||||
export interface StockGain {
|
||||
id?: number
|
||||
no?: string
|
||||
gainTime?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
status?: number
|
||||
reason?: string
|
||||
remark?: string
|
||||
items?: StockGainItem[]
|
||||
productNames?: string
|
||||
creatorName?: string
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取报溢单分页列表 */
|
||||
export function getStockGainPage(params: PageParam) {
|
||||
return http.get<PageResult<StockGain>>('/erp/stock-gain/page', params)
|
||||
}
|
||||
|
||||
/** 获取报溢单详情 */
|
||||
export function getStockGain(id: number) {
|
||||
return http.get<StockGain>(`/erp/stock-gain/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建报溢单 */
|
||||
export function createStockGain(data: StockGain) {
|
||||
return http.post<number>('/erp/stock-gain/create', data)
|
||||
}
|
||||
|
||||
/** 更新报溢单 */
|
||||
export function updateStockGain(data: StockGain) {
|
||||
return http.put<boolean>('/erp/stock-gain/update', data)
|
||||
}
|
||||
|
||||
/** 更新报溢单状态 */
|
||||
export function updateStockGainStatus(id: number, status: number) {
|
||||
return http.put<boolean>('/erp/stock-gain/update-status', undefined, { id, status })
|
||||
}
|
||||
|
||||
/** 删除报溢单 */
|
||||
export function deleteStockGain(ids: number[]) {
|
||||
return http.delete<boolean>('/erp/stock-gain/delete', undefined, { ids: ids.join(',') })
|
||||
}
|
||||
64
src/api/erp/stock-in/index.ts
Normal file
64
src/api/erp/stock-in/index.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 其他入库单项 */
|
||||
export interface StockInItem {
|
||||
id?: number
|
||||
stockInId?: number
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
productId?: number
|
||||
productName?: string
|
||||
productUnitName?: string
|
||||
count?: number
|
||||
productPrice?: number
|
||||
totalPrice?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/** 其他入库单信息 */
|
||||
export interface StockIn {
|
||||
id?: number
|
||||
no?: string
|
||||
supplierId?: number
|
||||
supplierName?: string
|
||||
inTime?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
status?: number
|
||||
remark?: string
|
||||
items?: StockInItem[]
|
||||
productNames?: string
|
||||
creatorName?: string
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取其他入库单分页列表 */
|
||||
export function getStockInPage(params: PageParam) {
|
||||
return http.get<PageResult<StockIn>>('/erp/stock-in/page', params)
|
||||
}
|
||||
|
||||
/** 获取其他入库单详情 */
|
||||
export function getStockIn(id: number) {
|
||||
return http.get<StockIn>(`/erp/stock-in/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建其他入库单 */
|
||||
export function createStockIn(data: StockIn) {
|
||||
return http.post<number>('/erp/stock-in/create', data)
|
||||
}
|
||||
|
||||
/** 更新其他入库单 */
|
||||
export function updateStockIn(data: StockIn) {
|
||||
return http.put<boolean>('/erp/stock-in/update', data)
|
||||
}
|
||||
|
||||
/** 更新其他入库单状态 */
|
||||
export function updateStockInStatus(id: number, status: number) {
|
||||
return http.put<boolean>('/erp/stock-in/update-status', undefined, { id, status })
|
||||
}
|
||||
|
||||
/** 删除其他入库单 */
|
||||
export function deleteStockIn(ids: number[]) {
|
||||
return http.delete<boolean>('/erp/stock-in/delete', undefined, { ids: ids.join(',') })
|
||||
}
|
||||
63
src/api/erp/stock-loss/index.ts
Normal file
63
src/api/erp/stock-loss/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 报损单项 */
|
||||
export interface StockLossItem {
|
||||
id?: number
|
||||
stockLossId?: number
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
productId?: number
|
||||
productName?: string
|
||||
productUnitName?: string
|
||||
count?: number
|
||||
productPrice?: number
|
||||
totalPrice?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/** 报损单信息 */
|
||||
export interface StockLoss {
|
||||
id?: number
|
||||
no?: string
|
||||
lossTime?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
status?: number
|
||||
reason?: string
|
||||
remark?: string
|
||||
items?: StockLossItem[]
|
||||
productNames?: string
|
||||
creatorName?: string
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取报损单分页列表 */
|
||||
export function getStockLossPage(params: PageParam) {
|
||||
return http.get<PageResult<StockLoss>>('/erp/stock-loss/page', params)
|
||||
}
|
||||
|
||||
/** 获取报损单详情 */
|
||||
export function getStockLoss(id: number) {
|
||||
return http.get<StockLoss>(`/erp/stock-loss/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建报损单 */
|
||||
export function createStockLoss(data: StockLoss) {
|
||||
return http.post<number>('/erp/stock-loss/create', data)
|
||||
}
|
||||
|
||||
/** 更新报损单 */
|
||||
export function updateStockLoss(data: StockLoss) {
|
||||
return http.put<boolean>('/erp/stock-loss/update', data)
|
||||
}
|
||||
|
||||
/** 更新报损单状态 */
|
||||
export function updateStockLossStatus(id: number, status: number) {
|
||||
return http.put<boolean>('/erp/stock-loss/update-status', undefined, { id, status })
|
||||
}
|
||||
|
||||
/** 删除报损单 */
|
||||
export function deleteStockLoss(ids: number[]) {
|
||||
return http.delete<boolean>('/erp/stock-loss/delete', undefined, { ids: ids.join(',') })
|
||||
}
|
||||
64
src/api/erp/stock-move/index.ts
Normal file
64
src/api/erp/stock-move/index.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 调拨单项 */
|
||||
export interface StockMoveItem {
|
||||
id?: number
|
||||
stockMoveId?: number
|
||||
fromWarehouseId?: number
|
||||
fromWarehouseName?: string
|
||||
toWarehouseId?: number
|
||||
toWarehouseName?: string
|
||||
productId?: number
|
||||
productName?: string
|
||||
productUnitName?: string
|
||||
count?: number
|
||||
productPrice?: number
|
||||
totalPrice?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/** 调拨单信息 */
|
||||
export interface StockMove {
|
||||
id?: number
|
||||
no?: string
|
||||
moveTime?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
status?: number
|
||||
remark?: string
|
||||
items?: StockMoveItem[]
|
||||
productNames?: string
|
||||
creatorName?: string
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取调拨单分页列表 */
|
||||
export function getStockMovePage(params: PageParam) {
|
||||
return http.get<PageResult<StockMove>>('/erp/stock-move/page', params)
|
||||
}
|
||||
|
||||
/** 获取调拨单详情 */
|
||||
export function getStockMove(id: number) {
|
||||
return http.get<StockMove>(`/erp/stock-move/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建调拨单 */
|
||||
export function createStockMove(data: StockMove) {
|
||||
return http.post<number>('/erp/stock-move/create', data)
|
||||
}
|
||||
|
||||
/** 更新调拨单 */
|
||||
export function updateStockMove(data: StockMove) {
|
||||
return http.put<boolean>('/erp/stock-move/update', data)
|
||||
}
|
||||
|
||||
/** 更新调拨单状态 */
|
||||
export function updateStockMoveStatus(id: number, status: number) {
|
||||
return http.put<boolean>('/erp/stock-move/update-status', undefined, { id, status })
|
||||
}
|
||||
|
||||
/** 删除调拨单 */
|
||||
export function deleteStockMove(ids: number[]) {
|
||||
return http.delete<boolean>('/erp/stock-move/delete', undefined, { ids: ids.join(',') })
|
||||
}
|
||||
64
src/api/erp/stock-out/index.ts
Normal file
64
src/api/erp/stock-out/index.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 其他出库单项 */
|
||||
export interface StockOutItem {
|
||||
id?: number
|
||||
stockOutId?: number
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
productId?: number
|
||||
productName?: string
|
||||
productUnitName?: string
|
||||
count?: number
|
||||
productPrice?: number
|
||||
totalPrice?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/** 其他出库单信息 */
|
||||
export interface StockOut {
|
||||
id?: number
|
||||
no?: string
|
||||
customerId?: number
|
||||
customerName?: string
|
||||
outTime?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
status?: number
|
||||
remark?: string
|
||||
items?: StockOutItem[]
|
||||
productNames?: string
|
||||
creatorName?: string
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取其他出库单分页列表 */
|
||||
export function getStockOutPage(params: PageParam) {
|
||||
return http.get<PageResult<StockOut>>('/erp/stock-out/page', params)
|
||||
}
|
||||
|
||||
/** 获取其他出库单详情 */
|
||||
export function getStockOut(id: number) {
|
||||
return http.get<StockOut>(`/erp/stock-out/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建其他出库单 */
|
||||
export function createStockOut(data: StockOut) {
|
||||
return http.post<number>('/erp/stock-out/create', data)
|
||||
}
|
||||
|
||||
/** 更新其他出库单 */
|
||||
export function updateStockOut(data: StockOut) {
|
||||
return http.put<boolean>('/erp/stock-out/update', data)
|
||||
}
|
||||
|
||||
/** 更新其他出库单状态 */
|
||||
export function updateStockOutStatus(id: number, status: number) {
|
||||
return http.put<boolean>('/erp/stock-out/update-status', undefined, { id, status })
|
||||
}
|
||||
|
||||
/** 删除其他出库单 */
|
||||
export function deleteStockOut(ids: number[]) {
|
||||
return http.delete<boolean>('/erp/stock-out/delete', undefined, { ids: ids.join(',') })
|
||||
}
|
||||
45
src/api/erp/stock-record/index.ts
Normal file
45
src/api/erp/stock-record/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 产品库存明细信息 */
|
||||
export interface StockRecord {
|
||||
id?: number
|
||||
productId?: number
|
||||
productName?: string
|
||||
unitName?: string
|
||||
categoryName?: string
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
count?: number
|
||||
totalCount?: number
|
||||
bizType?: number
|
||||
bizId?: number
|
||||
bizItemId?: number
|
||||
bizNo?: string
|
||||
unitPrice?: number
|
||||
stockValue?: number
|
||||
creatorName?: string
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 业务类型选项 */
|
||||
export const BIZ_TYPE_OPTIONS = [
|
||||
{ value: 1, label: '采购入库' },
|
||||
{ value: 2, label: '采购退货' },
|
||||
{ value: 3, label: '销售出库' },
|
||||
{ value: 4, label: '销售退货' },
|
||||
{ value: 10, label: '其他入库' },
|
||||
{ value: 11, label: '其他出库' },
|
||||
{ value: 12, label: '库存调拨' },
|
||||
{ value: 13, label: '库存盘点' },
|
||||
]
|
||||
|
||||
/** 获取产品库存明细分页列表 */
|
||||
export function getStockRecordPage(params: PageParam) {
|
||||
return http.get<PageResult<StockRecord>>('/erp/stock-record/page', params)
|
||||
}
|
||||
|
||||
/** 获取产品库存明细详情 */
|
||||
export function getStockRecord(id: number) {
|
||||
return http.get<StockRecord>(`/erp/stock-record/get?id=${id}`)
|
||||
}
|
||||
40
src/api/erp/stock/index.ts
Normal file
40
src/api/erp/stock/index.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 产品库存信息 */
|
||||
export interface Stock {
|
||||
id?: number
|
||||
productId?: number
|
||||
productName?: string
|
||||
unitName?: string
|
||||
categoryName?: string
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
count?: number
|
||||
unitPrice?: number
|
||||
stockValue?: number
|
||||
}
|
||||
|
||||
/** 获取产品库存分页列表 */
|
||||
export function getStockPage(params: PageParam) {
|
||||
return http.get<PageResult<Stock>>('/erp/stock/page', params)
|
||||
}
|
||||
|
||||
/** 获取产品库存详情 */
|
||||
export function getStock(id: number) {
|
||||
return http.get<Stock>(`/erp/stock/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 获取产品库存详情(通过产品ID和仓库ID) */
|
||||
export function getStock2(productId: number, warehouseId: number) {
|
||||
return http.get<Stock>('/erp/stock/get', { productId, warehouseId })
|
||||
}
|
||||
|
||||
/** 获取产品库存数量 */
|
||||
export function getStockCount(productId: number, warehouseId?: number) {
|
||||
const params: Record<string, any> = { productId }
|
||||
if (warehouseId) {
|
||||
params.warehouseId = warehouseId
|
||||
}
|
||||
return http.get<number>('/erp/stock/get-count', params)
|
||||
}
|
||||
52
src/api/erp/warehouse/index.ts
Normal file
52
src/api/erp/warehouse/index.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 仓库信息 */
|
||||
export interface Warehouse {
|
||||
id?: number
|
||||
name?: string
|
||||
address?: string
|
||||
sort?: number
|
||||
remark?: string
|
||||
principal?: string
|
||||
warehousePrice?: number
|
||||
truckagePrice?: number
|
||||
status?: number
|
||||
defaultStatus?: boolean
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取仓库分页列表 */
|
||||
export function getWarehousePage(params: PageParam) {
|
||||
return http.get<PageResult<Warehouse>>('/erp/warehouse/page', params)
|
||||
}
|
||||
|
||||
/** 获取仓库详情 */
|
||||
export function getWarehouse(id: number) {
|
||||
return http.get<Warehouse>(`/erp/warehouse/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建仓库 */
|
||||
export function createWarehouse(data: Warehouse) {
|
||||
return http.post<number>('/erp/warehouse/create', data)
|
||||
}
|
||||
|
||||
/** 更新仓库 */
|
||||
export function updateWarehouse(data: Warehouse) {
|
||||
return http.put<boolean>('/erp/warehouse/update', data)
|
||||
}
|
||||
|
||||
/** 更新仓库默认状态 */
|
||||
export function updateWarehouseDefaultStatus(id: number, defaultStatus: boolean) {
|
||||
return http.put<boolean>('/erp/warehouse/update-default-status', undefined, { id, defaultStatus })
|
||||
}
|
||||
|
||||
/** 删除仓库 */
|
||||
export function deleteWarehouse(id: number) {
|
||||
return http.delete<boolean>(`/erp/warehouse/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 获取仓库精简列表 */
|
||||
export function getWarehouseSimpleList() {
|
||||
return http.get<Warehouse[]>('/erp/warehouse/simple-list')
|
||||
}
|
||||
Reference in New Issue
Block a user