本帖子整理了表单插件 “查看” “复制” “新增”时触发的事件执行顺序。
为了尽量避免其他不必要的因素干扰,
跟踪时设计的单据如下,继承 基对象模板 ->单据->【1.1 带分录单据模板】
![](/download/01012fee7ad790e548399b708dfc989a0cbb.png)
绑定记录了日志的Python脚本:
![](/download/01011471e615758a452cb352c7e318c1ff21.png)
通过列表界面,打开单据进行[查看],
点开[复制]菜单,复制这条已有的数据,
之后在回到列表菜单,点击[新增],
跟踪到的日志如下:
![](/download/0101f65d48cd8b2f44a28516fa5a56ca90c1.png)
最后 干货
整理记录触发的服务端事件顺序对比表格如下:
[tr][td] 查看[td] 复制[td] 新增
[tr][td] [td]BarItemClick[td]
[tr][td] [td]BeforeDoOperation [td]
[tr][td] [td]CopyData [td]
[tr][td] PreOpenForm[td] [td]PreOpenForm
[tr][td] OnInitializeService[td] [td]OnInitializeService
[tr][td] OnSetBusinessInfo[td] [td]OnSetBusinessInfo
[tr][td] OnSetLayoutInfo[td] [td]OnSetLayoutInfo
[tr][td] OnCreateDataBinder[td] [td]OnCreateDataBinder
[tr][td] OnInitialize[td] [td]OnInitialize
[tr][td]OnBillInitialize [td] [td]OnBillInitialize
[tr][td]
[td] [td]CreateNewData
[tr][td]LoadData [td] [td]
[tr][td]BeforeCreateNewEntryRow [td] BeforeCreateNewEntryRow[td]BeforeCreateNewEntryRow
[tr][td]AfterCreateNewEntryRow [td] AfterCreateNewEntryRow[td]AfterCreateNewEntryRow
[tr][td]
[td]AfterCreateNewData [td]AfterCreateNewData
[tr][td]
[td]
[td]AfterCreateModelData
[tr][td]
[td]AfterCopyData [td]
[tr][td]AfterLoadData [td] [td]
[tr][td]OnLoad [td] OnLoad[td]OnLoad
[tr][td]BeforeBindData [td] BeforeBindData[td]BeforeBindData
[tr][td]AfterBindData [td] AfterBindData[td]AfterBindData
[tr][td]
[td]AfterBarItemClick [td]
[tr][td]EntityRowClick [td]EntityRowClick [td]EntityRowClick
[tr][td]EntityRowClick [td] [td]EntityRowClick
[tr][td] [td] [td]