82 lines
2.3 KiB
JavaScript
82 lines
2.3 KiB
JavaScript
import request from "@/utils/request";
|
|
|
|
export function getCrmCustomerList(params) {
|
|
return request({ url: "/backend/erp/customer/list", method: "get", params });
|
|
}
|
|
|
|
export function getCrmCustomerDetail(id) {
|
|
return request({ url: `/backend/erp/customer/${id}`, method: "get" });
|
|
}
|
|
|
|
export function createCrmCustomer(data) {
|
|
return request({ url: "/backend/erp/customer", method: "post", data });
|
|
}
|
|
|
|
export function updateCrmCustomer(id, data) {
|
|
return request({ url: `/backend/erp/customer/${id}`, method: "put", data });
|
|
}
|
|
|
|
export function deleteCrmCustomer(id) {
|
|
return request({ url: `/backend/erp/customer/${id}`, method: "delete" });
|
|
}
|
|
|
|
export function toggleCrmCustomerStatus(id, status) {
|
|
return request({
|
|
url: `/backend/erp/customer/${id}/status`,
|
|
method: "post",
|
|
data: { status },
|
|
});
|
|
}
|
|
|
|
export function convertCustomerToSupplier(id) {
|
|
return request({ url: `/backend/erp/customer/${id}/convert-supplier`, method: "post" });
|
|
}
|
|
|
|
export function getCrmSupplierList(params) {
|
|
return request({ url: "/backend/erp/supplier/list", method: "get", params });
|
|
}
|
|
|
|
export function getCrmSupplierDetail(id) {
|
|
return request({ url: `/backend/erp/supplier/${id}`, method: "get" });
|
|
}
|
|
|
|
export function createCrmSupplier(data) {
|
|
return request({ url: "/backend/erp/supplier", method: "post", data });
|
|
}
|
|
|
|
export function updateCrmSupplier(id, data) {
|
|
return request({ url: `/backend/erp/supplier/${id}`, method: "put", data });
|
|
}
|
|
|
|
export function deleteCrmSupplier(id) {
|
|
return request({ url: `/backend/erp/supplier/${id}`, method: "delete" });
|
|
}
|
|
|
|
export function toggleCrmSupplierStatus(id, status) {
|
|
return request({
|
|
url: `/backend/erp/supplier/${id}/status`,
|
|
method: "post",
|
|
data: { status },
|
|
});
|
|
}
|
|
|
|
export function convertSupplierToCustomer(id) {
|
|
return request({ url: `/backend/erp/supplier/${id}/convert-customer`, method: "post" });
|
|
}
|
|
|
|
export function getPoolList(params) {
|
|
return request({ url: "/backend/crm/pool/list", method: "get", params });
|
|
}
|
|
|
|
export function claimPoolCustomer(data) {
|
|
return request({ url: "/backend/crm/pool/claim", method: "post", data });
|
|
}
|
|
|
|
export function assignPoolCustomer(data) {
|
|
return request({ url: "/backend/crm/pool/assign", method: "post", data });
|
|
}
|
|
|
|
export function moveToPool(data) {
|
|
return request({ url: "/backend/crm/pool/move", method: "post", data });
|
|
}
|