Browse Source

表单模型修改

yingp 5 years ago
parent
commit
5213a35833
100 changed files with 5806 additions and 3064 deletions
  1. 0 0
      applications/assert/assert-base/src/main/resources/metadata/Assert.domain.json
  2. 0 0
      applications/assert/assert-base/src/main/resources/metadata/Assert.fn.json
  3. 34 0
      applications/base/src/main/resources/metadata/Base.enum.json
  4. 14 1
      applications/base/src/main/resources/metadata/Base.fn.json
  5. 23 0
      applications/base/src/main/resources/metadata/Base.module.json
  6. 0 0
      applications/base/src/main/resources/metadata/Base.support.json
  7. 0 0
      applications/base/src/main/resources/metadata/product/Currency.form.json
  8. 786 0
      applications/base/src/main/resources/metadata/product/Product.form.json
  9. 0 0
      applications/base/src/main/resources/metadata/product/ProductCategory.form.json
  10. 984 0
      applications/base/src/main/resources/metadata/product/Unit.form.json
  11. 609 0
      applications/base/src/main/resources/metadata/product/UnitGroup.form.json
  12. 947 0
      applications/base/src/main/resources/metadata/supplier/Supplier.form.json
  13. 0 0
      applications/cost/cost-base/src/main/resources/metadata/Cost.domain.json
  14. 0 0
      applications/cost/cost-base/src/main/resources/metadata/Cost.fn.json
  15. 28 0
      applications/crm/crm-base/src/main/resources/metadata/Crm.domain.json
  16. 12 0
      applications/crm/crm-base/src/main/resources/metadata/Crm.fn.json
  17. 0 0
      applications/ec/ec-base/src/main/resources/metadata/Ec.domain.json
  18. 0 0
      applications/ec/ec-base/src/main/resources/metadata/Ec.fn.json
  19. 0 0
      applications/fa/fa-base/src/main/resources/metadata/Fa.domain.json
  20. 0 0
      applications/fa/fa-base/src/main/resources/metadata/Fa.fn.json
  21. 0 0
      applications/plm/plm-base/src/main/resources/metadata/Plm.domain.json
  22. 0 0
      applications/plm/plm-base/src/main/resources/metadata/Plm.fn.json
  23. 0 0
      applications/pm/pm-base/src/main/resources/metadata/Pm.domain.json
  24. 0 0
      applications/pm/pm-base/src/main/resources/metadata/Pm.fn.json
  25. 0 0
      applications/scm/scm-barcode/src/main/resources/metadata/Barcode.fn.json
  26. 32 0
      applications/scm/scm-barcode/src/main/resources/metadata/Barcode.module.json
  27. 0 6
      applications/scm/scm-base/src/main/resources/metadata/Base.domain.json
  28. 0 17
      applications/scm/scm-base/src/main/resources/metadata/Base.module.json
  29. 0 6
      applications/scm/scm-base/src/main/resources/metadata/Customer.domain.json
  30. 0 781
      applications/scm/scm-base/src/main/resources/metadata/product/Product.form.json
  31. 0 5
      applications/scm/scm-base/src/main/resources/metadata/supplier/Supplier.filter.json
  32. 0 943
      applications/scm/scm-base/src/main/resources/metadata/supplier/Supplier.form.json
  33. 0 0
      applications/scm/scm-credit/src/main/resources/metadata/Credit.fn.json
  34. 0 0
      applications/scm/scm-credit/src/main/resources/metadata/Credit.module.json
  35. 0 0
      applications/scm/scm-org/src/main/resources/metadata/Org.fn.json
  36. 0 0
      applications/scm/scm-org/src/main/resources/metadata/Org.module.json
  37. 0 0
      applications/scm/scm-purchase/src/main/resources/metadata/InStock.form.json
  38. 1453 0
      applications/scm/scm-purchase/src/main/resources/metadata/Order.form.json
  39. 0 1125
      applications/scm/scm-purchase/src/main/resources/metadata/Purchase.form.json
  40. 0 0
      applications/scm/scm-purchase/src/main/resources/metadata/Receive.form.json
  41. 0 0
      applications/scm/scm-purchase/src/main/resources/metadata/ReqToOrder.convert.json
  42. 10 0
      applications/scm/scm-purchase/src/main/resources/metadata/Requisition.form.json
  43. 0 0
      applications/scm/scm-sale/src/main/resources/metadata/Sale.fn.json
  44. 0 0
      applications/scm/scm-sale/src/main/resources/metadata/Sale.module.json
  45. 0 0
      applications/scm/scm-stock/src/main/resources/metadata/Stock.fn.json
  46. 0 0
      applications/scm/scm-stock/src/main/resources/metadata/Stock.module.json
  47. 0 0
      applications/sys/sys-base/src/main/resources/metadata/Sys.domain.json
  48. 8 0
      framework/framework-core/src/main/java/com/usoftchina/uas/util/CollectionUtils.java
  49. 35 0
      framework/framework-core/src/main/java/com/usoftchina/uas/util/Iterators.java
  50. 8 0
      framework/framework-core/src/main/java/com/usoftchina/uas/util/MapUtils.java
  51. 8 0
      framework/framework-core/src/main/java/com/usoftchina/uas/util/NumberUtils.java
  52. 8 0
      framework/framework-core/src/main/java/com/usoftchina/uas/util/StatefulRecord.java
  53. 0 3
      framework/framework-domain/build.gradle
  54. 0 48
      framework/framework-domain/src/main/java/com/usoftchina/uas/domain/DomainInitialize.java
  55. 0 3
      framework/framework-domain/src/main/resources/META-INF/uas.factories
  56. 0 52
      framework/framework-entity/src/main/java/com/usoftchina/uas/entity/GenericEntity.java
  57. 8 0
      framework/framework-entity/src/main/java/com/usoftchina/uas/entity/StatusControl.java
  58. 8 0
      framework/framework-entity/src/main/java/com/usoftchina/uas/entity/filter/FilterMetadata.java
  59. 26 0
      framework/framework-entity/src/main/java/com/usoftchina/uas/entity/filter/SorterMetadata.java
  60. 8 0
      framework/framework-entity/src/main/java/com/usoftchina/uas/entity/model/EntityModel.java
  61. 130 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainInitialize.java
  62. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainInitializedEvent.java
  63. 17 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainMetadata.java
  64. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainMetadataResolver.java
  65. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainMetadataService.java
  66. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/function/FunctionEntryMetadata.java
  67. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadata.java
  68. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadataResolver.java
  69. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadataService.java
  70. 7 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadata.java
  71. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadataResolver.java
  72. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadataService.java
  73. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/bill/BillInitialize.java
  74. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/bill/BillTypeService.java
  75. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/bill/ConvertMetadata.java
  76. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/dynamic/TipController.java
  77. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/operation/CopyHandler.java
  78. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/operation/RefreshHandler.java
  79. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/validator/LegalValidator.java
  80. 0 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/validator/Validator.java
  81. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/DynamicModel.java
  82. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/DynamicView.java
  83. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntityDataUtils.java
  84. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntityRecord.java
  85. 70 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntityRenderUtils.java
  86. 83 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntityStore.java
  87. 0 34
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntryViewController.java
  88. 125 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/FormModel.java
  89. 16 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/FormView.java
  90. 42 40
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/FormViewController.java
  91. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/ListModel.java
  92. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/ListView.java
  93. 8 0
      framework/framework-form/src/main/java/com/usoftchina/uas/form/view/ViewStateUtils.java
  94. 18 0
      framework/framework-form/src/main/java/com/usoftchina/uas/object/BizObjectInitialize.java
  95. 15 0
      framework/framework-form/src/main/java/com/usoftchina/uas/object/BizObjectInitializedEvent.java
  96. 23 0
      framework/framework-form/src/main/resources/metadata/Base.domain.json
  97. 0 0
      framework/framework-form/src/main/resources/metadata/Bill.form.json
  98. 0 0
      framework/framework-form/src/main/resources/metadata/BillType.form.json
  99. 16 0
      framework/framework-form/src/main/resources/metadata/Dev.domain.json
  100. 75 0
      framework/framework-form/src/main/resources/metadata/Domain.form.json

+ 0 - 0
applications/scm/scm-base/src/main/resources/metadata/Assert.domain.json → applications/assert/assert-base/src/main/resources/metadata/Assert.domain.json


+ 0 - 0
applications/assert/assert-base/src/main/resources/metadata/Assert.fn.json


+ 34 - 0
applications/base/src/main/resources/metadata/Base.enum.json

@@ -0,0 +1,34 @@
+[
+  {
+    "enumCode": "base_roundtype",
+    "enumName": "舍入类型",
+    "entries": [
+      {
+        "entryCode": "round",
+        "entryName": "四舍五入"
+      },
+      {
+        "entryCode": "round_down",
+        "entryName": "舍位"
+      },
+      {
+        "entryCode": "round_up",
+        "entryName": "进位"
+      }
+    ]
+  },
+  {
+    "enumCode": "base_converttype",
+    "enumName": "换算类型",
+    "entries": [
+      {
+        "entryCode": "fixed",
+        "entryName": "固定"
+      },
+      {
+        "entryCode": "float",
+        "entryName": "浮动"
+      }
+    ]
+  }
+]

+ 14 - 1
applications/scm/scm-base/src/main/resources/metadata/Base.fn.json → applications/base/src/main/resources/metadata/Base.fn.json

@@ -89,7 +89,7 @@
         "permission": "new"
       },
       {
-        "text": "计量单位",
+        "text": "计量单位列表",
         "formId": "base_unit",
         "viewType": "list",
         "openType": "card",
@@ -110,5 +110,18 @@
         "permission": "new"
       }
     ]
+  },
+  {
+    "groupId": "base_data_billtype",
+    "groupName": "单据类型",
+    "module": "base_data",
+    "entries": [
+      {
+        "text": "单据类型列表",
+        "formId": "base_billtype",
+        "viewType": "list",
+        "openType": "card"
+      }
+    ]
   }
 ]

+ 23 - 0
applications/base/src/main/resources/metadata/Base.module.json

@@ -0,0 +1,23 @@
+[
+  {
+    "name": "基础管理",
+    "id": "base",
+    "modules": [
+      {
+        "id": "base_data",
+        "name": "基础资料",
+        "domain": "base"
+      },
+      {
+        "id": "base_setting",
+        "name": "公共设置",
+        "domain": "base"
+      },
+      {
+        "id": "base_init",
+        "name": "初始化管理",
+        "domain": "base"
+      }
+    ]
+  }
+]

+ 0 - 0
applications/base/src/main/resources/metadata/Base.support.json


+ 0 - 0
applications/base/src/main/resources/metadata/product/Currency.form.json


+ 786 - 0
applications/base/src/main/resources/metadata/product/Product.form.json

