|
@@ -362,7 +362,11 @@ $(document).ready(() => {
|
|
|
const parent = tree.getParent(node);
|
|
|
const children = parent ? parent.children : tree.children;
|
|
|
const index = children.indexOf(node);
|
|
|
- for (let i = 0; i < count; i++) {
|
|
|
+ if (index > 0 && children[index-1].used) {
|
|
|
+ toastr.warning('其前节点已计量,选中的节点不可降级');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (let i = index; i < count; i++) {
|
|
|
const child = children[i+index];
|
|
|
if (tree.checkNodeUsed(child, pos)) {
|
|
|
toastr.warning('选中的节点已计量,不可降级');
|