fix: 李红攀:V2.0.061采购入库、销售出库添加扫码功能
This commit is contained in:
14
src/api/erp/location/index.ts
Normal file
14
src/api/erp/location/index.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 按库位码查询的结果 */
|
||||
export interface LocationByCodeVO {
|
||||
warehouseId: number
|
||||
warehouseName: string
|
||||
locationCode: string
|
||||
enableLocation?: boolean
|
||||
}
|
||||
|
||||
/** 按库位码查询库位信息 */
|
||||
export function getLocationByCode(locationCode: string) {
|
||||
return http.get<LocationByCodeVO>('/erp/location/get-by-code', { locationCode })
|
||||
}
|
||||
42
src/api/erp/purchase-in-scan-record/index.ts
Normal file
42
src/api/erp/purchase-in-scan-record/index.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 采购入库扫码记录 */
|
||||
export interface PurchaseInScanRecord {
|
||||
id?: number
|
||||
purchaseInId: number
|
||||
productId?: number
|
||||
productName?: string
|
||||
productSpec?: string
|
||||
productBarCode?: string
|
||||
productUnit?: string
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
locationCode?: string
|
||||
batchNo?: string
|
||||
scanCount?: number
|
||||
scanTime?: string
|
||||
operatorId?: number
|
||||
operatorName?: string
|
||||
remark?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 创建扫码记录 */
|
||||
export function createPurchaseInScanRecord(data: PurchaseInScanRecord) {
|
||||
return http.post<number>('/erp/purchase-in-scan-record/create', data)
|
||||
}
|
||||
|
||||
/** 批量创建扫码记录 */
|
||||
export function createPurchaseInScanRecordBatch(data: PurchaseInScanRecord[]) {
|
||||
return http.post<number>('/erp/purchase-in-scan-record/create-batch', data)
|
||||
}
|
||||
|
||||
/** 删除扫码记录 */
|
||||
export function deletePurchaseInScanRecord(id: number) {
|
||||
return http.delete<boolean>(`/erp/purchase-in-scan-record/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 获取入库单的所有扫码记录 */
|
||||
export function getPurchaseInScanRecordList(purchaseInId: number) {
|
||||
return http.get<PurchaseInScanRecord[]>(`/erp/purchase-in-scan-record/list?purchaseInId=${purchaseInId}`)
|
||||
}
|
||||
42
src/api/erp/sale-out-scan-record/index.ts
Normal file
42
src/api/erp/sale-out-scan-record/index.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 销售出库扫码记录 */
|
||||
export interface SaleOutScanRecord {
|
||||
id?: number
|
||||
saleOutId: number
|
||||
productId?: number
|
||||
productName?: string
|
||||
productSpec?: string
|
||||
productBarCode?: string
|
||||
productUnit?: string
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
locationCode?: string
|
||||
batchNo?: string
|
||||
scanCount?: number
|
||||
scanTime?: string
|
||||
operatorId?: number
|
||||
operatorName?: string
|
||||
remark?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 创建扫码记录 */
|
||||
export function createSaleOutScanRecord(data: SaleOutScanRecord) {
|
||||
return http.post<number>('/erp/sale-out-scan-record/create', data)
|
||||
}
|
||||
|
||||
/** 批量创建扫码记录 */
|
||||
export function createSaleOutScanRecordBatch(data: SaleOutScanRecord[]) {
|
||||
return http.post<number[]>('/erp/sale-out-scan-record/create-batch', data)
|
||||
}
|
||||
|
||||
/** 删除扫码记录 */
|
||||
export function deleteSaleOutScanRecord(id: number) {
|
||||
return http.delete<boolean>(`/erp/sale-out-scan-record/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 获取出库单的所有扫码记录 */
|
||||
export function getSaleOutScanRecordList(saleOutId: number) {
|
||||
return http.get<SaleOutScanRecord[]>(`/erp/sale-out-scan-record/list?saleOutId=${saleOutId}`)
|
||||
}
|
||||
91
src/api/erp/sale-out/index.ts
Normal file
91
src/api/erp/sale-out/index.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 销售出库项 */
|
||||
export interface SaleOutItem {
|
||||
id?: number
|
||||
outId?: number
|
||||
orderItemId?: number
|
||||
productId?: number
|
||||
productName?: string
|
||||
productBarCode?: string
|
||||
productSpec?: string
|
||||
productUnitName?: string
|
||||
warehouseId?: number
|
||||
warehouseName?: string
|
||||
locationCode?: string
|
||||
batchNo?: string
|
||||
count?: number
|
||||
productPrice?: number
|
||||
taxPercent?: number
|
||||
taxPrice?: number
|
||||
totalPrice?: number
|
||||
remark?: string
|
||||
productUnitId?: number
|
||||
stockUnitPrice?: number
|
||||
stockValue?: number
|
||||
grossProfit?: number
|
||||
}
|
||||
|
||||
/** 销售出库信息 */
|
||||
export interface SaleOut {
|
||||
id?: number
|
||||
no?: string
|
||||
status?: number
|
||||
customerId?: number
|
||||
customerName?: string
|
||||
accountId?: number
|
||||
accountName?: string
|
||||
saleUserId?: number
|
||||
saleUserName?: string
|
||||
outTime?: string
|
||||
orderId?: number
|
||||
orderNo?: string
|
||||
deliveryNoticeId?: number
|
||||
deliveryNoticeNo?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
receiptPrice?: number
|
||||
totalProductPrice?: number
|
||||
totalTaxPrice?: number
|
||||
discountPercent?: number
|
||||
discountPrice?: number
|
||||
otherPrice?: number
|
||||
fileUrl?: string
|
||||
remark?: string
|
||||
creator?: string
|
||||
creatorName?: string
|
||||
createTime?: string
|
||||
items?: SaleOutItem[]
|
||||
productNames?: string
|
||||
}
|
||||
|
||||
/** 获取销售出库分页列表 */
|
||||
export function getSaleOutPage(params: PageParam) {
|
||||
return http.get<PageResult<SaleOut>>('/erp/sale-out/page', params)
|
||||
}
|
||||
|
||||
/** 获取销售出库详情 */
|
||||
export function getSaleOut(id: number) {
|
||||
return http.get<SaleOut>(`/erp/sale-out/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建销售出库 */
|
||||
export function createSaleOut(data: SaleOut) {
|
||||
return http.post<number>('/erp/sale-out/create', data)
|
||||
}
|
||||
|
||||
/** 更新销售出库 */
|
||||
export function updateSaleOut(data: SaleOut) {
|
||||
return http.put<boolean>('/erp/sale-out/update', data)
|
||||
}
|
||||
|
||||
/** 更新销售出库状态 */
|
||||
export function updateSaleOutStatus(id: number, status: number) {
|
||||
return http.put<boolean>(`/erp/sale-out/update-status?id=${id}&status=${status}`)
|
||||
}
|
||||
|
||||
/** 删除销售出库 */
|
||||
export function deleteSaleOut(ids: number[]) {
|
||||
return http.delete<boolean>(`/erp/sale-out/delete?ids=${ids.join(',')}`)
|
||||
}
|
||||
@@ -13,6 +13,9 @@ export interface Warehouse {
|
||||
truckagePrice?: number
|
||||
status?: number
|
||||
defaultStatus?: boolean
|
||||
enableLocation?: boolean
|
||||
roomNoMax?: number
|
||||
locationCapacity?: number
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user