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

代码提交

上级 9e4d2038
...@@ -49,11 +49,15 @@ export function payConfirm(data) { ...@@ -49,11 +49,15 @@ export function payConfirm(data) {
headers: { 'Content-Type': 'multipart/form-data' } headers: { 'Content-Type': 'multipart/form-data' }
}) })
} }
// 取消足额支付 // 确认足额支付
export function confirmPayDetail(data) { export function confirmPayDetail(data) {
return httpRequest.post('/api/finance/v1/payments/undo-confirm', data) return httpRequest.post('/api/finance/v1/payments/undo-confirm', data)
} }
// 确认足额支付 // 取消足额支付
export function cancelPayDetail(data) { export function cancelPayDetail(data) {
return httpRequest.post('/api/finance/v1/payments/undo-confirm', data) return httpRequest.post('/api/finance/v1/payments/undo-confirm', data)
} }
// 取消单条缴费到账
export function payCancel(data) {
return httpRequest.post('/api/finance/v1/payments/undo-details-confirm', data)
}
<!-- 支付详情-渠道信息 --> <!-- 支付详情-渠道信息 -->
<template> <template>
<table border="1" width="1200px" cellspacing="0"> <table border="1" width="1500px" cellspacing="0" class="table">
<tr> <tr>
<th>不含税销售金额</th> <th>不含税销售金额</th>
<td>{{dealList.sales_amount_excluding_tax}}</td> <td>{{ dealList.sales_amount_excluding_tax }}</td>
<th>渠道代理费提基数</th> <th>渠道代理费提基数</th>
<td>{{dealList.channel_agent_fee_base}}</td> <td>{{ dealList.channel_agent_fee_base }}</td>
<th>服务费规则</th> <th>服务费规则</th>
<td>{{dealList.service_fee_rules}}</td> <td>{{ dealList.service_fee_rules }}</td>
</tr> </tr>
<tr> <tr>
<th>服务费比例</th> <th>服务费比例</th>
<td>{{dealList.service_charge_ratio}}</td> <td>{{ dealList.service_charge_ratio }}</td>
<th>代理服务费</th> <th>代理服务费</th>
<td>{{dealList.agency_service_fee}}</td> <td>{{ dealList.agency_service_fee }}</td>
<th>代理服务费(不含税金额)</th> <th>代理服务费(不含税金额)</th>
<td>{{dealList.agency_service_fee_excluding_tax}}</td> <td>{{ dealList.agency_service_fee_excluding_tax }}</td>
</tr> </tr>
<tr> <tr>
<th>户名</th> <th>户名</th>
<td>{{dealList.channel_account_name}}</td> <td>{{ dealList.channel_account_name }}</td>
<th>账号</th> <th>账号</th>
<td>{{dealList.channel_account}}</td> <td>{{ dealList.channel_account }}</td>
<th>开户行</th> <th>开户行</th>
<td>{{dealList.channel_bank_of_deposit}}</td> <td>{{ dealList.channel_bank_of_deposit }}</td>
</tr> </tr>
<tr> <tr>
<th>渠道税率</th> <th>渠道税率</th>
<td colspan="5">{{dealList.channel_tax_rate}}</td> <td colspan="5">{{ dealList.channel_tax_rate }}</td>
</tr> </tr>
</table> </table>
</template> </template>
...@@ -38,10 +38,24 @@ export default { ...@@ -38,10 +38,24 @@ export default {
dealList: { dealList: {
type: Object, type: Object,
default: () => {} default: () => {}
} }
} }
} }
</script> </script>
<style></style> <style>
.table {
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>
<!-- 支付详情-收款信息 --> <!-- 支付详情-收款信息 -->
<template> <template>
<table border="1" width="1200px" cellspacing="0"> <table border="1" width="1500px" cellspacing="0" class="table">
<tr> <tr>
<th>应缴金额</th> <th>应缴金额</th>
<td>{{dealList.bill_total}}</td> <td>{{ dealList.bill_total }}</td>
<th>实缴金额</th> <th>实缴金额</th>
<td>{{dealList.amount_need_to_pay}}</td> <td>{{ dealList.amount_need_to_pay }}</td>
<th>待缴金额</th> <th>待缴金额</th>
<td>{{dealList.amount_waiting_for_pay}}</td> <td>{{ dealList.amount_waiting_for_pay }}</td>
</tr> </tr>
<tr> <tr>
<th>手续费</th> <th>手续费</th>
<td>{{dealList.service_charge}}</td> <td>{{ dealList.service_charge }}</td>
<th>到账金额</th> <th>到账金额</th>
<td>{{dealList.amount_received}}</td> <td>{{ dealList.amount_received }}</td>
<th>待确认金额</th> <th>待确认金额</th>
<td>{{dealList.amount_waiting_for_confirm}}</td> <td>{{ dealList.amount_waiting_for_confirm }}</td>
</tr> </tr>
<tr> <tr>
<th>首次缴费时间</th> <th>首次缴费时间</th>
<td>{{dealList.first_payment_time}}</td> <td colspan="2">{{ dealList.first_payment_time }}</td>
<th>末次缴费时间</th> <th>末次缴费时间</th>
<td colspan="3">{{dealList.final_payment_time}}</td> <td colspan="2">{{ dealList.final_payment_time }}</td>
</tr> </tr>
</table> </table>
</template> </template>
...@@ -38,5 +38,18 @@ export default { ...@@ -38,5 +38,18 @@ export default {
</script> </script>
<style> <style>
.table {
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> </style>
<!-- 支付详情-已确认列表 --> <!-- 支付详情-已确认列表 -->
<template> <template>
<app-card> <app-card>
<app-list v-bind="tableOptions" ref="list" > <app-list v-bind="tableOptions" ref="list">
<template v-slot:table-x = "{ row }"> <template v-slot:table-x="{ row }">
<router-link :to="{ name: 'paydetail', params: { id: row.id } }"> <router-link :to="{ name: 'paydetail', params: { id: row.id } }">
<el-button>查看</el-button> <el-button>查看</el-button>
</router-link> </router-link>
<el-button @click="cancelReceive(row)">取消到账</el-button> <el-button @click="cancelReceive(row)" style="margin-top: 5px">取消到账</el-button>
</template> </template>
</app-list> </app-list>
</app-card> </app-card>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// 组件 // 组件
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 { payDetail, payConfirm } from '../api' import { payDetail, payCancel } from '../api'
const payStatusMap = { 20: '支付待确认', 30: '部分到账', 70: '足额支付待确认', 80: '足额支付' } const payStatusMap = { 20: '支付待确认', 30: '部分到账', 70: '足额支付待确认', 80: '足额支付' }
// 接口 // 接口
export default { export default {
...@@ -27,8 +27,7 @@ export default { ...@@ -27,8 +27,7 @@ export default {
}, },
components: { AppCard, AppList }, components: { AppCard, AppList },
data() { data() {
return { return {}
}
}, },
computed: { computed: {
// 列表配置 // 列表配置
...@@ -48,8 +47,8 @@ export default { ...@@ -48,8 +47,8 @@ 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 },
// eslint-disable-next-line object-curly-newline {
{ label: '支付状态', label: '支付状态',
prop: 'payment_status', prop: 'payment_status',
align: 'center', align: 'center',
minWidth: 100, minWidth: 100,
...@@ -67,7 +66,7 @@ export default { ...@@ -67,7 +66,7 @@ export default {
// 取消到账 // 取消到账
cancelReceive() { cancelReceive() {
const params = { id: this.id } const params = { id: this.id }
payConfirm(params).then(res => { payCancel(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$parent.fetchTicketDetail() this.$parent.fetchTicketDetail()
} }
......
<!-- 支付详情-订单信息 --> <!-- 支付详情-订单信息 -->
<template> <template>
<div> <div>
<table border="1" width="1200px" cellspacing="0"> <table border="1" width="1500px" cellspacing="0" class="table">
<tr> <tr>
<th>订单用户名称</th> <th>订单用户名称</th>
<td>{{dealList.name}}</td> <td>{{ dealList.name }}</td>
<td>订单编号</td> <td>订单编号</td>
<td>{{dealList.id}}</td> <td>{{ dealList.id }}</td>
<td>支付状态</td> <td>支付状态</td>
<td>{{dealList.payment_status}}</td> <td>{{ dealList.payment_status }}</td>
</tr> </tr>
<tr> <tr>
<th>备注</th> <th>备注</th>
<td colspan="5">{{dealList.comment}}</td> <td colspan="5">{{ dealList.comment }}</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -24,12 +24,25 @@ export default { ...@@ -24,12 +24,25 @@ export default {
dealList: { dealList: {
type: Object, type: Object,
default: () => {} default: () => {}
} }
}, },
mounted() { mounted() {}
}
} }
</script> </script>
<style></style> <style>
.table {
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>
<!-- 支付详情-学员信息 --> <!-- 支付详情-学员信息 -->
<template> <template>
<div> <div>
<table border="1" width="1200px" cellspacing="0"> <table border="1" width="1500px" cellspacing="0" class="table">
<tr> <tr>
<th>学员姓名</th> <th>学员姓名</th>
<td>{{dealList.name}}</td> <td>{{ dealList.name }}</td>
<th>报名项目</th> <th>报名项目</th>
<td>{{dealList.project_name}}</td> <td>{{ dealList.project_name }}</td>
<td>所属班次</td> <td>所属班次</td>
<td>{{dealList.bill_customer_class}}</td> <td>{{ dealList.bill_customer_class }}</td>
</tr> </tr>
<tr> <tr>
<th>开学时间</th> <th>开学时间</th>
<td>{{dealList.bill_customer_class_start_time}}</td> <td>{{ dealList.bill_customer_class_start_time }}</td>
<th>学制期限</th> <th>学制期限</th>
<td>{{dealList.bill_customer_class_length_of_schooling}}</td> <td>{{ dealList.bill_customer_class_length_of_schooling }}</td>
<th>跟进人</th> <th>跟进人</th>
<td>{{dealList.sales_rep_user_id_name}}</td> <td>{{ dealList.sales_rep_user_id_name }}</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -28,10 +28,24 @@ export default { ...@@ -28,10 +28,24 @@ export default {
dealList: { dealList: {
type: Object, type: Object,
default: () => {} default: () => {}
} }
} }
} }
</script> </script>
<style></style> <style>
.table {
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>
<!-- 支付详情-发票表格 --> <!-- 支付详情-发票表格 -->
<template> <template>
<div class="ticketInfo"> <div class="ticketInfo">
<table border="1" width="1200px" 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>
</tr> </tr>
...@@ -20,9 +19,9 @@ ...@@ -20,9 +19,9 @@
</tr> </tr>
<tr v-show="item.invoice_status === 6"> <tr v-show="item.invoice_status === 6">
<th>原发票号码</th> <th>原发票号码</th>
<td>{{item.old_invoice_haoma}}</td> <td>{{ item.old_invoice_haoma }}</td>
<th>原发票代码</th> <th>原发票代码</th>
<td>{{item.old_invoice_daima}}</td> <td>{{ item.old_invoice_daima }}</td>
</tr> </tr>
<tr> <tr>
<th>含税金额</th> <th>含税金额</th>
...@@ -50,13 +49,13 @@ ...@@ -50,13 +49,13 @@
</tr> </tr>
<tr> <tr>
<th>地址</th> <th>地址</th>
<td>{{item.taxpayer_address}}</td> <td>{{ item.taxpayer_address }}</td>
<th>电话</th> <th>电话</th>
<td>{{item.taxpayer_mobile}}</td> <td>{{ item.taxpayer_mobile }}</td>
<th>开户行</th> <th>开户行</th>
<td>{{item.taxpayer_bank_name}}</td> <td>{{ item.taxpayer_bank_name }}</td>
<th>银行账号</th> <th>银行账号</th>
<td>{{item.taxpayer_bank_account}}</td> <td>{{ item.taxpayer_bank_account }}</td>
</tr> </tr>
<tr> <tr>
<th>邮寄地址</th> <th>邮寄地址</th>
...@@ -104,6 +103,18 @@ export default { ...@@ -104,6 +103,18 @@ export default {
<style> <style>
.table { .table {
border: 1px solid #000;
margin-bottom: 40px; 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> </style>
...@@ -5,27 +5,27 @@ ...@@ -5,27 +5,27 @@
<table border="1" width="720px" cellspacing="0" class="table"> <table border="1" width="720px" cellspacing="0" class="table">
<tr> <tr>
<th>客户姓名</th> <th>客户姓名</th>
<td>{{detailList.name}}</td> <td>{{ detailList.name }}</td>
<th>客户编号</th> <th>客户编号</th>
<td>{{detailList.customer_id}}</td> <td>{{ detailList.customer_id }}</td>
<th>订单编号</th> <th>订单编号</th>
<td>{{detailList.id}}</td> <td>{{ detailList.id }}</td>
</tr> </tr>
<tr> <tr>
<th>支付状态</th> <th>支付状态</th>
<td>{{detailList.payment_status}}</td> <td>{{ detailList.payment_status }}</td>
<th>报名项目</th> <th>报名项目</th>
<td>{{detailList.project_id}}</td> <td>{{ detailList.project_id }}</td>
<th>应缴金额</th> <th>应缴金额</th>
<td>{{detailList.bill_total}}</td> <td>{{ detailList.bill_total }}</td>
</tr> </tr>
<tr> <tr>
<th>实缴金额</th> <th>实缴金额</th>
<td>{{detailList.amount_need_to_pay}}</td> <td>{{ detailList.amount_need_to_pay }}</td>
<th>交易流水号</th> <th>交易流水号</th>
<td>{{detailList.txn_id_list}}</td> <td>{{ detailList.txn_id_list }}</td>
<th>缴费时间</th> <th>缴费时间</th>
<td>{{detailList.final_payment_time}}</td> <td>{{ detailList.final_payment_time }}</td>
</tr> </tr>
</table> </table>
<el-form label-width="120px" ref="ruleForm" :model="form" :rules="rules"> <el-form label-width="120px" ref="ruleForm" :model="form" :rules="rules">
...@@ -68,19 +68,19 @@ ...@@ -68,19 +68,19 @@
<el-input v-model="form.taxpayer_identifier"></el-input> <el-input v-model="form.taxpayer_identifier"></el-input>
</el-form-item> </el-form-item>
<!-- 企业纸质显示 --> <!-- 企业纸质显示 -->
<div v-show="form.people_type === 1 && form.invioce_type === 3"> <div v-show="form.people_type === 1 && form.invioce_type === 3">
<el-form-item label="地址" prop="taxpayer_address" > <el-form-item label="地址" prop="taxpayer_address">
<el-input v-model="form.taxpayer_address"></el-input> <el-input v-model="form.taxpayer_address"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="电话" prop="taxpayer_mobile"> <el-form-item label="电话" prop="taxpayer_mobile">
<el-input v-model="form.taxpayer_mobile"></el-input> <el-input v-model="form.taxpayer_mobile"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="开户行" prop="taxpayer_bank_name"> <el-form-item label="开户行" prop="taxpayer_bank_name">
<el-input v-model="form.taxpayer_bank_name"></el-input> <el-input v-model="form.taxpayer_bank_name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="银行账号" prop="taxpayer_bank_account"> <el-form-item label="银行账号" prop="taxpayer_bank_account">
<el-input v-model="form.taxpayer_bank_account"></el-input> <el-input v-model="form.taxpayer_bank_account"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input> <el-input v-model="form.remark"></el-input>
...@@ -217,6 +217,13 @@ export default { ...@@ -217,6 +217,13 @@ export default {
} }
}) })
} }
},
watch: {
'form.people_type': function (oldVal, val) {
if (val !== oldVal) {
this.form.invioce_type = ''
}
}
} }
} }
</script> </script>
......
<template> <template>
<app-card> <app-card>
<app-list v-bind="tableOptions" ref="list" @selection-change="handleSelectionChange"> <app-list v-bind="tableOptions" ref="list" @selection-change="handleSelectionChange">
<!-- 申请状态 -->
<template v-slot:status-select="{ params }">
<el-select v-model="params.status" placeholder="申请状态" filterable remote>
<el-option
v-for="(item, index) in conditionList.payment_status"
:value="item.key"
:key="index"
:label="item.value"
>
<el-checkbox>{{ item.value }}</el-checkbox>
</el-option>
</el-select>
</template>
<!-- 费用类型 -->
<template v-slot:expense-select="{ params }">
<el-select v-model="params.expense" placeholder="费用类型" filterable remote>
<el-option v-for="(item, index) in conditionList.type" :key="index" :label="item.value" :value="item.key">
<el-checkbox>{{ item.value }}</el-checkbox>
</el-option>
</el-select>
</template>
<!-- 发票状态 -->
<template v-slot:invoice-select="{ params }">
<el-select v-model="params.invoice" placeholder="发票状态" filterable remote>
<el-option
v-for="(item, index) in conditionList.invoice_status"
:key="index"
:label="item.value"
:value="item.key"
>
<el-checkbox>{{ item.value }}</el-checkbox>
</el-option>
</el-select>
</template>
<!-- 允许开具发票 --> <!-- 允许开具发票 -->
<template v-slot:ticket_type="{ params }"> <template v-slot:ticket_type="{ params }">
<el-radio-group v-model="params.can_add_invoice"> <el-radio-group v-model="params.can_add_invoice">
<el-radio :label="1">开启</el-radio> <el-radio label="1">开启</el-radio>
<el-radio :label="2">关闭</el-radio> <el-radio label="2">关闭</el-radio>
</el-radio-group> </el-radio-group>
</template> </template>
<!-- 首次缴费时间 --> <!-- 首次缴费时间 -->
...@@ -85,7 +51,7 @@ ...@@ -85,7 +51,7 @@
<router-link target="_blank" :to="{ name: 'paymentView', params: { id: row.id } }"> <router-link target="_blank" :to="{ name: 'paymentView', params: { id: row.id } }">
<el-button>查看</el-button> <el-button>查看</el-button>
</router-link> </router-link>
<el-dropdown split-button type="primary" size="small"> <el-dropdown split-button type="primary" size="small" style="margin-left: 10px; margin-right: 10px">
发票 发票
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="createPop(row)">开具发票</el-dropdown-item> <el-dropdown-item @click.native="createPop(row)">开具发票</el-dropdown-item>
...@@ -118,8 +84,6 @@ import ShareQrcode from '../components/ShareQrcode.vue' ...@@ -118,8 +84,6 @@ import ShareQrcode from '../components/ShareQrcode.vue'
import { getCondition, getPayList, allowCreate, createNewTicket, drawBack, cancelTicket } from '../api' import { getCondition, getPayList, allowCreate, createNewTicket, drawBack, cancelTicket } from '../api'
import XLSX from 'xlsx' import XLSX from 'xlsx'
import { funDownload } from '@/utils/util' import { funDownload } from '@/utils/util'
const statusMap = { 1: '不可开具', 2: '未开具', 3: '开具中', 4: '已开具', 5: '开票失效', 6: '已作废' }
export default { export default {
components: { AppCard, AppList, TicketForm, ShareQrcode }, components: { AppCard, AppList, TicketForm, ShareQrcode },
data() { data() {
...@@ -171,7 +135,8 @@ export default { ...@@ -171,7 +135,8 @@ export default {
pege: '', pege: '',
per_page: '' per_page: ''
}, },
beforeRequest: this.beforeRequest beforeRequest: this.beforeRequest,
callback: this.callback
}, },
filters: [ filters: [
// 项目 // 项目
...@@ -204,22 +169,41 @@ export default { ...@@ -204,22 +169,41 @@ export default {
}, },
// 申请状态 // 申请状态
{ {
prop: 'status', type: 'select',
slots: 'status-select' prop: 'payment_status',
options: this.conditionList.payment_status,
labelKey: 'value',
valueKey: 'key',
multiple: true,
collapseTags: true,
placeholder: '申请状态'
}, },
// 费用类型 // 费用类型
{ {
prop: 'expense', type: 'select',
slots: 'expense-select' options: this.conditionList.type,
prop: 'type',
labelKey: 'value',
valKey: 'key',
multiple: true,
collapseTags: true,
placeholder: '费用类型'
}, },
// 发票状态 // 发票状态
{ {
prop: 'invoice', type: 'select',
slots: 'invoice-select' prop: 'invoice_status',
options: this.conditionList.invoice_status,
labelKey: 'value',
valueKey: 'key',
placeholder: '发票状态',
filterable: true,
remote: true
} }
], ],
moreFilters: [ moreFilters: [
{ {
prop: 'sales_rep_user_id',
label: '跟进人', label: '跟进人',
type: 'select', type: 'select',
placeholder: '跟进人', placeholder: '跟进人',
...@@ -230,6 +214,7 @@ export default { ...@@ -230,6 +214,7 @@ export default {
remote: true remote: true
}, },
{ {
prop: 'invoice_type',
label: '发票类型', label: '发票类型',
type: 'select', type: 'select',
placeholder: '发票类型', placeholder: '发票类型',
...@@ -239,8 +224,8 @@ export default { ...@@ -239,8 +224,8 @@ export default {
}, },
{ {
label: '允许开具发票', label: '允许开具发票',
prop: 'ticket_type', prop: 'can_add_invoice',
slots: 'ticket_type' slots: 'can_add_invoice'
}, },
{ {
label: '首次缴费时间', label: '首次缴费时间',
...@@ -257,8 +242,8 @@ export default { ...@@ -257,8 +242,8 @@ export default {
columns: [ columns: [
{ type: 'selection', minWidth: '50px', fixed: 'left' }, { type: 'selection', minWidth: '50px', fixed: 'left' },
{ label: '客户名称', prop: 'name', minWidth: 80 }, { label: '客户名称', prop: 'name', minWidth: 80 },
{ label: '项目', prop: 'project_id', align: 'center', minWidth: 80 }, { label: '项目', prop: 'project', align: 'center', minWidth: 80 },
{ label: '支付状态', prop: 'type', align: 'center', minWidth: 80 }, { label: '支付状态', prop: 'paymentStatuView', align: 'center', minWidth: 80 },
{ 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: 80 }, { label: '应缴金额', prop: 'bill_total', align: 'center', minWidth: 80 },
...@@ -267,7 +252,7 @@ export default { ...@@ -267,7 +252,7 @@ export default {
{ label: '到账金额', prop: 'amount_received', align: 'center', minWidth: 80 }, { label: '到账金额', prop: 'amount_received', align: 'center', minWidth: 80 },
{ label: '代缴金额', prop: 'amount_waiting_for_pay', align: 'center', minWidth: 80 }, { label: '代缴金额', prop: 'amount_waiting_for_pay', align: 'center', minWidth: 80 },
{ label: '跟进人', prop: 'sales_rep_user_id_name', align: 'center', minWidth: 80 }, { label: '跟进人', prop: 'sales_rep_user_id_name', align: 'center', minWidth: 80 },
{ label: '渠道', prop: 'channel_id', align: 'center', minWidth: 80 }, { label: '渠道', prop: 'channelView', align: 'center', minWidth: 80 },
{ 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 },
...@@ -299,16 +284,13 @@ export default { ...@@ -299,16 +284,13 @@ export default {
}, },
{ {
label: '发票状态', label: '发票状态',
prop: 'invoice_status', prop: 'invoiceStatusView',
align: 'center', align: 'center',
minWidth: 80, minWidth: 80
computed({ row }) {
return statusMap[row.invoice_status]
}
}, },
{ label: '发票申请日期', prop: 'invoice_application_time', align: 'center', minWidth: 200 }, { label: '发票申请日期', prop: 'invoice_application_time', align: 'center', minWidth: 200 },
{ label: '允许开具发票', prop: 'can_add_invoice', slots: 'status', align: 'center', minWidth: 200 }, { label: '允许开具发票', prop: 'can_add_invoice', slots: 'status', align: 'center', minWidth: 200 },
{ label: '操作', slots: 'table-x', align: 'center', minWidth: 300 } { label: '操作', slots: 'table-x', align: 'center', minWidth: 300, fixed: 'right' }
] ]
} }
} }
...@@ -317,6 +299,16 @@ export default { ...@@ -317,6 +299,16 @@ export default {
this.fetchCondition() // 获取过滤条件 this.fetchCondition() // 获取过滤条件
}, },
methods: { methods: {
callback(data) {
// eslint-disable-next-line array-callback-return
data.forEach(item => {
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.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')
})
return data
},
// 开具发票 // 开具发票
createPop(row) { createPop(row) {
this.id = row.id this.id = row.id
...@@ -357,8 +349,8 @@ export default { ...@@ -357,8 +349,8 @@ export default {
this.multipleSelection = val this.multipleSelection = val
}, },
// 开具发票 // 开具发票
handleCreateTicket() { handleCreateTicket(val) {
createNewTicket().then(res => { createNewTicket(val).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success('开票成功') this.$message.success('开票成功')
this.ticketVisible = false this.ticketVisible = false
...@@ -419,21 +411,45 @@ export default { ...@@ -419,21 +411,45 @@ export default {
propList.forEach(key => { propList.forEach(key => {
let val = item[key] let val = item[key]
if (key === 'can_add_invoice') val = val === '1' ? '允许' : '不允许' if (key === 'can_add_invoice') val = val === '1' ? '允许' : '不允许'
if (key === 'refund_time') val = val === null ? '' : '已退费'
rowValArr.push(val) rowValArr.push(val)
}) })
excelList.push(rowValArr) excelList.push(rowValArr)
}) })
const ws = XLSX.utils.aoa_to_sheet(excelList) const ws = XLSX.utils.aoa_to_sheet(excelList)
ws['!cols'] = [ ws['!cols'] = [
{ wpx: 120 },
{ wpx: 120 },
{ wpx: 160 },
{ wpx: 180 },
{ wpx: 120 },
{ wpx: 80 },
{ wpx: 200 }, { wpx: 200 },
{ wpx: 120 }, { wpx: 200 },
{ wpx: 120 } { wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 },
{ wpx: 200 }
] ]
const wb = XLSX.utils.book_new() const wb = XLSX.utils.book_new()
wb.SheetNames.push('Worksheet') wb.SheetNames.push('Worksheet')
...@@ -442,6 +458,12 @@ export default { ...@@ -442,6 +458,12 @@ export default {
const wbout = XLSX.write(wb, wopts) const wbout = XLSX.write(wb, wopts)
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`)
},
findName(option, item, findKey, reName) {
const found = option.find(findItem => {
return parseInt(findItem[findKey]) === parseInt(item)
})
return found ? found[reName] : item
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论