Files
eip4-platform/转换产物-attach/schema/fb4bef0f-9561-468b-bd5c-53f2349dba51.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

417 lines
12 KiB
JSON

{
"type" : "page",
"title" : "车辆档案",
"body" : {
"type" : "crud",
"api" : "/api/flow/OA_VEHICLEINFORMATION_SEARCH",
"syncLocation" : false,
"selectable" : true,
"checkOnItemClick" : true,
"filter" : {
"title" : "查询",
"body" : [ {
"name" : "PLATENUMBER",
"label" : "车牌号",
"type" : "input-text"
}, {
"name" : "VEHICLETYPEID",
"label" : "车辆类型",
"type" : "select",
"clearable" : true,
"source" : "/api/picker/OA_VEHICLETYPE/list?perPage=500"
}, {
"name" : "FLEETID",
"label" : "车队",
"type" : "select",
"clearable" : true,
"source" : "/api/picker/OA_FLEET/list?perPage=500"
}, {
"name" : "VEHICLESTATUS",
"label" : "车辆目前的状态",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/vehicleStatus"
} ]
},
"columns" : [ {
"name" : "OA_VEHICLEINFORMATION_ID",
"label" : "主键",
"width" : 200,
"toggled" : false
}, {
"name" : "PLATENUMBER",
"label" : "车牌号",
"width" : 100
}, {
"name" : "VEHICLETYPEID_DISPLAY__",
"label" : "车辆类型",
"width" : 100
}, {
"name" : "BRAND",
"label" : "品牌",
"width" : 100
}, {
"name" : "MODEL",
"label" : "型号",
"width" : 100
}, {
"name" : "BURDEN",
"label" : "载客人数/载货量",
"width" : 100
}, {
"name" : "FLEETID_DISPLAY__",
"label" : "所属车队",
"width" : 100
}, {
"name" : "DRIVERID_DISPLAY__",
"label" : "驾驶员",
"width" : 100
}, {
"name" : "VEHICLESTATUS",
"label" : "车辆目前的状态",
"width" : 100,
"type" : "mapping",
"map" : {
"0" : "可用",
"1" : "维修保养中",
"2" : "已报废",
"3" : "已停用"
}
}, {
"name" : "VEHICLECOLOR",
"label" : "颜色",
"width" : 50,
"toggled" : false
}, {
"name" : "PRODUCTIONDATE",
"label" : "出厂日期",
"width" : 200,
"type" : "date",
"format" : "YYYY-MM-DD",
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ",
"toggled" : false
}, {
"name" : "PURCHASEDATE",
"label" : "购买日期",
"width" : 200,
"type" : "date",
"format" : "YYYY-MM-DD",
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ",
"toggled" : false
}, {
"name" : "BUYINGPRICE",
"label" : "购买价格(万元)",
"width" : 200,
"toggled" : false
}, {
"name" : "SUPPLIER",
"label" : "供应商",
"width" : 200,
"toggled" : false
}, {
"name" : "SUPPLIERCONTACT",
"label" : "供应商联系人",
"width" : 200,
"toggled" : false
}, {
"name" : "SUPPLIERTELEPHONE",
"label" : "供应商联系电话",
"width" : 200,
"toggled" : false
}, {
"name" : "MAINTENANCESTATION",
"label" : "维修站",
"width" : 200,
"toggled" : false
}, {
"name" : "MAINTENANCECONTACT",
"label" : "维修站联系人",
"width" : 200,
"toggled" : false
}, {
"name" : "MAINTENANCETELEPHONE",
"label" : "维修站联系电话",
"width" : 200,
"toggled" : false
}, {
"name" : "VEHICLEPICTURE",
"label" : "车辆图片存放地址",
"width" : 200,
"toggled" : false
}, {
"name" : "ISPUBLIC",
"label" : "是否公开车辆",
"width" : 200,
"type" : "mapping",
"map" : {
"0" : "否",
"1" : "是",
"false" : "否",
"true" : "是"
},
"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/d85ce8f3-3b91-45e6-b65d-5dee7b9fc546?format=amis",
"api" : {
"method" : "get",
"url" : "/api/form/OA_VEHICLEINFORMATION/defaults?templateId=d85ce8f3-3b91-45e6-b65d-5dee7b9fc546"
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/OA_VEHICLEINFORMATION_ADD?__egtpl=d85ce8f3-3b91-45e6-b65d-5dee7b9fc546",
"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/d85ce8f3-3b91-45e6-b65d-5dee7b9fc546?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/OA_VEHICLEINFORMATION_LOAD?__egtpl=d85ce8f3-3b91-45e6-b65d-5dee7b9fc546",
"data" : {
"OA_VEHICLEINFORMATION_ID" : "${OA_VEHICLEINFORMATION_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/OA_VEHICLEINFORMATION_UPDATE?__egtpl=d85ce8f3-3b91-45e6-b65d-5dee7b9fc546",
"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_VEHICLEINFORMATION_DELETE",
"data" : {
"ids" : "${selectedItems|pick:OA_VEHICLEINFORMATION_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/d85ce8f3-3b91-45e6-b65d-5dee7b9fc546?format=amis",
"static" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/OA_VEHICLEINFORMATION_LOAD?__egtpl=d85ce8f3-3b91-45e6-b65d-5dee7b9fc546",
"data" : {
"OA_VEHICLEINFORMATION_ID" : "${OA_VEHICLEINFORMATION_ID}"
},
"responseData" : {
"&" : "${result}"
}
},
"onEvent" : {
"inited" : {
"actions" : [ {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 1,
"item" : "${&}",
"templateId" : "fb4bef0f-9561-468b-bd5c-53f2349dba51"
}
},
"outputVar" : "scriptResult1"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult1.commands}"
}
} ]
}
}
}
}
}, {
"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/f6dd0e45-13da-490d-8f49-a346206f2392?format=amis",
"static" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/OA_VEHICLEINFORMATION_LOAD?__egtpl=f6dd0e45-13da-490d-8f49-a346206f2392",
"data" : {
"OA_VEHICLEINFORMATION_ID" : "${OA_VEHICLEINFORMATION_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
}
}
}, {
"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/a747fcb9-3422-431a-be5a-1a3effce7dba?format=amis",
"static" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/OA_VEHICLEINFORMATION_LOAD?__egtpl=a747fcb9-3422-431a-be5a-1a3effce7dba",
"data" : {
"OA_VEHICLEINFORMATION_ID" : "${OA_VEHICLEINFORMATION_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
}
}
}, {
"type" : "button",
"id" : "停用/取消停用",
"label" : "停用/取消停用",
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/flow/OA_VEHICLEINFORMATION_ENABLEORDISABLE_VEHICLE",
"data" : {
"OA_VEHICLEINFORMATION_ID" : "${selectedItems[0].OA_VEHICLEINFORMATION_ID}"
}
},
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
}, {
"type" : "button",
"id" : "报废",
"label" : "报废",
"actionType" : "ajax",
"confirmText" : "确定报废此车辆吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/OA_VEHICLEINFORMATION_SCRAP_VEHICLE",
"data" : {
"OA_VEHICLEINFORMATION_ID" : "${selectedItems[0].OA_VEHICLEINFORMATION_ID}"
}
},
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
}, {
"type" : "button",
"id" : "维修保养/完成维修保养",
"label" : "维修保养/完成维修保养",
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/flow/OA_VEHICLEINFORMATION_REPAIRORMAINTAIN_VEHICLE",
"data" : {
"OA_VEHICLEINFORMATION_ID" : "${selectedItems[0].OA_VEHICLEINFORMATION_ID}"
}
},
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
}, "pagination" ],
"primaryField" : "OA_VEHICLEINFORMATION_ID",
"onEvent" : {
"inited" : {
"actions" : [ {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 1,
"item" : "${&}",
"templateId" : "fb4bef0f-9561-468b-bd5c-53f2349dba51"
}
},
"outputVar" : "scriptResult1"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult1.commands}"
}
} ]
}
}
}
}