{ "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" : "请点击右侧的图标", "value" : "${currentUser}" } ] }, { "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" : "PURCHASEAPPLY", "label" : "添加", "type" : "button", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "id" : "egadddlgPURCHASEAPPLY", "title" : "", "size" : "lg", "body" : { "type" : "crud", "api" : "/api/picker/914991ba-4db2-41a2-8249-4a730481bd51/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" : "egadddlgPURCHASEAPPLY", "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 => ({APPLYDETAILID: item.OA_OFFICE_PURCHASEAPPLY_GOODSDETAIL_ID, GOODS_ID: item.GOODS_ID, GOODS_ID_DISPLAY__: item._label, GOODS_STANDARD: item.GOODS_STANDARD, GOODS_UNIT: item.GOODS_UNIT, IN_AMOUNT: item.STANDINGSTOCK, APPLYAMOUNT: item.AMOUNT, REGISTERAMOUNT: item.REGISTERAMOUNT}))}" } }, { "actionType" : "closeDialog" } ] } } } ] }, "hiddenOn" : "${__readonly}" } ] }, { "name" : "GOODSDETAIL", "label" : "购买用品", "required" : true, "type" : "input-table", "id" : "eg-GOODSDETAIL", "addable" : false, "removable" : true, "staticOn" : "${__readonly}", "columns" : [ { "name" : "FROMNO", "label" : "申请单号", "quickEdit" : { "name" : "FROMNO", "disabled" : true, "type" : "input-text" } }, { "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" : "APPLYAMOUNT", "label" : "申请数量", "quickEdit" : { "name" : "APPLYAMOUNT", "disabled" : true, "type" : "input-number", "precision" : 0, "step" : 1 } }, { "name" : "REGISTERAMOUNT", "label" : "已登记量", "quickEdit" : { "name" : "REGISTERAMOUNT", "disabled" : true, "type" : "input-number", "precision" : 0, "step" : 1, "value" : "0" } }, { "name" : "IN_AMOUNT", "label" : "本次购买数量", "quickEdit" : { "name" : "IN_AMOUNT", "required" : true, "type" : "input-number", "precision" : 0, "step" : 1, "min" : 1, "max" : 9999999, "value" : "0", "onEvent" : { "change" : { "actions" : [ { "actionType" : "ajax", "outputVar" : "egRow", "args" : { "api" : { "method" : "post", "url" : "/api/script/execute-editgrid-row", "data" : { "templateId" : "f3eb5006-61e8-485a-a8fb-1a6f172fb37f", "editgridField" : "GOODSDETAIL", "scriptKey" : "3c22697d-17a6-4266-a78c-a9001970ee03", "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" : "f3eb5006-61e8-485a-a8fb-1a6f172fb37f", "editgridField" : "GOODSDETAIL", "scriptKey" : "3c22697d-17a6-4266-a78c-a9001970ee03", "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" : "f3eb5006-61e8-485a-a8fb-1a6f172fb37f", "editgridField" : "GOODSDETAIL", "scriptKey" : "0f942f5e-e013-4a0c-ac9f-ba3b62ad8770", "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" : [ ] } }