{
 "hidden": false,
 "children": [{
  "configs": {"itemId": "module"},
  "expanded": true,
  "children": [{
   "configs": {
    "layout": "border",
    "itemId": "viewport1"
   },
   "expanded": true,
   "children": [
    {
     "configs": {
      "layout": "fit",
      "itemId": "panel1",
      "region": "north",
      "height": "450"
     },
     "expanded": true,
     "children": [{
      "configs": {"itemId": "gridTenancy"},
      "expanded": true,
      "children": [
       {
        "configs": {
         "itemId": "store",
         "url": "m?xwl=admin/tenancyData/selectWbTenancy"
        },
        "expanded": false,
        "children": [],
        "type": "store",
        "events": {"success": "if(records.length>0){\
  app.gridTenancy.getSelectionModel().select(0);\
  Wb.setValue(app.panelTenancy,records[0].data);\
}"}
       },
       {
        "configs": {"itemId": "tbar"},
        "expanded": true,
        "children": [
         {
          "configs": {
           "itemId": "addItem",
           "text": "添加",
           "iconCls": "record_add_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "Wb.reset(app.panelTenancy);"}
         },
         {
          "configs": {
           "itemId": "delItem",
           "text": "删除",
           "iconCls": "record_delete_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "/**\
 *Description:选择记录进行删除操作\
 *Author: wangll\
 *Version: 1.0\
 *Create Date Time: 2020-03-23\
 */\
var rec = app.gridTenancy.getSelection()[0];\
if(!rec){\
  Wb.warn('请选择一条记录');\
  return;\
}\
\
Wb.confirm('确定要删除选中的记录吗？', function() {\
  Wb.requestAg({\
    params: {\
      tenancyId:rec.data.TENANCY_ID,\
      bean: \"permissionService\",\
      //spring中的bean名字\
      method: \"delWbTenancyMethod\" //业务方法名 \
    },\
    success: function(resp) {\
      Wb.remove(app.gridTenancy);\
      Wb.tip('删除成功');\
    }\
  });\
});"}
         },
         {
          "configs": {
           "itemId": "saveItem",
           "text": "保存",
           "iconCls": "save_icon"
          },
          "expanded": true,
          "children": [],
          "type": "item",
          "events": {"click": "/**\
 *Description:租户保存\
 *Author: wangll\
 *Version: 1.0\
 *Create Date Time: 2020-03-23\
 */\
if (!Wb.verify(app.panelTenancy)) \
  return;\
Wb.requestAg({\
  params: {\
    wbTenancyData: Wb.getValue(app.panelTenancy),\
    bean: \"permissionService\",\
    method: \"saveWbTenancyMethod\" //业务方法名 \
  },\
  success: function(resp) {\
    app.findItem.fireEvent('click');\
    Wb.tip('保存成功');\
  }\
});\
    "}
         },
         {
          "configs": {
           "itemId": "tenancyName",
           "labelAlign": "right",
           "fieldLabel": "租户名称",
           "width": "170",
           "labelWidth": "70"
          },
          "expanded": false,
          "children": [],
          "type": "text"
         },
         {
          "configs": {
           "itemId": "findItem",
           "text": "查询",
           "iconCls": "search_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "app.gridTenancy.store.load({\
  out:app.tbar\
});"}
         }
        ],
        "type": "toolbar"
       },
       {
        "configs": {"itemId": "columns"},
        "expanded": true,
        "children": [
         {
          "configs": {
           "itemId": "rownumbererCol",
           "xtype": "rownumberer",
           "text": "序号"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         },
         {
          "configs": {
           "itemId": "TENANCY_IDCol",
           "hidden": "true",
           "dataIndex": "TENANCY_ID",
           "width": "180",
           "text": "租户"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         },
         {
          "configs": {
           "itemId": "TENANCY_CODECol",
           "dataIndex": "TENANCY_CODE",
           "text": "<font color='red'>租户代码<\/font>"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         },
         {
          "configs": {
           "itemId": "TENANCY_NAMECol",
           "dataIndex": "TENANCY_NAME",
           "text": "租户名称"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         },
         {
          "configs": {
           "itemId": "NOTESCol",
           "dataIndex": "NOTES",
           "text": "备注"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         },
         {
          "configs": {
           "itemId": "CREATED_BYCol",
           "dataIndex": "CREATED_BY",
           "text": "创建人"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         },
         {
          "configs": {
           "itemId": "CREATED_ONCol",
           "dataIndex": "CREATED_ON",
           "width": "130",
           "text": "创建时间"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         },
         {
          "configs": {
           "itemId": "UPDATED_BYCol",
           "dataIndex": "UPDATED_BY",
           "text": "修改人"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         },
         {
          "configs": {
           "itemId": "UPDATED_ONCol",
           "dataIndex": "UPDATED_ON",
           "width": "130",
           "text": "修改时间"
          },
          "expanded": false,
          "children": [],
          "type": "column"
         }
        ],
        "type": "array"
       }
      ],
      "type": "grid",
      "events": {"itemclick": "Wb.setValue(app.panelTenancy,record.data);"}
     }],
     "type": "panel"
    },
    {
     "configs": {
      "layout": "absolute",
      "itemId": "panelTenancy",
      "width": "384",
      "region": "center",
      "height": "88"
     },
     "expanded": true,
     "children": [
      {
       "configs": {
        "itemId": "TENANCY_ID",
        "hidden": "true",
        "labelAlign": "right",
        "fieldLabel": "主键",
        "x": "190",
        "width": "170",
        "y": "40",
        "labelWidth": "50",
        "readOnly": "true",
        "height": "22"
       },
       "expanded": false,
       "children": [],
       "type": "text"
      },
      {
       "configs": {
        "itemId": "TENANCY_CODE",
        "labelAlign": "right",
        "fieldLabel": "租户代码",
        "x": "0",
        "width": "170",
        "y": "10",
        "labelWidth": "70",
        "height": "22"
       },
       "expanded": false,
       "children": [],
       "type": "text"
      },
      {
       "configs": {
        "itemId": "TENANCY_NAME",
        "labelAlign": "right",
        "fieldLabel": "租户名称",
        "x": "190",
        "width": "170",
        "y": "10",
        "labelWidth": "50",
        "height": "22"
       },
       "expanded": false,
       "children": [],
       "type": "text"
      },
      {
       "configs": {
        "itemId": "NOTES",
        "labelAlign": "right",
        "fieldLabel": " 备注",
        "x": "0",
        "width": "170",
        "y": "40",
        "labelWidth": "70",
        "height": "22"
       },
       "expanded": false,
       "children": [],
       "type": "text"
      }
     ],
     "type": "panel"
    }
   ],
   "type": "viewport"
  }],
  "type": "module",
  "events": {"finalize": " app.findItem.fireEvent('click');"}
 }],
 "roles": {"default": 1},
 "title": "租户管理",
 "iconCls": "anonymous_icon",
 "inframe": false,
 "pageLink": ""
}