|
@@ -1085,6 +1085,9 @@ export default {
|
|
|
if (record.unitPrice != undefined && record.unitPrice != ""){
|
|
|
record.totalPrice = (record.unitPrice*record.total).toFixed(2);
|
|
|
}
|
|
|
+ if (record.netWeight != undefined && record.netWeight != ""&&record.boxNumber!==undefined&&record.boxNumber!==''){
|
|
|
+ record.totalNetWeight = (record.netWeight*record.boxNumber).toFixed(2);
|
|
|
+ }
|
|
|
if (record.grossWeight != "" && record.grossWeight != undefined){
|
|
|
record.totalGrossWeight = (record.grossWeight * record.boxNumber).toFixed(2);
|
|
|
}
|
|
@@ -1110,7 +1113,7 @@ export default {
|
|
|
setHeadCalField(){
|
|
|
var headData = JSON.parse(JSON.stringify(this.addAdpacking));
|
|
|
var totalBoxes = 0;
|
|
|
- var totalNetWeight = 0;
|
|
|
+ var totalNetWeight1 = 0;
|
|
|
var totalGrossWeight = 0;
|
|
|
var totalVolume = 0;
|
|
|
var totalPrice = 0;
|
|
@@ -1119,8 +1122,8 @@ export default {
|
|
|
for (var i=0; i<headData.syPreAssembledPackingListItemList.length; i++){
|
|
|
var rowData = headData.syPreAssembledPackingListItemList[i];
|
|
|
totalBoxes += rowData.boxNumber;
|
|
|
- if (rowData.totalNetWeight != undefined && rowData.totalNetWeight != ""){
|
|
|
- totalNetWeight += rowData.totalNetWeight*1;
|
|
|
+ if (rowData.totalNetWeight != undefined && rowData.totalNetWeight != ""&&rowData.totalNetWeight != null){
|
|
|
+ totalNetWeight1 += rowData.totalNetWeight*1;
|
|
|
}
|
|
|
if (rowData.totalGrossWeight != undefined && rowData.totalGrossWeight != ""){
|
|
|
totalGrossWeight += rowData.totalGrossWeight*1;
|
|
@@ -1137,7 +1140,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
headData.totalBoxes =Number(totalBoxes).toFixed(0);
|
|
|
- headData.totalNetWeight = Number(totalNetWeight).toFixed(2);
|
|
|
+ headData.totalNetWeight = Number(totalNetWeight1).toFixed(2);
|
|
|
headData.totalGrossWeight = Number(totalGrossWeight).toFixed(2);
|
|
|
headData.totalVolume = totalVolume.toFixed(3);
|
|
|
headData.totalPrice = totalPrice.toFixed(2);
|