fix(wms报表): 修复fetchLossList参数传递及规格分割处理
修复fetchLossList函数未正确处理传入的actionTypes参数问题,并添加时间参数。同时处理规格分割时的空值情况,避免报错。
This commit is contained in:
1494
klp-ui/src/views/wms/coil/do/correntAll.vue
Normal file
1494
klp-ui/src/views/wms/coil/do/correntAll.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@ export async function fetchOutputList(queryParams) {
|
||||
(a, b) => new Date(b.createTime) - new Date(a.createTime)
|
||||
).map(item => {
|
||||
// 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度
|
||||
const [thickness, width] = item.specification.split('*')
|
||||
const [thickness, width] = item.specification?.split('*') || [0, 0]
|
||||
return {
|
||||
...item,
|
||||
computedThickness: parseFloat(thickness),
|
||||
@@ -36,12 +36,14 @@ export async function fetchOutputList(queryParams) {
|
||||
return sortedList
|
||||
}
|
||||
|
||||
export async function fetchLossList(queryParams) {
|
||||
const resultList = await Promise.all(this.actionTypes.map(actionType => {
|
||||
export async function fetchLossList(actionTypes, queryParams) {
|
||||
const resultList = await Promise.all(actionTypes.map(actionType => {
|
||||
return listPendingAction({
|
||||
...queryParams,
|
||||
actionStatus: 2,
|
||||
actionType,
|
||||
startTime: queryParams.byCreateTimeStart,
|
||||
endTime: queryParams.byCreateTimeEnd,
|
||||
pageSize: 99999,
|
||||
pageNum: 1,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user