https://github.com/imactool/gjpzyx
应该是目前第一个比较完善的支持 管家婆 ERP、章鱼侠 ERP 的第三方扩展包了
https://github.com/imactool/gjpzyx
erp guangjiapo php
Last synced: about 1 year ago
JSON representation
应该是目前第一个比较完善的支持 管家婆 ERP、章鱼侠 ERP 的第三方扩展包了
- Host: GitHub
- URL: https://github.com/imactool/gjpzyx
- Owner: iMactool
- Created: 2020-11-25T03:05:49.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-22T09:13:09.000Z (over 4 years ago)
- Last Synced: 2024-05-20T02:43:21.305Z (about 2 years ago)
- Topics: erp, guangjiapo, php
- Language: PHP
- Homepage: https://imactool.github.io/gjpzyx/
- Size: 23.4 KB
- Stars: 12
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gjpzyx
管家婆ERP 管家婆章鱼侠API.
由于项目里需要用到管家婆或者章鱼侠作为第三方仓库支持,但是 Google、GitHub 一番发现一条都木有。
所以就自己造了一个。
应该是目前第一个比较完善的支持 管家婆 ERP、章鱼侠 ERP 的第三方扩展包了。
使用本扩展之前,请务必确认你已经在 [管家婆-章鱼侠](http://help.mygjp.com/pages/viewpage.action?pageId=48660739) 获取了接口调用权限!
[](//packagist.org/packages/imactool/gjpzyx) [](//packagist.org/packages/imactool/gjpzyx) [](//packagist.org/packages/imactool/gjpzyx) [](//packagist.org/packages/imactool/gjpzyx)
## Installing
```shell
$ composer require imactool/gjpzyx:dev-main -vvv
```
具体索要参数和返回参数请按产品文档查阅
管家婆ERP文档:[点我查看](http://help.mygjp.com/pages/viewpage.action?pageId=48660745)
章鱼侠ERP文档:[点我查看](http://help.zhangyuxia.com.cn/pages/viewpage.action?pageId=48660745)
## Usage
### 管家婆
- 初始化
```php
require './vendor/autoload.php';
use Imactool\Gjpzyx\Factory;
$config = [
'debug'=>false, //是否在测试环境下测试,线上必须设置 false
'appKey' => '',
'appSecret' => '',
'signKey' => '',
'token' => '',
'shopKey' => '',
//公司名称
'CompanyName'=>'',
//用户名
'UserId' => '',
//密码
'Password' => '',
'refreshToken' => '',
//线上登录获取授权认证码的地址
'loginUrl'=>'',
//线上接口调用的地址
'apiUrl'=>'http://ca.mygjp.com:8002/api/', //注意,需要 / 结尾
//线上章鱼侠云erp登录地址
'onlineLoginUrl'=>''
];
$app = Factory::Gjp($config);
如果是章鱼侠ERP
$app = Factory::Zyx($config);
其他调用方式都是一模一样
```
- querySaleQty() 批量获取ERP商品基本资料的库存信息
```php
$parsm = [
'numid'=>'324324324324',
'ktypeids'=>[154274961429839227,154274961429839299],
'iscalcsaleqty'=>true,
'pagesize'=>100,
'pageno' => 1
];
$productquery = $app->querySaleQty($parsm);
```
- pushStoreInfo() 上载门店信息
```php
$storeArr = [
'Id' =>1,
'storecode'=>'sdf',
'storename'=>'测试',
'storetype'=>3,
'image'=>'',
'storephonenumber'=>'18355522221',
'storeaddress'=>'门店地址'
];
$store = $app->pushStoreInfo($storeArr);
```
- pushOrderRefund() 售后单添加
```php
$refundOrder = [
'refundnumber' =>'1154654656151',
'tradeid'=>'123123151561561',
'refundcreatetime'=>'2017-07-11 11:11:11',
'refundtype'=>0,
'refundstatus'=>1,
'oid'=>'2345446546',
'qty'=>1,
'refundfee'=>100,
//...其他参数
];
$result = $app->pushOrderRefund($refundOrder);
```
## 管家婆API 列表
### 商品管理
- pushProduct() 宝贝上载
- queryProduct() 商品详情查询
### 订单交易
- pushOrder() 订单批量上载/更新接口
- queryOrderStatus() 查询订单处理状态
- querySaleOrder() 订单查询
### 售后场景
- pushOrderRefund() 售后单上载
- queryOrderRefund() 售后详情查询
### 库存管理
- queryQtyInfo() 仓库详情查询
- querySaleQty() 商品库存查询
- queryMoreSaleQty() 批量库存查询
### 全渠道场景/门店
- pushStoreInfo() 门店信息上载
----
分割线: 目前由于章鱼侠相关的测试接口无法正常使用。暂不支持。管家婆相关接口正常
----
##章鱼侠 API 列表
### 商品管理
- pushProduct() 宝贝上载
- queryProduct() 商品详情查询
### 订单交易
- pushOrder() 订单批量上载/更新接口
- queryOrderStatus() 查询订单处理状态
- querySaleOrder() 订单查询
### 售后场景
- pushOrderRefund() 售后单上载
- queryOrderRefund() 售后详情查询
### 库存管理
- queryQtyInfo() 仓库详情查询
- querySaleQty() 商品库存查询
- queryMoreSaleQty() 批量库存查询
### 全渠道场景/门店
- pushStoreInfo() 门店信息上载
TODO
- 目前参数没有做过滤处理
- 文档完善
- 代码完善
- tests
## Contributing
You can contribute in one of three ways:
1. File bug reports using the [issue tracker](https://github.com/imactool/gjpzyx/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/imactool/gjpzyx/issues).
3. Contribute new features or update the wiki.
_The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable._
## License
MIT