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>
This commit is contained in:
468
转换产物-attach/schema/db2ba0d1-51bf-4838-b029-3220d926edca.json
Normal file
468
转换产物-attach/schema/db2ba0d1-51bf-4838-b029-3220d926edca.json
Normal file
@@ -0,0 +1,468 @@
|
||||
{
|
||||
"type" : "page",
|
||||
"title" : "周转(自购)材料入库编辑界面",
|
||||
"body" : {
|
||||
"type" : "form",
|
||||
"id" : "eip4-edit-form",
|
||||
"title" : "",
|
||||
"mode" : "horizontal",
|
||||
"horizontal" : {
|
||||
"leftFixed" : 120
|
||||
},
|
||||
"body" : [ {
|
||||
"type" : "tabs",
|
||||
"tabs" : [ {
|
||||
"title" : "批次信息",
|
||||
"body" : [ {
|
||||
"type" : "grid",
|
||||
"columns" : [ {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "BATCHNO",
|
||||
"label" : "批次号",
|
||||
"required" : true,
|
||||
"type" : "input-text",
|
||||
"maxLength" : 50
|
||||
} ]
|
||||
}, {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "STOREHOUSE",
|
||||
"label" : "仓库",
|
||||
"required" : true,
|
||||
"type" : "select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/poc/dict/PM_MATERIAL_STOREHOUSE"
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"type" : "grid",
|
||||
"columns" : [ {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "STORAGEDATE",
|
||||
"label" : "入库日期",
|
||||
"required" : true,
|
||||
"type" : "input-date",
|
||||
"value" : "${now}"
|
||||
} ]
|
||||
}, {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "INVOICECODE",
|
||||
"label" : "送货单号",
|
||||
"type" : "input-text",
|
||||
"maxLength" : 50
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"type" : "grid",
|
||||
"columns" : [ {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "ORGID",
|
||||
"label" : "(分)公司",
|
||||
"required" : true,
|
||||
"type" : "tree-select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/template/42861f01-14ea-482d-8031-f30612dfccf4/tree",
|
||||
"value" : "${orgId}",
|
||||
"searchable" : true,
|
||||
"onlyLeaf" : true
|
||||
} ]
|
||||
}, {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "CONTRACTID",
|
||||
"label" : "物资供应合同",
|
||||
"required" : true,
|
||||
"type" : "picker",
|
||||
"clearable" : true,
|
||||
"source" : "/api/picker/c8c73e1b-9ae1-4f71-9361-1fdd89244f2a/list",
|
||||
"labelField" : "_label",
|
||||
"valueField" : "_id",
|
||||
"modalMode" : "dialog",
|
||||
"modalSize" : "lg",
|
||||
"pickerSchema" : {
|
||||
"mode" : "table",
|
||||
"headerToolbar" : [ {
|
||||
"type" : "search-box",
|
||||
"name" : "q",
|
||||
"placeholder" : "输入关键字搜索"
|
||||
} ],
|
||||
"footerToolbar" : [ "pagination" ]
|
||||
}
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"type" : "grid",
|
||||
"columns" : [ {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "SUPPLIERNAME",
|
||||
"label" : "物资供应商",
|
||||
"type" : "static",
|
||||
"tpl" : "${SUPPLIERNAME_DISPLAY__ ? SUPPLIERNAME_DISPLAY__ : (UNITID ? UNITID : SUPPLIERNAME)}"
|
||||
} ]
|
||||
}, {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "TRUCKCODE",
|
||||
"label" : "车牌号",
|
||||
"type" : "input-text",
|
||||
"maxLength" : 50
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"type" : "grid",
|
||||
"columns" : [ {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "TRANSPORTFEE",
|
||||
"label" : "运输费(元)",
|
||||
"type" : "input-number",
|
||||
"precision" : 2
|
||||
} ]
|
||||
}, {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "PLACE",
|
||||
"label" : "收料地点",
|
||||
"type" : "input-text",
|
||||
"maxLength" : 100
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"type" : "grid",
|
||||
"columns" : [ {
|
||||
"md" : 6,
|
||||
"body" : [ {
|
||||
"name" : "ATTNNAME",
|
||||
"label" : "经办人",
|
||||
"type" : "static",
|
||||
"tpl" : "${ATTNNAME_DISPLAY__ ? ATTNNAME_DISPLAY__ : (DISPLAYNAME ? DISPLAYNAME : ATTNNAME)}",
|
||||
"value" : "${currentUser}"
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"type" : "grid",
|
||||
"columns" : [ {
|
||||
"md" : 12,
|
||||
"body" : [ {
|
||||
"name" : "REMARK",
|
||||
"label" : "备注",
|
||||
"type" : "textarea"
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"type" : "grid",
|
||||
"columns" : [ {
|
||||
"md" : 12,
|
||||
"body" : [ {
|
||||
"name" : "DOCUMENT",
|
||||
"label" : "附件",
|
||||
"type" : "input-file",
|
||||
"receiver" : "/api/file/upload?tableName=PM_TURNOVERMATERIALBUYSTORAGEBATCH&businessKey=${PM_TURNOVERMATERIALBUYSTORAGEBATCH_ID}",
|
||||
"downloadUrl" : "/api/file/${id}",
|
||||
"multiple" : true,
|
||||
"staticOn" : "${__readonly}",
|
||||
"joinValues" : false,
|
||||
"extractValue" : false
|
||||
} ]
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"title" : "材料入库信息",
|
||||
"body" : [ {
|
||||
"type" : "flex",
|
||||
"justify" : "flex-start",
|
||||
"alignItems" : "center",
|
||||
"style" : {
|
||||
"paddingLeft" : "120px",
|
||||
"marginBottom" : "4px"
|
||||
},
|
||||
"items" : [ {
|
||||
"name" : "SELECT",
|
||||
"label" : "添加",
|
||||
"type" : "button",
|
||||
"level" : "primary",
|
||||
"actionType" : "dialog",
|
||||
"dialog" : {
|
||||
"type" : "dialog",
|
||||
"id" : "egadddlgSELECT",
|
||||
"title" : "",
|
||||
"size" : "lg",
|
||||
"body" : {
|
||||
"type" : "crud",
|
||||
"api" : "/api/picker/28807c26-61fa-467e-88fa-d797fb8b580d/list",
|
||||
"mode" : "table",
|
||||
"syncLocation" : false,
|
||||
"selectable" : true,
|
||||
"multiple" : true,
|
||||
"keepItemSelectionOnPageChange" : true,
|
||||
"primaryField" : "_id",
|
||||
"labelField" : "_label",
|
||||
"headerToolbar" : [ {
|
||||
"type" : "search-box",
|
||||
"placeholder" : "输入关键字搜索",
|
||||
"name" : "q"
|
||||
} ],
|
||||
"footerToolbar" : [ "pagination" ],
|
||||
"onEvent" : {
|
||||
"selectedChange" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "setValue",
|
||||
"componentId" : "egadddlgSELECT",
|
||||
"args" : {
|
||||
"value" : {
|
||||
"__egpicked" : "${event.data.selectedItems}"
|
||||
}
|
||||
}
|
||||
} ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"actions" : [ {
|
||||
"type" : "button",
|
||||
"label" : "取消",
|
||||
"actionType" : "close"
|
||||
}, {
|
||||
"type" : "button",
|
||||
"label" : "确定",
|
||||
"level" : "primary",
|
||||
"onEvent" : {
|
||||
"click" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "addItem",
|
||||
"componentId" : "eg-MATERIALLIST",
|
||||
"args" : {
|
||||
"item" : "${ARRAYMAP(__egpicked, item => ({MATERIALID: item.PM_MATERIALREPOSITORY_ID, MATERIALCODE: item.MATERIALCODE, SPECIFICATIONS: item.SPECIFICATIONS, UNIT: item.UNIT}))}"
|
||||
}
|
||||
}, {
|
||||
"actionType" : "closeDialog"
|
||||
} ]
|
||||
}
|
||||
}
|
||||
} ]
|
||||
},
|
||||
"hiddenOn" : "${__readonly}"
|
||||
} ]
|
||||
}, {
|
||||
"name" : "MATERIALLIST",
|
||||
"label" : "材料入库明细",
|
||||
"required" : true,
|
||||
"type" : "input-table",
|
||||
"id" : "eg-MATERIALLIST",
|
||||
"addable" : false,
|
||||
"removable" : true,
|
||||
"staticOn" : "${__readonly}",
|
||||
"columns" : [ {
|
||||
"name" : "MATERIALCODE",
|
||||
"label" : "材料编码",
|
||||
"quickEdit" : {
|
||||
"name" : "MATERIALCODE",
|
||||
"disabled" : true,
|
||||
"type" : "input-text"
|
||||
}
|
||||
}, {
|
||||
"name" : "MATERIALID",
|
||||
"label" : "材料名称",
|
||||
"type" : "tpl",
|
||||
"tpl" : "${MATERIALID_DISPLAY__ ? MATERIALID_DISPLAY__ : MATERIALID}",
|
||||
"quickEdit" : false
|
||||
}, {
|
||||
"name" : "MATERIALALIASID",
|
||||
"label" : "材料别名",
|
||||
"type" : "tpl",
|
||||
"tpl" : "${MATERIALALIASID_DISPLAY__ ? MATERIALALIASID_DISPLAY__ : MATERIALALIASID}",
|
||||
"quickEdit" : false
|
||||
}, {
|
||||
"name" : "SPECIFICATIONS",
|
||||
"label" : "规格",
|
||||
"quickEdit" : {
|
||||
"name" : "SPECIFICATIONS",
|
||||
"disabled" : true,
|
||||
"type" : "input-text"
|
||||
}
|
||||
}, {
|
||||
"name" : "UNIT",
|
||||
"label" : "计量单位",
|
||||
"quickEdit" : {
|
||||
"name" : "UNIT",
|
||||
"required" : true,
|
||||
"type" : "select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/picker/PM_UNITLIST/list?perPage=500"
|
||||
}
|
||||
}, {
|
||||
"name" : "NUMBER",
|
||||
"label" : "数量",
|
||||
"quickEdit" : {
|
||||
"name" : "NUMBER",
|
||||
"required" : true,
|
||||
"type" : "input-number",
|
||||
"precision" : 4,
|
||||
"onEvent" : {
|
||||
"change" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "ajax",
|
||||
"outputVar" : "egRow",
|
||||
"args" : {
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/script/execute-editgrid-row",
|
||||
"data" : {
|
||||
"templateId" : "db2ba0d1-51bf-4838-b029-3220d926edca",
|
||||
"editgridField" : "MATERIALLIST",
|
||||
"scriptKey" : "3d31f6e2-cadd-4aa3-9267-518ac9e52915",
|
||||
"changedField" : "NUMBER",
|
||||
"row" : "${__rendererData}",
|
||||
"parent" : {
|
||||
"MATERIALLIST" : "${__rendererData.MATERIALLIST || MATERIALLIST}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"actionType" : "setValue",
|
||||
"componentId" : "eg-MATERIALLIST",
|
||||
"args" : {
|
||||
"index" : "${index}",
|
||||
"value" : "${egRow.rowSetValues}"
|
||||
}
|
||||
}, {
|
||||
"actionType" : "setValue",
|
||||
"componentId" : "eip4-edit-form",
|
||||
"args" : {
|
||||
"value" : "${egRow.parentSetValues}"
|
||||
}
|
||||
} ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"name" : "UNITPRICE",
|
||||
"label" : "单价(元)",
|
||||
"quickEdit" : {
|
||||
"name" : "UNITPRICE",
|
||||
"required" : true,
|
||||
"type" : "input-number",
|
||||
"precision" : 2,
|
||||
"onEvent" : {
|
||||
"change" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "ajax",
|
||||
"outputVar" : "egRow",
|
||||
"args" : {
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/script/execute-editgrid-row",
|
||||
"data" : {
|
||||
"templateId" : "db2ba0d1-51bf-4838-b029-3220d926edca",
|
||||
"editgridField" : "MATERIALLIST",
|
||||
"scriptKey" : "3d31f6e2-cadd-4aa3-9267-518ac9e52915",
|
||||
"changedField" : "UNITPRICE",
|
||||
"row" : "${__rendererData}",
|
||||
"parent" : {
|
||||
"MATERIALLIST" : "${__rendererData.MATERIALLIST || MATERIALLIST}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"actionType" : "setValue",
|
||||
"componentId" : "eg-MATERIALLIST",
|
||||
"args" : {
|
||||
"index" : "${index}",
|
||||
"value" : "${egRow.rowSetValues}"
|
||||
}
|
||||
}, {
|
||||
"actionType" : "setValue",
|
||||
"componentId" : "eip4-edit-form",
|
||||
"args" : {
|
||||
"value" : "${egRow.parentSetValues}"
|
||||
}
|
||||
} ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"name" : "TOTALPRICE",
|
||||
"label" : "金额(元)",
|
||||
"quickEdit" : {
|
||||
"name" : "TOTALPRICE",
|
||||
"disabled" : true,
|
||||
"type" : "input-number",
|
||||
"precision" : 2
|
||||
}
|
||||
} ],
|
||||
"needConfirm" : false
|
||||
}, {
|
||||
"name" : "PM_TURNOVERMATERIALBUYSTORAGEBATCH_ID",
|
||||
"label" : "主键",
|
||||
"hidden" : true,
|
||||
"type" : "input-text"
|
||||
}, {
|
||||
"name" : "ISACCOUNTS",
|
||||
"label" : "是否记账",
|
||||
"required" : true,
|
||||
"hidden" : true,
|
||||
"type" : "checkbox"
|
||||
}, {
|
||||
"name" : "ACCOUNTSDATE",
|
||||
"label" : "记账日期",
|
||||
"hidden" : true,
|
||||
"type" : "input-date"
|
||||
}, {
|
||||
"name" : "BUYTYPE",
|
||||
"label" : "材料来源",
|
||||
"required" : true,
|
||||
"hidden" : true,
|
||||
"type" : "select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/poc/dict/buytype",
|
||||
"value" : "1"
|
||||
}, {
|
||||
"name" : "ISCONFIRM",
|
||||
"label" : "是否确认",
|
||||
"type" : "select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/poc/dict/YESNO",
|
||||
"hidden" : true
|
||||
}, {
|
||||
"name" : "CONFIRMER",
|
||||
"label" : "确认人",
|
||||
"hidden" : true,
|
||||
"type" : "picker",
|
||||
"clearable" : true,
|
||||
"source" : "/api/picker/090981ba-0c10-4d84-92dc-80e226594480/list",
|
||||
"labelField" : "_label",
|
||||
"valueField" : "_id",
|
||||
"modalMode" : "dialog",
|
||||
"modalSize" : "lg",
|
||||
"pickerSchema" : {
|
||||
"mode" : "table",
|
||||
"headerToolbar" : [ {
|
||||
"type" : "search-box",
|
||||
"name" : "q",
|
||||
"placeholder" : "输入关键字搜索"
|
||||
} ],
|
||||
"footerToolbar" : [ "pagination" ]
|
||||
},
|
||||
"placeholder" : "请点击右侧的图标",
|
||||
"value" : "${currentUser}"
|
||||
}, {
|
||||
"name" : "CONFIRMDATE",
|
||||
"label" : "确认日期",
|
||||
"hidden" : true,
|
||||
"type" : "input-date",
|
||||
"value" : "${now}"
|
||||
}, {
|
||||
"type" : "group",
|
||||
"body" : [ ]
|
||||
} ]
|
||||
} ]
|
||||
} ],
|
||||
"actions" : [ ]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user