Browse Source

编号提交判断bug修复

laiguoran 5 năm trước cách đây
mục cha
commit
8a3f305b29
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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) {