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>
335 lines
9.6 KiB
JSON
335 lines
9.6 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "办公用品库",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/OA_OFFICE_STOREHOUSE_SEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "STORE_NAME",
|
|
"label" : "办公用品库名称:",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "COMPANY_ID",
|
|
"label" : "所属公司",
|
|
"type" : "tree-select",
|
|
"clearable" : true,
|
|
"source" : "/api/template/42861f01-14ea-482d-8031-f30612dfccf4/tree",
|
|
"searchable" : true,
|
|
"onlyLeaf" : true
|
|
}, {
|
|
"name" : "REMARK",
|
|
"label" : "备注",
|
|
"hidden" : true,
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "MANAGER_USER_LIST",
|
|
"label" : "管理员",
|
|
"hidden" : true,
|
|
"type" : "picker",
|
|
"clearable" : true,
|
|
"multiple" : true,
|
|
"overflowConfig" : {
|
|
"displayPosition" : [ "select" ],
|
|
"maxTagCount" : 1
|
|
},
|
|
"source" : "/api/picker/76d2f950-ef40-4eff-89ec-98ad9a4976b9/list",
|
|
"labelField" : "_label",
|
|
"valueField" : "_id",
|
|
"modalMode" : "dialog",
|
|
"modalSize" : "lg",
|
|
"pickerSchema" : {
|
|
"mode" : "table",
|
|
"headerToolbar" : [ {
|
|
"type" : "search-box",
|
|
"name" : "q",
|
|
"placeholder" : "输入关键字搜索"
|
|
} ],
|
|
"footerToolbar" : [ "pagination" ]
|
|
},
|
|
"placeholder" : "请点击右侧的图标"
|
|
}, {
|
|
"name" : "ISOPEN",
|
|
"label" : "启用",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/YESNO",
|
|
"value" : "1"
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "OA_OFFICE_STOREHOUSE_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "STORE_NAME",
|
|
"label" : "办公用品库名称",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "COMPANY_ID_DISPLAY__",
|
|
"label" : "所属公司",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "MANAGER_USER_LIST_SHOW",
|
|
"label" : "管理员",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "ISOPEN",
|
|
"label" : "启用",
|
|
"width" : 50,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
}
|
|
}, {
|
|
"name" : "PERIOD_ID_DISPLAY__",
|
|
"label" : "初始化期间",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "ACCOUNTPERIOD_DISPLAY__",
|
|
"label" : "当前记账期间",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "REMARK",
|
|
"label" : "备注",
|
|
"width" : 300
|
|
} ],
|
|
"headerToolbar" : [ {
|
|
"type" : "button",
|
|
"id" : "添加",
|
|
"label" : "添加",
|
|
"level" : "primary",
|
|
"actionType" : "dialog",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "添加",
|
|
"size" : "lg",
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/f9507d81-e849-444d-8f65-955558a89d9e?format=amis",
|
|
"api" : {
|
|
"method" : "get",
|
|
"url" : "/api/form/OA_OFFICE_STOREHOUSE/defaults?templateId=f9507d81-e849-444d-8f65-955558a89d9e"
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/OA_OFFICE_STOREHOUSE_ADD?__egtpl=f9507d81-e849-444d-8f65-955558a89d9e",
|
|
"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/f9507d81-e849-444d-8f65-955558a89d9e?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_OFFICE_STOREHOUSE_LOAD?__egtpl=f9507d81-e849-444d-8f65-955558a89d9e",
|
|
"data" : {
|
|
"OA_OFFICE_STOREHOUSE_ID" : "${OA_OFFICE_STOREHOUSE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/OA_OFFICE_STOREHOUSE_UPDATE?__egtpl=f9507d81-e849-444d-8f65-955558a89d9e",
|
|
"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/b306dcea-2211-4f28-9b34-499891cdb001?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_OFFICE_STOREHOUSE_LOAD?__egtpl=b306dcea-2211-4f28-9b34-499891cdb001",
|
|
"data" : {
|
|
"OA_OFFICE_STOREHOUSE_ID" : "${OA_OFFICE_STOREHOUSE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "初始化",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/OA_OFFICE_STOREHOUSE_INITSTOREHOUSE?__egtpl=b306dcea-2211-4f28-9b34-499891cdb001",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "取消初始化",
|
|
"label" : "取消初始化",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"confirmText" : "确认要取消初始化吗?",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_OFFICE_STOREHOUSE_CANCELINITSTOREHOUSE",
|
|
"data" : {
|
|
"OA_OFFICE_STOREHOUSE_ID" : "${selectedItems[0].OA_OFFICE_STOREHOUSE_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "删除",
|
|
"label" : "删除",
|
|
"level" : "danger",
|
|
"actionType" : "ajax",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"confirmText" : "确定删除此记录吗?",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_OFFICE_STOREHOUSE_DELETE",
|
|
"data" : {
|
|
"ids" : "${selectedItems|pick:OA_OFFICE_STOREHOUSE_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/f9507d81-e849-444d-8f65-955558a89d9e?format=amis",
|
|
"static" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_OFFICE_STOREHOUSE_LOAD?__egtpl=f9507d81-e849-444d-8f65-955558a89d9e",
|
|
"data" : {
|
|
"OA_OFFICE_STOREHOUSE_ID" : "${OA_OFFICE_STOREHOUSE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "启用",
|
|
"label" : "启用",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_OFFICE_STOREHOUSE_UPDATEOPEN",
|
|
"data" : {
|
|
"OA_OFFICE_STOREHOUSE_ID" : "${selectedItems[0].OA_OFFICE_STOREHOUSE_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "停用",
|
|
"label" : "停用",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_OFFICE_STOREHOUSE_UPDATECLOSE",
|
|
"data" : {
|
|
"OA_OFFICE_STOREHOUSE_ID" : "${selectedItems[0].OA_OFFICE_STOREHOUSE_ID}"
|
|
}
|
|
}
|
|
}, "pagination" ],
|
|
"primaryField" : "OA_OFFICE_STOREHOUSE_ID",
|
|
"onEvent" : {
|
|
"selectedChange" : {
|
|
"actions" : [ {
|
|
"actionType" : "disabled",
|
|
"componentId" : "取消初始化"
|
|
}, {
|
|
"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" : "801bd339-ad3c-4613-8a27-1d240c178681"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} |