|
|
@@ -15,37 +15,33 @@ export async function getList(params) {
|
|
|
|
|
|
// 下达
|
|
|
export async function releaseWorkOrder(data) {
|
|
|
- const res = await request.post(
|
|
|
- `/aps/workorder/releaseWorkOrder`, data
|
|
|
- );
|
|
|
+ const res = await request.post(`/aps/workorder/releaseWorkOrder`, data);
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
|
}
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 修改优先级
|
|
|
export async function updatePriority(data) {
|
|
|
- const res = await request.post(`/aps/workorder/updatePriority`, data);
|
|
|
+ const res = await request.post(`/aps/workorder/updatePriority`, data);
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
|
}
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 订单拆单
|
|
|
|
|
|
export async function splitBatch(data) {
|
|
|
- const res = await request.post(`/aps/workorder/splitBatch`, data);
|
|
|
+ const res = await request.post(`/aps/workorder/splitBatch`, data);
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
|
}
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
|
|
|
|
-// 删除拆单数据
|
|
|
+// 删除拆单数据
|
|
|
export async function unpackDel(id) {
|
|
|
const res = await request.delete(`/aps/workorder/delById/${id}`);
|
|
|
if (res.data.code == 0) {
|
|
|
@@ -53,3 +49,12 @@ export async function unpackDel(id) {
|
|
|
}
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
|
+
|
|
|
+//获取用户的工厂,所属工作中中心,班组等信息
|
|
|
+export async function getUserInfo(id) {
|
|
|
+ const res = await request.get(`/main/user/getUserWindow/${id}`);
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ return res.data.data;
|
|
|
+ }
|
|
|
+ return Promise.reject(new Error(res.data.message));
|
|
|
+}
|