Jelajahi Sumber

Merge branch 'master' into 测试

lxf 1 tahun lalu
induk
melakukan
531a300f44

+ 12 - 3
src/views/group/data-board/material-in-transit/index.vue

@@ -30,6 +30,7 @@
 <script setup>
 import byTable from "/src/components/byTable/index";
 import moment from "moment";
+import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const sourceList = ref({
@@ -140,9 +141,17 @@ const clickReset = () => {
   getList("", true);
 };
 const deriveExcel = () => {
-  proxy.postFile("/purchaseInTransitBom/export", sourceList.value.pagination).then((res) => {
-    proxy.downloadFile(res, "在途物料.xlsx");
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/purchaseInTransitBom/export", sourceList.value.pagination).then((res) => {
+        proxy.downloadFile(res, "在途物料.xlsx");
+      });
+    })
+    .catch(() => {});
 };
 const cellClassName = (val) => {
   if (val.row.deliveryDate < moment().format("yyyy-MM-DD HH:mm:ss")) {

+ 13 - 5
src/views/group/finance/purchase-warehousing/index.vue

@@ -34,7 +34,7 @@
 <script setup>
 import byTable from "/src/components/byTable/index";
 import * as date from "/src/utils/date";
-import { ElMessage } from "element-plus";
+import { ElMessage, ElMessageBox } from "element-plus";
 import ExcelFile from "/src/views/group/finance/check-bill/ExcelFile.vue";
 
 const { proxy } = getCurrentInstance();
@@ -235,10 +235,18 @@ const changeRadioGroup = () => {
 changeRadioGroup();
 const openFileList = ref(false);
 const clickExcel = () => {
-  proxy.postFile("/purchaseWarehousing/exportExcel", sourceList.value.pagination).then(() => {
-    ElMessage({ message: "导出成功", type: "success" });
-    openFileList.value = true;
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/purchaseWarehousing/exportExcel", sourceList.value.pagination).then(() => {
+        ElMessage({ message: "导出成功", type: "success" });
+        openFileList.value = true;
+      });
+    })
+    .catch(() => {});
 };
 const clickExcelFile = () => {
   openFileList.value = true;

+ 12 - 3
src/views/group/finance/sales-return/index.vue

@@ -22,6 +22,7 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
@@ -189,9 +190,17 @@ const clickReset = () => {
   getList("", true);
 };
 const deriveExcel = () => {
-  proxy.getFile("/orderExchangeDetail/excelExport", sourceList.value.pagination).then((res) => {
-    proxy.downloadFile(res, "销售退货明细表.xlsx");
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.getFile("/orderExchangeDetail/excelExport", sourceList.value.pagination).then((res) => {
+        proxy.downloadFile(res, "销售退货明细表.xlsx");
+      });
+    })
+    .catch(() => {});
 };
 </script>
 

+ 13 - 5
src/views/group/finance/sales-revenue-cost/index.vue

@@ -34,7 +34,7 @@
 <script setup>
 import byTable from "/src/components/byTable/index";
 import * as date from "/src/utils/date";
-import { ElMessage } from "element-plus";
+import { ElMessage, ElMessageBox } from "element-plus";
 import ExcelFile from "/src/views/group/finance/check-bill/ExcelFile.vue";
 
 const { proxy } = getCurrentInstance();
@@ -336,10 +336,18 @@ const changeRadioGroup = () => {
 changeRadioGroup();
 const openFileList = ref(false);
 const clickExcel = () => {
-  proxy.postFile("/statementOfAccountMerge/exportSalesRevenueCostData", sourceList.value.pagination).then(() => {
-    ElMessage({ message: "导出成功", type: "success" });
-    openFileList.value = true;
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/statementOfAccountMerge/exportSalesRevenueCostData", sourceList.value.pagination).then(() => {
+        ElMessage({ message: "导出成功", type: "success" });
+        openFileList.value = true;
+      });
+    })
+    .catch(() => {});
 };
 const clickExcelFile = () => {
   openFileList.value = true;

+ 13 - 5
src/views/group/finance/sales-shipment/index.vue

@@ -89,7 +89,7 @@
 <script setup>
 import byTable from "/src/components/byTable/index";
 import * as date from "/src/utils/date";
-import { ElMessage } from "element-plus";
+import { ElMessage, ElMessageBox } from "element-plus";
 import ExcelFile from "/src/views/group/finance/check-bill/ExcelFile.vue";
 
 const { proxy } = getCurrentInstance();
@@ -315,10 +315,18 @@ const handleSizeChange = (val) => {
 };
 const openFileList = ref(false);
 const clickExcel = () => {
-  proxy.postFile("/statementOfAccountMerge/exportSalesOutWarehouseDetails", sourceList.value.pagination).then(() => {
-    ElMessage({ message: "导出成功", type: "success" });
-    openFileList.value = true;
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/statementOfAccountMerge/exportSalesOutWarehouseDetails", sourceList.value.pagination).then(() => {
+        ElMessage({ message: "导出成功", type: "success" });
+        openFileList.value = true;
+      });
+    })
+    .catch(() => {});
 };
 const clickExcelFile = () => {
   openFileList.value = true;

+ 23 - 6
src/views/production/warehouse/finished-parts-storage/index.vue

@@ -45,6 +45,7 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
@@ -275,14 +276,30 @@ const changeActiveName = (val) => {
   }
 };
 const deriveExcel = () => {
-  proxy.getFile("/inventoryFinished/excelExport", sourceList.value.pagination).then((res) => {
-    proxy.downloadFile(res, "成品库.xlsx");
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.getFile("/inventoryFinished/excelExport", sourceList.value.pagination).then((res) => {
+        proxy.downloadFile(res, "成品库.xlsx");
+      });
+    })
+    .catch(() => {});
 };
 const deriveExcelTwo = () => {
-  proxy.getFile("/inventoryFinishedOrder/excelExport", sourceListTwo.value.pagination).then((res) => {
-    proxy.downloadFile(res, "成品库明细.xlsx");
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.getFile("/inventoryFinishedOrder/excelExport", sourceListTwo.value.pagination).then((res) => {
+        proxy.downloadFile(res, "成品库明细.xlsx");
+      });
+    })
+    .catch(() => {});
 };
 </script>
 

