|
@@ -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;
|