首页 > 其他分享 >BIP树形表格的参照过滤

BIP树形表格的参照过滤

时间:2024-01-05 17:56:55浏览次数:37  
标签:分公司 code 表格 parent 0707202206301001 树形 path BIP name

{
  "code": 200,
  "message": "操作成功",
  "data": [
      {
          "orgtype": 1,
          "parent": "",
          "code": "1",
          "level": 1,
          "sort": 1,
          "isEnd": 0,
          "shortname": "中国三峡集团",
          "innercode": "ETJP",
          "orgid": "0707202206301001",
          "vid": "0707202206301001",
          "path": "0707202206301001|",
          "children": [
              {
                  "orgtype": 2,
                  "parent": "0707202206301001",
                  "code": "101",
                  "level": 2,
                  "sort": 1,
                  "isEnd": 1,
                  "innercode": "ETJPHIOO",
                  "orgid": "1001AA100000000109BN",
                  "vid": "1001AA100000000109BN",
                  "path": "0707202206301001|1001AA100000000109BN|",
                  "enable": 1,
                  "codename": "集团公司领导",
                  "name": "集团公司领导",
                  "parent_code": "1",
                  "id": "1001AA100000000109BN",
                  "isbizunit": 1,
                  "pubts": "2023-11-30 17:23:23"
              },
              {
                  "orgtype": 2,
                  "parent": "0707202206301001",
                  "code": "135",
                  "level": 2,
                  "sort": 99999,
                  "isEnd": 0,
                  "innercode": "ETJPMSNH",
                  "orgid": "1001A11000000010Y1SZ",
                  "vid": "1001A11000000010Y1SZ",
                  "path": "0707202206301001|1001A11000000010Y1SZ|",
                  "children": [
                      {
                          "orgtype": 2,
                          "parent": "1001A11000000010Y1SZ",
                          "code": "13502",
                          "level": 3,
                          "sort": 99999,
                          "isEnd": 1,
                          "shortname": "湖南分公司市场发展部",
                          "innercode": "ETJPMSNHUB95",
                          "orgid": "1001A11000000013577Z",
                          "vid": "1001A11000000013577Z",
                          "path": "0707202206301001|1001A11000000010Y1SZ|1001A11000000013577Z|",
                          "enable": 1,
                          "codename": "湖南分公司市场发展部",
                          "name": "湖南分公司市场发展部",
                          "parent_code": "135",
                          "id": "1001A11000000013577Z",
                          "isbizunit": 1,
                          "pubts": "2023-12-06 09:07:43"
                      },
                      {
                          "orgtype": 2,
                          "parent": "1001A11000000010Y1SZ",
                          "code": "13503",
                          "level": 3,
                          "sort": 99999,
                          "isEnd": 1,
                          "innercode": "ETJPMSNHQT6H",
                          "orgid": "1001A110000000135782",
                          "vid": "1001A110000000135782",
                          "path": "0707202206301001|1001A11000000010Y1SZ|1001A110000000135782|",
                          "enable": 1,
                          "codename": "湖南分公司党群工作部(纪检工作部)",
                          "name": "湖南分公司党群工作部(纪检工作部)",
                          "parent_code": "135",
                          "id": "1001A110000000135782",
                          "isbizunit": 1,
                          "pubts": "2023-11-30 17:32:11"
                      },
                      {
                          "orgtype": 2,
                          "parent": "1001A11000000010Y1SZ",
                          "code": "13507",
                          "level": 3,
                          "sort": 999999,
                          "isEnd": 1,
                          "innercode": "ETJPMSNHEGN1",
                          "vid": "1877997892350246915",
                          "path": "0707202206301001|1001A11000000010Y1SZ|1877997892350246915|",
                          "enable": 1,
                          "codename": "湖南分公司2",
                          "name": "湖南分公司2",
                          "parent_code": "135",
                          "id": "1877997892350246915",
                          "isbizunit": 1,
                          "pubts": "2023-12-06 10:26:07"
                      }
                  ],
                  "enable": 1,
                  "codename": "湖南分公司",
                  "name": "湖南分公司",
                  "parent_code": "1",
                  "id": "1001A11000000010Y1SZ",
                  "isbizunit": 1,
                  "pubts": "2023-11-30 17:25:08"
              },
              {
                  "orgtype": 2,
                  "parent": "0707202206301001",
                  "code": "136",
                  "level": 2,
                  "sort": 99999,
                  "isEnd": 0,
                  "innercode": "ETJPURJY",
                  "orgid": "1001A11000000011DCMX",
                  "vid": "1001A11000000011DCMX",
                  "path": "0707202206301001|1001A11000000011DCMX|",
                  "children": [
                      {
                          "orgtype": 2,
                          "parent": "1001A11000000011DCMX",
                          "code": "13601",
                          "level": 3,
                          "sort": 99999,
                          "isEnd": 1,
                          "innercode": "ETJPURJYQOG2",
                          "orgid": "1001A11000000013577H",
                          "vid": "1001A11000000013577H",
                          "path": "0707202206301001|1001A11000000011DCMX|1001A11000000013577H|",
                          "enable": 1,
                          "codename": "贵州分公司综合管理部",
                          "name": "贵州分公司综合管理部",
                          "parent_code": "136",
                          "id": "1001A11000000013577H",
                          "isbizunit": 1,
                          "pubts": "2023-11-30 17:45:46"
                      },
                      {
                          "orgtype": 2,
                          "parent": "1001A11000000011DCMX",
                          "code": "13602",
                          "level": 3,
                          "sort": 99999,
                          "isEnd": 1,
                          "innercode": "ETJPURJYQL6I",
                          "orgid": "1001A11000000013577K",
                          "vid": "1001A11000000013577K",
                          "path": "0707202206301001|1001A11000000011DCMX|1001A11000000013577K|",
                          "enable": 1,
                          "codename": "贵州分公司市场发展部",
                          "name": "贵州分公司市场发展部",
                          "parent_code": "136",
                          "id": "1001A11000000013577K",
                          "isbizunit": 1,
                          "pubts": "2023-11-30 17:45:46"
                      },
                      {
                          "orgtype": 2,
                          "parent": "1001A11000000011DCMX",
                          "code": "13603",
                          "level": 3,
                          "sort": 99999,
                          "isEnd": 1,
                          "innercode": "ETJPURJYVBHH",
                          "orgid": "1001A11000000013577Q",
                          "vid": "1001A11000000013577Q",
                          "path": "0707202206301001|1001A11000000011DCMX|1001A11000000013577Q|",
                          "enable": 1,
                          "codename": "贵州分公司党群工作部(纪检工作部)",
                          "name": "贵州分公司党群工作部(纪检工作部)",
                          "parent_code": "136",
                          "id": "1001A11000000013577Q",
                          "isbizunit": 1,
                          "pubts": "2023-11-30 17:45:46"
                      }
                  ],
                  "enable": 1,
                  "codename": "贵州分公司",
                  "name": "贵州分公司",
                  "parent_code": "1",
                  "id": "1001A11000000011DCMX",
                  "isbizunit": 1,
                  "pubts": "2023-11-30 17:25:20"
              }
          ],
          "enable": 1,
          "codename": "中国长江三峡集团有限公司",
          "name": "中国长江三峡集团有限公司",
          "id": "0707202206301001",
          "isbizunit": 1,
          "pubts": "2023-09-30 09:34:16"
      },
 
  ],
  "traceId": "00e4255866eba74f"
}

  

  viewModel
    .get("placesdownentity_1898089337058230276")
    .on("beforeBrowse", function (arg) {
      debugger;
      if (arg.cellName == "item25ki_name") {
        let orgIdr = orgId ? orgId : "";
        // let value = [];
        // value.push(orgIdr);
        var condition = {
          isExtend: true,
          simpleVOs: [
            {
              field: "path",
              op: "like",
              value1: orgIdr //'1001A11000000010Y1SZ',
            },
          ],
        };
        arg.context.setTreeFilter(condition); //arg.context.setFilter(condition);
        return true;
      }
    });

  复制参照返回的数据,找规律,发现有个path属性。  根据这个path属性进行过滤。 使用like属性。  (父组件传递参数数据给子组件 组织id)

