You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
257 lines
9.5 KiB
257 lines
9.5 KiB
<template>
|
|
<div class="app-container">
|
|
<div>
|
|
<button-bar view-title="客户账单明细" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
|
|
<div class="main-content">
|
|
<div class="searchcon">
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
|
<div v-show="isSearchShow" class="search">
|
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
|
<el-form-item label="客户名称:">
|
|
<el-input v-model="listQuery.params.customerName" placeholder="" clearable class="addinputw"/>
|
|
</el-form-item>
|
|
<el-form-item label="合同编号:">
|
|
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="addinputw"/>
|
|
</el-form-item>
|
|
<el-form-item label="车架号:">
|
|
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable class="addinputw"/>
|
|
</el-form-item>
|
|
<el-form-item label="款项名称:">
|
|
<el-input v-model="listQuery.params.receivablesName" placeholder="" clearable class="addinputw"/>
|
|
</el-form-item>
|
|
<el-form-item label="生成时间:">
|
|
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.createStartTime" clearable style="width: 160px" type="date" placeholder="开始日期"/>
|
|
<span style="padding: 0 8px">至</span>
|
|
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.createEndTime" clearable style="width: 160px" type="date" placeholder="结束日期"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div class="btn" style="text-align: center;">
|
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
|
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handReset">重置</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="listtop">
|
|
<div class="tit">应收款项列表</div>
|
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
|
</div>
|
|
<div class="">
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%" row-key="sid" :tree-props="{children: 'finSelectedReceivablesDetailedVos', hasChildren: 'hasChildren'}">
|
|
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
|
|
<el-table-column label="操作" width="80px" align="center">
|
|
<template slot-scope="scope">
|
|
<el-button type="primary" v-show="scope.row.download" size="mini" @click="handleDownLoad(scope.row)">下载</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="客户名称" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.customerName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="合同编号" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.contractNo }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="车架号" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.vinNo }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="款项名称" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.receivablesName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="应收金额" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.reveivableMoney }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="实收金额" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.subscriptionMoney }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="未收金额" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.noSubscriptionMoney }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="生成时间" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.createTime }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="备注" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.remarks }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div class="pages">
|
|
<!-- 翻页 -->
|
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { createPdfByCustomer, customerBillDetailedListPage} from '@/api/anruifinmanagement/paymentConfirmation.js'
|
|
import Pagination from '@/components/pagination'
|
|
import pageye from '@/components/pagination/pageye'
|
|
import ButtonBar from '@/components/ButtonBar'
|
|
import { getStorage } from '@/utils/auth'
|
|
|
|
export default {
|
|
name: 'kehuzhangdanmingxi',
|
|
components: {
|
|
Pagination,
|
|
pageye,
|
|
ButtonBar
|
|
},
|
|
data() {
|
|
return {
|
|
isSearchShow: false,
|
|
btndisabled: false,
|
|
btnList: [
|
|
{
|
|
type: 'info',
|
|
size: 'small',
|
|
icon: 'cross',
|
|
btnKey: 'doClose',
|
|
btnLabel: '关闭'
|
|
}
|
|
],
|
|
searchxianshitit: '隐藏查询条件',
|
|
tableKey: 0,
|
|
list: [],
|
|
listLoading: false,
|
|
listQuery: {
|
|
current: 1,
|
|
size: 10,
|
|
params: {
|
|
customerName: '',
|
|
contractNo: '',
|
|
paymentTypeKey: '',
|
|
receivablesName: '',
|
|
createStartTime: '',
|
|
createEndTime: '',
|
|
createBySid: '',
|
|
orgPath: ''
|
|
},
|
|
total: 0
|
|
}
|
|
}
|
|
},
|
|
created() {
|
|
this.getList()
|
|
},
|
|
mounted() {
|
|
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
},
|
|
methods: {
|
|
// 搜索条件效果
|
|
clicksearchShow() {
|
|
this.isSearchShow = !this.isSearchShow
|
|
if (this.isSearchShow) {
|
|
this.searchxianshitit = '隐藏查询条件'
|
|
} else {
|
|
this.searchxianshitit = '显示查询条件'
|
|
}
|
|
},
|
|
btnHandle(btnKey) {
|
|
console.log('XXXXXXXXXXXXXXX ' + btnKey)
|
|
switch (btnKey) {
|
|
case 'doClose':
|
|
this.doClose()
|
|
break
|
|
default:
|
|
break
|
|
}
|
|
},
|
|
// ----------功能打开结束--------
|
|
// 序号
|
|
indexMethod(index) {
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
|
var pageindex = index + 1 + pagestart
|
|
return pageindex
|
|
},
|
|
// 查询列表信息
|
|
getList() {
|
|
this.listLoading = true
|
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
this.listQuery.params.createBySid = window.sessionStorage.getItem('staffSid')
|
|
customerBillDetailedListPage(this.listQuery).then((response) => {
|
|
this.listLoading = false
|
|
if (response.success) {
|
|
this.listQuery.total = response.data.total
|
|
this.list = response.data.records
|
|
} else {
|
|
this.listQuery.total = 0
|
|
this.list = []
|
|
}
|
|
})
|
|
},
|
|
// 查询按钮
|
|
handleFilter() {
|
|
this.listQuery.current = 1
|
|
this.getList()
|
|
},
|
|
handReset() {
|
|
this.listQuery = {
|
|
current: 1,
|
|
size: 10,
|
|
params: {
|
|
customerName: '',
|
|
contractNo: '',
|
|
paymentTypeKey: '',
|
|
receivablesName: '',
|
|
createStartTime: '',
|
|
createEndTime: '',
|
|
createBySid: '',
|
|
orgPath: ''
|
|
},
|
|
total: 0
|
|
}
|
|
this.getList()
|
|
},
|
|
handleDownLoad(row) {
|
|
createPdfByCustomer({ detailedSid: row.sid, createBySid: window.sessionStorage.getItem('userSid') }).then((resp) => {
|
|
if (resp.success && resp.data !== null) {
|
|
var xhr = new XMLHttpRequest()
|
|
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data + '&outFileName=' + '收款单', true)
|
|
xhr.setRequestHeader('token', getStorage())
|
|
xhr.responseType = 'blob'
|
|
xhr.onload = function (e) {
|
|
// 如果请求执行成功
|
|
var blob = this.response
|
|
var filename = '账单明细.pdf'
|
|
var a = document.createElement('a')
|
|
// blob.type="application/octet-stream";
|
|
// 创键临时url对象
|
|
var url = URL.createObjectURL(blob)
|
|
a.href = url
|
|
a.download = filename
|
|
a.click()
|
|
// 释放之前创建的URL对象
|
|
window.URL.revokeObjectURL(url)
|
|
}
|
|
// 发送请求
|
|
xhr.send()
|
|
}
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
doClose() {
|
|
this.$store.dispatch('tagsView/delView', this.$route)
|
|
this.$router.go(-1)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
</style>
|
|
|