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>
276 lines
7.9 KiB
JSON
276 lines
7.9 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "新物资确认",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/PM_MATERIALREPOSITORY_NEWMATERIALSEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "MATERIALCODE",
|
|
"label" : "材料编码",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "MATERIALNAME",
|
|
"label" : "材料名称",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "SPECIFICATIONS",
|
|
"label" : "规格",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "RESOURCETYPEID",
|
|
"label" : "物资分类",
|
|
"type" : "tree-select",
|
|
"clearable" : true,
|
|
"source" : "/api/template/fdd10db0-963d-4e67-bf2a-584ba48fca33/tree",
|
|
"searchable" : true
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "PM_MATERIALREPOSITORY_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "MATERIALCODE",
|
|
"label" : "材料编码",
|
|
"width" : 180
|
|
}, {
|
|
"name" : "MATERIALNAME",
|
|
"label" : "材料名称",
|
|
"width" : 220
|
|
}, {
|
|
"name" : "SPECIFICATIONS",
|
|
"label" : "规格",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "UNIT_DISPLAY__",
|
|
"label" : "计量单位",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "RESOURCETYPEID_DISPLAY__",
|
|
"label" : "物资分类",
|
|
"width" : 100
|
|
}, {
|
|
"name" : "IMPORTUPPERLIMIT",
|
|
"label" : "入库上限(%)",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "REMARK",
|
|
"label" : "备注",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "STATE",
|
|
"label" : "状态",
|
|
"width" : 200,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"1" : "已确认",
|
|
"2" : "待确认",
|
|
"3" : "淘汰"
|
|
},
|
|
"toggled" : false
|
|
} ],
|
|
"headerToolbar" : [ {
|
|
"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/5ea0d943-b766-40c7-a36f-425d60224597?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_MATERIALREPOSITORY_LOAD?__egtpl=5ea0d943-b766-40c7-a36f-425d60224597",
|
|
"data" : {
|
|
"PM_MATERIALREPOSITORY_ID" : "${PM_MATERIALREPOSITORY_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
},
|
|
"onEvent" : {
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 1,
|
|
"item" : "${&}",
|
|
"templateId" : "18c1490a-6a21-4cde-97a5-86c31de456c0"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/PM_MATERIALREPOSITORY_UPDATE?__egtpl=5ea0d943-b766-40c7-a36f-425d60224597",
|
|
"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/625643b3-7716-4638-8fcd-8a313d85c778?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_MATERIALREPOSITORY_LOAD?__egtpl=625643b3-7716-4638-8fcd-8a313d85c778",
|
|
"data" : {
|
|
"PM_MATERIALREPOSITORY_ID" : "${PM_MATERIALREPOSITORY_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
},
|
|
"onEvent" : {
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 2,
|
|
"item" : "${&}",
|
|
"templateId" : "18c1490a-6a21-4cde-97a5-86c31de456c0"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult2"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult2.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/PM_MATERIALREPOSITORY_RELATION?__egtpl=625643b3-7716-4638-8fcd-8a313d85c778",
|
|
"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]}",
|
|
"__readonly" : true
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/5ea0d943-b766-40c7-a36f-425d60224597?format=amis",
|
|
"static" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_MATERIALREPOSITORY_LOAD?__egtpl=5ea0d943-b766-40c7-a36f-425d60224597",
|
|
"data" : {
|
|
"PM_MATERIALREPOSITORY_ID" : "${PM_MATERIALREPOSITORY_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, "pagination" ],
|
|
"primaryField" : "PM_MATERIALREPOSITORY_ID",
|
|
"onEvent" : {
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 1,
|
|
"item" : "${&}",
|
|
"templateId" : "18c1490a-6a21-4cde-97a5-86c31de456c0"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
}, {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 2,
|
|
"item" : "${&}",
|
|
"templateId" : "18c1490a-6a21-4cde-97a5-86c31de456c0"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult2"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult2.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} |