python-flask和Vue两种模式初模板
This commit is contained in:
0
inventory-web/src/api/auth.ts
Normal file
0
inventory-web/src/api/auth.ts
Normal file
0
inventory-web/src/api/material.ts
Normal file
0
inventory-web/src/api/material.ts
Normal file
39
inventory-web/src/api/stock.ts
Normal file
39
inventory-web/src/api/stock.ts
Normal file
@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 注意:baseURL 已经是 '/api/v1' 了,所以这里只需要写剩下的部分
|
||||
|
||||
// 获取入库列表
|
||||
// 最终请求: /api/v1 + /stocks/inbound = /api/v1/stocks/inbound
|
||||
export function getInboundList(params: any) {
|
||||
return request({
|
||||
url: '/stocks/inbound', // <--- 修改点:去掉了 /api/v1
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 新增入库
|
||||
export function createInbound(data: any) {
|
||||
return request({
|
||||
url: '/stocks/inbound', // <--- 修改点
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改入库
|
||||
export function updateInbound(id: number, data: any) {
|
||||
return request({
|
||||
url: `/stocks/inbound/${id}`, // <--- 修改点
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除入库
|
||||
export function deleteInbound(id: number) {
|
||||
return request({
|
||||
url: `/stocks/inbound/${id}`, // <--- 修改点
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
0
inventory-web/src/api/transaction.ts
Normal file
0
inventory-web/src/api/transaction.ts
Normal file
Reference in New Issue
Block a user