Procházet zdrojové kódy

单价调整,复制粘贴问题

MaiXinRong před 2 měsíci
rodič
revize
3a4ce480c5

+ 1 - 1
app/public/js/change_revise.js

@@ -1235,7 +1235,7 @@ $(document).ready(() => {
                     for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
                         const curCol = info.cellRange.col + iCol;
                         const colSetting = info.sheet.zh_setting.cols[curCol];
-                        const value = col.wordWrap ? info.sheet.getText(curRow, curCol) : trimInvalidChar(info.sheet.getText(curRow, curCol));
+                        const value = colSetting.wordWrap ? info.sheet.getText(curRow, curCol) : trimInvalidChar(info.sheet.getText(curRow, curCol));
                         const lPos = pos.getLedgerPos(node.id);
                         if (lPos && lPos.length > 0) {
                             if (value === '' && colSetting.field === 'b_code') {

+ 1 - 1
app/public/js/ledger.js

@@ -673,7 +673,7 @@ $(document).ready(function() {
                         for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
                             const curCol = info.cellRange.col + iCol;
                             const colSetting = info.sheet.zh_setting.cols[curCol];
-                            const value = col.wordWrap ? info.sheet.getText(curRow, curCol) : trimInvalidChar(info.sheet.getText(curRow, curCol));
+                            const value = colSetting.wordWrap ? info.sheet.getText(curRow, curCol) : trimInvalidChar(info.sheet.getText(curRow, curCol));
                             const lPos = pos.getLedgerPos(node.id);
                             if (lPos && lPos.length > 0) {
                                 if (value === '' && colSetting.field === 'b_code') {

+ 2 - 2
app/public/js/revise_price.js

@@ -366,7 +366,7 @@ $(document).ready(() => {
             }
             if (col.type === 'Number') {
                 const num = _.toNumber(newValue);
-                if (num) data.update[col.field] = num;
+                if (!isNaN(num)) data.update[col.field] = num;
             } else {
                 data.update[col.field] = newValue;
             }
@@ -399,7 +399,7 @@ $(document).ready(() => {
                 for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
                     const curCol = info.cellRange.col + iCol;
                     const colSetting = setting.cols[curCol];
-                    const value = col.wordWrap ? pasteData[iRow][iCol] : trimInvalidChar(pasteData[iRow][iCol]);
+                    const value = colSetting.wordWrap ? pasteData[iRow][iCol] : trimInvalidChar(pasteData[iRow][iCol]);
                     if (colSetting.type === 'Number') {
                         const num = _.toNumber(value);
                         if (num) {