@@ -0,0 +1,786 @@
+[
+  {
+    "id": "base_product",
+    "name": "物料",
+    "type": "baseData",
+    "nameColumnName": "BASE_PRODUCT.PR_NAME",
+    "idColumnName": "PR_ID",
+    "codeColumnName": "PR_CODE",
+    "entities": [
+      {
+        "name": "物料",
+        "tableName": "BASE_PRODUCT",
+        "type": "head",
+        "fields": [
+          {
+            "name": "编码",
+            "columnName": "PR_CODE",
+            "type": "code",
+            "length": 50
+          },
+          {
+            "name": "名称",
+            "columnName": "PR_NAME",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "创建人",
+            "columnName": "PR_CREATOR",
+            "type": "creator"
+          },
+          {
+            "name": "创建日期",
+            "columnName": "PR_CREATEDATE",
+            "type": "createDate"
+          },
+          {
+            "name": "修改人",
+            "columnName": "PR_MODIFIER",
+            "type": "modifier"
+          },
+          {
+            "name": "修改日期",
+            "columnName": "PR_MODIFYDATE",
+            "type": "modifyDate"
+          },
+          {
+            "name": "审核人",
+            "columnName": "PR_AUDITOR",
+            "type": "user"
+          },
+          {
+            "name": "审核日期",
+            "columnName": "PR_AUDITDATE",
+            "type": "date"
+          },
+          {
+            "name": "单据状态",
+            "columnName": "PR_STATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "E",
+                "name": "在录入"
+              },
+              {
+                "code": "S",
+                "name": "已提交"
+              },
+              {
+                "code": "A",
+                "name": "已审核"
+              }
+            ]
+          },
+          {
+            "name": "禁用人",
+            "columnName": "PR_FORBIDER",
+            "type": "user"
+          },
+          {
+            "name": "禁用日期",
+            "columnName": "PR_FORBIDDATE",
+            "type": "date"
+          },
+          {
+            "name": "禁用状态",
+            "columnName": "PR_FORBIDSTATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "N",
+                "name": "否",
+                "control": [
+                  {
+                    "type": "field",
+                    "scope": [
+                      "BASE_PRODUCT.PR_CODE",
+                      "BASE_PRODUCT.PR_NAME"
+                    ]
+                  },
+                  {
+                    "type": "menubar",
+                    "scope": []
+                  }
+                ]
+              },
+              {
+                "code": "Y",
+                "name": "是"
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "name": "基本信息",
+        "tableName": "BASE_PRODUCT_BASE",
+        "type": "subHead",
+        "idColumnName": "PR_BASE_ID",
+        "fields": [
+          {
+            "name": "允许采购",
+            "columnName": "PR_IS_PURCHASE",
+            "type": "checkbox"
+          },
+          {
+            "name": "允许销售",
+            "columnName": "PR_IS_SALE",
+            "type": "checkbox"
+          },
+          {
+            "name": "允许生产",
+            "columnName": "PR_IS_MAKE",
+            "type": "checkbox"
+          },
+          {
+            "name": "允许委外",
+            "columnName": "PR_IS_OSMAKE",
+            "type": "checkbox"
+          },
+          {
+            "name": "允许库存",
+            "columnName": "PR_IS_STOCK",
+            "type": "checkbox"
+          }
+        ]
+      },
+      {
+        "name": "采购",
+        "tableName": "BASE_PRODUCT_PURC",
+        "type": "subHead",
+        "idColumnName": "PR_PURC_ID",
+        "fields": [
+          {
+            "name": "最小包装数",
+            "columnName": "PR_MIN_PACK",
+            "type": "int"
+          },
+          {
+            "name": "收货提前天数",
+            "columnName": "PR_RECE_DAY",
+            "type": "int"
+          },
+          {
+            "name": "允许退料",
+            "columnName": "PR_PURC_RETURN",
+            "type": "checkbox"
+          },
+          {
+            "name": "采购单位",
+            "columnName": "PR_UNIT",
+            "type": "baseData",
+            "ref": "base_unit"
+          },
+          {
+            "name": "采购计价单位",
+            "columnName": "PR_PRICE_UNIT",
+            "type": "baseData",
+            "ref": "base_unit"
+          }
+        ]
+      },
+      {
+        "name": "销售",
+        "tableName": "BASE_PRODUCT_SALE",
+        "type": "subHead",
+        "idColumnName": "PR_SALE_ID",
+        "fields": [
+          {
+            "name": "起订量",
+            "columnName": "PR_MIN_ORDER",
+            "type": "int"
+          },
+          {
+            "name": "允许退料",
+            "columnName": "PR_SALE_RETURN",
+            "type": "checkbox"
+          },
+          {
+            "name": "销售单位",
+            "columnName": "PR_SALE_UNIT",
+            "type": "baseData",
+            "ref": "base_unit"
+          },
+          {
+            "name": "销售计价单位",
+            "columnName": "PR_SALE_PRICE_UNIT",
+            "type": "baseData",
+            "ref": "base_unit"
+          }
+        ]
+      }
+    ],
+    "operations": [
+      {
+        "id": "save",
+        "name": "保存",
+        "type": "save"
+      },
+      {
+        "id": "submit",
+        "name": "提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "PR_STATUS",
+          "statusValue": "S"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PR_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "只能提交在录入的单据"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unSubmit",
+        "name": "反提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "PR_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已提交,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PR_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未提交"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "audit",
+        "name": "审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "PR_STATUS",
+          "statusValue": "A"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PR_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "请先提交单据"
+            },
+            "level": "error"
+          },
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PR_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "单据已经审核,无需再审"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unAudit",
+        "name": "反审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "PR_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PR_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未审核"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "new",
+        "name": "新增",
+        "type": "addView",
+        "params": {
+          "viewName": "base_product",
+          "viewType": "form",
+          "openType": "card"
+        }
+      },
+      {
+        "id": "close",
+        "name": "退出",
+        "type": "closeView"
+      },
+      {
+        "id": "returnData",
+        "name": "返回数据",
+        "type": "returnData"
+      }
+    ],
+    "codeRules": [
+      {
+        "default": true,
+        "name": "物料编码规则",
+        "description": "物料编码规则",
+        "editable": true,
+        "repairable": true,
+        "entries": [
+          {
+            "type": "number",
+            "cover": "0",
+            "seed": 1,
+            "increment": 1,
+            "length": 4
+          }
+        ]
+      }
+    ],
+    "views": [
+      {
+        "viewType": "form",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "menubar",
+              "ui": "form-menubar",
+              "items": [
+                {
+                  "text": "新增",
+                  "menu": [
+                    {
+                      "text": "新增"
+                    },
+                    {
+                      "text": "复制"
+                    }
+                  ]
+                },
+                {
+                  "text": "保存",
+                  "itemId": "tbSave",
+                  "operation": "save"
+                },
+                {
+                  "text": "提交",
+                  "menu": [
+                    {
+                      "text": "提交",
+                      "itemId": "tbSubmit",
+                      "operation": "submit"
+                    },
+                    {
+                      "text": "反提交",
+                      "itemId": "tbUnSubmit",
+                      "operation": "unSubmit"
+                    }
+                  ]
+                },
+                {
+                  "text": "审核",
+                  "menu": [
+                    {
+                      "text": "审核",
+                      "itemId": "tbAudit",
+                      "operation": "audit"
+                    },
+                    {
+                      "text": "反审核",
+                      "itemId": "tbUnAudit",
+                      "operation": "unAudit"
+                    }
+                  ]
+                },
+                {
+                  "text": "列表"
+                },
+                {
+                  "text": "退出",
+                  "itemId": "closeBtn",
+                  "operation": "close"
+                }
+              ]
+            },
+            {
+              "xtype": "container",
+              "height": 50,
+              "layout": "absolute",
+              "items": [
+                {
+                  "xtype": "textfield",
+                  "fieldLabel": "编码",
+                  "bind": "{BASE_PRODUCT.PR_CODE}",
+                  "emptyText": "保存时自动生成",
+                  "x": 10,
+                  "y": 10,
+                  "width": 300
+                },
+                {
+                  "xtype": "textfield",
+                  "fieldLabel": "名称",
+                  "bind": "{BASE_PRODUCT.PR_NAME}",
+                  "x": 310,
+                  "y": 10,
+                  "width": 300
+                }
+              ]
+            },
+            {
+              "xtype": "tabpanel",
+              "ui": "form",
+              "height": 500,
+              "items": [
+                {
+                  "title": "基本信息",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "xtype": "checkbox",
+                      "fieldLabel": "允许采购",
+                      "bind": "{BASE_PRODUCT_BASE.PR_IS_PURCHASE}",
+                      "x": 10,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "checkbox",
+                      "fieldLabel": "允许销售",
+                      "bind": "{BASE_PRODUCT_BASE.PR_IS_SALE}",
+                      "x": 10,
+                      "y": 50,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "checkbox",
+                      "fieldLabel": "允许生产",
+                      "bind": "{BASE_PRODUCT_BASE.PR_IS_MAKE}",
+                      "x": 310,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "checkbox",
+                      "fieldLabel": "允许委外",
+                      "bind": "{BASE_PRODUCT_BASE.PR_IS_OSMAKE}",
+                      "x": 310,
+                      "y": 50,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "checkbox",
+                      "fieldLabel": "允许库存",
+                      "bind": "{BASE_PRODUCT_BASE.PR_IS_STOCK}",
+                      "x": 610,
+                      "y": 10,
+                      "width": 300
+                    }
+                  ]
+                },
+                {
+                  "title": "采购",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "xtype": "numberfield",
+                      "fieldLabel": "最小包装数",
+                      "bind": "{BASE_PRODUCT_PURC.PR_MIN_PACK}",
+                      "x": 10,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "numberfield",
+                      "fieldLabel": "收货提前天数",
+                      "bind": "{BASE_PRODUCT_PURC.PR_RECE_DAY}",
+                      "x": 10,
+                      "y": 50,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "checkbox",
+                      "fieldLabel": "允许退料",
+                      "bind": "{BASE_PRODUCT_SALE.PR_PURC_RETURN}",
+                      "x": 10,
+                      "y": 90,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "采购单位",
+                      "bind": "{BASE_PRODUCT_PURC.PR_PURC_UNIT}",
+                      "x": 310,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "采购计价单位",
+                      "bind": "{BASE_PRODUCT_PURC.PR_PURC_PRICE_UNIT}",
+                      "x": 310,
+                      "y": 50,
+                      "width": 300
+                    }
+                  ]
+                },
+                {
+                  "title": "销售",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "xtype": "numberfield",
+                      "fieldLabel": "起订量",
+                      "bind": "{BASE_PRODUCT_SALE.PR_MIN_ORDER}",
+                      "x": 10,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "checkbox",
+                      "fieldLabel": "允许退料",
+                      "bind": "{BASE_PRODUCT_SALE.PR_SALE_RETURN}",
+                      "x": 10,
+                      "y": 50,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "销售单位",
+                      "bind": "{BASE_PRODUCT_SALE.PR_SALE_UNIT}",
+                      "x": 310,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "销售计价单位",
+                      "bind": "{BASE_PRODUCT_SALE.PR_SALE_PRICE_UNIT}",
+                      "x": 310,
+                      "y": 50,
+                      "width": 300
+                    }
+                  ]
+                },
+                {
+                  "title": "其他信息",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "x": 10,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "创建人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_PRODUCT.PR_CREATOR}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "创建日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_PRODUCT.PR_CREATEDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 90,
+                      "width": 300,
+                      "fieldLabel": "修改人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_PRODUCT.PR_MODIFIER}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 130,
+                      "width": 300,
+                      "fieldLabel": "修改日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_PRODUCT.PR_MODIFYDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 310,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "审核人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_PRODUCT.PR_AUDITOR}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 310,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "审核日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_PRODUCT.PR_AUDITDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "禁用状态",
+                      "xtype": "textfield",
+                      "bind": "{BASE_PRODUCT.PR_FORBIDSTATUS}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "禁用人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_PRODUCT.PR_FORBIDER}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 90,
+                      "width": 300,
+                      "fieldLabel": "禁用时间",
+                      "xtype": "datefield",
+                      "bind": "{BASE_PRODUCT.PR_FORBIDDATE}",
+                      "disabled": true
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      },
+      {
+        "viewType": "list",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "gridpanel",
+              "ui": "form",
+              "menubar": [
+                {
+                  "text": "过滤"
+                },
+                {
+                  "text": "返回数据",
+                  "itemId": "returnDataBtn",
+                  "operation": "returnData"
+                },
+                {
+                  "text": "刷新"
+                },
+                {
+                  "text": "新增",
+                  "menu": [
+                    {
+                      "text": "新增",
+                      "itemId": "newBtn",
+                      "operation": "new"
+                    },
+                    {
+                      "text": "复制"
+                    }
+                  ]
+                },
+                {
+                  "text": "打开"
+                },
+                {
+                  "text": "退出",
+                  "itemId": "closeBtn",
+                  "operation": "close"
+                }
+              ],
+              "showScheme": true,
+              "showHeaderFilter": true,
+              "showPagingBar": true,
+              "height": 584,
+              "selType": "checkboxmodel"
+            }
+          ]
+        },
+        "schemes": [
+          {
+            "name": "缺省方案",
+            "default": true,
+            "columns": [
+              {
+                "field": "PR_CODE",
+                "entity": "BASE_PRODUCT",
+                "width": 100
+              },
+              {
+                "field": "PR_NAME",
+                "entity": "BASE_PRODUCT",
+                "width": 200
+              },
+              {
+                "field": "PR_STATUS",
+                "entity": "BASE_PRODUCT",
+                "width": 70
+              },
+              {
+                "field": "PR_FORBIDSTATUS",
+                "entity": "BASE_PRODUCT",
+                "width": 70
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+]

+ 0 - 0
applications/base/src/main/resources/metadata/product/ProductCategory.form.json


+ 984 - 0
applications/base/src/main/resources/metadata/product/Unit.form.json

@@ -0,0 +1,984 @@
+[
+  {
+    "id": "base_unit",
+    "name": "计量单位",
+    "type": "baseData",
+    "nameColumnName": "UN_NAME",
+    "idColumnName": "UN_ID",
+    "codeColumnName": "UN_CODE",
+    "entities": [
+      {
+        "name": "单据头",
+        "tableName": "BASE_UNIT",
+        "type": "head",
+        "fields": [
+          {
+            "name": "编码",
+            "columnName": "UN_CODE",
+            "type": "code",
+            "length": 50
+          },
+          {
+            "name": "名称",
+            "columnName": "UN_NAME",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "描述",
+            "columnName": "UN_DESC",
+            "type": "textarea",
+            "length": 255
+          },
+          {
+            "name": "所属组别",
+            "columnName": "UN_GROUPID",
+            "type": "baseData",
+            "ref": "base_unitgroup",
+            "refField": "UG_NAME"
+          },
+          {
+            "name": "基准单位",
+            "columnName": "UN_BASEUNIT",
+            "type": "baseDataProp",
+            "baseDataField": "UN_GROUPID",
+            "refField": "UG_BASENAME"
+          },
+          {
+            "name": "舍入类型",
+            "columnName": "UN_ROUNDTYPE",
+            "type": "enumData",
+            "ref": "base_roundtype"
+          },
+          {
+            "name": "精度",
+            "columnName": "UN_PRECISION",
+            "type": "int",
+            "defaultValue": 0
+          },
+          {
+            "name": "基准计量单位",
+            "columnName": "UN_ISBASE",
+            "type": "checkbox"
+          },
+          {
+            "name": "创建人",
+            "columnName": "UN_CREATOR",
+            "type": "creator"
+          },
+          {
+            "name": "创建日期",
+            "columnName": "UN_CREATEDATE",
+            "type": "createDate"
+          },
+          {
+            "name": "修改人",
+            "columnName": "UN_MODIFIER",
+            "type": "modifier"
+          },
+          {
+            "name": "修改日期",
+            "columnName": "UN_MODIFYDATE",
+            "type": "modifyDate"
+          },
+          {
+            "name": "审核人",
+            "columnName": "UN_AUDITOR",
+            "type": "user",
+            "disableOnAdd": true,
+            "disableOnEdit": true
+          },
+          {
+            "name": "审核日期",
+            "columnName": "UN_AUDITDATE",
+            "type": "date",
+            "disableOnAdd": true,
+            "disableOnEdit": true
+          },
+          {
+            "name": "单据状态",
+            "columnName": "UN_STATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "E",
+                "name": "在录入",
+                "controls": [
+                  {
+                    "type": "menubar",
+                    "scope": [
+                      "auditMenu",
+                      "auditBtn",
+                      "unAuditBtn",
+                      "unSubmitBtn"
+                    ]
+                  }
+                ]
+              },
+              {
+                "code": "S",
+                "name": "已提交",
+                "controls": [
+                  {
+                    "type": "menubar",
+                    "scope": [
+                      "submitBtn",
+                      "unAuditBtn"
+                    ]
+                  },
+                  {
+                    "type": "field",
+                    "scope": [
+                      "BASE_UNIT_UN_CODE",
+                      "BASE_UNIT_UN_NAME",
+                      "BASE_UNIT_UN_GROUPID",
+                      "BASE_UNITCONVERT_UC_CONVERTTYPE",
+                      "BASE_UNIT_UN_ISBASE",
+                      "BASE_UNITCONVERT_UC_DENOMINATOR",
+                      "BASE_UNITCONVERT_UC_MOLECULE"
+                    ]
+                  }
+                ]
+              },
+              {
+                "code": "A",
+                "name": "已审核",
+                "controls": [
+                  {
+                    "type": "menubar",
+                    "scope": [
+                      "submitMenu",
+                      "submitBtn",
+                      "unSubmitBtn",
+                      "auditBtn"
+                    ]
+                  },
+                  {
+                    "type": "field",
+                    "scope": [
+                      "BASE_UNIT_UN_CODE",
+                      "BASE_UNIT_UN_NAME",
+                      "BASE_UNIT_UN_GROUPID",
+                      "BASE_UNITCONVERT_UC_CONVERTTYPE",
+                      "BASE_UNIT_UN_ISBASE",
+                      "BASE_UNITCONVERT_UC_DENOMINATOR",
+                      "BASE_UNITCONVERT_UC_MOLECULE"
+                    ]
+                  }
+                ]
+              }
+            ]
+          },
+          {
+            "name": "禁用人",
+            "columnName": "UN_FORBIDDER",
+            "type": "user",
+            "disableOnAdd": true,
+            "disableOnEdit": true
+          },
+          {
+            "name": "禁用日期",
+            "columnName": "UN_FORBIDDATE",
+            "type": "date",
+            "disableOnAdd": true,
+            "disableOnEdit": true
+          },
+          {
+            "name": "禁用状态",
+            "columnName": "UN_FORBIDSTATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "N",
+                "name": "否",
+                "controls": [
+                  {
+                    "type": "menubar",
+                    "scope": [
+                      "unForbidBtn"
+                    ]
+                  }
+                ]
+              },
+              {
+                "code": "Y",
+                "name": "是",
+                "controls": [
+                  {
+                    "type": "menubar",
+                    "scope": [
+                      "forbidBtn"
+                    ]
+                  },
+                  {
+                    "type": "field",
+                    "scope": [
+                      "BASE_UNIT_UN_CODE",
+                      "BASE_UNIT_UN_NAME",
+                      "BASE_UNIT_UN_DESC",
+                      "BASE_UNIT_UN_GROUPID",
+                      "BASE_UNIT_UN_ROUNDTYPE",
+                      "BASE_UNIT_UN_PRECISION",
+                      "BASE_UNITCONVERT_UC_CONVERTTYPE",
+                      "BASE_UNIT_UN_ISBASE",
+                      "BASE_UNITCONVERT_UC_DENOMINATOR",
+                      "BASE_UNITCONVERT_UC_MOLECULE"
+                    ]
+                  }
+                ]
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "name": "转换率",
+        "tableName": "BASE_UNITCONVERT",
+        "type": "subHead",
+        "idColumnName": "UC_ID",
+        "fields": [
+          {
+            "name": "换算类型",
+            "columnName": "UC_CONVERTTYPE",
+            "type": "enumData",
+            "ref": "base_converttype"
+          },
+          {
+            "name": "换算分母",
+            "columnName": "UC_DENOMINATOR",
+            "type": "float",
+            "defaultValue": 1
+          },
+          {
+            "name": "换算分子",
+            "columnName": "UC_MOLECULE",
+            "type": "float",
+            "defaultValue": 1
+          }
+        ]
+      }
+    ],
+    "operations": [
+      {
+        "id": "save",
+        "name": "保存",
+        "type": "save"
+      },
+      {
+        "id": "submit",
+        "name": "提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UN_STATUS",
+          "statusValue": "S"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UN_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "只能提交在录入的单据"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unSubmit",
+        "name": "反提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UN_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已提交,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UN_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未提交"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "audit",
+        "name": "审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UN_STATUS",
+          "statusValue": "A"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UN_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "请先提交单据"
+            },
+            "level": "error"
+          },
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UN_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "单据已经审核,无需再审"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unAudit",
+        "name": "反审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UN_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UN_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未审核"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "forbid",
+        "name": "禁用",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UN_FORBIDSTATUS",
+          "statusValue": "Y"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已禁用,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UN_FORBIDSTATUS",
+                  "compare": "=",
+                  "value": "Y"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "单据已禁用"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unForbid",
+        "name": "反禁用",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UN_FORBIDSTATUS",
+          "statusValue": "N"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已禁用,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UN_FORBIDSTATUS",
+                  "compare": "=",
+                  "value": "Y"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未禁用"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "new",
+        "name": "新增",
+        "type": "addView",
+        "params": {
+          "viewName": "base_unit",
+          "viewType": "form",
+          "openType": "card"
+        }
+      },
+      {
+        "id": "showList",
+        "name": "列表",
+        "type": "addView",
+        "params": {
+          "viewName": "base_unit",
+          "viewType": "list",
+          "openType": "card"
+        }
+      },
+      {
+        "id": "close",
+        "name": "退出",
+        "type": "closeView"
+      },
+      {
+        "id": "returnData",
+        "name": "返回数据",
+        "type": "returnData"
+      }
+    ],
+    "codeRules": [
+      {
+        "default": true,
+        "name": "计量单位标准编码规则",
+        "description": "计量单位标准编码规则",
+        "editable": true,
+        "repairable": true,
+        "entries": [
+          {
+            "type": "const",
+            "value": "UOM"
+          },
+          {
+            "type": "number",
+            "cover": "0",
+            "seed": 1,
+            "increment": 1,
+            "length": 3
+          }
+        ]
+      }
+    ],
+    "views": [
+      {
+        "viewType": "form",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "form",
+              "menubar": [
+                {
+                  "text": "新增",
+                  "itemId": "newMenu",
+                  "menu": [
+                    {
+                      "text": "新增",
+                      "itemId": "newBtn",
+                      "operation": "new"
+                    },
+                    {
+                      "text": "复制",
+                      "itemId": "copyBtn",
+                      "operation": "copy",
+                      "disableOnAdd": true
+                    }
+                  ]
+                },
+                {
+                  "text": "保存",
+                  "itemId": "saveBtn",
+                  "operation": "save"
+                },
+                {
+                  "text": "提交",
+                  "itemId": "submitMenu",
+                  "menu": [
+                    {
+                      "text": "提交",
+                      "itemId": "submitBtn",
+                      "operation": "submit"
+                    },
+                    {
+                      "text": "反提交",
+                      "itemId": "unSubmitBtn",
+                      "operation": "unSubmit"
+                    }
+                  ]
+                },
+                {
+                  "text": "审核",
+                  "itemId": "auditMenu",
+                  "menu": [
+                    {
+                      "text": "审核",
+                      "itemId": "auditBtn",
+                      "operation": "audit"
+                    },
+                    {
+                      "text": "反审核",
+                      "itemId": "unAuditBtn",
+                      "operation": "unAudit"
+                    }
+                  ]
+                },
+                {
+                  "text": "业务操作",
+                  "itemId": "bizMenu",
+                  "menu": [
+                    {
+                      "text": "禁用",
+                      "itemId": "forbidBtn",
+                      "operation": "forbid",
+                      "disableOnAdd": true
+                    },
+                    {
+                      "text": "反禁用",
+                      "itemId": "unForbidBtn",
+                      "operation": "unForbid"
+                    }
+                  ]
+                },
+                {
+                  "text": "列表",
+                  "itemId": "listBtn",
+                  "operation": "showList"
+                },
+                {
+                  "text": "退出",
+                  "itemId": "closeBtn",
+                  "operation": "close"
+                }
+              ],
+              "items": [
+                {
+                  "xtype": "container",
+                  "height": 50,
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "编码",
+                      "itemId": "BASE_UNIT_UN_CODE",
+                      "bind": "{BASE_UNIT.UN_CODE}",
+                      "emptyText": "保存时自动生成",
+                      "x": 10,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "名称",
+                      "itemId": "BASE_UNIT_UN_NAME",
+                      "bind": "{BASE_UNIT.UN_NAME}",
+                      "x": 310,
+                      "y": 10,
+                      "width": 300
+                    }
+                  ]
+                },
+                {
+                  "xtype": "tabpanel",
+                  "ui": "form",
+                  "height": 500,
+                  "items": [
+                    {
+                      "title": "基本信息",
+                      "layout": "absolute",
+                      "items": [
+                        {
+                          "xtype": "textarea",
+                          "fieldLabel": "描述",
+                          "itemId": "BASE_UNIT_UN_DESC",
+                          "bind": "{BASE_UNIT.UN_DESC}",
+                          "x": 10,
+                          "y": 10,
+                          "width": 300,
+                          "height": 110
+                        },
+                        {
+                          "xtype": "searchfield",
+                          "fieldLabel": "所属组别",
+                          "itemId": "BASE_UNIT_UN_GROUPID",
+                          "bind": "{BASE_UNIT.UN_GROUPID}",
+                          "x": 10,
+                          "y": 130,
+                          "width": 300
+                        },
+                        {
+                          "xtype": "combobox",
+                          "fieldLabel": "换算类型",
+                          "itemId": "BASE_UNITCONVERT_UC_CONVERTTYPE",
+                          "bind": "{BASE_UNITCONVERT.UC_CONVERTTYPE}",
+                          "x": 10,
+                          "y": 170,
+                          "width": 300
+                        },
+                        {
+                          "xtype": "checkbox",
+                          "fieldLabel": "基准计量单位",
+                          "itemId": "BASE_UNIT_UN_ISBASE",
+                          "bind": "{BASE_UNIT.UN_ISBASE}",
+                          "x": 310,
+                          "y": 10,
+                          "width": 300
+                        },
+                        {
+                          "xtype": "numberfield",
+                          "fieldLabel": "精度",
+                          "itemId": "BASE_UNIT_UN_PRECISION",
+                          "bind": "{BASE_UNIT.UN_PRECISION}",
+                          "x": 310,
+                          "y": 50,
+                          "width": 300
+                        },
+                        {
+                          "xtype": "combobox",
+                          "fieldLabel": "舍入类型",
+                          "itemId": "BASE_UNIT_UN_ROUNDTYPE",
+                          "bind": "{BASE_UNIT.UN_ROUNDTYPE}",
+                          "x": 310,
+                          "y": 90,
+                          "width": 300
+                        },
+                        {
+                          "xtype": "textfield",
+                          "fieldLabel": "数据状态",
+                          "itemId": "BASE_UNIT_UN_STATUS",
+                          "bind": "{BASE_UNIT.UN_STATUS}",
+                          "x": 310,
+                          "y": 130,
+                          "width": 300
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "换算关系:",
+                          "x": 50,
+                          "y": 220,
+                          "width": 100
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "换算分母",
+                          "x": 150,
+                          "y": 220,
+                          "width": 70
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "*",
+                          "x": 220,
+                          "y": 220,
+                          "width": 20
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "当前单位",
+                          "x": 240,
+                          "y": 220,
+                          "width": 70
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "=",
+                          "x": 310,
+                          "y": 220,
+                          "width": 20
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "换算分子",
+                          "x": 330,
+                          "y": 220,
+                          "width": 70
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "*",
+                          "x": 410,
+                          "y": 220,
+                          "width": 20
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "基准单位",
+                          "x": 430,
+                          "y": 220,
+                          "width": 70
+                        },
+                        {
+                          "xtype": "numberfield",
+                          "itemId": "BASE_UNITCONVERT_UC_DENOMINATOR",
+                          "bind": "{BASE_UNITCONVERT.UC_DENOMINATOR}",
+                          "x": 140,
+                          "y": 260,
+                          "width": 70
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "*",
+                          "x": 220,
+                          "y": 260,
+                          "width": 20
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "当前单位",
+                          "x": 240,
+                          "y": 260,
+                          "width": 70
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "=",
+                          "x": 310,
+                          "y": 260,
+                          "width": 20
+                        },
+                        {
+                          "xtype": "numberfield",
+                          "itemId": "BASE_UNITCONVERT_UC_MOLECULE",
+                          "bind": "{BASE_UNITCONVERT.UC_MOLECULE}",
+                          "x": 330,
+                          "y": 260,
+                          "width": 70
+                        },
+                        {
+                          "xtype": "component",
+                          "html": "*",
+                          "x": 410,
+                          "y": 260,
+                          "width": 20
+                        },
+                        {
+                          "xtype": "textfield",
+                          "itemId": "BASE_UNIT_UN_BASEUNIT",
+                          "html": "{BASE_UNIT.UN_BASEUNIT}",
+                          "x": 430,
+                          "y": 260,
+                          "width": 70
+                        }
+                      ]
+                    },
+                    {
+                      "title": "其他信息",
+                      "layout": "absolute",
+                      "items": [
+                        {
+                          "x": 10,
+                          "y": 10,
+                          "width": 300,
+                          "fieldLabel": "创建人",
+                          "xtype": "textfield",
+                          "bind": "{BASE_UNIT.UN_CREATOR}",
+                          "itemId": "BASE_UNIT_UN_CREATOR"
+                        },
+                        {
+                          "x": 10,
+                          "y": 50,
+                          "width": 300,
+                          "fieldLabel": "创建日期",
+                          "xtype": "datefield",
+                          "bind": "{BASE_UNIT.UN_CREATEDATE}",
+                          "itemId": "BASE_UNIT_UN_CREATEDATE"
+                        },
+                        {
+                          "x": 10,
+                          "y": 90,
+                          "width": 300,
+                          "fieldLabel": "修改人",
+                          "xtype": "textfield",
+                          "bind": "{BASE_UNIT.UN_MODIFIER}",
+                          "itemId": "BASE_UNIT_UN_MODIFIER"
+                        },
+                        {
+                          "x": 10,
+                          "y": 130,
+                          "width": 300,
+                          "fieldLabel": "修改日期",
+                          "xtype": "datefield",
+                          "bind": "{BASE_UNIT.UN_MODIFYDATE}",
+                          "itemId": "BASE_UNIT_UN_MODIFYDATE"
+                        },
+                        {
+                          "x": 310,
+                          "y": 10,
+                          "width": 300,
+                          "fieldLabel": "审核人",
+                          "xtype": "textfield",
+                          "bind": "{BASE_UNIT.UN_AUDITOR}",
+                          "itemId": "BASE_UNIT_UN_AUDITOR"
+                        },
+                        {
+                          "x": 310,
+                          "y": 50,
+                          "width": 300,
+                          "fieldLabel": "审核日期",
+                          "xtype": "datefield",
+                          "bind": "{BASE_UNIT.UN_AUDITDATE}",
+                          "itemId": "BASE_UNIT_UN_AUDITDATE"
+                        },
+                        {
+                          "x": 610,
+                          "y": 10,
+                          "width": 300,
+                          "fieldLabel": "禁用状态",
+                          "xtype": "textfield",
+                          "bind": "{BASE_UNIT.UN_FORBIDSTATUS}",
+                          "itemId": "BASE_UNIT_UN_FORBIDSTATUS"
+                        },
+                        {
+                          "x": 610,
+                          "y": 50,
+                          "width": 300,
+                          "fieldLabel": "禁用人",
+                          "xtype": "textfield",
+                          "bind": "{BASE_UNIT.UN_FORBIDER}",
+                          "itemId": "BASE_UNIT_UN_FORBIDER"
+                        },
+                        {
+                          "x": 610,
+                          "y": 90,
+                          "width": 300,
+                          "fieldLabel": "禁用时间",
+                          "xtype": "datefield",
+                          "bind": "{BASE_UNIT.UN_FORBIDDATE}",
+                          "itemId": "BASE_UNIT_UN_FORBIDDATE"
+                        }
+                      ]
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      },
+      {
+        "viewType": "list",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "grid",
+              "ui": "form",
+              "menubar": [
+                {
+                  "text": "过滤"
+                },
+                {
+                  "text": "返回数据",
+                  "itemId": "returnDataBtn",
+                  "operation": "returnData"
+                },
+                {
+                  "text": "刷新"
+                },
+                {
+                  "text": "新增",
+                  "menu": [
+                    {
+                      "text": "新增",
+                      "itemId": "newBtn",
+                      "operation": "new"
+                    },
+                    {
+                      "text": "复制"
+                    }
+                  ]
+                },
+                {
+                  "text": "打开"
+                },
+                {
+                  "text": "退出",
+                  "itemId": "closeBtn",
+                  "operation": "close"
+                }
+              ],
+              "showScheme": true,
+              "showHeaderFilter": true,
+              "showPagingBar": true,
+              "selType": "checkboxmodel"
+            }
+          ]
+        },
+        "schemes": [
+          {
+            "name": "缺省方案",
+            "default": true,
+            "columns": [
+              {
+                "field": "UN_CODE",
+                "entity": "BASE_UNIT",
+                "width": 100
+              },
+              {
+                "field": "UN_NAME",
+                "entity": "BASE_UNIT",
+                "width": 200
+              },
+              {
+                "field": "UN_ISBASE",
+                "entity": "BASE_UNIT",
+                "width": 100
+              },
+              {
+                "field": "UN_STATUS",
+                "entity": "BASE_UNIT",
+                "width": 100
+              },
+              {
+                "field": "UN_FORBIDSTATUS",
+                "entity": "BASE_UNIT",
+                "width": 100
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+]

+ 609 - 0
applications/base/src/main/resources/metadata/product/UnitGroup.form.json

@@ -0,0 +1,609 @@
+[
+  {
+    "id": "base_unitgroup",
+    "name": "计量单位组",
+    "type": "baseData",
+    "nameColumnName": "UG_NAME",
+    "idColumnName": "UG_ID",
+    "codeColumnName": "UG_CODE",
+    "entities": [
+      {
+        "name": "单据头",
+        "tableName": "BASE_UNITGROUP",
+        "type": "head",
+        "fields": [
+          {
+            "name": "编码",
+            "columnName": "UG_CODE",
+            "type": "code",
+            "length": 50
+          },
+          {
+            "name": "名称",
+            "columnName": "UG_NAME",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "描述",
+            "columnName": "UG_DESC",
+            "type": "textarea",
+            "length": 255
+          },
+          {
+            "name": "基准单位编码",
+            "columnName": "UG_BASECODE",
+            "type": "text",
+            "length": 50
+          },
+          {
+            "name": "基准单位名称",
+            "columnName": "UG_BASENAME",
+            "type": "text",
+            "length": 50
+          },
+          {
+            "name": "创建人",
+            "columnName": "UG_CREATOR",
+            "type": "creator"
+          },
+          {
+            "name": "创建日期",
+            "columnName": "UG_CREATEDATE",
+            "type": "createDate"
+          },
+          {
+            "name": "修改人",
+            "columnName": "UG_MODIFIER",
+            "type": "modifier"
+          },
+          {
+            "name": "修改日期",
+            "columnName": "UG_MODIFYDATE",
+            "type": "modifyDate"
+          },
+          {
+            "name": "审核人",
+            "columnName": "UG_AUDITOR",
+            "type": "user"
+          },
+          {
+            "name": "审核日期",
+            "columnName": "UG_AUDITDATE",
+            "type": "date"
+          },
+          {
+            "name": "单据状态",
+            "columnName": "UG_STATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "E",
+                "name": "在录入"
+              },
+              {
+                "code": "S",
+                "name": "已提交"
+              },
+              {
+                "code": "A",
+                "name": "已审核"
+              }
+            ]
+          },
+          {
+            "name": "禁用人",
+            "columnName": "UG_FORBIDER",
+            "type": "user"
+          },
+          {
+            "name": "禁用日期",
+            "columnName": "UG_FORBIDDATE",
+            "type": "date"
+          },
+          {
+            "name": "禁用状态",
+            "columnName": "UG_FORBIDSTATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "N",
+                "name": "否"
+              },
+              {
+                "code": "Y",
+                "name": "是"
+              }
+            ]
+          }
+        ]
+      }
+    ],
+    "operations": [
+      {
+        "id": "save",
+        "name": "保存",
+        "type": "save"
+      },
+      {
+        "id": "submit",
+        "name": "提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UG_STATUS",
+          "statusValue": "S"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UG_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "只能提交在录入的单据"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unSubmit",
+        "name": "反提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UG_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已提交,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UG_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未提交"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "audit",
+        "name": "审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UG_STATUS",
+          "statusValue": "A"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UG_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "请先提交单据"
+            },
+            "level": "error"
+          },
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UG_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "单据已经审核,无需再审"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unAudit",
+        "name": "反审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "UG_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "UG_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未审核"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "new",
+        "name": "新增",
+        "type": "addView",
+        "params": {
+          "viewName": "base_unitgroup",
+          "viewType": "form",
+          "openType": "card"
+        }
+      },
+      {
+        "id": "close",
+        "name": "退出",
+        "type": "closeView"
+      },
+      {
+        "id": "returnData",
+        "name": "返回数据",
+        "type": "returnData"
+      }
+    ],
+    "codeRules": [
+      {
+        "default": true,
+        "name": "计量单位组标准编码规则",
+        "description": "计量单位组标准编码规则",
+        "editable": true,
+        "repairable": true,
+        "entries": [
+          {
+            "type": "const",
+            "value": "UG"
+          },
+          {
+            "type": "number",
+            "cover": "0",
+            "seed": 1,
+            "increment": 1,
+            "length": 3
+          }
+        ]
+      }
+    ],
+    "views": [
+      {
+        "viewType": "form",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "menubar",
+              "ui": "form-menubar",
+              "items": [
+                {
+                  "text": "新增",
+                  "menu": [
+                    {
+                      "text": "新增"
+                    },
+                    {
+                      "text": "复制"
+                    }
+                  ]
+                },
+                {
+                  "text": "保存",
+                  "itemId": "tbSave",
+                  "operation": "save"
+                },
+                {
+                  "text": "提交",
+                  "menu": [
+                    {
+                      "text": "提交",
+                      "itemId": "tbSubmit",
+                      "operation": "submit"
+                    },
+                    {
+                      "text": "反提交",
+                      "itemId": "tbUnSubmit",
+                      "operation": "unSubmit"
+                    }
+                  ]
+                },
+                {
+                  "text": "审核",
+                  "menu": [
+                    {
+                      "text": "审核",
+                      "itemId": "tbAudit",
+                      "operation": "audit"
+                    },
+                    {
+                      "text": "反审核",
+                      "itemId": "tbUnAudit",
+                      "operation": "unAudit"
+                    }
+                  ]
+                },
+                {
+                  "text": "列表"
+                },
+                {
+                  "text": "退出",
+                  "itemId": "closeBtn",
+                  "operation": "close"
+                }
+              ]
+            },
+            {
+              "xtype": "container",
+              "height": 50,
+              "layout": "absolute",
+              "items": [
+                {
+                  "xtype": "textfield",
+                  "fieldLabel": "编码",
+                  "bind": "{BASE_UNITGROUP.UG_CODE}",
+                  "emptyText": "保存时自动生成",
+                  "x": 10,
+                  "y": 10,
+                  "width": 300
+                },
+                {
+                  "xtype": "textfield",
+                  "fieldLabel": "名称",
+                  "bind": "{BASE_UNITGROUP.UG_NAME}",
+                  "x": 310,
+                  "y": 10,
+                  "width": 300
+                }
+              ]
+            },
+            {
+              "xtype": "tabpanel",
+              "ui": "form",
+              "height": 500,
+              "items": [
+                {
+                  "title": "基本信息",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "xtype": "textarea",
+                      "fieldLabel": "描述",
+                      "bind": "{BASE_UNITGROUP.UG_DESC}",
+                      "x": 10,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "基准单位编码",
+                      "bind": "{BASE_UNITGROUP.UG_BASECODE}",
+                      "x": 10,
+                      "y": 90,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "基准单位名称",
+                      "bind": "{BASE_UNITGROUP.UG_BASENAME}",
+                      "x": 10,
+                      "y": 130,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "数据状态",
+                      "bind": "{BASE_UNITGROUP.UG_STATUS}",
+                      "x": 310,
+                      "y": 10,
+                      "width": 300
+                    }
+                  ]
+                },
+                {
+                  "title": "其他信息",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "x": 10,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "创建人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_UNITGROUP.UG_CREATOR}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "创建日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_UNITGROUP.UG_CREATEDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 90,
+                      "width": 300,
+                      "fieldLabel": "修改人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_UNITGROUP.UG_MODIFIER}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 130,
+                      "width": 300,
+                      "fieldLabel": "修改日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_UNITGROUP.UG_MODIFYDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 310,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "审核人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_UNITGROUP.UG_AUDITOR}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 310,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "审核日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_UNITGROUP.UG_AUDITDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "禁用状态",
+                      "xtype": "textfield",
+                      "bind": "{BASE_UNITGROUP.UG_FORBIDSTATUS}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "禁用人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_UNITGROUP.UG_FORBIDER}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 90,
+                      "width": 300,
+                      "fieldLabel": "禁用时间",
+                      "xtype": "datefield",
+                      "bind": "{BASE_UNITGROUP.UG_FORBIDDATE}",
+                      "disabled": true
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      },
+      {
+        "viewType": "list",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "gridpanel",
+              "ui": "form",
+              "menubar": [
+                {
+                  "text": "过滤"
+                },
+                {
+                  "text": "返回数据",
+                  "itemId": "returnDataBtn",
+                  "operation": "returnData"
+                },
+                {
+                  "text": "刷新"
+                },
+                {
+                  "text": "新增",
+                  "menu": [
+                    {
+                      "text": "新增",
+                      "itemId": "newBtn",
+                      "operation": "new"
+                    },
+                    {
+                      "text": "复制"
+                    }
+                  ]
+                },
+                {
+                  "text": "打开"
+                },
+                {
+                  "text": "退出",
+                  "itemId": "closeBtn",
+                  "operation": "close"
+                }
+              ],
+              "showScheme": true,
+              "showHeaderFilter": true,
+              "showPagingBar": true,
+              "selType": "checkboxmodel"
+            }
+          ]
+        },
+        "schemes": [
+          {
+            "name": "缺省方案",
+            "default": true,
+            "columns": [
+              {
+                "field": "UG_CODE",
+                "entity": "BASE_UNITGROUP",
+                "width": 100
+              },
+              {
+                "field": "UG_NAME",
+                "entity": "BASE_UNITGROUP",
+                "width": 200
+              },
+              {
+                "field": "UG_BASENAME",
+                "entity": "BASE_UNITGROUP",
+                "width": 100
+              },
+              {
+                "field": "UG_STATUS",
+                "entity": "BASE_UNITGROUP",
+                "width": 100
+              },
+              {
+                "field": "UG_FORBIDSTATUS",
+                "entity": "BASE_UNITGROUP",
+                "width": 100
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+]

+ 947 - 0
applications/base/src/main/resources/metadata/supplier/Supplier.form.json

@@ -0,0 +1,947 @@
+[
+  {
+    "id": "base_supplier",
+    "name": "供应商",
+    "type": "baseData",
+    "nameColumnName": "SU_NAME",
+    "idColumnName": "SU_ID",
+    "codeColumnName": "SU_CODE",
+    "entities": [
+      {
+        "name": "单据头",
+        "tableName": "BASE_SUPPLIER",
+        "type": "head",
+        "fields": [
+          {
+            "name": "编码",
+            "columnName": "SU_CODE",
+            "type": "code",
+            "length": 50
+          },
+          {
+            "name": "名称",
+            "columnName": "SU_NAME",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "简称",
+            "columnName": "SU_SHORTNAME",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "创建人",
+            "columnName": "SU_CREATOR",
+            "type": "creator"
+          },
+          {
+            "name": "创建日期",
+            "columnName": "SU_CREATEDATE",
+            "type": "createDate"
+          },
+          {
+            "name": "修改人",
+            "columnName": "SU_MODIFIER",
+            "type": "modifier"
+          },
+          {
+            "name": "修改日期",
+            "columnName": "SU_MODIFYDATE",
+            "type": "modifyDate"
+          },
+          {
+            "name": "审核人",
+            "columnName": "SU_AUDITOR",
+            "type": "user"
+          },
+          {
+            "name": "审核日期",
+            "columnName": "SU_AUDITDATE",
+            "type": "date"
+          },
+          {
+            "name": "单据状态",
+            "columnName": "SU_STATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "E",
+                "name": "在录入"
+              },
+              {
+                "code": "S",
+                "name": "已提交"
+              },
+              {
+                "code": "A",
+                "name": "已审核"
+              }
+            ]
+          },
+          {
+            "name": "禁用人",
+            "columnName": "SU_FORBIDER",
+            "type": "user"
+          },
+          {
+            "name": "禁用日期",
+            "columnName": "SU_FORBIDDATE",
+            "type": "date"
+          },
+          {
+            "name": "禁用状态",
+            "columnName": "SU_FORBIDSTATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "N",
+                "name": "否",
+                "control": [
+                  {
+                    "type": "field",
+                    "scope": [
+                      "BASE_SUPPLIER.SU_CODE",
+                      "BASE_SUPPLIER.SU_NAME",
+                      "BASE_SUPPLIER.SU_SHORTNAME",
+                      "BASE_SUPPLIER_BASE.SU_COUNTRY",
+                      "BASE_SUPPLIER_BASE.SU_AREA",
+                      "BASE_SUPPLIER_BASE.SU_ADDRESS",
+                      "BASE_SUPPLIER_BASE.SU_CREDITCODE",
+                      "BASE_SUPPLIER_BASE.SU_TRADE",
+                      "BASE_SUPPLIER_BASE.SU_REGADDRESS",
+                      "BASE_SUPPLIER_BASE.SU_GRADE",
+                      "BASE_SUPPLIER_BASE.SU_CLASSIFY"
+                    ]
+                  },
+                  {
+                    "type": "menubar",
+                    "scope": []
+                  }
+                ]
+              },
+              {
+                "code": "Y",
+                "name": "是"
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "name": "基本信息",
+        "tableName": "BASE_SUPPLIER_BASE",
+        "type": "subHead",
+        "idColumnName": "SU_BASE_ID",
+        "fields": [
+          {
+            "name": "国家",
+            "columnName": "SU_COUNTRY",
+            "type": "supportData",
+            "ref": "base_country"
+          },
+          {
+            "name": "地区",
+            "columnName": "SU_AREA",
+            "type": "supportData",
+            "ref": "base_area",
+            "parentRefField": "SU_COUNTRY"
+          },
+          {
+            "name": "通讯地址",
+            "columnName": "SU_ADDRESS",
+            "type": "textarea",
+            "length": 255
+          },
+          {
+            "name": "行业",
+            "columnName": "SU_TRADE",
+            "type": "supportData",
+            "ref": "base_trade"
+          },
+          {
+            "name": "统一社会信用代码",
+            "columnName": "SU_CREDITCODE",
+            "type": "text",
+            "length": 50
+          },
+          {
+            "name": "注册地址",
+            "columnName": "SU_REGADDRESS",
+            "type": "textarea",
+            "length": 255
+          },
+          {
+            "name": "供应商等级",
+            "columnName": "SU_GRADE",
+            "type": "supportData",
+            "ref": "base_supplier_grade"
+          },
+          {
+            "name": "供应商分类",
+            "columnName": "SU_CLASSIFY",
+            "type": "supportData",
+            "ref": "base_supplier_classify"
+          }
+        ]
+      },
+      {
+        "name": "联系人",
+        "tableName": "BASE_SUPPLIER_CT",
+        "type": "entry",
+        "idColumnName": "SU_CONTRACT_ID",
+        "fields": [
+          {
+            "name": "编码",
+            "columnName": "SU_CODE",
+            "type": "text",
+            "length": 50
+          },
+          {
+            "name": "联系人",
+            "columnName": "SU_CONTRACT",
+            "type": "text",
+            "length": 50
+          },
+          {
+            "name": "电话",
+            "columnName": "SU_TEL",
+            "type": "text",
+            "length": 20
+          },
+          {
+            "name": "邮箱",
+            "columnName": "SU_EMAIL",
+            "type": "text",
+            "length": 50
+          },
+          {
+            "name": "默认",
+            "columnName": "SU_IS_DEFAULT",
+            "type": "checkbox"
+          },
+          {
+            "name": "备注",
+            "columnName": "SU_DESC",
+            "type": "text",
+            "length": 255
+          }
+        ]
+      },
+      {
+        "name": "银行信息",
+        "tableName": "BASE_SUPPLIER_BANK",
+        "type": "entry",
+        "idColumnName": "SU_BANK_ID",
+        "fields": [
+          {
+            "name": "国家",
+            "columnName": "SU_COUNTRY",
+            "type": "supportData",
+            "ref": "base_country"
+          },
+          {
+            "name": "开户银行",
+            "columnName": "SU_OPENNAME",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "开户行地址",
+            "columnName": "SU_OPENADDR",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "银行账号",
+            "columnName": "SU_CODE",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "账户名称",
+            "columnName": "SU_NAME",
+            "type": "text",
+            "length": 255
+          },
+          {
+            "name": "币别",
+            "columnName": "SU_CURRENCY",
+            "type": "baseData",
+            "ref": "base_currency"
+          },
+          {
+            "name": "默认",
+            "columnName": "SU_IS_DEFAULT",
+            "type": "checkbox"
+          }
+        ]
+      },
+      {
+        "name": "财务信息",
+        "tableName": "BASE_SUPPLIER_FIN",
+        "type": "subHead",
+        "idColumnName": "SU_FINANCE_ID",
+        "fields": [
+          {
+            "name": "发票类型",
+            "columnName": "SU_INVOICE_TYPE",
+            "type": "enumData",
+            "ref": "base_invoice_type"
+          },
+          {
+            "name": "结算币别",
+            "columnName": "SU_CURRENCY",
+            "type": "baseData",
+            "ref": "base_currency"
+          }
+        ]
+      }
+    ],
+    "operations": [
+      {
+        "id": "save",
+        "name": "保存",
+        "type": "save"
+      },
+      {
+        "id": "submit",
+        "name": "提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "SU_STATUS",
+          "statusValue": "S"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "SU_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "只能提交在录入的单据"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unSubmit",
+        "name": "反提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "SU_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已提交,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "SU_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未提交"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "audit",
+        "name": "审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "SU_STATUS",
+          "statusValue": "A"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "SU_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "请先提交单据"
+            },
+            "level": "error"
+          },
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "SU_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "单据已经审核,无需再审"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unAudit",
+        "name": "反审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "SU_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "SU_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未审核"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "new",
+        "name": "新增",
+        "type": "addView",
+        "params": {
+          "viewName": "base_supplier",
+          "viewType": "form",
+          "openType": "card"
+        }
+      },
+      {
+        "id": "close",
+        "name": "退出",
+        "type": "closeView"
+      },
+      {
+        "id": "returnData",
+        "name": "返回数据",
+        "type": "returnData"
+      }
+    ],
+    "views": [
+      {
+        "viewType": "form",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "menubar",
+              "ui": "form-menubar",
+              "items": [
+                {
+                  "text": "新增",
+                  "menu": [
+                    {
+                      "text": "新增"
+                    },
+                    {
+                      "text": "复制"
+                    }
+                  ]
+                },
+                {
+                  "text": "保存",
+                  "reference": "tbSave",
+                  "operation": "save"
+                },
+                {
+                  "text": "提交",
+                  "menu": [
+                    {
+                      "text": "提交",
+                      "reference": "tbSubmit",
+                      "operation": "submit"
+                    },
+                    {
+                      "text": "反提交",
+                      "reference": "tbUnSubmit",
+                      "operation": "unSubmit"
+                    }
+                  ]
+                },
+                {
+                  "text": "审核",
+                  "menu": [
+                    {
+                      "text": "审核",
+                      "reference": "tbAudit",
+                      "operation": "audit"
+                    },
+                    {
+                      "text": "反审核",
+                      "reference": "tbUnAudit",
+                      "operation": "unAudit"
+                    }
+                  ]
+                },
+                {
+                  "text": "列表"
+                },
+                {
+                  "text": "退出",
+                  "reference": "closeBtn",
+                  "operation": "close"
+                }
+              ]
+            },
+            {
+              "xtype": "container",
+              "height": 50,
+              "layout": "absolute",
+              "items": [
+                {
+                  "xtype": "textfield",
+                  "fieldLabel": "编码",
+                  "bind": "{BASE_SUPPLIER.SU_CODE}",
+                  "emptyText": "保存时自动生成",
+                  "x": 10,
+                  "y": 10,
+                  "width": 300
+                },
+                {
+                  "xtype": "textfield",
+                  "fieldLabel": "名称",
+                  "bind": "{BASE_SUPPLIER.SU_NAME}",
+                  "x": 310,
+                  "y": 10,
+                  "width": 300
+                },
+                {
+                  "xtype": "textfield",
+                  "fieldLabel": "简称",
+                  "bind": "{BASE_SUPPLIER.SU_SHORTNAME}",
+                  "x": 610,
+                  "y": 10,
+                  "width": 300
+                }
+              ]
+            },
+            {
+              "xtype": "tabpanel",
+              "ui": "form",
+              "height": 500,
+              "items": [
+                {
+                  "title": "基本信息",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "国家",
+                      "bind": "{BASE_SUPPLIER_BASE.SU_COUNTRY}",
+                      "editable": false,
+                      "x": 10,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "地区",
+                      "bind": "{BASE_SUPPLIER_BASE.SU_AREA}",
+                      "editable": false,
+                      "x": 10,
+                      "y": 50,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textarea",
+                      "fieldLabel": "通讯地址",
+                      "bind": "{BASE_SUPPLIER_BASE.SU_ADDRESS}",
+                      "x": 10,
+                      "y": 90,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "行业",
+                      "bind": "{BASE_SUPPLIER_BASE.SU_TRADE}",
+                      "editable": false,
+                      "x": 310,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "统一社会信用码",
+                      "bind": "{BASE_SUPPLIER_BASE.SU_CREDITCODE}",
+                      "x": 310,
+                      "y": 50,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textarea",
+                      "fieldLabel": "注册地址",
+                      "bind": "{BASE_SUPPLIER_BASE.SU_REGADDRESS}",
+                      "x": 310,
+                      "y": 90,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "供应商等级",
+                      "bind": "{BASE_SUPPLIER_BASE.SU_GRADE}",
+                      "x": 610,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "供应商分类",
+                      "bind": "{BASE_SUPPLIER_BASE.SU_CLASSIFY}",
+                      "x": 610,
+                      "y": 50,
+                      "width": 300
+                    }
+                  ]
+                },
+                {
+                  "title": "联系人",
+                  "layout": "fit",
+                  "items": [
+                    {
+                      "xtype": "gridpanel",
+                      "ui": "form",
+                      "height": 368,
+                      "entity": "BASE_SUPPLIER_CT",
+                      "bind": "{BASE_SUPPLIER_CT}",
+                      "columns": [
+                        {
+                          "text": "编码",
+                          "dataIndex": "SU_CODE"
+                        },
+                        {
+                          "text": "联系人",
+                          "dataIndex": "SU_CONTRACT"
+                        },
+                        {
+                          "text": "电话",
+                          "dataIndex": "SU_TEL"
+                        },
+                        {
+                          "text": "邮箱",
+                          "dataIndex": "SU_EMAIL"
+                        },
+                        {
+                          "text": "默认",
+                          "dataIndex": "SU_IS_DEFAULT"
+                        },
+                        {
+                          "text": "备注",
+                          "dataIndex": "SU_DESC"
+                        }
+                      ]
+                    }
+                  ]
+                },
+                {
+                  "title": "财务信息",
+                  "layout": {
+                    "type": "vbox",
+                    "pack": "start",
+                    "align": "stretch"
+                  },
+                  "items": [
+                    {
+                      "xtype": "container",
+                      "height": 50,
+                      "layout": "absolute",
+                      "items": [
+                        {
+                          "xtype": "textfield",
+                          "fieldLabel": "发票类型",
+                          "bind": "{BASE_SUPPLIER_FIN.SU_INVOICE_TYPE}",
+                          "x": 10,
+                          "y": 10,
+                          "width": 300
+                        },
+                        {
+                          "xtype": "textfield",
+                          "fieldLabel": "结算币别",
+                          "bind": "{BASE_SUPPLIER_FIN.SU_CURRENCY}",
+                          "x": 310,
+                          "y": 10,
+                          "width": 300
+                        }
+                      ]
+                    },
+                    {
+                      "xtype": "gridpanel",
+                      "ui": "form",
+                      "height": 368,
+                      "entity": "BASE_SUPPLIER_BANK",
+                      "bind": "{BASE_SUPPLIER_BANK}",
+                      "columns": [
+                        {
+                          "text": "国家",
+                          "dataIndex": "SU_COUNTRY"
+                        },
+                        {
+                          "text": "开户银行",
+                          "dataIndex": "SU_OPENNAME"
+                        },
+                        {
+                          "text": "银行账号",
+                          "dataIndex": "SU_CODE"
+                        },
+                        {
+                          "text": "账户名称",
+                          "dataIndex": "SU_NAME"
+                        },
+                        {
+                          "text": "币别",
+                          "dataIndex": "SU_CURRENCY"
+                        },
+                        {
+                          "text": "默认",
+                          "dataIndex": "SU_IS_DEFAULT"
+                        }
+                      ]
+                    }
+                  ]
+                },
+                {
+                  "title": "其他信息",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "x": 10,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "创建人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_SUPPLIER.SU_CREATOR}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "创建日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_SUPPLIER.SU_CREATEDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 90,
+                      "width": 300,
+                      "fieldLabel": "修改人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_SUPPLIER.SU_MODIFIER}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 130,
+                      "width": 300,
+                      "fieldLabel": "修改日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_SUPPLIER.SU_MODIFYDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 310,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "审核人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_SUPPLIER.SU_AUDITOR}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 310,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "审核日期",
+                      "xtype": "datefield",
+                      "bind": "{BASE_SUPPLIER.SU_AUDITDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "禁用状态",
+                      "xtype": "textfield",
+                      "bind": "{BASE_SUPPLIER.SU_FORBIDSTATUS}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "禁用人",
+                      "xtype": "textfield",
+                      "bind": "{BASE_SUPPLIER.SU_FORBIDER}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 90,
+                      "width": 300,
+                      "fieldLabel": "禁用时间",
+                      "xtype": "datefield",
+                      "bind": "{BASE_SUPPLIER.SU_FORBIDDATE}",
+                      "disabled": true
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      },
+      {
+        "viewType": "list",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "gridpanel",
+              "ui": "form",
+              "menubar": [
+                {
+                  "text": "过滤"
+                },
+                {
+                  "text": "返回数据",
+                  "reference": "returnDataBtn",
+                  "operation": "returnData"
+                },
+                {
+                  "text": "刷新"
+                },
+                {
+                  "text": "新增",
+                  "menu": [
+                    {
+                      "text": "新增",
+                      "reference": "newBtn",
+                      "operation": "new"
+                    },
+                    {
+                      "text": "复制"
+                    }
+                  ]
+                },
+                {
+                  "text": "打开"
+                },
+                {
+                  "text": "退出",
+                  "reference": "closeBtn",
+                  "operation": "close"
+                }
+              ],
+              "showScheme": true,
+              "showHeaderFilter": true,
+              "showPagingBar": true,
+              "selType": "checkboxmodel"
+            }
+          ]
+        },
+        "schemes": [
+          {
+            "name": "缺省方案",
+            "default": true,
+            "columns": [
+              {
+                "entity": "BASE_SUPPLIER",
+                "field": "SU_CODE",
+                "width": 100
+              },
+              {
+                "entity": "BASE_SUPPLIER",
+                "field": "SU_NAME",
+                "width": 200
+              },
+              {
+                "entity": "BASE_SUPPLIER",
+                "field": "SU_SHORTNAME",
+                "width": 100
+              },
+              {
+                "entity": "BASE_SUPPLIER_BASE",
+                "field": "SU_CLASSIFY",
+                "width": 100
+              },
+              {
+                "entity": "BASE_SUPPLIER",
+                "field": "SU_AUDITOR",
+                "width": 70
+              },
+              {
+                "entity": "BASE_SUPPLIER",
+                "field": "SU_AUDITDATE",
+                "width": 70
+              },
+              {
+                "entity": "BASE_SUPPLIER",
+                "field": "SU_STATUS",
+                "width": 70
+              },
+              {
+                "entity": "BASE_SUPPLIER",
+                "field": "SU_FORBIDSTATUS",
+                "width": 70
+              }
+            ]
+          }
+        ]
+      }
+    ],
+    "codeRules": [
+      {
+        "default": true,
+        "name": "供应商编码规则",
+        "description": "供应商编码规则",
+        "editable": true,
+        "repairable": true,
+        "entries": [
+          {
+            "type": "number",
+            "cover": "0",
+            "seed": 1,
+            "increment": 1,
+            "length": 4
+          }
+        ]
+      }
+    ]
+  }
+]

