You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.1 KiB
31 lines
1.1 KiB
2 years ago
|
import axios from '@/axios/index'
|
||
|
import apiConfig from '@/api/apiConfig'
|
||
|
|
||
|
const api= apiConfig.router.apiRoute;
|
||
|
const module= apiConfig.modules.Manufacture;
|
||
|
const crmType=apiConfig.crmTypes.Machine;
|
||
|
const funcs=apiConfig.funcs;
|
||
|
|
||
|
|
||
|
/*axios*/
|
||
|
export function crmMachineIndex(data) {//获取列表数据
|
||
|
return axios.posts(api+module+crmType+funcs.ListFunc,data)
|
||
|
//return axios.posts('/api/basedata/machine/list',data)
|
||
|
}
|
||
|
export function crmMachineSave(data) {//新增
|
||
|
return axios.posts(api+module+crmType,data)
|
||
|
//return axios.posts('/api/basedata/machine',data)
|
||
|
}
|
||
|
export function crmMachineRead(id) {//根据id获取单条数据
|
||
|
return axios.gets(api+module+crmType+funcs.NullFunc+id)
|
||
|
//return axios.gets('/api/basedata/machine/'+id)
|
||
|
}
|
||
|
export function crmMachineUpdate(id,data) {//更新
|
||
|
return axios.puts(api+module+crmType+funcs.NullFunc+id,data)
|
||
|
//return axios.puts('/api/basedata/machine/'+id,data)
|
||
|
}
|
||
|
export function crmMachineDelete(data) {//删除
|
||
|
return axios.posts(api+module+crmType+funcs.DeleteFunc,data)
|
||
|
//return axios.posts('/api/basedata/machine/delete',data)
|
||
|
}
|