页面下来选项变更时移除添加的默认值relationship
1,js呼叫服务端方法实现更新后台数据,再清理前天单身
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
//author:Ethan.W //date:2019/6/4 var inn = top.aras.newIOMInnovator(); var userid = inn.getUserID(); var itemId = document.thisItem.getId(); //if (userid == "37034179ED2147C8ACA4F55B2046C7EC") { debugger; //var lx_ap_wf = document.thisItem.getProperty("lx_ap_wf"); var lx_ap_wf = document.getElementsByClassName("lx_ap_wf sys_f_select")[0].value; var tabbar = top.window.relationships ? top.window.relationships.relTabbar : null; var tabId = tabbar ? tabbar.GetSelectedTab() : null; var tab = tabbar._getTab("C0455B94AF4F4C38955B2EFAFC9DF6E4").domNode.lastChild === null ? null : tabbar._getTab("C0455B94AF4F4C38955B2EFAFC9DF6E4").domNode.lastChild.contentWindow; //取 稽核人员 tab //还没有添加稽核人员时不处理 if (tab === null) { return; } var rowCnt = tab.grid.getRowsNum(); //非195且页面关联有记录时才移除稽核人员 if (lx_ap_wf === "195" || rowCnt === 0) { return; } var applyResult = inn.applyMethod("lx_delete_part_assignment_b", "<part_apply_id>" + itemId + "</part_apply_id>"); var result = applyResult.getResult(); if (result === "true") { //top.onRefresh();//此处使用单头主料会刷新导致修改的内容无效。 for (var item = 0; item < rowCnt; item++) { tab.grid.deleteRow(tab.grid.getRowId(0));//删除行,索引自动减少,所以始终删除第一步 } } //} |
2,服务端方法 [crayon-6…