|
@@ -993,12 +993,20 @@ const billsGuidance = (function () {
|
|
|
module.tree = idTree.createNew({id: 'ID', pid: 'ParentID', nid: 'NextSiblingID', rootId: -1, autoUpdate: true});
|
|
|
module.controller = TREE_SHEET_CONTROLLER.createNew(module.tree, sheet, treeSetting);
|
|
|
module.tree.loadDatas(datas);
|
|
|
+ if(module === bills){
|
|
|
+ module.tree.roots.forEach(root => {
|
|
|
+ root.setExpanded(false);
|
|
|
+ })
|
|
|
+ }
|
|
|
module.controller.showTreeData();
|
|
|
if(module === bills){
|
|
|
setBillsHint(bills.tree.items, stdBillsJobData, stdBillsFeatureData);
|
|
|
setBillsForeColor(bills.tree.items);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 展开收起清单树()
|
|
|
+
|
|
|
//更新清单备注
|
|
|
function updateBillsComment(updateData, callback, errCB) {
|
|
|
CommonAjax.post('/stdBillsEditor/updateBills', updateData, function () {
|
|
@@ -1686,6 +1694,22 @@ const billsGuidance = (function () {
|
|
|
$('#downMove').click(function () {
|
|
|
downMove();
|
|
|
});
|
|
|
+ // 收起清单至第二层
|
|
|
+ $('#expandToSecond').click(function() {
|
|
|
+ if (!bills.tree || !bills.workBook) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ bills.tree.roots.forEach(root => {
|
|
|
+ root.setExpanded(true);
|
|
|
+ root.children.forEach(item => {
|
|
|
+ item.setExpanded(false);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ const billSheet = bills.workBook.getActiveSheet();
|
|
|
+ renderSheetFunc(billSheet, function () {
|
|
|
+ TREE_SHEET_HELPER.refreshNodesVisible(bills.tree.roots, billSheet, true);
|
|
|
+ });
|
|
|
+ })
|
|
|
//收起定额、展开全部
|
|
|
$('#expandContract').click(function () {
|
|
|
//目前状态时展开全部节点状态,点击则收起定额
|