|
|
@@ -1477,6 +1477,10 @@ $(document).ready(function() {
|
|
|
toastr.warning('请在协作范围内应用模板');
|
|
|
return;
|
|
|
}
|
|
|
+ if (node.level === 1) {
|
|
|
+ toastr.warning('不可在顶层节点应用模板');
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
postData(window.location.pathname + '/update', {
|
|
|
postType: 'apply-template', postData: { id: ledgerTree.getNodeKey(node), templateId: template.id }
|
|
|
@@ -2184,7 +2188,7 @@ $(document).ready(function() {
|
|
|
icon: 'fa-file-excel-o',
|
|
|
disabled: function (key, opt) {
|
|
|
const node = SpreadJsObj.getSelectObject(ledgerSpread.getActiveSheet());
|
|
|
- return readOnly || !node || !node._invalid
|
|
|
+ return readOnly || !node || node._invalid
|
|
|
|| (node.children && node.children.length > 0)
|
|
|
|| (!_.isNil(node.b_code) && node.b_code !== '');
|
|
|
},
|
|
|
@@ -2222,7 +2226,7 @@ $(document).ready(function() {
|
|
|
icon: 'fa-link',
|
|
|
disabled: function (key, opt) {
|
|
|
const node = SpreadJsObj.getSelectObject(ledgerSpread.getActiveSheet());
|
|
|
- return readOnly || !node || !node._invalid
|
|
|
+ return readOnly || !node || node._invalid
|
|
|
|| (node.children && node.children.length > 0)
|
|
|
|| !ledgerTree.isLeafXmj(node);
|
|
|
},
|