{ "type" : "page", "title" : "机械合同终止", "body" : { "type" : "crud", "api" : "/api/flow/PM_MACHINECONTRACTREGISTER_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "DEPART", "label" : "(分)公司", "type" : "tree-select", "clearable" : true, "source" : "/api/template/1ef49ca8-c023-4044-b389-f44d4ad7b577/tree", "searchable" : true }, { "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" : "CONTRACTNUMBER", "label" : "合同编号", "type" : "input-text" }, { "name" : "CONTRACTNAME", "label" : "合同名称", "type" : "input-text" }, { "name" : "EFFECTIVEDATE", "label" : "终止日期", "type" : "input-date-range" }, { "name" : "CONTRACTSTATUS", "label" : "合同状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/CONTRACTSTATUS" } ] }, "columns" : [ { "name" : "PM_MACHINECONTRACTREGISTER_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "DEPART_DISPLAY__", "label" : "(分)公司", "width" : 200 }, { "name" : "PROJECTID_DISPLAY__", "label" : "工程名称", "width" : 200 }, { "name" : "CONTRACTNUMBER", "label" : "合同编号", "width" : 200 }, { "name" : "CONTRACTNAME", "label" : "合同名称", "width" : 200 }, { "name" : "A_PART", "label" : "甲方", "width" : 200 }, { "name" : "MACHINENAME_DISPLAY__", "label" : "机械供应商", "width" : 200 }, { "name" : "CONTRACTMONEY", "label" : "合同价款", "width" : 200 }, { "name" : "STARTTIME", "label" : "开始日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ENDTIME", "label" : "结束日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "SIGNUPTIME", "label" : "签约日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "EFFECTIVEDATE", "label" : "终止日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "CONTRACTSTATUS", "label" : "合同状态", "width" : 200, "type" : "mapping", "map" : { "1" : "签订", "2" : "终止" } }, { "name" : "STOPREASON", "label" : "终止原因", "width" : 200, "toggled" : false } ], "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/449460c5-08d7-416b-8043-6882d8ae4342?format=amis", "api" : { "method" : "post", "url" : "/api/flow/PM_MACHINECONTRACTREGISTER_LOAD?__egtpl=449460c5-08d7-416b-8043-6882d8ae4342", "data" : { "PM_MACHINECONTRACTREGISTER_ID" : "${PM_MACHINECONTRACTREGISTER_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_MACHINECONTRACTREGISTER_EXPIRY?__egtpl=449460c5-08d7-416b-8043-6882d8ae4342", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "取消终止", "label" : "取消终止", "actionType" : "ajax", "disabled" : true, "confirmText" : "确认要取消终止此合同吗?", "api" : { "method" : "post", "url" : "/api/flow/PM_MACHINECONTRACTREGISTER_CANCEL", "data" : { "PM_MACHINECONTRACTREGISTER_ID" : "${selectedItems[0].PM_MACHINECONTRACTREGISTER_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/449460c5-08d7-416b-8043-6882d8ae4342?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/PM_MACHINECONTRACTREGISTER_LOAD?__egtpl=449460c5-08d7-416b-8043-6882d8ae4342", "data" : { "PM_MACHINECONTRACTREGISTER_ID" : "${PM_MACHINECONTRACTREGISTER_ID}" }, "responseData" : { "&" : "${result}" } } } } }, "pagination" ], "primaryField" : "PM_MACHINECONTRACTREGISTER_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" : "a8145ca5-b1d3-4f7c-99b2-05825b3c5200" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }