99 lines
1.7 KiB
JavaScript
99 lines
1.7 KiB
JavaScript
import request from '@/utils/request'
|
|
|
|
// 列表
|
|
export function listErpProduct(query) {
|
|
return request({
|
|
url: '/jarvis/erpProduct/list',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
|
|
// 详情
|
|
export function getErpProduct(id) {
|
|
return request({
|
|
url: `/jarvis/erpProduct/${id}`,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 新增
|
|
export function addErpProduct(data) {
|
|
return request({
|
|
url: '/jarvis/erpProduct',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
// 修改
|
|
export function updateErpProduct(data) {
|
|
return request({
|
|
url: '/jarvis/erpProduct',
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
|
|
// 删除
|
|
export function delErpProduct(ids) {
|
|
return request({
|
|
url: `/jarvis/erpProduct/${ids}`,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
// 拉取商品列表(单页,兼容)
|
|
export function pullProductList(data) {
|
|
return request({
|
|
url: '/jarvis/erpProduct/pull',
|
|
method: 'post',
|
|
params: data
|
|
})
|
|
}
|
|
|
|
// 全量同步商品(自动遍历所有页码)
|
|
export function syncAllProducts(data) {
|
|
return request({
|
|
url: '/jarvis/erpProduct/syncAll',
|
|
method: 'post',
|
|
params: data
|
|
})
|
|
}
|
|
|
|
// 批量上架
|
|
export function batchPublish(data) {
|
|
return request({
|
|
url: '/erp/product/batchPublish',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
// 批量下架
|
|
export function batchDownShelf(data) {
|
|
return request({
|
|
url: '/erp/product/batchDownShelf',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
// 获取ERP账号列表
|
|
export function getERPAccounts() {
|
|
return request({
|
|
url: '/erp/product/ERPAccount',
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 获取授权的闲鱼会员名下拉
|
|
export function getUsernames(query) {
|
|
return request({
|
|
url: '/erp/product/usernames',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
|