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>
370 lines
12 KiB
JSON
370 lines
12 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "采购申请编辑页面",
|
|
"body" : {
|
|
"type" : "form",
|
|
"id" : "eip4-edit-form",
|
|
"title" : "",
|
|
"mode" : "horizontal",
|
|
"horizontal" : {
|
|
"leftFixed" : 120
|
|
},
|
|
"body" : [ {
|
|
"type" : "grid",
|
|
"columns" : [ {
|
|
"md" : 4,
|
|
"body" : [ {
|
|
"name" : "FORMNO",
|
|
"label" : "表单号",
|
|
"required" : true,
|
|
"type" : "input-text"
|
|
} ]
|
|
}, {
|
|
"md" : 4,
|
|
"body" : [ {
|
|
"name" : "STORE_ID",
|
|
"label" : "办公用品库",
|
|
"required" : true,
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/picker/OA_OFFICE_STOREHOUSE/list?perPage=500"
|
|
} ]
|
|
}, {
|
|
"md" : 4,
|
|
"body" : [ {
|
|
"name" : "APPLYDATE",
|
|
"label" : "申请日期",
|
|
"required" : true,
|
|
"type" : "input-date",
|
|
"value" : "${now}"
|
|
} ]
|
|
} ]
|
|
}, {
|
|
"type" : "grid",
|
|
"columns" : [ {
|
|
"md" : 4,
|
|
"body" : [ {
|
|
"name" : "DEPART_ID",
|
|
"label" : "申请部门",
|
|
"required" : true,
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/picker/SYS_DEPART/list?perPage=500",
|
|
"value" : "${currentDepart}"
|
|
} ]
|
|
}, {
|
|
"md" : 4,
|
|
"body" : [ {
|
|
"name" : "APPLYNAME",
|
|
"label" : "申请人",
|
|
"type" : "static",
|
|
"tpl" : "${APPLYNAME_DISPLAY__ ? APPLYNAME_DISPLAY__ : (DISPLAYNAME ? DISPLAYNAME : APPLYNAME)}",
|
|
"value" : "${currentUser}"
|
|
} ]
|
|
}, {
|
|
"md" : 4,
|
|
"body" : [ {
|
|
"name" : "applyTotalMoney",
|
|
"label" : "申请总金额(元)",
|
|
"disabled" : true,
|
|
"type" : "input-number",
|
|
"precision" : 2
|
|
} ]
|
|
} ]
|
|
}, {
|
|
"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/88bab87b-01d3-4ebc-84f4-0103188b2751/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-GOODSDETAIL",
|
|
"args" : {
|
|
"item" : "${ARRAYMAP(__egpicked, item => ({GOODS_ID: item.OA_OFFICE_GOODS_ID, GOODS_ID_DISPLAY__: item._label, GOODS_STANDARD: item.GOODS_STANDARD, GOODS_UNIT: item.GOODS_UNIT, IN_AMOUNT: item.INVENTORYAMOUNT}))}"
|
|
}
|
|
}, {
|
|
"actionType" : "closeDialog"
|
|
} ]
|
|
}
|
|
}
|
|
} ]
|
|
},
|
|
"hiddenOn" : "${__readonly}"
|
|
} ]
|
|
}, {
|
|
"name" : "GOODSDETAIL",
|
|
"label" : "申请用品",
|
|
"required" : true,
|
|
"type" : "input-table",
|
|
"id" : "eg-GOODSDETAIL",
|
|
"addable" : false,
|
|
"removable" : true,
|
|
"staticOn" : "${__readonly}",
|
|
"columns" : [ {
|
|
"name" : "GOODS_ID",
|
|
"label" : "用品名称",
|
|
"type" : "tpl",
|
|
"tpl" : "${GOODS_ID_DISPLAY__ ? GOODS_ID_DISPLAY__ : GOODS_ID}",
|
|
"quickEdit" : false
|
|
}, {
|
|
"name" : "GOODS_STANDARD",
|
|
"label" : "规格",
|
|
"quickEdit" : {
|
|
"name" : "GOODS_STANDARD",
|
|
"disabled" : true,
|
|
"type" : "input-text"
|
|
}
|
|
}, {
|
|
"name" : "GOODS_UNIT",
|
|
"label" : "计量单位",
|
|
"quickEdit" : {
|
|
"name" : "GOODS_UNIT",
|
|
"disabled" : true,
|
|
"type" : "input-text"
|
|
}
|
|
}, {
|
|
"name" : "IN_AMOUNT",
|
|
"label" : "现存量",
|
|
"quickEdit" : {
|
|
"name" : "IN_AMOUNT",
|
|
"disabled" : true,
|
|
"type" : "input-number",
|
|
"precision" : 0,
|
|
"step" : 1
|
|
}
|
|
}, {
|
|
"name" : "AMOUNT",
|
|
"label" : "采购数量",
|
|
"quickEdit" : {
|
|
"name" : "AMOUNT",
|
|
"required" : true,
|
|
"type" : "input-number",
|
|
"precision" : 0,
|
|
"step" : 1,
|
|
"min" : 1,
|
|
"max" : 9999999,
|
|
"onEvent" : {
|
|
"change" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"outputVar" : "egRow",
|
|
"args" : {
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-editgrid-row",
|
|
"data" : {
|
|
"templateId" : "0672ccc0-366a-4237-884f-6a637ce831d0",
|
|
"editgridField" : "GOODSDETAIL",
|
|
"scriptKey" : "16b5ead3-d8e9-470e-a3a9-748cd69e1c75",
|
|
"changedField" : "AMOUNT",
|
|
"row" : "${__rendererData}",
|
|
"parent" : {
|
|
"GOODSDETAIL" : "${__rendererData.GOODSDETAIL || GOODSDETAIL}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"actionType" : "setValue",
|
|
"componentId" : "eg-GOODSDETAIL",
|
|
"args" : {
|
|
"index" : "${index}",
|
|
"value" : "${egRow.rowSetValues}"
|
|
}
|
|
}, {
|
|
"actionType" : "setValue",
|
|
"componentId" : "eip4-edit-form",
|
|
"args" : {
|
|
"value" : "${egRow.parentSetValues}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"name" : "PRICE",
|
|
"label" : "单价(元)",
|
|
"quickEdit" : {
|
|
"name" : "PRICE",
|
|
"type" : "input-number",
|
|
"precision" : 2,
|
|
"max" : 9999999.99,
|
|
"onEvent" : {
|
|
"change" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"outputVar" : "egRow",
|
|
"args" : {
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-editgrid-row",
|
|
"data" : {
|
|
"templateId" : "0672ccc0-366a-4237-884f-6a637ce831d0",
|
|
"editgridField" : "GOODSDETAIL",
|
|
"scriptKey" : "16b5ead3-d8e9-470e-a3a9-748cd69e1c75",
|
|
"changedField" : "PRICE",
|
|
"row" : "${__rendererData}",
|
|
"parent" : {
|
|
"GOODSDETAIL" : "${__rendererData.GOODSDETAIL || GOODSDETAIL}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"actionType" : "setValue",
|
|
"componentId" : "eg-GOODSDETAIL",
|
|
"args" : {
|
|
"index" : "${index}",
|
|
"value" : "${egRow.rowSetValues}"
|
|
}
|
|
}, {
|
|
"actionType" : "setValue",
|
|
"componentId" : "eip4-edit-form",
|
|
"args" : {
|
|
"value" : "${egRow.parentSetValues}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"name" : "MONEY",
|
|
"label" : "金额(元)",
|
|
"quickEdit" : {
|
|
"name" : "MONEY",
|
|
"disabled" : true,
|
|
"type" : "input-number",
|
|
"precision" : 2,
|
|
"max" : 9.9999999999E8,
|
|
"onEvent" : {
|
|
"change" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"outputVar" : "egRow",
|
|
"args" : {
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-editgrid-row",
|
|
"data" : {
|
|
"templateId" : "0672ccc0-366a-4237-884f-6a637ce831d0",
|
|
"editgridField" : "GOODSDETAIL",
|
|
"scriptKey" : "f0bbf4ce-6599-4944-a03d-1e1b6e25c720",
|
|
"changedField" : "MONEY",
|
|
"row" : "${__rendererData}",
|
|
"parent" : {
|
|
"GOODSDETAIL" : "${__rendererData.GOODSDETAIL || GOODSDETAIL}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"actionType" : "setValue",
|
|
"componentId" : "eg-GOODSDETAIL",
|
|
"args" : {
|
|
"index" : "${index}",
|
|
"value" : "${egRow.rowSetValues}"
|
|
}
|
|
}, {
|
|
"actionType" : "setValue",
|
|
"componentId" : "eip4-edit-form",
|
|
"args" : {
|
|
"value" : "${egRow.parentSetValues}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} ],
|
|
"needConfirm" : false
|
|
} ]
|
|
} ]
|
|
}, {
|
|
"type" : "grid",
|
|
"columns" : [ {
|
|
"md" : 12,
|
|
"body" : [ {
|
|
"name" : "REMARK",
|
|
"label" : "备注",
|
|
"type" : "textarea"
|
|
} ]
|
|
} ]
|
|
}, {
|
|
"name" : "OA_OFFICE_PURCHASEAPPLY_ID",
|
|
"label" : "主键",
|
|
"hidden" : true,
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "OLD_STORE_ID",
|
|
"label" : "原选择办公用品库",
|
|
"type" : "input-text",
|
|
"hidden" : true
|
|
}, {
|
|
"name" : "ISBUYFINISH",
|
|
"label" : "是否购买完毕",
|
|
"hidden" : true,
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/YESNO",
|
|
"value" : "0"
|
|
} ],
|
|
"actions" : [ ]
|
|
}
|
|
} |