+ 0 - 0
applications/scm/scm-base/src/main/resources/metadata/Cost.domain.json → applications/cost/cost-base/src/main/resources/metadata/Cost.domain.json


+ 0 - 0
applications/cost/cost-base/src/main/resources/metadata/Cost.fn.json


+ 28 - 0
applications/crm/crm-base/src/main/resources/metadata/Crm.domain.json

@@ -0,0 +1,28 @@
+[
+  {
+    "name": "客户关系管理",
+    "id": "cust",
+    "modules": [
+      {
+        "id": "cust_customer",
+        "name": "客户管理"
+      },
+      {
+        "id": "cust_market",
+        "name": "市场营销"
+      },
+      {
+        "id": "cust_sale",
+        "name": "销售过程管理"
+      },
+      {
+        "id": "cust_mgm",
+        "name": "日常管理"
+      },
+      {
+        "id": "cust_serve",
+        "name": "服务管理"
+      }
+    ]
+  }
+]

+ 12 - 0
applications/crm/crm-base/src/main/resources/metadata/Crm.fn.json

@@ -0,0 +1,12 @@
+[
+  {
+    "groupId": "cust_customer",
+    "groupName": "客户管理",
+    "module": "cust_customer",
+    "entries": [
+      {
+
+      }
+    ]
+  }
+]

+ 0 - 0
applications/scm/scm-base/src/main/resources/metadata/Ecommerce.domain.json → applications/ec/ec-base/src/main/resources/metadata/Ec.domain.json


+ 0 - 0
applications/ec/ec-base/src/main/resources/metadata/Ec.fn.json


+ 0 - 0
applications/scm/scm-base/src/main/resources/metadata/Finance.domain.json → applications/fa/fa-base/src/main/resources/metadata/Fa.domain.json


+ 0 - 0
applications/fa/fa-base/src/main/resources/metadata/Fa.fn.json


+ 0 - 0
applications/scm/scm-base/src/main/resources/metadata/PLM.domain.json → applications/plm/plm-base/src/main/resources/metadata/Plm.domain.json


+ 0 - 0
applications/plm/plm-base/src/main/resources/metadata/Plm.fn.json


+ 0 - 0
applications/scm/scm-base/src/main/resources/metadata/PM.domain.json → applications/pm/pm-base/src/main/resources/metadata/Pm.domain.json


+ 0 - 0
applications/pm/pm-base/src/main/resources/metadata/Pm.fn.json


+ 0 - 0
applications/scm/scm-barcode/src/main/resources/metadata/Barcode.fn.json


+ 32 - 0
applications/scm/scm-barcode/src/main/resources/metadata/Barcode.module.json

