{ "type" : "page", "title" : "周转(公司自购)材料采购申请", "body" : { "type" : "crud", "api" : "/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_SEARCH_COMPANY", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "STOREHOUSE", "label" : "仓库", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/PM_MATERIAL_STOREHOUSE" }, { "name" : "FORMNO", "label" : "表单号", "type" : "input-text" }, { "name" : "PROJECTID", "label" : "工程名称", "hidden" : true, "type" : "select", "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}", "value" : "${currentProject}" }, { "name" : "APPLYTYPE", "label" : "申请类型", "hidden" : true, "type" : "select", "clearable" : true, "source" : "/api/poc/dict/materialApply-applytype" }, { "name" : "APPLYNAME", "label" : "申请人", "hidden" : true, "type" : "select", "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}" }, { "name" : "APPLYDATE", "label" : "申请日期", "type" : "input-date-range" }, { "name" : "LISTERNAME", "label" : "制表人", "hidden" : true, "type" : "select", "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}" }, { "name" : "DELIVERYREQUIRE", "label" : "要求到货日期", "type" : "input-date-range" }, { "name" : "DELIVERYPLACE", "label" : "送货地点", "hidden" : true, "type" : "input-text" }, { "name" : "CONSIGNEE", "label" : "收货联系人", "hidden" : true, "type" : "select", "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}" }, { "name" : "EXPLAIN", "label" : "说明", "hidden" : true, "type" : "input-text" }, { "name" : "STATUS", "label" : "审批状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/WFSTATUS" }, { "name" : "ISIMPORT", "label" : "确认进场完毕", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO" } ] }, "columns" : [ { "name" : "PM_TURNOVERMATERIALPURCHASEAPPLY_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "STOREHOUSE_DISPLAY__", "label" : "仓库", "width" : 100 }, { "name" : "FORMNO", "label" : "表单号", "width" : 200 }, { "name" : "ORGID_DISPLAY__", "label" : "(分)公司", "width" : 300 }, { "name" : "PROJECTID_DISPLAY__", "label" : "工程名称", "width" : 250, "toggled" : false }, { "name" : "DEPARTID_DISPLAY__", "label" : "申请部门", "width" : 150 }, { "name" : "APPLYTYPE", "label" : "申请类型", "width" : 200, "type" : "mapping", "map" : { "1" : "租赁周材", "2" : "自购周材-公司申请", "3" : "自购周材-项目申请" }, "toggled" : false }, { "name" : "APPLYNAME_DISPLAY__", "label" : "申请人", "width" : 80 }, { "name" : "APPLYDATE", "label" : "申请日期", "width" : 100, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "LISTERNAME", "label" : "制表人", "width" : 200, "toggled" : false }, { "name" : "DELIVERYREQUIRE", "label" : "要求到货日期", "width" : 100, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "DELIVERYPLACE", "label" : "送货地点", "width" : 200, "toggled" : false }, { "name" : "CONSIGNEE_DISPLAY__", "label" : "收货联系人", "width" : 200, "toggled" : false }, { "name" : "EXPLAIN", "label" : "说明", "width" : 200, "toggled" : false }, { "name" : "STATUS", "label" : "审批状态", "width" : 80, "type" : "mapping", "map" : { "1" : "未提交", "2" : "处理中", "3" : "通过", "4" : "未通过", "5" : "重新提交", "6" : "作废" } }, { "name" : "ISIMPORT", "label" : "确认进场完毕", "width" : 100, "type" : "mapping", "map" : { "0" : "否", "1" : "是" } } ], "headerToolbar" : [ { "type" : "button", "id" : "添加", "label" : "添加", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "添加", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/38fae6d5-139d-430a-9547-2b6b65321969?format=amis", "api" : { "method" : "get", "url" : "/api/form/PM_TURNOVERMATERIALPURCHASEAPPLY/defaults?templateId=38fae6d5-139d-430a-9547-2b6b65321969" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_ADD?__egtpl=38fae6d5-139d-430a-9547-2b6b65321969", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_SAVE_AND_SUBMIT?__egtpl=38fae6d5-139d-430a-9547-2b6b65321969", "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/38fae6d5-139d-430a-9547-2b6b65321969?format=amis", "api" : { "method" : "post", "url" : "/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_LOAD?__egtpl=38fae6d5-139d-430a-9547-2b6b65321969", "data" : { "PM_TURNOVERMATERIALPURCHASEAPPLY_ID" : "${PM_TURNOVERMATERIALPURCHASEAPPLY_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "7bcec5d4-1c4a-4cd4-b22f-20ad2c19aaca" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_UPDATE?__egtpl=38fae6d5-139d-430a-9547-2b6b65321969", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_SAVE_AND_SUBMIT?__egtpl=38fae6d5-139d-430a-9547-2b6b65321969", "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_TURNOVERMATERIALPURCHASEAPPLY_DELETE", "data" : { "ids" : "${selectedItems|pick:PM_TURNOVERMATERIALPURCHASEAPPLY_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/ba1e5e5b-f35b-4bcf-b955-ee28a60eeacd?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_LOAD?__egtpl=ba1e5e5b-f35b-4bcf-b955-ee28a60eeacd", "data" : { "PM_TURNOVERMATERIALPURCHASEAPPLY_ID" : "${PM_TURNOVERMATERIALPURCHASEAPPLY_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "type" : "button", "id" : "提交审批", "label" : "提交审批", "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_SUBMIT", "data" : { "PM_TURNOVERMATERIALPURCHASEAPPLY_ID" : "${selectedItems[0].PM_TURNOVERMATERIALPURCHASEAPPLY_ID}" } }, "disabledOn" : "${!selectedItems || selectedItems.length === 0 || (selectedItems[0].STATUS && selectedItems[0].STATUS != 1 && selectedItems[0].STATUS != 4 && selectedItems[0].STATUS != 5)}" }, { "type" : "button", "id" : "确认进场完毕", "label" : "确认进场完毕", "actionType" : "ajax", "disabled" : true, "confirmText" : "确认进场完毕吗?", "api" : { "method" : "post", "url" : "/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_STATUSUPDATE", "data" : { "PM_TURNOVERMATERIALPURCHASEAPPLY_ID" : "${selectedItems[0].PM_TURNOVERMATERIALPURCHASEAPPLY_ID}" } } }, { "type" : "button", "id" : "取消进场", "label" : "取消进场", "actionType" : "ajax", "disabled" : true, "confirmText" : "确认要取消进场?", "api" : { "method" : "post", "url" : "/api/flow/PM_TURNOVERMATERIALPURCHASEAPPLY_STATUSUPDATECANCEL", "data" : { "PM_TURNOVERMATERIALPURCHASEAPPLY_ID" : "${selectedItems[0].PM_TURNOVERMATERIALPURCHASEAPPLY_ID}" } } }, { "type" : "button", "id" : "打印", "label" : "打印", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "打印周转材料采购申请", "size" : "lg", "data" : { "PM_TURNOVERMATERIALPURCHASEAPPLY_ID" : "${selectedItems[0].PM_TURNOVERMATERIALPURCHASEAPPLY_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/b012adac-28e3-446a-86c0-980fff7bbbe0?format=amis" }, "actions" : [ { "type" : "button", "label" : "关闭", "actionType" : "close" } ] } }, { "type" : "button", "id" : "查看审批", "label" : "查看审批", "icon" : "fa fa-search", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "onEvent" : { "click" : { "actions" : [ { "actionType" : "openApprovalDrawer", "args" : { "taskName" : "审批详情", "processInstanceId" : "${selectedItems[0].processInstanceId || selectedItems[0].PROCESSINSTANCEID || ''}", "businessKey" : "${selectedItems[0].PM_TURNOVERMATERIALPURCHASEAPPLY_ID}", "businessTable" : "PM_TURNOVERMATERIALPURCHASEAPPLY", "readOnly" : true, "mode" : "read" } } ] } } }, "pagination" ], "primaryField" : "PM_TURNOVERMATERIALPURCHASEAPPLY_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "disabled", "componentId" : "确认进场完毕" }, { "actionType" : "disabled", "componentId" : "取消进场" }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${event.data.selectedItems[0]}", "templateId" : "7bcec5d4-1c4a-4cd4-b22f-20ad2c19aaca" } }, "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" : "7bcec5d4-1c4a-4cd4-b22f-20ad2c19aaca" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 3, "item" : "${&}", "templateId" : "7bcec5d4-1c4a-4cd4-b22f-20ad2c19aaca" } }, "outputVar" : "scriptResult3" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult3.commands}" } } ] } } } }