+ 13 - 4
src/views/production/warehouse/flow-record/index.vue

@@ -21,6 +21,7 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
@@ -112,7 +113,7 @@ const searchConfig = computed(() => {
 });
 const config = computed(() => {
   return [
-  {
+    {
       attrs: {
         label: "出入库单号",
         prop: "code",
@@ -244,9 +245,17 @@ const getDemandData = () => {
 };
 getDemandData();
 const deriveExcel = () => {
-  proxy.postFile("/inOutStorageBom/exportExcelSummary", sourceList.value.pagination).then((res) => {
-    proxy.downloadFile(res, "出入库流水.xlsx");
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/inOutStorageBom/exportExcelSummary", sourceList.value.pagination).then((res) => {
+        proxy.downloadFile(res, "出入库流水.xlsx");
+      });
+    })
+    .catch(() => {});
 };
 </script>
 

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

@@ -55,6 +55,7 @@
 import byTable from "/src/components/byTable/index";
 import { useRoute } from "vue-router";
 import useTagsViewStore from "/src/store/modules/tagsView";
+import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const props = defineProps({
@@ -381,15 +382,23 @@ const clickSelect = (item) => {
   emit("selectBOM", item);
 };
 const deriveExcel = () => {
-  if (route.query && route.query.backupDate) {
-    proxy.getFile("/inventory/exportBackExcel", sourceList.value.pagination).then((res) => {
-      proxy.downloadFile(res, "库存.xlsx");
-    });
-  } else {
-    proxy.getFile("/inventory/exportExcel", sourceList.value.pagination).then((res) => {
-      proxy.downloadFile(res, "库存.xlsx");
-    });
-  }
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      if (route.query && route.query.backupDate) {
+        proxy.getFile("/inventory/exportBackExcel", sourceList.value.pagination).then((res) => {
+          proxy.downloadFile(res, "库存.xlsx");
+        });
+      } else {
+        proxy.getFile("/inventory/exportExcel", sourceList.value.pagination).then((res) => {
+          proxy.downloadFile(res, "库存.xlsx");
+        });
+      }
+    })
+    .catch(() => {});
 };
 </script>
 

+ 16 - 7
src/views/production/warehouse/outbound/index.vue

@@ -17,10 +17,10 @@
                     action: () => clickModal(),
                   }
                 : {},
-                {
-                    text: '包材出库',
-                    action: () => clickPackingMaterials(),
-                  }
+              {
+                text: '包材出库',
+                action: () => clickPackingMaterials(),
+              },
             ]"
             @get-list="getList"
             @clickReset="clickReset">
@@ -62,6 +62,7 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
@@ -441,9 +442,17 @@ const clickPackingMaterials = () => {
   });
 };
 const deriveExcel = () => {
-  proxy.postFile("/inOutStorageBom/exportExcel", sourceListTwo.value.pagination).then((res) => {
-    proxy.downloadFile(res, "出库明细.xlsx");
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/inOutStorageBom/exportExcel", sourceListTwo.value.pagination).then((res) => {
+        proxy.downloadFile(res, "出库明细.xlsx");
+      });
+    })
+    .catch(() => {});
 };
 </script>
 

+ 12 - 3
src/views/production/warehouse/putInStorage/index.vue

@@ -54,6 +54,7 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
@@ -424,9 +425,17 @@ const clickModal = () => {
   });
 };
 const deriveExcel = () => {
-  proxy.postFile("/inOutStorageBom/exportExcel", sourceListTwo.value.pagination).then((res) => {
-    proxy.downloadFile(res, "入库明细.xlsx");
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/inOutStorageBom/exportExcel", sourceListTwo.value.pagination).then((res) => {
+        proxy.downloadFile(res, "入库明细.xlsx");
+      });
+    })
+    .catch(() => {});
 };
 </script>
 

+ 12 - 3
src/views/subsidiary/warehouse/inventory/index.vue

@@ -53,6 +53,7 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const departmentList = ref([]);
@@ -304,9 +305,17 @@ onMounted(() => {
 });
 const emit = defineEmits(["selectBOM"]);
 const deriveExcel = () => {
-  proxy.getFile("/inventory/exportExcel", sourceList.value.pagination).then((res) => {
-    proxy.downloadFile(res, "库存.xlsx");
-  });
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.getFile("/inventory/exportExcel", sourceList.value.pagination).then((res) => {
+        proxy.downloadFile(res, "库存.xlsx");
+      });
+    })
+    .catch(() => {});
 };
 </script>