|
@@ -183,7 +183,7 @@ projectGljObject={
|
|
|
let oldSel = me.mixRatioSheet.getSelections()[0];
|
|
|
if(sheet.name() == 'projectGljSheet'){//projectGljSheet/materialSheet 工料机汇总和三材汇总表
|
|
|
let sel = me.projectGljSheet.getSelections()[0];
|
|
|
- let srow = sel.row == -1?0:sel.row;
|
|
|
+ let srow = sel.row == -1||sel.row == ""?0:sel.row;
|
|
|
if(me.projectGljSheetData.length>srow){
|
|
|
gljId = me.projectGljSheetData[srow].id;
|
|
|
gljType = me.projectGljSheetData[srow].type;
|
|
@@ -271,7 +271,7 @@ projectGljObject={
|
|
|
}
|
|
|
}
|
|
|
if(dataCode == 'materialCoe'){//三材类别为空时,三材系数应只读,不允许输入。
|
|
|
- if(data.materialType == undefined || data.materialType == null){
|
|
|
+ if(data.materialType == undefined || data.materialType == null||data.materialType==''){
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -334,7 +334,7 @@ projectGljObject={
|
|
|
showProjectGljData:function () {
|
|
|
this.projectGljSpread.setActiveSheetIndex(0);
|
|
|
let sel = this.projectGljSheet.getSelections()[0];
|
|
|
- let oldData = sel.row<this.projectGljSheetData.length?this.projectGljSheetData[sel.row]:'';
|
|
|
+ let oldData = sel.row<this.projectGljSheetData.length?this.projectGljSheetData[sel.row]:"";
|
|
|
let projectGljSheetData = [];
|
|
|
let gljList = projectObj.project.projectGLJ.datas.gljList;
|
|
|
gljList = this.filterProjectGLJ(gljList);
|
|
@@ -346,7 +346,7 @@ projectGljObject={
|
|
|
this.projectGljSheet.setRowCount(0);
|
|
|
sheetCommonObj.showData(this.projectGljSheet, this.projectGljSetting,this.projectGljSheetData);
|
|
|
this.projectGljSheet.setRowCount(this.projectGljSheetData.length);
|
|
|
- sel.row = _.findIndex(this.projectGljSheetData,{'id':oldData.id});
|
|
|
+ sel.row = oldData?_.findIndex(this.projectGljSheetData,{'id':oldData.id}):'';
|
|
|
this.projectGljSheet.setSelection(sel.row==-1?0:sel.row,sel.col,sel.rowCount,sel.colCount);
|
|
|
},
|
|
|
showMaterialTreeData:function () {
|
|
@@ -755,7 +755,8 @@ projectGljObject={
|
|
|
value = 0;
|
|
|
}
|
|
|
}
|
|
|
- if(dataCode === 'materialType' && value == null){//删除三材类别时,清空三材系数
|
|
|
+ if(dataCode === 'materialType' && (value == null || value=="")){//删除三材类别时,清空三材系数
|
|
|
+ value = null;
|
|
|
extend.materialCoe = null;
|
|
|
}
|
|
|
if(dataCode == 'materialCoe'){
|
|
@@ -1120,7 +1121,14 @@ $(function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- $("#filterType").on("click","ul li a",function(){
|
|
|
+ $("#filterType").on("click","ul li a",function(e){
|
|
|
+
|
|
|
+ let children = $('#filterType a');
|
|
|
+ for(let c of children){
|
|
|
+ $(c).removeClass('active');
|
|
|
+ }
|
|
|
+ $(this).addClass('active');
|
|
|
+
|
|
|
let me = projectGljObject;
|
|
|
me.displayType = filterType[this.id];
|
|
|
me.refreshDataSheet();
|