新增接口
create
/supplier/create 新增供应商
Method: POST
请求
customer_id M string 供应商编号
name M string 供应商名字
phone O string 联系电话
company_name O string 公司名称
company_address O string 公司地址
merchandise: M list ['B100', 'B101', ...] 可选商品,二级分类
finance_manager O string 财务联系人
finance_manager_phone O string 联系人电话
bank O string 开户银行
pay_method O INT 支付方式
card_no O string 银行帐号
business_licence O string 营业执照号
响应
{
code: 0,
data:{
'id': station_id 返回站点id
}
}
/supplier/delete 删除供应商
Method: POST
请求:
id M string 供应商id
响应
{
code: 0,
msg: '0k',
data: NULL
}
/supplier/detail 拉取供应商详情
Method: POST
请求
id M string 供应商id
响应
resonse:
{
code: 0,
data:{
id: 'T100',
customer_id: 'GSY001',
name: 'xxx',
phone: '110',
company_name: 'xxxxx'
company_address: 'xxxxx'
merchandise: ['B100', 'B101', ...]
finance_manager: 'xxxx'
finance_manager_phone: '110'
bank: 'xxxxx'
pay_method: 2
card_no: 'xxxxxx'
business_licence: 'xxxxx'
}
}
/supplier/update 编辑供应商
Method: POST
请求
id M string 供应商id
customer_id O string 供应商编号
name O string 供应商名字
phone O string 联系电话
company_name O string 公司名称
company_address O string 公司地址
merchandise O list ['B100', 'B101', ...] 可选商品
finance_manager O string 财务联系人
finance_manager_phone O string 联系人电话
bank O string 开户银行
card_no O string 银行帐号
pay_method O INT 支付方式
business_licence O string 营业执照号
响应
{
code: 0,
data:{
'id': station_id 返回站点id
}
}
/supplier/search 拉取这个站点的供应商信息
Method: GET
请求
category_id_2 O string
spu_id O string
search_text O string 搜索字段
limit M INT
offset M INT
响应
{
code: 0,
data: {
supplier: [{customer_id:'name', name:'xxxx', phone:'xxxx'}, ....]
}
}
采购规格的操作都需要进行双写, 改变采购规格的同时,要同时对采购sku进行操作
todo: 分页
/purchase_spec/search 拉取采购规格
Method: GET
请求
spu_id O string spu_id
search_text O string 搜索的商品名
offset INT M
limit INT M
参数不填默认拉所有
响应
{
code: 0
data:{
purchase_specification:[{
name: 'xxxx' 商品名
category_1: 'xxxx' 所属一级分类
category_2: 'xxxx' 所属二级分类
pinlei: 'xxxx' 所属品类
purchase_unit: 'xxxxxx' 采购单位
std_unit: 'xxxxx' 标准单位
price: 'xxxxx' 采购单价
ratio: FLOAT 转化率
}
....]
}
}
/purchase_spec/create 新建采购规格
Method: POST
请求
category_1 M string 一级分类
category_2 M string 二级分类
pinglei M string 品类
spu_id M string spu_id 'C001'
price M FLOAT 采购单价
name string 规格名字
unit_name M string 采购单位
ratio M FLOAT 转化率
响应
{
code: 0
msg: 'ok'
data:
{
purchase_spec_id: 'D111'
}
}
/purchase_spec/update 编辑采购规格
Method:POST
请求
id M string 规格id
price O FLOAT 采购单价
unit_name O string 采购单位
ratio O FLOAT 转化率
name O STRING 规格名字
响应
{
code: 0
msg: 'ok'
data: NULL
}
/purchase_spec/delete 删除采购规格
Method: POST
请求
id M string 规格id
响应
{
code: 0
msg: 'ok'
data: NULL
}
/supplier/reset_pwd 重置密码
Method: POST
请求
id M string 供应商id
phone M string 电话号码
响应:
{
code: 0
msg: 'ok'
data: NULL
}
/supplier/account 保存帐号
Method: POST
请求:
id M string 供应商id
username M string 帐号
is_active M 是否激活
响应:
{
code: 0
msg: 'ok'
data: NULL
}
/product/sku_supplier/list 拉取对应的供应商和上游站点
Method: POST
请求
spu_id M string
响应:
{
code: 0
mgs: 'ok'
data: {
[
{
'id': 'xxxx' 上游sku_id或者采购规格id
'name': 'xxxx' 商品名字
}
...
]
}
}
/product/sku_spec/list 拉取不同的规格
Method: GET
请求
spu_id M string
is_upstream 0 INT M 0表示拉取本站的采购规格,1表示拉取上游对应的销售sku
supplier_id string M 供应商id
响应:
{
code: 0
msg: 'ok'
data: {
[
{
'id': 'xxxx' 上游sku_id或者采购规格id
'name': 'xxxx' 商品名字
'unit_name': 'xxxxx' 单位名称
'price': 'xxxx' 标准价格
}
...
]
}
}
/supplier/export 拉取这个站点的供应商信息
Method: GET
请求
search_text O string 搜索字段
响应
{
code: 0,
data: {
supplier: [{customer_id:'name', name:'xxxx', phone:'xxxx', supplier_id: 'xxxx', financer: 'xxxxx',
financer_phone: 'xxxxx', bank: 'xxxxx', license:'xxxxx', card_no: 'xxxxx'}, ....]
}
}