@@ -0,0 +1,32 @@
+[
+  {
+    "id": "scm_purchase",
+    "name": "采购管理",
+    "domain": "scm"
+  },
+  {
+    "id": "scm_sale",
+    "name": "销售管理",
+    "domain": "scm"
+  },
+  {
+    "id": "scm_credit",
+    "name": "信用管理",
+    "domain": "scm"
+  },
+  {
+    "id": "scm_stock",
+    "name": "库存管理",
+    "domain": "scm"
+  },
+  {
+    "id": "scm_org",
+    "name": "组织间结算",
+    "domain": "scm"
+  },
+  {
+    "id": "scm_barcode",
+    "name": "条码管理",
+    "domain": "scm"
+  }
+]

+ 0 - 6
applications/scm/scm-base/src/main/resources/metadata/Base.domain.json

@@ -1,6 +0,0 @@
-[
-  {
-    "name": "基础管理",
-    "id": "base"
-  }
-]

+ 0 - 17
applications/scm/scm-base/src/main/resources/metadata/Base.module.json

@@ -1,17 +0,0 @@
-[
-  {
-    "id": "base_data",
-    "name": "基础资料",
-    "domain": "base"
-  },
-  {
-    "id": "base_setting",
-    "name": "公共设置",
-    "domain": "base"
-  },
-  {
-    "id": "base_init",
-    "name": "初始化管理",
-    "domain": "base"
-  }
-]

+ 0 - 6
applications/scm/scm-base/src/main/resources/metadata/Customer.domain.json

@@ -1,6 +0,0 @@
-[
-  {
-    "name": "客户关系管理",
-    "id": "cust"
-  }
-]

+ 0 - 781
applications/scm/scm-base/src/main/resources/metadata/product/Product.form.json

@@ -1,781 +0,0 @@
-[
-  {
-    "id": "base_product",
-    "name": "物料",
-    "type": "baseData",
-    "nameColumnName": "BASE_PRODUCT.PR_NAME",
-    "idColumnName": "PR_ID",
-    "codeColumnName": "PR_CODE",
-    "entities": [
-      {
-        "name": "物料",
-        "tableName": "BASE_PRODUCT",
-        "type": "head",
-        "fields": [
-          {
-            "name": "编码",
-            "columnName": "PR_CODE",
-            "type": "code",
-            "length": 50
-          },
-          {
-            "name": "名称",
-            "columnName": "PR_NAME",
-            "type": "text",
-            "length": 255
-          },
-          {
-            "name": "创建人",
-            "columnName": "PR_CREATOR",
-            "type": "creator"
-          },
-          {
-            "name": "创建日期",
-            "columnName": "PR_CREATEDATE",
-            "type": "createDate"
-          },
-          {
-            "name": "修改人",
-            "columnName": "PR_MODIFIER",
-            "type": "modifier"
-          },
-          {
-            "name": "修改日期",
-            "columnName": "PR_MODIFYDATE",
-            "type": "modifyDate"
-          },
-          {
-            "name": "审核人",
-            "columnName": "PR_AUDITOR",
-            "type": "user"
-          },
-          {
-            "name": "审核日期",
-            "columnName": "PR_AUDITDATE",
-            "type": "date"
-          },
-          {
-            "name": "单据状态",
-            "columnName": "PR_STATUS",
-            "type": "status",
-            "statusList": [
-              {
-                "code": "E",
-                "name": "在录入"
-              },
-              {
-                "code": "S",
-                "name": "已提交"
-              },
-              {
-                "code": "A",
-                "name": "已审核"
-              }
-            ]
-          },
-          {
-            "name": "禁用人",
-            "columnName": "PR_FORBIDER",
-            "type": "user"
-          },
-          {
-            "name": "禁用日期",
-            "columnName": "PR_FORBIDDATE",
-            "type": "date"
-          },
-          {
-            "name": "禁用状态",
-            "columnName": "PR_FORBIDSTATUS",
-            "type": "status",
-            "statusList": [
-              {
-                "code": "N",
-                "name": "否",
-                "control": [
-                  {
-                    "type": "field",
-                    "scope": [
-                      "BASE_PRODUCT.PR_CODE",
-                      "BASE_PRODUCT.PR_NAME"
-                    ]
-                  },
-                  {
-                    "type": "menubar",
-                    "scope": []
-                  }
-                ]
-              },
-              {
-                "code": "Y",
-                "name": "是"
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "name": "基本信息",
-        "tableName": "BASE_PRODUCT_BASE",
-        "type": "subHead",
-        "idColumnName": "PR_BASE_ID",
-        "fields": [
-          {
-            "name": "允许采购",
-            "columnName": "PR_IS_PURCHASE",
-            "type": "checkbox"
-          },
-          {
-            "name": "允许销售",
-            "columnName": "PR_IS_SALE",
-            "type": "checkbox"
-          },
-          {
-            "name": "允许生产",
-            "columnName": "PR_IS_MAKE",
-            "type": "checkbox"
-          },
-          {
-            "name": "允许委外",
-            "columnName": "PR_IS_OSMAKE",
-            "type": "checkbox"
-          },
-          {
-            "name": "允许库存",
-            "columnName": "PR_IS_STOCK",
-            "type": "checkbox"
-          }
-        ]
-      },
-      {
-        "name": "采购",
-        "tableName": "BASE_PRODUCT_PURC",
-        "type": "subHead",
-        "idColumnName": "PR_PURC_ID",
-        "fields": [
-          {
-            "name": "最小包装数",
-            "columnName": "PR_MIN_PACK",
-            "type": "int"
-          },
-          {
-            "name": "收货提前天数",
-            "columnName": "PR_RECE_DAY",
-            "type": "int"
-          },
-          {
-            "name": "允许退料",
-            "columnName": "PR_PURC_RETURN",
-            "type": "checkbox"
-          },
-          {
-            "name": "采购单位",
-            "columnName": "PR_UNIT",
-            "type": "baseData",
-            "ref": "base_unit"
-          },
-          {
-            "name": "采购计价单位",
-            "columnName": "PR_PRICE_UNIT",
-            "type": "baseData",
-            "ref": "base_unit"
-          }
-        ]
-      },
-      {
-        "name": "销售",
-        "tableName": "BASE_PRODUCT_SALE",
-        "type": "subHead",
-        "idColumnName": "PR_SALE_ID",
-        "fields": [
-          {
-            "name": "起订量",
-            "columnName": "PR_MIN_ORDER",
-            "type": "int"
-          },
-          {
-            "name": "允许退料",
-            "columnName": "PR_SALE_RETURN",
-            "type": "checkbox"
-          },
-          {
-            "name": "销售单位",
-            "columnName": "PR_SALE_UNIT",
-            "type": "baseData",
-            "ref": "base_unit"
-          },
-          {
-            "name": "销售计价单位",
-            "columnName": "PR_SALE_PRICE_UNIT",
-            "type": "baseData",
-            "ref": "base_unit"
-          }
-        ]
-      }
-    ],
-    "operations": [
-      {
-        "id": "save",
-        "name": "保存",
-        "type": "save"
-      },
-      {
-        "id": "submit",
-        "name": "提交",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "PR_STATUS",
-          "statusValue": "S"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 在录入,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PR_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "只能提交在录入的单据"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "unSubmit",
-        "name": "反提交",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "PR_STATUS",
-          "statusValue": "E"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 已提交,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PR_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "单据未提交"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "audit",
-        "name": "审核",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "PR_STATUS",
-          "statusValue": "A"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 在录入,不允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PR_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": true,
-              "message": "请先提交单据"
-            },
-            "level": "error"
-          },
-          {
-            "type": "legal",
-            "description": "状态 = 已审核,不允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PR_STATUS",
-                  "compare": "=",
-                  "value": "A"
-                }
-              ],
-              "triggerOnTrue": true,
-              "message": "单据已经审核,无需再审"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "unAudit",
-        "name": "反审核",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "PR_STATUS",
-          "statusValue": "E"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 已审核,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PR_STATUS",
-                  "compare": "=",
-                  "value": "A"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "单据未审核"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "new",
-        "name": "新增",
-        "type": "addView",
-        "params": {
-          "viewName": "base_product",
-          "viewType": "form",
-          "openType": "card"
-        }
-      },
-      {
-        "id": "close",
-        "name": "退出",
-        "type": "closeView"
-      },
-      {
-        "id": "returnData",
-        "name": "返回数据",
-        "type": "returnData"
-      }
-    ],
-    "codeRules": [
-      {
-        "default": true,
-        "name": "物料编码规则",
-        "description": "物料编码规则",
-        "editable": true,
-        "repairable": true,
-        "entries": [
-          {
-            "type": "number",
-            "cover": "0",
-            "seed": 1,
-            "increment": 1,
-            "length": 4
-          }
-        ]
-      }
-    ],
-    "views": [
-      {
-        "viewType": "form",
-        "layout": "fit",
-        "items": [
-          {
-            "xtype": "menubar",
-            "ui": "form-menubar",
-            "items": [
-              {
-                "text": "新增",
-                "menu": [
-                  {
-                    "text": "新增"
-                  },
-                  {
-                    "text": "复制"
-                  }
-                ]
-              },
-              {
-                "text": "保存",
-                "reference": "tbSave",
-                "operation": "save"
-              },
-              {
-                "text": "提交",
-                "menu": [
-                  {
-                    "text": "提交",
-                    "reference": "tbSubmit",
-                    "operation": "submit"
-                  },
-                  {
-                    "text": "反提交",
-                    "reference": "tbUnSubmit",
-                    "operation": "unSubmit"
-                  }
-                ]
-              },
-              {
-                "text": "审核",
-                "menu": [
-                  {
-                    "text": "审核",
-                    "reference": "tbAudit",
-                    "operation": "audit"
-                  },
-                  {
-                    "text": "反审核",
-                    "reference": "tbUnAudit",
-                    "operation": "unAudit"
-                  }
-                ]
-              },
-              {
-                "text": "列表"
-              },
-              {
-                "text": "退出",
-                "reference": "closeBtn",
-                "operation": "close"
-              }
-            ]
-          },
-          {
-            "xtype": "container",
-            "height": 50,
-            "layout": "absolute",
-            "items": [
-              {
-                "xtype": "textfield",
-                "fieldLabel": "编码",
-                "bind": "{BASE_PRODUCT.PR_CODE}",
-                "emptyText": "保存时自动生成",
-                "x": 10,
-                "y": 10,
-                "width": 300
-              },
-              {
-                "xtype": "textfield",
-                "fieldLabel": "名称",
-                "bind": "{BASE_PRODUCT.PR_NAME}",
-                "x": 310,
-                "y": 10,
-                "width": 300
-              }
-            ]
-          },
-          {
-            "xtype": "tabpanel",
-            "ui": "form",
-            "height": 500,
-            "items": [
-              {
-                "title": "基本信息",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "xtype": "checkbox",
-                    "fieldLabel": "允许采购",
-                    "bind": "{BASE_PRODUCT_BASE.PR_IS_PURCHASE}",
-                    "x": 10,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "checkbox",
-                    "fieldLabel": "允许销售",
-                    "bind": "{BASE_PRODUCT_BASE.PR_IS_SALE}",
-                    "x": 10,
-                    "y": 50,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "checkbox",
-                    "fieldLabel": "允许生产",
-                    "bind": "{BASE_PRODUCT_BASE.PR_IS_MAKE}",
-                    "x": 310,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "checkbox",
-                    "fieldLabel": "允许委外",
-                    "bind": "{BASE_PRODUCT_BASE.PR_IS_OSMAKE}",
-                    "x": 310,
-                    "y": 50,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "checkbox",
-                    "fieldLabel": "允许库存",
-                    "bind": "{BASE_PRODUCT_BASE.PR_IS_STOCK}",
-                    "x": 610,
-                    "y": 10,
-                    "width": 300
-                  }
-                ]
-              },
-              {
-                "title": "采购",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "xtype": "numberfield",
-                    "fieldLabel": "最小包装数",
-                    "bind": "{BASE_PRODUCT_PURC.PR_MIN_PACK}",
-                    "x": 10,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "numberfield",
-                    "fieldLabel": "收货提前天数",
-                    "bind": "{BASE_PRODUCT_PURC.PR_RECE_DAY}",
-                    "x": 10,
-                    "y": 50,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "checkbox",
-                    "fieldLabel": "允许退料",
-                    "bind": "{BASE_PRODUCT_SALE.PR_PURC_RETURN}",
-                    "x": 10,
-                    "y": 90,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "采购单位",
-                    "bind": "{BASE_PRODUCT_PURC.PR_PURC_UNIT}",
-                    "x": 310,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "采购计价单位",
-                    "bind": "{BASE_PRODUCT_PURC.PR_PURC_PRICE_UNIT}",
-                    "x": 310,
-                    "y": 50,
-                    "width": 300
-                  }
-                ]
-              },
-              {
-                "title": "销售",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "xtype": "numberfield",
-                    "fieldLabel": "起订量",
-                    "bind": "{BASE_PRODUCT_SALE.PR_MIN_ORDER}",
-                    "x": 10,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "checkbox",
-                    "fieldLabel": "允许退料",
-                    "bind": "{BASE_PRODUCT_SALE.PR_SALE_RETURN}",
-                    "x": 10,
-                    "y": 50,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "销售单位",
-                    "bind": "{BASE_PRODUCT_SALE.PR_SALE_UNIT}",
-                    "x": 310,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "销售计价单位",
-                    "bind": "{BASE_PRODUCT_SALE.PR_SALE_PRICE_UNIT}",
-                    "x": 310,
-                    "y": 50,
-                    "width": 300
-                  }
-                ]
-              },
-              {
-                "title": "其他信息",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "x": 10,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "创建人",
-                    "xtype": "textfield",
-                    "bind": "{BASE_PRODUCT.PR_CREATOR}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 10,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "创建日期",
-                    "xtype": "datefield",
-                    "bind": "{BASE_PRODUCT.PR_CREATEDATE}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 10,
-                    "y": 90,
-                    "width": 300,
-                    "fieldLabel": "修改人",
-                    "xtype": "textfield",
-                    "bind": "{BASE_PRODUCT.PR_MODIFIER}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 10,
-                    "y": 130,
-                    "width": 300,
-                    "fieldLabel": "修改日期",
-                    "xtype": "datefield",
-                    "bind": "{BASE_PRODUCT.PR_MODIFYDATE}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 310,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "审核人",
-                    "xtype": "textfield",
-                    "bind": "{BASE_PRODUCT.PR_AUDITOR}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 310,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "审核日期",
-                    "xtype": "datefield",
-                    "bind": "{BASE_PRODUCT.PR_AUDITDATE}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 610,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "禁用状态",
-                    "xtype": "textfield",
-                    "bind": "{BASE_PRODUCT.PR_FORBIDSTATUS}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 610,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "禁用人",
-                    "xtype": "textfield",
-                    "bind": "{BASE_PRODUCT.PR_FORBIDER}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 610,
-                    "y": 90,
-                    "width": 300,
-                    "fieldLabel": "禁用时间",
-                    "xtype": "datefield",
-                    "bind": "{BASE_PRODUCT.PR_FORBIDDATE}",
-                    "disabled": true
-                  }
-                ]
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "viewType": "list",
-        "layout": "fit",
-        "items": [
-          {
-            "xtype": "menubar",
-            "ui": "form-menubar",
-            "items": [
-              {
-                "text": "过滤"
-              },
-              {
-                "text": "返回数据",
-                "reference": "returnDataBtn",
-                "operation": "returnData"
-              },
-              {
-                "text": "刷新"
-              },
-              {
-                "text": "新增",
-                "menu": [
-                  {
-                    "text": "新增",
-                    "reference": "newBtn",
-                    "operation": "new"
-                  },
-                  {
-                    "text": "复制"
-                  }
-                ]
-              },
-              {
-                "text": "打开"
-              },
-              {
-                "text": "退出",
-                "reference": "closeBtn",
-                "operation": "close"
-              }
-            ]
-          },
-          {
-            "xtype": "gridpanel",
-            "ui": "form",
-            "showFilterBar": true,
-            "showHeaderFilter": true,
-            "showPagingBar": true,
-            "height": 584,
-            "selType": "checkboxmodel",
-            "columns": [
-              {
-                "text": "编码",
-                "dataIndex": "PR_CODE",
-                "entity": "BASE_PRODUCT"
-              },
-              {
-                "text": "名称",
-                "dataIndex": "PR_NAME",
-                "entity": "BASE_PRODUCT",
-                "width": 200
-              },
-              {
-                "text": "单据状态",
-                "dataIndex": "PR_STATUS",
-                "entity": "BASE_PRODUCT"
-              },
-              {
-                "text": "禁用状态",
-                "dataIndex": "PR_FORBIDSTATUS",
-                "entity": "BASE_PRODUCT"
-              }
-            ]
-          }
-        ]
-      }
-    ]
-  }
-]

+ 0 - 5
applications/scm/scm-base/src/main/resources/metadata/supplier/Supplier.filter.json

@@ -1,5 +0,0 @@
-[
-  {
-
-  }
-]

+ 0 - 943
applications/scm/scm-base/src/main/resources/metadata/supplier/Supplier.form.json

