@ -762,21 +762,13 @@ export default {
"Barcode" , "Quantity per container" , "Total" , "Cluster" ,
"" , "" , "" , ""
] ;
let lilstLocal = [ ]
for ( let i = 0 ; i < listCopy . length ; i ++ ) {
let item = listCopy [ i ] ;
lilstLocal . push ( {
... item ,
'Quantity to deliver' : item [ "Quantity to deliver" ] ? item [ "Quantity to deliver" ] . toFixed ( 3 ) : ""
} )
}
let lilstLocalTemp = [ ]
for ( let index = 0 ; index < this . fileData2Local . length ; index ++ ) {
let element = this . fileData2Local [ index ] ;
let findIndex = [ ]
let findAllIndex = [ ]
for ( let j = 0 ; j < lilstLocal . length ; j ++ ) {
let item = lilstLocal [ j ] ;
for ( let j = 0 ; j < listCopy . length ; j ++ ) {
let item = listCopy [ j ] ;
if ( ! item [ "isFind" ] ) {
if ( item [ "Store" ] === element [ "Store" ] && item [ "Sku" ] === element [ "Sku" ] && item [ "Description" ] === element [ "Description" ] && item [ "Quantity to deliver" ] === element [ "Quantity to deliver" ] ) {
findIndex . push ( j )
@ -790,17 +782,17 @@ export default {
findAllIndex = _ . uniq ( findAllIndex )
let exList = _ . difference ( findAllIndex , findIndex )
for ( let j = 0 ; j < findIndex . length ; j ++ ) {
let item = lilstLocal [ findIndex [ j ] ] ;
let item = listCopy [ findIndex [ j ] ] ;
lilstLocalTemp . push ( { ... item } )
item [ "isFind" ] = true
}
for ( let j = 0 ; j < exList . length ; j ++ ) {
let item = lilstLocal [ exList [ j ] ] ;
let item = listCopy [ exList [ j ] ] ;
lilstLocalTemp . push ( { ... item } )
item [ "isFind" ] = true
}
}
let extraList = _ . filter ( lilstLocal , o => ! o [ "isFind" ] )
let extraList = _ . filter ( listCopy , o => ! o [ "isFind" ] )
for ( let i = 0 ; i < extraList . length ; i ++ ) {
let element = extraList [ i ] ;
lilstLocalTemp . push ( { ... element } )
@ -828,6 +820,10 @@ export default {
cell . value = value ;
cell . font = { name : 'Arial' , size : 10 , color : { argb : '000000' } } ;
cell . alignment = { horizontal : 'center' , vertical : 'center' } ;
/ / 如 果 是 Q u a n t i t y t o d e l i v e r 的 数 据 保 留 三 位 小 数 的 货 币 格 式
if ( key === "Quantity to deliver" ) {
cell . numFmt = '#,##0.000' ;
}
}
if ( Number ( row [ "Quantity to deliver" ] ) < Number ( row [ "Quantity per container" ] ) ) {
let qpcCol = _ . findIndex ( rowKeys , o => o === "Quantity per container" )