소스 검색

分拆功能

cz 2 년 전
부모
커밋
3cf6b88653

+ 8 - 1
src/api/inbound-outbound/outbound/JDoutbound.js

@@ -20,4 +20,11 @@ export function JDorderOutbound(data = {}) {
 }
 
 
-
+// 京东订单出库 Excel导入
+export function JDorderExcel(data = {}) {
+  return request({
+    url: '/api/victoriatourist/orderJd/issueExcelImport',
+    method: 'post',
+    data: data,
+  })
+}

+ 1 - 1
src/views/inbound-outbound/abnormalManage/addFollow.vue

@@ -149,7 +149,7 @@ export default {
         nextHandleUser: [
           {
             required: true,
-            message: "请选择跟进人",
+            message: "请选择下一跟进人",
             trigger: "change",
           },
         ],

+ 3 - 0
src/views/inbound-outbound/abnormalManage/index.vue

@@ -44,6 +44,7 @@ export default {
         status: "",
         handleUser: "",
         handleTime: "",
+        nextHandleUser: "",
       },
     };
   },
@@ -57,6 +58,7 @@ export default {
     this.handleStatusList = businessDictData.find(
       (item) => item.code === "handleStatus"
     ).children;
+
     this.selectConfig[0].data = this.abnormalSourceList.map((item) => ({
       label: item.dictValue,
       value: item.dictKey,
@@ -109,6 +111,7 @@ export default {
         status: "",
         handleUser: "",
         handleTime: "",
+        nextHandleUser: "",
       };
       this.open = true;
     },

+ 2 - 4
src/views/inbound-outbound/outbound/JDoutbound/index.vue

@@ -186,9 +186,6 @@ export default {
     },
     excelImport() {
       this.openExcel = true;
-      this.excelForm = {
-        warehouseId: "",
-      };
     },
     handleProgress() {
       this.excelLoading = true;
@@ -203,6 +200,7 @@ export default {
       setTimeout(() => {
         this.excelLoading = false;
         this.openExcel = false;
+        this.getList();
       }, 300);
     },
   },
@@ -319,7 +317,7 @@ export default {
       >
         <el-form-item label="Excel">
           <el-upload
-            action="/api/victoriatourist/newJdBack/excelImport"
+            action="/api/victoriatourist/orderJd/issueExcelImport"
             :data="excelForm"
             :headers="uploadHeader"
             :on-success="handleSuccess"

+ 69 - 0
src/views/order-management/JDReturnGoods/logisticsList.vue

@@ -56,6 +56,7 @@ export default {
         pageSize: 10,
         keyword: "",
         businessType: "",
+        type: "",
       },
       tableList: [],
       total: 0,
@@ -83,6 +84,16 @@ export default {
       form: {},
       openOne: false,
       titleTextOne: "",
+      userInfo: {},
+      messageSum: 0,
+      activeName: "first",
+      allList: [],
+      backlogList: [],
+      ws: null, //建立的webSocket连接
+      lockReconnect: false, //是否真正建立连接
+      timeout: 30 * 1000, //30秒一次心跳
+      timeoutObj: null, //心跳倒计时
+      timeoutnum: null, //断开 重连倒计时
     };
   },
   created() {
@@ -106,8 +117,66 @@ export default {
       value: item.dictKey,
     }));
     this.getList();
+    const userInfo = JSON.parse(window.localStorage.getItem("saber-userInfo"));
+    this.userInfo = userInfo.content;
+    // this.initWebpack();
   },
   methods: {
+    initWebpack() {
+      // this.ws = new WebSocket(
+      //   `/cz/victoriatourist/webStock/userId=${this.userInfo.user_id}`
+      // );
+      // const url = `ws://36.134.91.96:10003/cz/api/victoriatourist/webStock/${this.userInfo.access_token}`;
+      const url =
+        "ws://36.134.91.96:10003/api/victoriatourist/webStock/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiI4NDUyMDYiLCJ1c2VyX25hbWUiOiJhZG1pbiIsInJlYWxfbmFtZSI6ImFkbeWnk-WQjSIsImF2YXRhciI6IiIsImF1dGhvcml0aWVzIjpbImFkbWluIl0sImNsaWVudF9pZCI6InNhYmVyIiwicm9sZV9uYW1lIjoiYWRtaW4iLCJsaWNlbnNlIjoicG93ZXJlZCBieSBibGFkZXgiLCJwb3N0X2lkIjoiMTYxOTYwOTExNzE1NDg4OTczMCIsInVzZXJfaWQiOiIxNjE5NjA5MTE3NTU3NTI2NTMwIiwicm9sZV9pZCI6IjE2MTk2MDkxMTU1Nzc4MzE0MjYiLCJzY29wZSI6WyJhbGwiXSwibmlja19uYW1lIjoiYWRtaW4iLCJvYXV0aF9pZCI6IiIsImRldGFpbCI6eyJ0eXBlIjoid2ViIn0sImV4cCI6MTY3ODMyOTA1OCwiZGVwdF9pZCI6IjE2MTk2MDkxMTcxMjk3MjM5MDYiLCJqdGkiOiI2OTE0YjY2Mi02OTVjLTQxNGYtYWU1ZC1mOTAxODgyOTJmZDkiLCJhY2NvdW50IjoiYWRtaW4ifQ.dUpl71ynDH06u_tpSqZGSHMmd0maXCGXZRrLUvTMqf4";
+      this.ws = new WebSocket(url);
+      console.log(this.ws);
+      this.ws.onopen = this.onopen;
+      this.ws.onmessage = this.onmessage;
+      this.ws.onclose = this.onclose;
+      this.ws.onerror = this.onerror;
+    },
+    start() {
+      //开启心跳
+      var self = this;
+      self.timeoutObj && clearTimeout(self.timeoutObj);
+      self.timeoutObj = setTimeout(() => {
+        //这里发送一个心跳,后端收到后,返回一个心跳消息,
+        if (self.ws.readyState == 1) {
+          //如果连接正常
+          self.ws.send("ping");
+        } else {
+          //否则重连
+          self.reconnect();
+        }
+      }, self.timeout);
+    },
+    reconnect() {
+      //重新连接
+      if (this.lockReconnect) {
+        return;
+      }
+      this.lockReconnect = true;
+      //没连接上会一直重连,设置延迟避免请求过多
+      this.timeoutnum && clearTimeout(this.timeoutnum);
+      this.timeoutnum = setTimeout(() => {
+        //新连接
+        this.initWebpack();
+        this.lockReconnect = false;
+      }, 5000);
+    },
+    onmessage(e) {
+      var msg = JSON.parse(e.data);
+      console.log(msg, "assw");
+    },
+    onclose() {
+      console.log("close");
+      this.reconnect();
+    },
+    onerror() {
+      console.log("error");
+      this.reconnect();
+    },
     getList() {
       this.loading = true;
       API.getLogisticsData(this.queryParams).then(