瀏覽代碼

导出流水

natasha 1 年之前
父節點
當前提交
ffc434664c
共有 2 個文件被更改,包括 771 次插入595 次删除
  1. 22 21
      src/views/cdkey_manage/CheckGoods.vue
  2. 749 574
      src/views/finance_manage/FlowManage.vue

+ 22 - 21
src/views/cdkey_manage/CheckGoods.vue

@@ -247,7 +247,7 @@
                   type="primary"
                   size="small"
                   @click="handleExport()"
-                  :disabled="true"
+                  :loading="loading"
                   >导出报表</el-button
                 >
               </div>
@@ -622,6 +622,7 @@ export default {
       proceedsNumber: "", // 收款单数
       proceedsPrice: null, // 收款金额
       proceedsPriceArr: [],
+      loading: false,
     };
   },
   //计算属性 类似于data概念
@@ -800,6 +801,8 @@ export default {
     },
     // 导出
     handleExport() {
+      let _this = this;
+      _this.loading = true;
       let MethodName =
         "/ShopServer/Manager/FinanceManager/StartCreateOrderExportFile";
       getLogin(MethodName, {
@@ -821,26 +824,24 @@ export default {
         discount_code_id: this.$route.query.id ? this.$route.query.id : "",
       })
         .then((res) => {
-          // let MethodName2 = "/FileServer/FilePackManager/GetFileCompressTaskProgress";
-          // let timer = setTimeout(() => {
-          //     getLogin(MethodName2, {
-          //         file_compress_task_id: res.file_compress_task_id,
-          //     })
-          //     .then((res) => {
-          //         if (res.is_finish == "true") {
-          //             data.FileID = res.compress_pack_file_id;
-          //             clearTimeout(timer);
-          //             timer = null;
-          //             _this.loading = false;
-          //             location.href =
-          //                 process.env.VUE_APP_BASE_API +
-          //                 `/FileServer/WebFileDownload?AccessToken=${data.access_token}&FileID=${data.FileID}`;
-          //             }
-          //     })
-          //     .catch((res) => {
-          //         this.loading = false;
-          //     });
-          // }, 1000);
+          let MethodName2 =
+            "/ShopServer/Manager/FinanceManager/GetOrderExportFileTaskProgress";
+          let timer = setTimeout(() => {
+            getLogin(MethodName2, {
+              order_export_file_task_id: res.id,
+            })
+              .then((res) => {
+                if (res.is_finish === "true") {
+                  clearTimeout(timer);
+                  timer = null;
+                  _this.loading = false;
+                  location.href = res.order_export_file_url;
+                }
+              })
+              .catch((res) => {
+                this.loading = false;
+              });
+          }, 1000);
         })
         .catch((res) => {
           this.loading = false;

文件差異過大導致無法顯示
+ 749 - 574
src/views/finance_manage/FlowManage.vue


部分文件因文件數量過多而無法顯示