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