提交 faa1d637 authored 作者: lihuihui's avatar lihuihui

update

上级 7a794983
......@@ -12,3 +12,11 @@ export function createInvoice(data) {
export function invoiceHistory(params) {
return httpRequest.get('/api/finance/v1/invoices/history', { params })
}
// 获取云抬头
export function getEnterpriseInfo(params) {
return httpRequest.get('/api/finance/v1/invoices/enterprise-info', { params })
}
// 开具发票
export function handleDeleteInvoice(data) {
return httpRequest.post('/api/finance/v1/invoices/cancel', data)
}
......@@ -17,7 +17,13 @@
<div class="right">
<p><span></span>{{parseFloat(item.amount_received) + parseFloat(item.service_charge) | toFixed}}</p>
</div>
<template v-if="item.project_id == '5005' && item.type == '60'">
<van-button v-if="item.real_invoice_status === 1" class="invoice-btn" plain round type="primary" size="mini" color="#C01540" @click.stop="handleInvoice(item)">{{ item.invoice_status == 6 ? '重开发票' : '开具发票' }}</van-button>
<van-button v-if="item.invoice_status == 4" class="invoice-btn" plain round type="primary" size="mini" color="#C01540" @click.stop="handleDeleteInvoice(item)">重开发票</van-button>
</template>
<template v-else>
<van-button v-if="item.real_invoice_status === 1" class="invoice-btn" plain round type="primary" size="mini" color="#C01540" @click.stop="handleInvoice(item)">开具发票</van-button>
</template>
</div>
<template slot="finished">{{list.length > 8 ? '没有更多了': ''}}</template>
</van-list>
......@@ -27,7 +33,7 @@
</template>
<script>
import { getPayList } from '../../api'
import { getPayList, handleDeleteInvoice } from '../../api'
const statusMap = {
1: '不可开具',
2: '未开具',
......@@ -59,8 +65,13 @@ export default {
}
},
methods: {
handleDeleteInvoice(row) {
handleDeleteInvoice({ payment_id: row.id }).then(res => {
this.$router.go(0)
})
},
handleInvoice(val) {
this.$router.push({ path: '/h5/payment/invoice', query: { id: val.id, name: val.sales_rep_user_id_name, remark: val.payer_name } })
this.$router.push({ path: '/h5/payment/invoice', query: { id: val.id, name: val.sales_rep_user_id_name, remark: val.payer_name, project_id: val.project_id, type: val.type } })
},
handleDetials(val) {
window.localStorage.setItem('invoiceDetails', JSON.stringify(val))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论