Files
eip4-platform/转换产物-attach/schema/98f89c49-e242-46c4-aab6-774fa79a9328.json
zhengwr 8fe377b0c8 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>
2026-06-20 15:16:30 +08:00

258 lines
7.0 KiB
JSON

{
"type" : "page",
"title" : "办公用品档案信息",
"body" : {
"type" : "crud",
"api" : "/api/flow/OA_OFFICE_GOODS_SEARCH",
"syncLocation" : false,
"selectable" : true,
"checkOnItemClick" : true,
"filter" : {
"title" : "查询",
"body" : [ {
"name" : "GOODS_NAME",
"label" : "用品名称:",
"type" : "input-text"
}, {
"name" : "GOODS_IMPORTANCE",
"label" : "重要性",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/OFFICE_SIZE"
}, {
"name" : "USESTATUS",
"label" : "使用状态",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/OFFICE_USERSTATUS"
} ]
},
"columns" : [ {
"name" : "OA_OFFICE_GOODS_ID",
"label" : "主键",
"width" : 100,
"toggled" : false
}, {
"name" : "GOODS_NAME",
"label" : "用品名称",
"width" : 100
}, {
"name" : "GOODS_UNIT",
"label" : "计量单位",
"width" : 100
}, {
"name" : "GOODS_STANDARD",
"label" : "规格",
"width" : 100
}, {
"name" : "GOODSSORT_ID_DISPLAY__",
"label" : "用品类别",
"width" : 100
}, {
"name" : "GOODS_IMPORTANCE",
"label" : "重要性",
"width" : 100,
"type" : "mapping",
"map" : {
"1" : "大件",
"2" : "小件"
}
}, {
"name" : "MAXIMUMINVENTORY",
"label" : "库存上限",
"width" : 100
}, {
"name" : "MININUMINVENTORY",
"label" : "库存下限",
"width" : 100
}, {
"name" : "USESTATUS",
"label" : "使用状态",
"width" : 100,
"type" : "mapping",
"map" : {
"0" : "停用",
"1" : "启用"
}
}, {
"name" : "REMARK",
"label" : "备注",
"width" : 100,
"toggled" : false
} ],
"headerToolbar" : [ {
"type" : "button",
"id" : "添加",
"label" : "添加",
"level" : "primary",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "添加",
"size" : "lg",
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/cf7cdbf8-f45b-43ee-9094-30065b8fe193?format=amis",
"api" : {
"method" : "get",
"url" : "/api/form/OA_OFFICE_GOODS/defaults?templateId=cf7cdbf8-f45b-43ee-9094-30065b8fe193"
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/OA_OFFICE_GOODS_ADD?__egtpl=cf7cdbf8-f45b-43ee-9094-30065b8fe193",
"close" : true
}, {
"type" : "button",
"label" : "取消",
"actionType" : "close"
} ]
}
}, {
"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/cf7cdbf8-f45b-43ee-9094-30065b8fe193?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/OA_OFFICE_GOODS_LOAD?__egtpl=cf7cdbf8-f45b-43ee-9094-30065b8fe193",
"data" : {
"OA_OFFICE_GOODS_ID" : "${OA_OFFICE_GOODS_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/OA_OFFICE_GOODS_UPDATE?__egtpl=cf7cdbf8-f45b-43ee-9094-30065b8fe193",
"close" : true
}, {
"type" : "button",
"label" : "取消",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "删除",
"label" : "删除",
"level" : "danger",
"actionType" : "ajax",
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
"confirmText" : "确定删除此记录吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/OA_OFFICE_GOODS_DELETE",
"data" : {
"ids" : "${selectedItems|pick:OA_OFFICE_GOODS_ID|join:','}"
}
}
}, {
"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/cf7cdbf8-f45b-43ee-9094-30065b8fe193?format=amis",
"static" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/OA_OFFICE_GOODS_LOAD?__egtpl=cf7cdbf8-f45b-43ee-9094-30065b8fe193",
"data" : {
"OA_OFFICE_GOODS_ID" : "${OA_OFFICE_GOODS_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
}
}
}, {
"type" : "button",
"id" : "停用",
"label" : "停用",
"actionType" : "ajax",
"disabled" : true,
"confirmText" : "确认要停用此用品吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/OA_OFFICE_GOODS_OFF",
"data" : {
"OA_OFFICE_GOODS_ID" : "${selectedItems[0].OA_OFFICE_GOODS_ID}"
}
}
}, {
"type" : "button",
"id" : "启用",
"label" : "启用",
"actionType" : "ajax",
"disabled" : true,
"confirmText" : "确认要启用此用品吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/OA_OFFICE_GOODS_ON",
"data" : {
"OA_OFFICE_GOODS_ID" : "${selectedItems[0].OA_OFFICE_GOODS_ID}"
}
}
}, "pagination" ],
"primaryField" : "OA_OFFICE_GOODS_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" : "98f89c49-e242-46c4-aab6-774fa79a9328"
}
},
"outputVar" : "scriptResult1"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult1.commands}"
}
} ]
}
}
}
}