|
|
@@ -187,6 +187,12 @@
|
|
|
@click="exportList"
|
|
|
>导出</a-button
|
|
|
>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ @click="exportDetailList"
|
|
|
+ >明细导出</a-button
|
|
|
+ >
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
|
|
|
@@ -222,6 +228,7 @@ import StandardTable from "@/components/table/StandardTable";
|
|
|
import tree from "@/components/tree/agentChanell";
|
|
|
import moment from "moment";
|
|
|
import datePicker from "@/components/datePicker";
|
|
|
+import {detailExport} from "../../services/business";
|
|
|
|
|
|
const columns = [
|
|
|
{
|
|
|
@@ -388,6 +395,31 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ exportDetailList() {
|
|
|
+ this.$API.business
|
|
|
+ .detailExport({
|
|
|
+ ...this.formState,
|
|
|
+ managementSource: 1,
|
|
|
+ treeType: this.treeType,
|
|
|
+ timeType: this.timeType,
|
|
|
+ treeUserId: this.treeUserId
|
|
|
+ ? this.treeUserId
|
|
|
+ : this.formState.treeUserId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ let url = this.process + res.data.data; // 3.创建一个临时的url指向blob对象
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "导出文件.xlsx";
|
|
|
+ a.click();
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
async timeChange(val) {
|
|
|
// console.log(val);
|
|
|
this.dateType = val.dateType;
|