Add computed properties for costs in DestinationMassHandlingCostRow, refine tariff rate message, and enhance description handling logic in MaterialFastExcelMapper
This commit is contained in:
parent
aa6b2db962
commit
607c057beb
3 changed files with 35 additions and 5 deletions
|
|
@ -29,7 +29,7 @@
|
|||
<div>
|
||||
<div>Automatic tariff rate determination was ambiguous</div>
|
||||
<div class="tariff-rate-info-text">
|
||||
Please contact a customs expert to obtain correct HS code and tariff rate.
|
||||
Please correct tariff rate or continue with default value.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<div class="text-container" :class="{disabled: disabled}">
|
||||
<input class="input-field"
|
||||
v-model="row.handling_costs"
|
||||
v-model="handling"
|
||||
@blur="validateHandlingCost($event, 'handling')"
|
||||
autocomplete="off"
|
||||
:disabled="disabled"/>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
<div class="text-container" :class="{disabled: disabled}">
|
||||
<input class="input-field"
|
||||
v-model="row.repackaging_costs"
|
||||
v-model="repackaging"
|
||||
@blur="validateHandlingCost($event, 'repackaging')"
|
||||
autocomplete="off"
|
||||
:disabled="disabled"/>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<div class="text-container" :class="{disabled: disabled}">
|
||||
<input class="input-field"
|
||||
v-model="row.disposal_costs"
|
||||
v-model="disposal"
|
||||
@blur="validateHandlingCost($event, 'disposal')"
|
||||
autocomplete="off"
|
||||
:disabled="disabled"/>
|
||||
|
|
@ -79,6 +79,33 @@ export default {
|
|||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
repackaging: {
|
||||
get() {
|
||||
return this.row.repackaging_costs?.toFixed(2) ?? '';
|
||||
},
|
||||
set(value) {
|
||||
this.row.repackaging_costs && (this.row.repackaging_costs = value);
|
||||
},
|
||||
},
|
||||
handling: {
|
||||
get() {
|
||||
return this.row.handling_costs?.toFixed(2) ?? '';
|
||||
},
|
||||
set(value) {
|
||||
this.row.handling_costs && (this.row.handling_costs = value);
|
||||
},
|
||||
},
|
||||
disposal: {
|
||||
get() {
|
||||
return this.row.disposal_costs?.toFixed(2) ?? '';
|
||||
},
|
||||
set(value) {
|
||||
this.row.disposal_costs && (this.row.disposal_costs = value);
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleMouseDown(event) {
|
||||
if (event.shiftKey || event.ctrlKey) {
|
||||
|
|
|
|||
|
|
@ -167,10 +167,13 @@ public class MaterialFastExcelMapper {
|
|||
try {
|
||||
// Extract and validate data
|
||||
String partNumber = getCellValue(row, MaterialHeader.PART_NUMBER.ordinal(), rowNumber);
|
||||
String description = getCellValue(row, MaterialHeader.DESCRIPTION.ordinal(), rowNumber);
|
||||
String description = getCellValueAllowEmpty(row, MaterialHeader.DESCRIPTION.ordinal(), rowNumber);
|
||||
String hsCode = getCellValueAllowEmpty(row, MaterialHeader.HS_CODE.ordinal(), rowNumber);
|
||||
String operation = getCellValue(row, MaterialHeader.OPERATION.ordinal(), rowNumber);
|
||||
|
||||
if(description == null || description.isEmpty())
|
||||
description = partNumber;
|
||||
|
||||
// Validate lengths
|
||||
validateLength(partNumber, 0, 12, "Part Number", rowNumber);
|
||||
if (hsCode != null)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue