77 lines
1.4 KiB
JavaScript
77 lines
1.4 KiB
JavaScript
/*
|
|
* @Author: zwq
|
|
* @Date: 2023-11-02 16:20:15
|
|
* @LastEditors: zwq
|
|
* @LastEditTime: 2023-11-03 15:26:05
|
|
* @Description:
|
|
*/
|
|
import request from '@/utils/request'
|
|
|
|
// 创建物品
|
|
export function createWarehouseGoods(data) {
|
|
return request({
|
|
url: '/extend/warehouse-goods/create',
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 更新物品
|
|
export function updateWarehouseGoods(data) {
|
|
return request({
|
|
url: '/extend/warehouse-goods/update',
|
|
method: 'put',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 删除物品
|
|
export function deleteWarehouseGoods(id) {
|
|
return request({
|
|
url: '/extend/warehouse-goods/delete?id=' + id,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
// 获得物品
|
|
export function getWarehouseGoods(id) {
|
|
return request({
|
|
url: '/extend/warehouse-goods/get?id=' + id,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 获得物品列表
|
|
export function getListByType(id) {
|
|
return request({
|
|
url: '/extend/warehouse-goods/getListByType?type=' + id,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 获得物品分页
|
|
export function getWarehouseGoodsPage(data) {
|
|
return request({
|
|
url: '/extend/warehouse-goods/page',
|
|
method: 'POST',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 获得code
|
|
export function getCode() {
|
|
return request({
|
|
url: '/extend/warehouse-goods/getCode',
|
|
method: 'get'
|
|
})
|
|
}
|
|
// 导出物品 Excel
|
|
export function exportWarehouseGoodsExcel(query) {
|
|
return request({
|
|
url: '/extend/warehouse-goods/export-excel',
|
|
method: 'get',
|
|
params: query,
|
|
responseType: 'blob'
|
|
})
|
|
}
|