1、支持即时库存报表系统如下
- 云星空企业版
- 云星空sdk
- 云星空旗舰版
- 云星辰
- k3 (数据库)
- u8
- u8c
- u8api
- u9c (只支持数据库配置)
- t+ 畅捷通
2、检查crm授权:

3、添加即时库存报表配置文件内容:
(配置文件需配置账号信息及报表显示字段,根据erp类型不同配置存在差异具体如何配置的文档最后)
D:\ldcrm\www\crm\user_privileges\Config_ERP_Api.php 如果文件不存在则找到user_privileges/Config_ERP_Api_Default.php文件,复制它,文件命名为:Config_ERP_Api.php

4、设置显示菜单位置
在crm后台设置-网页端菜单定制 中将“金蝶库存查询(PC)” 设置到想要显示的菜单路径中
(“金蝶库存查询(PC)” 为预置的链接模块,显示标签名称可在后台设置-链接模块定制中进行修改)

5、配置文件中具体参数讲解
通用参数:
- static $productNoField = 'product_no'; // 与erp产品编号对应的crm字段名称
- static $stock_view = 'ERP'; //显示方式:CRM、ERP、CRM+ERP(产品和订单模块点击查库存后的选项)
- static $page_show = 'yes'; //是否分页 yes 是 no 否
- static $page_number = 100; //分页显示条目数
- static $search_view_rows = 3; //查询列 每行显示数
不同erp系统对应的特殊配置参数
-
云星空企业版(默认的即时库存查询报表-不包含可用量字段)
static $product_type = 'k3cloud';
static $api_url = 'http://******/k3cloud/'; //接口验证地址(需要/结束)
static $api_user = 'Administrator'; //用户名(需要有webapi 权限的账号 )
static $api_pwd = 'admin@123'; //密码
static $api_fromid = ''; //账套ID (erp账套ID需要在erp的webapi中查看
static $list_field = array(
'k3cloud' => array(
'FStockOrgId' => array('search'=>'yes','label'=>'组织','list'=>'yes','width'=>2),
'FMaterialId' => array('search'=>'yes','label'=>'物料编码','list'=>'yes','width'=>1),
'FMaterialName' => array('search'=>'yes','label'=>'物料名称','list'=>'yes','width'=>2),
'FModel' => array('search'=>'no','label'=>'规则型号','list'=>'yes','width'=>1),
'FStockName' => array('search'=>'no','label'=>'仓库名称','list'=>'yes','width'=>2),
'FLot' => array('search'=>'no','label'=>'批号','list'=>'yes','width'=>1),
'FProduceDate' => array('search'=>'no','label'=>'生产日期','list'=>'no','width'=>1),
'FBaseUnitId' => array('search'=>'no','label'=>'基本单位','list'=>'yes','width'=>1),
'FStockStatusId' => array('search'=>'yes','label'=>'库存状态','list'=>'yes','width'=>1),
'FBaseQty' => array('search'=>'no','label'=>'库存数量','list'=>'yes','width'=>1),
'FAVBQty' => array('search'=>'no','label'=>'可用数量','list'=>'yes','width'=>1),
),
);
'FStockOrgId' => array('search'=>'yes','label'=>'组织','list'=>'yes','width'=>2), 以这一行配置为例解释参数含义:
'FStockOrgId':云星空webapi中即时库存明细报表支持查询的字段名
'search'=>'yes' :yes表示该字段作为报表查询的条件,no表示只作为显示项
'label'=>'组织' :crm即时库存报表显示列名
'width'=>1:crm即时库存报表显示宽度
报表可以作为查询和显示的字段参考webapi,即时库存明细报表中的字段
-
云星空企业版(可以查询可用量版)
static $product_type = 'k3cloud2';
static $api_url = 'http://******/k3cloud/'; //接口验证地址(需要/结束)
static $api_user = 'Administrator'; //用户名(需要有webapi 权限的账号 )
static $api_pwd = 'admin@123'; //密码
static $api_fromid = ''; //账套ID (erp账套ID需要在erp的webapi中查看)
static $list_field = array(
'k3cloud2' => array(
"searchParams" => [
'fstockorgnumbers' => ["label" => "组织编码", "required" => "no", "type" => "select", "show" => 'yes', "optionsAllShow" => 'yes', 'width' => 1],
'fmaterialnumbers' => ["label" => "物料编码", "required" => "no", "type" => "like", "show" => 'yes', 'width' => 1],
'fstocknumbers' => ["label" => "仓库名称", "required" => "no", "type" => "like", "show" => 'yes', 'width' => 1],
'flotnumbers' => ["label" => "批号编码", "required" => "no", "type" => "like", "show" => 'no', 'width' => 1],
'isshowstockloc' => ["label" => "查询仓位", "required" => "no", "type" => "radio", "show" => 'no', 'decription' => '查询仓位对性能有影响', 'width' => 1],
'isshowauxprop' => ["label" => "查询辅助属性", "required" => "no", "type" => "radio", "show" => 'no', 'decription' => '查询辅助属性对性能有影响', 'width' => 1],
'isshowzeroinv' => ["label" => "显示零库存", "required" => "no", "type" => "radio", "show" => 'no', 'decription' => '查询辅助属性对性能有影响', 'width' => 1],
],
"returnParams" => [
'FSTOCKORGID' => ["label" => "库存组织ID", "show" => 'no', 'width' => 1],
'FSTOCKORGNUMBER' => ["label" => "库存组织编码", "show" => 'no', 'width' => 1],
'FSTOCKORGNAME' => ["label" => "库存组织名称", "show" => 'no', 'width' => 1],
'FKEEPERTYPEID' => ["label" => "保管者类型", "show" => 'no', 'width' => 1],
'FKEEPERID' => ["label" => "保管者", "show" => 'no', 'width' => 1],
'FKEEPERNUMBER' => ["label" => "保管者编码", "show" => 'no', 'width' => 1],
'FKEEPERNAME' => ["label" => "保管者名称", "show" => 'no', 'width' => 1],
'FOWNERTYPEID' => ["label" => "货主类型", "show" => 'no', 'width' => 1],
'FOWNERID' => ["label" => "货主ID", "show" => 'no', 'width' => 1],
'FOWNERNUMBER' => ["label" => "货主编码", "show" => 'no', 'width' => 1],
'FOWNERNAME' => ["label" => "货主名称", "show" => 'yes', 'width' => 2],
'FSTOCKID' => ["label" => "仓库ID", "show" => 'no', 'width' => 1],
'FSTOCKNUMBER' => ["label" => "仓库编码", "show" => 'no', 'width' => 1],
'FSTOCKNAME' => ["label" => "仓库名称", "show" => 'yes', 'width' => 1],
'FSTOCKLOCID' => ["label" => "仓位ID", "show" => 'no', 'width' => 1],
'FSTOCKLOC' => ["label" => "仓位编码及名称", "show" => 'no', 'width' => 1],
'FAUXPROPID' => ["label" => "辅助属性ID", "show" => 'no', 'width' => 1],
'FAUXPROP' => ["label" => "辅助属性", "show" => 'no', 'width' => 1],
'FSTOCKSTATUSID' => ["label" => "库存状态ID", "show" => 'no', 'width' => 1],
'FLOT' => ["label" => "批号ID", "show" => 'no', 'width' => 1],
'FLOTNUMBER' => ["label" => "批号编码", "show" => 'yes', 'width' => 1],
'FBASEUNITID' => ["label" => "基本单位ID", "show" => 'no', 'width' => 1],
'FBASEUNITNUMBER' => ["label" => "基本单位编码", "show" => 'no', 'width' => 1],
'FBASEUNITNAME' => ["label" => "基本单位名称", "show" => 'yes', 'width' => 1],
'FBASEQTY' => ["label" => "基本单位数量", "show" => 'yes', 'width' => 1],
'FBASELOCKQTY' => ["label" => "锁库数量(基本单位)", "show" => 'yes', 'width' => 1],
'FSECQTY' => ["label" => "辅单位数量", "show" => 'no', 'width' => 1],
'FSECLOCKQTY' => ["label" => "锁库数量(辅单位)", "show" => 'no', 'width' => 1],
'FSTOCKUNITID' => ["label" => "库存单位", "show" => 'no', 'width' => 1],
'FSTOCKUNITNUMBER' => ["label" => "库存单位编码", "show" => 'no', 'width' => 1],
'FSTOCKUNITNAME' => ["label" => "库存单位名称", "show" => 'yes', 'width' => 1],
'FMATERIALID' => ["label" => "物料內码", "show" => 'no', 'width' => 1],
'FMATERIALNUMBER' => ["label" => "物料编码", "show" => 'yes', 'width' => 1],
'FMATERIALNAME' => ["label" => "物料名称", "show" => 'no', 'width' => 1],
'FQTY' => ["label" => "库存数量", "show" => 'yes', 'width' => 1],
'FLOCKQTY' => ["label" => "锁库数量", "show" => 'yes', 'width' => 1],
'FSECUNITID' => ["label" => "辅单位", "show" => 'no', 'width' => 1],
'FSECUNITNUMBER' => ["label" => "辅单位编码", "show" => 'no', 'width' => 1],
'FSECUNITNAME' => ["label" => "辅单位名称", "show" => 'no', 'width' => 1],
'FBASEAVBQTY' => ["label" => "可用量(基本单位)", "show" => 'yes', 'width' => 1],
'FAVBQty' => ["label" => "可用量(主单位)", "show" => 'no', 'width' => 1],
'FSECAVBQTY' => ["label" => "可用量(库存辅单位)", "show" => 'yes', 'width' => 1],
]
),
);
"searchParams" => [] : "show" => 'yes' 的是作为筛选条件的字段,='no' 的是隐藏的不生效字段
"returnParams" => [] : "show" => 'yes' 的是crm库存报表中显示的字段,='no' 的是隐藏的不生效字段
上述参数中的字段即为改报表可以设置的所有字段
-
云星空旗舰版
static $product_type = 'k3cloudflagship'; //产品类型
static $api_url = 'https://******.com/'; //接口验证地址
static $client_id = 'ldcrm';//第三方应用-系统编码
static $client_secret = 'tBl72HZdwALuGYyTUtk';//第三方应用-accesstoken秘钥
static $username = 'admin';//创建第三方应用的账号
static $accountId = '21674898';//数据中心id
static $language = 'zh_CN';//默认值
static $identity = 'djF8MTk2N2JhMjRhOTUwMmRmNjdh';//第三方应用-x-acgw-identity
static $custom2 = 'crm';//开发商标识
static $list_field = array(
'k3cloudflagship' => array(
"searchParams" => [
'org' => ["label" => "组织", "required" => "no", "type" => "select", "show" => 'yes',
"options" => array(
['id' => '00', 'name' => 'A公司'],
['id' => '01', 'name' => 'B公司'],
['id' => '02', 'name' => 'C公司']
), "optionsAllShow" => 'no', 'width' => 1],
'warehouse' => ["label" => "仓库", "required" => "no", "type" => "select", "show" => 'yes', 'width' => 1],
'material' => ["label" => "物料编码", "required" => "no", "type" => "like", "show" => 'yes', 'width' => 1],
'lotnum' => ["label" => "批号", "required" => "no", "type" => "text", "show" => 'yes', 'width' => 1],
],
"returnParams" => [
'org.name' => ["label" => "组织名称", "show" => 'yes', 'width' => 1],
'org.number' => ["label" => "库存组织编码", "show" => 'no', 'width' => 1],
'material.number' => ["label" => "物料编码", "show" => 'yes', 'width' => 1],
'material.name' => ["label" => "物料名称", "show" => 'yes', 'width' => 1],
'material.modelnum' => ["label" => "物料型号", "show" => 'no', 'width' => 1],
'lotnum' => ["label" => "批号", "show" => 'yes', 'width' => 1],
'producedate' => ["label" => "生成日期", "show" => 'no', 'width' => 1],
'expirydate' => ["label" => "有效期至", "show" => 'no', 'width' => 1],
'unit.name' => ["label" => "库存单位", "show" => 'no', 'width' => 1],
'qty' => ["label" => "库存数量", "show" => 'yes', 'width' => 1, 'count' => 'yes'],
'baseunit.name' => ["label" => "基础单位", "show" => 'yes', 'width' => 1],
'baseqty' => ["label" => "可用基本数量", "show" => 'no', 'width' => 1],
'warehouse.number' => ["label" => "仓库编码", "show" => 'no', 'width' => 1],
'warehouse.name' => ["label" => "仓库名称", "show" => 'yes', 'width' => 1],
'location.number' => ["label" => "仓位编码", "show" => 'no', 'width' => 1],
'location.name' => ["label" => "仓位名称", "show" => 'no', 'width' => 1],
'invstatus.name' => ["label" => "库存状态", "show" => 'no', 'width' => 1],
'invtype.name' => ["label" => "库存类型", "show" => 'no', 'width' => 1],
'ownertype' => ["label" => "业务组织", "show" => 'no', 'width' => 1],
'owner.name' => ["label" => "业务组织名称", "show" => 'no', 'width' => 1],
'keepertype' => ["label" => "库存组织", "show" => 'no', 'width' => 1],
'keeper.name' => ["label" => "库存组织名称", "show" => 'no', 'width' => 1],
'avbbaseqty' => ["label" => "可用基础单位数量", "show" => 'no', 'width' => 1],
'avbqty' => ["label" => "可用库存单位数量", "show" => 'yes', 'width' => 1, 'count' => 'yes'],
'lockbaseqty' => ["label" => "预留基础单位数量", "show" => 'no', 'width' => 1, 'count' => 'yes'],
'lockqty' => ["label" => "预留库存单位数量", "show" => 'yes', 'width' => 1, 'count' => 'yes'],
],
)
);
"searchParams" => [] : "show" => 'yes' 的是作为筛选条件的字段,='no' 的是隐藏的不生效字段
"returnParams" => [] : "show" => 'yes' 的是crm库存报表中显示的字段,='no' 的是隐藏的不生效字段
-
云星辰
static $product_type = 'jdyisv2'; // 产品类型
static $app_key = 'wsS11mmg'; //应用appkey
static $list_field = array(
'jdyisv2' => array(
"searchParams" => [
'filter_material_id' => ["label" => "商品名称", "required" => "no", "type" => "like", "show" => 'yes', 'width' => 1],
'filter_material_model' => ["label" => "规格型号", "required" => "no", "type" => "like", "show" => 'no', 'width' => 1],
'filter_stock_id' => ["label" => "仓库", "required" => "no", "type" => "select", "show" => 'yes', 'width' => 1],
'search' => ["label" => "仓位", "required" => "no", "type" => "radio", "show" => 'no', 'decription' => '查询仓位对性能有影响', 'width' => 1],
'show_aux_prop_id' => ["label" => "是否显示辅助属性", "required" => "no", "type" => "radio", "show" => 'no', 'decription' => '查询辅助属性对性能有影响', 'width' => 1],
'isshowzeroinv' => ["label" => "是否显示零库存", "required" => "no", "type" => "radio", "show" => 'no', 'decription' => '', 'width' => 1],
'show_forbidden' => ["label" => "是否显示禁用商品", "required" => "no", "type" => "radio", "show" => 'no', 'decription' => '', 'width' => 1],
],
"returnParams" => [
'material_number' => ["label" => "商品编码", "show" => 'yes', 'width' => 3],
'material_name' => ["label" => "商品名称", "show" => 'yes', 'width' => 7],
'material_model' => ["label" => "规格型号", "show" => 'yes', 'width' => 3],
'material_help_code' => ["label" => "助记码", "show" => 'yes', 'width' => 3],
'material_brand_name' => ["label" => "商品品牌", "show" => 'yes', 'width' => 3],
'material_category_name' => ["label" => "商品类别", "show" => 'yes', 'width' => 3],
'stockid_name' => ["label" => "仓库名称", "show" => 'yes', 'width' => 3],
'aux_prop_name' => ["label" => "辅助属性名称", "show" => 'yes', 'width' => 3],
'aux_qty' => ["label" => "即时库存(辅助单位)", "show" => 'yes', 'width' => 3],
'aux_unit_name' => ["label" => "辅助单位名称", "show" => 'no', 'width' => 3],
'batch_no' => ["label" => "批次", "show" => 'no', 'width' => 3],
'cost' => ["label" => "成本", "show" => 'no', 'width' => 3],
'qty' => ["label" => "即时库存(基本单位)", "show" => 'yes', 'width' => 3],
'valid_qty' => ["label" => "可用库存(基本单位)", "show" => 'yes', 'width' => 3],
]
)
);
"searchParams" => [] : "show" => 'yes' 的是作为筛选条件的字段,='no' 的是隐藏的不生效字段
"returnParams" => [] : "show" => 'yes' 的是crm库存报表中显示的字段,='no' 的是隐藏的不生效字段
-
k3
static $product_type = 'k3'; //产品类型static $sql_deassign = 'yes';static $db_server = '192.168.10.1'; //数据库地址 127.0.0.1,1344static $db_username = 'CRMERP'; //用户名static $db_password = 'Crm#20250'; //密码static $db_name = 'master'; //数据库名称*/static $list_field = array('k3' => array('fnumber' => array('search' => 'yes', 'label' => '物料编码', 'list' => 'yes', 'width' => 1, 'table' => 't_icitem'),'fname' => array('search' => 'yes', 'label' => '物料名称', 'list' => 'yes', 'width' => 2, 'table' => 't_icitem'),'fmodel' => array('search' => 'yes', 'label' => '规格型号', 'list' => 'yes', 'width' => 2, 'table' => 't_icitem'),'fstockid' => array('search' => 'no', 'label' => '仓库名称', 'list' => 'yes', 'width' => 2, 'table' => 'icinventory', 'targettable' => 't_stock', 'targettableField' => 'fname', 'options' => array(array('id' => 3764, 'name' => 'A仓')), 'selected' => array('id' => 3764, 'name' => 'A仓')),'fstockplaceid' => array('search' => 'no', 'label' => '仓位', 'list' => 'yes', 'width' => 2, 'table' => 'icinventory', 'targettable' => 't_stockplace', 'targettableField' => 'fname'),'fbatchno' => array('search' => 'no', 'label' => '批号', 'list' => 'yes', 'width' => 1, 'table' => 'icinventory'),'funitid' => array('search' => 'no', 'label' => '基本单位', 'list' => 'yes', 'width' => 1, 'table' => 't_icitem', 'targettable' => 't_measureunit', 'targettableField' => 'fname'),'fqty' => array('search' => 'no', 'label' => '库存数量', 'list' => 'yes', 'width' => 1, 'table' => 'icinventory'),'fqtylock' => array('search' => 'no', 'label' => '锁库数量', 'list' => 'yes', 'width' => 1, 'table' => 'icinventory'),));
-
u8
static $product_type = 'u8'; //产品类型static $sql_deassign = 'yes';static $db_server = '192.168.10.1'; //数据库地址 127.0.0.1,1344static $db_username = 'CRMERP'; //用户名static $db_password = 'Crm#20250'; //密码static $db_name = 'master'; //数据库名称*/static $list_field = array('u8' => array('database' => array('search' => 'yes', 'label' => '账套', 'list' => 'yes', 'width' => 1,"options" => array(['id' => '1', 'name' => '账套1'],['id' => '2', 'name' => '账套2'],)),'cinvcode' => array('search' => 'yes', 'label' => '物料编码', 'list' => 'yes', 'width' => 1, 'table' => 'Inventory'),'cinvname' => array('search' => 'yes', 'label' => '物料名称', 'list' => 'yes', 'width' => 2, 'table' => 'Inventory'),'cwhname' => array('search' => 'yes', 'label' => '仓库名称', 'list' => 'yes', 'width' => 2, 'table' => 'Warehouse'),'cwhcode' => array('search' => 'no', 'label' => '仓库编码', 'list' => 'yes', 'width' => 2, 'table' => 'Warehouse'),'iquantity' => array('search' => 'no', 'label' => '库存数量', 'list' => 'yes', 'width' => 1, 'table' => 'v_ST_currentstockForReport'),'foutquantity' => array('search' => 'no', 'label' => '待发货数量', 'list' => 'yes', 'width' => 1, 'table' => 'v_ST_currentstockForReport'),'finquantity' => array('search' => 'no', 'label' => '待入库数量', 'list' => 'yes', 'width' => 1, 'table' => 'v_ST_currentstockForReport'),));
-
u8c
static $product_type = 'u8c'; //产品类型static $api_url = 'http://192.168.120.111:8099/u8cloud/'; //接口验证地址static $usercode = 'CRM01'; //用户名static $password = '95d98d529ee4b7b25f7861495deee63b'; //密码static $system = 'ERP01'; //账套ID//u8c的接口库存组织 选填 所以这里需要指定一个字段。 字段类型最好为下拉框 字段值为组织名称//影响在单据创建的时候查询库存信息Static $calbodyField = 'cf_8117';static $list_field = array('u8c' => array("searchParams" => ["calbody" => [//必填"label" => "库存组织","required" => "yes","show" => 'yes',"options" => array(['id' => '1001', 'name' => 'A有限公司'],['id' => '1002', 'name' => 'B有限公司'],['id' => '1003', 'name' => 'C有限公司'],),"optionsAllShow" => 'yes'],"corp" => [ //必填"label" => "公司","required" => "no","show" => 'yes',"options" => array(['id' => '1001', 'name' => 'A有限公司'],['id' => '1002', 'name' => 'B有限公司'],['id' => '1003', 'name' => 'C有限公司'],),"optionsAllShow" => 'yes'],"inventory" => ["label" => "存货","required" => "no","show" => 'yes'],"batchcode" => ["label" => "批次号","required" => "no","show" => 'no'],"space" => ["label" => "货位","required" => "no","show" => 'no'],"vendor" => ["label" => "供应商","required" => "no","show" => 'no'],"warehouse" => ["label" => "仓库","required" => "no","show" => 'no'],],"returnParams" => ["corp_name" => ["label" => "公司名称","width" => '2',"show" => 'yes'],"ccalbody_name" => ["label" => "库存组织","width" => '2',"show" => 'yes'],"cinventory_code" => ["label" => "存货编码","width" => '1',"show" => 'yes'],"cinventory_name" => ["label" => "存货名称","width" => '2',"show" => 'yes'],"cinventoryid" => ["label" => "存货","width" => '1',"show" => 'no'],"corp_code" => ["label" => "公司编码","width" => '1',"show" => 'no'],"cspace_name" => ["label" => "货位编码","width" => '1',"show" => 'yes'],"cvendorid" => ["label" => "供应商","width" => '1',"show" => 'no'],"cwarehouse_code" => ["label" => "仓库编码","width" => '1',"show" => 'no'],"cwarehouse_name" => ["label" => "仓库名称","width" => '1',"show" => 'yes'],"cwarehouseid" => ["label" => "仓库","width" => '1',"show" => 'no'],"dproducedate" => ["label" => "生产日期","width" => '1',"memo" => "V5.1开始支持","show" => 'no'],"dvalidate" => ["label" => "失效日期","width" => '1',"memo" => "V5.1开始支持","show" => 'no'],"hsl" => ["label" => "换算率","width" => '1',"show" => 'no'],"nastnum" => ["label" => "辅数量","width" => '1',"show" => 'no'],"nfreezenum" => ["label" => "冻结量","width" => '1',"show" => 'yes'],"nnum" => ["label" => "数量","width" => '1',"show" => 'yes'],"pk_corp" => ["label" => "公司","width" => '1',"show" => 'no'],"vbatchcode" => ["label" => "SN","width" => '1',"show" => 'yes'],"vfree1" => ["label" => "故障描述","width" => '1',"show" => 'yes'],"vfree2" => ["label" => "整机备件机","width" => '1',"show" => 'yes'],"vfree3" => ["label" => "设备等级","width" => '1',"show" => 'yes'],],));
"searchParams" => [] : "show" => 'yes' 的是作为筛选条件的字段,='no' 的是隐藏的不生效字段
"returnParams" => [] : "show" => 'yes' 的是crm库存报表中显示的字段,='no' 的是隐藏的不生效字段
-
u8api
(需要先创建应用,参考文档:https://open.yonyouup.com/documentCenter/createFirstApp )
static $product_type = 'u8api';//产品类型static $from_account = 'sg';//调用方id -开通应用是时使用的u8账号static $to_account = 'sg1';//提供方idstatic $appkey = 'opae6';static $appsecret = '2f7583';static $list_field = array('u8api' => array("searchParams" => ['invcode_begin' => ["label" => "起始存货编码", "required" => "no", "type" => "text", "show" => 'yes', 'decription' => '', 'width' => 1],'invcode_end' => ["label" => "结束存货编码", "required" => "no", "type" => "text", "show" => 'yes', 'decription' => '', 'width' => 1],'invname' => ["label" => "存货名称关键字", "required" => "no", "type" => "text", "show" => 'yes', 'decription' => '', 'width' => 1],'whname' => ["label" => "仓库名称关键字", "required" => "no", "type" => "text", "show" => 'yes', 'width' => 1],'batch' => ["label" => "批号", "required" => "no", "type" => "text", "show" => 'yes', 'decription' => '', 'width' => 1],],"returnParams" => ['invcode' => ["label" => "存货编码", "show" => 'yes', 'width' => 1],'invname' => ["label" => "存货名称", "show" => 'yes', 'width' => 3],'invstd' => ["label" => "规格型号", "show" => 'yes', 'width' => 1],'invccode' => ["label" => "存货分类代码", "show" => 'yes', 'width' => 1],'invcname' => ["label" => "存货分类名称", "show" => 'yes', 'width' => 1],'whcode' => ["label" => "仓库编码", "show" => 'yes', 'width' => 1],'whname' => ["label" => "仓库名称", "show" => 'yes', 'width' => 1],'batch' => ["label" => "批号", "show" => 'yes', 'width' => 1],'qty' => ["label" => "到货/在检数量", "show" => 'yes', 'width' => 1],'inqty' => ["label" => "其中冻结数量", "show" => 'no', 'width' => 1],'transinqty' => ["label" => "调拨在途数量", "show" => 'no', 'width' => 1],'inqtysum' => ["label" => "预计入库数量合计", "show" => 'no', 'width' => 1],'outqty' => ["label" => "待发货数量", "show" => 'yes', 'width' => 1],'availqty' => ["label" => "可用数量", "show" => 'yes', 'width' => 1],]));
"searchParams" => [] : "show" => 'yes' 的是作为筛选条件的字段,='no' 的是隐藏的不生效字段
"returnParams" => [] : "show" => 'yes' 的是crm库存报表中显示的字段,='no' 的是隐藏的不生效字段
报表可以设置的筛选条件和显示字段参考文档:https://open.yonyouup.com/apiCenter/currentstock_batch_get
想要添加自定义条件或者显示字段参考文档:https://www.yuque.com/huhy/bomwzg/cba4lpmhek9fey7u
-
u9c (只支持数据库配置)
static $product_type = 'u9c';//产品类型static $sql_deassign = 'yes';static $db_server = '192.168.0.1'; //数据库地址 127.0.0.1,1344static $db_username = 'CRM'; //用户名static $db_password = 'B8'; //密码static $db_name = 'AIS20S'; //数据库名称static $list_field = array('u9c' => array('ItemOwnOrg' => array('search' => 'yes', 'label' => '所属组织', 'list' => 'yes', 'width' => 2, 'table' => 'InvTrans_WhQoh', 'targettable' => 'Base_Organization_trl', 'targettableField' => 'name'),'wh' => array('search' => 'yes', 'label' => '仓库名称', 'list' => 'yes', 'width' => 1, 'table' => 'InvTrans_WhQoh', 'targettable' => 'cbo_wh_trl', 'targettableField' => 'name'),'ItemInfo_ItemCode' => array('search' => 'yes', 'label' => '物料编码', 'list' => 'yes', 'width' => 1, 'table' => 'InvTrans_WhQoh'),'ItemInfo_ItemName' => array('search' => 'yes', 'label' => '物料名称', 'list' => 'yes', 'width' => 2, 'table' => 'InvTrans_WhQoh'),'StoreBaseUOM' => array('search' => 'no', 'label' => '单位', 'list' => 'yes', 'width' => 2, 'table' => 'InvTrans_WhQoh', 'targettable' => 'Base_UOM_Trl', 'targettableField' => 'name'),'StoreQty' => array('search' => 'no', 'label' => '库存数量', 'list' => 'yes', 'width' => 1, 'table' => 'InvTrans_WhQoh'),'ResvStQty' => array('search' => 'no', 'label' => '占用数量', 'list' => 'yes', 'width' => 1, 'table' => 'InvTrans_WhQoh'),),);
"searchParams" => [] : "show" => 'yes' 的是作为筛选条件的字段,='no' 的是隐藏的不生效字段
"returnParams" => [] : "show" => 'yes' 的是crm库存报表中显示的字段,='no' 的是隐藏的不生效字段
-
t+ 畅捷通
static $product_type = 'tcloudnew';//产品类型static $crmUrl = 'https://crm.81mis.com/kh11314/'; //crm外网地址static $link2erpUrl = 'http://new.lianjieerp.com/'; //链接erp地址带斜杠static $list_field = array('tcloudnew' => array('WarehouseName' => array('search' => 'yes', 'label' => '仓库名称', 'list' => 'yes', 'width' => 1,"options" => array(array('id' => '01', 'name' => '主仓库'),// ID 为仓库编码),),'WarehouseCode' => array('search' => 'no', 'label' => '仓库编码', 'list' => 'yes', 'width' => 2),'InventoryCode' => array('search' => 'yes', 'label' => '存货编码', 'list' => 'yes', 'width' => 2),'InventoryName' => array('search' => 'yes', 'label' => '存货名称', 'list' => 'yes', 'width' => 2),'Specification' => array('search' => 'yes', 'label' => '规格型号', 'list' => 'yes', 'width' => 2),'UnitName' => array('search' => 'no', 'label' => '计量单位名称', 'list' => 'yes', 'width' => 2),'Brand' => array('search' => 'no', 'label' => '品牌', 'list' => 'yes', 'width' => 2),'AvailableQuantity' => array('search' => 'no', 'label' => '可用量', 'list' => 'yes', 'width' => 2),'ExistingQuantity' => array('search' => 'no', 'label' => '现存量', 'list' => 'yes', 'width' => 2),));