|
@@ -35,12 +35,14 @@
|
|
</a-row>
|
|
</a-row>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
<a-table
|
|
<a-table
|
|
|
|
+ ref="tableRef"
|
|
bordered
|
|
bordered
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data-source="dataSource"
|
|
:data-source="dataSource"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
- :scroll="{x: 2500 ,y:400}"
|
|
|
|
|
|
+ :scroll="{x: 2000 ,y:400}"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
|
|
+ :footer="showTotal"
|
|
>
|
|
>
|
|
</a-table>
|
|
</a-table>
|
|
</div>
|
|
</div>
|
|
@@ -73,152 +75,189 @@
|
|
{
|
|
{
|
|
title: '序号',
|
|
title: '序号',
|
|
align:"center",
|
|
align:"center",
|
|
- width:'2%',
|
|
|
|
|
|
+ width:80,
|
|
dataIndex: 'index',
|
|
dataIndex: 'index',
|
|
- customRender:function (t, r, index) {
|
|
|
|
- return parseInt(index)+1;
|
|
|
|
- }
|
|
|
|
|
|
+ customRender:function (t, record, index) {
|
|
|
|
+ if(record.name=='合计'){
|
|
|
|
+ return ''
|
|
|
|
+ }else{
|
|
|
|
+ return parseInt(index)+1;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ fixed:'left'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '编号',
|
|
|
|
|
|
+ title: '姓名',
|
|
align: "center",
|
|
align: "center",
|
|
- dataIndex: 'code',
|
|
|
|
|
|
+ dataIndex: 'name',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- customRender: (t) => ellipsis(t,17),
|
|
|
|
- width:'6%'
|
|
|
|
|
|
+ width:110,
|
|
|
|
+ fixed:'left'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '姓名',
|
|
|
|
|
|
+ title: '编号',
|
|
align: "center",
|
|
align: "center",
|
|
- dataIndex: 'name',
|
|
|
|
|
|
+ dataIndex: 'code',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- customRender: (t) => ellipsis(t,5),
|
|
|
|
- width:'4%'
|
|
|
|
|
|
+ customRender: (t) => ellipsis(t,17),
|
|
|
|
+ width:120,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '基本薪资',
|
|
title: '基本薪资',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'wages',
|
|
dataIndex: 'wages',
|
|
- width:'5%'
|
|
|
|
|
|
+ width:110
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '话费补贴',
|
|
title: '话费补贴',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'phoneBill',
|
|
dataIndex: 'phoneBill',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:110
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '午餐补贴',
|
|
title: '午餐补贴',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'lunch',
|
|
dataIndex: 'lunch',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:110
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '住房补贴',
|
|
title: '住房补贴',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'housingSubsidies',
|
|
dataIndex: 'housingSubsidies',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:110
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '交通补贴',
|
|
title: '交通补贴',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'transportation',
|
|
dataIndex: 'transportation',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:110
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '全勤奖',
|
|
title: '全勤奖',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'fullAttendance',
|
|
dataIndex: 'fullAttendance',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '合计应发',
|
|
title: '合计应发',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'totalPayable',
|
|
dataIndex: 'totalPayable',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:110
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '社保',
|
|
title: '社保',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'socialSecurity',
|
|
dataIndex: 'socialSecurity',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '公积金',
|
|
title: '公积金',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'accumulationFund',
|
|
dataIndex: 'accumulationFund',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '个税',
|
|
title: '个税',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'personalTax',
|
|
dataIndex: 'personalTax',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '迟到',
|
|
title: '迟到',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'latenessCost',
|
|
dataIndex: 'latenessCost',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '事假',
|
|
title: '事假',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'personalCost',
|
|
dataIndex: 'personalCost',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '病假',
|
|
title: '病假',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'sickCost',
|
|
dataIndex: 'sickCost',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '婚假',
|
|
title: '婚假',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'marriageCost',
|
|
dataIndex: 'marriageCost',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '丧假',
|
|
title: '丧假',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'funeralCost',
|
|
dataIndex: 'funeralCost',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:100
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '合计应扣',
|
|
title: '合计应扣',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'totalDeduction',
|
|
dataIndex: 'totalDeduction',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:110
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '实发合计',
|
|
title: '实发合计',
|
|
align: "center",
|
|
align: "center",
|
|
dataIndex: 'actualOccurrence',
|
|
dataIndex: 'actualOccurrence',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
- width:'4%'
|
|
|
|
|
|
+ width:110,
|
|
|
|
+ fixed:'right'
|
|
},
|
|
},
|
|
]
|
|
]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
},
|
|
},
|
|
- watch: {
|
|
|
|
|
|
+ watch:{
|
|
|
|
+ dataSource(){
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ const dom = this.$refs.tableRef.$el.getElementsByClassName('ant-table-body')[0];
|
|
|
|
+ dom.addEventListener(
|
|
|
|
+ 'scroll',
|
|
|
|
+ () => {
|
|
|
|
+ this.$refs.tableInfo.$el.querySelectorAll(
|
|
|
|
+ '.ant-table-body'
|
|
|
|
+ )[0].scrollLeft = dom.scrollLeft
|
|
|
|
+ },
|
|
|
|
+ true
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ // 合计展示
|
|
|
|
+ totalDataSource(){
|
|
|
|
+ // 开票成本-衬衣 合计
|
|
|
|
+ var item = {
|
|
|
|
+ "name":"合计"
|
|
|
|
+ };
|
|
|
|
+ var allNumber = 0
|
|
|
|
+ for (let row of this.dataSource){
|
|
|
|
+ allNumber += row.actualOccurrence*1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ item.actualOccurrence= parseFloat(allNumber.toFixed(2));
|
|
|
|
+ return [item];
|
|
|
|
+
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
handleCancel(){
|
|
handleCancel(){
|
|
@@ -243,7 +282,19 @@
|
|
},
|
|
},
|
|
searchSonList(){
|
|
searchSonList(){
|
|
this.getTableList()
|
|
this.getTableList()
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ showTotal(data) {
|
|
|
|
+ return (
|
|
|
|
+ <a-table
|
|
|
|
+ ref="tableInfo"
|
|
|
|
+ pagination={false}
|
|
|
|
+ columns={this.columns}
|
|
|
|
+ dataSource={this.totalDataSource || []}
|
|
|
|
+ showHeader={false}
|
|
|
|
+ scroll={{x:2000 }}
|
|
|
|
+ ></a-table>
|
|
|
|
+ )
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -263,4 +314,14 @@
|
|
/deep/ .ant-calendar-picker{
|
|
/deep/ .ant-calendar-picker{
|
|
width: 113px !important;
|
|
width: 113px !important;
|
|
}
|
|
}
|
|
|
|
+ /deep/ .ant-table-footer .ant-table-body {
|
|
|
|
+ overflow: hidden !important;
|
|
|
|
+ }
|
|
|
|
+ /deep/.ant-table-footer{
|
|
|
|
+ padding:0 !important;
|
|
|
|
+ overflow: hidden !important;
|
|
|
|
+ }
|
|
|
|
+ /deep/.ant-table-fixed-left{
|
|
|
|
+ min-width:190px !important
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|