lxf 1 år sedan
förälder
incheckning
c5ced0501b

+ 2 - 2
src/views/group/finance/check-bill/index.vue

@@ -124,10 +124,10 @@
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
       <el-tabs v-model="activeName" class="demo-tabs">
         <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintSKU>
+          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
         </el-tab-pane>
         <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintBOM>
+          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
         </el-tab-pane>
         <el-tab-pane label="订单对账单" name="order">
           <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintOrder>

+ 5 - 3
src/views/group/finance/check-bill/printBOM.vue

@@ -38,6 +38,8 @@
 </template>
 
 <script setup>
+import { ElMessage } from "element-plus";
+
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
@@ -183,11 +185,11 @@ const clickCancel = () => {
   emit("clickCancel", "");
 };
 const deriveExcel = () => {
+  ElMessage("导出文件中,请稍后");
   loading.value = true;
   proxy.getFile("/statementOfAccount/exportDocumentByBom", { id: props.rowData.id }).then(
-    () => {
-      emit("clickCancel", true);
-      // proxy.downloadFile(res, "BOM对账单.xlsx");
+    (res) => {
+      proxy.downloadFile(res, "BOM对账单.xlsx");
       loading.value = false;
     },
     (err) => {

+ 5 - 3
src/views/group/finance/check-bill/printSKU.vue

@@ -32,6 +32,8 @@
 </template>
 
 <script setup>
+import { ElMessage } from "element-plus";
+
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
@@ -170,11 +172,11 @@ const clickCancel = () => {
   emit("clickCancel", "");
 };
 const deriveExcel = () => {
+  ElMessage("导出文件中,请稍后");
   loading.value = true;
   proxy.getFile("/statementOfAccount/exportDocumentBySku", { id: props.rowData.id }).then(
-    () => {
-      emit("clickCancel", true);
-      // proxy.downloadFile(res, "SKU对账单.xlsx");
+    (res) => {
+      proxy.downloadFile(res, "SKU对账单.xlsx");
       loading.value = false;
     },
     (err) => {

+ 2 - 2
src/views/group/finance/summary/index.vue

@@ -23,10 +23,10 @@
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
       <el-tabs v-model="activeName" class="demo-tabs">
         <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintSKU>
+          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
         </el-tab-pane>
         <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintBOM>
+          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
         </el-tab-pane>
         <el-tab-pane label="订单对账单" name="order">
           <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintOrder>

+ 5 - 3
src/views/group/finance/summary/printBOM.vue

@@ -38,6 +38,8 @@
 </template>
 
 <script setup>
+import { ElMessage } from "element-plus";
+
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
@@ -183,6 +185,7 @@ const clickCancel = () => {
   emit("clickCancel", "");
 };
 const deriveExcel = () => {
+  ElMessage("导出文件中,请稍后");
   loading.value = true;
   proxy
     .getFile("/statementOfAccountMerge/exportDocumentByBom", {
@@ -191,9 +194,8 @@ const deriveExcel = () => {
       beginDate: props.rowData.dimensionality,
     })
     .then(
-      () => {
-        emit("clickCancel", true);
-        // proxy.downloadFile(res, "BOM对账单.xlsx");
+      (res) => {
+        proxy.downloadFile(res, "BOM对账单.xlsx");
         loading.value = false;
       },
       (err) => {

+ 5 - 3
src/views/group/finance/summary/printSKU.vue

@@ -32,6 +32,8 @@
 </template>
 
 <script setup>
+import { ElMessage } from "element-plus";
+
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
@@ -170,6 +172,7 @@ const clickCancel = () => {
   emit("clickCancel", "");
 };
 const deriveExcel = () => {
+  ElMessage("导出文件中,请稍后");
   loading.value = true;
   proxy
     .getFile("/statementOfAccountMerge/exportDocumentBySku", {
@@ -178,9 +181,8 @@ const deriveExcel = () => {
       beginDate: props.rowData.dimensionality,
     })
     .then(
-      () => {
-        emit("clickCancel", true);
-        // proxy.downloadFile(res, "SKU对账单.xlsx");
+      (res) => {
+        proxy.downloadFile(res, "SKU对账单.xlsx");
         loading.value = false;
       },
       (err) => {