Files
eip4-platform/转换产物-attach/schema/3d24192d-e478-4801-aba5-0effa8ca65cd.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

560 lines
17 KiB
JSON

{
"type" : "page",
"title" : "物资采购订单(土建)编辑页面",
"body" : {
"type" : "form",
"id" : "eip4-edit-form",
"title" : "",
"mode" : "horizontal",
"horizontal" : {
"leftFixed" : 120
},
"body" : [ {
"type" : "grid",
"columns" : [ {
"md" : 3,
"body" : [ {
"name" : "PURCHASEAPPLYID",
"label" : "物资采购申请表ID",
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/884f0dde-564a-4e6e-9a5d-55d12d0a16e1/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
}
} ]
}, {
"md" : 5,
"body" : [ {
"name" : "ISPREPARATION",
"label" : "公司备料",
"type" : "checkbox",
"value" : "0"
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 3,
"body" : [ {
"name" : "FORMNO",
"label" : "表单号",
"required" : true,
"type" : "input-text",
"maxLength" : 50
} ]
}, {
"md" : 3,
"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" : 5,
"body" : [ {
"name" : "APPLYDATE",
"label" : "申请日期",
"required" : true,
"type" : "input-date",
"value" : "${now}"
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 3,
"body" : [ {
"name" : "DEPARTID",
"label" : "申请部门",
"required" : true,
"type" : "select",
"clearable" : true,
"source" : "/api/picker/SYS_DEPART/list?perPage=500",
"value" : "${currentDepart}"
} ]
}, {
"md" : 3,
"body" : [ {
"name" : "APPLYNAME",
"label" : "申请人",
"required" : true,
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/1b6820ad-bc7c-4eef-ac63-652cdf52c75f/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
},
"value" : "${currentUser}"
} ]
}, {
"md" : 5,
"body" : [ {
"name" : "DELIVERYREQUIRE",
"label" : "要求到货日期",
"required" : true,
"type" : "input-date",
"value" : "${now}"
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 3,
"body" : [ {
"name" : "DELIVERYPLACE",
"label" : "送货地点",
"required" : true,
"type" : "input-text",
"maxLength" : 100
} ]
}, {
"md" : 3,
"body" : [ {
"name" : "CONSIGNEE",
"label" : "收货联系人",
"required" : true,
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/1b6820ad-bc7c-4eef-ac63-652cdf52c75f/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
}
} ]
}, {
"md" : 5,
"body" : [ {
"name" : "CONFIRMATIONPEOPLE",
"label" : "确认人",
"type" : "static",
"tpl" : "${CONFIRMATIONPEOPLE_DISPLAY__ ? CONFIRMATIONPEOPLE_DISPLAY__ : (DISPLAYNAME ? DISPLAYNAME : CONFIRMATIONPEOPLE)}",
"value" : "${currentUser}"
} ]
} ]
}, {
"name" : "APPLYTYPE",
"label" : "申请类型",
"required" : true,
"hidden" : true,
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/APPLYTYPE",
"value" : "2"
}, {
"type" : "grid",
"columns" : [ {
"md" : 3,
"body" : [ {
"name" : "CONFIRMATIONDATE",
"label" : "订货日期",
"required" : true,
"type" : "input-date",
"value" : "${now}"
} ]
}, {
"md" : 3,
"body" : [ {
"name" : "DELIVERDATE",
"label" : "预计到货日期",
"required" : true,
"type" : "input-date",
"value" : "${now}"
} ]
} ]
}, {
"name" : "ADD",
"label" : "添加",
"hidden" : true,
"type" : "input-text",
"value" : "1"
}, {
"type" : "grid",
"columns" : [ {
"md" : 3,
"body" : [ {
"name" : "UNITINFOID",
"label" : "物资供应商",
"required" : true,
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/8fb3587d-fbdd-4f24-8976-bb85c10c89c3/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
}
} ]
}, {
"md" : 3,
"body" : [ {
"name" : "CONTRACTID",
"label" : "物资合同名称",
"required" : true,
"disabled" : true,
"type" : "select",
"clearable" : true,
"source" : "/api/picker/PM_MATERIALCONTRACTREGISTER/list?perPage=500"
} ]
}, {
"md" : 3,
"body" : [ {
"name" : "CONTRACTMONEY",
"label" : "合同价款(元)",
"type" : "input-number",
"precision" : 2
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 12,
"body" : [ {
"name" : "EXPLAIN",
"label" : "说明",
"type" : "textarea"
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 12,
"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-ORDERSDETAILS",
"args" : {
"item" : "${ARRAYMAP(__egpicked, item => ({MATERIALID: item.PM_MATERIALREPOSITORY_ID, MATERIALNAME: item.MATERIALNAME, SPECIFICATIONS: item.SPECIFICATIONS, UNIT: item.UNIT, MATERIALCODE: item.MATERIALCODE}))}"
}
}, {
"actionType" : "closeDialog"
} ]
}
}
} ]
},
"hiddenOn" : "${__readonly}"
} ]
}, {
"name" : "ORDERSDETAILS",
"label" : "订单明细",
"required" : true,
"type" : "input-table",
"id" : "eg-ORDERSDETAILS",
"addable" : false,
"removable" : true,
"staticOn" : "${__readonly}",
"columns" : [ {
"name" : "MATERIALCODE",
"label" : "材料编码",
"quickEdit" : {
"name" : "MATERIALCODE",
"disabled" : true,
"type" : "input-text"
}
}, {
"name" : "MATERIALNAME",
"label" : "材料名称",
"quickEdit" : {
"name" : "MATERIALNAME",
"disabled" : true,
"type" : "input-text"
}
}, {
"name" : "SPECIFICATIONS",
"label" : "规格",
"quickEdit" : {
"name" : "SPECIFICATIONS",
"disabled" : true,
"type" : "input-text"
}
}, {
"name" : "PURCHASENUM",
"label" : "数量",
"quickEdit" : {
"name" : "PURCHASENUM",
"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" : "3d24192d-e478-4801-aba5-0effa8ca65cd",
"editgridField" : "ORDERSDETAILS",
"scriptKey" : "4046a494-8ae2-46f1-a75d-d929a7b5886f",
"changedField" : "PURCHASENUM",
"row" : "${__rendererData}",
"parent" : {
"ORDERSDETAILS" : "${__rendererData.ORDERSDETAILS || ORDERSDETAILS}"
}
}
}
}
}, {
"actionType" : "setValue",
"componentId" : "eg-ORDERSDETAILS",
"args" : {
"index" : "${index}",
"value" : "${egRow.rowSetValues}"
}
}, {
"actionType" : "setValue",
"componentId" : "eip4-edit-form",
"args" : {
"value" : "${egRow.parentSetValues}"
}
} ]
}
}
}
}, {
"name" : "UNIT",
"label" : "单位",
"quickEdit" : {
"name" : "UNIT",
"required" : true,
"type" : "select",
"clearable" : true,
"source" : "/api/picker/PM_UNITLIST/list?perPage=500"
}
}, {
"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" : "3d24192d-e478-4801-aba5-0effa8ca65cd",
"editgridField" : "ORDERSDETAILS",
"scriptKey" : "4046a494-8ae2-46f1-a75d-d929a7b5886f",
"changedField" : "UNITPRICE",
"row" : "${__rendererData}",
"parent" : {
"ORDERSDETAILS" : "${__rendererData.ORDERSDETAILS || ORDERSDETAILS}"
}
}
}
}
}, {
"actionType" : "setValue",
"componentId" : "eg-ORDERSDETAILS",
"args" : {
"index" : "${index}",
"value" : "${egRow.rowSetValues}"
}
}, {
"actionType" : "setValue",
"componentId" : "eip4-edit-form",
"args" : {
"value" : "${egRow.parentSetValues}"
}
} ]
}
}
}
}, {
"name" : "REMARK",
"label" : "备注",
"quickEdit" : {
"name" : "REMARK",
"type" : "input-text",
"maxLength" : 100
}
} ],
"needConfirm" : false
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 3,
"body" : [ {
"name" : "PRICERAPIDFILLIN",
"label" : "单价快填",
"type" : "input-number",
"precision" : 2
} ]
}, {
"md" : 3,
"body" : [ {
"name" : "TOTALPRICESUM",
"label" : "金额合计",
"disabled" : true,
"type" : "input-number",
"precision" : 2
} ]
} ]
}, {
"type" : "grid",
"columns" : [ {
"md" : 12,
"body" : [ {
"name" : "DOCUMENT",
"label" : "附件",
"type" : "input-file",
"receiver" : "/api/file/upload?tableName=PM_MATERIALPURCHASEORDERS_TJ&businessKey=${PM_MATERIALPURCHASEORDERS_TJ_ID}",
"downloadUrl" : "/api/file/${id}",
"multiple" : true,
"staticOn" : "${__readonly}",
"joinValues" : false,
"extractValue" : false
} ]
} ]
}, {
"name" : "PM_MATERIALPURCHASEORDERS_TJ_ID",
"label" : "主键",
"hidden" : true,
"type" : "input-text"
}, {
"name" : "PROJECTCODE",
"label" : "工程ID",
"hidden" : true,
"type" : "input-text"
}, {
"name" : "OLDUNITINFOID",
"label" : "物资供应商",
"hidden" : true,
"type" : "input-text"
}, {
"name" : "TEMP",
"label" : "TEMP",
"type" : "input-text",
"value" : "1",
"hidden" : true
}, {
"type" : "group",
"body" : [ ]
} ],
"actions" : [ ]
}
}