{ "type" : "page", "title" : "设备进出场", "body" : { "type" : "crud", "api" : "/api/flow/PM_PROJECTEQUIPMENT_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" : "MACHINECONTRACTREGISTERID", "label" : "机械合同", "type" : "picker", "clearable" : true, "source" : "/api/picker/25ca5618-4918-47e6-ac7f-d2b1fcb55906/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] } }, { "name" : "EQUIPMENTNO", "label" : "设备编码", "disabled" : true, "type" : "input-text" }, { "name" : "EQUIPMENTID", "label" : "设备", "type" : "picker", "clearable" : true, "source" : "/api/picker/433f6b07-06a7-482f-90c5-cb7aa6a5d252/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] } }, { "name" : "EQUIPMENTSOURCE", "label" : "设备来源", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/EQUIPMENT_EQUIPMENTSOURCE" }, { "name" : "IMPORTDATE", "label" : "进场日期", "type" : "input-date-range" }, { "name" : "ISACCOUNTS", "label" : "是否记账", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO" } ] }, "columns" : [ { "name" : "PM_PROJECTEQUIPMENT_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "PROJECTID_DISPLAY__", "label" : "工程名称", "width" : 200 }, { "name" : "MACHINECONTRACTREGISTERID_DISPLAY__", "label" : "机械合同", "width" : 200 }, { "name" : "MACHINESUPPLIERID_DISPLAY__", "label" : "机械供应商", "width" : 200 }, { "name" : "EQUIPMENTNO", "label" : "设备编码", "width" : 200 }, { "name" : "EQUIPMENTID_DISPLAY__", "label" : "设备", "width" : 200 }, { "name" : "SPECIFICATIONS", "label" : "规格型号", "width" : 200 }, { "name" : "TESTREPORT", "label" : "检测报告", "width" : 200 }, { "name" : "EQUIPMENTSOURCE", "label" : "设备来源", "width" : 200, "type" : "mapping", "map" : { "1" : "自有", "2" : "租赁" } }, { "name" : "NUMBER", "label" : "数量", "width" : 200 }, { "name" : "LEASEPRICE", "label" : "租赁单价(元)", "width" : 200 }, { "name" : "TOTALPRICE", "label" : "合价(元)", "width" : 200 }, { "name" : "AMORTIZEDAYS", "label" : "摊销天数", "width" : 200 }, { "name" : "IMPORTDATE", "label" : "进场日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "INSTALLUNIT", "label" : "安装单位", "width" : 200 }, { "name" : "INSTALLDATE", "label" : "安装日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "REMARK", "label" : "备注", "width" : 200 }, { "name" : "EXPORTDATE", "label" : "出场日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ISACCOUNTS", "label" : "是否记账", "width" : 200, "type" : "mapping", "map" : { "0" : "否", "1" : "是", "false" : "否", "true" : "是" } } ], "headerToolbar" : [ { "type" : "button", "id" : "进场", "label" : "进场", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "进场", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/063f6b04-85af-4dd1-9070-238f393d7bc7?format=amis", "api" : { "method" : "get", "url" : "/api/form/PM_PROJECTEQUIPMENT/defaults?templateId=063f6b04-85af-4dd1-9070-238f393d7bc7" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_PROJECTEQUIPMENT_ADD?__egtpl=063f6b04-85af-4dd1-9070-238f393d7bc7", "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/063f6b04-85af-4dd1-9070-238f393d7bc7?format=amis", "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTEQUIPMENT_LOAD?__egtpl=063f6b04-85af-4dd1-9070-238f393d7bc7", "data" : { "PM_PROJECTEQUIPMENT_ID" : "${PM_PROJECTEQUIPMENT_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_PROJECTEQUIPMENT_UPDATE?__egtpl=063f6b04-85af-4dd1-9070-238f393d7bc7", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "删除", "label" : "删除", "level" : "danger", "actionType" : "ajax", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "confirmText" : "确认要删除此记录吗?", "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTEQUIPMENT_DELETE", "data" : { "ids" : "${selectedItems|pick:PM_PROJECTEQUIPMENT_ID|join:','}" } } }, { "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/fcc8e3d1-80f1-48d4-a75d-a92190e95bd8?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTEQUIPMENT_LOAD?__egtpl=fcc8e3d1-80f1-48d4-a75d-a92190e95bd8", "data" : { "PM_PROJECTEQUIPMENT_ID" : "${PM_PROJECTEQUIPMENT_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "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/fcc8e3d1-80f1-48d4-a75d-a92190e95bd8?format=amis", "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTEQUIPMENT_LOAD?__egtpl=fcc8e3d1-80f1-48d4-a75d-a92190e95bd8", "data" : { "PM_PROJECTEQUIPMENT_ID" : "${PM_PROJECTEQUIPMENT_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "a0999644-8dbd-446e-ae38-6a207bf69665" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_PROJECTEQUIPMENT_EXPORT?__egtpl=fcc8e3d1-80f1-48d4-a75d-a92190e95bd8", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "取消出场", "label" : "取消出场", "actionType" : "ajax", "disabled" : true, "api" : { "method" : "post", "url" : "/api/flow/PM_PROJECTEQUIPMENT_CANCELEXPORT", "data" : { "PM_PROJECTEQUIPMENT_ID" : "${selectedItems[0].PM_PROJECTEQUIPMENT_ID}" } } }, "pagination" ], "primaryField" : "PM_PROJECTEQUIPMENT_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "disabled", "componentId" : "取消出场" }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${event.data.selectedItems[0]}", "templateId" : "a0999644-8dbd-446e-ae38-6a207bf69665" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] }, "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "a0999644-8dbd-446e-ae38-6a207bf69665" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }