Files
ssw-platform/crates/sspf-lowcode/tests/fixtures/sample_form.json
T
admin f0c77f731c feat(lowcode): 低代码元数据引擎第一波 —— 解析 + 校验 + 3 个只读工具
- 新 crate sspf-lowcode(纯计算,AR7 钉住不依赖 DB/HTTP):widget 把 54 种 jnpfKey 归成 11 类
  (决定「怎么存、能不能接收入参」)/ form 解析控件树 / model 解析表结构 / validate 9 类诊断码
- DDL:base_visual_dev + base_visual_release 逐字对齐官方(21 → 23 张表)
- MCP 3 个只读工具:form.list / form.describe / form.validate,后两个支持 inline JSON
- 真实样例落盘为 fixture(官方初始化数据的「应收费用」:主表 6 字段 / 子表 8 字段)
- 新增 lowcode-smoke.sh 8 条(含两条反自证:改坏 __vModel__ 必被抓、未知控件只 warn)
- 影响:测试 306 → 344;十二闸全绿;三条真实方言已写进注释与测试
2026-10-31 11:47:40 +08:00

751 lines
20 KiB
JSON

{
"formRef": "formRef",
"formModel": "dataForm",
"size": "default",
"labelPosition": "right",
"labelWidth": 100,
"labelSuffix": "",
"formRules": "rules",
"popupType": "general",
"generalWidth": "1000px",
"fullScreenWidth": "100%",
"drawerWidth": "600px",
"gutter": 15,
"disabled": false,
"span": 24,
"colon": false,
"hasCancelBtn": true,
"cancelButtonText": "取消",
"cancelButtonTextI18nCode": "common.cancelText",
"hasConfirmBtn": true,
"confirmButtonText": "确定",
"confirmButtonTextI18nCode": "common.okText",
"hasConfirmAndAddBtn": true,
"hasPrintBtn": false,
"printButtonText": "打印",
"printButtonTextI18nCode": "common.printText",
"customBtns": [],
"appCustomBtns": [],
"primaryKeyPolicy": 1,
"concurrencyLock": false,
"logicalDelete": false,
"dataLog": false,
"useBusinessKey": false,
"businessKeyList": [],
"businessKeyTip": "数据已存在,请勿重复提交!",
"printId": "",
"formStyle": "",
"classNames": [],
"className": [],
"classJson": "",
"detailExtraList": [],
"funcs": {
"beforeSubmit": "({ formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n return new Promise((resolve, reject) => {\n // 在此编写代码\n \n // 继续执行\n resolve()\n })\n}",
"onLoad": "({ formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"afterSubmit": "({ formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
},
"fields": [
{
"__config__": {
"formId": 101,
"visibility": [
"pc",
"app"
],
"jnpfKey": "billRule",
"noShow": false,
"tipLabel": "",
"dragDisabled": false,
"rule": "rukudanhao",
"className": [],
"label": "楼宇号",
"trigger": "change",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916533424,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-documents",
"ruleName": "入库单号",
"tag": "JnpfInput",
"span": 12,
"ruleType": 1,
"ruleConfig": {
"prefixList": [],
"type": 1,
"dateFormat": "YYYY",
"digit": null,
"startNumber": "",
"randomDigit": 16,
"randomType": 1,
"suffixList": []
}
},
"readonly": true,
"__vModel__": "F_Building",
"style": {
"width": "100%"
},
"placeholder": "系统自动生成"
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 102,
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "房间号",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916557528,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"tag": "JnpfInput",
"regList": [],
"span": 12
},
"readonly": false,
"__vModel__": "F_Room",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 103,
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "公司名称",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916580722,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"tag": "JnpfInput",
"regList": [],
"span": 12
},
"readonly": false,
"__vModel__": "F_Company_name",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 104,
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "对接人",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916581187,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"tag": "JnpfInput",
"regList": [],
"span": 12
},
"readonly": false,
"__vModel__": "F_Userid",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 105,
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "联系方式",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916609582,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Phone",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 106,
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "职务",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916619222,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Ost",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"showSummary": 0,
"actionText": "添加",
"tableConf": {},
"defaultValue": [],
"footerBtnsList": [
{
"btnIcon": "icon-ym icon-ym-btn-add",
"show": true,
"label": "添加",
"btnType": "primary",
"value": "add"
},
{
"btnIcon": "icon-ym icon-ym-btn-clearn",
"showConfirm": true,
"show": true,
"label": "批量删除",
"btnType": "danger",
"value": "batchRemove"
}
],
"addTableConf": {
"popupType": "dialog",
"hasPage": true,
"popupTitle": "选择数据",
"pageSize": 20,
"columnOptions": [],
"interfaceId": "",
"interfaceName": "",
"relationOptions": [],
"templateJson": [],
"popupWidth": "800px"
},
"columnBtnsList": [
{
"btnIcon": "icon-ym icon-ym-btn-edit",
"show": true,
"label": "复制",
"btnType": "primary",
"value": "copy"
},
{
"btnIcon": "icon-ym icon-ym-btn-clearn",
"showConfirm": true,
"show": true,
"label": "删除",
"btnType": "danger",
"value": "remove"
}
],
"summaryField": [],
"showDeleteBtn": true,
"addType": 0,
"__config__": {
"formId": 107,
"visibility": [
"pc",
"app"
],
"jnpfKey": "table",
"defaultValue": [],
"noShow": false,
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "添加明细",
"type": "table",
"showLabel": false,
"tableName": "test_details",
"renderKey": 1693916635901,
"layout": "rowFormItem",
"tagIcon": "icon-ym icon-ym-generator-table",
"children": [
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 108,
"relationTable": "test_details",
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"parentVModel": "tableField107",
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "缴费月份",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916679090,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"isSubTable": true,
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Month",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 109,
"relationTable": "test_details",
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"parentVModel": "tableField107",
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "房租",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916698892,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"isSubTable": true,
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Rent",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 110,
"relationTable": "test_details",
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"parentVModel": "tableField107",
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "水费",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916709404,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"isSubTable": true,
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Water_rent",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 111,
"relationTable": "test_details",
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"parentVModel": "tableField107",
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "电费",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916719125,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"isSubTable": true,
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Powerrate",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 112,
"relationTable": "test_details",
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"parentVModel": "tableField107",
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "物业费",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916726876,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"isSubTable": true,
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Property",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 113,
"relationTable": "test_details",
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"parentVModel": "tableField107",
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "垃圾费",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916738956,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"isSubTable": true,
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Cleaning",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 114,
"relationTable": "test_details",
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"parentVModel": "tableField107",
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "排污费",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916749773,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"isSubTable": true,
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Pollutant",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
},
{
"clearable": true,
"suffixIcon": "",
"addonAfter": "",
"__config__": {
"formId": 115,
"relationTable": "test_details",
"visibility": [
"pc",
"app"
],
"jnpfKey": "input",
"noShow": false,
"parentVModel": "tableField107",
"tipLabel": "",
"dragDisabled": false,
"className": [],
"label": "累计应收费用",
"trigger": "blur",
"showLabel": true,
"required": false,
"tableName": "test_receivable",
"renderKey": 1693916759950,
"layout": "colFormItem",
"tagIcon": "icon-ym icon-ym-generator-input",
"isSubTable": true,
"tag": "JnpfInput",
"regList": [],
"span": 24
},
"readonly": false,
"__vModel__": "F_Totalbilling",
"showPassword": false,
"style": {
"width": "100%"
},
"disabled": false,
"placeholder": "请输入",
"prefixIcon": "",
"addonBefore": "",
"on": {
"change": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
"blur": "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
}
}
],
"showTitle": true,
"complexHeaderList": [],
"tag": "JnpfInputTable",
"componentName": "table107",
"span": 24
},
"showAddBtn": true,
"__vModel__": "tableField107",
"disabled": false,
"layoutType": "table"
}
],
"idGlobal": 115,
"formBtns": false,
"confirmAndAddText": "确定并继续操作"
}