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

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

关于示例中一段代码看不懂,求助,

[复制链接]
wangdan 发表于 2012-6-9 21:14:02 | 显示全部楼层 |阅读模式
本帖最后由 wangdan 于 2012-6-11 16:47 编辑

版本10012,OA办公管理系统(标准版)中,物品管理模块中的 表单application 中字段"当前库存"的代码如下:
我不明白的是  statelabel is not null 这句,这里的变量statelabel是怎么来的啊?
#include "businesslib";
convertToFont(getInventoryByItemCode(getItemValue("itemcode")));
function getInventoryByItemCode(itemcode){
        var inventory = 0; //库存
        if (itemcode != null && itemcode.trim().length() > 0) {
                var sql = "select sum(item_quantity) from tlk_storage where item_status='确认' and item_itemcode='"+itemcode+"'";
                var storage = sumBySQL(sql); //入库数
               
                //var sql1 = "select sum(item_quantity) from tlk_application where statelabel<>'提交申请' and item_status<>'退还' and item_itemcode='"+itemcode+"'";
var sql1 = "select sum(item_quantity) from tlk_application where statelabel is not null and item_status<>'退还' and item_itemcode='"+itemcode+"'";
                var application = sumBySQL(sql1); //申请数
                inventory = storage - application;
        }
        return inventory;
irene 发表于 2012-6-10 16:53:57 | 显示全部楼层
您好,statelabel是tlk_application表中的系统字段。表示节点所处的流程状态。

本版积分规则

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

GMT+8, 2026-8-13 03:08

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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