lxf il y a 1 an
Parent
commit
323d980d62
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      src/views/subsidiary/warehouse/inventory/index.vue

+ 11 - 0
src/views/subsidiary/warehouse/inventory/index.vue

@@ -30,6 +30,12 @@
             :loading="loading"
             :searchConfig="searchConfig"
             highlight-current-row
+            :action-list="[
+              {
+                text: '导出Excel',
+                action: () => deriveExcel(),
+              },
+            ]"
             @get-list="getList"
             @clickReset="clickReset">
             <template #total="{ item }">
@@ -280,6 +286,11 @@ onMounted(() => {
   getList();
 });
 const emit = defineEmits(["selectBOM"]);
+const deriveExcel = () => {
+  proxy.getFile("/inventory/exportExcel", sourceList.value.pagination).then((res) => {
+    proxy.downloadFile(res, "库存.xlsx");
+  });
+};
 </script>
 
 <style lang="scss" scoped>