|
|
@ -122,7 +122,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { createPdfByCustomer, customerBillDetailedListPage} from '@/api/anruifinmanagement/paymentConfirmation.js' |
|
|
|
import { createPdfByCustomer, customerBillDetailedListPage, exportExcel } from '@/api/anruifinmanagement/paymentConfirmation.js' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
@ -140,6 +140,13 @@ export default { |
|
|
|
isSearchShow: false, |
|
|
|
btndisabled: false, |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'success', |
|
|
|
size: 'small', |
|
|
|
icon: 'export', |
|
|
|
btnKey: 'doExport', |
|
|
|
btnLabel: '导出' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'info', |
|
|
|
size: 'small', |
|
|
@ -202,6 +209,9 @@ export default { |
|
|
|
btnHandle(btnKey) { |
|
|
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|
|
|
switch (btnKey) { |
|
|
|
case 'doExport': |
|
|
|
this.doExport() |
|
|
|
break |
|
|
|
case 'doClose': |
|
|
|
this.doClose() |
|
|
|
break |
|
|
@ -260,6 +270,31 @@ export default { |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
doExport() { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
exportExcel(this.listQuery.params).then((resp) => { |
|
|
|
loading.close() |
|
|
|
const blob = new Blob([resp], { |
|
|
|
type: 'application/vnd.ms-excel' |
|
|
|
}) |
|
|
|
const fileName = '客户账单明细' + '.xls' |
|
|
|
const elink = document.createElement('a') |
|
|
|
elink.download = fileName |
|
|
|
elink.style.display = 'nonde' |
|
|
|
elink.href = URL.createObjectURL(blob) |
|
|
|
document.body.appendChild(elink) |
|
|
|
elink.click() |
|
|
|
URL.revokeObjectURL(elink.href) |
|
|
|
document.body.removeChild(elink) |
|
|
|
}).catch(() => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleDownLoad(row) { |
|
|
|
createPdfByCustomer({ detailedSid: row.sid, createBySid: window.sessionStorage.getItem('userSid') }).then((resp) => { |
|
|
|
if (resp.success && resp.data !== null) { |
|
|
|