Bläddra i källkod

修复工料机页面bug

caiaolin 7 år sedan
förälder
incheckning
4470063daa
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3 1
      modules/glj/models/glj_list_model.js

+ 3 - 1
modules/glj/models/glj_list_model.js

@@ -100,7 +100,6 @@ class GLJListModel extends BaseModel {
                     projectGLJCode.push(tmp.code);
                 }
             }
-
             // 从定额工料机库中获取消耗量
             condition = {
                 projectID: projectId,
@@ -144,8 +143,11 @@ class GLJListModel extends BaseModel {
 
             // 排序
             gljData.sort(function (a, b) {
+                a.unit_price = a.unit_price === null ? 0 : a.unit_price;
+                b.unit_price = b.unit_price === null ? 0 : b.unit_price;
                 return a.unit_price.type - b.unit_price.type;
             });
+
         } catch (error) {
             console.log("glj_list_model:" + error);
             gljData = [];