|
@@ -275,6 +275,7 @@ $(document).ready(function () {
|
|
|
$('#select-qi').modal('hide');
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
// 显示层次
|
|
|
(function (select, sheet) {
|
|
|
$(select).click(function () {
|
|
@@ -304,6 +305,20 @@ $(document).ready(function () {
|
|
|
tree.expandByCalcFields();
|
|
|
SpreadJsObj.refreshTreeRowVisible(sheet);
|
|
|
break;
|
|
|
+ case "hasDiffer":
|
|
|
+ tree.expandByCustom((data) => {
|
|
|
+ const fieldSufs = sheet.zh_setting.fieldSufs;
|
|
|
+ if (fieldSufs.length <= 1) return false;
|
|
|
+ const field = (!data.children || data.children.length === 0) && !data.is_tp ? 'gather_qty' : 'gather_tp';
|
|
|
+ const base = data[field + fieldSufs[0]];
|
|
|
+ for (let i = 1; i< fieldSufs.length; i++) {
|
|
|
+ const compare = data[field + fieldSufs[i]];
|
|
|
+ if ((base || compare) && (compare !== base)) return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ SpreadJsObj.refreshTreeRowVisible(sheet);
|
|
|
+ break;
|
|
|
}
|
|
|
closeWaitingView();
|
|
|
}, 100);
|