|
@@ -277,10 +277,12 @@ let gljComponentOprObj = {
|
|
|
//控制按钮是否可用
|
|
|
let insertDis = false,
|
|
|
delDis = false;
|
|
|
- if(!(that.currentGlj && allowComponent.includes(that.currentGlj.gljType)) || (that.currentGlj.gljType === 4 && that.isComponent(that.currentGlj.ID, that.gljList))){
|
|
|
+ if(!(that.currentGlj && allowComponent.includes(that.currentGlj.gljType)) || //机械组成物,应可选择无组成物的普通材料
|
|
|
+ ([4].includes(that.currentGlj.gljType) && that.isComponent(that.currentGlj.ID, that.gljList))){
|
|
|
insertDis = true;
|
|
|
}
|
|
|
- if(!that.currentGlj || typeof that.currentComponent === 'undefined' || (typeof that.currentComponent !== 'undefined' && target.row >= that.currentComponent.length)){//右键定位在有组成物的行,删除键才显示可用
|
|
|
+ if(!that.currentGlj || typeof that.currentComponent === 'undefined' ||
|
|
|
+ (typeof that.currentComponent !== 'undefined' && target.row >= that.currentComponent.length)){//右键定位在有组成物的行,删除键才显示可用
|
|
|
delDis = true;
|
|
|
}
|
|
|
return {
|
|
@@ -372,7 +374,7 @@ let gljComponentOprObj = {
|
|
|
hasCode = true;
|
|
|
if((materialAllowComponent.includes(that.currentGlj.gljType) && gljList[i].gljType === 201)
|
|
|
|| (machineAllowComponent.includes(that.currentGlj.gljType) && machineComponent.includes(gljList[i].gljType))
|
|
|
- || (that.currentGlj.gljType === 4 && gljList[i].gljType === 4 && that.currentGlj.ID !== gljList[i].ID)){//普通材料
|
|
|
+ || (that.currentGlj.gljType === 302 && gljList[i].gljType === 201)){
|
|
|
//是否与原有组成物不同
|
|
|
let isExist = false;
|
|
|
for(let j = 0; j < component.length; j++){
|
|
@@ -515,7 +517,7 @@ let gljComponentOprObj = {
|
|
|
existCode = true;
|
|
|
if((materialAllowComponent.includes(that.currentGlj.gljType) && gljCache[j].gljType === 201)
|
|
|
|| (machineAllowComponent.includes(that.currentGlj.gljType) && machineComponent.includes(gljCache[j].gljType))
|
|
|
- || (that.currentGlj.gljType === 4 && gljCache[j].gljType === 4 && that.currentGlj.ID !== gljCache[i].ID)){
|
|
|
+ || (that.currentGlj.gljType === 302 && gljCache[j].gljType === 201)){
|
|
|
//是否与原有组成物不同
|
|
|
let isExist = false;
|
|
|
for(let k = 0; k < component.length; k++){
|