fix(wms): 修复规格分割可能导致的错误并增加分页大小
处理规格分割时可能出现的空值问题,使用可选链操作符和默认值 同时增加多个报表页面的分页大小限制
This commit is contained in:
@@ -292,9 +292,9 @@ import { getCoilTagPrintType } from '@/views/wms/coil/js/coilPrint'
|
||||
|
||||
export default {
|
||||
name: 'DoPage',
|
||||
dicts: ['action_type', 'coil_abnormal_code', 'coil_abnormal_position', 'coil_abnormal_degree', 'coil_quality_status'],
|
||||
dicts: ['action_type', 'coil_abnormal_code', 'coil_abnormal_position', 'coil_abnormal_degree', 'coil_quality_status', 'coil_business_purpose'],
|
||||
props: {
|
||||
label: {
|
||||
label: {
|
||||
type: String,
|
||||
default: () => '酸连轧工序'
|
||||
},
|
||||
@@ -314,7 +314,6 @@ export default {
|
||||
RawMaterialSelect,
|
||||
CoilTraceResult,
|
||||
},
|
||||
dicts: ['coil_business_purpose'],
|
||||
data() {
|
||||
return {
|
||||
traceOpen: false,
|
||||
|
||||
@@ -118,7 +118,7 @@ export default {
|
||||
list: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
pageSize: 99999,
|
||||
status: 1,
|
||||
dataType: 1,
|
||||
byExportTimeStart: startTime,
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
}).then(res => {
|
||||
this.list = res.rows.map(item => {
|
||||
// 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度
|
||||
const [thickness, width] = item.specification.split('*')
|
||||
const [thickness, width] = item.specification?.split('*') || []
|
||||
return {
|
||||
...item,
|
||||
computedThickness: parseFloat(thickness),
|
||||
|
||||
@@ -256,7 +256,7 @@ export default {
|
||||
]);
|
||||
this.lossList = lossRes.rows.map(item => {
|
||||
// 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度
|
||||
const [thickness, width] = item.specification.split('*')
|
||||
const [thickness, width] = item.specification?.split('*') || []
|
||||
return {
|
||||
...item,
|
||||
computedThickness: parseFloat(thickness),
|
||||
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
// actionStatus: 2,
|
||||
warehouseId: this.queryParams.planId,
|
||||
actionType: 401,
|
||||
pageSize: 9999,
|
||||
pageSize: 99999,
|
||||
pageNum: 1,
|
||||
startTime: this.queryParams.byCreateTimeStart,
|
||||
endTime: this.queryParams.byCreateTimeEnd,
|
||||
@@ -209,7 +209,7 @@ export default {
|
||||
}).then(res => {
|
||||
this.list = res.rows.map(item => {
|
||||
// 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度
|
||||
const [thickness, width] = item.specification.split('*')
|
||||
const [thickness, width] = item.specification?.split('*') || []
|
||||
return {
|
||||
...item,
|
||||
computedThickness: parseFloat(thickness),
|
||||
|
||||
@@ -267,7 +267,7 @@ export default {
|
||||
});
|
||||
this.outList = outRes.rows.map(item => {
|
||||
// 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度
|
||||
const [thickness, width] = item.specification.split('*')
|
||||
const [thickness, width] = item.specification?.split('*') || []
|
||||
return {
|
||||
...item,
|
||||
computedThickness: parseFloat(thickness),
|
||||
|
||||
Reference in New Issue
Block a user