Browse Source

新增结报管理

master
liaoxinyu 11 months ago
parent
commit
481a663c6c
  1. 12
      src/api/home.js
  2. 12
      src/api/invoice.js
  3. 37
      src/api/report.js
  4. 3
      src/components/charts/bar.vue
  5. 9
      src/components/main/components/side-menu/side-menu.vue
  6. 8
      src/index.less
  7. 5
      src/view/customer/exptuser.vue
  8. 13
      src/view/customer/wxulist.vue
  9. 104
      src/view/invoice/reqlist.vue
  10. 10
      src/view/login/login.vue
  11. 235
      src/view/report/index.vue
  12. 73
      src/view/single-page/home/example.vue
  13. 2
      src/view/single-page/home/home.vue

12
src/api/home.js

@ -11,3 +11,15 @@ export const getHome = (params) => {
params: params
})
}
/**
* 获取结报金额合计
* @returns {wx.RequestTask | never}
*/
export const getFinalReportData = (params) => {
return axios.request({
url: 'Index/getFinalReportData',
method: 'get',
params: params
})
}

12
src/api/invoice.js

@ -35,3 +35,15 @@ export const getInvoiceHead = (params) => {
params: params
})
}
/**
* 发票抬头作废
* @returns {wx.RequestTask | never}
*/
export const getcancel = (params) => {
return axios.request({
url: 'InvoiceIssuance/cancel',
method: 'get',
params: params
})
}

37
src/api/report.js

@ -0,0 +1,37 @@
import axios from '@/libs/api.request'
/**
* 获取结报列表数据
* @returns {wx.RequestTask | never}
*/
export const getindex = (params) => {
return axios.request({
url: 'InvoiceFinalReport/index',
method: 'get',
params: params
})
}
/**
* 结报明细
* @returns {wx.RequestTask | never}
*/
export const getview = (params) => {
return axios.request({
url: 'InvoiceFinalReport/view',
method: 'get',
params: params
})
}
/**
* 结报明细
* @returns {wx.RequestTask | never}
*/
export const getreport = (params) => {
return axios.request({
url: 'InvoiceFinalReport/report',
method: 'get',
params: params
})
}

3
src/components/charts/bar.vue

