bug: 🐛 导出
All checks were successful
Release / lint (push) Successful in 52s
Release / Release (push) Successful in 1m46s

This commit is contained in:
my_ong 2025-03-25 20:37:36 +08:00
parent 5a843344ee
commit 208e58c1f6
6 changed files with 41 additions and 14 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -18,7 +18,7 @@
<a-col :span="8">
<a-input-search
v-model:value="searchKey"
:placeholder="`名称/编码`"
:placeholder="`名称/编码/型号`"
allow-clear
enter-button
@search="loadData()"
@ -83,9 +83,16 @@
//
const downloadData = () => {
// excel
const url = `${http.prefix}/apply/download-excel?applyType=1
&type=${typeVal.value}&key=${searchKey.value}`
// URLSearchParams
const params = new URLSearchParams()
if (typeVal.value) {
params.append('type', typeVal.value)
}
if (searchKey.value) {
params.append('key', searchKey.value)
}
params.append('applyType', '1')
const url = `${http.prefix}/apply/download-excel?${params.toString()}`
window.open(url)
}
//
@ -109,7 +116,7 @@
},
{
title: '物料型号',
dataIndex: 'typeName',
dataIndex: 'spec',
},
{
title: '入库类型',

View File

@ -18,7 +18,7 @@
<a-col :span="8">
<a-input-search
v-model:value="searchKey"
placeholder="名称/编码"
placeholder="名称/编码/型号"
allow-clear
enter-button
width="100%"
@ -86,8 +86,16 @@
//
const downloadData = () => {
// excel
const url = `${http.prefix}/material/download-excel?key=${searchKey.value}&type=${typeVal.value}`
// URLSearchParams
const params = new URLSearchParams()
if (typeVal.value) {
params.append('type', typeVal.value)
}
if (searchKey.value) {
params.append('key', searchKey.value)
}
const url = `${http.prefix}/material/download-excel?${params.toString()}`
window.open(url)
}

View File

@ -18,7 +18,7 @@
<a-col :span="8">
<a-input-search
v-model:value="searchKey"
:placeholder="`名称/编码`"
:placeholder="`名称/编码/型号`"
allow-clear
enter-button
@search="loadData()"
@ -96,7 +96,7 @@
import { http } from '@/settings/http'
import { TreeDataNode } from 'ant-design-vue/es/vc-tree-select/interface'
const searchKey = ref('')
const searchKey = ref()
const pagedata = ref<IPage<material.ApplyDTO>>()
const loading = ref(false)
const typeVal = ref<string>() //
@ -124,8 +124,16 @@
//
const downloadData = () => {
// excel
const url = `${http.prefix}/apply/download-excel?applyType=3&type=${typeVal.value}&key=${searchKey.value}`
// URLSearchParams
const params = new URLSearchParams()
if (typeVal.value) {
params.append('type', typeVal.value)
}
if (searchKey.value) {
params.append('key', searchKey.value)
}
params.append('applyType', '3')
const url = `${http.prefix}/apply/download-excel?${params.toString()}`
window.open(url)
}
@ -148,6 +156,10 @@
title: '物料编码',
dataIndex: 'code',
},
{
title: '物料型号',
dataIndex: 'spec',
},
{
title: '出库类型',
dataIndex: 'applyTypeInfo',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long