refactor(wms/report): 移除actionIds相关导出逻辑
This commit is contained in:
@@ -243,15 +243,11 @@ export default {
|
|||||||
coilIds() {
|
coilIds() {
|
||||||
return this.list.map(item => item.coilId).join(',')
|
return this.list.map(item => item.coilId).join(',')
|
||||||
},
|
},
|
||||||
actionIds() {
|
|
||||||
const ids = this.list.map(item => item.actionId).filter(id => id)
|
|
||||||
return ids.length ? ids.join(',') : ''
|
|
||||||
},
|
|
||||||
exportIdParams() {
|
exportIdParams() {
|
||||||
return this.actionIds ? { actionIds: this.actionIds } : { coilIds: this.coilIds }
|
return { coilIds: this.coilIds }
|
||||||
},
|
},
|
||||||
hasExportData() {
|
hasExportData() {
|
||||||
return !!(this.coilIds || this.actionIds)
|
return !!this.coilIds
|
||||||
},
|
},
|
||||||
exportQueryParams() {
|
exportQueryParams() {
|
||||||
const { pageNum, pageSize, ...filters } = this.queryParams
|
const { pageNum, pageSize, ...filters } = this.queryParams
|
||||||
|
|||||||
@@ -970,12 +970,10 @@ export default {
|
|||||||
handleCustomExport(orderedColumns) {
|
handleCustomExport(orderedColumns) {
|
||||||
const { pageNum, pageSize, startTime, endTime, ...filters } = this.queryParams
|
const { pageNum, pageSize, startTime, endTime, ...filters } = this.queryParams
|
||||||
const type = this.customExportType
|
const type = this.customExportType
|
||||||
const ids = type === 'loss'
|
const list = type === 'loss' ? this.lossList : this.outList
|
||||||
? { actionIds: this.actionIds }
|
|
||||||
: { coilIds: this.outList.map(item => item.coilId).join(',') }
|
|
||||||
this.download('wms/materialCoil/exportCustomOrdered', {
|
this.download('wms/materialCoil/exportCustomOrdered', {
|
||||||
...filters,
|
...filters,
|
||||||
...ids,
|
coilIds: list.map(item => item.coilId).join(','),
|
||||||
columnsOrdered: orderedColumns.join(','),
|
columnsOrdered: orderedColumns.join(','),
|
||||||
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user