{ "type" : "page", "title" : "固定资产采购申请编辑页面", "body" : { "type" : "form", "id" : "eip4-edit-form", "title" : "", "mode" : "horizontal", "horizontal" : { "leftFixed" : 120 }, "body" : [ { "type" : "grid", "columns" : [ { "md" : 6, "body" : [ { "name" : "FORMNO", "label" : "表单号", "required" : true, "type" : "input-text" } ] }, { "md" : 6, "body" : [ { "name" : "APPLYNAME", "label" : "申请人", "type" : "static", "tpl" : "${APPLYNAME_DISPLAY__ ? APPLYNAME_DISPLAY__ : (DISPLAYNAME ? DISPLAYNAME : APPLYNAME)}", "value" : "${currentUser}" } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 6, "body" : [ { "name" : "DEPART_ID", "label" : "申请部门", "required" : true, "type" : "select", "clearable" : true, "source" : "/api/picker/SYS_DEPART/list?perPage=500", "value" : "${currentDepart}" } ] }, { "md" : 6, "body" : [ { "name" : "APPLYDATE", "label" : "申请日期", "required" : true, "type" : "input-date", "value" : "${now}" } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 12, "body" : [ { "name" : "BUYREASON", "label" : "购置原因", "required" : true, "type" : "textarea" } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 12, "body" : [ { "name" : "PURCHASEDETAIL", "label" : "申请资产", "required" : true, "type" : "input-table", "id" : "eg-PURCHASEDETAIL", "addable" : true, "removable" : true, "staticOn" : "${__readonly}", "columns" : [ { "name" : "ASSETS_NAME", "label" : "资产名称", "quickEdit" : { "name" : "ASSETS_NAME", "required" : true, "type" : "input-text" } }, { "name" : "STANDARD", "label" : "规格型号", "quickEdit" : { "name" : "STANDARD", "type" : "input-text" } }, { "name" : "AMOUNT", "label" : "数量", "quickEdit" : { "name" : "AMOUNT", "required" : true, "type" : "input-number", "precision" : 0, "step" : 1, "min" : 1.0, "onEvent" : { "change" : { "actions" : [ { "actionType" : "ajax", "outputVar" : "egRow", "args" : { "api" : { "method" : "post", "url" : "/api/script/execute-editgrid-row", "data" : { "templateId" : "44504046-2f92-4b74-a578-42ebf3e40bc8", "editgridField" : "PURCHASEDETAIL", "scriptKey" : "1a33e848-4c2f-4685-be76-7630a5ad4cf8", "changedField" : "AMOUNT", "row" : "${__rendererData}", "parent" : { "PURCHASEDETAIL" : "${__rendererData.PURCHASEDETAIL || PURCHASEDETAIL}" } } } } }, { "actionType" : "setValue", "componentId" : "eg-PURCHASEDETAIL", "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, "min" : 0.01, "onEvent" : { "change" : { "actions" : [ { "actionType" : "ajax", "outputVar" : "egRow", "args" : { "api" : { "method" : "post", "url" : "/api/script/execute-editgrid-row", "data" : { "templateId" : "44504046-2f92-4b74-a578-42ebf3e40bc8", "editgridField" : "PURCHASEDETAIL", "scriptKey" : "1a33e848-4c2f-4685-be76-7630a5ad4cf8", "changedField" : "UNITPRICE", "row" : "${__rendererData}", "parent" : { "PURCHASEDETAIL" : "${__rendererData.PURCHASEDETAIL || PURCHASEDETAIL}" } } } } }, { "actionType" : "setValue", "componentId" : "eg-PURCHASEDETAIL", "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 } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 6, "body" : [ { "name" : "SUMPRICE", "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=OA_FIXEDASSETS_PURCHASEAPPLY&businessKey=${OA_FIXEDASSETS_PURCHASEAPPLY_ID}", "downloadUrl" : "/api/file/${id}", "multiple" : true, "staticOn" : "${__readonly}", "joinValues" : false, "extractValue" : false } ] } ] }, { "name" : "OA_FIXEDASSETS_PURCHASEAPPLY_ID", "label" : "主键", "hidden" : true, "type" : "input-text" } ], "actions" : [ ] } }