Files
eip4-platform/转换产物-attach/schema/a0999644-8dbd-446e-ae38-6a207bf69665.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

431 lines
12 KiB
JSON

{
"type" : "page",
"title" : "设备进出场",
"body" : {
"type" : "crud",
"api" : "/api/flow/PM_PROJECTEQUIPMENT_SEARCH",
"syncLocation" : false,
"selectable" : true,
"checkOnItemClick" : true,
"filter" : {
"title" : "查询",
"body" : [ {
"name" : "PROJECTID",
"label" : "工程名称",
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/07eef963-fd17-42a5-997c-219f0ec18cff/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
},
"value" : "${currentProject}"
}, {
"name" : "MACHINECONTRACTREGISTERID",
"label" : "机械合同",
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/25ca5618-4918-47e6-ac7f-d2b1fcb55906/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
}
}, {
"name" : "EQUIPMENTNO",
"label" : "设备编码",
"disabled" : true,
"type" : "input-text"
}, {
"name" : "EQUIPMENTID",
"label" : "设备",
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/433f6b07-06a7-482f-90c5-cb7aa6a5d252/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
}
}, {
"name" : "EQUIPMENTSOURCE",
"label" : "设备来源",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/EQUIPMENT_EQUIPMENTSOURCE"
}, {
"name" : "IMPORTDATE",
"label" : "进场日期",
"type" : "input-date-range"
}, {
"name" : "ISACCOUNTS",
"label" : "是否记账",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/YESNO"
} ]
},
"columns" : [ {
"name" : "PM_PROJECTEQUIPMENT_ID",
"label" : "主键",
"width" : 200,
"toggled" : false
}, {
"name" : "PROJECTID_DISPLAY__",
"label" : "工程名称",
"width" : 200
}, {
"name" : "MACHINECONTRACTREGISTERID_DISPLAY__",
"label" : "机械合同",
"width" : 200
}, {
"name" : "MACHINESUPPLIERID_DISPLAY__",
"label" : "机械供应商",
"width" : 200
}, {
"name" : "EQUIPMENTNO",
"label" : "设备编码",
"width" : 200
}, {
"name" : "EQUIPMENTID_DISPLAY__",
"label" : "设备",
"width" : 200
}, {
"name" : "SPECIFICATIONS",
"label" : "规格型号",
"width" : 200
}, {
"name" : "TESTREPORT",
"label" : "检测报告",
"width" : 200
}, {
"name" : "EQUIPMENTSOURCE",
"label" : "设备来源",
"width" : 200,
"type" : "mapping",
"map" : {
"1" : "自有",
"2" : "租赁"
}
}, {
"name" : "NUMBER",
"label" : "数量",
"width" : 200
}, {
"name" : "LEASEPRICE",
"label" : "租赁单价(元)",
"width" : 200
}, {
"name" : "TOTALPRICE",
"label" : "合价(元)",
"width" : 200
}, {
"name" : "AMORTIZEDAYS",
"label" : "摊销天数",
"width" : 200
}, {
"name" : "IMPORTDATE",
"label" : "进场日期",
"width" : 200,
"type" : "date",
"format" : "YYYY-MM-DD",
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
}, {
"name" : "INSTALLUNIT",
"label" : "安装单位",
"width" : 200
}, {
"name" : "INSTALLDATE",
"label" : "安装日期",
"width" : 200,
"type" : "date",
"format" : "YYYY-MM-DD",
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
}, {
"name" : "REMARK",
"label" : "备注",
"width" : 200
}, {
"name" : "EXPORTDATE",
"label" : "出场日期",
"width" : 200,
"type" : "date",
"format" : "YYYY-MM-DD",
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
}, {
"name" : "ISACCOUNTS",
"label" : "是否记账",
"width" : 200,
"type" : "mapping",
"map" : {
"0" : "否",
"1" : "是",
"false" : "否",
"true" : "是"
}
} ],
"headerToolbar" : [ {
"type" : "button",
"id" : "进场",
"label" : "进场",
"level" : "primary",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "进场",
"size" : "lg",
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/063f6b04-85af-4dd1-9070-238f393d7bc7?format=amis",
"api" : {
"method" : "get",
"url" : "/api/form/PM_PROJECTEQUIPMENT/defaults?templateId=063f6b04-85af-4dd1-9070-238f393d7bc7"
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/PM_PROJECTEQUIPMENT_ADD?__egtpl=063f6b04-85af-4dd1-9070-238f393d7bc7",
"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/063f6b04-85af-4dd1-9070-238f393d7bc7?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/PM_PROJECTEQUIPMENT_LOAD?__egtpl=063f6b04-85af-4dd1-9070-238f393d7bc7",
"data" : {
"PM_PROJECTEQUIPMENT_ID" : "${PM_PROJECTEQUIPMENT_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/PM_PROJECTEQUIPMENT_UPDATE?__egtpl=063f6b04-85af-4dd1-9070-238f393d7bc7",
"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/PM_PROJECTEQUIPMENT_DELETE",
"data" : {
"ids" : "${selectedItems|pick:PM_PROJECTEQUIPMENT_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/fcc8e3d1-80f1-48d4-a75d-a92190e95bd8?format=amis",
"static" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/PM_PROJECTEQUIPMENT_LOAD?__egtpl=fcc8e3d1-80f1-48d4-a75d-a92190e95bd8",
"data" : {
"PM_PROJECTEQUIPMENT_ID" : "${PM_PROJECTEQUIPMENT_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/fcc8e3d1-80f1-48d4-a75d-a92190e95bd8?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/PM_PROJECTEQUIPMENT_LOAD?__egtpl=fcc8e3d1-80f1-48d4-a75d-a92190e95bd8",
"data" : {
"PM_PROJECTEQUIPMENT_ID" : "${PM_PROJECTEQUIPMENT_ID}"
},
"responseData" : {
"&" : "${result}"
}
},
"onEvent" : {
"inited" : {
"actions" : [ {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 1,
"item" : "${&}",
"templateId" : "a0999644-8dbd-446e-ae38-6a207bf69665"
}
},
"outputVar" : "scriptResult1"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult1.commands}"
}
} ]
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/PM_PROJECTEQUIPMENT_EXPORT?__egtpl=fcc8e3d1-80f1-48d4-a75d-a92190e95bd8",
"close" : true
}, {
"type" : "button",
"label" : "取消",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "取消出场",
"label" : "取消出场",
"actionType" : "ajax",
"disabled" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/PM_PROJECTEQUIPMENT_CANCELEXPORT",
"data" : {
"PM_PROJECTEQUIPMENT_ID" : "${selectedItems[0].PM_PROJECTEQUIPMENT_ID}"
}
}
}, "pagination" ],
"primaryField" : "PM_PROJECTEQUIPMENT_ID",
"onEvent" : {
"selectedChange" : {
"actions" : [ {
"actionType" : "disabled",
"componentId" : "取消出场"
}, {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 2,
"item" : "${event.data.selectedItems[0]}",
"templateId" : "a0999644-8dbd-446e-ae38-6a207bf69665"
}
},
"outputVar" : "scriptResult2"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult2.commands}"
}
} ]
},
"inited" : {
"actions" : [ {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 1,
"item" : "${&}",
"templateId" : "a0999644-8dbd-446e-ae38-6a207bf69665"
}
},
"outputVar" : "scriptResult1"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult1.commands}"
}
} ]
}
}
}
}