WMS前端元数据标签

WMS 页面元数据包含

  • 基础页面配置(数据源, UI, 列配置)
  • Workflow:页面所包含的逻辑功能,通常为功能按钮
  • Process: 具体功能的实现定义
  • ForwardContext: 功能操作的后续执行内容

WMS 页面结构功能

Page -> Workflow -> Process -> State 或 Action 执行逻辑 -> Forward 执行后下一步操作(通常用于页面刷新、数据传递等功能)

页面加载过程

  1. 读取页面配置
  2. 读取页面配置中的的initListener初始化需要调用的接口
  3. 读取高级查询配置
  4. 如果存在默认高级查询配置,则使用默认高级查询参数查询,否则根据表格配置读取全部表格数据
  5. 根据表格配置读取分页配置,与上一步同时存在和触发

常见的标签及功能

  • pages 作为根节点,用于承载页面配置
  • modifyDetailPage 典型配置页的根节点,常见属性如下
    • id 作为编辑修改页的唯一id
    • title 页面国际化标题
    • entityClass 对应的编辑的实体类
    • onClose 关闭时的固化操作,如:refreshParent - 刷新父级页面
  • maintainPage 主列表页面, 典型的表格页面,常见配置如下
    • id 页面唯一id
    • titile 国际化页面标题
    • autoQuery 是否自动查询
    • entityClass 对应的实体对象
    • mainEntrance 是否主入口
  • datasource: 数据源,通常为hql查询
  • columns 表格页配置的列信息, 子节点如下
    • column: 常见属性如下
      • id 列属性
      • title 国际化列标题配置
      • visible 列是否可见
      • sortable 是否可排序
      • horizonAlign 横向位置, 值与html配置一致
      • verticalAlign 纵向布局, 值与html配置一致
      • dataType 数据类型
  • initListeners 初始化接口调用
  • modify 修改编辑页面配置
  • inputUIs 编辑页面的输入根节点,其中子节点包含了所有的表单类的输入组件配置 常见的输入组件如下:
    • hidden 表单隐藏项
    <hidden id="wmsQualityDetail.id" title="wmsQualityDetail.id" reserve="false"/>
    
    • text 普通输入项
    <text id="asn.customerBill" title="asn.customerBill" row="3" col="1" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" focusUI="false" inVisible="false" trimSpace="true">
        <visibleExpression/>
        <hql/>
        <eventListeners/>
    </text>
    
    • remote 远程数据选择项
    <remote 
      id="asn.qcLocationId" 
      title="asn.qcLocationId" 
      row="2" col="4" 
      span="1" 
      readOnly="false" 
      required="false" 
      reserve="false" 
      forceOverride="true" 
      focusUI="false" 
      inVisible="false" 
      editModel="editable" 
      language="false" 
      multiple="false" 
      manualEditable="true" 
      displayColumn="3" 
      enumColumnType="WmsLocationType" 
      percentSignPosition="both" 
      displayedTableHead="id,locationType,code">
      <visibleExpression/>
        <dataValue>
            <![CDATA[ 
              SELECT receiveLocation.id,receiveLocation.type,receiveLocation.code FROM WmsLocation receiveLocation WHERE 1=1 AND receiveLocation.status = 'E' AND receiveLocation.type in ('QC') AND receiveLocation.code LIKE :param AND receiveLocation.warehouseId in (select warehouse.id from WmsWarehouse warehouse where warehouse.organizationId = #{SESSION_BASE_ORGAN})
              ]]>
        </dataValue>
      <eventListeners/>
    </remote>
    
    • list 下拉选择项
    <list id="asn.billTypeId" title="asn.billTypeId" row="1" col="3" span="1" readOnly="false" required="true" reserve="false" forceOverride="true" forceSpace="false" multiple="false" inVisible="false">
      <visibleExpression/>
      <dataValue><![CDATA[ SELECT billType.id, billType.name FROM WmsBillType billType WHERE 1=1  AND (billType.type = 'I' OR billType.type = 'IN') AND billType.status = 'E' AND billType.beManual=true AND billType.companyId = cast(${asn.companyId} as integer) order by billType.id]]></dataValue>
      <eventListeners/>
    </list>
    
    • date 日期时间项
    <date id="asn.orderDate" title="asn.orderDate" row="1" col="4" span="1" readOnly="false" required="true" reserve="false" forceOverride="true" focusUI="false" inVisible="false" showTime="true" manualEditable="true" defaultCurrentDate="true">
      <visibleExpression/>
      <hql/>
      <eventListeners/>
    </date>
    
    • htmlDisplayer 页面html内容展示
    <htmlDisplayer id="ta.path" title="ta.path" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" focusUI="false" inVisible="false" language="false">
      <visibleExpression/>
      <hql/>
      <eventListeners/>
    </htmlDisplayer>
    
    • numberText 数字输入项
    <numberText id="asnDetail.receivedQty" title="asnDetail.receivedQty" row="5" col="1" span="1" readOnly="true" required="false" reserve="false" forceOverride="true" focusUI="false" inVisible="false" language="false">
      <visibleExpression/>
      <hql/>
      <eventListeners/>
    </numberText>
    
  • eventListeners 位置位于输入组件的子节点,作用为:当该节点值发生变化时所影响的其他表单输入
  • visibleExpression 是否展示的逻辑表达式
  • separator 表单分割线配置
  • detail 表单中的明细内容