|
@@ -64,6 +64,9 @@
|
|
|
import YearMonthSelect from "@/components/year-month-select";
|
|
import YearMonthSelect from "@/components/year-month-select";
|
|
|
import UploadExcelDialog from "@/components/upload-excel-dialog";
|
|
import UploadExcelDialog from "@/components/upload-excel-dialog";
|
|
|
import projectSelect from "@/components/project-select";
|
|
import projectSelect from "@/components/project-select";
|
|
|
|
|
+import {exportBlob} from "@/api/common";
|
|
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
|
|
+import {downloadXls} from "@/util/util";
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
|
|
|
|
|
|
|
|
|
@@ -91,16 +94,19 @@ export default window.$crudCommon({
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getFormData() {
|
|
|
|
|
+ return { ...this.form, yearAndMonth: this.params.yearAndMonth };
|
|
|
|
|
+ },
|
|
|
handleImport() {
|
|
handleImport() {
|
|
|
let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
|
- this.$refs.uploadExcelDialog.open('/api/kd-scientific/technician/import', excelParams);
|
|
|
|
|
|
|
+ this.$refs.uploadExcelDialog.open('/api/kd-scientific/direct-cost/import', excelParams);
|
|
|
},
|
|
},
|
|
|
uploadAfter() {
|
|
uploadAfter() {
|
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
|
},
|
|
},
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
- exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
|
|
|
|
+ exportBlob(`/api/kd-scientific/direct-cost/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
downloadXls(res.data, `项目直接投入费用表${this.params.yearAndMonth}.xlsx`);
|
|
downloadXls(res.data, `项目直接投入费用表${this.params.yearAndMonth}.xlsx`);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|