|
@@ -70,6 +70,14 @@
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-button type="primary" @click="handleSearch" :disabled="disabled" id="billingReturnReportList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="billingReturnReportList-reset">重置</a-button>
|
|
|
+ <!-- <a-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ type="primary"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ id="billingReturnReportList-export">导出</a-button> -->
|
|
|
<a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
@@ -86,7 +94,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 3020, y: tableHeight }"
|
|
|
+ :scroll="{ x: 3120, y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
<template slot="footer">
|
|
@@ -113,6 +121,7 @@
|
|
|
<a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
|
|
|
<a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
|
|
|
<a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
|
|
|
+ <a-col span="4">布瑞斯:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? totalData.brsAmount : '--' }}</a-col>
|
|
|
<a-col span="6">开单退货合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
|
|
|
</a-row>
|
|
|
</a-col>
|
|
@@ -124,6 +133,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import moment from 'moment'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
@@ -319,6 +329,13 @@ export default {
|
|
|
align: 'center',
|
|
|
width: 100,
|
|
|
customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '布瑞斯',
|
|
|
+ dataIndex: 'brsAmount',
|
|
|
+ align: 'center',
|
|
|
+ width: 100,
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
|
}
|
|
|
] },
|
|
|
{ title: '开单退货合计金额', width: 200, dataIndex: 'sumAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
|
|
@@ -349,6 +366,42 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 导出
|
|
|
+ handleExport () {
|
|
|
+ const _this = this
|
|
|
+ const params = this.queryParam
|
|
|
+ this.exportLoading = true
|
|
|
+ _this.spinning = true
|
|
|
+ reportSalesReturnDetailExport(params).then(res => {
|
|
|
+ this.exportLoading = false
|
|
|
+ _this.spinning = false
|
|
|
+ if (res.type == 'application/json') {
|
|
|
+ var reader = new FileReader()
|
|
|
+ reader.addEventListener('loadend', function () {
|
|
|
+ const obj = JSON.parse(reader.result)
|
|
|
+ _this.$notification.error({
|
|
|
+ message: '提示',
|
|
|
+ description: obj.message
|
|
|
+ })
|
|
|
+ })
|
|
|
+ reader.readAsText(res)
|
|
|
+ } else {
|
|
|
+ this.download(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ download (data) {
|
|
|
+ if (!data) { return }
|
|
|
+ const url = window.URL.createObjectURL(new Blob([data]))
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ const a = moment().format('YYYYMMDDHHmmss')
|
|
|
+ const fname = '开单退货报表' + a
|
|
|
+ link.setAttribute('download', fname + '.xlsx')
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ },
|
|
|
// 总计
|
|
|
getCount (params) {
|
|
|
salesReportReturnCount(params).then(res => {
|