Parcourir la source

异常订单增加重新同步功能

lxf il y a 1 an
Parent
commit
c8c9cd6911
1 fichiers modifiés avec 28 ajouts et 1 suppressions
  1. 28 1
      src/views/group/order/abnormal/index.vue

+ 28 - 1
src/views/group/order/abnormal/index.vue

@@ -120,7 +120,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: 140,
+        width: 200,
         align: "center",
         fixed: "right",
       },
@@ -151,6 +151,17 @@ const config = computed(() => {
               clickDelete(row);
             },
           },
+          {
+            attrs: {
+              label: "重新同步",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickResynchronization(row);
+            },
+          },
         ];
       },
     },
@@ -228,6 +239,22 @@ const clickDelete = (row) => {
     })
     .catch(() => {});
 };
+const clickResynchronization = (row) => {
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.post("/orderInfo/deleteAndStore", { id: row.id }).then(() => {
+        proxy.post("/orderHandle/resynchronization", { wlnCode: row.wlnCode }).then(() => {
+          ElMessage({ message: "万里牛订单同步完成", type: "success" });
+          getList();
+        });
+      });
+    })
+    .catch(() => {});
+};
 const clickNormalize = (row) => {
   proxy.post("/orderInfo/turnToRegularOrder", { id: row.id }).then(() => {
     ElMessage({ message: "操作成功", type: "success" });