setTreeFilter 是树形参照
setFilter 是表格参照

 

实现这种效果

 

 vendorextends!lifecycleStatus_name   将  ! 和_   感叹号和下划线改为.    

vendorextends.lifecycleStatus.name

 案例 如下

//浏览前事件 组织参照过滤
viewModel.get("adjustpricedetail").on("beforeBrowse", function(arg) {
    debugger;
    if (arg.cellName == "vendorCode") {
        let orgId = "潜在";
        let value = [];
        value.push(orgId);
        // value.push("1");
        // value.push("2");
        // value.push("0");
 
        var condition = {
            isExtend: true,
            simpleVOs: [{
                field: "vendorextends.lifecycleStatus.name",
                op: "neq",
                value1: '潜在'
                    // value1: value
            }, ],
        };
        arg.context.setFilter(condition);
        return true;
    }
});

  

标签:分公司,code,表格,parent,0707202206301001,树形,path,BIP,name
From: https://www.cnblogs.com/LFxanla/p/17947760

相关文章

  • 用友BIP全球司库助力陕西建工控股集团打造世界一流司库体系
    1月2日,用友承建的陕西建工控股集团有限公司(简称“陕西建工控股集团”)司库建设项目正式启动!这一举措凸显了司库建设对于陕西建工控股集团发展的至关重要性。司库建设作为企业财务管理的核心,直接关系到资金的高效运作、风险控制以及战略决策的精准性。在当前复杂多变的市场环境下,资金......
  • java 一对多表格数据导入
    Java一对多表格数据导入在许多应用程序中,我们经常需要处理一对多的数据关系。这意味着一个实体(如用户)可以有多个关联实体(如订单)。在本文中,我们将探讨如何使用Java语言导入一对多的表格数据,并提供了代码示例。数据模型在开始之前,让我们先定义一下我们的数据模型。假设我们有两个......
  • 【vue】,封装的table组件,table表格超出高度自适应滚动效果,设置页面全局统一自适应高度
    需求背景:为了使后台页面的table列表页面始终保持统一的高度,无论我们的列表数据有多少都只占一个屏幕的高度,如果table表格的数据太多,只滚动table表格的数据,页面高度保持不变;使用window.onresize监听浏览器的高度://tableHeight:为el-table绑定的height高度;onMounted......
  • table表格 组件
     <template> <div>  <BaseTable   :searchConfig="searchConfig"   :operateBtnConfig="operateBtn"   :tableData="tableData"   :tableConfig="tableConfig"   :pagination="pagin......
  • 使用hook封装表格常用功能(react)
    实现内容配置分页:usePagination生成过滤项:useFilter获取表格选择配置:useSelect生成批量删除按钮:useDelete生成模态框:useModal示例render部分:<React.Fragment><Formlayout="inline">{DeleteEle}{FilterEles}</Form><Table{...{......
  • layui之静态表格的分页及搜索功能以及前端使用XLSX导出Excel功能
    LayUI官方文档:https://layui.dev/docs/2/#introduceXLSXNPM地址:https://www.npmjs.com/package/xlsxXLSX 使用参考文档:https://juejin.cn/post/7003153489920524301https://blog.csdn.net/qq_20805455/article/details/1222297621、在官方网站上下载layui压缩文件解压后选......
  • vue3 elementplus 表格表头过长 三个点显示
    vue3:constrenderHeaderMethods=({column})=>{returncreateVNode(resolveComponent('el-tooltip'),{effect:'dark',content:column.label,placement:'top'......
  • iview 表格列自定义样式 & public.css 公共样式里面引用图片方式
    {title:'操作',key:'action',align:'center',renderHead:()=>{},//自定义表头样式className:'col_oper',width:120,render:(h,params)=&g......
  • wpf + MaterialDesign + Prism8 + DataGrid 实现表格内数据编辑,下拉
    十年河东,十年河西,莫欺少年穷学无止境,精益求精效果如下: xaml如下:<UserControlx:Class="WpfApp.UserControls.MemoView"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/w......
  • uniGUI学习之表格和链接(76)
    Delphi10.3如何在StringGrid某单元格下划线显示,并点击弹出新窗口拖一个UniHTMLFrame1到界面上<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><title>网页标题</title><basetarget=&qu......