Browse Source

修改

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
47b23566d5
  1. 23
      src/api/wms/supplier/index.ts
  2. 7
      src/views/wms/basicDataManage/supplierManage/supplier/index.vue

23
src/api/wms/supplier/index.ts

@ -31,6 +31,18 @@ export const getSupplierPage = async (params) => {
return await request.get({ url: `/wms/supplier/page`, params }) return await request.get({ url: `/wms/supplier/page`, params })
} }
} }
// 查询供应商列表分页
export const getSupplierPageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/supplier/seniorSCP', data })
} else {
return await request.get({ url: `/wms/supplier/pageSCP`, params })
}
}
// 查询供应商列表 // 查询供应商列表
export const getSupplierList = async (params) => { export const getSupplierList = async (params) => {
return await request.get({ url: `/wms/supplier/list`, params }) return await request.get({ url: `/wms/supplier/list`, params })
@ -66,6 +78,17 @@ export const exportSupplier = async (params) => {
} }
} }
// 导出供应商 Excel
export const exportSupplierSCP = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/supplier/export-excel-senior-SCP`, data })
} else {
return await request.download({ url: `/wms/supplier/export-excel-SCP`, params })
}
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplier/get-import-template' }) return request.download({ url: '/wms/supplier/get-import-template' })

7
src/views/wms/basicDataManage/supplierManage/supplier/index.vue

@ -82,7 +82,7 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: SupplierApi.getSupplierPage // getListApi: routeName.value.includes('SCP')?SupplierApi.getSupplierPageSCP:SupplierApi.getSupplierPage //
}) })
// //
@ -220,8 +220,13 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
if(routeName.value.includes('SCP')){
const data = await SupplierApi.exportSupplier(tableObject.params) const data = await SupplierApi.exportSupplier(tableObject.params)
download.excel(data, `${t('ts.供应商')}.xlsx`) download.excel(data, `${t('ts.供应商')}.xlsx`)
}else{
const data = await SupplierApi.exportSupplierSCP(tableObject.params)
download.excel(data, `${t('ts.供应商')}.xlsx`)
}
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

Loading…
Cancel
Save