695593266@qq.com před 9 měsíci
rodič
revize
3bb5b42310
2 změnil soubory, kde provedl 14 přidání a 9 odebrání
  1. 13 8
      src/api/workOrder/index.js
  2. 1 1
      vue.config.js

+ 13 - 8
src/api/workOrder/index.js

@@ -15,37 +15,33 @@ export async function getList(params) {
 
 
 // 下达
 // 下达
 export async function releaseWorkOrder(data) {
 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) {
   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 updatePriority(data) {
 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) {
   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 splitBatch(data) {
 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) {
   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 unpackDel(id) {
 export async function unpackDel(id) {
   const res = await request.delete(`/aps/workorder/delById/${id}`);
   const res = await request.delete(`/aps/workorder/delById/${id}`);
   if (res.data.code == 0) {
   if (res.data.code == 0) {
@@ -53,3 +49,12 @@ export async function unpackDel(id) {
   }
   }
   return Promise.reject(new Error(res.data.message));
   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));
+}

+ 1 - 1
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
         // target: 'http://192.168.1.103:18086',
         // target: 'http://192.168.1.103:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.158:18086',
         // target: 'http://192.168.158:18086',
-        target: 'http://192.168.1.251:18086',
+        // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18186',