|
@@ -46,8 +46,9 @@ module.exports = app => {
|
|
|
const row = sheet.data[iRow];
|
|
|
if (!bCheckCol) {
|
|
|
for (let iCol = 0; iCol < row.length; iCol++) {
|
|
|
- const value = row[iCol];
|
|
|
+ let value = row[iCol];
|
|
|
if (typeof value !== "string") { continue }
|
|
|
+ value = this.ctx.helper._.trim(value);
|
|
|
if (['清单编号', '子目号', '子目编号', '编号', '清单号'].indexOf(value) >= 0) iCode = iCol;
|
|
|
if (['清单名称', '名称', '子目名称'].indexOf(value) >= 0) iName = iCol;
|
|
|
if (value.indexOf('单位') >= 0) iUnit = iCol;
|
|
@@ -138,8 +139,9 @@ module.exports = app => {
|
|
|
const row = sheet.rows[iRow];
|
|
|
if (!bCheckCol) {
|
|
|
for (let iCol = 0; iCol < row.length; iCol++) {
|
|
|
- const value = row[iCol];
|
|
|
+ let value = row[iCol];
|
|
|
if (typeof value !== "string") { continue }
|
|
|
+ value = this.ctx.helper._.trim(value);
|
|
|
if (value === '子目号' || value === '清单编号') iCode = iCol;
|
|
|
if (value.indexOf('名称') >= 0) iName = iCol;
|
|
|
if (value.indexOf('单位') >= 0) iUnit = iCol;
|