|
@@ -4,7 +4,6 @@
|
|
|
v-bind="bindVal"
|
|
v-bind="bindVal"
|
|
|
v-on="onEvent"
|
|
v-on="onEvent"
|
|
|
v-model="form"
|
|
v-model="form"
|
|
|
- :page.sync="page"
|
|
|
|
|
>
|
|
>
|
|
|
<template slot="menuLeft">
|
|
<template slot="menuLeft">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -16,34 +15,16 @@
|
|
|
>
|
|
>
|
|
|
导出
|
|
导出
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <!-- <print-table-btn @click="printTable" /> -->
|
|
|
|
|
|
|
|
|
|
<div style="display: flex; align-items: center;">
|
|
<div style="display: flex; align-items: center;">
|
|
|
<year-month-select v-model="params.yearAndMonth" :showAllYear="false"></year-month-select>
|
|
<year-month-select v-model="params.yearAndMonth" :showAllYear="false"></year-month-select>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
- <template slot="costRangeSearch">
|
|
|
|
|
- <div style="display: flex; align-items: center;">
|
|
|
|
|
- <span>费用区间(元):</span>
|
|
|
|
|
- <avue-input-number v-model="params.startSysm" :min="0" style="width: 100px !important;"></avue-input-number>
|
|
|
|
|
- <span style="width: 20px; text-align: center;">至</span>
|
|
|
|
|
- <avue-input-number v-model="params.endSysm" :min="0" style="width: 100px !important;"></avue-input-number>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
|
|
|
|
|
<upload-excel-dialog ref="uploadExcelDialog" :uploadAfter="uploadAfter"/>
|
|
<upload-excel-dialog ref="uploadExcelDialog" :uploadAfter="uploadAfter"/>
|
|
|
|
|
|
|
|
- <WideTablePrinter
|
|
|
|
|
- ref="printWideTable"
|
|
|
|
|
- :columns="wideTableColumns"
|
|
|
|
|
- :data="data"
|
|
|
|
|
- :print-title="printTitle"
|
|
|
|
|
- :rows-per-page="30"
|
|
|
|
|
- :default-landscape="true"
|
|
|
|
|
- />
|
|
|
|
|
</basic-container>
|
|
</basic-container>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -53,7 +34,6 @@ import {exportBlob} from "@/api/common";
|
|
|
import {getToken} from "@/util/auth";
|
|
import {getToken} from "@/util/auth";
|
|
|
import {downloadXls} from "@/util/util";
|
|
import {downloadXls} from "@/util/util";
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
-import Decimal from "decimal.js";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default window.$crudCommon({
|
|
export default window.$crudCommon({
|
|
@@ -72,35 +52,29 @@ export default window.$crudCommon({
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
- 'params.yearAndMonth'(newVal) {
|
|
|
|
|
- this.page.currentPage = 1;
|
|
|
|
|
- this.getList(this.page);
|
|
|
|
|
|
|
+ 'params.yearAndMonth'() {
|
|
|
|
|
+ this.getList();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- loadData() {},
|
|
|
|
|
|
|
+ loadData() {
|
|
|
|
|
+ this.loading = true;
|
|
|
|
|
+ this.api[this.option.list || 'getList'](this.getSearchParams()).then(res => {
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
+ this.data = res.data.data;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
exportBlob(`/api/kd-scientific/lease/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
exportBlob(`/api/kd-scientific/lease/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
downloadXls(res.data, `研发费用汇总表${this.params.yearAndMonth}.xlsx`);
|
|
downloadXls(res.data, `研发费用汇总表${this.params.yearAndMonth}.xlsx`);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- /**
|
|
|
|
|
- * 打印表格
|
|
|
|
|
- * @param isLandscape 是否横向打印
|
|
|
|
|
- */
|
|
|
|
|
- printTable(isLandscape) {
|
|
|
|
|
- this.wideTableColumns = this.$refs.crud.columnOption;
|
|
|
|
|
- this.printTitle = `研发费用汇总表${this.params.yearAndMonth}`;
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.printWideTable.printTable(isLandscape);
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
},
|
|
},
|
|
|
}, {
|
|
}, {
|
|
|
// 模块路径
|
|
// 模块路径
|
|
|
name: 'yfCostManage/yfCostStatistics/yfCostSummaryList',
|
|
name: 'yfCostManage/yfCostStatistics/yfCostSummaryList',
|
|
|
- res: ({ data }) => {
|
|
|
|
|
- return data;
|
|
|
|
|
- },
|
|
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|