|
|
@@ -65,15 +65,20 @@ let zTreeOprObj = {
|
|
|
let private_chk_hide = function (chkTplItem) {
|
|
|
//考虑未来拓展,统一在此判断报表模板是否显示
|
|
|
let rst = false;
|
|
|
- if (chkTplItem.hasOwnProperty('flags') && chkTplItem.flags.hasOwnProperty('taxType') && chkTplItem.flags['taxType'] !== null &&
|
|
|
- parseInt(chkTplItem.flags['taxType']) !== parseInt(projectInfoObj.projectInfo.property.taxType)) {
|
|
|
+ // if (chkTplItem.hasOwnProperty('flags') && chkTplItem.flags.hasOwnProperty('taxType') && chkTplItem.flags['taxType'] !== null &&
|
|
|
+ // parseInt(chkTplItem.flags['taxType']) !== parseInt(projectInfoObj.projectInfo.property.taxType)) {
|
|
|
+ // rst = true;
|
|
|
+ // }
|
|
|
+ //重庆养护系统的判断逻辑有所不同
|
|
|
+ if (chkTplItem.hasOwnProperty('flags') && chkTplItem.flags.hasOwnProperty('valuationType') && chkTplItem.flags['valuationType'] !== null &&
|
|
|
+ chkTplItem.flags['valuationType'] !== projectInfoObj.projectInfo.property.valuationType) {
|
|
|
rst = true;
|
|
|
}
|
|
|
return rst;
|
|
|
};
|
|
|
// projectInfoObj.projectInfo.property.taxType === 1 //1: 一般计税 2: 简易计税
|
|
|
CommonAjax.postEx("report_tpl_api/getRptTplTree", params, 20000, true, function(result){
|
|
|
- let private_remove_hide_item = function (items) {
|
|
|
+ let private_remove_hide_item = function (items, nlv) {
|
|
|
if (items && items.length > 0) {
|
|
|
for (let i = items.length - 1; i >= 0; i--) {
|
|
|
if (!(items[i].released) && items[i].nodeType === 2) {
|
|
|
@@ -82,13 +87,17 @@ let zTreeOprObj = {
|
|
|
items.splice(i, 1);
|
|
|
} else {
|
|
|
if (items[i].items && items[i].items.length > 0) {
|
|
|
- private_remove_hide_item(items[i].items);
|
|
|
+ private_remove_hide_item(items[i].items, nlv + 1);
|
|
|
+ if (items[i].items.length === 0 && nlv > 0) {
|
|
|
+ items.splice(i, 1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- private_remove_hide_item(result);
|
|
|
+ let nodeLv = 0;
|
|
|
+ private_remove_hide_item(result, nodeLv);
|
|
|
for (let topNode of result) {
|
|
|
if (topNode.userId === "-100") {
|
|
|
topNode.name = topNode.name + " - 标准报表";
|