{ "type" : "page", "title" : "现场材料进场记账(土建)", "body" : { "type" : "crud", "api" : "/api/flow/PM_PROJECTIMPORTBATCH_TJ_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "PROJECTID", "label" : "工程名称", "type" : "picker", "clearable" : true, "source" : "/api/picker/8fbf5298-4588-42e9-ab52-698fc9b380d3/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] } }, { "name" : "IMPORTDATE", "label" : "进场日期", "type" : "input-date" }, { "name" : "BATCHNO", "label" : "批次号", "disabled" : true, "type" : "input-text" }, { "name" : "CONTRACTID", "label" : "物资合同", "type" : "select", "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}" }, { "name" : "INVOICECODE", "label" : "送货单号", "type" : "input-text" }, { "name" : "PLACE", "label" : "收料地点", "type" : "input-text" }, { "name" : "TRUCKCODE", "label" : "车牌号", "type" : "input-text" }, { "name" : "ATTNNAME", "label" : "经办人", "type" : "select", "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}" }, { "name" : "ISACCOUNTS", "label" : "是否记账", "type" : "checkbox" }, { "name" : "ACCOUNTSDATE", "label" : "记账日期", "type" : "input-date" }, { "name" : "MATERIALLIST", "label" : "进场材料明细", "type" : "select", "multiple" : true, "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}" }, { "name" : "SUPPLIERNAME", "label" : "物资供应商", "type" : "input-text" }, { "name" : "ORDERS_TJ_ID", "label" : "订单", "type" : "select", "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}" }, { "name" : "INVOICECODEDATE", "label" : "送货单日期", "type" : "input-date" } ] }, "columns" : [ { "name" : "PM_PROJECTIMPORTBATCH_TJ_ID", "label" : "主键", "width" : 100, "toggled" : false }, { "name" : "IMPORTDATE", "label" : "进场日期", "width" : 130, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "PROJECTID_DISPLAY__", "label" : "工程名称", "width" : 350 }, { "name" : "SUPPLIERNAME_DISPLAY__", "label" : "物资供应商", "width" : 200 }, { "name" : "BATCHNO", "label" : "批次号", "width" : 200 }, { "name" : "INVOICECODE", "label" : "送货单号", "width" : 200 }, { "name" : "TRUCKCODE", "label" : "车牌号", "width" : 200 }, { "name" : "MATERIALDETAILS", "label" : "材料信息", "width" : 200 }, { "name" : "ATTNNAME_DISPLAY__", "label" : "经办人", "width" : 200 }, { "name" : "PLACE", "label" : "收料地点", "width" : 200 }, { "name" : "CONTRACTID_DISPLAY__", "label" : "物资合同名称", "width" : 300 }, { "name" : "ISACCOUNTS", "label" : "是否记账", "width" : 100, "type" : "mapping", "map" : { "0" : "否", "1" : "是", "false" : "否", "true" : "是" } }, { "name" : "ACCOUNTSDATE", "label" : "记账日期", "width" : 150, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" } ], "headerToolbar" : [ { "type" : "button", "id" : "修改", "label" : "修改", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "修改", "size" : "lg", "data" : { "&" : "${selectedItems[0]}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/d1034614-603a-43a4-84f0-3ec8e03607ad?format=amis", "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTIMPORTBATCH_TJ_LOAD?__egtpl=d1034614-603a-43a4-84f0-3ec8e03607ad", "data" : { "PM_PROJECTIMPORTBATCH_TJ_ID" : "${PM_PROJECTIMPORTBATCH_TJ_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "f3171fc3-1c22-48fe-b194-bb5b223c5b42" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_PROJECTIMPORTBATCH_TJ_UPDATE?__egtpl=d1034614-603a-43a4-84f0-3ec8e03607ad", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "记账", "label" : "记账", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "记账", "size" : "lg", "data" : { "&" : "${selectedItems[0]}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/686f3ef7-f466-4fe7-b7a8-972c8e463fd0?format=amis", "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTIMPORTBATCH_TJ_LOAD?__egtpl=686f3ef7-f466-4fe7-b7a8-972c8e463fd0", "data" : { "PM_PROJECTIMPORTBATCH_TJ_ID" : "${PM_PROJECTIMPORTBATCH_TJ_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "f3171fc3-1c22-48fe-b194-bb5b223c5b42" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存并记账", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_PROJECTIMPORTBATCH_TJ_ACCOUNTUPDATE?__egtpl=686f3ef7-f466-4fe7-b7a8-972c8e463fd0", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "取消记账", "label" : "取消记账", "actionType" : "ajax", "disabled" : true, "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTIMPORTBATCH_TJ_CANCELACCOUNT", "data" : { "PM_PROJECTIMPORTBATCH_TJ_ID" : "${selectedItems[0].PM_PROJECTIMPORTBATCH_TJ_ID}" } } }, { "type" : "button", "id" : "查看", "label" : "查看", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "查看", "size" : "lg", "data" : { "&" : "${selectedItems[0]}", "__readonly" : true }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/d1034614-603a-43a4-84f0-3ec8e03607ad?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTIMPORTBATCH_TJ_LOAD?__egtpl=d1034614-603a-43a4-84f0-3ec8e03607ad", "data" : { "PM_PROJECTIMPORTBATCH_TJ_ID" : "${PM_PROJECTIMPORTBATCH_TJ_ID}" }, "responseData" : { "&" : "${result}" } } } } }, "pagination" ], "primaryField" : "PM_PROJECTIMPORTBATCH_TJ_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "disabled", "componentId" : "取消记账" }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${event.data.selectedItems[0]}", "templateId" : "f3171fc3-1c22-48fe-b194-bb5b223c5b42" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] }, "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "f3171fc3-1c22-48fe-b194-bb5b223c5b42" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } } }