|
@@ -2,10 +2,10 @@ |
|
|
|
|
|
|
|
|
/* eslint-disable */ |
|
|
/* eslint-disable */ |
|
|
import { request } from 'umi'; |
|
|
import { request } from 'umi'; |
|
|
|
|
|
|
|
|
|
|
|
import { getDataBaseUrl } from '@/global_data'; |
|
|
/** 获取商品 sdsa GET /kitchen/api/rule */ |
|
|
/** 获取商品 sdsa GET /kitchen/api/rule */ |
|
|
export async function goods(data) { |
|
|
export async function goods(data) { |
|
|
return request(`/saasbase/api/goods/page`, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/goods/page`, { |
|
|
method: 'Post', |
|
|
method: 'Post', |
|
|
data: data, |
|
|
data: data, |
|
|
// params: { ...params }, |
|
|
// params: { ...params }, |
|
@@ -13,7 +13,7 @@ export async function goods(data) { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
export async function getbompage (data) { |
|
|
export async function getbompage (data) { |
|
|
return request(`/saasbase/api/bom/getpage`, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/bom/getpage`, { |
|
|
method: 'Post', |
|
|
method: 'Post', |
|
|
data: data, |
|
|
data: data, |
|
|
// params: { ...params }, |
|
|
// params: { ...params }, |
|
@@ -21,7 +21,7 @@ export async function getbompage (data) { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
export async function AddBomApi (data) { |
|
|
export async function AddBomApi (data) { |
|
|
return request(`/saasbase/api/GoodsBom/AddBom`, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/GoodsBom/AddBom`, { |
|
|
method: 'Post', |
|
|
method: 'Post', |
|
|
data: data, |
|
|
data: data, |
|
|
// params: { ...params }, |
|
|
// params: { ...params }, |
|
@@ -29,7 +29,7 @@ export async function AddBomApi (data) { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
export async function getBomInfo (data) { |
|
|
export async function getBomInfo (data) { |
|
|
return request(`/saasbase/api/GoodsBom/getBomInfo`, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/GoodsBom/getBomInfo`, { |
|
|
method: 'Post', |
|
|
method: 'Post', |
|
|
data: data, |
|
|
data: data, |
|
|
// params: { ...params }, |
|
|
// params: { ...params }, |
|
@@ -41,7 +41,7 @@ export async function getBomInfo (data) { |
|
|
|
|
|
|
|
|
export async function addGoods(data) { |
|
|
export async function addGoods(data) { |
|
|
// http://localhost:7002 |
|
|
// http://localhost:7002 |
|
|
return request(`/saasbase/api/goods/add`, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/goods/add`, { |
|
|
method: 'POST', |
|
|
method: 'POST', |
|
|
// type:'json', |
|
|
// type:'json', |
|
|
data: data, |
|
|
data: data, |
|
@@ -52,7 +52,7 @@ export async function addGoods(data) { |
|
|
|
|
|
|
|
|
export async function updateGoods(data) { |
|
|
export async function updateGoods(data) { |
|
|
console.log('商品数据修改', data); |
|
|
console.log('商品数据修改', data); |
|
|
return request(`/saasbase/api/goods/update`, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/goods/update`, { |
|
|
method: 'Post', |
|
|
method: 'Post', |
|
|
data: data, |
|
|
data: data, |
|
|
// ...(options || {}), |
|
|
// ...(options || {}), |
|
@@ -61,7 +61,7 @@ export async function updateGoods(data) { |
|
|
/** 删除商品 DELETE /kitchen/api/rule */ |
|
|
/** 删除商品 DELETE /kitchen/api/rule */ |
|
|
|
|
|
|
|
|
export async function removeGoods(data) { |
|
|
export async function removeGoods(data) { |
|
|
return request(`/saasbase/api/goods/delete?id=`+data, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/goods/delete?id=`+data, { |
|
|
method: 'Get', |
|
|
method: 'Get', |
|
|
|
|
|
|
|
|
// ...(options || {}), |
|
|
// ...(options || {}), |
|
@@ -70,7 +70,7 @@ export async function removeGoods(data) { |
|
|
|
|
|
|
|
|
/** 获取商品类型 sdsa GET /kitchen/api/rule */ |
|
|
/** 获取商品类型 sdsa GET /kitchen/api/rule */ |
|
|
export async function goodsType(data) { |
|
|
export async function goodsType(data) { |
|
|
return request(`/saasbase/api/goods-type/goods-types`, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/goods-type/goods-types`, { |
|
|
method: 'POST', |
|
|
method: 'POST', |
|
|
data: data, |
|
|
data: data, |
|
|
// params: { ...params }, |
|
|
// params: { ...params }, |
|
@@ -78,7 +78,7 @@ export async function goodsType(data) { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
export async function gettree(params) { |
|
|
export async function gettree(params) { |
|
|
return request('/saasbase/api/goodstype/tree', { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+'/api/goodstype/tree', { |
|
|
method: 'GET', |
|
|
method: 'GET', |
|
|
data: { |
|
|
data: { |
|
|
...params, |
|
|
...params, |
|
@@ -86,17 +86,17 @@ export async function gettree(params) { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
export async function getgoodsTaste(data) { |
|
|
export async function getgoodsTaste(data) { |
|
|
return request(`/saasbase/api/goodstaste/getlist`); |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/goodstaste/getlist`); |
|
|
} |
|
|
} |
|
|
export async function upload(data) { |
|
|
export async function upload(data) { |
|
|
return request(`/saasbase//api/goods/exportgood`,{ |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/goods/exportgood`,{ |
|
|
method: 'POST', |
|
|
method: 'POST', |
|
|
data: data, |
|
|
data: data, |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export async function GoodsTemplateExport() { |
|
|
export async function GoodsTemplateExport() { |
|
|
return request(`/saasbase/api/goods/goodstemplateexport`, { |
|
|
|
|
|
|
|
|
return request(getDataBaseUrl()+`/api/goods/goodstemplateexport`, { |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
responseType: 'blob' |
|
|
responseType: 'blob' |
|
|
}); |
|
|
}); |