9 changed files with 556 additions and 186 deletions
@ -0,0 +1,13 @@ |
|||||
|
import axios from '@/libs/api.request' |
||||
|
|
||||
|
/** |
||||
|
* 获取发票申请列表数据 |
||||
|
* @returns {wx.RequestTask | never} |
||||
|
*/ |
||||
|
export const getHome = (params) => { |
||||
|
return axios.request({ |
||||
|
url: 'Index/statistics', |
||||
|
method: 'get', |
||||
|
params: params |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,37 @@ |
|||||
|
import axios from '@/libs/api.request' |
||||
|
|
||||
|
/** |
||||
|
* 获取发票申请列表数据 |
||||
|
* @returns {wx.RequestTask | never} |
||||
|
*/ |
||||
|
export const getinvoiceList = (params) => { |
||||
|
return axios.request({ |
||||
|
url: 'InvoiceIssuance/index', |
||||
|
method: 'get', |
||||
|
params: params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取发票项目选项 |
||||
|
* @returns {wx.RequestTask | never} |
||||
|
*/ |
||||
|
export const getIndexData = (params) => { |
||||
|
return axios.request({ |
||||
|
url: 'InvoiceIssuance/getIndexData', |
||||
|
method: 'get', |
||||
|
params: params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取发票抬头数据 |
||||
|
* @returns {wx.RequestTask | never} |
||||
|
*/ |
||||
|
export const getInvoiceHead = (params) => { |
||||
|
return axios.request({ |
||||
|
url: 'InvoiceHead/index', |
||||
|
method: 'get', |
||||
|
params: params |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,110 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<Row> |
||||
|
<Col span="24"> |
||||
|
<Card class="margin-bottom-10"> |
||||
|
<Form inline> |
||||
|
<FormItem class="margin-bottom-0"> |
||||
|
<Input v-model="pucode_id" @on-enter="search" clearable placeholder="输入用户编码查询"></Input> |
||||
|
</FormItem> |
||||
|
<FormItem class="margin-bottom-0"> |
||||
|
<Button type="primary" @click="search">{{ $t('find_button') }}/{{ $t('refresh_button') }}</Button> |
||||
|
</FormItem> |
||||
|
</Form> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
</Row> |
||||
|
<Row> |
||||
|
<Col span="24"> |
||||
|
<Card> |
||||
|
<!-- 用户列表 --> |
||||
|
<div> |
||||
|
<Table :loading="listLoading" :columns="columnsList" :data="tableData" stripe disabled-hover></Table> |
||||
|
</div> |
||||
|
<div class="margin-top-15" style="text-align: center"> |
||||
|
<Page :total="count" :current="page" :page-size="size" @on-change="changePage" @on-page-size-change="changeSize" show-elevator show-sizer show-total></Page> |
||||
|
</div> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
</Row> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { getInvoiceHead } from '@/api/invoice' |
||||
|
export default { |
||||
|
name: 'reqlist', |
||||
|
data () { |
||||
|
return { |
||||
|
size: 10, |
||||
|
page: 1, |
||||
|
count: 0, |
||||
|
tableData: [], |
||||
|
listLoading: false, |
||||
|
pucode_id: '', |
||||
|
columnsList: [ |
||||
|
{ title: 'id', align: 'center', key: 'id', minWidth: 80 }, |
||||
|
{ title: '用户编码', align: 'center', key: 'pucode', minWidth: 100 }, |
||||
|
{ |
||||
|
title: '微信用户头像', |
||||
|
align: 'center', |
||||
|
key: 'id', |
||||
|
minWidth: 100, |
||||
|
render: (h, params) => { |
||||
|
return h('img', { |
||||
|
attrs: { |
||||
|
src: params.row.headimgurl, |
||||
|
style: 'width:72px;height:72px;' |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
{ title: '微信用户名', align: 'center', key: 'wechat_user_name', minWidth: 100 }, |
||||
|
{ title: '电话', align: 'center', key: 'telephone', minWidth: 100 }, |
||||
|
{ title: '地址', align: 'center', key: 'address', minWidth: 100 }, |
||||
|
{ title: '抬头类型', align: 'center', key: 'type', minWidth: 100 }, |
||||
|
{ title: '抬头名称', align: 'center', key: 'title', minWidth: 100 }, |
||||
|
{ title: '税号', align: 'center', key: 'tax_number', minWidth: 100 }, |
||||
|
{ title: '开户行', align: 'center', key: 'bank_name', minWidth: 100 }, |
||||
|
{ title: '银行账号', align: 'center', key: 'bank_account', minWidth: 100 }, |
||||
|
{ title: '创建时间', align: 'center', key: 'create_time', minWidth: 80 } |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.InvoiceHead() |
||||
|
}, |
||||
|
methods: { |
||||
|
InvoiceHead () { |
||||
|
let data = { |
||||
|
page: this.page, |
||||
|
size: this.size, |
||||
|
pucode: this.pucode_id |
||||
|
} |
||||
|
this.listLoading = true |
||||
|
getInvoiceHead(data).then(response => { |
||||
|
this.tableData = response.data.data.list |
||||
|
this.count = response.data.data.count |
||||
|
this.listLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
search () { |
||||
|
this.page = 1 |
||||
|
this.InvoiceHead() |
||||
|
}, |
||||
|
// 切换每页页码 |
||||
|
changePage (page) { |
||||
|
this.page = page |
||||
|
this.InvoiceHead() |
||||
|
}, |
||||
|
// 切换每页条数 |
||||
|
changeSize (size) { |
||||
|
this.size = size |
||||
|
this.InvoiceHead() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
</style> |
||||
@ -0,0 +1,158 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<!-- 查询条件 --> |
||||
|
<Row> |
||||
|
<Col span="24"> |
||||
|
<Card class="margin-bottom-10"> |
||||
|
<Form inline> |
||||
|
<FormItem class="margin-bottom-0"> |
||||
|
<Input v-model="phone" @on-clear="phone_clear" clearable placeholder="输入手机号码查询"></Input> |
||||
|
</FormItem> |
||||
|
<FormItem class="margin-bottom-0"> |
||||
|
<Input v-model="pucode_id" @on-clear="pucode_clear" clearable placeholder="用户编号查询"></Input> |
||||
|
</FormItem> |
||||
|
<FormItem class="margin-bottom-0"> |
||||
|
<Select v-model="merge_id" clearable style="width:200px" @on-clear="merge_clear" placeholder="请选择合并开票"> |
||||
|
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option> |
||||
|
</Select> |
||||
|
</FormItem> |
||||
|
<FormItem class="margin-bottom-0"> |
||||
|
<Select v-model="project_id" clearable style="width:200px" @on-clear="project_clear" placeholder="请选择开票项目"> |
||||
|
<Option v-for="item in projectList" :value="item.value" :key="item.value">{{ item.text }}</Option> |
||||
|
</Select> |
||||
|
</FormItem> |
||||
|
<FormItem class="margin-bottom-0"> |
||||
|
<Button type="primary" @click="search">{{ $t('find_button') }}/{{ $t('refresh_button') }}</Button> |
||||
|
</FormItem> |
||||
|
</Form> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
</Row> |
||||
|
|
||||
|
<Row> |
||||
|
<Col span="24"> |
||||
|
<Card> |
||||
|
<!-- 用户列表 --> |
||||
|
<div> |
||||
|
<Table :loading="listLoading" :columns="columnsList" :data="tableData" stripe disabled-hover></Table> |
||||
|
</div> |
||||
|
<div class="margin-top-15" style="text-align: center"> |
||||
|
<Page :total="listCount" :current="page" :page-size="size" @on-change="changePage" @on-page-size-change="changeSize" show-elevator show-sizer show-total></Page> |
||||
|
</div> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
</Row> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { getinvoiceList, getIndexData } from '@/api/invoice' |
||||
|
export default { |
||||
|
name: 'reqlist', |
||||
|
data () { |
||||
|
return { |
||||
|
size: 10, |
||||
|
page: 1, |
||||
|
listCount: 0, |
||||
|
tableData: [], |
||||
|
listLoading: false, |
||||
|
phone: '', |
||||
|
pucode_id: '', |
||||
|
project_id: '', |
||||
|
merge_id: '', |
||||
|
cityList: [{ value: '0', label: '不合并' }, { value: '1', label: '合并' }], |
||||
|
projectList: [], |
||||
|
columnsList: [ |
||||
|
{ title: 'id', align: 'center', key: 'id', minWidth: 80 }, |
||||
|
{ title: '用户编号', align: 'center', key: 'pucode', width: 130 }, |
||||
|
{ title: '手机号码', align: 'center', key: 'mobile', width: 150 }, |
||||
|
{ title: '邮箱号', align: 'center', key: 'email', width: 200 }, |
||||
|
{ title: '抬头类型', align: 'center', key: 'head_type', width: 100 }, |
||||
|
{ title: '抬头名称', align: 'center', key: 'head_title', width: 100 }, |
||||
|
{ title: '开票项目', align: 'center', key: 'project_itle', width: 100 }, |
||||
|
{ title: '合并开票', align: 'center', key: 'merge', minWidth: 100 }, |
||||
|
{ title: '状态', align: 'center', key: 'status', width: 100 }, |
||||
|
{ title: '开票金额', align: 'center', key: 'amount', width: 100 }, |
||||
|
{ title: '创建时间', align: 'center', key: 'create_time', width: 110 }, |
||||
|
{ title: '到期时间', align: 'center', key: 'expire_time', width: 100 }, |
||||
|
{ title: '开票时间', align: 'center', key: 'issuance_time', width: 110 }, |
||||
|
{ title: '作废时间', align: 'center', key: 'cancel_time', width: 110 } |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.getinvoiceList() |
||||
|
this.getIndexData() |
||||
|
}, |
||||
|
mounted () { |
||||
|
window.addEventListener('keydown', this.handleKeyDown) |
||||
|
}, |
||||
|
beforeDestroy () { |
||||
|
// 移除事件监听器 |
||||
|
window.removeEventListener('keydown', this.handleKeyDown) |
||||
|
}, |
||||
|
methods: { |
||||
|
handleKeyDown (event) { |
||||
|
if (event.key === 'Enter') { |
||||
|
// 当回车键被按下时执行的逻辑 |
||||
|
this.search() |
||||
|
} |
||||
|
}, |
||||
|
// 获取列表数据 |
||||
|
getinvoiceList () { |
||||
|
let data = { |
||||
|
page: this.page, |
||||
|
size: this.size, |
||||
|
pucode: this.pucode_id, |
||||
|
project_id: this.project_id ? +this.project_id : '', |
||||
|
mobile: this.phone ? +this.phone : '', |
||||
|
merge: this.merge_id ? +this.merge_id : '' |
||||
|
} |
||||
|
this.listLoading = true |
||||
|
getinvoiceList(data).then(response => { |
||||
|
this.tableData = response.data.data.list |
||||
|
this.listCount = response.data.data.count |
||||
|
this.listLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 获取下拉框数据 |
||||
|
getIndexData () { |
||||
|
getIndexData().then(response => { |
||||
|
this.projectList = response.data.data |
||||
|
}) |
||||
|
}, |
||||
|
merge_clear () { |
||||
|
this.merge_id = '' |
||||
|
}, |
||||
|
project_clear () { |
||||
|
this.project_id = '' |
||||
|
}, |
||||
|
phone_clear () { |
||||
|
this.phone = '' |
||||
|
}, |
||||
|
pucode_clear () { |
||||
|
this.pucode_id = '' |
||||
|
}, |
||||
|
search () { |
||||
|
this.page = 1 |
||||
|
this.getinvoiceList() |
||||
|
}, |
||||
|
handleEnter (event) { |
||||
|
console.log(event) |
||||
|
}, |
||||
|
// 切换每页页码 |
||||
|
changePage (page) { |
||||
|
this.page = page |
||||
|
this.getinvoiceList() |
||||
|
}, |
||||
|
// 切换每页条数 |
||||
|
changeSize (size) { |
||||
|
this.size = size |
||||
|
this.getinvoiceList() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
</style> |
||||
Loading…
Reference in new issue