13 changed files with 433 additions and 90 deletions
@ -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 |
|||
}) |
|||
} |
|||
@ -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> |
|||
Loading…
Reference in new issue