@@ -1,943 +0,0 @@
-[
-  {
-    "id": "base_supplier",
-    "name": "供应商",
-    "type": "baseData",
-    "nameColumnName": "SU_NAME",
-    "idColumnName": "SU_ID",
-    "codeColumnName": "SU_CODE",
-    "entities": [
-      {
-        "name": "单据头",
-        "tableName": "BASE_SUPPLIER",
-        "type": "head",
-        "fields": [
-          {
-            "name": "编码",
-            "columnName": "SU_CODE",
-            "type": "code",
-            "length": 50
-          },
-          {
-            "name": "名称",
-            "columnName": "SU_NAME",
-            "type": "text",
-            "length": 255
-          },
-          {
-            "name": "简称",
-            "columnName": "SU_SHORTNAME",
-            "type": "text",
-            "length": 255
-          },
-          {
-            "name": "创建人",
-            "columnName": "SU_CREATOR",
-            "type": "creator"
-          },
-          {
-            "name": "创建日期",
-            "columnName": "SU_CREATEDATE",
-            "type": "createDate"
-          },
-          {
-            "name": "修改人",
-            "columnName": "SU_MODIFIER",
-            "type": "modifier"
-          },
-          {
-            "name": "修改日期",
-            "columnName": "SU_MODIFYDATE",
-            "type": "modifyDate"
-          },
-          {
-            "name": "审核人",
-            "columnName": "SU_AUDITOR",
-            "type": "user"
-          },
-          {
-            "name": "审核日期",
-            "columnName": "SU_AUDITDATE",
-            "type": "date"
-          },
-          {
-            "name": "单据状态",
-            "columnName": "SU_STATUS",
-            "type": "status",
-            "statusList": [
-              {
-                "code": "E",
-                "name": "在录入"
-              },
-              {
-                "code": "S",
-                "name": "已提交"
-              },
-              {
-                "code": "A",
-                "name": "已审核"
-              }
-            ]
-          },
-          {
-            "name": "禁用人",
-            "columnName": "SU_FORBIDER",
-            "type": "user"
-          },
-          {
-            "name": "禁用日期",
-            "columnName": "SU_FORBIDDATE",
-            "type": "date"
-          },
-          {
-            "name": "禁用状态",
-            "columnName": "SU_FORBIDSTATUS",
-            "type": "status",
-            "statusList": [
-              {
-                "code": "N",
-                "name": "否",
-                "control": [
-                  {
-                    "type": "field",
-                    "scope": [
-                      "BASE_SUPPLIER.SU_CODE",
-                      "BASE_SUPPLIER.SU_NAME",
-                      "BASE_SUPPLIER.SU_SHORTNAME",
-                      "BASE_SUPPLIER_BASE.SU_COUNTRY",
-                      "BASE_SUPPLIER_BASE.SU_AREA",
-                      "BASE_SUPPLIER_BASE.SU_ADDRESS",
-                      "BASE_SUPPLIER_BASE.SU_CREDITCODE",
-                      "BASE_SUPPLIER_BASE.SU_TRADE",
-                      "BASE_SUPPLIER_BASE.SU_REGADDRESS",
-                      "BASE_SUPPLIER_BASE.SU_GRADE",
-                      "BASE_SUPPLIER_BASE.SU_CLASSIFY"
-                    ]
-                  },
-                  {
-                    "type": "menubar",
-                    "scope": []
-                  }
-                ]
-              },
-              {
-                "code": "Y",
-                "name": "是"
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "name": "基本信息",
-        "tableName": "BASE_SUPPLIER_BASE",
-        "type": "subHead",
-        "idColumnName": "SU_BASE_ID",
-        "fields": [
-          {
-            "name": "国家",
-            "columnName": "SU_COUNTRY",
-            "type": "supportData",
-            "ref": "base_country"
-          },
-          {
-            "name": "地区",
-            "columnName": "SU_AREA",
-            "type": "supportData",
-            "ref": "base_area",
-            "parentRefField": "SU_COUNTRY"
-          },
-          {
-            "name": "通讯地址",
-            "columnName": "SU_ADDRESS",
-            "type": "textarea",
-            "length": 255
-          },
-          {
-            "name": "行业",
-            "columnName": "SU_TRADE",
-            "type": "supportData",
-            "ref": "base_trade"
-          },
-          {
-            "name": "统一社会信用代码",
-            "columnName": "SU_CREDITCODE",
-            "type": "text",
-            "length": 50
-          },
-          {
-            "name": "注册地址",
-            "columnName": "SU_REGADDRESS",
-            "type": "textarea",
-            "length": 255
-          },
-          {
-            "name": "供应商等级",
-            "columnName": "SU_GRADE",
-            "type": "supportData",
-            "ref": "base_supplier_grade"
-          },
-          {
-            "name": "供应商分类",
-            "columnName": "SU_CLASSIFY",
-            "type": "supportData",
-            "ref": "base_supplier_classify"
-          }
-        ]
-      },
-      {
-        "name": "联系人",
-        "tableName": "BASE_SUPPLIER_CT",
-        "type": "entry",
-        "idColumnName": "SU_CONTRACT_ID",
-        "fields": [
-          {
-            "name": "编码",
-            "columnName": "SU_CODE",
-            "type": "text",
-            "length": 50
-          },
-          {
-            "name": "联系人",
-            "columnName": "SU_CONTRACT",
-            "type": "text",
-            "length": 50
-          },
-          {
-            "name": "电话",
-            "columnName": "SU_TEL",
-            "type": "text",
-            "length": 20
-          },
-          {
-            "name": "邮箱",
-            "columnName": "SU_EMAIL",
-            "type": "text",
-            "length": 50
-          },
-          {
-            "name": "默认",
-            "columnName": "SU_IS_DEFAULT",
-            "type": "checkbox"
-          },
-          {
-            "name": "备注",
-            "columnName": "SU_DESC",
-            "type": "text",
-            "length": 255
-          }
-        ]
-      },
-      {
-        "name": "银行信息",
-        "tableName": "BASE_SUPPLIER_BANK",
-        "type": "entry",
-        "idColumnName": "SU_BANK_ID",
-        "fields": [
-          {
-            "name": "国家",
-            "columnName": "SU_COUNTRY",
-            "type": "supportData",
-            "ref": "base_country"
-          },
-          {
-            "name": "开户银行",
-            "columnName": "SU_OPENNAME",
-            "type": "text",
-            "length": 255
-          },
-          {
-            "name": "开户行地址",
-            "columnName": "SU_OPENADDR",
-            "type": "text",
-            "length": 255
-          },
-          {
-            "name": "银行账号",
-            "columnName": "SU_CODE",
-            "type": "text",
-            "length": 255
-          },
-          {
-            "name": "账户名称",
-            "columnName": "SU_NAME",
-            "type": "text",
-            "length": 255
-          },
-          {
-            "name": "币别",
-            "columnName": "SU_CURRENCY",
-            "type": "baseData",
-            "ref": "base_currency"
-          },
-          {
-            "name": "默认",
-            "columnName": "SU_IS_DEFAULT",
-            "type": "checkbox"
-          }
-        ]
-      },
-      {
-        "name": "财务信息",
-        "tableName": "BASE_SUPPLIER_FIN",
-        "type": "subHead",
-        "idColumnName": "SU_FINANCE_ID",
-        "fields": [
-          {
-            "name": "发票类型",
-            "columnName": "SU_INVOICE_TYPE",
-            "type": "enumData",
-            "ref": "base_invoice_type"
-          },
-          {
-            "name": "结算币别",
-            "columnName": "SU_CURRENCY",
-            "type": "baseData",
-            "ref": "base_currency"
-          }
-        ]
-      }
-    ],
-    "operations": [
-      {
-        "id": "save",
-        "name": "保存",
-        "type": "save"
-      },
-      {
-        "id": "submit",
-        "name": "提交",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "SU_STATUS",
-          "statusValue": "S"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 在录入,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "SU_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "只能提交在录入的单据"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "unSubmit",
-        "name": "反提交",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "SU_STATUS",
-          "statusValue": "E"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 已提交,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "SU_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "单据未提交"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "audit",
-        "name": "审核",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "SU_STATUS",
-          "statusValue": "A"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 在录入,不允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "SU_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": true,
-              "message": "请先提交单据"
-            },
-            "level": "error"
-          },
-          {
-            "type": "legal",
-            "description": "状态 = 已审核,不允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "SU_STATUS",
-                  "compare": "=",
-                  "value": "A"
-                }
-              ],
-              "triggerOnTrue": true,
-              "message": "单据已经审核,无需再审"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "unAudit",
-        "name": "反审核",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "SU_STATUS",
-          "statusValue": "E"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 已审核,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "SU_STATUS",
-                  "compare": "=",
-                  "value": "A"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "单据未审核"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "new",
-        "name": "新增",
-        "type": "addView",
-        "params": {
-          "viewName": "base_supplier",
-          "viewType": "form",
-          "openType": "card"
-        }
-      },
-      {
-        "id": "close",
-        "name": "退出",
-        "type": "closeView"
-      },
-      {
-        "id": "returnData",
-        "name": "返回数据",
-        "type": "returnData"
-      }
-    ],
-    "views": [
-      {
-        "viewType": "form",
-        "layout": "fit",
-        "items": [
-          {
-            "xtype": "menubar",
-            "ui": "form-menubar",
-            "items": [
-              {
-                "text": "新增",
-                "menu": [
-                  {
-                    "text": "新增"
-                  },
-                  {
-                    "text": "复制"
-                  }
-                ]
-              },
-              {
-                "text": "保存",
-                "reference": "tbSave",
-                "operation": "save"
-              },
-              {
-                "text": "提交",
-                "menu": [
-                  {
-                    "text": "提交",
-                    "reference": "tbSubmit",
-                    "operation": "submit"
-                  },
-                  {
-                    "text": "反提交",
-                    "reference": "tbUnSubmit",
-                    "operation": "unSubmit"
-                  }
-                ]
-              },
-              {
-                "text": "审核",
-                "menu": [
-                  {
-                    "text": "审核",
-                    "reference": "tbAudit",
-                    "operation": "audit"
-                  },
-                  {
-                    "text": "反审核",
-                    "reference": "tbUnAudit",
-                    "operation": "unAudit"
-                  }
-                ]
-              },
-              {
-                "text": "列表"
-              },
-              {
-                "text": "退出",
-                "reference": "closeBtn",
-                "operation": "close"
-              }
-            ]
-          },
-          {
-            "xtype": "container",
-            "height": 50,
-            "layout": "absolute",
-            "items": [
-              {
-                "xtype": "textfield",
-                "fieldLabel": "编码",
-                "bind": "{BASE_SUPPLIER.SU_CODE}",
-                "emptyText": "保存时自动生成",
-                "x": 10,
-                "y": 10,
-                "width": 300
-              },
-              {
-                "xtype": "textfield",
-                "fieldLabel": "名称",
-                "bind": "{BASE_SUPPLIER.SU_NAME}",
-                "x": 310,
-                "y": 10,
-                "width": 300
-              },
-              {
-                "xtype": "textfield",
-                "fieldLabel": "简称",
-                "bind": "{BASE_SUPPLIER.SU_SHORTNAME}",
-                "x": 610,
-                "y": 10,
-                "width": 300
-              }
-            ]
-          },
-          {
-            "xtype": "tabpanel",
-            "ui": "form",
-            "height": 500,
-            "items": [
-              {
-                "title": "基本信息",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "国家",
-                    "bind": "{BASE_SUPPLIER_BASE.SU_COUNTRY}",
-                    "editable": false,
-                    "x": 10,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "地区",
-                    "bind": "{BASE_SUPPLIER_BASE.SU_AREA}",
-                    "editable": false,
-                    "x": 10,
-                    "y": 50,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "textarea",
-                    "fieldLabel": "通讯地址",
-                    "bind": "{BASE_SUPPLIER_BASE.SU_ADDRESS}",
-                    "x": 10,
-                    "y": 90,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "行业",
-                    "bind": "{BASE_SUPPLIER_BASE.SU_TRADE}",
-                    "editable": false,
-                    "x": 310,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "textfield",
-                    "fieldLabel": "统一社会信用码",
-                    "bind": "{BASE_SUPPLIER_BASE.SU_CREDITCODE}",
-                    "x": 310,
-                    "y": 50,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "textarea",
-                    "fieldLabel": "注册地址",
-                    "bind": "{BASE_SUPPLIER_BASE.SU_REGADDRESS}",
-                    "x": 310,
-                    "y": 90,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "textfield",
-                    "fieldLabel": "供应商等级",
-                    "bind": "{BASE_SUPPLIER_BASE.SU_GRADE}",
-                    "x": 610,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "textfield",
-                    "fieldLabel": "供应商分类",
-                    "bind": "{BASE_SUPPLIER_BASE.SU_CLASSIFY}",
-                    "x": 610,
-                    "y": 50,
-                    "width": 300
-                  }
-                ]
-              },
-              {
-                "title": "联系人",
-                "layout": "fit",
-                "items": [
-                  {
-                    "xtype": "gridpanel",
-                    "ui": "form",
-                    "height": 368,
-                    "entity": "BASE_SUPPLIER_CT",
-                    "bind": "{BASE_SUPPLIER_CT}",
-                    "columns": [
-                      {
-                        "text": "编码",
-                        "dataIndex": "SU_CODE"
-                      },
-                      {
-                        "text": "联系人",
-                        "dataIndex": "SU_CONTRACT"
-                      },
-                      {
-                        "text": "电话",
-                        "dataIndex": "SU_TEL"
-                      },
-                      {
-                        "text": "邮箱",
-                        "dataIndex": "SU_EMAIL"
-                      },
-                      {
-                        "text": "默认",
-                        "dataIndex": "SU_IS_DEFAULT"
-                      },
-                      {
-                        "text": "备注",
-                        "dataIndex": "SU_DESC"
-                      }
-                    ]
-                  }
-                ]
-              },
-              {
-                "title": "财务信息",
-                "layout": {
-                  "type": "vbox",
-                  "pack": "start",
-                  "align": "stretch"
-                },
-                "items": [
-                  {
-                    "xtype": "container",
-                    "height": 50,
-                    "layout": "absolute",
-                    "items": [
-                      {
-                        "xtype": "textfield",
-                        "fieldLabel": "发票类型",
-                        "bind": "{BASE_SUPPLIER_FIN.SU_INVOICE_TYPE}",
-                        "x": 10,
-                        "y": 10,
-                        "width": 300
-                      },
-                      {
-                        "xtype": "textfield",
-                        "fieldLabel": "结算币别",
-                        "bind": "{BASE_SUPPLIER_FIN.SU_CURRENCY}",
-                        "x": 310,
-                        "y": 10,
-                        "width": 300
-                      }
-                    ]
-                  },
-                  {
-                    "xtype": "gridpanel",
-                    "ui": "form",
-                    "height": 368,
-                    "entity": "BASE_SUPPLIER_BANK",
-                    "bind": "{BASE_SUPPLIER_BANK}",
-                    "columns": [
-                      {
-                        "text": "国家",
-                        "dataIndex": "SU_COUNTRY"
-                      },
-                      {
-                        "text": "开户银行",
-                        "dataIndex": "SU_OPENNAME"
-                      },
-                      {
-                        "text": "银行账号",
-                        "dataIndex": "SU_CODE"
-                      },
-                      {
-                        "text": "账户名称",
-                        "dataIndex": "SU_NAME"
-                      },
-                      {
-                        "text": "币别",
-                        "dataIndex": "SU_CURRENCY"
-                      },
-                      {
-                        "text": "默认",
-                        "dataIndex": "SU_IS_DEFAULT"
-                      }
-                    ]
-                  }
-                ]
-              },
-              {
-                "title": "其他信息",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "x": 10,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "创建人",
-                    "xtype": "textfield",
-                    "bind": "{BASE_SUPPLIER.SU_CREATOR}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 10,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "创建日期",
-                    "xtype": "datefield",
-                    "bind": "{BASE_SUPPLIER.SU_CREATEDATE}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 10,
-                    "y": 90,
-                    "width": 300,
-                    "fieldLabel": "修改人",
-                    "xtype": "textfield",
-                    "bind": "{BASE_SUPPLIER.SU_MODIFIER}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 10,
-                    "y": 130,
-                    "width": 300,
-                    "fieldLabel": "修改日期",
-                    "xtype": "datefield",
-                    "bind": "{BASE_SUPPLIER.SU_MODIFYDATE}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 310,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "审核人",
-                    "xtype": "textfield",
-                    "bind": "{BASE_SUPPLIER.SU_AUDITOR}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 310,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "审核日期",
-                    "xtype": "datefield",
-                    "bind": "{BASE_SUPPLIER.SU_AUDITDATE}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 610,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "禁用状态",
-                    "xtype": "textfield",
-                    "bind": "{BASE_SUPPLIER.SU_FORBIDSTATUS}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 610,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "禁用人",
-                    "xtype": "textfield",
-                    "bind": "{BASE_SUPPLIER.SU_FORBIDER}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 610,
-                    "y": 90,
-                    "width": 300,
-                    "fieldLabel": "禁用时间",
-                    "xtype": "datefield",
-                    "bind": "{BASE_SUPPLIER.SU_FORBIDDATE}",
-                    "disabled": true
-                  }
-                ]
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "viewType": "list",
-        "layout": "fit",
-        "items": [
-          {
-            "xtype": "menubar",
-            "ui": "form-menubar",
-            "items": [
-              {
-                "text": "过滤"
-              },
-              {
-                "text": "返回数据",
-                "reference": "returnDataBtn",
-                "operation": "returnData"
-              },
-              {
-                "text": "刷新"
-              },
-              {
-                "text": "新增",
-                "menu": [
-                  {
-                    "text": "新增",
-                    "reference": "newBtn",
-                    "operation": "new"
-                  },
-                  {
-                    "text": "复制"
-                  }
-                ]
-              },
-              {
-                "text": "打开"
-              },
-              {
-                "text": "退出",
-                "reference": "closeBtn",
-                "operation": "close"
-              }
-            ]
-          },
-          {
-            "xtype": "gridpanel",
-            "ui": "form",
-            "showFilterBar": true,
-            "showHeaderFilter": true,
-            "showPagingBar": true,
-            "height": 584,
-            "selType": "checkboxmodel",
-            "columns": [
-              {
-                "text": "编码",
-                "entity": "BASE_SUPPLIER",
-                "dataIndex": "SU_CODE"
-              },
-              {
-                "text": "名称",
-                "entity": "BASE_SUPPLIER",
-                "dataIndex": "SU_NAME",
-                "width": 200
-              },
-              {
-                "text": "简称",
-                "entity": "BASE_SUPPLIER",
-                "dataIndex": "SU_SHORTNAME"
-              },
-              {
-                "text": "分类",
-                "entity": "BASE_SUPPLIER_BASE",
-                "dataIndex": "SU_CLASSIFY"
-              },
-              {
-                "text": "审核人",
-                "entity": "BASE_SUPPLIER",
-                "dataIndex": "SU_AUDITOR"
-              },
-              {
-                "text": "审核日期",
-                "entity": "BASE_SUPPLIER",
-                "dataIndex": "SU_AUDITDATE"
-              },
-              {
-                "text": "单据状态",
-                "entity": "BASE_SUPPLIER",
-                "dataIndex": "SU_STATUS"
-              },
-              {
-                "text": "禁用状态",
-                "entity": "BASE_SUPPLIER",
-                "dataIndex": "SU_FORBIDSTATUS"
-              }
-            ]
-          }
-        ]
-      }
-    ],
-    "codeRules": [
-      {
-        "default": true,
-        "name": "供应商编码规则",
-        "description": "供应商编码规则",
-        "editable": true,
-        "repairable": true,
-        "entries": [
-          {
-            "type": "number",
-            "cover": "0",
-            "seed": 1,
-            "increment": 1,
-            "length": 4
-          }
-        ]
-      }
-    ]
-  }
-]

+ 0 - 0
applications/scm/scm-credit/src/main/resources/metadata/Credit.fn.json


+ 0 - 0
applications/scm/scm-credit/src/main/resources/metadata/Credit.module.json


+ 0 - 0
applications/scm/scm-org/src/main/resources/metadata/Org.fn.json


+ 0 - 0
applications/scm/scm-org/src/main/resources/metadata/Org.module.json


+ 0 - 0
applications/scm/scm-purchase/src/main/resources/metadata/InStock.form.json


+ 1453 - 0
applications/scm/scm-purchase/src/main/resources/metadata/Order.form.json

@@ -0,0 +1,1453 @@
+[
+  {
+    "id": "scm_purchase_order",
+    "name": "采购订单",
+    "type": "bill",
+    "idColumnName": "PO_ID",
+    "codeColumnName": "PO_CODE",
+    "entities": [
+      {
+        "name": "基本信息",
+        "tableName": "PUR_ORDER",
+        "type": "head",
+        "fields": [
+          {
+            "name": "单据编码",
+            "columnName": "PO_CODE",
+            "type": "code",
+            "length": 50
+          },
+          {
+            "name": "采购日期",
+            "columnName": "PO_DATE",
+            "type": "date"
+          },
+          {
+            "name": "供应商",
+            "columnName": "PO_SUPPLIER",
+            "type": "baseData",
+            "ref": "base_supplier",
+            "refField": "SU_NAME"
+          },
+          {
+            "name": "创建人",
+            "columnName": "PO_CREATOR",
+            "type": "creator"
+          },
+          {
+            "name": "创建日期",
+            "columnName": "PO_CREATEDATE",
+            "type": "createDate"
+          },
+          {
+            "name": "修改人",
+            "columnName": "PO_MODIFIER",
+            "type": "modifier"
+          },
+          {
+            "name": "修改日期",
+            "columnName": "PO_MODIFYDATE",
+            "type": "modifyDate"
+          },
+          {
+            "name": "审核人",
+            "columnName": "PO_AUDITOR",
+            "type": "user"
+          },
+          {
+            "name": "审核日期",
+            "columnName": "PO_AUDITDATE",
+            "type": "date"
+          },
+          {
+            "name": "单据状态",
+            "columnName": "PO_STATUS",
+            "type": "status",
+            "statusList": [
+              {
+                "code": "E",
+                "name": "在录入",
+                "controls": [
+                  {
+                    "type": "field",
+                    "scope": [
+                      "PUR_ORDER.PO_STATUS",
+                      "PUR_ORDER.PO_CREATOR",
+                      "PUR_ORDER.PO_CREATEDATE",
+                      "PUR_ORDER.PO_MODIFIER",
+                      "PUR_ORDER.PO_MODIFYDATE",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_NO",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRODNAME",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRICE",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_AMOUNT"
+                    ]
+                  },
+                  {
+                    "type": "menubar",
+                    "scope": [
+                      "copyBtn",
+                      "unSubmitBtn",
+                      "auditMenu"
+                    ]
+                  }
+                ]
+              },
+              {
+                "code": "S",
+                "name": "已提交",
+                "controls": [
+                  {
+                    "type": "field",
+                    "scope": [
+                      "PUR_ORDER.PO_CODE",
+                      "PUR_ORDER.PO_DATE",
+                      "PUR_ORDER.PO_SUPPLIER",
+                      "PUR_ORDER.PO_STATUS",
+                      "PUR_ORDER.PO_CREATOR",
+                      "PUR_ORDER.PO_CREATEDATE",
+                      "PUR_ORDER.PO_MODIFIER",
+                      "PUR_ORDER.PO_MODIFYDATE",
+                      "PUR_ORDER_FIN.PO_FIN_CURR",
+                      "PUR_ORDER_FIN.PO_FIN_SETTLE",
+                      "PUR_ORDER_FIN.PO_FIN_PAYCOND",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_NO",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PROD",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRODNAME",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_UNIT",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_QTY",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRICE_UNIT",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRICE_QTY",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_DELIVERY",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRICE",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_TAXPRICE",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_DISCOUNT",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_TAXRATE",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_TAXAMOUNT",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_AMOUNT"
+                    ]
+                  },
+                  {
+                    "type": "menubar",
+                    "scope": [
+                      "submitBtn",
+                      "unAuditBtn"
+                    ]
+                  }
+                ]
+              },
+              {
+                "code": "A",
+                "name": "已审核",
+                "controls": [
+                  {
+                    "type": "field",
+                    "scope": [
+                      "PUR_ORDER.PO_CODE",
+                      "PUR_ORDER.PO_DATE",
+                      "PUR_ORDER.PO_SUPPLIER",
+                      "PUR_ORDER.PO_STATUS",
+                      "PUR_ORDER.PO_CREATOR",
+                      "PUR_ORDER.PO_CREATEDATE",
+                      "PUR_ORDER.PO_MODIFIER",
+                      "PUR_ORDER.PO_MODIFYDATE",
+                      "PUR_ORDER_FIN.PO_FIN_CURR",
+                      "PUR_ORDER_FIN.PO_FIN_SETTLE",
+                      "PUR_ORDER_FIN.PO_FIN_PAYCOND",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_NO",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PROD",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRODNAME",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_UNIT",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_QTY",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRICE_UNIT",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRICE_QTY",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_DELIVERY",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_PRICE",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_TAXPRICE",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_DISCOUNT",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_TAXRATE",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_TAXAMOUNT",
+                      "PUR_ORDER_ENTRY.PO_ENTRY_AMOUNT"
+                    ]
+                  },
+                  {
+                    "type": "menubar",
+                    "scope": [
+                      "submitMenu",
+                      "auditBtn"
+                    ]
+                  }
+                ]
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "name": "明细信息",
+        "tableName": "PUR_ORDER_ENTRY",
+        "idColumnName": "PO_ENTRY_ID",
+        "seqColumnName": "PO_ENTRY_NO",
+        "type": "entry",
+        "fields": [
+          {
+            "name": "物料编码",
+            "columnName": "PO_ENTRY_PROD",
+            "type": "baseData",
+            "ref": "base_product",
+            "refField": "PR_CODE"
+          },
+          {
+            "name": "物料名称",
+            "columnName": "PO_ENTRY_PRODNAME",
+            "type": "baseDataProp",
+            "baseDataField": "PO_ENTRY_PROD",
+            "refField": "PR_NAME"
+          },
+          {
+            "name": "采购单位",
+            "columnName": "PO_ENTRY_UNIT",
+            "type": "baseData",
+            "ref": "base_unit"
+          },
+          {
+            "name": "采购数量",
+            "columnName": "PO_ENTRY_QTY",
+            "type": "qty"
+          },
+          {
+            "name": "计价单位",
+            "columnName": "PO_ENTRY_PRICE_UNIT",
+            "type": "baseData",
+            "ref": "base_unit"
+          },
+          {
+            "name": "计价数量",
+            "columnName": "PO_ENTRY_PRICE_QTY",
+            "type": "qty"
+          },
+          {
+            "name": "单价",
+            "columnName": "PO_ENTRY_PRICE",
+            "type": "price"
+          },
+          {
+            "name": "含税单价",
+            "columnName": "PO_ENTRY_TAXPRICE",
+            "type": "price"
+          },
+          {
+            "name": "折扣率%",
+            "columnName": "PO_ENTRY_DISCOUNT",
+            "type": "float"
+          },
+          {
+            "name": "税率%",
+            "columnName": "PO_ENTRY_TAXRATE",
+            "type": "float"
+          },
+          {
+            "name": "税额",
+            "columnName": "PO_ENTRY_TAXAMOUNT",
+            "type": "amount"
+          },
+          {
+            "name": "金额",
+            "columnName": "PO_ENTRY_AMOUNT",
+            "type": "amount"
+          },
+          {
+            "name": "价税合计",
+            "columnName": "PO_ENTRY_ALLAMOUNT",
+            "type": "amount"
+          },
+          {
+            "name": "交货日期",
+            "columnName": "PO_ENTRY_DELIVERY",
+            "type": "date"
+          },
+          {
+            "name": "交货地址",
+            "columnName": "PO_ENTRY_ADDRESS",
+            "type": "textarea",
+            "length": 255
+          }
+        ]
+      },
+      {
+        "name": "财务信息",
+        "tableName": "PUR_ORDER_FIN",
+        "idColumnName": "PO_FIN_ID",
+        "type": "subHead",
+        "fields": [
+          {
+            "name": "结算币别",
+            "columnName": "PO_FIN_CURR",
+            "type": "baseData",
+            "ref": "base_currency"
+          },
+          {
+            "name": "结算方式",
+            "columnName": "PO_FIN_SETTLE",
+            "type": "baseData",
+            "ref": "base_settle"
+          },
+          {
+            "name": "付款条件",
+            "columnName": "PO_FIN_PAYCOND",
+            "type": "baseData",
+            "ref": "base_paycondition"
+          }
+        ]
+      }
+    ],
+    "operations": [
+      {
+        "id": "save",
+        "name": "保存",
+        "type": "save"
+      },
+      {
+        "id": "submit",
+        "name": "提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "PO_STATUS",
+          "statusValue": "S"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PO_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "只能提交在录入的单据"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unSubmit",
+        "name": "反提交",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "PO_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已提交,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PO_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未提交"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "audit",
+        "name": "审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "PO_STATUS",
+          "statusValue": "A"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 在录入,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PO_STATUS",
+                  "compare": "=",
+                  "value": "E"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "请先提交单据"
+            },
+            "level": "error"
+          },
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,不允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PO_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": true,
+              "message": "单据已经审核,无需再审"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "unAudit",
+        "name": "反审核",
+        "type": "changeStatus",
+        "params": {
+          "statusField": "PO_STATUS",
+          "statusValue": "E"
+        },
+        "validators": [
+          {
+            "type": "legal",
+            "description": "状态 = 已审核,允许",
+            "params": {
+              "expression": [
+                {
+                  "field": "PO_STATUS",
+                  "compare": "=",
+                  "value": "A"
+                }
+              ],
+              "triggerOnTrue": false,
+              "message": "单据未审核"
+            },
+            "level": "error"
+          }
+        ],
+        "log": true
+      },
+      {
+        "id": "new",
+        "name": "新增",
+        "type": "addView",
+        "params": {
+          "viewName": "scm_purchase_order",
+          "viewType": "form",
+          "openType": "card"
+        }
+      },
+      {
+        "id": "close",
+        "name": "关闭",
+        "type": "closeView"
+      },
+      {
+        "id": "showList",
+        "name": "列表",
+        "type": "addView",
+        "params": {
+          "viewName": "scm_purc_order",
+          "viewType": "list",
+          "openType": "card"
+        }
+      },
+      {
+        "id": "newEntry",
+        "name": "新增明细行",
+        "type": "newEntry",
+        "params": {
+          "entity": "PUR_ORDER_ENTRY"
+        }
+      }
+    ],
+    "codeRules": [
+      {
+        "default": true,
+        "name": "采购订单编码规则",
+        "description": "采购订单编码规则",
+        "editable": true,
+        "repairable": true,
+        "entries": [
+          {
+            "type": "date",
+            "field": "PO_DATE",
+            "format": "yyyyMM"
+          },
+          {
+            "type": "number",
+            "cover": "0",
+            "seed": 1,
+            "increment": 1,
+            "length": 4
+          }
+        ]
+      }
+    ],
+    "views": [
+      {
+        "viewType": "form",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "menubar",
+              "ui": "form-menubar",
+              "items": [
+                {
+                  "text": "新增",
+                  "itemId": "newMenu",
+                  "menu": [
+                    {
+                      "text": "新增",
+                      "itemId": "newBtn"
+                    },
+                    {
+                      "text": "复制",
+                      "itemId": "copyBtn"
+                    }
+                  ]
+                },
+                {
+                  "text": "保存",
+                  "itemId": "saveBtn",
+                  "operation": "save"
+                },
+                {
+                  "text": "提交",
+                  "itemId": "submitMenu",
+                  "menu": [
+                    {
+                      "text": "提交",
+                      "itemId": "submitBtn",
+                      "operation": "submit"
+                    },
+                    {
+                      "text": "反提交",
+                      "itemId": "unSubmitBtn",
+                      "operation": "unSubmit"
+                    }
+                  ]
+                },
+                {
+                  "text": "审核",
+                  "itemId": "auditMenu",
+                  "menu": [
+                    {
+                      "text": "审核",
+                      "itemId": "auditBtn",
+                      "operation": "audit"
+                    },
+                    {
+                      "text": "反审核",
+                      "itemId": "unAuditBtn",
+                      "operation": "unAudit"
+                    }
+                  ]
+                },
+                {
+                  "text": "列表",
+                  "itemId": "showListBtn",
+                  "operation": "showList"
+                },
+                {
+                  "text": "退出",
+                  "itemId": "closeBtn",
+                  "operation": "close"
+                }
+              ]
+            },
+            {
+              "xtype": "tabpanel",
+              "ui": "form",
+              "height": 120,
+              "items": [
+                {
+                  "title": "基本信息",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "单据编号",
+                      "itemId": "PUR_ORDER.PO_CODE",
+                      "bind": "{PUR_ORDER.PO_CODE}",
+                      "emptyText": "保存时自动生成",
+                      "x": 10,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "datefield",
+                      "fieldLabel": "采购日期",
+                      "itemId": "PUR_ORDER.PO_DATE",
+                      "bind": "{PUR_ORDER.PO_DATE}",
+                      "x": 310,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "供应商",
+                      "itemId": "PUR_ORDER.PO_SUPPLIER",
+                      "bind": "{PUR_ORDER.PO_SUPPLIER}",
+                      "x": 610,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "textfield",
+                      "fieldLabel": "单据状态",
+                      "itemId": "PUR_ORDER.PO_STATUS",
+                      "bind": "{PUR_ORDER.PO_STATUS}",
+                      "x": 910,
+                      "y": 10,
+                      "width": 300,
+                      "disabled": true
+                    }
+                  ]
+                },
+                {
+                  "title": "财务信息",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "结算币别",
+                      "itemId": "PUR_ORDER_FIN.PO_FIN_CURR",
+                      "bind": "{PUR_ORDER_FIN.PO_FIN_CURR}",
+                      "x": 10,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "结算方式",
+                      "itemId": "PUR_ORDER_FIN.PO_FIN_SETTLE",
+                      "bind": "{PUR_ORDER_FIN.PO_FIN_SETTLE}",
+                      "x": 310,
+                      "y": 10,
+                      "width": 300
+                    },
+                    {
+                      "xtype": "searchfield",
+                      "fieldLabel": "付款条件",
+                      "itemId": "PUR_ORDER_FIN.PO_FIN_PAYCOND",
+                      "bind": "{PUR_ORDER_FIN.PO_FIN_PAYCOND}",
+                      "x": 610,
+                      "y": 10,
+                      "width": 300
+                    }
+                  ]
+                },
+                {
+                  "title": "其他",
+                  "layout": "absolute",
+                  "items": [
+                    {
+                      "x": 10,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "创建人",
+                      "xtype": "textfield",
+                      "itemId": "PUR_ORDER.PO_CREATOR",
+                      "bind": "{PUR_ORDER.PO_CREATOR}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 10,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "创建日期",
+                      "xtype": "datefield",
+                      "itemId": "PUR_ORDER.PO_CREATEDATE",
+                      "bind": "{PUR_ORDER.PO_CREATEDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 310,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "修改人",
+                      "xtype": "textfield",
+                      "itemId": "PUR_ORDER.PO_MODIFIER",
+                      "bind": "{PUR_ORDER.PO_MODIFIER}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 310,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "修改日期",
+                      "xtype": "datefield",
+                      "itemId": "PUR_ORDER.PO_MODIFYDATE",
+                      "bind": "{PUR_ORDER.PO_MODIFYDATE}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 10,
+                      "width": 300,
+                      "fieldLabel": "审核人",
+                      "xtype": "textfield",
+                      "itemId": "PUR_ORDER.PO_AUDITOR",
+                      "bind": "{PUR_ORDER.PO_AUDITOR}",
+                      "disabled": true
+                    },
+                    {
+                      "x": 610,
+                      "y": 50,
+                      "width": 300,
+                      "fieldLabel": "审核日期",
+                      "xtype": "datefield",
+                      "itemId": "PUR_ORDER.PO_AUDITDATE",
+                      "bind": "{PUR_ORDER.PO_AUDITDATE}",
+                      "disabled": true
+                    }
+                  ]
+                }
+              ]
+            },
+            {
+              "xtype": "tabpanel",
+              "ui": "form",
+              "items": [
+                {
+                  "title": "明细信息",
+                  "items": [
+                    {
+                      "xtype": "menubar",
+                      "ui": "form-menubar",
+                      "items": [
+                        {
+                          "text": "新增行",
+                          "itemId": "newEntryMenu",
+                          "menu": [
+                            {
+                              "text": "新增行",
+                              "itemId": "newEntryBtn",
+                              "operation": "newEntry"
+                            },
+                            {
+                              "text": "插入行",
+                              "itemId": "insertEntryBtn"
+                            },
+                            {
+                              "text": "复制行",
+                              "itemId": "copyEntryBtn"
+                            }
+                          ]
+                        },
+                        {
+                          "text": "删除行",
+                          "itemId": "delEntryBtn"
+                        },
+                        {
+                          "text": "批量填充"
+                        },
+                        {
+                          "text": "业务操作",
+                          "menu": [
+                            {
+                              "text": "获取批号"
+                            },
+                            {
+                              "text": "获取库存"
+                            },
+                            {
+                              "text": "累计数量取价"
+                            }
+                          ]
+                        },
+                        {
+                          "text": "业务查询",
+                          "menu": [
+                            {
+                              "text": "价格查询"
+                            },
+                            {
+                              "text": "历史价格"
+                            },
+                            {
+                              "text": "库存查询"
+                            },
+                            {
+                              "text": "预留综合查询"
+                            },
+                            {
+                              "text": "研发资料"
+                            }
+                          ]
+                        }
+                      ]
+                    },
+                    {
+                      "xtype": "gridpanel",
+                      "entity": "PUR_ORDER_ENTRY",
+                      "bind": "{PUR_ORDER_ENTRY}",
+                      "editable": true,
+                      "ui": "form",
+                      "height": 368,
+                      "columns": [
+                        {
+                          "text": "序号",
+                          "align": "center",
+                          "dataIndex": "PO_ENTRY_NO",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_NO",
+                          "width": 60
+                        },
+                        {
+                          "text": "物料编码",
+                          "xtype": "searchcolumn",
+                          "dataIndex": "PO_ENTRY_PROD",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_PROD",
+                          "editor": {
+                            "xtype": "searchfield"
+                          }
+                        },
+                        {
+                          "text": "物料名称",
+                          "dataIndex": "PO_ENTRY_PRODNAME",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_PRODNAME",
+                          "width": 160
+                        },
+                        {
+                          "text": "采购单位",
+                          "xtype": "searchcolumn",
+                          "dataIndex": "PO_ENTRY_UNIT",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_UNIT",
+                          "editor": {
+                            "xtype": "searchfield"
+                          }
+                        },
+                        {
+                          "text": "采购数量",
+                          "xtype": "numbercolumn",
+                          "dataIndex": "PO_ENTRY_QTY",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_QTY",
+                          "editor": {
+                            "xtype": "numberfield"
+                          }
+                        },
+                        {
+                          "text": "计价单位",
+                          "xtype": "searchcolumn",
+                          "dataIndex": "PO_ENTRY_PRICE_UNIT",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_PRICE_UNIT",
+                          "editor": {
+                            "xtype": "searchfield"
+                          }
+                        },
+                        {
+                          "text": "计价数量",
+                          "xtype": "numbercolumn",
+                          "dataIndex": "PO_ENTRY_PRICE_QTY",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_PRICE_QTY",
+                          "editor": {
+                            "xtype": "numberfield"
+                          }
+                        },
+                        {
+                          "text": "交货日期",
+                          "xtype": "datecolumn",
+                          "dataIndex": "PO_ENTRY_DELIVERY",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_DELIVERY",
+                          "editor": {
+                            "xtype": "datefield"
+                          }
+                        },
+                        {
+                          "text": "单价",
+                          "xtype": "numbercolumn",
+                          "dataIndex": "PO_ENTRY_PRICE",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_PRICE"
+                        },
+                        {
+                          "text": "含税单价",
+                          "xtype": "numbercolumn",
+                          "dataIndex": "PO_ENTRY_TAXPRICE",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_TAXPRICE",
+                          "editor": {
+                            "xtype": "numberfield"
+                          }
+                        },
+                        {
+                          "text": "折扣率%",
+                          "xtype": "numbercolumn",
+                          "dataIndex": "PO_ENTRY_DISCOUNT",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_DISCOUNT",
+                          "editor": {
+                            "xtype": "numberfield"
+                          }
+                        },
+                        {
+                          "text": "税率%",
+                          "xtype": "numbercolumn",
+                          "dataIndex": "PO_ENTRY_TAXRATE",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_TAXRATE",
+                          "editor": {
+                            "xtype": "numberfield"
+                          }
+                        },
+                        {
+                          "text": "税额",
+                          "xtype": "numbercolumn",
+                          "dataIndex": "PO_ENTRY_TAXAMOUNT",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_TAXAMOUNT"
+                        },
+                        {
+                          "text": "金额",
+                          "xtype": "numbercolumn",
+                          "dataIndex": "PO_ENTRY_AMOUNT",
+                          "itemId": "PUR_ORDER_ENTRY.PO_ENTRY_AMOUNT"
+                        }
+                      ]
+                    }
+                  ]
+                },
+                {
+                  "title": "交货安排"
+                },
+                {
+                  "title": "明细财务信息"
+                },
+                {
+                  "title": "其他信息"
+                }
+              ]
+            }
+          ]
+        }
+      },
+      {
+        "viewType": "list",
+        "appearance": {
+          "layout": "fit",
+          "items": [
+            {
+              "xtype": "gridpanel",
+              "ui": "form",
+              "menubar": [
+                {
+                  "text": "过滤"
+                },
+                {
+                  "text": "刷新"
+                },
+                {
+                  "text": "新增",
+                  "menu": [
+                    {
+                      "text": "新增",
+                      "itemId": "newBtn",
+                      "operation": "new"
+                    },
+                    {
+                      "text": "复制"
+                    }
+                  ]
+                },
+                {
+                  "text": "删除"
+                },
+                {
+                  "text": "提交",
+                  "menu": [
+                    {
+                      "text": "提交"
+                    },
+                    {
+                      "text": "反提交"
+                    }
+                  ]
+                },
+                {
+                  "text": "审核",
+                  "menu": [
+                    {
+                      "text": "审核"
+                    },
+                    {
+                      "text": "反审核"
+                    }
+                  ]
+                },
+                {
+                  "text": "下推"
+                },
+                {
+                  "text": "关联查询",
+                  "menu": [
+                    {
+                      "text": "上查"
+                    },
+                    {
+                      "text": "下查"
+                    },
+                    {
+                      "xtype": "menuseparator"
+                    },
+                    {
+                      "text": "业务流程图"
+                    },
+                    {
+                      "text": "全流程跟踪"
+                    }
+                  ]
+                },
+                {
+                  "text": "业务操作",
+                  "menu": [
+                    {
+                      "text": "作废"
+                    },
+                    {
+                      "xtype": "menuseparator"
+                    },
+                    {
+                      "text": "整单关闭"
+                    },
+                    {
+                      "text": "反关闭"
+                    },
+                    {
+                      "xtype": "menuseparator"
+                    },
+                    {
+                      "text": "计划确认"
+                    },
+                    {
+                      "text": "反计划确认"
+                    },
+                    {
+                      "xtype": "menuseparator"
+                    },
+                    {
+                      "text": "条码打印"
+                    },
+                    {
+                      "text": "修改变更"
+                    }
+                  ]
+                },
+                {
+                  "text": "业务查询",
+                  "menu": [
+                    {
+                      "text": "预付查询"
+                    },
+                    {
+                      "text": "预留综合查询"
+                    },
+                    {
+                      "text": "研发资料"
+                    }
+                  ]
+                },
+                {
+                  "text": "选项",
+                  "menu": [
+                    {
+                      "text": "选项"
+                    },
+                    {
+                      "xtype": "menuseparator"
+                    },
+                    {
+                      "text": "打印"
+                    },
+                    {
+                      "text": "预览"
+                    },
+                    {
+                      "text": "套打",
+                      "menu": [
+                        {
+                          "text": "套打设置"
+                        },
+                        {
+                          "xtype": "menuseparator"
+                        },
+                        {
+                          "text": "连续套打全部单据"
+                        },
+                        {
+                          "text": "连续套打所选单据"
+                        },
+                        {
+                          "text": "连续套打预览全部单据"
+                        },
+                        {
+                          "text": "连续套打预览所选单据"
+                        },
+                        {
+                          "xtype": "menuseparator"
+                        },
+                        {
+                          "text": "合并套打全部单据"
+                        },
+                        {
+                          "text": "合并套打所选单据"
+                        },
+                        {
+                          "text": "合并套打预览全部单据"
+                        },
+                        {
+                          "text": "合并套打预览所选单据"
+                        },
+                        {
+                          "xtype": "menuseparator"
+                        },
+                        {
+                          "text": "套打导出"
+                        },
+                        {
+                          "text": "分批打印全部单据"
+                        },
+                        {
+                          "text": "分批打印所选单据"
+                        }
+                      ]
+                    },
+                    {
+                      "xtype": "menuseparator"
+                    },
+                    {
+                      "text": "导入",
+                      "menu": [
+                        {
+                          "text": "导入"
+                        },
+                        {
+                          "text": "导入模板设置"
+                        }
+                      ]
+                    },
+                    {
+                      "text": "导出",
+                      "menu": [
+                        {
+                          "text": "导出模板设置"
+                        },
+                        {
+                          "text": "按列表导出数据"
+                        },
+                        {
+                          "text": "按导出模板导出数据"
+                        },
+                        {
+                          "text": "按导入模板导出数据"
+                        }
+                      ]
+                    },
+                    {
+                      "xtype": "menuseparator"
+                    },
+                    {
+                      "text": "附件"
+                    }
+                  ]
+                },
+                {
+                  "text": "退出"
+                }
+              ],
+              "showScheme": true,
+              "showHeaderFilter": true,
+              "showPagingBar": true,
+              "selType": "checkboxmodel"
+            }
+          ]
+        },
+        "schemes": [
+          {
+            "id": "default",
+            "name": "缺省方案",
+            "columns": [
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_CODE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_DATE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_SUPPLIER",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_STATUS",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PROD",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PRODNAME",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_UNIT",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_QTY",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_DELIVERY",
+                "width": 100
+              }
+            ]
+          },
+          {
+            "id": "today",
+            "name": "今天",
+            "filter": {
+              "entity": "PUR_ORDER",
+              "field": "PO_CREATEDATE",
+              "compare": "=",
+              "value": "today"
+            },
+            "columns": [
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_CODE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_DATE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_SUPPLIER",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_STATUS",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PROD",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PRODNAME",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_UNIT",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_QTY",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_DELIVERY",
+                "width": 100
+              }
+            ]
+          },
+          {
+            "id": "thisWeek",
+            "name": "本周",
+            "filter": {
+              "entity": "PUR_ORDER",
+              "field": "PO_CREATEDATE",
+              "compare": "=",
+              "value": "thisWeek"
+            },
+            "columns": [
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_CODE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_DATE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_SUPPLIER",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_STATUS",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PROD",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PRODNAME",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_UNIT",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_QTY",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_DELIVERY",
+                "width": 100
+              }
+            ]
+          },
+          {
+            "id": "thisMonth",
+            "name": "本月",
+            "filter": {
+              "entity": "PUR_ORDER",
+              "field": "PO_CREATEDATE",
+              "compare": "=",
+              "value": "thisMonth"
+            },
+            "columns": [
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_CODE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_DATE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_SUPPLIER",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_STATUS",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PROD",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PRODNAME",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_UNIT",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_QTY",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_DELIVERY",
+                "width": 100
+              }
+            ],
+            "default": true
+          },
+          {
+            "id": "unAudit",
+            "name": "待审核订单",
+            "filter": {
+              "entity": "PUR_ORDER",
+              "field": "PO_STATUS",
+              "compare": "=",
+              "value": "S"
+            },
+            "columns": [
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_CODE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_DATE",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_SUPPLIER",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER",
+                "field": "PO_STATUS",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PROD",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_PRODNAME",
+                "width": 200
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_UNIT",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_QTY",
+                "width": 100
+              },
+              {
+                "entity": "PUR_ORDER_ENTRY",
+                "field": "PO_ENTRY_DELIVERY",
+                "width": 100
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+]

+ 0 - 1125
applications/scm/scm-purchase/src/main/resources/metadata/Purchase.form.json

@@ -1,1125 +0,0 @@
-[
-  {
-    "id": "scm_purchase_order",
-    "name": "采购订单",
-    "type": "bill",
-    "idColumnName": "PO_ID",
-    "codeColumnName": "PO_CODE",
-    "entities": [
-      {
-        "name": "基本信息",
-        "tableName": "PUR_ORDER",
-        "type": "head",
-        "fields": [
-          {
-            "name": "单据编码",
-            "columnName": "PO_CODE",
-            "type": "code",
-            "length": 50
-          },
-          {
-            "name": "采购日期",
-            "columnName": "PO_DATE",
-            "type": "date"
-          },
-          {
-            "name": "供应商",
-            "columnName": "PO_SUPPLIER",
-            "type": "baseData",
-            "ref": "base_supplier",
-            "refField": "SU_NAME"
-          },
-          {
-            "name": "创建人",
-            "columnName": "PO_CREATOR",
-            "type": "creator"
-          },
-          {
-            "name": "创建日期",
-            "columnName": "PO_CREATEDATE",
-            "type": "createDate"
-          },
-          {
-            "name": "修改人",
-            "columnName": "PO_MODIFIER",
-            "type": "modifier"
-          },
-          {
-            "name": "修改日期",
-            "columnName": "PO_MODIFYDATE",
-            "type": "modifyDate"
-          },
-          {
-            "name": "审核人",
-            "columnName": "PO_AUDITOR",
-            "type": "user"
-          },
-          {
-            "name": "审核日期",
-            "columnName": "PO_AUDITDATE",
-            "type": "date"
-          },
-          {
-            "name": "单据状态",
-            "columnName": "PO_STATUS",
-            "type": "status",
-            "statusList": [
-              {
-                "code": "E",
-                "name": "在录入"
-              },
-              {
-                "code": "S",
-                "name": "已提交"
-              },
-              {
-                "code": "A",
-                "name": "已审核"
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "name": "明细信息",
-        "tableName": "PUR_ORDER_ENTRY",
-        "idColumnName": "PO_ENTRY_ID",
-        "seqColumnName": "PO_ENTRY_NO",
-        "type": "entry",
-        "fields": [
-          {
-            "name": "物料编码",
-            "columnName": "PO_ENTRY_PROD",
-            "type": "baseData",
-            "ref": "base_product",
-            "refField": "PR_CODE"
-          },
-          {
-            "name": "物料名称",
-            "columnName": "PO_ENTRY_PRODNAME",
-            "type": "baseDataProp",
-            "baseDataField": "PO_ENTRY_PROD",
-            "refField": "PR_NAME"
-          },
-          {
-            "name": "采购单位",
-            "columnName": "PO_ENTRY_UNIT",
-            "type": "baseData",
-            "ref": "base_unit"
-          },
-          {
-            "name": "采购数量",
-            "columnName": "PO_ENTRY_QTY",
-            "type": "qty"
-          },
-          {
-            "name": "计价单位",
-            "columnName": "PO_ENTRY_PRICE_UNIT",
-            "type": "baseData",
-            "ref": "base_unit"
-          },
-          {
-            "name": "计价数量",
-            "columnName": "PO_ENTRY_PRICE_QTY",
-            "type": "qty"
-          },
-          {
-            "name": "单价",
-            "columnName": "PO_ENTRY_PRICE",
-            "type": "price"
-          },
-          {
-            "name": "含税单价",
-            "columnName": "PO_ENTRY_TAXPRICE",
-            "type": "price"
-          },
-          {
-            "name": "折扣率%",
-            "columnName": "PO_ENTRY_DISCOUNT",
-            "type": "float"
-          },
-          {
-            "name": "税率%",
-            "columnName": "PO_ENTRY_TAXRATE",
-            "type": "float"
-          },
-          {
-            "name": "税额",
-            "columnName": "PO_ENTRY_TAXAMOUNT",
-            "type": "amount"
-          },
-          {
-            "name": "金额",
-            "columnName": "PO_ENTRY_AMOUNT",
-            "type": "amount"
-          },
-          {
-            "name": "价税合计",
-            "columnName": "PO_ENTRY_ALLAMOUNT",
-            "type": "amount"
-          },
-          {
-            "name": "交货日期",
-            "columnName": "PO_ENTRY_DELIVERY",
-            "type": "date"
-          },
-          {
-            "name": "交货地址",
-            "columnName": "PO_ENTRY_ADDRESS",
-            "type": "textarea",
-            "length": 255
-          }
-        ]
-      },
-      {
-        "name": "财务信息",
-        "tableName": "PUR_ORDER_FIN",
-        "idColumnName": "PO_FIN_ID",
-        "type": "subHead",
-        "fields": [
-          {
-            "name": "结算币别",
-            "columnName": "PO_FIN_CURR",
-            "type": "baseData",
-            "ref": "base_currency"
-          },
-          {
-            "name": "结算方式",
-            "columnName": "PO_FIN_SETTLE",
-            "type": "baseData",
-            "ref": "base_settle"
-          },
-          {
-            "name": "付款条件",
-            "columnName": "PO_FIN_PAYCOND",
-            "type": "baseData",
-            "ref": "base_paycondition"
-          }
-        ]
-      }
-    ],
-    "operations": [
-      {
-        "id": "save",
-        "name": "保存",
-        "type": "save"
-      },
-      {
-        "id": "submit",
-        "name": "提交",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "PO_STATUS",
-          "statusValue": "S"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 在录入,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PO_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "只能提交在录入的单据"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "unSubmit",
-        "name": "反提交",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "PO_STATUS",
-          "statusValue": "E"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 已提交,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PO_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "单据未提交"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "audit",
-        "name": "审核",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "PO_STATUS",
-          "statusValue": "A"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 在录入,不允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PO_STATUS",
-                  "compare": "=",
-                  "value": "E"
-                }
-              ],
-              "triggerOnTrue": true,
-              "message": "请先提交单据"
-            },
-            "level": "error"
-          },
-          {
-            "type": "legal",
-            "description": "状态 = 已审核,不允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PO_STATUS",
-                  "compare": "=",
-                  "value": "A"
-                }
-              ],
-              "triggerOnTrue": true,
-              "message": "单据已经审核,无需再审"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "unAudit",
-        "name": "反审核",
-        "type": "changeStatus",
-        "params": {
-          "statusField": "PO_STATUS",
-          "statusValue": "E"
-        },
-        "validators": [
-          {
-            "type": "legal",
-            "description": "状态 = 已审核,允许",
-            "params": {
-              "expression": [
-                {
-                  "field": "PO_STATUS",
-                  "compare": "=",
-                  "value": "A"
-                }
-              ],
-              "triggerOnTrue": false,
-              "message": "单据未审核"
-            },
-            "level": "error"
-          }
-        ],
-        "log": true
-      },
-      {
-        "id": "new",
-        "name": "新增",
-        "type": "addView",
-        "params": {
-          "viewName": "scm_purchase_order",
-          "viewType": "form",
-          "openType": "card"
-        }
-      },
-      {
-        "id": "close",
-        "name": "关闭",
-        "type": "closeView"
-      },
-      {
-        "id": "showList",
-        "name": "列表",
-        "type": "addView",
-        "params": {
-          "viewName": "scm_purc_order",
-          "viewType": "list",
-          "openType": "card"
-        }
-      },
-      {
-        "id": "newEntry",
-        "name": "新增明细行",
-        "type": "newEntry",
-        "params": {
-          "entity": "PUR_ORDER_ENTRY"
-        }
-      }
-    ],
-    "codeRules": [
-      {
-        "default": true,
-        "name": "采购订单编码规则",
-        "description": "采购订单编码规则",
-        "editable": true,
-        "repairable": true,
-        "entries": [
-          {
-            "type": "date",
-            "field": "PO_DATE",
-            "format": "yyyyMM"
-          },
-          {
-            "type": "number",
-            "cover": "0",
-            "seed": 1,
-            "increment": 1,
-            "length": 4
-          }
-        ]
-      }
-    ],
-    "views": [
-      {
-        "viewType": "form",
-        "layout": "fit",
-        "items": [
-          {
-            "xtype": "menubar",
-            "ui": "form-menubar",
-            "items": [
-              {
-                "text": "新增",
-                "menu": [
-                  {
-                    "text": "新增"
-                  },
-                  {
-                    "text": "复制"
-                  }
-                ]
-              },
-              {
-                "text": "保存",
-                "reference": "tbSave",
-                "operation": "save"
-              },
-              {
-                "text": "提交",
-                "menu": [
-                  {
-                    "text": "提交",
-                    "reference": "tbSubmit",
-                    "operation": "submit"
-                  },
-                  {
-                    "text": "反提交",
-                    "reference": "tbUnSubmit",
-                    "operation": "unSubmit"
-                  }
-                ]
-              },
-              {
-                "text": "审核",
-                "menu": [
-                  {
-                    "text": "审核",
-                    "reference": "tbAudit",
-                    "operation": "audit"
-                  },
-                  {
-                    "text": "反审核",
-                    "reference": "tbUnAudit",
-                    "operation": "unAudit"
-                  }
-                ]
-              },
-              {
-                "text": "列表",
-                "reference": "showListBtn",
-                "operation": "showList"
-              },
-              {
-                "text": "退出",
-                "reference": "closeBtn",
-                "operation": "close"
-              }
-            ]
-          },
-          {
-            "xtype": "tabpanel",
-            "ui": "form",
-            "height": 120,
-            "items": [
-              {
-                "title": "基本信息",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "xtype": "textfield",
-                    "fieldLabel": "单据编号",
-                    "bind": "{PUR_ORDER.PO_CODE}",
-                    "emptyText": "保存时自动生成",
-                    "x": 10,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "datefield",
-                    "fieldLabel": "采购日期",
-                    "bind": "{PUR_ORDER.PO_DATE}",
-                    "x": 310,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "供应商",
-                    "bind": "{PUR_ORDER.PO_SUPPLIER}",
-                    "x": 610,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "textfield",
-                    "fieldLabel": "单据状态",
-                    "bind": "{PUR_ORDER.PO_STATUS}",
-                    "x": 910,
-                    "y": 10,
-                    "width": 300,
-                    "disabled": true
-                  }
-                ]
-              },
-              {
-                "title": "财务信息",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "结算币别",
-                    "bind": "{PUR_ORDER_FIN.PO_FIN_CURR}",
-                    "x": 10,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "结算方式",
-                    "bind": "{PUR_ORDER_FIN.PO_FIN_SETTLE}",
-                    "x": 310,
-                    "y": 10,
-                    "width": 300
-                  },
-                  {
-                    "xtype": "searchfield",
-                    "fieldLabel": "付款条件",
-                    "bind": "{PUR_ORDER_FIN.PO_FIN_PAYCOND}",
-                    "x": 610,
-                    "y": 10,
-                    "width": 300
-                  }
-                ]
-              },
-              {
-                "title": "其他",
-                "layout": "absolute",
-                "items": [
-                  {
-                    "x": 10,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "创建人",
-                    "xtype": "textfield",
-                    "bind": "{PUR_ORDER.PO_CREATOR}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 10,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "创建日期",
-                    "xtype": "datefield",
-                    "bind": "{PUR_ORDER.PO_CREATEDATE}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 310,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "修改人",
-                    "xtype": "textfield",
-                    "bind": "{PUR_ORDER.PO_MODIFIER}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 310,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "修改日期",
-                    "xtype": "datefield",
-                    "bind": "{PUR_ORDER.PO_MODIFYDATE}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 610,
-                    "y": 10,
-                    "width": 300,
-                    "fieldLabel": "审核人",
-                    "xtype": "textfield",
-                    "bind": "{PUR_ORDER.PO_AUDITOR}",
-                    "disabled": true
-                  },
-                  {
-                    "x": 610,
-                    "y": 50,
-                    "width": 300,
-                    "fieldLabel": "审核日期",
-                    "xtype": "datefield",
-                    "bind": "{PUR_ORDER.PO_AUDITDATE}",
-                    "disabled": true
-                  }
-                ]
-              }
-            ]
-          },
-          {
-            "xtype": "tabpanel",
-            "ui": "form",
-            "items": [
-              {
-                "title": "明细信息",
-                "items": [
-                  {
-                    "xtype": "menubar",
-                    "ui": "form-menubar",
-                    "items": [
-                      {
-                        "text": "新增行",
-                        "menu": [
-                          {
-                            "text": "新增行",
-                            "reference": "newEntryBtn",
-                            "operation": "newEntry"
-                          },
-                          {
-                            "text": "插入行"
-                          },
-                          {
-                            "text": "复制行"
-                          },
-                          {
-                            "text": "关联复制行"
-                          },
-                          {
-                            "text": "多行关联复制行"
-                          }
-                        ]
-                      },
-                      {
-                        "text": "删除行"
-                      },
-                      {
-                        "text": "批量填充"
-                      },
-                      {
-                        "text": "业务操作",
-                        "menu": [
-                          {
-                            "text": "获取批号"
-                          },
-                          {
-                            "text": "获取库存"
-                          },
-                          {
-                            "text": "累计数量取价"
-                          }
-                        ]
-                      },
-                      {
-                        "text": "业务查询",
-                        "menu": [
-                          {
-                            "text": "价格查询"
-                          },
-                          {
-                            "text": "历史价格"
-                          },
-                          {
-                            "text": "库存查询"
-                          },
-                          {
-                            "text": "预留综合查询"
-                          },
-                          {
-                            "text": "研发资料"
-                          }
-                        ]
-                      }
-                    ]
-                  },
-                  {
-                    "xtype": "gridpanel",
-                    "entity": "PUR_ORDER_ENTRY",
-                    "bind": "{PUR_ORDER_ENTRY}",
-                    "editable": true,
-                    "ui": "form",
-                    "height": 368,
-                    "columns": [
-                      {
-                        "text": "序号",
-                        "align": "center",
-                        "dataIndex": "PO_ENTRY_NO",
-                        "width": 60
-                      },
-                      {
-                        "text": "物料编码",
-                        "xtype": "searchcolumn",
-                        "dataIndex": "PO_ENTRY_PROD",
-                        "editor": {
-                          "xtype": "searchfield"
-                        }
-                      },
-                      {
-                        "text": "物料名称",
-                        "dataIndex": "PO_ENTRY_PRODNAME",
-                        "width": 160
-                      },
-                      {
-                        "text": "采购单位",
-                        "xtype": "searchcolumn",
-                        "dataIndex": "PO_ENTRY_UNIT",
-                        "editor": {
-                          "xtype": "searchfield"
-                        }
-                      },
-                      {
-                        "text": "采购数量",
-                        "xtype": "numbercolumn",
-                        "dataIndex": "PO_ENTRY_QTY",
-                        "editor": {
-                          "xtype": "numberfield"
-                        }
-                      },
-                      {
-                        "text": "计价单位",
-                        "xtype": "searchcolumn",
-                        "dataIndex": "PO_ENTRY_PRICE_UNIT",
-                        "editor": {
-                          "xtype": "searchfield"
-                        }
-                      },
-                      {
-                        "text": "计价数量",
-                        "xtype": "numbercolumn",
-                        "dataIndex": "PO_ENTRY_PRICE_QTY",
-                        "editor": {
-                          "xtype": "numberfield"
-                        }
-                      },
-                      {
-                        "text": "交货日期",
-                        "xtype": "datecolumn",
-                        "dataIndex": "PO_ENTRY_DELIVERY",
-                        "editor": {
-                          "xtype": "datefield"
-                        }
-                      },
-                      {
-                        "text": "单价",
-                        "xtype": "numbercolumn",
-                        "dataIndex": "PO_ENTRY_PRICE"
-                      },
-                      {
-                        "text": "含税单价",
-                        "xtype": "numbercolumn",
-                        "dataIndex": "PO_ENTRY_TAXPRICE",
-                        "editor": {
-                          "xtype": "numberfield"
-                        }
-                      },
-                      {
-                        "text": "折扣率%",
-                        "xtype": "numbercolumn",
-                        "dataIndex": "PO_ENTRY_DISCOUNT",
-                        "editor": {
-                          "xtype": "numberfield"
-                        }
-                      },
-                      {
-                        "text": "税率%",
-                        "xtype": "numbercolumn",
-                        "dataIndex": "PO_ENTRY_TAXRATE",
-                        "editor": {
-                          "xtype": "numberfield"
-                        }
-                      },
-                      {
-                        "text": "税额",
-                        "xtype": "numbercolumn",
-                        "dataIndex": "PO_ENTRY_TAXAMOUNT"
-                      },
-                      {
-                        "text": "金额",
-                        "xtype": "numbercolumn",
-                        "dataIndex": "PO_ENTRY_AMOUNT"
-                      }
-                    ]
-                  }
-                ]
-              },
-              {
-                "title": "交货安排"
-              },
-              {
-                "title": "明细财务信息"
-              },
-              {
-                "title": "其他信息"
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "viewType": "list",
-        "layout": "fit",
-        "items": [
-          {
-            "xtype": "menubar",
-            "ui": "form-menubar",
-            "items": [
-              {
-                "text": "过滤"
-              },
-              {
-                "text": "刷新"
-              },
-              {
-                "text": "新增",
-                "menu": [
-                  {
-                    "text": "新增",
-                    "reference": "newBtn",
-                    "operation": "new"
-                  },
-                  {
-                    "text": "复制"
-                  }
-                ]
-              },
-              {
-                "text": "删除"
-              },
-              {
-                "text": "提交",
-                "menu": [
-                  {
-                    "text": "提交"
-                  },
-                  {
-                    "text": "反提交"
-                  }
-                ]
-              },
-              {
-                "text": "审核",
-                "menu": [
-                  {
-                    "text": "审核"
-                  },
-                  {
-                    "text": "反审核"
-                  }
-                ]
-              },
-              {
-                "text": "下推"
-              },
-              {
-                "text": "关联查询",
-                "menu": [
-                  {
-                    "text": "上查"
-                  },
-                  {
-                    "text": "下查"
-                  },
-                  {
-                    "xtype": "menuseparator"
-                  },
-                  {
-                    "text": "业务流程图"
-                  },
-                  {
-                    "text": "全流程跟踪"
-                  }
-                ]
-              },
-              {
-                "text": "业务操作",
-                "menu": [
-                  {
-                    "text": "作废"
-                  },
-                  {
-                    "xtype": "menuseparator"
-                  },
-                  {
-                    "text": "整单关闭"
-                  },
-                  {
-                    "text": "反关闭"
-                  },
-                  {
-                    "xtype": "menuseparator"
-                  },
-                  {
-                    "text": "计划确认"
-                  },
-                  {
-                    "text": "反计划确认"
-                  },
-                  {
-                    "xtype": "menuseparator"
-                  },
-                  {
-                    "text": "条码打印"
-                  },
-                  {
-                    "text": "修改变更"
-                  }
-                ]
-              },
-              {
-                "text": "业务查询",
-                "menu": [
-                  {
-                    "text": "预付查询"
-                  },
-                  {
-                    "text": "预留综合查询"
-                  },
-                  {
-                    "text": "研发资料"
-                  }
-                ]
-              },
-              {
-                "text": "选项",
-                "menu": [
-                  {
-                    "text": "选项"
-                  },
-                  {
-                    "xtype": "menuseparator"
-                  },
-                  {
-                    "text": "打印"
-                  },
-                  {
-                    "text": "预览"
-                  },
-                  {
-                    "text": "套打",
-                    "menu": [
-                      {
-                        "text": "套打设置"
-                      },
-                      {
-                        "xtype": "menuseparator"
-                      },
-                      {
-                        "text": "连续套打全部单据"
-                      },
-                      {
-                        "text": "连续套打所选单据"
-                      },
-                      {
-                        "text": "连续套打预览全部单据"
-                      },
-                      {
-                        "text": "连续套打预览所选单据"
-                      },
-                      {
-                        "xtype": "menuseparator"
-                      },
-                      {
-                        "text": "合并套打全部单据"
-                      },
-                      {
-                        "text": "合并套打所选单据"
-                      },
-                      {
-                        "text": "合并套打预览全部单据"
-                      },
-                      {
-                        "text": "合并套打预览所选单据"
-                      },
-                      {
-                        "xtype": "menuseparator"
-                      },
-                      {
-                        "text": "套打导出"
-                      },
-                      {
-                        "text": "分批打印全部单据"
-                      },
-                      {
-                        "text": "分批打印所选单据"
-                      }
-                    ]
-                  },
-                  {
-                    "xtype": "menuseparator"
-                  },
-                  {
-                    "text": "导入",
-                    "menu": [
-                      {
-                        "text": "导入"
-                      },
-                      {
-                        "text": "导入模板设置"
-                      }
-                    ]
-                  },
-                  {
-                    "text": "导出",
-                    "menu": [
-                      {
-                        "text": "导出模板设置"
-                      },
-                      {
-                        "text": "按列表导出数据"
-                      },
-                      {
-                        "text": "按导出模板导出数据"
-                      },
-                      {
-                        "text": "按导入模板导出数据"
-                      }
-                    ]
-                  },
-                  {
-                    "xtype": "menuseparator"
-                  },
-                  {
-                    "text": "附件"
-                  }
-                ]
-              },
-              {
-                "text": "退出"
-              }
-            ]
-          },
-          {
-            "xtype": "fieldcontainer",
-            "fieldLabel": "我的方案",
-            "labelWidth": 88,
-            "padding": "10 0 10 0",
-            "items": [
-              {
-                "xtype": "segmentedbutton",
-                "ui": "form",
-                "items": [
-                  {
-                    "text": "缺省方案"
-                  },
-                  {
-                    "text": "我的未完成订单"
-                  },
-                  {
-                    "text": "今天"
-                  },
-                  {
-                    "text": "本周"
-                  },
-                  {
-                    "text": "本月",
-                    "pressed": true
-                  },
-                  {
-                    "text": "未入库完成采购订单"
-                  },
-                  {
-                    "text": "待审核采购订单"
-                  },
-                  {
-                    "text": "今日收货"
-                  }
-                ]
-              }
-            ]
-          },
-          {
-            "xtype": "gridpanel",
-            "ui": "form",
-            "height": 584,
-            "showFilterBar": true,
-            "showHeaderFilter": true,
-            "showPagingBar": true,
-            "selType": "checkboxmodel",
-            "reference": "PUR_ORDER_ENTRY",
-            "store": {
-              "fields": [
-              ]
-            },
-            "columns": [
-              {
-                "text": "单据编号",
-                "dataIndex": "PO_CODE"
-              },
-              {
-                "text": "采购日期",
-                "dataIndex": "PO_DATE"
-              },
-              {
-                "text": "供应商",
-                "dataIndex": "PO_SUPPLIER",
-                "width": 200
-              },
-              {
-                "text": "单据状态",
-                "dataIndex": "PO_STATUS"
-              },
-              {
-                "text": "物料编码",
-                "dataIndex": "PO_ENTRY_PROD",
-                "width": 160
-              },
-              {
-                "text": "物料名称",
-                "dataIndex": "PO_ENTRY_PRODNAME",
-                "width": 200
-              },
-              {
-                "text": "采购单位",
-                "dataIndex": "PO_ENTRY_UNIT"
-              },
-              {
-                "text": "采购数量",
-                "dataIndex": "PO_ENTRY_QTY"
-              },
-              {
-                "text": "交货日期",
-                "dataIndex": "PO_ENTRY_DELIVERY"
-              }
-            ]
-          }
-        ]
-      }
-    ]
-  }
-]

