提交 34b21ca4 authored 作者: lihuihui's avatar lihuihui

fast: 新增发票管理

上级 77e28f3a
......@@ -3,6 +3,6 @@ import httpRequest from '@/utils/axios'
/**
* 获取商品列表
*/
export function getGoodsList(data) {
return httpRequest.post('/api/shop/commodity/spu/search', data).then({})
export function getInvoiceList(params) {
return httpRequest.get('/api/finance/v1/invoices/list', { params }).then({})
}
......@@ -8,12 +8,6 @@ const routes = [
path: '',
component: () => import('./views/List.vue'),
meta: { title: '发票记录' }
},
{
name: 'invoiceView',
path: 'invoice/:id',
component: () => import('./views/Detail.vue'),
meta: { title: '发票详情' }
}
]
}
......
<template>
<div>12312</div>
</template>
<script>
export default {}
</script>
<style></style>
......@@ -2,22 +2,9 @@
<div>
<app-card style="max-width: 100%">
<app-list v-bind="tableOptions" ref="list" @selection-change="handleSelectionChange">
<!-- 筛选 -->
<template v-slot:invoice-type="{ params }">
<el-select v-model="params.invoice_type" multiple collapse-tags placeholder="发票类型">
<el-option v-for="item in invoiceTypeOption" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</template>
<el-row>
<el-button type="primary" @click="isShowdialog = true">分配票据跟进人</el-button>
<el-button type="primary" @click="isShowDialog = true">分配票据跟进人</el-button>
</el-row>
<template v-slot:billing-type="{ params }">
<el-select v-model="params.billing_type" multiple collapse-tags placeholder="开票类型">
<el-option v-for="item in billingTypeOption" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</template>
<template v-slot:table-x="{ row }">
<router-link :to="{ name: 'invoiceView', params: { id: row.id } }">
<el-button type="text">查看</el-button>
......@@ -25,7 +12,7 @@
</template>
</app-list>
</app-card>
<distribution-dialog @dialogHide="dialogHide" :visible.sync="isShowdialog"></distribution-dialog>
<distribution-dialog @dialogHide="dialogHide" :visible.sync="isShowDialog"></distribution-dialog>
</div>
</template>
......@@ -35,84 +22,135 @@ import AppList from '@/components/base/AppList.vue'
import AppCard from '@/components/base/AppCard.vue'
import DistributionDialog from '../components/DistributionDialog.vue'
// 接口
// import { getGoodsList } from '../api'
import { getInvoiceList } from '../api'
export default {
components: { AppCard, AppList, DistributionDialog },
data() {
return {
invoiceTypeOption: [
{ value: '1', label: '1' },
{ value: '2', label: '2' },
{ value: '3', label: '3' }
invoiceColorType: [
{ label: '红字发票', value: '1' },
{ label: '蓝字发票', value: '0' }
],
invoiceType: [
{ label: '普通纸质发票', value: '1' },
{ label: '普通电子发票', value: '2' },
{ label: '专用纸质发票', value: '3' }
],
billingTypeOption: [{ value: '1', label: '1' }],
isShowdialog: false
taxpayer_type: [
{ label: '个人', value: '1' },
{ label: '企业', value: '2' },
{ label: '非营利性单位', value: '3' }
],
invoiceStatus: [
{ label: '不可开具', value: '1' },
{ label: '未开具', value: '2' },
{ label: '开具中', value: '3' },
{ label: '已开具', value: '4' },
{ label: '开票失败', value: '5' },
{ label: '已作废', value: '6' }
],
isShowDialog: false
}
},
computed: {
// 列表配置
tableOptions() {
const _this = this
return {
// remote: {
// httpRequest: getGoodsList,
// params: { shop_id: this.shopId, spu_id: '', spu_name: '', group_id: '', price_min: '', price_max: '' },
remote: {
httpRequest: getInvoiceList
// params: { shop_id: this.shopId, spu_id: '', spu_name: '', group_id: '', price_min: '', price_max: '' }
// beforeRequest: this.beforeRequest
// },
filters: [
{
type: 'input',
prop: 'invoice_code',
placeholder: '发票号码'
},
filters: [
{ type: 'input', prop: 'invoice_haoma', placeholder: '发票号码' },
{ type: 'input', prop: 'name', placeholder: '客户姓名' },
{ type: 'input', prop: 'txn_id', placeholder: '交易流水号' },
{
type: 'input',
prop: 'name',
placeholder: '客户姓名'
type: 'select',
prop: 'invoice_type',
options: this.invoiceType,
placeholder: '请选择发票类型'
},
{
type: 'input',
prop: 'flow_num',
placeholder: '交易流水号'
},
{ prop: 'invoice_type', slots: 'invoice-type' },
{ prop: 'billing_type', slots: 'billing-type' }
type: 'select',
prop: 'invoice_color_type',
options: this.invoiceColorType,
placeholder: '请选择开票类型'
}
],
columnsOptions: { key: 'invoices' },
columns: [
{ label: '发票代码', prop: 'invoice_code', minWidth: 120 },
{ label: '发票号码', prop: 'invoice_num', minWidth: 120 },
{ label: '客户姓名', prop: 'name', minWidth: 100 },
{ label: '客户编号', prop: 'number', minWidth: 100 },
{ label: '订单编号', prop: 'order', minWidth: 100 },
{ label: '交易流水号', prop: 'data', minWidth: 100 },
{ label: '项目', prop: 'data1', minWidth: 100 },
{ label: '税率', prop: 'data1', minWidth: 100 },
{ label: '税额', prop: 'data1', minWidth: 100 },
{ label: '不含税金额', prop: 'data1', minWidth: 100 },
{ label: '含税金额', prop: 'data1', minWidth: 100 },
{ label: '缴费时间', prop: 'data1', minWidth: 100 },
{ label: '发票类型', prop: 'data1', minWidth: 100 },
{ label: '抬头类型', prop: 'data1', minWidth: 100 },
{ label: '开票类型', prop: 'data1', minWidth: 100 },
{ label: '原发票号码', prop: 'data1', minWidth: 100 },
{ label: '原发票代码', prop: 'data1', minWidth: 100 },
{ label: '纳税人名称', prop: 'data1', minWidth: 100 },
{ label: '纳税人识别号', prop: 'data1', minWidth: 100 },
{ label: '地址', prop: 'data1', minWidth: 100 },
{ label: '电话', prop: 'data1', minWidth: 100 },
{ label: '开户行', prop: 'data1', minWidth: 100 },
{ label: '银行账号', prop: 'data1', minWidth: 100 },
{ label: '备注', prop: 'data1', minWidth: 100 },
{ label: '邮寄地址', prop: 'data1', minWidth: 100 },
{ label: '收件人姓名', prop: 'data1', minWidth: 100 },
{ label: '收件人手机号', prop: 'data1', minWidth: 100 },
{ label: '邮箱地址', prop: 'data1', minWidth: 100 },
{ label: '票据跟进人', prop: 'data1', minWidth: 100 },
{ label: '发票申请日期', prop: 'data1', minWidth: 100 },
{ label: '开票时间', prop: 'data1', minWidth: 100 },
{ label: '开票状态', prop: 'data1', minWidth: 100 },
{ label: '操作', slots: 'table-x', align: 'center', width: 150, fixed: 'right' }
{ label: '发票代码', prop: 'invoice_daima' },
{ label: '发票号码', prop: 'invoice_haoma' },
{ label: '客户姓名', prop: 'name' },
{ label: '客户编号', prop: 'customer_id' },
{ label: '订单编号', prop: 'payment_id' },
{ label: '交易流水号', prop: 'txn_id_list' },
{ label: '项目', prop: 'project_id' },
{ label: '税率', prop: 'invoice_tax_rate' },
{ label: '税额', prop: 'invoice_tax_rate_amount' },
{ label: '不含税金额', prop: 'invoice_excluding_tax_amount' },
{ label: '含税金额', prop: 'invoice_total_amount' },
{ label: '缴费时间', prop: 'final_payment_time' },
{
label: '发票类型',
prop: 'invoice_type',
computed({ row }) {
const found = _this.invoiceType.find(item => {
return parseInt(item.value) === parseInt(row.invoice_type)
})
return found ? found.label : row.invoice_type
}
},
{
label: '抬头类型',
prop: 'taxpayer_type',
computed({ row }) {
const found = _this.taxpayer_type.find(item => {
return parseInt(item.value) === parseInt(row.taxpayer_type)
})
return found ? found.label : row.taxpayer_type
}
},
{
label: '开票类型',
prop: 'invoice_color_type',
computed({ row }) {
const found = _this.invoiceColorType.find(item => {
return parseInt(item.value) === parseInt(row.invoice_color_type)
})
return found ? found.label : row.invoice_color_type
}
},
{ label: '原发票号码', prop: 'old_invoice_haoma' },
{ label: '原发票代码', prop: 'old_invoice_daima' },
{ label: '纳税人名称', prop: 'taxpayer_name' },
{ label: '纳税人识别号', prop: 'taxpayer_identifier' },
{ label: '地址', prop: 'taxpayer_address' },
{ label: '电话', prop: 'taxpayer_mobile' },
{ label: '开户行', prop: 'taxpayer_bank_name' },
{ label: '银行账号', prop: 'taxpayer_bank_account' },
{ label: '备注', prop: 'taxpayer_remark' },
{ label: '邮寄地址', prop: 'recipient_address' },
{ label: '收件人姓名', prop: 'recipient_name' },
{ label: '收件人手机号', prop: 'recipient_mobile' },
{ label: '邮箱地址', prop: 'recipient_email' },
{ label: '票据跟进人', prop: 'sales_rep_user_id_name' },
{ label: '发票申请日期', prop: 'invoice_application_time' },
{ label: '开票时间', prop: 'invoice_issuing_time' },
{
label: '开票状态',
prop: 'invoice_status',
computed({ row }) {
const found = _this.invoiceStatus.find(item => {
return parseInt(item.value) === parseInt(row.invoice_status)
})
return found ? found.label : row.invoice_status
}
},
{ label: '操作', slots: 'table-x', align: 'center', fixed: 'right' }
],
data: [
{
......@@ -153,7 +191,7 @@ export default {
},
methods: {
dialogHide() {
this.isShowdialog = false
this.isShowDialog = false
},
beforeRequest(params, isReset) {
// 重置
......
<template>
<div>
<el-dialog title="分配票据跟进人" center :visible.sync="visible" :before-close="modalClose">
<el-form :model="form">
<el-form-item label="票据跟进人">
<el-select v-model="form.region" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="$emit('dialogHide')">取 消</el-button>
<el-button type="primary" @click="$emit('dialogHide')">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
props: {
visible: {
type: Boolean,
default: false
}
},
data() {
return {
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
}
}
},
methods: {
modalClose() {
this.$emit('update:visible', false)
}
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -46,7 +46,6 @@ export default {
remote: {
httpRequest: getProjectList,
params: { name: '', project_type: '', project_status: '' }
// beforeRequest: this.beforeRequest
},
filters: [
{
......@@ -75,7 +74,9 @@ export default {
label: '项目类型',
prop: 'project_type',
computed({ row }) {
const found = _this.projectType.find(item => { return item.value === parseInt(row.project_type) })
const found = _this.projectType.find(item => {
return item.value === parseInt(row.project_type)
})
return found ? found.label : row.project_type
}
},
......@@ -83,7 +84,9 @@ export default {
label: '状态',
prop: 'project_status',
computed({ row }) {
const found = _this.projectStatus.find(item => { return item.value === parseInt(row.project_status) })
const found = _this.projectStatus.find(item => {
return item.value === parseInt(row.project_status)
})
return found ? found.label : row.project_status
}
},
......@@ -92,13 +95,7 @@ export default {
}
}
},
mounted() {
console.log(this.prijectName, '==123')
},
methods: {
dialogHide() {
this.isShowdialog = false
},
beforeRequest(params, isReset) {
// 重置
if (isReset) {
......@@ -109,10 +106,6 @@ export default {
params.price_zone = `${params.price_min || ''},${params.price_max || ''}`
return params
},
// 编辑
handleUpdate(row) {
this.$router.push({ name: 'goodsEdit', params: { id: row.spu_id } })
},
// 选择
handleSelectionChange(value) {
this.multipleSelection = value
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论