{ "type" : "page", "title" : "购买凭证-直接登记", "body" : { "type" : "form", "id" : "eip4-edit-form", "title" : "", "mode" : "horizontal", "horizontal" : { "leftFixed" : 120 }, "body" : [ { "type" : "grid", "columns" : [ { "md" : 4, "body" : [ { "name" : "NUMBER", "label" : "凭证编号", "required" : true, "type" : "input-text" } ] }, { "md" : 4, "body" : [ { "name" : "STORE_ID", "label" : "办公用品库", "required" : true, "type" : "select", "clearable" : true, "source" : "/api/picker/OA_OFFICE_STOREHOUSE/list?perPage=500" } ] }, { "md" : 4, "body" : [ { "name" : "BUY_DATE", "label" : "购买日期", "required" : true, "type" : "input-date", "value" : "${now}" } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 4, "body" : [ { "name" : "BUY_USER", "label" : "购买人", "required" : true, "type" : "picker", "clearable" : true, "source" : "/api/picker/76d2f950-ef40-4eff-89ec-98ad9a4976b9/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] }, "placeholder" : "请点击右侧的图标" } ] }, { "md" : 4, "body" : [ { "name" : "INVOICENUMBER", "label" : "发票号", "type" : "input-text" } ] }, { "md" : 4, "body" : [ { "name" : "ISSUEINVOICE", "label" : "开票人", "type" : "input-text" } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 4, "body" : [ { "name" : "TOTALMONEY", "label" : "购买总金额(元)", "disabled" : true, "type" : "input-number", "precision" : 2 } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 12, "body" : [ { "type" : "flex", "justify" : "flex-start", "alignItems" : "center", "style" : { "paddingLeft" : "120px", "marginBottom" : "4px" }, "items" : [ { "name" : "SELECT", "label" : "添加", "type" : "button", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "id" : "egadddlgSELECT", "title" : "", "size" : "lg", "body" : { "type" : "crud", "api" : "/api/picker/2a863c20-3d71-4481-9eb3-846b1a1d28e2/list", "mode" : "table", "syncLocation" : false, "selectable" : true, "multiple" : true, "keepItemSelectionOnPageChange" : true, "primaryField" : "_id", "labelField" : "_label", "headerToolbar" : [ { "type" : "search-box", "placeholder" : "输入关键字搜索", "name" : "q" } ], "footerToolbar" : [ "pagination" ], "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "setValue", "componentId" : "egadddlgSELECT", "args" : { "value" : { "__egpicked" : "${event.data.selectedItems}" } } } ] } } }, "actions" : [ { "type" : "button", "label" : "取消", "actionType" : "close" }, { "type" : "button", "label" : "确定", "level" : "primary", "onEvent" : { "click" : { "actions" : [ { "actionType" : "addItem", "componentId" : "eg-GOODSDETAIL", "args" : { "item" : "${ARRAYMAP(__egpicked, item => ({GOODS_ID: item.OA_OFFICE_GOODS_ID, GOODS_ID_DISPLAY__: item._label, GOODS_STANDARD: item.GOODS_STANDARD, GOODS_UNIT: item.GOODS_UNIT}))}" } }, { "actionType" : "closeDialog" } ] } } } ] }, "hiddenOn" : "${__readonly}" } ] }, { "name" : "GOODSDETAIL", "label" : "购买用品", "required" : true, "type" : "input-table", "id" : "eg-GOODSDETAIL", "addable" : false, "removable" : true, "staticOn" : "${__readonly}", "columns" : [ { "name" : "GOODS_ID", "label" : "用品名称", "type" : "tpl", "tpl" : "${GOODS_ID_DISPLAY__ ? GOODS_ID_DISPLAY__ : GOODS_ID}", "quickEdit" : false }, { "name" : "GOODS_STANDARD", "label" : "规格", "quickEdit" : { "name" : "GOODS_STANDARD", "disabled" : true, "type" : "input-text" } }, { "name" : "GOODS_UNIT", "label" : "计量单位", "quickEdit" : { "name" : "GOODS_UNIT", "disabled" : true, "type" : "input-text" } }, { "name" : "IN_AMOUNT", "label" : "数量", "quickEdit" : { "name" : "IN_AMOUNT", "required" : true, "type" : "input-number", "precision" : 0, "step" : 1, "min" : 1.0, "max" : 9999999.0, "onEvent" : { "change" : { "actions" : [ { "actionType" : "ajax", "outputVar" : "egRow", "args" : { "api" : { "method" : "post", "url" : "/api/script/execute-editgrid-row", "data" : { "templateId" : "cf4e94cf-14f9-4279-ae7e-cf1865bba33a", "editgridField" : "GOODSDETAIL", "scriptKey" : "0b6eec7a-d873-4f8a-badc-e81e7f3b919f", "changedField" : "IN_AMOUNT", "row" : "${__rendererData}", "parent" : { "GOODSDETAIL" : "${__rendererData.GOODSDETAIL || GOODSDETAIL}" } } } } }, { "actionType" : "setValue", "componentId" : "eg-GOODSDETAIL", "args" : { "index" : "${index}", "value" : "${egRow.rowSetValues}" } }, { "actionType" : "setValue", "componentId" : "eip4-edit-form", "args" : { "value" : "${egRow.parentSetValues}" } } ] } } } }, { "name" : "PRICE", "label" : "单价(元)", "quickEdit" : { "name" : "PRICE", "type" : "input-number", "precision" : 2, "max" : 9999999.99, "onEvent" : { "change" : { "actions" : [ { "actionType" : "ajax", "outputVar" : "egRow", "args" : { "api" : { "method" : "post", "url" : "/api/script/execute-editgrid-row", "data" : { "templateId" : "cf4e94cf-14f9-4279-ae7e-cf1865bba33a", "editgridField" : "GOODSDETAIL", "scriptKey" : "0b6eec7a-d873-4f8a-badc-e81e7f3b919f", "changedField" : "PRICE", "row" : "${__rendererData}", "parent" : { "GOODSDETAIL" : "${__rendererData.GOODSDETAIL || GOODSDETAIL}" } } } } }, { "actionType" : "setValue", "componentId" : "eg-GOODSDETAIL", "args" : { "index" : "${index}", "value" : "${egRow.rowSetValues}" } }, { "actionType" : "setValue", "componentId" : "eip4-edit-form", "args" : { "value" : "${egRow.parentSetValues}" } } ] } } } }, { "name" : "MONEY", "label" : "金额(元)", "quickEdit" : { "name" : "MONEY", "disabled" : true, "type" : "input-number", "precision" : 2, "max" : 9.9999999999E8, "onEvent" : { "change" : { "actions" : [ { "actionType" : "ajax", "outputVar" : "egRow", "args" : { "api" : { "method" : "post", "url" : "/api/script/execute-editgrid-row", "data" : { "templateId" : "cf4e94cf-14f9-4279-ae7e-cf1865bba33a", "editgridField" : "GOODSDETAIL", "scriptKey" : "9af3ceec-4154-4f53-b204-5d45212ddd38", "changedField" : "MONEY", "row" : "${__rendererData}", "parent" : { "GOODSDETAIL" : "${__rendererData.GOODSDETAIL || GOODSDETAIL}" } } } } }, { "actionType" : "setValue", "componentId" : "eg-GOODSDETAIL", "args" : { "index" : "${index}", "value" : "${egRow.rowSetValues}" } }, { "actionType" : "setValue", "componentId" : "eip4-edit-form", "args" : { "value" : "${egRow.parentSetValues}" } } ] } } } } ], "needConfirm" : false } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 12, "body" : [ { "name" : "REMARK", "label" : "备注", "type" : "textarea" } ] } ] }, { "type" : "grid", "columns" : [ { "md" : 4, "body" : [ { "name" : "REGISTER_USER", "label" : "登记人", "type" : "static", "tpl" : "${REGISTER_USER_DISPLAY__ ? REGISTER_USER_DISPLAY__ : (DISPLAYNAME ? DISPLAYNAME : REGISTER_USER)}", "value" : "${currentUser}" } ] }, { "md" : 4, "body" : [ { "name" : "REGISTER_DATE", "label" : "登记日期", "required" : true, "type" : "input-date", "value" : "${now}" } ] } ] }, { "name" : "OA_OFFICE_GOODS_BUYVOUCHER_ID", "label" : "主键", "hidden" : true, "type" : "input-text" }, { "name" : "ISKEEPACCOUNT", "label" : "是否记账", "required" : true, "hidden" : true, "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO", "value" : "0" }, { "type" : "group", "body" : [ ] } ], "actions" : [ ] } }