import request from '@/utils/request' const v = "1.0"; export function stockWarehouse(pagination: any, data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.list', v, timestamp: new Date().getTime() }, data: { pagination, where: data }, isSystemApi: true } as any) } export function getProhibitedType() { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.getProhibitedType', v, timestamp: new Date().getTime() }, data: {}, isSystemApi: true } as any) } // 未使用,获取违禁品(限制品)列表 export function getProhibitedList() { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.getProhibitedList', v, timestamp: new Date().getTime() }, data: {}, isSystemApi: true } as any) } export function getInfo(id: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.getInfo', v, timestamp: new Date().getTime() }, data: { id }, isSystemApi: true } as any) } export function saveWarehouseStock(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.saveWarehouseStock', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function getBarcodes(id: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.getBarcodes', v, timestamp: new Date().getTime() }, data: { id }, isSystemApi: true } as any) } export function saveWarehouseStockBarcode(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.saveWarehouseStockBarcode', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function getStoreStocks(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.getStoreStocks', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function bindItem(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.bindItem', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function unbindItem(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.unbindItem', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function queryStockLogs(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.queryStockLogs', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function getStockUnits() { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.getStockUnits', v, timestamp: new Date().getTime() }, data: {}, isSystemApi: true } as any) } export function getUnitList() { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.getUnitList', v, timestamp: new Date().getTime() }, data: {}, isSystemApi: true } as any) } export function createUnit(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.createUnit', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } // export function getBoxUnits() { // return request({ // url: '/system', // method: 'post', // params: { // method: 'stock.warehouse.getBoxUnits', // v, // timestamp: new Date().getTime() // }, // data: {}, // isSystemApi: true // } as any) // } export function checkItemCodeUnique(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.checkItemCodeUnique', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function createWarehouseStock(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.createWarehouseStock', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function handleBatchDelete(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.handleBatchDelete', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function handleBatchChange(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.handleBatchChange', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function deleteUnit(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.deleteUnit', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function createProhibited(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.createProhibited', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function deleteProhibited(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.deleteProhibited', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } // 未使用,在库存日志或历史记录组件中,用于执行“回退”到某个历史状态的操作 export function backData(data: any) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.backData', v, timestamp: new Date().getTime() }, data: data, isSystemApi: true } as any) } export function getStockDetail(stock_id: number, pagination?: { page: number; pageSize: number }) { return request({ url: '/system', method: 'post', params: { method: 'stock.warehouse.getStockDetail', v, timestamp: new Date().getTime() }, data: { stock_id, ...(pagination ? { pagination } : {}) }, isSystemApi: true } as any) } // 已弃用 // export function warehouseSearch(data:any) { // return request({ // url: '/system', // method: 'post', // params: { // method: 'stock.warehouse.search', // v, // timestamp: new Date().getTime() // }, // data: data, // isSystemApi: true // } as any) // }