|
@@ -72,8 +72,8 @@ const BillsElf = (function() {
|
|
|
]
|
|
|
},
|
|
|
headers: [
|
|
|
- {name: '施工工序', dataCode: 'name', width: 250, rateWidth: 0.5, vAlign: 'center', hAlign: 'center', formatter: '@'},
|
|
|
- {name: '选项', dataCode: 'options', width: 250, rateWidth: 0.5, vAlign: 'center', hAlign: 'left', formatter: '@'},
|
|
|
+ {name: '施工工序', dataCode: 'name', width: 180, rateWidth: 0.5, vAlign: 'center', hAlign: 'center', formatter: '@'},
|
|
|
+ {name: '选项', dataCode: 'options', width: 180, rateWidth: 0.5, vAlign: 'center', hAlign: 'left', formatter: '@'},
|
|
|
],
|
|
|
rowHeaderWidth:25,
|
|
|
events: {
|
|
@@ -205,7 +205,7 @@ const BillsElf = (function() {
|
|
|
}
|
|
|
setOptions(elfItem.workBook, options);
|
|
|
buildHeader(elfItem.workBook.getActiveSheet(), elfItem.headers);
|
|
|
- setColumnWidthByRate(elfItem.workBook, $('#elfItems').width(), elfItem.headers);
|
|
|
+ //setColumnWidthByRate(elfItem.workBook, $('#elfItems').width(), elfItem.headers);
|
|
|
bindEvent(elfItem.workBook, elfItem.events);
|
|
|
}
|
|
|
}
|
|
@@ -247,7 +247,6 @@ const BillsElf = (function() {
|
|
|
billsNode.elf.tree.selected = node;
|
|
|
}
|
|
|
}
|
|
|
- refreshInsertSingle();
|
|
|
}
|
|
|
//清单焦点变换-清单精灵操作,获取清单前九位编码的标准清单清单精灵选项
|
|
|
//@param {String}code @return {void}
|
|
@@ -255,8 +254,6 @@ const BillsElf = (function() {
|
|
|
let elfSheet = elfItem.workBook.getActiveSheet();
|
|
|
cleanData(elfSheet, elfItem.headers, -1);
|
|
|
if (!code || code === '') {
|
|
|
- $('#elfInsertRation').addClass('disabled');
|
|
|
- $('#elfInsertSingle').addClass('disabled');
|
|
|
return;
|
|
|
}
|
|
|
let nineCode = code.substr(0, 9);
|
|
@@ -311,7 +308,6 @@ const BillsElf = (function() {
|
|
|
setOptionsCellType(node.elf.tree.items);
|
|
|
//项目指引初始焦点
|
|
|
elfItemInitSel(elfSheet.getActiveRowIndex() ? elfSheet.getActiveRowIndex() : 0);
|
|
|
- refreshInsertRation();
|
|
|
});
|
|
|
});
|
|
|
}
|
|
@@ -321,7 +317,6 @@ const BillsElf = (function() {
|
|
|
setOptionsCellType(node.elf.tree.items);
|
|
|
//项目指引初始焦点
|
|
|
elfItemInitSel(elfSheet.getActiveRowIndex() ? elfSheet.getActiveRowIndex() : 0);
|
|
|
- refreshInsertRation();
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -530,8 +525,6 @@ const BillsElf = (function() {
|
|
|
}
|
|
|
TREE_SHEET_HELPER.refreshTreeNodeData(elfItem.treeSetting, elfSheet, node.tree.items, false);
|
|
|
setOptionsCellType(node.tree.items);
|
|
|
- refreshInsertRation();
|
|
|
- refreshInsertSingle();
|
|
|
}
|
|
|
//获取删除节点
|
|
|
function getDeleteNodes(node, optionChecked) {
|
|
@@ -723,31 +716,10 @@ const BillsElf = (function() {
|
|
|
function insertRations(addRationDatas){
|
|
|
if(addRationDatas.length > 0){
|
|
|
projectObj.project.Ration.addMultiRation(addRationDatas, function () {
|
|
|
- refreshInsertRation();
|
|
|
projectObj.setActiveCell('quantity', true);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- //更新插入定额按钮有效性
|
|
|
- function refreshInsertRation(){
|
|
|
- if (!projectReadOnly) {
|
|
|
- if (getInsertElfRationData().length > 0) {
|
|
|
- $('#elfInsertRation').removeClass('disabled');
|
|
|
- } else {
|
|
|
- $('#elfInsertRation').addClass('disabled');
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //更新插入单条按钮有效性
|
|
|
- function refreshInsertSingle() {
|
|
|
- if (!projectReadOnly) {
|
|
|
- if (getInsertElfSingleRation().length > 0) {
|
|
|
- $('#elfInsertSingle').removeClass('disabled');
|
|
|
- } else {
|
|
|
- $('#elfInsertSingle').addClass('disabled');
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
//各监听事件
|
|
|
//@return {void}
|
|
|
function bindListener(){
|