|
@@ -1,9 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<div class="companyCollectionPaymentDetail-wrap">
|
|
<div class="companyCollectionPaymentDetail-wrap">
|
|
- <a-page-header :ghost="false" @back="handleBack" >
|
|
|
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="companyCollectionPaymentDetail-cont" >
|
|
<!-- 自定义的二级文字标题 -->
|
|
<!-- 自定义的二级文字标题 -->
|
|
<template slot="subTitle">
|
|
<template slot="subTitle">
|
|
- <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
|
|
|
|
|
|
+ <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
|
+ <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
|
|
</template>
|
|
</template>
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<template slot="extra">
|
|
<template slot="extra">
|
|
@@ -11,8 +12,6 @@
|
|
<a-button key="1" type="primary" id="companyCollectionPaymentDetail-print-btn">快速打印</a-button>
|
|
<a-button key="1" type="primary" id="companyCollectionPaymentDetail-print-btn">快速打印</a-button>
|
|
</template>
|
|
</template>
|
|
</a-page-header>
|
|
</a-page-header>
|
|
- <!-- 内容 -->
|
|
|
|
- <a-page-header title="客户:监管营销中心" ></a-page-header>
|
|
|
|
<a-card>
|
|
<a-card>
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
@@ -20,18 +19,24 @@
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="单据号">
|
|
<a-form-item label="单据号">
|
|
- <a-input id="companyReceivablePayableDetail-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入单据号"/>
|
|
|
|
|
|
+ <a-input id="companyReceivablePayableDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="审核时间">
|
|
<a-form-item label="审核时间">
|
|
- <a-range-picker v-model="queryParam.creatDate" id="companyCollectionPaymentDetail-creatDate"/>
|
|
|
|
|
|
+ <a-range-picker
|
|
|
|
+ style="width:100%"
|
|
|
|
+ id="companyCollectionPaymentDetail-auditTime"
|
|
|
|
+ :disabledDate="disabledDate"
|
|
|
|
+ v-model="auditTime"
|
|
|
|
+ :format="dateFormat"
|
|
|
|
+ :placeholder="['开始时间', '结束时间']" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<span class="table-page-search-submitButtons">
|
|
<span class="table-page-search-submitButtons">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableDetail-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableDetail-refresh">查询</a-button>
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
|
|
|
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
|
|
<a-button
|
|
<a-button
|
|
type="danger"
|
|
type="danger"
|
|
style="margin-left: 8px"
|
|
style="margin-left: 8px"
|
|
@@ -46,7 +51,7 @@
|
|
</div>
|
|
</div>
|
|
<!-- alert -->
|
|
<!-- alert -->
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
- <div slot="message">共 <strong>6</strong> 条明细,金额合计 <strong>¥14</strong> ,余额合计 <strong>¥14</strong> </div>
|
|
|
|
|
|
+ <div slot="message">共 <strong>{{ total }}</strong> 条明细,金额合计 <strong>¥{{ (productTotal&&productTotal.totalAmount) || 0 }}</strong> ,余额合计 <strong>¥{{ (productTotal&&productTotal.unsettleAmount) || 0 }}</strong> </div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -71,83 +76,91 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import moment from 'moment'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
|
|
+import { settleInfoList, settleInfoQueryReceiptOrPaySum } from '@/api/settle'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
// 查询参数
|
|
// 查询参数
|
|
- queryParam: {},
|
|
|
|
|
|
+ queryParam: {
|
|
|
|
+ bizNo: ''
|
|
|
|
+ },
|
|
|
|
+ auditTime: [], // 审核时间
|
|
|
|
+ dateFormat: 'YYYY-MM-DD',
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '单据号', dataIndex: 'creatDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '类型', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '审核时间', dataIndex: 'totalP', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '金额', scopedSlots: { customRender: 'purchaseNum' }, align: 'center' },
|
|
|
|
- { title: '余额', scopedSlots: { customRender: 'purchasesNum' }, align: 'center' }
|
|
|
|
|
|
+ { title: '单据号', dataIndex: 'bizNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '类型', dataIndex: 'bizTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '金额', dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '余额', dataIndex: 'unsettleAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
|
- // const data = res.data
|
|
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
- // for (var i = 0; i < data.list.length; i++) {
|
|
|
|
- // data.list[i].no = no + i + 1
|
|
|
|
- // }
|
|
|
|
- // this.disabled = false
|
|
|
|
- // return data
|
|
|
|
- // })
|
|
|
|
- const _this = this
|
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
|
- const data = {
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- list: [
|
|
|
|
- { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
|
- ],
|
|
|
|
- count: 10
|
|
|
|
- }
|
|
|
|
|
|
+ // 审核时间
|
|
|
|
+ if (this.auditTime && this.auditTime.length > 0) {
|
|
|
|
+ this.queryParam.auditBeginDate = moment(this.auditTime[0]).format(this.dateFormat) + '00:00:00'
|
|
|
|
+ this.queryParam.auditEndDate = moment(this.auditTime[1]).format(this.dateFormat) + '23:59:59'
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParam.auditBeginDate = undefined
|
|
|
|
+ this.queryParam.auditEndDate = undefined
|
|
|
|
+ }
|
|
|
|
+ const params = Object.assign(parameter, this.queryParam, { settleClientSn: this.$route.params.sn })
|
|
|
|
+ return settleInfoList(params).then(res => {
|
|
|
|
+ const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
- _this.disabled = false
|
|
|
|
- resolve(data)
|
|
|
|
|
|
+ this.disabled = false
|
|
|
|
+ this.total = data.list.length
|
|
|
|
+ this.getTotal(params)
|
|
|
|
+ return data
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ basicInfoData: null, // 基本信息
|
|
|
|
+ total: 0, // 总条数
|
|
|
|
+ productTotal: null // 合计
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 不可选日期
|
|
|
|
+ disabledDate (date, dateStrings) {
|
|
|
|
+ return date && date.valueOf() > Date.now()
|
|
|
|
+ },
|
|
// 返回列表
|
|
// 返回列表
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ path: '/financialManagement/companyReceivablePayable/list' })
|
|
this.$router.push({ path: '/financialManagement/companyReceivablePayable/list' })
|
|
},
|
|
},
|
|
|
|
+ // 合计
|
|
|
|
+ getTotal (param) {
|
|
|
|
+ settleInfoQueryReceiptOrPaySum(param).then(res => {
|
|
|
|
+ if (res.status == 200 && res.data) {
|
|
|
|
+ this.productTotal = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.productTotal = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 重置
|
|
|
|
+ resetSearchForm () {
|
|
|
|
+ this.queryParam.bizNo = ''
|
|
|
|
+ this.auditTime = []
|
|
|
|
+ },
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
const params = this.queryParam
|
|
const params = this.queryParam
|
|
- if (this.oldTime && this.oldTime.length > 0) {
|
|
|
|
- params.beginOldExpiryDate = moment(this.oldTime[0]).format('YYYY-MM-DD')
|
|
|
|
- params.endOldExpirydDate = moment(this.oldTime[1]).format('YYYY-MM-DD')
|
|
|
|
- } else {
|
|
|
|
- params.beginOldExpiryDate = ''
|
|
|
|
- params.endOldExpirydDate = ''
|
|
|
|
- }
|
|
|
|
- if (this.newTime && this.newTime.length > 0) {
|
|
|
|
- params.beginDate = moment(this.newTime[0]).format('YYYY-MM-DD')
|
|
|
|
- params.endDate = moment(this.newTime[1]).format('YYYY-MM-DD')
|
|
|
|
- } else {
|
|
|
|
- params.beginDate = ''
|
|
|
|
- params.endDate = ''
|
|
|
|
- }
|
|
|
|
this.exportLoading = true
|
|
this.exportLoading = true
|
|
- customerBundleExportDelay(params).then(res => {
|
|
|
|
- this.exportLoading = false
|
|
|
|
- this.download(res)
|
|
|
|
- })
|
|
|
|
|
|
+ // customerBundleExportDelay(params).then(res => {
|
|
|
|
+ // this.exportLoading = false
|
|
|
|
+ // this.download(res)
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
download (data) {
|
|
download (data) {
|
|
if (!data) { return }
|
|
if (!data) { return }
|