zhongzewei 7 年之前
父节点
当前提交
9d7fc953c1
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      web/maintain/std_glj_lib/js/gljComponent.js

+ 4 - 2
web/maintain/std_glj_lib/js/gljComponent.js

@@ -238,7 +238,8 @@ let gljComponentOprObj = {
                 if(gljList[i].code === args.editingText){//有效的组成物
                     hasCode = true;
                     if((materialComponent.indexOf(that.currentGlj.gljType) !== -1 && gljList[i].gljType === 201)
-                        || (that.currentGlj.gljType === 301 && machineComponent.indexOf(gljList[i].gljType) !== -1 )){//普通材料
+                        || (that.currentGlj.gljType === 301 && machineComponent.indexOf(gljList[i].gljType) !== -1 )
+                        || (that.currentGlj.gljType === 4 && gljList[i].gljType === 4 && that.currentGlj.ID !== gljList[i].ID)){//普通材料
                         //是否与原有组成物不同
                         let isExist = false;
                         for(let j = 0; j < component.length; j++){
@@ -373,7 +374,8 @@ let gljComponentOprObj = {
                 for(let j = 0; j < gljCache.length; j++){
                     if(items[i].code === gljCache[j].code){
                         if((materialComponent.indexOf(that.currentGlj.gljType) !== -1 && gljCache[j].gljType === 201)
-                            || (that.currentGlj.gljType === 301 && machineComponent.indexOf(gljCache[j].gljType) !== -1 )){
+                            || (that.currentGlj.gljType === 301 && machineComponent.indexOf(gljCache[j].gljType) !== -1 )
+                            || (that.currentGlj.gljType === 4 && gljCache[i].gljType === 4 && that.currentGlj.ID !== gljCache[i].ID)){
                             //是否与原有组成物不同
                             let isExist = false;
                             for(let k = 0; k < component.length; k++){