瀏覽代碼

库存导出

lxf 1 年之前
父節點
當前提交
fb76088557
共有 1 個文件被更改,包括 9 次插入4 次删除
  1. 9 4
      src/views/production/warehouse/inventory/index.vue

+ 9 - 4
src/views/production/warehouse/inventory/index.vue

@@ -31,10 +31,10 @@
             :searchConfig="searchConfig"
             highlight-current-row
             :action-list="[
-              // {
-              //   text: '添加仓库',
-              //   action: () => clickModal(),
-              // },
+              {
+                text: '导出Excel',
+                action: () => deriveExcel(),
+              },
             ]"
             @get-list="getList"
             @clickReset="clickReset">
@@ -363,6 +363,11 @@ const emit = defineEmits(["selectBOM"]);
 const clickSelect = (item) => {
   emit("selectBOM", item);
 };
+const deriveExcel = () => {
+  proxy.getFile("/inventory/exportExcel", sourceList.value.pagination).then((res) => {
+    proxy.downloadFile(res, "库存.xlsx");
+  });
+};
 </script>
 
 <style lang="scss" scoped>