|
@@ -1,112 +1,114 @@
|
|
|
<template>
|
|
|
<a-card size="small" :bordered="false" class="financialCollectionList-wrap">
|
|
|
- <!-- 标签页 -->
|
|
|
- <a-tabs type="card" default-active-key="ALL" @change="handleTabChange" class="financialCollectionList-tabs ">
|
|
|
- <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
|
|
|
- <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
|
|
|
- </a-tab-pane>
|
|
|
- </a-tabs>
|
|
|
- <!-- 搜索条件 -->
|
|
|
- <div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
- <a-row :gutter="15">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="收款单号"><a-input id="financialCollectionList-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入收款单号" /></a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="关联单号"><a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="商户名称">
|
|
|
- <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入商户名称" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <template v-if="advanced">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 标签页 -->
|
|
|
+ <a-tabs type="card" default-active-key="ALL" @change="handleTabChange" class="financialCollectionList-tabs ">
|
|
|
+ <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
|
|
|
+ <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
|
|
|
+ </a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="单据状态">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.billState"
|
|
|
- ref="settleState"
|
|
|
- id="financialCollectionList-settleState"
|
|
|
- code="BILL_STATUS"
|
|
|
- placeholder="请选择单据状态"
|
|
|
- allowClear
|
|
|
- ></v-select>
|
|
|
- </a-form-item>
|
|
|
+ <a-form-item label="收款单号"><a-input id="financialCollectionList-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入收款单号" /></a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="关联单号"><a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="审核时间">
|
|
|
- <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
+ <a-form-item label="商户名称">
|
|
|
+ <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入商户名称" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <template v-if="advanced">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="单据状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.billState"
|
|
|
+ ref="settleState"
|
|
|
+ id="financialCollectionList-settleState"
|
|
|
+ code="BILL_STATUS"
|
|
|
+ placeholder="请选择单据状态"
|
|
|
+ allowClear
|
|
|
+ ></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="审核时间">
|
|
|
+ <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </template>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <span class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="financialCollectionList-reset">重置</a-button>
|
|
|
+ <a @click="advanced = !advanced" style="margin-left: 8px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- alert -->
|
|
|
+ <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
+ <div slot="message">
|
|
|
+ 共
|
|
|
+ <strong>{{ totalData.count }}</strong>
|
|
|
+ 条记录,应收金额合计
|
|
|
+ <strong>¥{{ totalData.totalAmount }}</strong>
|
|
|
+ ,其中已收金额
|
|
|
+ <strong>¥{{ totalData.settledAmount }}</strong>
|
|
|
+ ,待收金额
|
|
|
+ <strong>¥{{ totalData.unsettleAmount }}</strong>
|
|
|
+ </div>
|
|
|
+ </a-alert>
|
|
|
+ <div style="margin-bottom: 15px">
|
|
|
+ <a-button type="primary" id="financialCollectionList-export" :loading="loading" @click="handleCollection">批量收款</a-button>
|
|
|
+ <span style="margin-left: 8px">
|
|
|
+ <template v-if="hasSelected">
|
|
|
+ {{ `已选 ${selectedRowKeys.length} 项` }}
|
|
|
</template>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <span class="table-page-search-submitButtons">
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="financialCollectionList-reset">重置</a-button>
|
|
|
- <a @click="advanced = !advanced" style="margin-left: 8px">
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
- </a>
|
|
|
- </span>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- <!-- alert -->
|
|
|
- <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
- <div slot="message">
|
|
|
- 共
|
|
|
- <strong>{{ totalData.count }}</strong>
|
|
|
- 条记录,应收金额合计
|
|
|
- <strong>¥{{ totalData.totalAmount }}</strong>
|
|
|
- ,其中已收金额
|
|
|
- <strong>¥{{ totalData.settledAmount }}</strong>
|
|
|
- ,待收金额
|
|
|
- <strong>¥{{ totalData.unsettleAmount }}</strong>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
- </a-alert>
|
|
|
- <div style="margin-bottom: 15px">
|
|
|
- <a-button type="primary" id="financialCollectionList-export" :loading="loading" @click="handleCollection">批量收款</a-button>
|
|
|
- <span style="margin-left: 8px">
|
|
|
- <template v-if="hasSelected">
|
|
|
- {{ `已选 ${selectedRowKeys.length} 项` }}
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ :row-selection="rowSelection"
|
|
|
+ :rowKey="record => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ x: 1660, y: tableHeight }"
|
|
|
+ bordered
|
|
|
+ >
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-info"
|
|
|
+ v-if="record.settleState == 'SETTLED'"
|
|
|
+ @click="handleVoucher(record)"
|
|
|
+ id="financialCollectionList-voucher-btn">凭证</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ :loading="loading"
|
|
|
+ class="button-warning"
|
|
|
+ v-if="record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1"
|
|
|
+ @click="handleCollectionSing(record)"
|
|
|
+ id="financialCollectionList-pay-btn">收款</a-button>
|
|
|
+ <span v-if="!(record.settleState == 'SETTLED') && !(record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1)">--</span>
|
|
|
+ <!-- satelliteFlag为1,是卫星仓 -->
|
|
|
</template>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable"
|
|
|
- ref="table"
|
|
|
- size="default"
|
|
|
- :row-selection="rowSelection"
|
|
|
- :rowKey="record => record.id"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ x: 1660, y: tableHeight }"
|
|
|
- bordered
|
|
|
- >
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-info"
|
|
|
- v-if="record.settleState == 'SETTLED'"
|
|
|
- @click="handleVoucher(record)"
|
|
|
- id="financialCollectionList-voucher-btn">凭证</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- :loading="loading"
|
|
|
- class="button-warning"
|
|
|
- v-if="record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1"
|
|
|
- @click="handleCollectionSing(record)"
|
|
|
- id="financialCollectionList-pay-btn">收款</a-button>
|
|
|
- <span v-if="!(record.settleState == 'SETTLED') && !(record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1)">--</span>
|
|
|
- <!-- satelliteFlag为1,是卫星仓 -->
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
<!-- 详情 -->
|
|
|
<detail-modal :openModal="openModal" ref="detailModal" @close="openModal = false" />
|
|
|
</a-card>
|
|
@@ -121,6 +123,7 @@ export default {
|
|
|
components: { STable, VSelect, detailModal, rangeDate },
|
|
|
data () {
|
|
|
return {
|
|
|
+ spinning: false,
|
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
openModal: false, // 详情弹框
|
|
@@ -145,95 +148,16 @@ export default {
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- {
|
|
|
- title: '收款单号',
|
|
|
- dataIndex: 'settleNo',
|
|
|
- width: 220,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '关联单号',
|
|
|
- dataIndex: 'bizNo',
|
|
|
- width: 220,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '商户名称',
|
|
|
- dataIndex: 'settleClientName',
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '应收金额',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text, record) {
|
|
|
- const val = record.totalAmount
|
|
|
- return val || val == 0 ? '¥' + val : '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '已收金额',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text, record) {
|
|
|
- const val = record.settledAmount
|
|
|
- return val || val == 0 ? '¥' + val : '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '待收金额',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text, record) {
|
|
|
- const val = record.unsettleAmount
|
|
|
- return val || val == 0 ? '¥' + val : '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '收款类型',
|
|
|
- dataIndex: 'bizName',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '收款方式',
|
|
|
- dataIndex: 'settleStyleName',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '审核时间',
|
|
|
- dataIndex: 'auditTime',
|
|
|
- width: 160,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '收款时间',
|
|
|
- dataIndex: 'settleTime',
|
|
|
- width: 160,
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
+ { title: '收款单号', dataIndex: 'settleNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '关联单号', dataIndex: 'bizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '商户名称', dataIndex: 'settleClientName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '应收金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '已收金额', dataIndex: 'settledAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '待收金额', dataIndex: 'unsettleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '收款类型', dataIndex: 'bizName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '收款方式', dataIndex: 'settleStyleName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '收款时间', dataIndex: 'settleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
@@ -292,7 +216,6 @@ export default {
|
|
|
// 总计
|
|
|
settleReceiptQuerySum (params) {
|
|
|
settleReceiptQuerySum(params).then(res => {
|
|
|
- console.log(res)
|
|
|
if (res.status == 200) {
|
|
|
this.totalData = Object.assign(this.totalData, res.data)
|
|
|
}
|
|
@@ -315,12 +238,16 @@ export default {
|
|
|
// 收款
|
|
|
handleCollectionSing (row) {
|
|
|
this.loading = true
|
|
|
+ this.spinning = true
|
|
|
settleReceiptMoney([row.id]).then(res => {
|
|
|
this.loading = false
|
|
|
if (res.status == 200) {
|
|
|
this.$message.success(res.message)
|
|
|
this.selectedRowKeys = []
|
|
|
this.$refs.table.refresh()
|
|
|
+ this.spinning = false
|
|
|
+ } else {
|
|
|
+ this.spinning = false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -337,12 +264,16 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
this.loading = true
|
|
|
+ this.spinning = true
|
|
|
settleReceiptMoney(this.selectedRowKeys).then(res => {
|
|
|
this.loading = false
|
|
|
if (res.status == 200) {
|
|
|
this.$message.success(res.message)
|
|
|
this.selectedRowKeys = []
|
|
|
this.$refs.table.refresh()
|
|
|
+ this.spinning = false
|
|
|
+ } else {
|
|
|
+ this.spinning = false
|
|
|
}
|
|
|
})
|
|
|
},
|