|
@@ -1,7 +1,7 @@
|
|
|
import request from '@/utils/request';
|
|
import request from '@/utils/request';
|
|
|
|
|
|
|
|
// 产品关联物料
|
|
// 产品关联物料
|
|
|
-export async function productTieUpMaterial (data) {
|
|
|
|
|
|
|
+export async function productTieUpMaterial(data) {
|
|
|
const res = await request.post(`/main/category/productTieUpMaterial`, data);
|
|
const res = await request.post(`/main/category/productTieUpMaterial`, data);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
@@ -9,7 +9,7 @@ export async function productTieUpMaterial (data) {
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
}
|
|
|
// 查询产品已关联物料信息
|
|
// 查询产品已关联物料信息
|
|
|
-export async function getRelatesInformationList (data) {
|
|
|
|
|
|
|
+export async function getRelatesInformationList(data) {
|
|
|
const res = await request.post(
|
|
const res = await request.post(
|
|
|
`/main/category/getRelatesInformationList`,
|
|
`/main/category/getRelatesInformationList`,
|
|
|
data
|
|
data
|
|
@@ -20,7 +20,7 @@ export async function getRelatesInformationList (data) {
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
}
|
|
|
// 查询未关联产品物料信息
|
|
// 查询未关联产品物料信息
|
|
|
-export async function unassociated (data) {
|
|
|
|
|
|
|
+export async function unassociated(data) {
|
|
|
const res = await request.post(`/main/category/unassociated`, data);
|
|
const res = await request.post(`/main/category/unassociated`, data);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
@@ -28,9 +28,8 @@ export async function unassociated (data) {
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
// 获取产品bom信息
|
|
// 获取产品bom信息
|
|
|
-export async function getCategoryBom (categoryId) {
|
|
|
|
|
|
|
+export async function getCategoryBom(categoryId) {
|
|
|
const res = await request.get(`/main/category/getCategoryBom/${categoryId}`);
|
|
const res = await request.get(`/main/category/getCategoryBom/${categoryId}`);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
@@ -39,7 +38,7 @@ export async function getCategoryBom (categoryId) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 周转车 货位
|
|
// 周转车 货位
|
|
|
-export async function categoryVehicle (data) {
|
|
|
|
|
|
|
+export async function categoryVehicle(data) {
|
|
|
const res = await request.post(`/main/categoryvehicle/save`, data);
|
|
const res = await request.post(`/main/categoryvehicle/save`, data);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
@@ -47,7 +46,7 @@ export async function categoryVehicle (data) {
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export async function categoryVehicleList (id) {
|
|
|
|
|
|
|
+export async function categoryVehicleList(id) {
|
|
|
const res = await request.get(`/main/categoryvehicle/getByCategoryId/${id}`);
|
|
const res = await request.get(`/main/categoryvehicle/getByCategoryId/${id}`);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
@@ -57,7 +56,7 @@ export async function categoryVehicleList (id) {
|
|
|
|
|
|
|
|
// 干燥区 库位
|
|
// 干燥区 库位
|
|
|
|
|
|
|
|
-export async function aridRegion (data) {
|
|
|
|
|
|
|
+export async function aridRegion(data) {
|
|
|
const res = await request.post(`/main/aridregion/save`, data);
|
|
const res = await request.post(`/main/aridregion/save`, data);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
@@ -65,7 +64,7 @@ export async function aridRegion (data) {
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export async function aridRegionList (id) {
|
|
|
|
|
|
|
+export async function aridRegionList(id) {
|
|
|
const res = await request.get(`/main/aridregion/getByCategoryId/${id}`);
|
|
const res = await request.get(`/main/aridregion/getByCategoryId/${id}`);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
@@ -74,11 +73,23 @@ export async function aridRegionList (id) {
|
|
|
}
|
|
}
|
|
|
// 修改物品采购员
|
|
// 修改物品采购员
|
|
|
|
|
|
|
|
-export async function updateCheckPersonAndGroup (data) {
|
|
|
|
|
- const res = await request.post(`/main/category/updateCheckPersonAndGroup`, data);
|
|
|
|
|
|
|
+export async function updateCheckPersonAndGroup(data) {
|
|
|
|
|
+ const res = await request.post(
|
|
|
|
|
+ `/main/category/updateCheckPersonAndGroup`,
|
|
|
|
|
+ data
|
|
|
|
|
+ );
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
|
}
|
|
}
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 修改物品默认仓库
|
|
|
|
|
+
|
|
|
|
|
+export async function updatewarehouseId(data) {
|
|
|
|
|
+ const res = await request.post(`/main/category/updatewarehouseId`, data);
|
|
|
|
|
+ if (res.data.code == 0) {
|
|
|
|
|
+ return res.data.data;
|
|
|
|
|
+ }
|
|
|
|
|
+ return Promise.reject(new Error(res.data.message));
|
|
|
|
|
+}
|