天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
查看: 2015|回复: 0

[函数] 获取明细序号【函数-getDetailSeq (fieldName, detailForm)】

[复制链接]
purple 发表于 2011-11-29 10:36:10 | 显示全部楼层 |阅读模式
本帖最后由 purple 于 2012-12-28 09:51 编辑

函数格式:
getDetailSeq (fieldName, detailForm)
函数说明:
fieldName: 字段名
detailForm: 所在明细表名
示例:
实现getDetailSeq(fieldName, detailForm)函数的应用
function getDetailSeq(fieldName, detailForm) {
        var seq = getItemValue(fieldName);
        var doc = getCurrentDocument();
        if(doc.getIstmp()){
                var parent = getParentDocument();
                var details = parent.getChilds(detailForm);
                if (details != null) {
                        seq = details.size() + 1 + "";
                } else {
                        seq = "1";
                }
        }
        return seq;
}

调用
#include " actionlib";
getDetailSeq ("fieldName "," detailForm ");

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 07:38

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表