37 lines
1020 B
JavaScript
37 lines
1020 B
JavaScript
import request from '@/utils/request'
|
|
|
|
const BASE_URL = '/api/user-service'
|
|
|
|
class InputMaterialStockLogApi {
|
|
// 分页查询
|
|
static getPage(params) {
|
|
return request.apiGet(`${BASE_URL}/input-material-stock-log/page`, params)
|
|
}
|
|
|
|
// 查询详情
|
|
static getDetail(id) {
|
|
return request.apiGet(`${BASE_URL}/input-material-stock-log/detail`, { id })
|
|
}
|
|
|
|
// 新增
|
|
static add(data) {
|
|
return request.apiPost(`${BASE_URL}/input-material-stock-log/add`, data)
|
|
}
|
|
|
|
// 删除
|
|
static delete(id) {
|
|
return request.apiPost(`${BASE_URL}/input-material-stock-log/delete`, null, { params: { id } })
|
|
}
|
|
|
|
// 审核
|
|
static review(params) {
|
|
const queryString = Object.keys(params)
|
|
.filter(key => params[key] !== null && params[key] !== undefined && params[key] !== '')
|
|
.map(key => `${key}=${encodeURIComponent(params[key])}`)
|
|
.join('&')
|
|
return request.apiPost(`${BASE_URL}/input-material-stock-log/review?${queryString}`, null)
|
|
}
|
|
}
|
|
|
|
export default InputMaterialStockLogApi
|