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

fast: 新增发票管理

上级 77e28f3a
...@@ -3,6 +3,6 @@ import httpRequest from '@/utils/axios' ...@@ -3,6 +3,6 @@ import httpRequest from '@/utils/axios'
/** /**
* 获取商品列表 * 获取商品列表
*/ */
export function getGoodsList(data) { export function getInvoiceList(params) {
return httpRequest.post('/api/shop/commodity/spu/search', data).then({}) return httpRequest.get('/api/finance/v1/invoices/list', { params }).then({})
} }
...@@ -8,12 +8,6 @@ const routes = [ ...@@ -8,12 +8,6 @@ const routes = [
path: '', path: '',
component: () => import('./views/List.vue'), component: () => import('./views/List.vue'),
meta: { title: '发票记录' } 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 @@ ...@@ -2,22 +2,9 @@
<div> <div>
<app-card style="max-width: 100%"> <app-card style="max-width: 100%">
<app-list v-bind="tableOptions" ref="list" @selection-change="handleSelectionChange"> <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-row>
<el-button type="primary" @click="isShowdialog = true">分配票据跟进人</el-button> <el-button type="primary" @click="isShowDialog = true">分配票据跟进人</el-button>
</el-row> </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 }"> <template v-slot:table-x="{ row }">
<router-link :to="{ name: 'invoiceView', params: { id: row.id } }"> <router-link :to="{ name: 'invoiceView', params: { id: row.id } }">
<el-button type="text">查看</el-button> <el-button type="text">查看</el-button>
...@@ -25,7 +12,7 @@ ...@@ -25,7 +12,7 @@
</template> </template>
</app-list> </app-list>
</app-card> </app-card>
<distribution-dialog @dialogHide="dialogHide" :visible.sync="isShowdialog"></distribution-dialog> <distribution-dialog @dialogHide="dialogHide" :visible.sync="isShowDialog"></distribution-dialog>
</div> </div>
</template> </template>
...@@ -35,84 +22,135 @@ import AppList from '@/components/base/AppList.vue' ...@@ -35,84 +22,135 @@ 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 { getGoodsList } from '../api' import { getInvoiceList } from '../api'
export default { export default {
components: { AppCard, AppList, DistributionDialog }, components: { AppCard, AppList, DistributionDialog },
data() { data() {
return { return {
invoiceTypeOption: [ invoiceColorType: [
{ value: '1', label: '1' }, { label: '红字发票', value: '1' },
{ value: '2', label: '2' }, { label: '蓝字发票', value: '0' }
{ value: '3', label: '3' } ],
invoiceType: [
{ label: '普通纸质发票', value: '1' },
{ label: '普通电子发票', value: '2' },
{ label: '专用纸质发票', value: '3' }
], ],
billingTypeOption: [{ value: '1', label: '1' }], taxpayer_type: [
isShowdialog: false { 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: { computed: {
// 列表配置 // 列表配置
tableOptions() { tableOptions() {
const _this = this
return { return {
// remote: { remote: {
// httpRequest: getGoodsList, httpRequest: getInvoiceList
// params: { shop_id: this.shopId, spu_id: '', spu_name: '', group_id: '', price_min: '', price_max: '' }, // params: { shop_id: this.shopId, spu_id: '', spu_name: '', group_id: '', price_min: '', price_max: '' }
// beforeRequest: this.beforeRequest // 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', type: 'select',
prop: 'name', prop: 'invoice_type',
placeholder: '客户姓名' options: this.invoiceType,
placeholder: '请选择发票类型'
}, },
{ {
type: 'input', type: 'select',
prop: 'flow_num', prop: 'invoice_color_type',
placeholder: '交易流水号' options: this.invoiceColorType,
}, placeholder: '请选择开票类型'
{ prop: 'invoice_type', slots: 'invoice-type' }, }
{ prop: 'billing_type', slots: 'billing-type' }
], ],
columnsOptions: { key: 'invoices' }, columnsOptions: { key: 'invoices' },
columns: [ columns: [
{ label: '发票代码', prop: 'invoice_code', minWidth: 120 }, { label: '发票代码', prop: 'invoice_daima' },
{ label: '发票号码', prop: 'invoice_num', minWidth: 120 }, { label: '发票号码', prop: 'invoice_haoma' },
{ label: '客户姓名', prop: 'name', minWidth: 100 }, { label: '客户姓名', prop: 'name' },
{ label: '客户编号', prop: 'number', minWidth: 100 }, { label: '客户编号', prop: 'customer_id' },
{ label: '订单编号', prop: 'order', minWidth: 100 }, { label: '订单编号', prop: 'payment_id' },
{ label: '交易流水号', prop: 'data', minWidth: 100 }, { label: '交易流水号', prop: 'txn_id_list' },
{ label: '项目', prop: 'data1', minWidth: 100 }, { label: '项目', prop: 'project_id' },
{ label: '税率', prop: 'data1', minWidth: 100 }, { label: '税率', prop: 'invoice_tax_rate' },
{ label: '税额', prop: 'data1', minWidth: 100 }, { label: '税额', prop: 'invoice_tax_rate_amount' },
{ label: '不含税金额', prop: 'data1', minWidth: 100 }, { label: '不含税金额', prop: 'invoice_excluding_tax_amount' },
{ label: '含税金额', prop: 'data1', minWidth: 100 }, { label: '含税金额', prop: 'invoice_total_amount' },
{ label: '缴费时间', prop: 'data1', minWidth: 100 }, { label: '缴费时间', prop: 'final_payment_time' },
{ label: '发票类型', prop: 'data1', minWidth: 100 }, {
{ label: '抬头类型', prop: 'data1', minWidth: 100 }, label: '发票类型',
{ label: '开票类型', prop: 'data1', minWidth: 100 }, prop: 'invoice_type',
{ label: '原发票号码', prop: 'data1', minWidth: 100 }, computed({ row }) {
{ label: '原发票代码', prop: 'data1', minWidth: 100 }, const found = _this.invoiceType.find(item => {
{ label: '纳税人名称', prop: 'data1', minWidth: 100 }, return parseInt(item.value) === parseInt(row.invoice_type)
{ label: '纳税人识别号', prop: 'data1', minWidth: 100 }, })
{ label: '地址', prop: 'data1', minWidth: 100 }, return found ? found.label : row.invoice_type
{ label: '电话', prop: 'data1', minWidth: 100 }, }
{ label: '开户行', prop: 'data1', minWidth: 100 }, },
{ label: '银行账号', prop: 'data1', minWidth: 100 }, {
{ label: '备注', prop: 'data1', minWidth: 100 }, label: '抬头类型',
{ label: '邮寄地址', prop: 'data1', minWidth: 100 }, prop: 'taxpayer_type',
{ label: '收件人姓名', prop: 'data1', minWidth: 100 }, computed({ row }) {
{ label: '收件人手机号', prop: 'data1', minWidth: 100 }, const found = _this.taxpayer_type.find(item => {
{ label: '邮箱地址', prop: 'data1', minWidth: 100 }, return parseInt(item.value) === parseInt(row.taxpayer_type)
{ label: '票据跟进人', prop: 'data1', minWidth: 100 }, })
{ label: '发票申请日期', prop: 'data1', minWidth: 100 }, return found ? found.label : row.taxpayer_type
{ label: '开票时间', prop: 'data1', minWidth: 100 }, }
{ label: '开票状态', prop: 'data1', minWidth: 100 }, },
{ label: '操作', slots: 'table-x', align: 'center', width: 150, fixed: 'right' } {
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: [ data: [
{ {
...@@ -153,7 +191,7 @@ export default { ...@@ -153,7 +191,7 @@ export default {
}, },
methods: { methods: {
dialogHide() { dialogHide() {
this.isShowdialog = false this.isShowDialog = false
}, },
beforeRequest(params, isReset) { 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 { ...@@ -46,7 +46,6 @@ export default {
remote: { remote: {
httpRequest: getProjectList, httpRequest: getProjectList,
params: { name: '', project_type: '', project_status: '' } params: { name: '', project_type: '', project_status: '' }
// beforeRequest: this.beforeRequest
}, },
filters: [ filters: [
{ {
...@@ -75,7 +74,9 @@ export default { ...@@ -75,7 +74,9 @@ export default {
label: '项目类型', label: '项目类型',
prop: 'project_type', prop: 'project_type',
computed({ row }) { 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 return found ? found.label : row.project_type
} }
}, },
...@@ -83,7 +84,9 @@ export default { ...@@ -83,7 +84,9 @@ export default {
label: '状态', label: '状态',
prop: 'project_status', prop: 'project_status',
computed({ row }) { 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 return found ? found.label : row.project_status
} }
}, },
...@@ -92,13 +95,7 @@ export default { ...@@ -92,13 +95,7 @@ export default {
} }
} }
}, },
mounted() {
console.log(this.prijectName, '==123')
},
methods: { methods: {
dialogHide() {
this.isShowdialog = false
},
beforeRequest(params, isReset) { beforeRequest(params, isReset) {
// 重置 // 重置
if (isReset) { if (isReset) {
...@@ -109,10 +106,6 @@ export default { ...@@ -109,10 +106,6 @@ export default {
params.price_zone = `${params.price_min || ''},${params.price_max || ''}` params.price_zone = `${params.price_min || ''},${params.price_max || ''}`
return params return params
}, },
// 编辑
handleUpdate(row) {
this.$router.push({ name: 'goodsEdit', params: { id: row.spu_id } })
},
// 选择 // 选择
handleSelectionChange(value) { handleSelectionChange(value) {
this.multipleSelection = value this.multipleSelection = value
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论