+ 0 - 0
applications/scm/scm-purchase/src/main/resources/metadata/Receive.form.json


+ 0 - 0
applications/scm/scm-purchase/src/main/resources/metadata/ReqToOrder.convert.json


+ 10 - 0
applications/scm/scm-purchase/src/main/resources/metadata/Requisition.form.json

@@ -0,0 +1,10 @@
+[{
+  "id": "scm_purchase_apply",
+  "name": "采购申请",
+  "type": "bill",
+  "idColumnName": "PA_ID",
+  "codeColumnName": "PA_CODE",
+  "entities": [{
+    
+  }]
+}]

+ 0 - 0
applications/scm/scm-sale/src/main/resources/metadata/Sale.fn.json


+ 0 - 0
applications/scm/scm-sale/src/main/resources/metadata/Sale.module.json


+ 0 - 0
applications/scm/scm-stock/src/main/resources/metadata/Stock.fn.json


+ 0 - 0
applications/scm/scm-stock/src/main/resources/metadata/Stock.module.json


+ 0 - 0
applications/scm/scm-base/src/main/resources/metadata/Sys.domain.json → applications/sys/sys-base/src/main/resources/metadata/Sys.domain.json


+ 8 - 0
framework/framework-core/src/main/java/com/usoftchina/uas/util/CollectionUtils.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.util;
+
+/**
+ * @author yingp
+ * @date 2019/11/4
+ */
+public class CollectionUtils {
+}

