feat(blueprint): master-detail-v1 编译器分支 + PageBlueprintChild
PageBlueprint 加 RECIPE_MASTER_DETAIL 常量与可空 child 组件(14-arg, 保留 13-arg 兼容构造);新增 PageBlueprintChild record。 PageBlueprintCompiler.masterDetail 复用 maintenance 列表骨架, 新增/编辑表单内联 house-style input-table 子表(name=listColumn, quickEdit 控件),编辑表单 initApi 走 _LOAD 回显主+子行。 validate 接受 master-detail 并要求 child 非空/childTable/listColumn 非空/fields 非空。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
309
转换产物-attach/schema/36f33460-15df-4674-bae1-93c722337ae4.json
Normal file
309
转换产物-attach/schema/36f33460-15df-4674-bae1-93c722337ae4.json
Normal file
@@ -0,0 +1,309 @@
|
||||
{
|
||||
"type" : "page",
|
||||
"title" : "人事变动-退休",
|
||||
"body" : {
|
||||
"type" : "crud",
|
||||
"api" : "/api/flow/HR_LOGRETIRE_SEARCH",
|
||||
"syncLocation" : false,
|
||||
"selectable" : true,
|
||||
"checkOnItemClick" : true,
|
||||
"filter" : {
|
||||
"title" : "查询",
|
||||
"body" : [ {
|
||||
"name" : "EMPLOYEE",
|
||||
"label" : "姓名",
|
||||
"type" : "picker",
|
||||
"clearable" : true,
|
||||
"source" : "/api/picker/4982d448-a9d4-493e-9e1d-ebcd3c7dfcd6/list",
|
||||
"labelField" : "_label",
|
||||
"valueField" : "_id",
|
||||
"modalMode" : "dialog",
|
||||
"modalSize" : "lg",
|
||||
"pickerSchema" : {
|
||||
"mode" : "table",
|
||||
"headerToolbar" : [ {
|
||||
"type" : "search-box",
|
||||
"name" : "q",
|
||||
"placeholder" : "输入关键字搜索"
|
||||
} ],
|
||||
"footerToolbar" : [ "pagination" ]
|
||||
}
|
||||
}, {
|
||||
"name" : "RETIRETIME",
|
||||
"label" : "退休日期",
|
||||
"type" : "input-date-range"
|
||||
}, {
|
||||
"name" : "DEPART",
|
||||
"label" : "部门",
|
||||
"type" : "tree-select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/template/138b7ca7-befb-4a0c-bfc6-ed8fb4d4e434/tree",
|
||||
"searchable" : true,
|
||||
"onlyLeaf" : true
|
||||
}, {
|
||||
"name" : "JOB",
|
||||
"label" : "岗位",
|
||||
"type" : "tree-select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/template/feeee51d-d41b-410b-b7a4-67d61ec8c4df/tree",
|
||||
"searchable" : true,
|
||||
"onlyLeaf" : true
|
||||
}, {
|
||||
"name" : "NEWPAY",
|
||||
"label" : "退休薪资",
|
||||
"type" : "input-number",
|
||||
"precision" : 2
|
||||
}, {
|
||||
"name" : "REMARK",
|
||||
"label" : "备注",
|
||||
"type" : "input-text"
|
||||
} ]
|
||||
},
|
||||
"columns" : [ {
|
||||
"name" : "HR_LOGRETIRE_ID",
|
||||
"label" : "主键",
|
||||
"width" : 200,
|
||||
"toggled" : false
|
||||
}, {
|
||||
"name" : "EMPLOYEENUM",
|
||||
"label" : "工号",
|
||||
"width" : 80
|
||||
}, {
|
||||
"name" : "EMPLOYEE_DISPLAY__",
|
||||
"label" : "姓名",
|
||||
"width" : 80
|
||||
}, {
|
||||
"name" : "DEPART",
|
||||
"label" : "部门",
|
||||
"width" : 150
|
||||
}, {
|
||||
"name" : "JOB",
|
||||
"label" : "岗位",
|
||||
"width" : 180
|
||||
}, {
|
||||
"name" : "RETIRETIME",
|
||||
"label" : "退休日期",
|
||||
"width" : 80,
|
||||
"type" : "date",
|
||||
"format" : "YYYY-MM-DD",
|
||||
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
||||
}, {
|
||||
"name" : "NEWPAY",
|
||||
"label" : "退休薪资",
|
||||
"width" : 50
|
||||
}, {
|
||||
"name" : "JOBSTATUS",
|
||||
"label" : "在职状态",
|
||||
"width" : 50,
|
||||
"type" : "mapping",
|
||||
"map" : {
|
||||
"1" : "在职",
|
||||
"2" : "离职",
|
||||
"3" : "退休",
|
||||
"4" : "退休留用",
|
||||
"5" : "聘用"
|
||||
}
|
||||
} ],
|
||||
"headerToolbar" : [ {
|
||||
"type" : "button",
|
||||
"id" : "添加",
|
||||
"label" : "添加",
|
||||
"level" : "primary",
|
||||
"actionType" : "dialog",
|
||||
"dialog" : {
|
||||
"type" : "dialog",
|
||||
"title" : "添加",
|
||||
"size" : "lg",
|
||||
"body" : {
|
||||
"type" : "service",
|
||||
"schemaApi" : "get:/api/page/schema/02caa80b-7856-4b7b-bdd8-a8c7503a6216?format=amis",
|
||||
"api" : {
|
||||
"method" : "get",
|
||||
"url" : "/api/form/HR_LOGRETIRE/defaults?templateId=02caa80b-7856-4b7b-bdd8-a8c7503a6216"
|
||||
}
|
||||
},
|
||||
"actions" : [ {
|
||||
"type" : "button",
|
||||
"label" : "保存",
|
||||
"level" : "primary",
|
||||
"actionType" : "submit",
|
||||
"api" : "POST:/api/flow/HR_LOGRETIRE_ADD?__egtpl=02caa80b-7856-4b7b-bdd8-a8c7503a6216",
|
||||
"close" : true
|
||||
}, {
|
||||
"type" : "button",
|
||||
"label" : "取消",
|
||||
"actionType" : "close"
|
||||
} ]
|
||||
}
|
||||
}, {
|
||||
"type" : "button",
|
||||
"id" : "退回",
|
||||
"label" : "退回",
|
||||
"actionType" : "ajax",
|
||||
"disabled" : true,
|
||||
"confirmText" : "退回将更新员工为“在职”状态,是否继续?",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/flow/HR_LOGRETIRE_DELETE",
|
||||
"data" : {
|
||||
"HR_LOGRETIRE_ID" : "${selectedItems[0].HR_LOGRETIRE_ID}"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"type" : "button",
|
||||
"id" : "查看",
|
||||
"label" : "查看",
|
||||
"actionType" : "dialog",
|
||||
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
||||
"dialog" : {
|
||||
"type" : "dialog",
|
||||
"title" : "查看",
|
||||
"size" : "lg",
|
||||
"data" : {
|
||||
"&" : "${selectedItems[0]}",
|
||||
"__readonly" : true
|
||||
},
|
||||
"body" : {
|
||||
"type" : "service",
|
||||
"schemaApi" : "get:/api/page/schema/02caa80b-7856-4b7b-bdd8-a8c7503a6216?format=amis",
|
||||
"static" : true,
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/flow/HR_LOGRETIRE_LOAD?__egtpl=02caa80b-7856-4b7b-bdd8-a8c7503a6216",
|
||||
"data" : {
|
||||
"HR_LOGRETIRE_ID" : "${HR_LOGRETIRE_ID}"
|
||||
},
|
||||
"responseData" : {
|
||||
"&" : "${result}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"type" : "button",
|
||||
"id" : "留用",
|
||||
"label" : "留用",
|
||||
"actionType" : "dialog",
|
||||
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
||||
"dialog" : {
|
||||
"type" : "dialog",
|
||||
"title" : "留用",
|
||||
"size" : "lg",
|
||||
"data" : {
|
||||
"&" : "${selectedItems[0]}"
|
||||
},
|
||||
"body" : {
|
||||
"type" : "service",
|
||||
"schemaApi" : "get:/api/page/schema/4984a83a-e5f0-45ef-89b8-b079d074e276?format=amis",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/flow/HR_LOGRETIRE_LOAD?__egtpl=4984a83a-e5f0-45ef-89b8-b079d074e276",
|
||||
"data" : {
|
||||
"HR_LOGRETIRE_ID" : "${HR_LOGRETIRE_ID}"
|
||||
},
|
||||
"responseData" : {
|
||||
"&" : "${result}"
|
||||
}
|
||||
},
|
||||
"onEvent" : {
|
||||
"inited" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "ajax",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/script/execute-template",
|
||||
"data" : {
|
||||
"seq" : 2,
|
||||
"item" : "${&}",
|
||||
"templateId" : "36f33460-15df-4674-bae1-93c722337ae4"
|
||||
}
|
||||
},
|
||||
"outputVar" : "scriptResult2"
|
||||
}, {
|
||||
"actionType" : "replayScriptCommands",
|
||||
"args" : {
|
||||
"commands" : "${event.data.scriptResult2.commands}"
|
||||
}
|
||||
} ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"actions" : [ {
|
||||
"type" : "button",
|
||||
"label" : "保存",
|
||||
"level" : "primary",
|
||||
"actionType" : "submit",
|
||||
"api" : "POST:/api/flow/HR_LOGRETIRE_WORK?__egtpl=4984a83a-e5f0-45ef-89b8-b079d074e276",
|
||||
"close" : true
|
||||
}, {
|
||||
"type" : "button",
|
||||
"label" : "取消",
|
||||
"actionType" : "close"
|
||||
} ]
|
||||
}
|
||||
}, {
|
||||
"type" : "button",
|
||||
"id" : "取消留用",
|
||||
"label" : "取消留用",
|
||||
"actionType" : "ajax",
|
||||
"disabled" : true,
|
||||
"confirmText" : "取消留用将更新员工为“退休”状态,是否继续?",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/flow/HR_LOGRETIRE_NOWORK",
|
||||
"data" : {
|
||||
"HR_LOGRETIRE_ID" : "${selectedItems[0].HR_LOGRETIRE_ID}"
|
||||
}
|
||||
}
|
||||
}, "pagination" ],
|
||||
"primaryField" : "HR_LOGRETIRE_ID",
|
||||
"onEvent" : {
|
||||
"selectedChange" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "disabled",
|
||||
"componentId" : "退回"
|
||||
}, {
|
||||
"actionType" : "disabled",
|
||||
"componentId" : "取消留用"
|
||||
}, {
|
||||
"actionType" : "ajax",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/script/execute-template",
|
||||
"data" : {
|
||||
"seq" : 1,
|
||||
"item" : "${event.data.selectedItems[0]}",
|
||||
"templateId" : "36f33460-15df-4674-bae1-93c722337ae4"
|
||||
}
|
||||
},
|
||||
"outputVar" : "scriptResult1"
|
||||
}, {
|
||||
"actionType" : "replayScriptCommands",
|
||||
"args" : {
|
||||
"commands" : "${event.data.scriptResult1.commands}"
|
||||
}
|
||||
} ]
|
||||
},
|
||||
"inited" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "ajax",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/script/execute-template",
|
||||
"data" : {
|
||||
"seq" : 2,
|
||||
"item" : "${&}",
|
||||
"templateId" : "36f33460-15df-4674-bae1-93c722337ae4"
|
||||
}
|
||||
},
|
||||
"outputVar" : "scriptResult2"
|
||||
}, {
|
||||
"actionType" : "replayScriptCommands",
|
||||
"args" : {
|
||||
"commands" : "${event.data.scriptResult2.commands}"
|
||||
}
|
||||
} ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user