...
|
...
|
@@ -318,83 +318,6 @@ class GuanYiCloud extends Api |
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 获取采购订单
|
|
|
function getPurchase()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.purchase.get';
|
|
|
$data['page_no'] = '1';
|
|
|
$data['page_size'] = '10';
|
|
|
$data['code'] = 'PO4298914535';
|
|
|
$data['status'] = '0';
|
|
|
// $data['start_create_date'] = '2015-07-03 15:51:01';
|
|
|
// $data['end_create_date'] = 'PO4298914535';
|
|
|
// $data['start_approve_date'] = '2015-07-03 15:51:32';
|
|
|
// $data['end_approve_date'] = '2015-07-16 17:52:05';
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
$this->success('成功', json_decode($this->mycurl(URL, $data)));
|
|
|
}
|
|
|
|
|
|
// 获取采购入库单
|
|
|
function getPurchaseArrives()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.purchase.arrive.get';
|
|
|
$data['page_no'] = '1';
|
|
|
$data['page_size'] = '10';
|
|
|
$data['code'] = 'PAO451284351';
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
$this->success('成功', json_decode($this->mycurl(URL, $data)));
|
|
|
}
|
|
|
|
|
|
// 获取采购退货单
|
|
|
function getPurchaseReturns()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.purchase.return.get';
|
|
|
$data['page_no'] = '1';
|
|
|
$data['page_size'] = '10';
|
|
|
// $data['warehouse_code'] = 'ck02';
|
|
|
// $data['code'] = 'PAO451284351';
|
|
|
$data['status'] = 1;
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
$this->success('成功', json_decode($this->mycurl(URL, $data)));
|
|
|
}
|
|
|
|
|
|
// 获取盘点单
|
|
|
function getStockcounts()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.stock.count.get';
|
|
|
$data['page_no'] = '1';
|
|
|
$data['page_size'] = '10';
|
|
|
// $data['code'] = 'WCO7171989147';
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
$this->success('成功', json_decode($this->mycurl(URL, $data)));
|
|
|
}
|
|
|
|
|
|
// 获取调拨单
|
|
|
function getStockTransfers()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.stock.transfer.get';
|
|
|
$data['page_no'] = '1';
|
|
|
$data['page_size'] = '10';
|
|
|
// $data['code'] = 'WTO4244996172';
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
$this->success('成功', json_decode($this->mycurl(URL, $data)));
|
|
|
}
|
|
|
|
|
|
// 获取退换货单
|
|
|
function getTradeReturns()
|
|
|
{
|
...
|
...
|
@@ -415,34 +338,6 @@ class GuanYiCloud extends Api |
|
|
$this->success('成功', json_decode($this->mycurl(URL, $data)));
|
|
|
}
|
|
|
|
|
|
// 新增盘点单
|
|
|
function addInventory()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.stock.count.add';
|
|
|
$data['type_code'] = '003';
|
|
|
$data['warehouse_code'] = 'CK01';
|
|
|
$data['note'] = 'test inventory..';
|
|
|
$details = array();
|
|
|
$details[] = array(
|
|
|
'item_code' => 'TTTT',
|
|
|
// 'sku_code' => '红色 S',
|
|
|
'qty' => 1,
|
|
|
'note' => 'good1'
|
|
|
);
|
|
|
// $details[] = array(
|
|
|
// 'item_code' => 'TTTT',
|
|
|
// // 'sku_code' => '红色 S',
|
|
|
// 'qty' => 1,
|
|
|
// 'note' => 'good1'
|
|
|
// );
|
|
|
$data['details'] = $details;
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
//新增订单
|
|
|
function addOrder()
|
|
|
{
|
...
|
...
|
@@ -639,203 +534,6 @@ class GuanYiCloud extends Api |
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 新增调整单
|
|
|
function addAdjust()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.stock.adjust.add';
|
|
|
$data['warehouse_code'] = 'CK02';
|
|
|
$data['order_type'] = '001';
|
|
|
$data['note'] = '001';
|
|
|
$data['operator'] = 'xiaozhang';
|
|
|
$detailList = array();
|
|
|
$detailList[] = array(
|
|
|
'item_code' => 'test',
|
|
|
'sku_code' => 'test',
|
|
|
'qty' => 2,
|
|
|
'note' => 'good1!@#$%'
|
|
|
);
|
|
|
// $detailList[] = array(
|
|
|
// 'item_code' => 'test',
|
|
|
// 'sku_code' => 'test',
|
|
|
// 'qty' => 2,
|
|
|
// 'note' => 'good1!@#$%'
|
|
|
// );
|
|
|
$data['detailList'] = $detailList;
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 新增调拨单
|
|
|
function addTransfer()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.stock.transfer.add';
|
|
|
$data['warehouse_in_code'] = 'ck01';
|
|
|
$data['warehouse_out_code'] = 'ck02';
|
|
|
$data['order_type'] = '01';
|
|
|
$data['note'] = '001';
|
|
|
// $data['operator'] = 'xiaozhang';
|
|
|
$detailList = array();
|
|
|
$detailList[] = array(
|
|
|
'item_code' => 'test',
|
|
|
'sku_code' => 'test',
|
|
|
'qty' => 2,
|
|
|
'note' => 'good1!@#$%'
|
|
|
);
|
|
|
// $detailList[] = array(
|
|
|
// 'item_code' => 'test',
|
|
|
// 'sku_code' => 'test',
|
|
|
// 'qty' => 2,
|
|
|
// 'note' => 'good1!@#$%'
|
|
|
// );
|
|
|
$data['detailList'] = $detailList;
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 新增采购入库单
|
|
|
function addPurchaseArrive()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.purchase.arrive.add';
|
|
|
$data['warehouse_code'] = 'ck01';
|
|
|
$data['supplier_code'] = '001';
|
|
|
$data['order_type'] = '01';
|
|
|
$data['purchase_code'] = 'PO14971849911';
|
|
|
// $data['note'] = 'test..';
|
|
|
$detailList = array();
|
|
|
$detailList[] = array(
|
|
|
'item_code' => 'test',
|
|
|
'sku_code' => 'test',
|
|
|
'qty' => 2,
|
|
|
'price' => '50000',
|
|
|
'note' => 'good1!@#$%'
|
|
|
);
|
|
|
// $detailList[] = array(
|
|
|
// 'item_code' => 'test',
|
|
|
// 'sku_code' => 'test',
|
|
|
// 'qty' => 2,
|
|
|
// 'price' => '50000',
|
|
|
// 'note' => 'good1!@#$%'
|
|
|
// );
|
|
|
$data['detailList'] = $detailList;
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 新增采购入库单(新)
|
|
|
function addnewPurchaseArrive()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.new.purchase.arrive.add';
|
|
|
$data['warehouse_code'] = 'ck01';
|
|
|
$data['supplier_code'] = '001';
|
|
|
$data['order_type'] = '001';
|
|
|
$data['purchase_code'] = 'PO14971849911';
|
|
|
$data['ex_cost'] = '70';
|
|
|
// $data['note'] = 'test..';
|
|
|
$detaillist = array();
|
|
|
$detaillist[] = array(
|
|
|
'barcode' => '185632165',
|
|
|
'qty' => 2,
|
|
|
'price' => '50000',
|
|
|
'note' => 'good1!@#$%'
|
|
|
);
|
|
|
// $detaillist[] = array(
|
|
|
// 'barcode' => 'test',
|
|
|
// 'qty' => 2,
|
|
|
// 'price' => '50000',
|
|
|
// 'note' => 'good1!@#$%'
|
|
|
// );
|
|
|
$data['detail_list'] = $detaillist;
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 采购入库单审核
|
|
|
function addnewPurchaseArriveapprove()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.new.purchase.arrive.approve';
|
|
|
$data['code'] = 'PAO11588070248';
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 采购入库单修改
|
|
|
function addPurchaseArriveupdate()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.purchase.arrive.update';
|
|
|
$data['code'] = 'PAO7820587793';
|
|
|
$data['type_code'] = '001';
|
|
|
$data['warehouse_code'] = 'ck01';
|
|
|
$data['note'] = 'test..';
|
|
|
$item_detail = array();
|
|
|
$item_detail[] = array(
|
|
|
'barcode' => '185632165',
|
|
|
'qty' => 2,
|
|
|
'origin_price' => '50000',
|
|
|
'price' => '50000',
|
|
|
'note' => 'good1!@#$%'
|
|
|
);
|
|
|
// $item_detail[] = array(
|
|
|
// 'barcode' => '185632165',
|
|
|
// 'qty' => 2,
|
|
|
// 'origin_price' => '50000',
|
|
|
// 'price' => '50000',
|
|
|
// 'note' => 'good1!@#$%'
|
|
|
// );
|
|
|
$data['item_detail'] = $item_detail;
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 采购退货单新增
|
|
|
function addPurchasereturn()
|
|
|
{
|
|
|
$data = array();
|
|
|
$data['appkey'] = APPKEY;
|
|
|
$data['sessionkey'] = SESSIONKEY;
|
|
|
$data['method'] = 'gy.erp.purchase.return.add';
|
|
|
$data['warehouse_code'] = 'ck01';
|
|
|
$data['supplier_code'] = '001';
|
|
|
$data['type_code'] = '001';
|
|
|
$data['ex_cost'] = '70';
|
|
|
$data['note'] = 'test..';
|
|
|
$detail_list = array();
|
|
|
$detail_list[] = array(
|
|
|
'item_code' => 'dt',
|
|
|
'sku_code' => 'dt01',
|
|
|
'qty' => 2,
|
|
|
'price' => '50000',
|
|
|
'note' => 'good1!@#$%'
|
|
|
);
|
|
|
// $detail_list[] = array(
|
|
|
// 'item_code' => 'dt',
|
|
|
// 'sku_code' => 'dt01',
|
|
|
// 'qty' => 2,
|
|
|
// 'price' => '50000',
|
|
|
// 'note' => 'good1!@#$%'
|
|
|
// );
|
|
|
$data['detail_list'] = $detail_list;
|
|
|
$data['sign'] = $this->sign($data, SECRET);
|
|
|
echo 'response: ' . $this->mycurl(URL, $data);
|
|
|
}
|
|
|
|
|
|
// 更新订单备注
|
|
|
function updateOrderMemo()
|
|
|
{
|
...
|
...
|
|