提交 c9ed8ba6 authored 作者: matian's avatar matian

uodate:更新最新代码

上级 681bf916
...@@ -35,7 +35,11 @@ export function getTableColumns(params) { ...@@ -35,7 +35,11 @@ export function getTableColumns(params) {
export function updateTableColumns(data) { export function updateTableColumns(data) {
return httpRequest.post('/api/finance/v1/payments/update-title', data) return httpRequest.post('/api/finance/v1/payments/update-title', data)
} }
// 获取历史发票信息
export function getRoles(params) { export function getRoles(params) {
return httpRequest.get('/api/finance/user/get-info', { params }) return httpRequest.get('/api/finance/user/get-info', { params })
} }
// 下载发票列表
export function download(data) {
return httpRequest.post('/api/finance/v1/invoices/download', data)
}
...@@ -2,3 +2,16 @@ ...@@ -2,3 +2,16 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
table {
/* border: 1px solid rgb(248, 244, 244); */
width: 100%;
}
th {
width: 120px;
/* color:rgb(70, 63, 63); */
text-align: center;
}
td {
width: 120px;
text-align: center;
}
...@@ -250,6 +250,7 @@ export default { ...@@ -250,6 +250,7 @@ export default {
this.loading = true this.loading = true
httpRequest(params) httpRequest(params)
.then(res => { .then(res => {
console.log(res)
const { list = [], total = 0 } = res.data || {} const { list = [], total = 0 } = res.data || {}
this.page.total = parseInt(total) this.page.total = parseInt(total)
this.dataList = callback ? callback(list) : list this.dataList = callback ? callback(list) : list
......
...@@ -16,9 +16,11 @@ export function payDetail(params) { ...@@ -16,9 +16,11 @@ export function payDetail(params) {
return httpRequest.get('/api/finance/v1/payments/details', { params }) return httpRequest.get('/api/finance/v1/payments/details', { params })
} }
// 支付列表下载 // 支付列表下载
// 下载发票列表
export function download(params) { export function download(params) {
return httpRequest.get('/api/finance/v1/payments/download', { params }) return httpRequest.get('/api/finance/v1/payments/download', { params, responseType: 'blob' })
} }
// 是否允许开具发票 // 是否允许开具发票
export function allowCreate(data) { export function allowCreate(data) {
return httpRequest.post('/api/finance/v1/payments/update-can-invoice', data) return httpRequest.post('/api/finance/v1/payments/update-can-invoice', data)
...@@ -61,3 +63,7 @@ export function cancelPayDetail(data) { ...@@ -61,3 +63,7 @@ export function cancelPayDetail(data) {
export function payCancel(data) { export function payCancel(data) {
return httpRequest.post('/api/finance/v1/payments/undo-details-confirm', data) return httpRequest.post('/api/finance/v1/payments/undo-details-confirm', data)
} }
// 获取开票历史
export function historyInfo(data) {
return httpRequest.post('/api/finance/v1/invoices/history', data)
}
...@@ -43,20 +43,4 @@ export default { ...@@ -43,20 +43,4 @@ export default {
} }
</script> </script>
<style scoped>
.table {
border: 1px solid #000;
width: 100%;
}
th {
width: 120px;
text-align: center;
font-size: 20px;
color: rgb(10, 1, 1);
font-weight: normal;
}
td {
width: 120px;
text-align: center;
}
</style>
...@@ -36,21 +36,3 @@ export default { ...@@ -36,21 +36,3 @@ export default {
} }
} }
</script> </script>
<style scoped>
.table {
border: 1px solid #000;
width: 100%;
}
th {
width: 120px;
text-align: center;
font-size: 20px;
color: rgb(10, 1, 1);
font-weight: normal;
}
td {
width: 120px;
text-align: center;
}
</style>
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import AppList from '@/components/base/AppList.vue' import AppList from '@/components/base/AppList.vue'
import AppCard from '@/components/base/AppCard.vue' import AppCard from '@/components/base/AppCard.vue'
import { payCancel } from '../api' import { payCancel } from '../api'
const payStatusMap = { 20: '支付待确认', 30: '部分到账', 70: '足额支付待确认', 80: '足额支付' }
// 接口 // 接口
export default { export default {
props: { props: {
...@@ -40,15 +39,7 @@ export default { ...@@ -40,15 +39,7 @@ export default {
{ label: '支付方式', prop: 'payment_method', align: 'center', minWidth: 100 }, { label: '支付方式', prop: 'payment_method', align: 'center', minWidth: 100 },
{ label: '其他支付方式', prop: 'payment_method_others', align: 'center', minWidth: 100 }, { label: '其他支付方式', prop: 'payment_method_others', align: 'center', minWidth: 100 },
{ label: '交易流水号', prop: 'txn_id', align: 'center', minWidth: 100 }, { label: '交易流水号', prop: 'txn_id', align: 'center', minWidth: 100 },
{ { label: '支付状态', prop: 'payment_status', align: 'center', minWidth: 100 },
label: '支付状态',
prop: 'payment_status',
align: 'center',
minWidth: 100,
computed({ row }) {
return payStatusMap[row.payment_status]
}
},
{ label: '创建日期', prop: 'created_time', align: 'center', minWidth: 100 }, { label: '创建日期', prop: 'created_time', align: 'center', minWidth: 100 },
{ slots: 'table-x', align: 'center', minWidth: 100 } { slots: 'table-x', align: 'center', minWidth: 100 }
] ]
......
<!-- 历史发票 -->
<template>
<div class="history">
<div class="search" v-if="hasSearch">
<el-input
placeholder="请输入内容回车搜索"
prefix-icon="el-icon-search"
v-model="taxpayer_name"
size="small"
@change="fetchHistory"
/>
</div>
<ul v-if="list.length">
<li class="invoice-item" v-for="(item, index) in list" :key="index" @click="handleSelect(item)">
纳税人名称:{{ item.taxpayer_name }}
</li>
</ul>
<el-empty description="暂无数据" v-else></el-empty>
</div>
</template>
<script>
import { historyInfo } from '../api'
export default {
props: {
hasSearch: {
type: Boolean,
default: false
},
perPage: {
type: String,
default: ''
},
page: {
type: String,
default: ''
}
},
data() {
return {
taxpayer_name: ''
}
},
created() {
this.fetchHistory()
},
methods: {
fetchHistory() {
const params = {
taxpayer_name: this.taxpayer_name || undefined,
'per-page': this.perPage,
page: this.page
}
historyInfo(params).then(res => {
if (res.code === 0) {
this.list = res.data.list
}
})
},
handleSelect(item) {
this.$emit('select', item)
}
}
}
</script>
<style scoped>
.history {
min-height: 360px;
max-height: 500px;
}
.search {
padding: 0 20px;
}
ul {
min-height: 320px;
max-height: 450px;
padding: 0 20px;
overflow-y: auto;
}
li {
font-size: 15px;
line-height: 44px;
cursor: pointer;
transition: 0.3s;
}
li:hover {
color: #3276fc;
}
</style>
...@@ -42,21 +42,3 @@ export default { ...@@ -42,21 +42,3 @@ export default {
} }
} }
</script> </script>
<style scoped>
.table {
width: 100%;
border: 1px solid #000;
}
th {
width: 120px;
text-align: center;
font-size: 20px;
color: rgb(10, 1, 1);
font-weight: normal;
}
td {
width: 120px;
text-align: center;
}
</style>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<th>学员姓名</th> <th>学员姓名</th>
<td>{{ dealList.name }}</td> <td>{{ dealList.name }}</td>
<th>报名项目</th> <th>报名项目</th>
<td>{{ dealList.project_name }}</td> <td>{{ dealList.project_id_name }}</td>
<td>所属班次</td> <td>所属班次</td>
<td>{{ dealList.bill_customer_class }}</td> <td>{{ dealList.bill_customer_class }}</td>
</tr> </tr>
...@@ -32,21 +32,3 @@ export default { ...@@ -32,21 +32,3 @@ export default {
} }
} }
</script> </script>
<style scoped>
.table {
border: 1px solid #000;
width: 100%;
}
th {
width: 120px;
text-align: center;
font-size: 20px;
color: rgb(10, 1, 1);
font-weight: normal;
}
td {
width: 120px;
text-align: center;
}
</style>
<!-- 支付详情-发票表格 --> <!-- 支付详情-发票表格 -->
<template> <template>
<div class="ticketInfo"> <div class="ticketInfo" v-if="invioceList.length">
<table border="1" width="1500px" cellspacing="0" class="table" v-for="(item, index) in invioceList" :key="index"> <table border="1" width="1500px" cellspacing="0" class="table" v-for="(item, index) in invioceList" :key="index">
<tr> <tr>
<th colspan="10">发票{{ item.id }}</th> <th colspan="10">发票{{ item.id }}</th>
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
</tr> </tr>
</table> </table>
</div> </div>
<el-empty description="暂无数据" v-else></el-empty>
</template> </template>
<script> <script>
...@@ -93,22 +94,3 @@ export default { ...@@ -93,22 +94,3 @@ export default {
} }
} }
</script> </script>
<style scoped>
.table {
width: 100%;
border: 1px solid #000;
margin-bottom: 40px;
}
th {
width: 120px;
text-align: center;
font-size: 20px;
color: rgb(10, 1, 1);
font-weight: normal;
}
td {
width: 120px;
text-align: center;
}
</style>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</tr> </tr>
<tr> <tr>
<th>支付状态</th> <th>支付状态</th>
<td>{{ getStatus(val) }}</td> <td>{{ row.payment_status }}</td>
<th>报名项目</th> <th>报名项目</th>
<td>{{ row.project }}</td> <td>{{ row.project }}</td>
<th>应缴金额</th> <th>应缴金额</th>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</div> </div>
<div class="type" style="border: 1px solid #ccc; margin-bottom: 10px; padding-right: 50px"> <div class="type" style="border: 1px solid #ccc; margin-bottom: 10px; padding-right: 50px">
<el-form-item label="发票信息" label-width="100px" class="title"> <el-form-item label="发票信息" label-width="100px" class="title">
<!-- <el-button type="text" style="float: right">历史开票信息</el-button> --> <el-button type="text" style="float: right" @click="$emit('history')">历史开票信息</el-button>
</el-form-item> </el-form-item>
<el-form-item label="发票类型" prop="invoice_type"> <el-form-item label="发票类型" prop="invoice_type">
<!-- change事件 --> <!-- change事件 -->
...@@ -125,6 +125,10 @@ export default { ...@@ -125,6 +125,10 @@ export default {
row: { row: {
type: Object, type: Object,
default: () => {} default: () => {}
},
history: {
type: Object,
default: () => {}
} }
}, },
data() { data() {
...@@ -168,6 +172,23 @@ export default { ...@@ -168,6 +172,23 @@ export default {
mounted() { mounted() {
this.getPayDetail() this.getPayDetail()
}, },
watch: {
'form.taxpayer_type': function (oldVal, val) {
if (val !== oldVal) {
this.form.invioce_type = ''
}
},
history: {
handler(nv) {
if (nv) {
console.log(nv)
Object.keys(this.form).forEach(key => {
this.form[key] = this.history[key]
})
}
}
}
},
methods: { methods: {
getPayDetail() { getPayDetail() {
const params = { id: this.id } const params = { id: this.id }
...@@ -186,25 +207,6 @@ export default { ...@@ -186,25 +207,6 @@ export default {
this.$emit('createTicket', this.form) this.$emit('createTicket', this.form)
} }
}) })
},
getStatus(val) {
val = this.row.payment_status
if (val === '20') {
return '支付待确认'
} else if (val === '30') {
return '部分到账'
} else if (val === '70') {
return '足额待支付'
} else if (val === '80') {
return '足额支付'
}
}
},
watch: {
'form.taxpayer_type': function (oldVal, val) {
if (val !== oldVal) {
this.form.invioce_type = ''
}
} }
} }
} }
...@@ -212,20 +214,6 @@ export default { ...@@ -212,20 +214,6 @@ export default {
<style scoped> <style scoped>
.table { .table {
border: 1px solid #000;
margin-bottom: 20px; margin-bottom: 20px;
width: 100%;
}
th {
width: 50px;
text-align: center;
font-size: 16px;
color: rgb(10, 1, 1);
font-weight: normal;
}
td {
width: 120px;
text-align: center;
color: rgb(10, 1, 1);
} }
</style> </style>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<th>支付人姓名</th> <th>支付人姓名</th>
<td>{{ row.payer_name }}</td> <td>{{ row.payer_name }}</td>
<th>费用类型</th> <th>费用类型</th>
<td>{{ row.type }}</td> <td>{{ row.type_name }}</td>
<th>支付金额</th> <th>支付金额</th>
<td>{{ row.amount }}</td> <td>{{ row.amount }}</td>
<th>支付状态</th> <th>支付状态</th>
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
</tr> </tr>
<tr> <tr>
<th>项目</th> <th>项目</th>
<td>{{ dealList.project_id }}</td> <td>{{ dealList.project_id_name }}</td>
<th>销售</th> <th>销售</th>
<td>{{ dealList.sales_rep_user_id_name }}</td> <td>{{ dealList.sales_rep_user_id_name }}</td>
<th>渠道</th> <th>渠道</th>
<td colspan="3">{{ dealList.channel_id }}</td> <td colspan="3">{{ dealList.channel_id_name }}</td>
</tr> </tr>
<tr> <tr>
<th>备注</th> <th>备注</th>
...@@ -148,5 +148,3 @@ export default { ...@@ -148,5 +148,3 @@ export default {
} }
} }
</script> </script>
<style></style>
...@@ -140,4 +140,3 @@ export default { ...@@ -140,4 +140,3 @@ export default {
} }
</script> </script>
<style></style>
...@@ -63,11 +63,30 @@ ...@@ -63,11 +63,30 @@
<template #footer> <template #footer>
<span>已选择{{ multipleSelection.length }}</span> <span>已选择{{ multipleSelection.length }}</span>
<el-button @click="exportSelect" style="margin-left: 40px">导出</el-button> <el-button @click="exportSelect" style="margin-left: 40px">导出</el-button>
<el-button @click="exportAll" style="margin-left: 40px">导出全部</el-button>
</template> </template>
</app-list> </app-list>
<!-- 开具发票 --> <!-- 开具发票 -->
<el-dialog title="开具发票" :visible.sync="ticketVisible" width="900px" append-to-body :destroy-on-close="true"> <el-dialog title="开具发票" :visible.sync="ticketVisible" width="900px" append-to-body :destroy-on-close="true">
<TicketForm :id="id" @close="ticketVisible = false" @createTicket="handleCreateTicket" :row="row" /> <TicketForm
:history="history"
@history="handleHistory"
:id="id"
@close="ticketVisible = false"
@createTicket="handleCreateTicket"
:row="row"
/>
<el-dialog
title="历史开票信息"
:visible.sync="historyVisible"
width="460px"
top="15px"
append-to-body:destroy-on-close="true"
center
:modal="false"
>
<History v-if="historyVisible" :hasSearch="true" @select="handleSelect" :per-page="per_page" :page="page" />
</el-dialog>
</el-dialog> </el-dialog>
<!-- 开票二维码 --> <!-- 开票二维码 -->
<ShareQrcode :visible.sync="codeVisible" :value="shareUrl" /> <ShareQrcode :visible.sync="codeVisible" :value="shareUrl" />
...@@ -79,14 +98,20 @@ import AppList from '@/components/base/AppList.vue' ...@@ -79,14 +98,20 @@ import AppList from '@/components/base/AppList.vue'
import AppCard from '@/components/base/AppCard.vue' import AppCard from '@/components/base/AppCard.vue'
import TicketForm from '../components/TicketForm.vue' import TicketForm from '../components/TicketForm.vue'
import ShareQrcode from '../components/ShareQrcode.vue' import ShareQrcode from '../components/ShareQrcode.vue'
import History from '../components/History.vue'
// 接口 // 接口
import { getCondition, getPayList, allowCreate, createNewTicket, drawBack, cancelTicket } from '../api' import { getCondition, getPayList, allowCreate, createNewTicket, drawBack, cancelTicket, download } from '../api'
import XLSX from 'xlsx' import XLSX from 'xlsx'
import { funDownload } from '@/utils/util' import { funDownload } from '@/utils/util'
import fileDownload from 'js-file-download'
export default { export default {
components: { AppCard, AppList, TicketForm, ShareQrcode }, components: { AppCard, AppList, TicketForm, ShareQrcode, History },
data() { data() {
return { return {
history: {},
historyVisible: false,
row: {}, row: {},
id: '', id: '',
shareUrl: '', shareUrl: '',
...@@ -132,8 +157,8 @@ export default { ...@@ -132,8 +157,8 @@ export default {
first_payment_time_to: '', first_payment_time_to: '',
final_payment_time_from: '', final_payment_time_from: '',
final_payment_time_to: '', final_payment_time_to: '',
pege: '', page: '',
per_page: '' 'per-page': ''
}, },
beforeRequest: this.beforeRequest, beforeRequest: this.beforeRequest,
callback: this.callback callback: this.callback
...@@ -242,8 +267,8 @@ export default { ...@@ -242,8 +267,8 @@ export default {
columns: [ columns: [
{ type: 'selection', minWidth: '50px', fixed: 'left' }, { type: 'selection', minWidth: '50px', fixed: 'left' },
{ label: '客户名称', prop: 'name', minWidth: 100 }, { label: '客户名称', prop: 'name', minWidth: 100 },
{ label: '项目', prop: 'project', align: 'center', minWidth: 100 }, { label: '项目', prop: 'project_id_name', align: 'center', minWidth: 100 },
{ label: '支付状态', prop: 'paymentStatuView', align: 'center', minWidth: 100 }, { label: '支付状态', prop: 'payment_status', align: 'center', minWidth: 100 },
{ label: '首次缴费时间', prop: 'first_payment_time', align: 'center', minWidth: 200 }, { label: '首次缴费时间', prop: 'first_payment_time', align: 'center', minWidth: 200 },
{ label: '末次缴费时间', prop: 'final_payment_time', align: 'center', minWidth: 200 }, { label: '末次缴费时间', prop: 'final_payment_time', align: 'center', minWidth: 200 },
{ label: '应缴金额', prop: 'bill_total', align: 'center', minWidth: 100 }, { label: '应缴金额', prop: 'bill_total', align: 'center', minWidth: 100 },
...@@ -252,7 +277,7 @@ export default { ...@@ -252,7 +277,7 @@ export default {
{ label: '到账金额', prop: 'amount_received', align: 'center', minWidth: 100 }, { label: '到账金额', prop: 'amount_received', align: 'center', minWidth: 100 },
{ label: '代缴金额', prop: 'amount_waiting_for_pay', align: 'center', minWidth: 100 }, { label: '代缴金额', prop: 'amount_waiting_for_pay', align: 'center', minWidth: 100 },
{ label: '跟进人', prop: 'sales_rep_user_id_name', align: 'center', minWidth: 100 }, { label: '跟进人', prop: 'sales_rep_user_id_name', align: 'center', minWidth: 100 },
{ label: '渠道', prop: 'channelView', align: 'center', minWidth: 100 }, { label: '渠道', prop: 'channel_id_name', align: 'center', minWidth: 100 },
{ label: '交易流水号', prop: 'txn_id_list', align: 'center', minWidth: 300 }, { label: '交易流水号', prop: 'txn_id_list', align: 'center', minWidth: 300 },
{ label: '服务费规则', prop: 'service_fee_rules', align: 'center', minWidth: 120 }, { label: '服务费规则', prop: 'service_fee_rules', align: 'center', minWidth: 120 },
{ label: '服务费比例', prop: 'service_charge_ratio', align: 'center', minWidth: 120 }, { label: '服务费比例', prop: 'service_charge_ratio', align: 'center', minWidth: 120 },
...@@ -313,14 +338,22 @@ export default { ...@@ -313,14 +338,22 @@ export default {
return params return params
}, },
callback(data) { callback(data) {
console.log(data)
data.forEach(item => { data.forEach(item => {
item.project = this.findName(this.conditionList.project_id, item.project_id, 'project_id', 'name') // item.project = this.findName(this.conditionList.project_id, item.project_id, 'project_id', 'name')
item.paymentStatuView = this.findName(this.conditionList.payment_status, item.payment_status, 'key', 'value') // item.paymentStatuView = this.findName(this.conditionList.payment_status, item.payment_status, 'key', 'value')
item.channelView = this.findName(this.conditionList.channel_id, item.channel_id, 'channel_id', 'title') // item.channelView = this.findName(this.conditionList.channel_id, item.channel_id, 'channel_id', 'title')
item.invoiceStatusView = this.findName(this.conditionList.invoice_status, item.invoice_status, 'key', 'value') item.invoiceStatusView = this.findName(this.conditionList.invoice_status, item.invoice_status, 'key', 'value')
}) })
return data return data
}, },
handleSelect(val) {
this.history = val
this.dialogVisible = false
},
handleHistory() {
this.historyVisible = true
},
// 开具发票 // 开具发票
createPop(row) { createPop(row) {
console.log(row) console.log(row)
...@@ -479,6 +512,14 @@ export default { ...@@ -479,6 +512,14 @@ export default {
const url = URL.createObjectURL(new window.Blob([wbout], { type: 'application/octet-stream' })) const url = URL.createObjectURL(new window.Blob([wbout], { type: 'application/octet-stream' }))
funDownload(url, `订单列表_${Date.now()}.xlsx`) funDownload(url, `订单列表_${Date.now()}.xlsx`)
}, },
// 导出全部
exportAll() {
// console.log(this.tableOptions.remote.params)
download(this.tableOptions.remote.params).then(res => {
console.log(res + ' ----')
fileDownload(res, '订单列表.xlsx')
})
},
findName(option, item, findKey, reName) { findName(option, item, findKey, reName) {
const found = option.find(findItem => { const found = option.find(findItem => {
return parseInt(findItem[findKey]) === parseInt(item) return parseInt(findItem[findKey]) === parseInt(item)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<th>支付人姓名</th> <th>支付人姓名</th>
<td>{{ row.payer_name }}</td> <td>{{ row.payer_name }}</td>
<th>费用类型</th> <th>费用类型</th>
<td>{{ getPayType(val) }}</td> <td>{{ row.type_name }}</td>
<th>支付金额</th> <th>支付金额</th>
<td>{{ row.amount }}</td> <td>{{ row.amount }}</td>
<th>支付状态</th> <th>支付状态</th>
...@@ -13,12 +13,11 @@ ...@@ -13,12 +13,11 @@
</tr> </tr>
<tr> <tr>
<th>项目</th> <th>项目</th>
<td>{{ dealList.project_id }}</td> <td>{{ dealList.project_id_name }}</td>
<th>销售</th> <th>销售</th>
<td>{{ dealList.sales_rep_user_id_name }}</td> <td>{{ dealList.sales_rep_user_id_name }}</td>
<th>渠道</th> <th>渠道</th>
<td colspan="3">{{ dealList.channel_id }}</td> <td colspan="3">{{ dealList.channel_id_name }}</td>
</tr> </tr>
<tr> <tr>
<th>支付方式</th> <th>支付方式</th>
...@@ -73,37 +72,6 @@ export default { ...@@ -73,37 +72,6 @@ export default {
mounted() { mounted() {
this.row = this.$route.params.row this.row = this.$route.params.row
this.dealList = this.$route.params.dealList this.dealList = this.$route.params.dealList
},
methods: {
getPayType(val) {
val = this.row.type
if (val === '20') {
return '支付待确认'
} else if (val === '30') {
return '部分到账'
} else if (val === '70') {
return '足额待支付'
} else if (val === '80') {
return '足额支付'
}
}
} }
} }
</script> </script>
<style scoped>
.table {
border: 1px solid rgb(235, 232, 232);
}
th {
width: 120px;
text-align: center;
font-size: 20px;
color: rgb(10, 1, 1);
font-weight: normal;
}
td {
width: 120px;
text-align: center;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论