|
@@ -124,9 +124,9 @@ $(document).ready(function() {
|
|
|
// 处理展开
|
|
|
if (data.expand) {
|
|
|
for (const e of data.expand) {
|
|
|
- const children = tree.getChildren(e);
|
|
|
- for (const child of children) {
|
|
|
- sheet.setRowVisible(tree.nodes.indexOf(child), child.visible);
|
|
|
+ const posterity = tree.getPosterity(e);
|
|
|
+ for (const p of posterity) {
|
|
|
+ sheet.setRowVisible(tree.nodes.indexOf(p), p.visible);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -586,12 +586,15 @@ $(document).ready(function() {
|
|
|
keys: ['id', 'list_id', 'chapter_id'],
|
|
|
}, {
|
|
|
cols: [
|
|
|
- {title: '项目节编号', field: 'code', width: 120, readOnly: true, cellType: 'tree'},
|
|
|
- {title: '名称', field: 'name', width: 230, readOnly: true},
|
|
|
- {title: '单位', field: 'unit', width: 50, readOnly: true}
|
|
|
+ {title: '项目节编号', field: 'code', width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
|
|
|
+ {title: '名称', field: 'name', width: 230, formatter: '@', readOnly: true},
|
|
|
+ {title: '单位', field: 'unit', width: 50, formatter: '@', readOnly: true}
|
|
|
],
|
|
|
treeCol: 0,
|
|
|
- emptyRows: 0
|
|
|
+ emptyRows: 0,
|
|
|
+ headRows: 1,
|
|
|
+ headRowHeight: [40],
|
|
|
+ defaultRowHeight: 21,
|
|
|
});
|
|
|
stdChapter.loadLib(1);
|
|
|
} else if (tab.attr('content') === '#std-bills' && !stdBills) {
|
|
@@ -604,24 +607,30 @@ $(document).ready(function() {
|
|
|
keys: ['id', 'list_id', 'bill_id']
|
|
|
}, {
|
|
|
cols: [
|
|
|
- {title: '清单编号', field: 'code', width: 120, readOnly: true, cellType: 'tree'},
|
|
|
- {title: '名称', field: 'name', width: 230, readOnly: true},
|
|
|
- {title: '单位', field: 'unit', width: 50, readOnly: true}
|
|
|
+ {title: '清单编号', field: 'code', width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
|
|
|
+ {title: '名称', field: 'name', width: 230, formatter: '@', readOnly: true},
|
|
|
+ {title: '单位', field: 'unit', width: 50, formatter: '@', readOnly: true}
|
|
|
],
|
|
|
treeCol: 0,
|
|
|
- emptyRows: 0
|
|
|
+ emptyRows: 0,
|
|
|
+ headRows: 1,
|
|
|
+ headRowHeight: [40],
|
|
|
+ defaultRowHeight: 21,
|
|
|
});
|
|
|
stdBills.loadLib(1);
|
|
|
} else if (tab.attr('content') === '#deal-bills' && !dealBills) {
|
|
|
dealBills = new DealBills($('#deal-bills-spread')[0], {
|
|
|
cols: [
|
|
|
- {title: '清单编号', field: 'code', width: 120, readOnly: true},
|
|
|
- {title: '名称', field: 'name', width: 230, readOnly: true},
|
|
|
- {title: '单位', field: 'unit', width: 50, readOnly: true},
|
|
|
+ {title: '清单编号', field: 'code', width: 120, formatter: '@', readOnly: true},
|
|
|
+ {title: '名称', field: 'name', width: 230, formatter: '@', readOnly: true},
|
|
|
+ {title: '单位', field: 'unit', width: 50, formatter: '@', readOnly: true},
|
|
|
{title: '单价', field: 'unit_price', width: 50, readOnly: true},
|
|
|
{title: '数量', field: 'quantity', width: 50, readOnly: true},
|
|
|
],
|
|
|
emptyRows: 0,
|
|
|
+ headRows: 1,
|
|
|
+ headRowHeight: [40],
|
|
|
+ defaultRowHeight: 21,
|
|
|
});
|
|
|
dealBills.loadData();
|
|
|
}
|
|
@@ -664,7 +673,7 @@ $(document).ready(function() {
|
|
|
treeOperationObj.refreshOperationValid(mainSheet, mainSheet.getSelections());
|
|
|
});
|
|
|
});
|
|
|
- this.pathTree = createNewPathTree(this.treeSetting);
|
|
|
+ this.pathTree = createNewPathTree('active', this.treeSetting);
|
|
|
}
|
|
|
loadLib (listId) {
|
|
|
const self = this;
|
|
@@ -709,24 +718,28 @@ $(document).ready(function() {
|
|
|
|
|
|
this.xmSpreadSetting = {
|
|
|
cols: [
|
|
|
- {title: '部位', field: 'bw', width: 80, readOnly: true},
|
|
|
- {title: '图册号', field: 'drawingCode', width: 60, readOnly: true},
|
|
|
+ {title: '部位', field: 'bw', width: 80, formatter: '@', readOnly: true},
|
|
|
+ {title: '图册号', field: 'drawingCode', formatter: '@', width: 60, readOnly: true},
|
|
|
{title: '数量1', field: 'bills1', width: 50, readOnly: true},
|
|
|
{title: '数量2', field: 'bills2', width: 50, readOnly: true},
|
|
|
],
|
|
|
emptyRows: 6,
|
|
|
+ headRows: 1,
|
|
|
+ headRowHeight: [40],
|
|
|
};
|
|
|
this.xmSpread = SpreadJsObj.createNewSpread($('.batch-l-t')[0]);
|
|
|
|
|
|
this.gclSpreadSetting = {
|
|
|
cols: [
|
|
|
- {title: '编号', field: 'code', width: 80, readOnly: true},
|
|
|
- {title: '名称', field: 'name', width: 120, readOnly: true},
|
|
|
- {title: '单位', field: 'unit', width: 50, readOnly: true},
|
|
|
+ {title: '编号', field: 'code', width: 80, formatter: '@', readOnly: true},
|
|
|
+ {title: '名称', field: 'name', width: 120, formatter: '@', readOnly: true},
|
|
|
+ {title: '单位', field: 'unit', width: 50, formatter: '@', readOnly: true},
|
|
|
{title: '单价', field: 'unit_price', width: 50, readOnly: true},
|
|
|
- {title: '图册号', field: 'name', width: 60, readOnly: true},
|
|
|
+ {title: '图册号', field: 'name', width: 60, formatter: '@', readOnly: true},
|
|
|
],
|
|
|
emptyRows: 2,
|
|
|
+ headRows: 1,
|
|
|
+ headRowHeight: [40],
|
|
|
};
|
|
|
this.gclSpread = SpreadJsObj.createNewSpread($('.batch-l-b')[0]);
|
|
|
|
|
@@ -734,12 +747,14 @@ $(document).ready(function() {
|
|
|
|
|
|
this.dealSpreadSetting = {
|
|
|
cols: [
|
|
|
- {title: '清单编号', field: 'code', width: 80, readOnly: true},
|
|
|
- {title: '名称', field: 'name', width: 120, readOnly: true},
|
|
|
- {title: '单位', field: 'unit', width: 50, readOnly: true},
|
|
|
+ {title: '清单编号', field: 'code', width: 80, formatter: '@', readOnly: true},
|
|
|
+ {title: '名称', field: 'name', width: 120, formatter: '@', readOnly: true},
|
|
|
+ {title: '单位', field: 'unit', width: 50, formatter: '@', readOnly: true},
|
|
|
{title: '单价', field: 'unit_price', width: 50, readOnly: true},
|
|
|
],
|
|
|
emptyRows: 0,
|
|
|
+ headRows: 1,
|
|
|
+ headRowHeight: [40],
|
|
|
};
|
|
|
this.dealSpread = SpreadJsObj.createNewSpread($('.batch-r')[0]);
|
|
|
SpreadJsObj.initSheet(this.dealSpread.getActiveSheet(), this.dealSpreadSetting);
|