const WfForm = { isMobile: () => { // true表示是eMobile、微信、钉钉等移动终端,false代表PC端 }, } WfForm.OPER_SAVE = '保存' WfForm.OPER_SUBMIT = '提交/批准/提交需反馈/不需反馈等' WfForm.OPER_SUBMITCONFIRM = '提交至确认页面,如果是确认界面,点确认触发的是SUBMIT' WfForm.OPER_REJECT = '退回' WfForm.OPER_REMARK = '批注提交' WfForm.OPER_INTERVENE = '干预' WfForm.OPER_FORWARD = '转发' WfForm.OPER_TAKEBACK = '强制收回' WfForm.OPER_DELETE = '删除' WfForm.OPER_ADDROW = '添加明细行,需拼明细表序号' WfForm.OPER_DELROW = '删除明细行,需拼明细表序号' WfForm.OPER_PRINTPREVIEW = '打印预览 KB900190501' WfForm.OPER_EDITDETAILROW = '移动端-编辑明细 KB900191101' WfForm.OPER_BEFOREVERIFY = '校验必填前触发事件 KB900191201' WfForm.OPER_TURNHANDLE = '转办 KB900201101' WfForm.OPER_ASKOPINION = '意见征询 KB900201101' WfForm.OPER_TAKFROWARD = '征询转办 KB900201101' WfForm.OPER_TURNREAD = '传阅 KB900201101' WfForm.OPER_FORCEOVER = '强制归档 KB900201101' WfForm.OPER_BEFORECLICKBTN = '点右键按钮前 KB900201101' WfForm.OPER_SAVECOMPLETE = '保存后页面跳转前 KB900210501' WfForm.OPER_WITHDRAW = '撤回 KB900201101' WfForm.OPER_CLOSE = '页面关闭' WfForm.registerCheckEvent = (type, callback) => { // WfForm.registerCheckEvent(WfForm.OPER_SAVE+","+WfForm.OPER_SUBMIT,function(callback){ // //... 执行自定义逻辑 // callback(); // }); } WfForm.ACTION_ADDROW = '添加明细行,需拼明细表序号 KB900190407' WfForm.ACTION_DELROW = '删除明细行,需拼明细表序号 KB900190407' WfForm.ACTION_EDITDETAILROW = '移动端-编辑明细行,需拼明细表序号 KB900190501' WfForm.ACTION_SWITCHDETAILPAGING = '切换明细分页 KB900191201' WfForm.ACTION_SWITCHTABLAYOUT = '切换模板布局标签页 KB900191201' WfForm.registerAction = (type, callback) => { // WfForm.registerAction(WfForm.ACTION_ADDROW+"1", function(index){ // alert("添加行下标是"+index); // }); //下标从1开始,明细1添加行触发事件,注册函数入参为新添加行下标 // WfForm.registerAction(WfForm.ACTION_DELROW+"2", function(arg){ // alert("删除行下标集合是"+arg.join(",")); // }); //下标从1开始,明细2删除行触发事件 // WfForm.registerAction(WfForm.ACTION_SWITCHDETAILPAGING, function(groupid){ // alert("切换明细表"+(groupid+1)+"的页码触发事件"); // }); // WfForm.registerAction(WfForm.ACTION_SWITCHTABLAYOUT, function(tabid){ // alert("切换到标签项"+tabid+"触发事件"); // }); } WfForm.convertFieldNameToId = (fieldName, table, flag) => { // var fieldid = WfForm.convertFieldNameToId("zs"); // var fieldid = WfForm.convertFieldNameToId("zs_mx", "detail_1"); // var fieldid = WfForm.convertFieldNameToId("zs_mx", "detail_1", false); } WfForm.getFieldValue = function (fieldMark) { // fieldMark String 是 字段标示,格式field${字段ID}_${明细行号} // var fieldvalue = WfForm.getFieldValue("field110"); } WfForm.bindFieldChangeEvent = function (fieldMarkStr, funobj) { // fieldMarkStr String 是 绑定字段标示,可多个拼接逗号隔开,例如:field110(主字段),field111_2(明细字段)…… // funobj Function 是 字段值变化触发的自定义函数,函数默认传递以下三个参数,参数1:触发字段的DOM对象,参数2:触发字段的标示(field27555等),参数3:修改后的值 // WfForm.bindFieldChangeEvent("field27555,field27556", function (obj, id, value) { // console.log("WfForm.bindFieldChangeEvent--", obj, id, value); // }); }