Browse Source

编号提交判断bug修复

laiguoran 5 years ago
parent
commit
8a3f305b29
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/controller/material_controller.js

+ 1 - 1
app/controller/material_controller.js

@@ -362,7 +362,7 @@ module.exports = app => {
                             throw '请先输入编号';
                         }
                         // 判断编号为纯数字时,不能为小数
-                        if (!isNaN(data.updateData.code) && data.updateData.code.indexOf('.') !== -1) {
+                        if (!isNaN(data.updateData.code) && data.updateData.code.toString().indexOf('.') !== -1) {
                             throw '编号为纯数字时,不能为小数';
                         }
                         if (data.updateData.code.length > 15) {