新增:作物、作物出入记录
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建
|
||||
export function createCrop(data) {
|
||||
return request({
|
||||
url: '/farm/crop/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新
|
||||
export function updateCrop(data) {
|
||||
return request({
|
||||
url: '/farm/crop/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteCrop(id) {
|
||||
return request({
|
||||
url: '/farm/crop/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得
|
||||
export function getCrop(id) {
|
||||
return request({
|
||||
url: '/farm/crop/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得分页
|
||||
export function getCropPage(query) {
|
||||
return request({
|
||||
url: '/farm/crop/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出 Excel
|
||||
export function exportCropExcel(query) {
|
||||
return request({
|
||||
url: '/farm/crop/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建
|
||||
export function createCropRecord(data) {
|
||||
return request({
|
||||
url: '/farm/crop-record/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新
|
||||
export function updateCropRecord(data) {
|
||||
return request({
|
||||
url: '/farm/crop-record/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteCropRecord(id) {
|
||||
return request({
|
||||
url: '/farm/crop-record/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得
|
||||
export function getCropRecord(id) {
|
||||
return request({
|
||||
url: '/farm/crop-record/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得分页
|
||||
export function getCropRecordPage(query) {
|
||||
return request({
|
||||
url: '/farm/crop-record/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出 Excel
|
||||
export function exportCropRecordExcel(query) {
|
||||
return request({
|
||||
url: '/farm/crop-record/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user