280 lines
8.6 KiB
Vue
280 lines
8.6 KiB
Vue
<template>
|
|
<div>
|
|
<page-header-title :is-level-one="false" level-two-title="个人来款详情"></page-header-title>
|
|
|
|
<a-card :bordered="false">
|
|
<!-- 查询区域-start -->
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-row>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<a-form-item label="来款项目" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-input placeholder="请输入来款项目" v-model="queryParam.contractName"></a-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<a-form-item label="来款用途" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<j-dict-select-tag v-model="queryParam.chargeUse" placeholder="请选择来款用途" dictCode="payment_charge_use"/>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<a-form-item label="来款年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<j-year-date style="width:100%" placeholder="请选择来款年份" v-model="queryParam.paymentDate"></j-year-date>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<a-form-item label="付款状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<j-dict-select-tag v-model="queryParam.pack"
|
|
placeholder="请选择付款状态"
|
|
dictCode="yn"/>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-input placeholder="请输入应收款项" v-model="queryParam.contractName" class="query-group-cust"></a-input>
|
|
<span class="query-group-split-cust"></span>
|
|
<a-input placeholder="请输入应收款项" v-model="queryParam.contractName" class="query-group-cust"></a-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
|
<span class="table-page-search-submitButtons">
|
|
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
|
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
|
</span>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form>
|
|
</div>
|
|
<!-- /查询区域-end-->
|
|
|
|
<!-- 操作按钮区域-->
|
|
<div class="table-operator">
|
|
<a-button type="primary" icon="export" @click="handleExportXls('全所统计')">导出</a-button>
|
|
</div>
|
|
<!-- 操作按钮区域-end-->
|
|
|
|
<!-- table表格区域-->
|
|
<div>
|
|
<a-table
|
|
size="middle"
|
|
ref="table"
|
|
bordered
|
|
rowKey="id"
|
|
:columns="columns"
|
|
:dataSource="dataSource"
|
|
:pagination="ipagination"
|
|
:loading="loading"
|
|
:scroll="{x: 1100}"
|
|
@change="handleTableChange"
|
|
:class="dataSource.length === 0 ? 'show-scroll' : ''"
|
|
class="j-table-force-nowrap main-table">
|
|
|
|
<!-- 项目名称-->
|
|
<template slot="projectName" slot-scope="text, record">
|
|
<j-ellipsis :value="text" :length="18" class="primary-color"
|
|
@click="openDetailModal(record)"></j-ellipsis>
|
|
</template>
|
|
|
|
<template slot="text" slot-scope="text">
|
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
|
</template>
|
|
|
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
|
<a @click="goDetail(record.id)">详情</a>
|
|
</span>
|
|
|
|
<template slot="footer" v-if="dataSource.length > 0">
|
|
|
|
<a-table
|
|
size="middle"
|
|
ref="footTable"
|
|
rowKey="id"
|
|
:columns="columnsFooter"
|
|
:dataSource="footerDataSource"
|
|
:showHeader="false"
|
|
:pagination="false"
|
|
:scroll="{x: 1100}"
|
|
class="j-table-force-nowrap footer-table">
|
|
|
|
<!-- 项目名称-->
|
|
<template slot="projectName" slot-scope="text, record">
|
|
<j-ellipsis :value="text" :length="18" class="primary-color"
|
|
@click="openDetailModal(record)"></j-ellipsis>
|
|
</template>
|
|
|
|
<template slot="text" slot-scope="text">
|
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
|
</template>
|
|
</a-table>
|
|
</template>
|
|
</a-table>
|
|
</div>
|
|
</a-card>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import PageHeaderTitle from '../../../components/layouts/PageHeaderTitle'
|
|
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
|
import JYearDate from '../../../components/jero/JYearDate'
|
|
|
|
export default {
|
|
name: 'IndividualPaymentStatisticsDetail',
|
|
components: { PageHeaderTitle, JYearDate },
|
|
mixins: [JeroListMixin],
|
|
data() {
|
|
return {
|
|
labelCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 5 }
|
|
},
|
|
wrapperCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 10 }
|
|
},
|
|
url: {
|
|
list: ''
|
|
},
|
|
columns: [
|
|
{
|
|
title: '序号',
|
|
dataIndex: '',
|
|
key: 'rowIndex',
|
|
width: 100,
|
|
align: 'center',
|
|
customRender: function (t, r, index) {
|
|
return parseInt(index) + 1
|
|
}
|
|
}, {
|
|
title: '来款项目',
|
|
align: 'center',
|
|
width: 160,
|
|
dataIndex: 'workGroup',
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '应收金额',
|
|
align: 'center',
|
|
width: 160,
|
|
dataIndex: 'allMoney',
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '实收金额',
|
|
align: 'center',
|
|
width: 160,
|
|
dataIndex: 'comeAllMoney',
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '来款用途',
|
|
align: 'center',
|
|
width: 160,
|
|
dataIndex: 'chargeUse_dictText',
|
|
scopedSlots: { customRender: 'text' }
|
|
}
|
|
],
|
|
// 总计表头,与主表表头一致
|
|
columnsFooter: [
|
|
{
|
|
title: '序号',
|
|
dataIndex: 'title',
|
|
width: 100,
|
|
align: 'center'
|
|
}, {
|
|
title: '来款项目',
|
|
align: 'center',
|
|
width: 160,
|
|
dataIndex: 'workGroup',
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '应收金额',
|
|
align: 'center',
|
|
width: 160,
|
|
dataIndex: 'allMoney',
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '实收金额',
|
|
align: 'center',
|
|
width: 160,
|
|
dataIndex: 'comeAllMoney',
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '来款用途',
|
|
align: 'center',
|
|
width: 160,
|
|
dataIndex: 'chargeUse_dictText',
|
|
scopedSlots: { customRender: 'text' }
|
|
}
|
|
],
|
|
// 总计数据
|
|
footerDataSource: []
|
|
}
|
|
},
|
|
mounted() {
|
|
this.setScroll()
|
|
},
|
|
methods: {
|
|
// 同步表与footer滚动,保留底部滚动条
|
|
setScroll() {
|
|
if (this.dataSource.length === 0) {
|
|
return
|
|
}
|
|
let dom = this.$refs.footTable.$el.querySelectorAll('.ant-table-body')[0]
|
|
console.log(this.$refs.footTable.$el.querySelectorAll('.ant-table-body'))
|
|
dom.addEventListener(
|
|
'scroll',
|
|
() => {
|
|
this.$refs.table.$el.querySelectorAll(
|
|
'.ant-table-body'
|
|
)[0].scrollLeft = dom.scrollLeft
|
|
},
|
|
true
|
|
)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
@import '~@assets/less/common.less';
|
|
|
|
// 隐藏主列表的横向滚动条
|
|
.main-table {
|
|
/deep/ .ant-table-body {
|
|
overflow-x: hidden !important;
|
|
}
|
|
|
|
/deep/ .ant-table-footer {
|
|
padding: 0 0;
|
|
}
|
|
|
|
/deep/ .ant-table.ant-table-bordered .ant-table-footer {
|
|
border-left: none;
|
|
margin-top: -2px;
|
|
}
|
|
}
|
|
|
|
.show-scroll {
|
|
/deep/ .ant-table-body {
|
|
overflow-x: auto !important;
|
|
}
|
|
}
|
|
|
|
// 去除底部表格边框
|
|
.footer-table {
|
|
/deep/ .ant-table-tbody > tr > td {
|
|
border: none;
|
|
}
|
|
|
|
/deep/ .ant-table-fixed-right table {
|
|
border-left: none !important;
|
|
background: none;
|
|
}
|
|
|
|
/deep/ .ant-table-body {
|
|
overflow-x: auto !important;
|
|
}
|
|
|
|
/deep/ .ant-table-bordered .ant-table-header > table {
|
|
border-left: none;
|
|
}
|
|
}
|
|
</style> |