{ "type" : "page", "title" : "现场材料出场(土建)编辑", "body" : { "type" : "form", "id" : "eip4-edit-form", "title" : "", "mode" : "horizontal", "horizontal" : { "leftFixed" : 120 }, "body" : [ { "type" : "grid", "columns" : [ { "md" : 4, "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" : 4, "body" : [ { "name" : "BATCHNO", "label" : "批次号", "required" : true, "disabled" : true, "type" : "input-text", "maxLength" : 50 } ] }, { "md" : 4, "body" : [ { "name" : "EXPORTDATE", "label" : "出场日期", "required" : true, "type" : "input-date", "value" : "${now}" } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 4, "body" : [ { "name" : "INVOICECODE", "label" : "送货单号", "type" : "input-text" } ] }, { "md" : 4, "body" : [ { "name" : "PLACE", "label" : "收料地点", "type" : "input-text", "maxLength" : 100 } ] }, { "md" : 4, "body" : [ { "name" : "TRUCKCODE", "label" : "车牌号", "type" : "input-text", "maxLength" : 50 } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 4, "body" : [ { "name" : "TRANSPORTFEE", "label" : "运输费(元)", "type" : "input-number", "precision" : 2 } ] }, { "md" : 4, "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" : [ { "type" : "flex", "justify" : "flex-start", "alignItems" : "center", "style" : { "paddingLeft" : "120px", "marginBottom" : "4px" }, "items" : [ { "name" : "SELECT_MATERIAL", "label" : "添加", "type" : "button", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "id" : "egadddlgSELECTMATERIAL", "title" : "", "size" : "lg", "body" : { "type" : "crud", "api" : "/api/picker/3ab28089-908c-4101-9c1a-a129e69249c2/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" : "egadddlgSELECTMATERIAL", "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 => ({...item}))}" } }, { "actionType" : "closeDialog" } ] } } } ] }, "hiddenOn" : "${__readonly}" } ] }, { "name" : "MATERIALLIST", "label" : "出场材料明细", "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" : "MATERIALNAME", "label" : "材料名称(显示名)", "quickEdit" : { "name" : "MATERIALNAME", "disabled" : true, "type" : "input-text" } }, { "name" : "SPECIFICATIONS", "label" : "规格", "quickEdit" : { "name" : "SPECIFICATIONS", "disabled" : true, "type" : "input-text" } }, { "name" : "STOCKPURCHASENUM", "label" : "库存量", "quickEdit" : { "name" : "STOCKPURCHASENUM", "disabled" : true, "type" : "input-number", "precision" : 2 } }, { "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" : "8b92c946-d459-40bb-adeb-70d29782ec0d", "editgridField" : "MATERIALLIST", "scriptKey" : "a20a9d52-07e9-44d0-be17-1c409c729384", "changedField" : "PURCHASENUM", "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" : "UNIT", "label" : "主单位", "type" : "tpl", "tpl" : "${UNIT_DISPLAY__ ? UNIT_DISPLAY__ : UNIT}", "quickEdit" : false } ], "needConfirm" : false } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 12, "body" : [ { "name" : "DOCUMENT", "label" : "附件", "type" : "input-file", "receiver" : "/api/file/upload?tableName=PM_PROJECTEXPORTBATCH_TJ&businessKey=${PM_PROJECTEXPORTBATCH_TJ_ID}", "downloadUrl" : "/api/file/${id}", "multiple" : true, "staticOn" : "${__readonly}", "joinValues" : false, "extractValue" : false } ] } ] }, { "name" : "PM_PROJECTEXPORTBATCH_TJ_ID", "label" : "主键", "hidden" : true, "type" : "input-text" }, { "type" : "group", "body" : [ ] } ], "actions" : [ ] } }