@ -44,6 +44,9 @@ export default {
let xAxisData = Object.keys(this.value)
let seriesData = Object.values(this.value)
let option = {
tooltip: {
trigger: 'axis'
},
title: {
text: this.text,
subtext: this.subtext,

9
src/components/main/components/side-menu/side-menu.vue

@ -2,7 +2,7 @@
<div class="side-menu-wrapper">
<slot></slot>
<Menu ref="menu" v-show="!collapsed" :active-name="activeName" :open-names="openedNames" :accordion="accordion" :theme="theme" width="auto" @on-select="handleSelect">
<menu-item name="home" key="menu-index"><common-icon type="md-home"/><span> HOME</span></menu-item>
<menu-item name="home" key="menu-index"><common-icon type="md-home"/><span>首页</span></menu-item>
<template v-for="item in menuList">
<template v-if="item.children && item.children.length === 1">
<side-menu-item v-if="showChildren(item)" :key="`menu-${item.name}`" :parent-item="item"></side-menu-item>
@ -112,4 +112,11 @@ export default {
</script>
<style lang="less">
@import './side-menu.less';
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu):hover, .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu):hover{
background: #2d8cf0 !important;
}
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu) {
color: #fff !important;
}
</style>

8
src/index.less

@ -1,8 +1,10 @@
@import '~view-design/src/styles/index.less';
@menu-dark-title: #17449e;
@menu-dark-active-bg: #929db9;
@layout-sider-background: #28344d;
@menu-dark-active-bg: #17449e;
@layout-sider-background: #17449e;
// @menu-dark-active-bg: #929db9;
// @layout-sider-background: #28344d;
.margin-loop (@i) when (@i > 0) {
.margin-top-@{i} {
@ -26,4 +28,4 @@
}
@primary-color: #2552ac;
// @primary-color: #2552ac;

5
src/view/customer/exptuser.vue

@ -5,12 +5,13 @@
<Col span="24">
<Card>
<!-- 用户列表 -->
<div>
<!-- <div>
<Table :loading="listLoading" :columns="columnsList" :data="tableData" stripe disabled-hover></Table>
</div>
<div class="margin-top-15" style="text-align: center">
<Page :total="tableShow.listCount" :current="tableShow.currentPage" :page-size="tableShow.pageSize" @on-change="changePage" @on-page-size-change="changeSize" show-elevator show-sizer show-total></Page>
</div>
</div> -->
<div>0</div>
</Card>
</Col>
</Row>

13
src/view/customer/wxulist.vue

@ -60,12 +60,19 @@ export default {
width: 65,
align: 'center'
},
{
title: '手机号码',
align: 'center',
key: 'phone',
width: 260
},
{
title: 'openid',
align: 'openid',
key: 'openid',
minWidth: 280
},
{
title: '头像',
align: 'center',
@ -92,12 +99,6 @@ export default {
key: 'create_time',
width: 310
},
{
title: '手机号码',
align: 'center',
key: 'phone',
width: 260
},
{
title: '状态',
align: 'center',

104
src/view/invoice/reqlist.vue

@ -3,7 +3,7 @@
<!-- 查询条件 -->
<Row>
<Col span="24">
<Card class="margin-bottom-10">
<Card class="margin-bottom-10">
<Form inline>
<FormItem class="margin-bottom-0">
<Input v-model="phone" @on-clear="phone_clear" clearable placeholder="输入手机号码查询"></Input>
@ -12,15 +12,24 @@
<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>
<Select v-model="status" clearable style="width:200px" @on-clear="status_clear" placeholder="请选择开票状态">
<Option v-for="item in cityList1" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
</FormItem>
<FormItem class="margin-bottom-0">
<!-- <DatePicker type="date" placement="bottom-end" :options="options1" @on-change="handleChange" placeholder="请选择时间段" style="width: 200px"></DatePicker> -->
<DatePicker type="daterange" placement="bottom-end" :options="options1" @on-change="handleChange" placeholder="请选择时间段" style="width: 200px"></DatePicker>
</FormItem>
<FormItem class="margin-bottom-0">
<Select v-model="head_type" clearable style="width:200px" @on-clear="merge_clear" placeholder="请选择抬头类型">
<Option v-for="(item,index) in cityList" :value="item.value" :key="index">{{ 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> -->
<FormItem class="margin-bottom-0">
<Button type="primary" @click="search">{{ $t('find_button') }}/{{ $t('refresh_button') }}</Button>
</FormItem>
@ -46,7 +55,7 @@
</template>
<script>
import { getinvoiceList, getIndexData } from '@/api/invoice'
import { getinvoiceList, getIndexData, getcancel } from '@/api/invoice'
export default {
name: 'reqlist',
data () {
@ -58,28 +67,76 @@ export default {
listLoading: false,
phone: '',
pucode_id: '',
head_type: '',
status: '',
project_id: '',
merge_id: '',
cityList: [{ value: '0', label: '不合并' }, { value: '1', label: '合并' }],
start_time: '',
end_time: '',
cityList: [{ value: '0', label: '单位' }, { value: '1', label: '个人' }, { value: 'null', label: '全部' }],
cityList1: [{ value: '3', label: '已开票' }, { value: '0', label: '未开票' }, { value: '4', label: '已作废' }, { value: 'null', label: '全部' }],
projectList: [],
columnsList: [
{ title: 'id', align: 'center', key: 'id', minWidth: 80 },
{ title: '创建时间', align: 'center', key: 'create_time', width: 110 },
{ 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: '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: 'expire_time', width: 100 },
{ title: '开票时间', align: 'center', key: 'issuance_time', width: 110 },
{ title: '作废时间', align: 'center', key: 'cancel_time', width: 110 }
{ title: '作废时间', align: 'center', key: 'cancel_time', width: 110 },
{
title: '操作',
key: 'action',
fixed: 'right',
width: 80,
render: (h, params) => {
return h('div', [
h('Button', {
props: {
type: 'error',
size: 'small'
},
on: {
click: () => {
if (params.row.status === '已开票') {
this.$Message.error('已开票,无法作废')
} else {
getcancel({ id: params.row.id }).then(response => {
if (response.data.code === 1) {
this.$Message.success('作废成功')
this.getinvoiceList()
}
})
}
}
}
}, '作废')
])
}
}
]
}
},
computed: {
options1 () {
return {
// date1970
disabledDate: date => {
let startDate = new Date('2006-11-01').valueOf()
let endTime = new Date().valueOf()
// ture
return date && date.valueOf() > endTime || date.valueOf() < startDate
}
}
}
},
created () {
this.getinvoiceList()
this.getIndexData()
@ -88,7 +145,7 @@ export default {
window.addEventListener('keydown', this.handleKeyDown)
},
beforeDestroy () {
//
//
window.removeEventListener('keydown', this.handleKeyDown)
},
methods: {
@ -103,10 +160,18 @@ export default {
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 : ''
pucode: this.pucode_id,
status: this.status ? +this.status : '',
start_time: this.start_time,
end_time: this.end_time,
head_type: this.head_type ? +this.head_type : ''
}
if (isNaN(data.status)) {
data.status = ''
}
if (isNaN(data.head_type)) {
data.head_type = ''
}
this.listLoading = true
getinvoiceList(data).then(response => {
@ -122,7 +187,10 @@ export default {
})
},
merge_clear () {
this.merge_id = ''
this.head_type = ''
},
status_clear () {
this.status = ''
},
project_clear () {
this.project_id = ''
@ -149,6 +217,10 @@ export default {
changeSize (size) {
this.size = size
this.getinvoiceList()
},
handleChange (data) {
this.start_time = data[0]
this.end_time = data[1]
}
}
}

10
src/view/login/login.vue

@ -9,16 +9,18 @@
<div class="form-con">
<Form ref="loginForm" :model="form" :rules="rules">
<FormItem prop="username">
<Input v-model="form.username" placeholder="请使用微信/QQ登录">
<Input v-model="form.username" placeholder="请输入账号">
<span slot="prepend">
<Icon :size="16" type="ios-person"></Icon>
<!-- <Icon :size="16" type="ios-person"></Icon> -->
账号
</span>
</Input>
</FormItem>
<FormItem prop="password">
<Input type="password" v-model="form.password" placeholder="请使用微信/QQ登录">
<Input type="password" v-model="form.password" placeholder="请输入密码">
<span slot="prepend">
<Icon :size="14" type="md-lock"></Icon>
<!-- <Icon :size="14" type="md-lock"></Icon> -->
密码
</span>
</Input>
</FormItem>

235
src/view/report/index.vue

@ -0,0 +1,235 @@
<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">
<Select v-model="status" clearable style="width:200px" @on-clear="status_clear" placeholder="请选择结报状态">
<Option v-for="item in cityList1" :value="item.value" :key="item.value">{{ item.label }}</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>
<Modal v-model="modalSetting.show" width="740" :styles="{top: '30px'}" @on-visible-change="doCancel">
<p slot="header" style="color:#2d8cf0">
<Icon type="md-alert"></Icon>
<!-- <span>编辑{{formItem.name}}</span> -->
</p>
<div style="height: 540px;overflow-y: auto;">
<Table :loading="listLoading1" :columns="columnsList1" :data="tableData1" stripe disabled-hover></Table>
</div>
<div class="margin-top-15" style="text-align: center">
<Page :total="listCount1" :current="page1" :page-size="size1" @on-change="changePage1" @on-page-size-change="changeSize1" :page-size-opts="[10,20,30,40,50,60,70,80,90,100]" show-elevator show-sizer show-total></Page>
</div>
<div slot="footer">
<Button type="text" @click="cancel" class="margin-right-10">取消</Button>
<Button type="primary" @click="submit" :loading="modalSetting.loading">结报</Button>
</div>
</Modal>
</div>
</template>
<script>
import { getindex, getreport, getview } from '@/api/report'
export default {
name: 'reqlist',
data () {
return {
size: 10,
page: 1,
size1: 10,
page1: 1,
listCount: 0,
listCount1: 0,
tableData: [],
tableData1: [],
listLoading: false,
listLoading1: false,
phone: '',
status: '',
ids: 0,
frd_ids: 0,
cityList1: [{ value: '3', label: '已结报' }, { value: '0', label: '未结报' }, { value: 'null', label: '全部' }],
modalSetting: {
show: false,
loading: false,
index: 0
},
columnsList: [
{ title: '序号', align: 'center', type: 'index', width: 200 },
{ title: '日期', align: 'center', key: 'report_date', width: 400 },
// { title: '', align: 'center', key: 'status', width: 328 },
{ title: '状态描述', align: 'center', key: 'status_str', width: 400 },
{ title: '结报金额', align: 'center', key: 'amount_sum', width: 400 },
{
title: '操作',
key: 'action',
align: 'center',
fixed: 'right',
width: 190,
render: (h, params) => {
return h('div', [
// editButton(this, h, params.row, params.index)
h('Button', {
props: {
type: 'primary',
size: 'small'
},
on: {
'click': () => {
this.page1 = 1
this.size1 = 10
this.ids = params.row.id
this.getview()
}
}
}, '详情')
])
}
}
],
columnsList1: [
{ title: '序号', align: 'center', type: 'index', width: 100 },
{ title: '申报批次号', align: 'center', key: 'sbpch', width: 400 },
{ title: '应代征税额', align: 'center', key: 'ydzse', width: 200 }
]
}
},
created () {
this.getinvoiceList()
},
// 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,
expire_time: ''
}
this.listLoading = true
getindex(data).then(response => {
this.tableData = response.data.data.list
this.listCount = response.data.data.total
this.listLoading = false
})
},
//
getview () {
this.listLoading1 = true
getview({ id: this.ids, page: this.page1, size: this.size1 }).then(response => {
this.tableData1 = response.data.data.list
this.listCount1 = response.data.data.total
this.frd_ids = response.data.data.list[0].frd_id
this.listLoading1 = false
})
this.modalSetting.show = true
},
//
submit () {
getreport({ frd_id: this.frd_ids }).then(response => {
if (response.data.code === 1) {
this.$Message.success('结报成功')
}
})
},
status_clear () {
this.status = ''
},
phone_clear () {
this.phone = ''
},
cancel () {
this.modalSetting.show = false
},
doCancel (data) {
this.modalSetting.loading = false
},
search () {
this.page = 1
this.getinvoiceList()
},
//
changePage (page) {
this.page = page
this.getinvoiceList()
},
//
changeSize (size) {
this.size = size
this.getinvoiceList()
},
//
changePage1 (page) {
this.page1 = page
this.getview()
},
//
changeSize1 (size) {
this.size1 = size
this.getview()
}
}
}
</script>
<style scoped>
/* 自定义整个滚动条 */
::-webkit-scrollbar {
width: 5px; /* 设置滚动条的宽度 */
}
/* 自定义滚动条轨道 */
::-webkit-scrollbar-track {
background: #f1f1f1; /* 设置轨道的背景颜色 */
}
/* 自定义滚动条的滑块(thumb) */
::-webkit-scrollbar-thumb {
background: #ccc; /* 设置滑块的背景颜色 */
}
/* 当滑块悬停或活动时,可以添加更多样式 */
::-webkit-scrollbar-thumb:hover {
background: #999; /* 设置滑块在悬停状态下的背景颜色 */
}
</style>

73
src/view/single-page/home/example.vue

@ -4,17 +4,27 @@
<script>
import echarts from 'echarts'
import { getFinalReportData } from '@/api/home'
import { on, off } from '@/libs/tools'
export default {
name: 'serviceRequests',
data () {
return {
dom: null
dom: null,
data: [],
date: []
}
},
created () {
getFinalReportData().then(response => {
this.data = response.data.data.data
this.date = response.data.data.date
this.initChart()
})
},
mounted () {
this.$nextTick(() => {
this.initChart()
// this.initChart()
on(window, 'resize', this.resize)
})
},
@ -46,13 +56,13 @@ export default {
xAxis: [{
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
data: this.date
}],
yAxis: [{
type: 'value'
}],
series: [{
name: '运营商/网络服务',
name: '当月结报金额合计',
type: 'line',
stack: '总量',
areaStyle: {
@ -60,59 +70,8 @@ export default {
color: '#2d8cf0'
}
},
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '银行/证券',
type: 'line',
stack: '总量',
areaStyle: {
normal: {
color: '#10A6FF'
}
},
data: [257, 358, 278, 234, 290, 330, 310]
},
{
name: '游戏/视频',
type: 'line',
stack: '总量',
areaStyle: {
normal: {
color: '#0C17A6'
}
},
data: [379, 268, 354, 269, 310, 478, 358]
},
{
name: '餐饮/外卖',
type: 'line',
stack: '总量',
areaStyle: {
normal: {
color: '#4608A6'
}
},
data: [320, 332, 301, 334, 390, 330, 320]
},
{
name: '快递/电商',
type: 'line',
stack: '总量',
label: {
normal: {
show: true,
position: 'top'
}
},
areaStyle: {
normal: {
color: '#398DBF'
}
},
data: [820, 645, 546, 745, 872, 624, 258]
}
]
data: this.data
}]
}
if (!this.dom) {
this.dom = echarts.init(this.$refs.dom)

2
src/view/single-page/home/home.vue

@ -59,7 +59,7 @@ export default {
// {title: '',icon: 'md-chatbubbles',count: 12,color: '#E46CBB'},
// {title: '',icon: 'md-map',count: 14,color: '#9A66E4'}
],
icons: ['ios-globe', 'md-person', 'md-help-circle', 'md-share', 'md-chatbubbles', 'md-map'],
icons: ['ios-globe', 'md-person', 'logo-yen', 'md-share', 'md-chatbubbles', 'md-map'],
colors: ['#2d8cf0', '#19be6b', '#ff9900', '#ed3f14', '#E46CBB', '#9A66E4'],
//
pieData: [],

Loading…
Cancel
Save