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

导出全部信息

parent 52e26587
......@@ -8,7 +8,8 @@ import Qs from 'qs'
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
* 7. 导出全部信息
* 8.审批
*/
// 1. 查询列表
......@@ -58,7 +59,7 @@ export function delIncomeInspectInfo(businessId) {
})
}
// 6. 导出
// 6. 导出主表信息
export function exportIncomeInspectInfo(query) {
return request({
url: '/incomeinspectinfo/export',
......@@ -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) {
return request({
url: '/incomeinspectinfo/approve',
......
......@@ -86,6 +86,7 @@
v-model="dateRange"
size="small"
style="width: 200px"
@change="handleTimeChange"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
......@@ -335,7 +336,9 @@ export default {
wgCq: undefined,
wgFf: undefined,
wgTf: undefined,
flag: ''
flag: '',
beginTime: '',
endTime: ''
},
// 表单参数
form: {},
......@@ -349,13 +352,39 @@ export default {
return commonField
}
},
created() {
getInfo().then(res => {
this.loginId = res.data.user.businessId
// 路由跳转,是存储页面的值
beforeRouteLeave(to, from, next) {
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() // 列表查询
},
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) {
const id = row.businessId
......@@ -417,9 +446,11 @@ export default {
/** 查询列表 */
getList() {
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 => {
// console.log(response.rows)
this.incomeInspectInfoList = response.rows
this.total = response.total
this.loading = false
......@@ -555,12 +586,6 @@ export default {
}
this.handleQuery()
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加'
},
/** 修改按钮操作 */
handleUpdate(row) {
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