|
@@ -117,7 +117,7 @@
|
|
|
<a-button @click="handleExpand" type="primary" icon="column-height">折叠/展开</a-button>
|
|
|
<a-button @click="handleAdd" type="primary" icon="plus">导入</a-button>
|
|
|
<a-button @click="handleComputed" type="primary" icon="reconciliation">计算</a-button>
|
|
|
- <a-button type="primary" icon="download" @click="handleExportXls('项目成本')">导出</a-button>
|
|
|
+ <a-button type="primary" icon="download" @click="handleExportXls()">导出</a-button>
|
|
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
|
|
<a-button type="primary" icon="import">导入</a-button>
|
|
|
</a-upload> -->
|
|
@@ -582,6 +582,15 @@ import { number } from 'echarts';
|
|
|
customCell: (record, index)=>{ return this.customCellDetail(record, index, 'clf', '材料费')}
|
|
|
},
|
|
|
{
|
|
|
+ title:'专用预算',
|
|
|
+ align:"center",
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'zyys',
|
|
|
+ customRender: (text) => {
|
|
|
+ return Number(text).toFixed(2)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
title:'专用费',
|
|
|
align:"center",
|
|
|
width: 120,
|
|
@@ -595,6 +604,15 @@ import { number } from 'echarts';
|
|
|
customCell: (record, index)=>{ return this.customCellDetail(record, index, 'zyf', '专用费')}
|
|
|
},
|
|
|
{
|
|
|
+ title:'事务预算',
|
|
|
+ align:"center",
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'swys',
|
|
|
+ customRender: (text) => {
|
|
|
+ return Number(text).toFixed(2)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
title:'事务费',
|
|
|
align:"center",
|
|
|
width: 120,
|
|
@@ -630,6 +648,15 @@ import { number } from 'echarts';
|
|
|
customCell: (record, index)=>{ return this.customCellDetail(record, index, 'wxf', '外协费')}
|
|
|
},
|
|
|
{
|
|
|
+ title:'间接预算',
|
|
|
+ align:"center",
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'jjys',
|
|
|
+ customRender: (text) => {
|
|
|
+ return Number(text).toFixed(2)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
title:'燃动费',
|
|
|
align:"center",
|
|
|
width: 120,
|
|
@@ -1330,17 +1357,16 @@ import { number } from 'echarts';
|
|
|
// this.chooseRowType == 'huiji'
|
|
|
// }
|
|
|
},
|
|
|
- // 导出
|
|
|
- handleExportXls(fileName){
|
|
|
- if(!fileName || typeof fileName != "string"){
|
|
|
- fileName = "导出文件"
|
|
|
- }
|
|
|
+ export(value, fileName){
|
|
|
+ // if(!fileName || typeof fileName != "string"){
|
|
|
+ // fileName = "导出文件"
|
|
|
+ // }
|
|
|
// let param = this.getQueryParams();
|
|
|
// if(this.selectedRowKeys && this.selectedRowKeys.length>0){
|
|
|
// param['selections'] = this.selectedRowKeys.join(",")
|
|
|
// }
|
|
|
// console.log("导出参数",param)
|
|
|
- var param = {isFolding: 0}
|
|
|
+ var param = {isFolding: value}
|
|
|
downFile(this.url.exportXlsUrl,param).then((data)=>{
|
|
|
console.log(data)
|
|
|
if (!data) {
|
|
@@ -1362,6 +1388,34 @@ import { number } from 'echarts';
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 导出
|
|
|
+ handleExportXls(){
|
|
|
+ var isFolding
|
|
|
+ var fileName = "项目成本"
|
|
|
+ var _this = this
|
|
|
+ const modal = this.$confirm({
|
|
|
+ title: '请选择导出数据类型',
|
|
|
+ content: '*全部数据=汇集层+子级',
|
|
|
+ okText: '全部数据',
|
|
|
+ // okType: 'danger',
|
|
|
+ cancelText: '汇集数据',
|
|
|
+ closable: true, // 显示右上角关闭按钮
|
|
|
+ onOk() {
|
|
|
+ isFolding = 1
|
|
|
+ fileName = '项目成本-全部数据'
|
|
|
+ _this.export(isFolding, fileName)
|
|
|
+ },
|
|
|
+ onCancel(e) {
|
|
|
+ // console.log(e)
|
|
|
+ // 如果是右上角关闭触发,则不导出,只关闭
|
|
|
+ if(e.triggerCancel) return
|
|
|
+ isFolding = 0
|
|
|
+ fileName = '项目成本-汇集数据'
|
|
|
+ _this.export(isFolding, fileName)
|
|
|
+ modal.destroy();
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
getSuperFieldList(){
|
|
|
let fieldList=[];
|
|
|
fieldList.push({type:'string',value:'taskno',text:'任务号',dictCode:''})
|
|
@@ -1416,7 +1470,7 @@ import { number } from 'echarts';
|
|
|
<style scoped>
|
|
|
@import '~@assets/less/common.less';
|
|
|
</style>
|
|
|
-<style>
|
|
|
+<style scoped>
|
|
|
.table-kuisun-color{
|
|
|
color: red !important;
|
|
|
/* user-select: 'none'; */
|
|
@@ -1429,4 +1483,15 @@ import { number } from 'echarts';
|
|
|
color: #29d59f !important;
|
|
|
/* color: #438bf7 !important; */
|
|
|
}
|
|
|
+ /*表格thead*/
|
|
|
+ ::v-deep .ant-table-thead > tr > th {
|
|
|
+ font-size: 15px;
|
|
|
+ /* color: #000; */
|
|
|
+ }
|
|
|
+
|
|
|
+ /*表格tbody*/
|
|
|
+ ::v-deep .ant-table-tbody > tr > td {
|
|
|
+ font-size: 13px;
|
|
|
+ padding: 10px 8px !important;
|
|
|
+ }
|
|
|
</style>
|