Browse Source

线上问题:预生产收货记录和制品回收记录导出,调用公用方法区分type

hella_online_20240924
tengxiaofei 2 months ago
parent
commit
87e3f8bf35
  1. 14
      src/api/wms/productreceiptRecordMain/index.ts
  2. 13
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  3. 12
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue

14
src/api/wms/productreceiptRecordMain/index.ts

@ -86,14 +86,14 @@ export const deleteProductreceiptRecordMain = async (id: number) => {
// 导出制品收货记录主 Excel
export const exportProductreceiptRecordMain = async (params) => {
params.type = 'predict'
// params.type = 'predict'
if (params.isSearch) {
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
params.filters.push(cmd)
// const cmd = {
// 'column':'type',
// 'action':'==',
// 'value':'predict'
// }
// params.filters.push(cmd)
delete params.isSearch
const data = {...params}
return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data })

13
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -339,6 +339,19 @@ const handleExport = async () => {
//
loadStart()
const excelTitle = ref(route.meta.title)
debugger
tableObject.params.type = 'predict'
if (tableObject.params.isSearch){
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
if (!Array.isArray(tableObject.params.filters)) {
tableObject.params.filters = [];
}
tableObject.params.filters.push(cmd)
}
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {

12
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue

@ -201,6 +201,18 @@ const handleExport = async () => {
//
loadStart()
const excelTitle = ref(route.meta.title)
tableObject.params.type = 'scrap'
if (tableObject.params.isSearch){
const cmd = {
'column':'type',
'action':'==',
'value':'scrap'
}
if (!Array.isArray(tableObject.params.filters)) {
tableObject.params.filters = [];
}
tableObject.params.filters.push(cmd)
}
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {

Loading…
Cancel
Save