{ "type" : "page", "title" : "成本记账", "body" : { "type" : "crud", "api" : "/api/flow/VIEW_PM_MREPORTINTERVAL_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "PROJECTID", "label" : "工程名称", "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}" }, { "name" : "YEAR", "label" : "年份", "type" : "input-number", "precision" : 0, "step" : 1 }, { "name" : "MONTH", "label" : "月份", "type" : "input-number", "precision" : 0, "step" : 1 } ] }, "columns" : [ { "name" : "VIEW_PM_MREPORTINTERVAL_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "PROJECTID_DISPLAY__", "label" : "工程名称", "width" : 200 }, { "name" : "YEARMONTH", "label" : "年月", "width" : 200 }, { "name" : "STARTDATE", "label" : "起始日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ENDDATE", "label" : "结束日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ISFACTTALLY", "label" : "实际成本是否记账", "width" : 200, "type" : "mapping", "map" : { "0" : "否", "1" : "是", "false" : "否", "true" : "是" } }, { "name" : "ISCHECKACCOUNTS", "label" : "是否结账", "width" : 200, "type" : "mapping", "map" : { "0" : "否", "1" : "是", "false" : "否", "true" : "是" } } ], "headerToolbar" : [ { "type" : "button", "id" : "记账", "label" : "记账", "actionType" : "ajax", "disabled" : true, "api" : { "method" : "post", "url" : "/api/flow/COST_FACTTALLY", "data" : { "VIEW_PM_MREPORTINTERVAL_ID" : "${selectedItems[0].VIEW_PM_MREPORTINTERVAL_ID}" } } }, { "type" : "button", "id" : "取消记账", "label" : "取消记账", "actionType" : "ajax", "disabled" : true, "api" : { "method" : "post", "url" : "/api/flow/COST_FACTCANCELTALLY", "data" : { "VIEW_PM_MREPORTINTERVAL_ID" : "${selectedItems[0].VIEW_PM_MREPORTINTERVAL_ID}" } } }, "pagination" ], "primaryField" : "VIEW_PM_MREPORTINTERVAL_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "disabled", "componentId" : "记账" }, { "actionType" : "disabled", "componentId" : "取消记账" }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${event.data.selectedItems[0]}", "templateId" : "0ca71a91-a815-4185-ad8b-c41d384106bf" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }