|
@@ -35,6 +35,7 @@
|
|
|
</div> -->
|
|
|
|
|
|
<a-table
|
|
|
+ v-if="dataSource.length > 0"
|
|
|
ref="table"
|
|
|
size="middle"
|
|
|
:scroll="{x:true}"
|
|
@@ -44,6 +45,7 @@
|
|
|
:dataSource="dataSource"
|
|
|
:pagination="false"
|
|
|
:loading="loading"
|
|
|
+ defaultExpandAllRows
|
|
|
class="j-table-force-nowrap"
|
|
|
@change="handleTableChange">
|
|
|
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
|
|
@@ -113,7 +115,11 @@
|
|
|
return {
|
|
|
description: '批产任务页面',
|
|
|
// 表头
|
|
|
- columns: [
|
|
|
+ columns: [],
|
|
|
+ // settingColumns: ['taskno', 'pccode', 'taskname', 'zjcb', 'scgs', 'contractfpe', 'estimationcoat', 'costPercent', 'processpercent', 'sjgs', 'clf', 'zyf', 'swf', 'wxf', 'taskmoney', 'oneIncome', 'oneProfit', 'lrl', 'xhname', 'yzjdname', 'jhwcsj', 'yzsl', 'oneCost', 'lre', 'zcb', 'glf', 'lbsy', 'zrbm', 'gdzczj', 'gzjlwf', 'rldlf', 'tasktype', 'jycs', 'workhour', 'hxzxname', 'auditprice', 'brief', 'blcode', 'businessman', 'bccode', 'reftaskno', 'iflag'],
|
|
|
+ settingColumns: ['taskno', 'pccode', 'taskname', 'estimationcoat', 'costPercent', 'processpercent', 'oneIncome', 'oneProfit', 'lrl', 'xhname', 'yzjdname', 'jhwcsj', 'yzsl', 'oneCost', 'lre', 'zcb', 'glf', 'lbsy', 'zrbm', 'gdzczj', 'gzjlwf', 'rldlf', 'tasktype', 'jycs', 'hxzxname', 'auditprice', 'brief', 'blcode', 'businessman', 'bccode', 'reftaskno', 'iflag'],
|
|
|
+ // 'scgs', 'sjgs',
|
|
|
+ defColumns: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: '',
|
|
@@ -133,13 +139,14 @@
|
|
|
style: {
|
|
|
textAlign: 'center', // 表头居中
|
|
|
}
|
|
|
- })
|
|
|
+ }),
|
|
|
+ fixed:"left",
|
|
|
},
|
|
|
{
|
|
|
title:'任务名称',
|
|
|
align:"center",
|
|
|
+ dataIndex: 'taskname',
|
|
|
fixed:"left",
|
|
|
- dataIndex: 'taskname'
|
|
|
},
|
|
|
{
|
|
|
title:'型号',
|
|
@@ -205,47 +212,11 @@
|
|
|
dataIndex: 'estimationcoat'
|
|
|
},
|
|
|
{
|
|
|
- title:'合同额',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'contractfpe',
|
|
|
- customCell: this.getClickColumn,
|
|
|
- },
|
|
|
- {
|
|
|
- title:'已收款',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'taskmoney',
|
|
|
- customCell: this.getClickColumn,
|
|
|
- },
|
|
|
- {
|
|
|
title:'总成本',
|
|
|
align:"center",
|
|
|
dataIndex: 'zcb'
|
|
|
},
|
|
|
{
|
|
|
- title:'材料费',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'clf',
|
|
|
- customCell: this.getClickColumn,
|
|
|
- },
|
|
|
- {
|
|
|
- title:'专用费',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'zyf',
|
|
|
- customCell: this.getClickColumn,
|
|
|
- },
|
|
|
- {
|
|
|
- title:'事务费',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'swf',
|
|
|
- customCell: this.getClickColumn,
|
|
|
- },
|
|
|
- {
|
|
|
- title:'外协费',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'wxf',
|
|
|
- customCell: this.getClickColumn,
|
|
|
- },
|
|
|
- {
|
|
|
title:'燃料动力费',
|
|
|
align:"center",
|
|
|
dataIndex: 'rldlf'
|
|
@@ -266,23 +237,11 @@
|
|
|
dataIndex: 'glf'
|
|
|
},
|
|
|
{
|
|
|
- title:'装机成本',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'zjcb',
|
|
|
- customCell: this.getClickColumn,
|
|
|
- },
|
|
|
- {
|
|
|
title:'内部试验',
|
|
|
align:"center",
|
|
|
dataIndex: 'lbsy'
|
|
|
},
|
|
|
{
|
|
|
- title:'工时(h)',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'workhour',
|
|
|
- customCell: this.getClickColumn,
|
|
|
- },
|
|
|
- {
|
|
|
title:'责任部门',
|
|
|
align:"center",
|
|
|
dataIndex: 'zrbm'
|
|
@@ -362,6 +321,54 @@
|
|
|
align:"center",
|
|
|
dataIndex: 'scgs'
|
|
|
},
|
|
|
+ {
|
|
|
+ title:'合同额',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'contractfpe',
|
|
|
+ fixed: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'已收款',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'taskmoney',
|
|
|
+ fixed: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'材料费',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'clf',
|
|
|
+ fixed: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'专用费',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'zyf',
|
|
|
+ fixed: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'事务费',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'swf',
|
|
|
+ fixed: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'外协费',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'wxf',
|
|
|
+ fixed: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'装机成本',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'zjcb',
|
|
|
+ fixed: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'工时(h)',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'workhour',
|
|
|
+ fixed: 'right'
|
|
|
+ },
|
|
|
],
|
|
|
url: {
|
|
|
list: "/projectCost/projectCost/getPCCostDetailList",
|
|
@@ -374,6 +381,7 @@
|
|
|
created() {
|
|
|
this.getSuperFieldList();
|
|
|
this.loadData()
|
|
|
+ this.initColumns()
|
|
|
},
|
|
|
computed: {
|
|
|
// importExcelUrl: function(){
|
|
@@ -384,11 +392,27 @@
|
|
|
loadData() {
|
|
|
this.loading = true;
|
|
|
getAction(this.url.list, this.pichanInfo).then((res) => {
|
|
|
- this.dataSource = res
|
|
|
+ console.log(res)
|
|
|
+ this.dataSource = []
|
|
|
+ this.dataSource.push(res)
|
|
|
}).finally(() => {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
+ initColumns(){
|
|
|
+ console.log(this.pichanInfo.columnValue)
|
|
|
+ this.settingColumns.push(this.pichanInfo.columnValue)
|
|
|
+ const cols = this.defColumns.filter(item => {
|
|
|
+ if(item.key =='rowIndex'|| item.dataIndex=='action'){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (this.settingColumns.includes(item.dataIndex)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ })
|
|
|
+ this.columns = cols;
|
|
|
+ },
|
|
|
initDictConfig(){
|
|
|
},
|
|
|
getSuperFieldList(){
|
|
@@ -412,7 +436,7 @@
|
|
|
fieldList.push({type:'string',value:'xmlb',text:'项目类别',dictCode:''})
|
|
|
fieldList.push({type:'string',value:'taskno',text:'任务号',dictCode:''})
|
|
|
this.superFieldList = fieldList
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|