+ 35 - 0
framework/framework-core/src/main/java/com/usoftchina/uas/util/Iterators.java

@@ -0,0 +1,35 @@
+package com.usoftchina.luban.core.util;
+
+import java.util.Objects;
+import java.util.function.BiConsumer;
+
+/**
+ * java8迭代工具
+ *
+ * @author yingp
+ * @date 2018/7/20
+ */
+public class Iterators {
+
+    /**
+     * Iterable迭代支持索引
+     * <pre>{@code
+     * Iterators.forEach(records, (i, record) -> {
+     *      System.out.println("index:" + i);
+     * });
+     * }</pre>
+     *
+     * @param iterable
+     * @param action
+     * @param <T>
+     */
+    public static <T> void forEach(Iterable<T> iterable, BiConsumer<? super Integer, ? super T> action) {
+        Objects.requireNonNull(iterable);
+        Objects.requireNonNull(action);
+
+        int index = 0;
+        for (T obj : iterable) {
+            action.accept(index++, obj);
+        }
+    }
+}

+ 8 - 0
framework/framework-core/src/main/java/com/usoftchina/uas/util/MapUtils.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.util;
+
+/**
+ * @author yingp
+ * @date 2019/11/11
+ */
+public class MapUtils {
+}

+ 8 - 0
framework/framework-core/src/main/java/com/usoftchina/uas/util/NumberUtils.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.util;
+
+/**
+ * @author yingp
+ * @date 2019/10/16
+ */
+public class NumberUtils {
+}

+ 8 - 0
framework/framework-core/src/main/java/com/usoftchina/uas/util/StatefulRecord.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.util;
+
+/**
+ * @author yingp
+ * @date 2019/10/24
+ */
+public class StatefulRecord {
+}

+ 0 - 3
framework/framework-domain/build.gradle

@@ -1,3 +0,0 @@
-dependencies {
-    compile project(':framework:framework-core')
-}

+ 0 - 48
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/DomainInitialize.java

@@ -1,48 +0,0 @@
-package com.usoftchina.uas.domain;
-
-import com.usoftchina.uas.domain.function.FunctionMetadata;
-import com.usoftchina.uas.domain.function.FunctionMetadataService;
-import com.usoftchina.uas.domain.module.ModuleMetadata;
-import com.usoftchina.uas.domain.module.ModuleMetadataService;
-import com.usoftchina.uas.metadata.MetadataScannedEvent;
-import org.springframework.context.ApplicationListener;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
-import org.springframework.util.CollectionUtils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * @author yingp
- * @date 2019/9/11
- */
-@Component
-@Async
-public class DomainInitialize implements ApplicationListener<MetadataScannedEvent> {
-    @Override
-    public void onApplicationEvent(MetadataScannedEvent event) {
-        Collection<DomainMetadata> domains = DomainMetadataService.getAll();
-        if (!CollectionUtils.isEmpty(domains)) {
-            domains.forEach(domain -> {
-                Collection<ModuleMetadata> modules = ModuleMetadataService.getByDomain(domain.getId());
-                if (!CollectionUtils.isEmpty(modules)) {
-                    if (null == domain.getModules()) {
-                        domain.setModules(new ArrayList<>());
-                    }
-                    domain.getModules().addAll(modules);
-
-                    modules.forEach(module -> {
-                        Collection<FunctionMetadata> fns = FunctionMetadataService.getByModule(module.getId());
-                        if (!CollectionUtils.isEmpty(fns)) {
-                            if (null == module.getFunctions()) {
-                                module.setFunctions(new ArrayList<>());
-                            }
-                            module.getFunctions().addAll(fns);
-                        }
-                    });
-                }
-            });
-        }
-    }
-}

+ 0 - 3
framework/framework-domain/src/main/resources/META-INF/uas.factories

@@ -1,3 +0,0 @@
-com.usoftchina.uas.metadata.MetadataResolver=com.usoftchina.uas.domain.DomainMetadataResolver,\
-com.usoftchina.uas.domain.module.ModuleMetadataResolver,\
-com.usoftchina.uas.domain.function.FunctionMetadataResolver

+ 0 - 52
framework/framework-entity/src/main/java/com/usoftchina/uas/entity/GenericEntity.java

@@ -1,52 +0,0 @@
-package com.usoftchina.uas.entity;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.usoftchina.uas.entity.util.EntityInsert;
-import com.usoftchina.uas.entity.util.EntityUpdate;
-import com.usoftchina.uas.util.Record;
-
-/**
- * @author yingp
- * @date 2019/9/11
- */
-public class GenericEntity extends Record {
-    private final EntityMetadata metadata;
-
-    public GenericEntity(EntityMetadata metadata) {
-        super();
-        this.metadata = metadata;
-    }
-
-    public GenericEntity(String tableName) {
-        super();
-        this.metadata = EntityMetadataService.get(tableName);
-    }
-
-    @JsonIgnore
-    public EntityMetadata getMetadata() {
-        return metadata;
-    }
-
-    /**
-     * 保存
-     */
-    public void save() {
-        if (null != metadata.getIdColumnName()) {
-            EntityInsert.insert(this, metadata);
-        } else {
-            Object id = get(metadata.getIdColumnName());
-            if (null == id) {
-                EntityInsert.insert(this, metadata);
-            } else {
-                EntityUpdate.update(this, metadata);
-            }
-        }
-    }
-
-    /**
-     * 删除
-     */
-    public void delete() {
-
-    }
-}

+ 8 - 0
framework/framework-entity/src/main/java/com/usoftchina/uas/entity/StatusControl.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.entity;
+
+/**
+ * @author yingp
+ * @date 2019/10/9
+ */
+public class StatusControl {
+}

+ 8 - 0
framework/framework-entity/src/main/java/com/usoftchina/uas/entity/filter/FilterMetadata.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.entity.filter;
+
+/**
+ * @author yingp
+ * @date 2019/10/30
+ */
+public class FilterMetadata {
+}

+ 26 - 0
framework/framework-entity/src/main/java/com/usoftchina/uas/entity/filter/SorterMetadata.java

@@ -0,0 +1,26 @@
+package com.usoftchina.uas.entity.filter;
+
+/**
+ * @author yingp
+ * @date 2019/11/8
+ */
+public class SortMetadata {
+    private String field;
+    private String direction;
+
+    public String getField() {
+        return field;
+    }
+
+    public void setField(String field) {
+        this.field = field;
+    }
+
+    public String getDirection() {
+        return direction;
+    }
+
+    public void setDirection(String direction) {
+        this.direction = direction;
+    }
+}

+ 8 - 0
framework/framework-entity/src/main/java/com/usoftchina/uas/entity/model/EntityModel.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.entity.model;
+
+/**
+ * @author yingp
+ * @date 2019/11/7
+ */
+public class EntityModel {
+}

+ 130 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainInitialize.java

