浏览代码

删除设计量报错

MaiXinRong 5 年之前
父节点
当前提交
0bf23211e9
共有 3 个文件被更改,包括 7 次插入7 次删除
  1. 2 2
      app/public/js/ledger.js
  2. 2 2
      app/public/js/revise.js
  3. 3 3
      app/public/js/stage.js

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

@@ -443,7 +443,7 @@ $(document).ready(function() {
                 if (col.type === 'Number') {
                     if (newValue) {
                         const num = _.toNumber(newValue);
-                        if (num) {
+                        if (_.isFinite(num)) {
                             data[col.field] = num;
                         } else {
                             try {
@@ -1161,7 +1161,7 @@ $(document).ready(function() {
 
                     if (col.type === 'Number') {
                         const num = _.toNumber(newText);
-                        if (num) {
+                        if (_.isFinite(num)) {
                             data.updateData[col.field] = num;
                         } else {
                             try {

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

@@ -352,7 +352,7 @@ $(document).ready(() => {
                     }
                     if (col.type === 'Number') {
                         const num = _.toNumber(text);
-                        if (num) {
+                        if (_.isFinite(num)) {
                             data[col.field] = num;
                         } else {
                             try {
@@ -770,7 +770,7 @@ $(document).ready(() => {
                 data.postData = {id: posData.id};
                 if (col.type === 'Number') {
                     const num = _.toNumber(newText);
-                    if (num) {
+                    if (_.isFinite(num)) {
                         data.postData[col.field] = num;
                     } else {
                         try {

+ 3 - 3
app/public/js/stage.js

@@ -525,7 +525,7 @@ $(document).ready(() => {
                 }
                 if (col.type === 'Number' && newValue && newValue !== '') {
                     const num = _.toNumber(newValue);
-                    if (num) {
+                    if (_.isFinite(num)) {
                         newValue = num;
                     } else {
                         try {
@@ -732,7 +732,7 @@ $(document).ready(() => {
                         } else {
                             if (col.type === 'Number') {
                                 const num = _.toNumber(text);
-                                if (num) {
+                                if (_.isFinite(num)) {
                                     data[col.field] = num;
                                     filter = false;
                                 } else {
@@ -1047,7 +1047,7 @@ $(document).ready(() => {
                     data.updateData = {pid: posData.id, lid: posData.lid};
                     if (col.type === 'Number') {
                         const num = _.toNumber(newText);
-                        if (num) {
+                        if (_.isFinite(num)) {
                             data.updateData[col.field] = num;
                         } else {
                             try {