提交 67c592ff authored 作者: matian's avatar matian

Merge remote-tracking branch 'origin/master'

...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
> >
</el-date-picker> </el-date-picker>
</template> </template>
<el-row> <el-row style="margin-bottom: 20px">
<el-button type="primary" @click="isHandleSelection">分配票据跟进人</el-button> <el-button type="primary" @click="isHandleSelection">分配票据跟进人</el-button>
<el-button type="primary" @click="deposit">发票充值</el-button> <el-button type="primary" @click="deposit">发票充值</el-button>
</el-row> </el-row>
...@@ -68,9 +68,10 @@ import AppList from '@/components/base/AppList.vue' ...@@ -68,9 +68,10 @@ import AppList from '@/components/base/AppList.vue'
import AppCard from '@/components/base/AppCard.vue' import AppCard from '@/components/base/AppCard.vue'
import DistributionDialog from '../components/DistributionDialog.vue' import DistributionDialog from '../components/DistributionDialog.vue'
// 接口 // 接口
import { getInvoiceList, getCondition, deposit, downloadInvoices } from '../api' import { getInvoiceList, getCondition, deposit } from '../api'
import XLSX from 'xlsx' import XLSX from 'xlsx'
import fileDownload from 'js-file-download' import fileDownload from 'js-file-download'
import queryString from 'query-string'
export default { export default {
components: { AppCard, AppList, DistributionDialog }, components: { AppCard, AppList, DistributionDialog },
...@@ -110,7 +111,17 @@ export default { ...@@ -110,7 +111,17 @@ export default {
return { return {
remote: { remote: {
httpRequest: getInvoiceList, httpRequest: getInvoiceList,
params: { invoice_haoma: '', name: '', txn_id: '', invoice_type: '', invoice_color_type: '', sales_rep_user_id: '', can_add_invoice: '', firstDate: '', lastDate: '' }, params: {
invoice_haoma: '',
name: '',
txn_id: '',
invoice_type: '',
invoice_color_type: '',
sales_rep_user_id: '',
can_add_invoice: '',
firstDate: '',
lastDate: ''
},
beforeRequest: this.beforeRequest, beforeRequest: this.beforeRequest,
callback(data) { callback(data) {
data.forEach(item => { data.forEach(item => {
...@@ -207,10 +218,8 @@ export default { ...@@ -207,10 +218,8 @@ export default {
methods: { methods: {
// 发票列表下载 // 发票列表下载
downloadInvoices() { downloadInvoices() {
downloadInvoices(this.tableOptions.remote.params).then(res => { const params = queryString.stringify(this.tableOptions.remote.params)
console.log(res) window.open(`/api/finance/v1/invoices/download?${params}`)
fileDownload(res, '发票列表.xlsx')
})
}, },
// 发票充值 // 发票充值
deposit() { deposit() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论