@@ -0,0 +1,130 @@
+package com.usoftchina.uas.domain;
+
+import com.usoftchina.uas.domain.function.FunctionMetadata;
+import com.usoftchina.uas.domain.function.FunctionMetadataService;
+import com.usoftchina.uas.domain.module.ModuleMetadata;
+import com.usoftchina.uas.domain.module.ModuleMetadataService;
+import com.usoftchina.uas.entity.EntityInitializedEvent;
+import com.usoftchina.uas.entity.EntityMetadataService;
+import com.usoftchina.uas.entity.util.EntityInsert;
+import com.usoftchina.uas.entity.util.EntityUpdate;
+import com.usoftchina.uas.form.FormMetadata;
+import com.usoftchina.uas.form.FormMetadataService;
+import com.usoftchina.uas.form.util.FormEntityInsert;
+import com.usoftchina.uas.form.util.FormEntityQuery;
+import com.usoftchina.uas.jdbc.Filter;
+import com.usoftchina.uas.metadata.MetadataScannedEvent;
+import com.usoftchina.uas.util.CollectionUtils;
+import com.usoftchina.uas.util.Record;
+import org.springframework.context.event.EventListener;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
+
+import java.util.*;
+
+/**
+ * @author yingp
+ * @date 2019/9/11
+ */
+@Component
+@Async
+public class DomainInitialize {
+
+    @EventListener(MetadataScannedEvent.class)
+    public void onMetadataScannedEvent(MetadataScannedEvent event) {
+        Collection<DomainMetadata> domains = DomainMetadataService.getAll();
+        if (!CollectionUtils.isEmpty(domains)) {
+            domains.forEach(domain -> {
+                Collection<ModuleMetadata> modules = ModuleMetadataService.getByDomain(domain.getId());
+                if (!CollectionUtils.isEmpty(modules)) {
+                    if (null == domain.getModules()) {
+                        domain.setModules(new ArrayList<>());
+                    }
+                    domain.getModules().addAll(modules);
+
+                    modules.forEach(module -> {
+                        Collection<FunctionMetadata> fns = FunctionMetadataService.getByModule(module.getId());
+                        if (!CollectionUtils.isEmpty(fns)) {
+                            if (null == module.getFunctions()) {
+                                module.setFunctions(new ArrayList<>());
+                            }
+                            module.getFunctions().addAll(fns);
+                        }
+                    });
+                }
+            });
+        }
+    }
+
+    @EventListener(EntityInitializedEvent.class)
+    public void onEntityInitializedEvent(EntityInitializedEvent event) {
+        Collection<DomainMetadata> domains = DomainMetadataService.getAll();
+        if (!CollectionUtils.isEmpty(domains)) {
+            checkDomains(domains);
+        }
+    }
+
+    private void checkDomains(Collection<DomainMetadata> unresolvedDomains) {
+        FormMetadata form = FormMetadataService.get("meta_domain");
+        List<Record> resolvedDomains = FormEntityQuery.selectAll(form).where(Filter.equalTo("D_SYS", 1));
+        Map<String, Record> domainMap = CollectionUtils.toMap(resolvedDomains,
+                record -> record.deepGetString("META_DOMAIN", "D_CODE"));
+        List<Record> changedDomains = new ArrayList<>(1);
+        List<Record> newModules = new ArrayList<>(1);
+        List<Record> changedModules = new ArrayList<>(1);
+        List<Record> newDomainForms = new ArrayList<>(1);
+        int domainSeq = 0;
+        for (DomainMetadata domain : unresolvedDomains) {
+            domainSeq++;
+            Record formRecord = domainMap.get(domain.getId());
+            if (null != formRecord) {
+                Record domainRecord = (Record) formRecord.get("META_DOMAIN");
+                if (!domain.getName().equals(domainRecord.get("D_NAME"))
+                        || domainSeq != domainRecord.getIntValue("D_SEQ")) {
+                    domainRecord.set("D_NAME", domain.getName());
+                    domainRecord.set("D_SEQ", domainSeq);
+                    changedDomains.add(domainRecord);
+                }
+                if (null != domain.getModules()) {
+                    Map<String, Record> moduleMap = CollectionUtils.toMap((List<Record>) formRecord.get("META_SUBSYS"),
+                            record -> record.getString("S_CODE"));
+                    int moduleSeq = 0;
+                    for (ModuleMetadata module : domain.getModules()) {
+                        moduleSeq++;
+                        Record moduleRecord = moduleMap.get(module.getId());
+                        if (null != moduleRecord) {
+                            if (!module.getName().equals(moduleRecord.getString("S_NAME"))
+                                    || moduleSeq != moduleRecord.getIntValue("S_SEQ")) {
+                                moduleRecord.set("S_NAME", domain.getName());
+                                moduleRecord.set("S_SEQ", domainSeq);
+                                changedModules.add(moduleRecord);
+                            }
+                        } else {
+                            moduleRecord = new Record("D_ID", domainRecord.get("D_ID"))
+                                    .set("S_NAME", module.getName())
+                                    .set("S_CODE", module.getId())
+                                    .set("S_SEQ", moduleSeq);
+                            newModules.add(moduleRecord);
+                        }
+                    }
+                }
+                // 暂不考虑删除domain、module情况,多人开发时误删
+            } else {
+                newDomainForms.add(domain.toFormRecord().set("META_DOMAIN.D_SEQ", domainSeq));
+            }
+        }
+
+        if (!changedDomains.isEmpty()) {
+            EntityUpdate.updateAll(changedDomains, EntityMetadataService.get("META_DOMAIN"));
+        }
+        if (!changedModules.isEmpty()) {
+            EntityUpdate.updateAll(changedModules, EntityMetadataService.get("META_SUBSYS"));
+        }
+        if (!newModules.isEmpty()) {
+            EntityInsert.insertAll(newModules, EntityMetadataService.get("META_SUBSYS"));
+        }
+        if (!newDomainForms.isEmpty()) {
+            FormEntityInsert.insertAll(newDomainForms, form);
+        }
+    }
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainInitializedEvent.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.domain;
+
+/**
+ * @author yingp
+ * @date 2019/11/5
+ */
+public class DomainInitializedEvent {
+}

+ 17 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/DomainMetadata.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainMetadata.java

@@ -2,7 +2,9 @@ package com.usoftchina.uas.domain;
 
 import com.usoftchina.uas.domain.module.ModuleMetadata;
 import com.usoftchina.uas.metadata.Metadata;
+import com.usoftchina.uas.util.Record;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -54,4 +56,19 @@ public class DomainMetadata implements Metadata {
     public void setModules(List<ModuleMetadata> modules) {
         this.modules = modules;
     }
+
+    public Record toFormRecord() {
+        Record record = new Record("META_DOMAIN", new Record("D_SYS", 1)
+                .set("D_NAME", name)
+                .set("D_CODE", id));
+        if (null != modules) {
+            List<Record> moduleRecords = new ArrayList<>(modules.size());
+            int index = 0;
+            for (ModuleMetadata module : modules) {
+                moduleRecords.add(module.toRecord().set("S_SEQ", ++index));
+            }
+            record.set("META_SUBSYS", moduleRecords);
+        }
+        return record;
+    }
 }

+ 0 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/DomainMetadataResolver.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainMetadataResolver.java


+ 0 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/DomainMetadataService.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/DomainMetadataService.java


+ 0 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/function/FunctionEntryMetadata.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/function/FunctionEntryMetadata.java


+ 0 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadata.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadata.java


+ 0 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadataResolver.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadataResolver.java


+ 0 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadataService.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/function/FunctionMetadataService.java


+ 7 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadata.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadata.java

@@ -2,6 +2,7 @@ package com.usoftchina.uas.domain.module;
 
 import com.usoftchina.uas.domain.function.FunctionMetadata;
 import com.usoftchina.uas.metadata.Metadata;
+import com.usoftchina.uas.util.Record;
 
 import java.util.List;
 
@@ -71,4 +72,10 @@ public class ModuleMetadata implements Metadata {
     public void setFunctions(List<FunctionMetadata> functions) {
         this.functions = functions;
     }
+
+    public Record toRecord() {
+        return new Record("S_SYS", 1)
+                .set("S_NAME", name)
+                .set("S_CODE", id);
+    }
 }

+ 0 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadataResolver.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadataResolver.java


+ 0 - 0
framework/framework-domain/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadataService.java → framework/framework-form/src/main/java/com/usoftchina/uas/domain/module/ModuleMetadataService.java


+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/bill/BillInitialize.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.bill;
+
+/**
+ * @author yingp
+ * @date 2019/11/5
+ */
+public class BillInitialize {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/bill/BillTypeService.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.bill;
+
+/**
+ * @author yingp
+ * @date 2019/11/6
+ */
+public class BillTypeService {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/bill/ConvertMetadata.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.bill;
+
+/**
+ * @author yingp
+ * @date 2019/11/13
+ */
+public class ConvertMetadata {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/dynamic/TipController.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.dynamic;
+
+/**
+ * @author yingp
+ * @date 2019/11/12
+ */
+public class TipController {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/operation/CopyHandler.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.operation;
+
+/**
+ * @author yingp
+ * @date 2019/11/8
+ */
+public class CopyHandler {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/operation/RefreshHandler.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.operation;
+
+/**
+ * @author yingp
+ * @date 2019/11/11
+ */
+public class RefreshHandler {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/validator/LegalValidator.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.validator;
+
+/**
+ * @author yingp
+ * @date 2019/11/11
+ */
+public class LegalValidator {
+}

+ 0 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/validator/FormValidator.java → framework/framework-form/src/main/java/com/usoftchina/uas/form/validator/Validator.java


+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/DynamicModel.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.view;
+
+/**
+ * @author yingp
+ * @date 2019/10/28
+ */
+public class DynamicModel {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/DynamicView.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.view;
+
+/**
+ * @author yingp
+ * @date 2019/10/28
+ */
+public class DynamicView {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntityDataUtils.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.view;
+
+/**
+ * @author yingp
+ * @date 2019/11/11
+ */
+public class EntityUtils {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntityRecord.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.view;
+
+/**
+ * @author yingp
+ * @date 2019/10/25
+ */
+public class EntityRecord {
+}

+ 70 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntityRenderUtils.java

@@ -0,0 +1,70 @@
+package com.usoftchina.uas.form.view;
+
+import com.usoftchina.uas.entity.EntityFieldMetadata;
+import com.usoftchina.uas.entity.EntityMetadata;
+import com.usoftchina.uas.entity.util.EntityQuery;
+import com.usoftchina.uas.form.FormMetadata;
+import com.usoftchina.uas.form.FormMetadataService;
+import com.usoftchina.uas.jdbc.Filter;
+import com.usoftchina.uas.util.Record;
+
+import java.util.Map;
+
+/**
+ * @author yingp
+ * @date 2019/10/25
+ */
+public class FieldRenderUtils {
+    public static void renderField(EntityMetadata entity, EntityFieldMetadata field, Record record, Map<String, Object> renderData) {
+        switch (field.getType()) {
+            case "creator":
+            case "modifier":
+            case "user":
+                Object userId = record.get(field.getColumnName());
+                if (null != userId) {
+                    Record user = EntityQuery.select("SEC_USER").cache().byId(userId);
+                    if (null != user) {
+                        renderData.put(field.getColumnName(), user.get("USER_NAME"));
+                    }
+                }
+                break;
+            case "baseData":
+                Object baseDataId = record.get(field.getColumnName());
+                if (null != baseDataId) {
+                    Record baseData = getBaseData(field.getRef(), baseDataId);
+                    if (null != baseData) {
+                        renderData.put(field.getColumnName(), baseData.get(field.getRefField()));
+                        entity.getFields().stream()
+                                .filter(prop -> "baseDataProp".equals(prop.getType()) && field.getColumnName().equals(prop.getBaseDataField()))
+                                .forEach(prop -> {
+                                    renderData.put(prop.getColumnName(), baseData.get(prop.getRefField()));
+                                });
+                    }
+                }
+                break;
+            case "supportData":
+                String supportCode = record.getString(field.getColumnName());
+                if (null != supportCode) {
+                    Record supportData = getSupportData(supportCode);
+                    if (null != supportData) {
+                        renderData.put(field.getColumnName(), supportData.get("SD_ENTRY_NAME"));
+                    }
+                }
+            case "key":
+                break;
+            default:
+                renderData.put(field.getColumnName(), record.get(field.getColumnName()));
+                break;
+        }
+    }
+
+    private static Record getBaseData(String baseDataType, Object baseDataId) {
+        FormMetadata baseForm = FormMetadataService.get(baseDataType);
+        return EntityQuery.select(baseForm.headEntity()).cache().byId(baseDataId);
+    }
+
+    private static Record getSupportData(String supportCode) {
+        return EntityQuery.select("BASE_SUPPORTDATA_ENTRY").cache()
+                .where(Filter.equalTo("SD_ENTRY_CODE", supportCode));
+    }
+}

+ 83 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntityStore.java

@@ -0,0 +1,83 @@
+package com.usoftchina.uas.view.virtual;
+
+import com.usoftchina.uas.util.StatefulRecord;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author yingp
+ * @date 2019/10/25
+ */
+public class Store {
+    private final String storeId;
+    private List<StatefulRecord> records;
+    private final View view;
+
+    public Store(String storeId, View view) {
+        this.storeId = storeId;
+        this.view = view;
+    }
+
+    public void loadData(Collection<Map<String, Object>> data) {
+        if (null != data) {
+            records = data.stream().map(StoreRecord::new).collect(Collectors.toList());
+        } else {
+            records = null;
+        }
+
+        view.invokeMethod("loadData", storeId, data);
+    }
+
+    public StatefulRecord getAt(int rowIndex) {
+        return null == records ? null : records.get(rowIndex);
+    }
+
+    public StatefulRecord add(Map<String, Object> data) {
+        StoreRecord record = new StoreRecord(data);
+        if (null == records) {
+            records = new ArrayList<>(1);
+        }
+        records.add(record);
+
+        view.invokeMethod("addData", storeId, data);
+        return record;
+    }
+
+    public StatefulRecord insert(int rowIndex, Map<String, Object> data) {
+        StoreRecord record = new StoreRecord(data);
+        if (null == records) {
+            records = new ArrayList<>(1);
+        }
+        records.add(rowIndex, record);
+
+        view.invokeMethod("insertData", storeId, rowIndex, data);
+        return record;
+    }
+
+    public void remove(int rowIndex) {
+        if (null != records) {
+            records.remove(rowIndex);
+
+            view.invokeMethod("removeData", storeId, rowIndex);
+        }
+    }
+
+    class StoreRecord extends StatefulRecord {
+        private boolean rendered;
+
+        public StoreRecord(Map<String, Object> other) {
+            super(other);
+            rendered = true;
+        }
+
+        @Override
+        public Object put(String key, Object value) {
+            Object oldVal = super.put(key, value);
+            if (rendered) {
+                view.invokeMethod("updateData", storeId, records.indexOf(this), key, value);
+            }
+            return oldVal;
+        }
+    }
+}

+ 0 - 34
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/EntryViewController.java

@@ -1,34 +0,0 @@
-package com.usoftchina.uas.form.view;
-
-import com.usoftchina.uas.view.virtual.*;
-import org.springframework.stereotype.Component;
-
-import java.util.HashSet;
-import java.util.List;
-
-/**
- * 表单分录控制
- *
- * @author yingp
- * @date 2019/9/19
- */
-@Component
-@GlobalController
-public class EntryViewController extends ViewController {
-    public EntryViewController() {
-        super();
-        on(GridPanel.EVENT_SELECTION_CHANGE, this::onGridSelectionChange);
-    }
-
-    @Override
-    public boolean matches(View view) {
-        return "form".equals(view.getMetadata().getViewType());
-    }
-
-    private void onGridSelectionChange(View view, Object[] args) {
-        String entryEntityName = (String) args[0];
-        Selection selection = view.formModel().safeGetSelection(entryEntityName);
-        selection.setLastSelected((Integer) args[1]);
-        selection.setSelected(new HashSet<>((List) args[2]));
-    }
-}

+ 125 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/FormModel.java

@@ -0,0 +1,125 @@
+package com.usoftchina.uas.form.view;
+
+import com.usoftchina.uas.entity.EntityMetadata;
+import com.usoftchina.uas.view.virtual.Selection;
+import com.usoftchina.uas.view.virtual.View;
+import com.usoftchina.uas.view.virtual.ViewModel;
+
+import java.util.*;
+
+/**
+ * 单据视图数据模型
+ *
+ * @author yingp
+ * @date 2019/10/28
+ */
+public class BillModel extends ViewModel {
+    private EntityMetadata entity;
+    /**
+     * 分录表行选择状态
+     * 表名 - 行选择状态
+     */
+    private Map<String, Selection> selectionMap;
+    /**
+     * 单据头、子单据头数据
+     * 表名 - 数据
+     */
+    private Map<String, EntityRecord> headData;
+    /**
+     * 分录表数据
+     * 表名 - 数据
+     */
+    private Map<String, EntityStore> entryData;
+
+    public BillModel(View view) {
+        super(view);
+    }
+
+    public EntityMetadata getEntity() {
+        return entity;
+    }
+
+    public void setEntity(EntityMetadata entity) {
+        this.entity = entity;
+    }
+
+    public Selection getSelection(String entryEntityName) {
+        return null == selectionMap ? null : selectionMap.get(entryEntityName);
+    }
+
+    public Selection safeGetSelection(String entryEntityName) {
+        Selection selection = getSelection(entryEntityName);
+        if (null == selection) {
+            selection = new Selection();
+            setSelection(entryEntityName, selection);
+        }
+        return selection;
+    }
+
+    public void setSelection(String entryEntityName, Selection selection) {
+        if (null == selectionMap) {
+            selectionMap = new HashMap<>(1);
+        }
+        selectionMap.put(entryEntityName, selection);
+    }
+
+    public EntityRecord getHead(String headEntityName) {
+        return null == headData ? null : headData.get(headEntityName);
+    }
+
+    public EntityRecord safeGetHead(String headEntityName) {
+        EntityRecord record = getHead(headEntityName);
+        if (null == record) {
+            return initHead(headEntityName);
+        }
+        return record;
+    }
+
+    public EntityRecord setHead(String entryEntityName, Map<String, Object> data) {
+        if (null == headData) {
+            headData = new HashMap<>(1);
+        }
+        EntityRecord record = new EntityRecord(getView(), getEntity(), data);
+        headData.put(entryEntityName, record);
+        return record;
+    }
+
+    public EntityRecord initHead(String entryEntityName) {
+        if (null == headData) {
+            headData = new HashMap<>(1);
+        }
+        EntityRecord record = new EntityRecord(getView(), getEntity());
+        headData.put(entryEntityName, record);
+        return record;
+    }
+
+    public EntityStore getEntry(String entryEntityName) {
+        return null == entryData ? null : entryData.get(entryEntityName);
+    }
+
+    public EntityStore safeGetEntry(String entryEntityName) {
+        EntityStore store = getEntry(entryEntityName);
+        if (null == store) {
+            return initEntry(entryEntityName);
+        }
+        return store;
+    }
+
+    public EntityStore initEntry(String entryEntityName) {
+        if (null == entryData) {
+            entryData = new HashMap<>(1);
+        }
+        EntityStore store = new EntityStore(getView(), getEntity());
+        entryData.put(entryEntityName, store);
+        return store;
+    }
+
+    public EntityStore setEntry(String entryEntityName, Collection<Map<String, Object>> dataList) {
+        if (null == entryData) {
+            entryData = new HashMap<>(1);
+        }
+        EntityStore store = new EntityStore(getView(), getEntity(), dataList);
+        entryData.put(entryEntityName, store);
+        return store;
+    }
+}

+ 16 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/FormView.java

@@ -0,0 +1,16 @@
+package com.usoftchina.uas.form.view;
+
+import com.usoftchina.uas.view.ViewMetadata;
+import com.usoftchina.uas.view.virtual.Application;
+import com.usoftchina.uas.view.virtual.View;
+
+/**
+ * @author yingp
+ * @date 2019/10/28
+ */
+public class BillView extends View<BillModel> {
+
+    public BillView(Application application, ViewMetadata metadata) {
+        super(application, metadata);
+    }
+}

+ 42 - 40
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/FormViewController.java

@@ -1,70 +1,72 @@
 package com.usoftchina.uas.form.view;
 
-import com.usoftchina.uas.entity.Status;
+import com.usoftchina.uas.entity.EntityMetadata;
 import com.usoftchina.uas.form.FormMetadata;
 import com.usoftchina.uas.form.FormMetadataService;
-import com.usoftchina.uas.view.virtual.GlobalController;
-import com.usoftchina.uas.view.virtual.View;
-import com.usoftchina.uas.view.virtual.ViewController;
+import com.usoftchina.uas.form.util.FormEntityQuery;
+import com.usoftchina.uas.view.virtual.*;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 
-import java.util.Date;
+import java.util.*;
 
 /**
- * 单控制
+ * 单控制
  *
  * @author yingp
  * @date 2019/9/19
  */
 @Component
 @GlobalController
-public class FormViewController extends ViewController {
+public class BillViewController extends ViewController<BillView> {
 
-    public FormViewController() {
+    public BillViewController() {
         super();
-        on(View.EVENT_INIT, this::onInit);
+        // 单据数据初始化
+        on(View.EVENT_INIT, BillViewController::onInit);
+        // 单据分录行控制
+        on(GridPanel.EVENT_SELECTION_CHANGE, BillViewController::onGridSelectionChange);
     }
 
     @Override
-    public boolean matches(View view) {
+    public boolean matches(BillView view) {
         return "form".equals(view.getMetadata().getViewType());
     }
 
-    private void onInit(View view, Object[] args) {
+    private static void onInit(BillView view, Object[] args) {
         FormMetadata form = FormMetadataService.get(view.getMetadata().getName());
-        if (null == view.formModel().getCondition()) {
-            // 单据新增
-            initFields(view, form);
-        } else {
+        Map<String, Object> formData = null;
+        if (null != view.model().getCondition()) {
             // 单据查看
+            List<Map<String, Object>> list = FormEntityQuery.selectAll(form).where(view.model().getCondition());
+            if (!CollectionUtils.isEmpty(list)) {
+                formData = list.get(0);
+            }
         }
-    }
 
-    private void initFields(View view, FormMetadata form) {
-        if (CollectionUtils.isEmpty(form.getEntities())) {
-            return;
-        }
-        form.getEntities().forEach(entity -> {
-            entity.getFields().forEach(field -> {
-                switch (field.getType()) {
-                    case "creator":
-                        // current user
-                        break;
-                    case "createDate":
-                        view.updateHeadData(entity.getTableName(), field.getColumnName(), new Date());
-                        break;
-                    case "status":
-                        if (!CollectionUtils.isEmpty(field.getStatusList())) {
-                            Status defaultStatus = field.getStatusList().get(0);
-                            view.updateHeadData(entity.getTableName(), field.getColumnName(),
-                                    defaultStatus.getCode());
-                        }
-                        break;
-                    default:
-                        break;
+        for (EntityMetadata entity : form.getEntities()) {
+            if (entity.isEntryEntity()) {
+                if (null == formData) {
+                    view.model().initEntry(entity.getTableName());
+                } else if (formData.containsKey(entity.getTableName())) {
+                    view.model().setEntry(entity.getTableName(),
+                            (List<Map<String, Object>>) formData.get(entity.getTableName()));
+                }
+            } else {
+                if (null == formData) {
+                    view.model().initHead(entity.getTableName());
+                } else if (formData.containsKey(entity.getTableName())) {
+                    view.model().setHead(entity.getTableName(),
+                            (Map<String, Object>) formData.get(entity.getTableName()));
                 }
-            });
-        });
+            }
+        }
+    }
+
+    private static void onGridSelectionChange(BillView view, Object[] args) {
+        String entryEntityName = (String) args[0];
+        Selection selection = view.model().safeGetSelection(entryEntityName);
+        selection.setLastSelected((Integer) args[1]);
+        selection.setSelected(new HashSet<>((List) args[2]));
     }
 }

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/ListModel.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.view;
+
+/**
+ * @author yingp
+ * @date 2019/10/28
+ */
+public class ListModel {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/ListView.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.view;
+
+/**
+ * @author yingp
+ * @date 2019/10/28
+ */
+public class ListView {
+}

+ 8 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/form/view/ViewStateUtils.java

@@ -0,0 +1,8 @@
+package com.usoftchina.uas.form.util;
+
+/**
+ * @author yingp
+ * @date 2019/11/8
+ */
+public class FieldStateUtils {
+}

+ 18 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/object/BizObjectInitialize.java

@@ -0,0 +1,18 @@
+package com.usoftchina.uas.object;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author yingp
+ * @date 2019/11/6
+ */
+@Component
+@Async
+public class ObjectInitialize {
+    private final Logger logger = LoggerFactory.getLogger(ObjectInitialize.class);
+
+
+}

+ 15 - 0
framework/framework-form/src/main/java/com/usoftchina/uas/object/BizObjectInitializedEvent.java

@@ -0,0 +1,15 @@
+package com.usoftchina.uas.domain;
+
+import org.springframework.context.ApplicationEvent;
+
+/**
+ * 业务领域资料修复完成
+ *
+ * @author yingp
+ * @date 2019/11/5
+ */
+public class DomainInitializedEvent extends ApplicationEvent {
+    public DomainInitializedEvent(Object source) {
+        super(source);
+    }
+}

+ 23 - 0
framework/framework-form/src/main/resources/metadata/Base.domain.json

@@ -0,0 +1,23 @@
+[
+  {
+    "name": "基础管理",
+    "id": "base",
+    "modules": [
+      {
+        "id": "base_data",
+        "name": "基础资料",
+        "domain": "base"
+      },
+      {
+        "id": "base_setting",
+        "name": "公共设置",
+        "domain": "base"
+      },
+      {
+        "id": "base_init",
+        "name": "初始化管理",
+        "domain": "base"
+      }
+    ]
+  }
+]

+ 0 - 0
framework/framework-form/src/main/resources/metadata/Bill.form.json


+ 0 - 0
framework/framework-form/src/main/resources/metadata/BillType.form.json


+ 16 - 0
framework/framework-form/src/main/resources/metadata/Dev.domain.json

@@ -0,0 +1,16 @@
+[
+  {
+    "name": "开发平台",
+    "id": "base",
+    "modules": [
+      {
+        "id": "base_meta",
+        "name": "元模型管理"
+      },
+      {
+        "id": "base_frame",
+        "name": "应用框架"
+      }
+    ]
+  }
+]

+ 75 - 0
framework/framework-form/src/main/resources/metadata/Domain.form.json

@@ -0,0 +1,75 @@
+[
+  {
+    "id": "meta_domain",
+    "name": "业务领域",
+    "type": "baseData",
+    "idColumnName": "D_ID",
+    "entities": [
+      {
+        "name": "业务领域",
+        "tableName": "META_DOMAIN",
+        "type": "head",
+        "fields": [
+          {
+            "name": "编码",
+            "columnName": "D_CODE",
+            "type": "text",
+            "length": 50
+          },
+          {
+            "name": "名称",
+            "columnName": "D_NAME",
+            "type": "text",
+            "length": 100
+          },
+          {
+            "name": "系统预设",
+            "columnName": "D_SYS",
+            "type": "checkbox"
+          },
+          {
+            "name": "顺序",
+            "columnName": "D_SEQ",
+            "type": "int"
+          }
+        ]
+      },
+      {
+        "name": "子系统",
+        "tableName": "META_SUBSYS",
+        "type": "entry",
+        "idColumnName": "S_ID",
+        "fields": [
+          {
+            "name": "编码",
+            "columnName": "S_CODE",
+            "type": "text",
+            "length": 50
+          },
+          {
+            "name": "名称",
+            "columnName": "S_NAME",
+            "type": "text",
+            "length": 100
+          },
+          {
+            "name": "描述",
+            "columnName": "S_DESC",
+            "type": "textarea",
+            "length": 100
+          },
+          {
+            "name": "系统预设",
+            "columnName": "S_SYS",
+            "type": "checkbox"
+          },
+          {
+            "name": "顺序",
+            "columnName": "S_SEQ",
+            "type": "int"
+          }
+        ]
+      }
+    ]
+  }
+]

Some files were not shown because too many files changed in this diff