Files
eip4-platform/转换产物-attach/schema/32e89c3e-61d6-4e3e-8182-7f701508d7c1.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

371 lines
12 KiB
JSON

{
"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" : "PROJECTID",
"label" : "工程名称",
"required" : true,
"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}"
} ]
}, {
"md" : 6,
"body" : [ {
"name" : "BATCHNO",
"label" : "批次号",
"required" : true,
"type" : "input-text",
"maxLength" : 50
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 6,
"body" : [ {
"name" : "CONTRACTID",
"label" : "物资供应合同",
"type" : "static",
"tpl" : "${CONTRACTID_DISPLAY__ ? CONTRACTID_DISPLAY__ : (CONTRACTNAME ? CONTRACTNAME : CONTRACTID)}"
} ]
}, {
"md" : 6,
"body" : [ {
"name" : "SUPPLIERNAME",
"label" : "物资供应商",
"type" : "static",
"tpl" : "${SUPPLIERNAME_DISPLAY__ ? SUPPLIERNAME_DISPLAY__ : (UNITID ? UNITID : SUPPLIERNAME)}"
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 6,
"body" : [ {
"name" : "SCRAPDATE",
"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" : "TRUCKCODE",
"label" : "车牌号",
"type" : "input-text",
"maxLength" : 50
} ]
}, {
"md" : 6,
"body" : [ {
"name" : "TRANSPORTFEE",
"label" : "运输费(元)",
"type" : "input-number",
"precision" : 2
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 6,
"body" : [ {
"name" : "PLACE",
"label" : "收料地点",
"type" : "input-text",
"maxLength" : 100
} ]
}, {
"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_TURNOVERMATERIALSCRAPBATCH&businessKey=${PM_TURNOVERMATERIALSCRAPBATCH_ID}",
"downloadUrl" : "/api/file/${id}",
"multiple" : true,
"staticOn" : "${__readonly}",
"joinValues" : false,
"extractValue" : false
} ]
} ]
}, {
"name" : "PROJECTCODE",
"label" : "工程编码",
"hidden" : true,
"type" : "input-text"
}, {
"name" : "PROJECTCODETEMP",
"label" : "工程编码",
"hidden" : true,
"type" : "input-text"
} ]
}, {
"title" : "材料信息",
"body" : [ {
"name" : "MATERIALDETAILS",
"label" : "材料报废明细",
"required" : true,
"type" : "input-table",
"id" : "eg-MATERIALDETAILS",
"addable" : true,
"removable" : true,
"staticOn" : "${__readonly}",
"columns" : [ {
"name" : "SELECT",
"label" : "选择",
"quickEdit" : {
"name" : "SELECT",
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/7943c2d9-a0d1-46d8-86a7-31347362c567/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
},
"onEvent" : {
"change" : {
"actions" : [ {
"actionType" : "ajax",
"outputVar" : "egRow",
"args" : {
"api" : {
"method" : "post",
"url" : "/api/script/execute-editgrid-row",
"data" : {
"templateId" : "32e89c3e-61d6-4e3e-8182-7f701508d7c1",
"editgridField" : "MATERIALDETAILS",
"scriptKey" : "03d65082-d337-47b8-bee5-4c4bf5bfde9e",
"changedField" : "SELECT",
"row" : "${__rendererData}",
"parent" : {
"MATERIALDETAILS" : "${__rendererData.MATERIALDETAILS || MATERIALDETAILS}"
}
}
}
}
}, {
"actionType" : "setValue",
"componentId" : "eg-MATERIALDETAILS",
"args" : {
"index" : "${index}",
"value" : "${egRow.rowSetValues}"
}
}, {
"actionType" : "setValue",
"componentId" : "eip4-edit-form",
"args" : {
"value" : "${egRow.parentSetValues}"
}
} ]
}
}
}
}, {
"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",
"disabled" : true,
"type" : "select",
"clearable" : true,
"source" : "/api/picker/PM_UNITLIST/list?perPage=500"
}
}, {
"name" : "SCRAPNUMBER",
"label" : "报废数量",
"quickEdit" : {
"name" : "SCRAPNUMBER",
"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" : "32e89c3e-61d6-4e3e-8182-7f701508d7c1",
"editgridField" : "MATERIALDETAILS",
"scriptKey" : "8f2d9b06-66a2-42e9-86a5-fcf90dbd82be",
"changedField" : "SCRAPNUMBER",
"row" : "${__rendererData}",
"parent" : {
"MATERIALDETAILS" : "${__rendererData.MATERIALDETAILS || MATERIALDETAILS}"
}
}
}
}
}, {
"actionType" : "setValue",
"componentId" : "eg-MATERIALDETAILS",
"args" : {
"index" : "${index}",
"value" : "${egRow.rowSetValues}"
}
}, {
"actionType" : "setValue",
"componentId" : "eip4-edit-form",
"args" : {
"value" : "${egRow.parentSetValues}"
}
} ]
}
}
}
}, {
"name" : "STOCKNUMBER",
"label" : "库存数量",
"quickEdit" : {
"name" : "STOCKNUMBER",
"disabled" : true,
"type" : "input-number",
"precision" : 4
}
}, {
"name" : "SCRAPPRICE",
"label" : "报废金额(元)",
"quickEdit" : {
"name" : "SCRAPPRICE",
"required" : true,
"type" : "input-number",
"precision" : 4
}
}, {
"name" : "UNITPRICE",
"label" : "租赁单价(元/日)",
"quickEdit" : {
"name" : "UNITPRICE",
"required" : true,
"disabled" : true,
"type" : "input-number",
"precision" : 4
}
} ],
"needConfirm" : false
}, {
"name" : "PM_TURNOVERMATERIALSCRAPBATCH_ID",
"label" : "主键",
"hidden" : true,
"type" : "input-text"
}, {
"name" : "ISACCOUNTS",
"label" : "是否记账",
"hidden" : true,
"type" : "checkbox"
}, {
"name" : "ACCOUNTSDATE",
"label" : "记账日期",
"hidden" : true,
"type" : "input-date"
} ]
} ]
} ],
"actions" : [ ]
}
}