Browse Source

修改

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
ce7968a06f
  1. 21
      src/api/wms/purchaseprice/index.ts
  2. 21
      src/api/wms/supplieritem/index.ts
  3. 11
      src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue
  4. 11
      src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue

21
src/api/wms/purchaseprice/index.ts

@ -22,6 +22,17 @@ export const getPurchasepricePage = async (params) => {
}
}
// 查询采购价格单列表
export const getPurchasepricePageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/purchaseprice/seniorSCP', data })
} else {
return await request.get({ url: `/wms/purchaseprice/pageSCP`, params })
}
}
// 查询采购价格单详情
export const getPurchaseprice = async (id: number) => {
return await request.get({ url: `/wms/purchaseprice/get?id=` + id })
@ -52,6 +63,16 @@ export const exportPurchaseprice = async (params) => {
}
}
// 导出采购价格单 Excel
export const exportPurchasepriceSCP = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchaseprice/export-excel-senior-SCP`, data })
} else {
return await request.download({ url: `/wms/purchaseprice/export-excel-SCP`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseprice/get-import-template' })

21
src/api/wms/supplieritem/index.ts

@ -31,6 +31,17 @@ export const getSupplieritemPage = async (params) => {
}
}
// 查询供应商物料列表
export const getSupplieritemPageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/supplieritem/seniorSCP', data })
} else {
return await request.get({ url: `/wms/supplieritem/pageSCP`, params })
}
}
// 查询供应商物料详情
export const getSupplieritem = async (id: number) => {
return await request.get({ url: `/wms/supplieritem/get?id=` + id })
@ -61,6 +72,16 @@ export const exportSupplieritem = async (params) => {
}
}
// 导出供应商物料 Excel
export const exportSupplieritemSCP = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/supplieritem/export-excel-senior-SCP`, data })
} else {
return await request.download({ url: `/wms/supplieritem/export-excel-SCP`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplieritem/get-import-template' })

11
src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue

@ -84,7 +84,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: PurchasepriceApi.getPurchasepricePage //
getListApi: routeName.value.includes('SCP')?PurchasepriceApi.getPurchasepricePageSCP:PurchasepriceApi.getPurchasepricePage //
})
//
@ -238,8 +238,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasepriceApi.exportPurchaseprice(tableObject.params)
download.excel(data, `${t('ts.采购价格单')}.xlsx`)
if(routeName.value.includes('SCP')){
const data = await PurchasepriceApi.exportPurchasepriceSCP(tableObject.params)
download.excel(data, `${t('ts.采购价格单')}.xlsx`)
}else{
const data = await PurchasepriceApi.exportPurchaseprice(tableObject.params)
download.excel(data, `${t('ts.采购价格单')}.xlsx`)
}
} catch {
} finally {
exportLoading.value = false

11
src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue

@ -83,7 +83,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: SupplieritemApi.getSupplieritemPage //
getListApi: routeName.value.includes('SCP')?SupplieritemApi.getSupplieritemPageSCP:SupplieritemApi.getSupplieritemPage //
})
//
@ -237,8 +237,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplieritemApi.exportSupplieritem(tableObject.params)
download.excel(data, `${t('ts.供应商物料')}.xlsx`)
if(routeName.value.includes('SCP')){
const data = await SupplieritemApi.exportSupplieritemSCP(tableObject.params)
download.excel(data, `${t('ts.供应商物料')}.xlsx`)
}else{
const data = await SupplieritemApi.exportSupplieritem(tableObject.params)
download.excel(data, `${t('ts.供应商物料')}.xlsx`)
}
} catch {
} finally {
exportLoading.value = false

Loading…
Cancel
Save