Commit 8ec44c3d authored by 孙浩's avatar 孙浩

导出全部信息

parent 52e26587
...@@ -8,7 +8,8 @@ import Qs from 'qs' ...@@ -8,7 +8,8 @@ import Qs from 'qs'
* 4. 修改 * 4. 修改
* 5. 逻辑删除 * 5. 逻辑删除
* 6. 导出 * 6. 导出
* * 7. 导出全部信息
* 8.审批
*/ */
// 1. 查询列表 // 1. 查询列表
...@@ -58,7 +59,7 @@ export function delIncomeInspectInfo(businessId) { ...@@ -58,7 +59,7 @@ export function delIncomeInspectInfo(businessId) {
}) })
} }
// 6. 导出 // 6. 导出主表信息
export function exportIncomeInspectInfo(query) { export function exportIncomeInspectInfo(query) {
return request({ return request({
url: '/incomeinspectinfo/export', url: '/incomeinspectinfo/export',
...@@ -68,7 +69,17 @@ export function exportIncomeInspectInfo(query) { ...@@ -68,7 +69,17 @@ export function exportIncomeInspectInfo(query) {
}) })
} }
// 7.审批 // 7. 导出全部信息
export function exportIncomeInspectDetail(query) {
return request({
url: '/incomeinspectinfo/exportDetail',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 8.审批
export function approveInformation(data) { export function approveInformation(data) {
return request({ return request({
url: '/incomeinspectinfo/approve', url: '/incomeinspectinfo/approve',
......
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
v-model="dateRange" v-model="dateRange"
size="small" size="small"
style="width: 200px" style="width: 200px"
@change="handleTimeChange"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="-" range-separator="-"
...@@ -335,7 +336,9 @@ export default { ...@@ -335,7 +336,9 @@ export default {
wgCq: undefined, wgCq: undefined,
wgFf: undefined, wgFf: undefined,
wgTf: undefined, wgTf: undefined,
flag: '' flag: '',
beginTime: '',
endTime: ''
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -349,13 +352,39 @@ export default { ...@@ -349,13 +352,39 @@ export default {
return commonField return commonField
} }
}, },
created() { // 路由跳转,是存储页面的值
getInfo().then(res => { beforeRouteLeave(to, from, next) {
this.loginId = res.data.user.businessId this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
}) })
next()
},
created() {
// 切标签保留查询条件
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters
const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
this.dateRange[0] = this.queryParams.beginTime
this.dateRange[1] = this.queryParams.endTime
}
this.getList() // 列表查询 this.getList() // 列表查询
}, },
methods: { methods: {
// 设置时间参数
handleTimeChange() {
if (!this.dateRange || this.dateRange.length === 0 || this.dateRange === '') {
this.queryParams.beginTime = ''
this.queryParams.endTime = ''
} else {
this.queryParams.beginTime = this.dateRange[0] + ' 00:00:00'
this.queryParams.endTime = this.dateRange[1] + ' 23:59:59'
}
},
/** 关闭按钮操作 */ /** 关闭按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.businessId const id = row.businessId
...@@ -417,9 +446,11 @@ export default { ...@@ -417,9 +446,11 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true this.loading = true
listIncomeInspectInfo(this.addDateTwoRange(this.queryParams, this.dateRange)).then( getInfo().then(res => {
this.loginId = res.data.user.businessId
})
listIncomeInspectInfo(this.queryParams).then(
response => { response => {
// console.log(response.rows)
this.incomeInspectInfoList = response.rows this.incomeInspectInfoList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
...@@ -555,12 +586,6 @@ export default { ...@@ -555,12 +586,6 @@ export default {
} }
this.handleQuery() this.handleQuery()
}, },
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加'
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment