|
@@ -176,12 +176,12 @@ async function importExcelData(libID, sheetData) {
|
|
|
for (let row = 1; row < sheetData.length; row++) {
|
|
|
const areaName = sheetData[row][colMap.area] || '';
|
|
|
const className = sheetData[row][colMap.class] || '';
|
|
|
- const code = sheetData[row][colMap.code] || '';
|
|
|
- const name = sheetData[row][colMap.name] || '';
|
|
|
- const specs = sheetData[row][colMap.specs] || '';
|
|
|
- const unit = sheetData[row][colMap.unit] || '';
|
|
|
- const noTaxPrice = sheetData[row][colMap.noTaxPrice] || '';
|
|
|
- const taxPrice = sheetData[row][colMap.taxPrice] || '';
|
|
|
+ const code = sheetData[row][colMap.code] ? sheetData[row][colMap.code].trim() : '';
|
|
|
+ const name = sheetData[row][colMap.name] ? sheetData[row][colMap.name].trim() : '';
|
|
|
+ const specs = sheetData[row][colMap.specs] ? sheetData[row][colMap.specs].trim() : '';
|
|
|
+ const unit = sheetData[row][colMap.unit] ? sheetData[row][colMap.unit].trim() : '';
|
|
|
+ const noTaxPrice = sheetData[row][colMap.noTaxPrice] ? sheetData[row][colMap.noTaxPrice].trim() : '';
|
|
|
+ const taxPrice = sheetData[row][colMap.taxPrice] ? sheetData[row][colMap.taxPrice].trim() : '';
|
|
|
if (!className && !code && !name && !specs && !noTaxPrice && !taxPrice) { // 认为是空数据
|
|
|
continue;
|
|
|
}
|