This commit is contained in:
2023-04-19 15:06:25 +08:00
parent 8bf407e5f0
commit 9aba41fa2e
5 changed files with 122 additions and 9 deletions

View File

@@ -199,6 +199,16 @@
>
仓位同步
</el-button>-->
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="downdtl"
>
导出Excel
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog
@@ -353,6 +363,8 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
const defaultForm = { point_id: null, point_code: null, point_name: null, point_type: null, point_status: null, lock_type: '1', vehicle_code: null, source_id: null, remark: null, is_used: null, is_delete: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
export default {
@@ -426,6 +438,18 @@ export default {
this.getPointStatusAndTypeList(this.form.region_id, 2)
}
},
downdtl() {
if (this.currentRow !== null) {
crud.downloadLoading = true
download('/api/point/download', this.crud.query).then(result => {
debugger
downloadFile(result, '库存', 'xlsx')
crud.downloadLoading = false
}).catch(() => {
crud.downloadLoading = false
})
}
},
hand(value) {
this.crud.toQuery()
},

View File

@@ -75,4 +75,11 @@ export function sync() {
})
}
export function download() {
return request({
url: 'api/point/download',
method: 'post'
})
}
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion, changeUsed, changeLock, sync }