|
@@ -21,6 +21,17 @@
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item label="审核时间">
|
|
|
+ <rangeDate
|
|
|
+ id="companyReceivablePayableList-auditdate"
|
|
|
+ allowClear
|
|
|
+ :hasDisabledAreaTime="false"
|
|
|
+ ref="rangeDate"
|
|
|
+ :value="auditTime"
|
|
|
+ @change="auditDateChange" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableList-refresh">查询</a-button>
|
|
@@ -42,8 +53,14 @@
|
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
|
<div slot="message">
|
|
|
共 <strong>{{ total }}</strong> 条记录,
|
|
|
- 应收金额合计 <strong>{{ (productTotal&&(productTotal.receipt || productTotal.receipt==0)) ? toThousands(productTotal.receipt) : '--' }}</strong> ,
|
|
|
- 应付金额合计 <strong>{{ (productTotal&&productTotal.pay) ? toThousands(productTotal.pay) : 0 }}</strong>
|
|
|
+ 应收合计 <strong>{{ (productTotal&&(productTotal.receiveSettleAmountReceipt || productTotal.receiveSettleAmountReceipt==0)) ? toThousands(productTotal.receiveSettleAmountReceipt) : '--' }}</strong> ,
|
|
|
+ 已收合计 <strong>{{ (productTotal&&(productTotal.settleAmountReceipt || productTotal.settleAmountReceipt==0)) ? toThousands(productTotal.settleAmountReceipt) : '--' }}</strong> ,
|
|
|
+ 待收合计 <strong>{{ (productTotal&&(productTotal.unsettleAmountReceipt || productTotal.unsettleAmountReceipt==0)) ? toThousands(productTotal.unsettleAmountReceipt) : '--' }}</strong> ,
|
|
|
+ 应付合计 <strong>{{ (productTotal&&(productTotal.receiveSettleAmountPay || productTotal.receiveSettleAmountPay==0)) ? toThousands(productTotal.receiveSettleAmountPay) : '--' }}</strong> ;
|
|
|
+ 已付合计 <strong>{{ (productTotal&&(productTotal.settleAmountPay || productTotal.settleAmountPay==0)) ? toThousands(productTotal.settleAmountPay) : '--' }}</strong> ,
|
|
|
+ 待付合计 <strong>{{ (productTotal&&(productTotal.unsettleAmountPay || productTotal.unsettleAmountPay==0)) ? toThousands(productTotal.unsettleAmountPay) : '--' }}</strong> ,
|
|
|
+ 折让合计 <strong>{{ (productTotal&&(productTotal.discountAmount || productTotal.discountAmount==0)) ? toThousands(productTotal.discountAmount) : '--' }}</strong> ;
|
|
|
+ 余额合计 <strong>{{ (productTotal&&(productTotal.balance || productTotal.balance==0)) ? toThousands(productTotal.balance) : '--' }}</strong> ;
|
|
|
</div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
@@ -91,10 +108,12 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
|
+import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { settleUnitClientList, settleInfoQuerySum, exportClientUnSettle } from '@/api/settle'
|
|
|
export default {
|
|
|
name: 'CollectionPaymentList',
|
|
|
- components: { STable, VSelect },
|
|
|
+ components: { STable, VSelect, rangeDate },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
const _this = this
|
|
@@ -103,34 +122,56 @@ export default {
|
|
|
exportLoading: false,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
tableHeight: 0,
|
|
|
+ auditTime: [ // 创建时间
|
|
|
+ getDate.getMonthDays(3).starttime,
|
|
|
+ getDate.getMonthDays(3).endtime
|
|
|
+ ],
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
settleClientNameCurrent: '', // 客户名称
|
|
|
- settleClientType: undefined // 单位类型
|
|
|
+ settleClientType: undefined, // 单位类型
|
|
|
+ beginDate: '', // 开始审核时间
|
|
|
+ endDate: '' // 结束审核时间
|
|
|
},
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '客户名称', width: '20%', align: 'center', scopedSlots: { customRender: 'customerName' } },
|
|
|
- { title: '单位类型', dataIndex: 'settleClientTypeDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '应收金额', dataIndex: 'unSettleAmountReceipt', width: '20%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '应付金额', dataIndex: 'unSettleAmountPay', width: '20%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
|
+ { title: '客户名称', width: '15%', align: 'center', scopedSlots: { customRender: 'customerName' } },
|
|
|
+ { title: '单位类型', dataIndex: 'settleClientTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '应收金额', dataIndex: 'receiveSettleAmountReceipt', width: '8%', sorter: true, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '已收金额', dataIndex: 'settleAmountReceipt', width: '8%', sorter: true, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '待收金额', dataIndex: 'unsettleAmountReceipt', width: '8%', sorter: true, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '应付金额', dataIndex: 'receiveSettleAmountPay', width: '8%', sorter: true, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '已付金额', dataIndex: 'settleAmountPay', width: '8%', sorter: true, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '待付金额', dataIndex: 'unsettleAmountPay', width: '8%', sorter: true, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '折让金额', dataIndex: 'discountAmount', width: '8%', sorter: true, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '余额', dataIndex: 'balance', width: '8%', sorter: true, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return settleUnitClientList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ const sortFiled = {
|
|
|
+ 'receiveSettleAmountReceipt': 'RECEIVE_SETTLE_AMOUNT_RECEIPT',
|
|
|
+ 'settleAmountReceipt': 'SETTLE_AMOUNT_RECEIPT',
|
|
|
+ 'unsettleAmountReceipt': 'UNSETTLE_AMOUNT_RECEIPT',
|
|
|
+ 'receiveSettleAmountPay': 'RECEIVE_SETTLE_AMOUNT_PAY',
|
|
|
+ 'settleAmountPay': 'SETTLE_AMOUNT_PAY',
|
|
|
+ 'unsettleAmountPay': 'UNSETTLE_AMOUNT_PAY',
|
|
|
+ 'discountAmount': 'DISCOUNT_AMOUNT',
|
|
|
+ 'balance': 'BALANCE'
|
|
|
+ }
|
|
|
+ const sortOrder = { 'descend': 'desc', 'ascend': 'asc' }
|
|
|
+ const params = Object.assign(parameter, this.queryParam, { sortField: sortFiled[parameter.sortField], sortOrder: sortOrder[parameter.sortOrder] })
|
|
|
+ this.getTotal(params)
|
|
|
+ return settleUnitClientList(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
- this.getTotal(Object.assign(parameter, this.queryParam))
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
- // 应付金额 值为负,应显示为正
|
|
|
- data.list[i].unSettleAmountPay = Math.abs(data.list[i].unSettleAmountPay) || 0
|
|
|
}
|
|
|
this.disabled = false
|
|
|
this.total = data.count || 0
|
|
@@ -156,6 +197,12 @@ export default {
|
|
|
downloadExcel(res, '单位收付款客户')
|
|
|
})
|
|
|
},
|
|
|
+ // 选择审核时间
|
|
|
+ auditDateChange (date) {
|
|
|
+ this.auditTime = date
|
|
|
+ this.queryParam.beginDate = date[0]
|
|
|
+ this.queryParam.endDate = date[1]
|
|
|
+ },
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
if (row.settleClientType == 'CUSTOMER') {
|
|
@@ -186,6 +233,9 @@ export default {
|
|
|
resetSearchForm () {
|
|
|
this.queryParam.settleClientNameCurrent = ''
|
|
|
this.queryParam.settleClientType = undefined
|
|
|
+ this.$refs.rangeDate.resetDate(this.auditTime)
|
|
|
+ this.queryParam.beginDate = getDate.getMonthDays(3).starttime
|
|
|
+ this.queryParam.endDate = getDate.getMonthDays(3).endtime
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
// 页面初始化
|