Ver código fonte

手动同步SKU

lxf 1 ano atrás
pai
commit
06e9fe3e7f
1 arquivos alterados com 20 adições e 0 exclusões
  1. 20 0
      src/views/group/product/management/index.vue

+ 20 - 0
src/views/group/product/management/index.vue

@@ -28,6 +28,12 @@
                 text: '批量修改包材',
                 action: () => batchPackagingModification(),
               },
+          props.selectStatus
+            ? {}
+            : {
+                text: '手动同步SKU',
+                action: () => clickSynchronization(),
+              },
           // {
           //   text: '操作日志',
           //   action: () => viewLogs(),
@@ -109,6 +115,7 @@ import byTable from "/src/components/byTable/index";
 import MakeSKU from "/src/components/makeProduct/index";
 import Modification from "/src/components/makeProduct/modification/index";
 import ModificationSubsidiary from "/src/components/makeProduct/modification/subsidiary";
+import { ElMessage } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const props = defineProps({
@@ -397,6 +404,19 @@ const clickPackagingModificationCancel = (status) => {
     getList();
   }
 };
+const clickSynchronization = () => {
+  loading.value = true;
+  proxy.post("/orderHandle/syncSku", {}).then(
+    () => {
+      ElMessage({ message: "同步完成", type: "success" });
+      getList();
+    },
+    (err) => {
+      console.log(err);
+      loading.value = false;
+    }
+  );
+};
 </script>
 
 <style lang="scss" scoped>