diff --git a/common/api.js b/common/api.js index 1c733cc..73e5f72 100644 --- a/common/api.js +++ b/common/api.js @@ -249,3 +249,45 @@ export const getCustomerProjects = (customerId) => { }); }; +/** + * 获取地区树 + * @returns {Promise} 返回地区树数据 + */ +export const getRegionTree = () => { + return uni.$uv.http.get(`/bst/region/treaDity`, { + custom: { + auth: true + } + }); +}; + +/** + * 创建客户 + * @param {Object} data 客户数据 + * @param {string} data.type 类型(固定为2) + * @param {string} data.name 客户名 + * @param {string} data.mobile 手机号 + * @param {string} data.wechat 微信号 + * @param {string} data.source 来源 + * @param {string} data.intents 意向的设备,逗号分离 + * @param {string} data.status 状态(1潜在2意向3成交4失效) + * @param {string} data.intentLevel 意向强度 + * @param {string} data.customerStatus 客户状态 + * @param {string} data.customerIntentLevel 客户意向强度 + * @param {string} data.nextFollowTime 下次跟进时间 + * @param {string} data.followId 跟进人id + * @param {string} data.remark 备注 + * @param {string} data.concern 顾虑点 + * @param {string} data.pain 痛点 + * @param {string} data.attention 关注点 + * @param {string} data.demand 需求点 + * @returns {Promise} 返回创建结果 + */ +export const createCustomer = (data) => { + return uni.$uv.http.post(`bst/customer`, data, { + custom: { + auth: true + } + }); +}; + diff --git a/pages.json b/pages.json index 7391334..f7598f0 100644 --- a/pages.json +++ b/pages.json @@ -75,6 +75,13 @@ "navigationBarTitleText": "客户详情", "navigationStyle": "custom" } + }, + { + "path": "pages/add-customer/index", + "style": { + "navigationBarTitleText": "客户信息", + "navigationStyle": "custom" + } } ], diff --git a/pages/add-customer/index.vue b/pages/add-customer/index.vue new file mode 100644 index 0000000..6c6c457 --- /dev/null +++ b/pages/add-customer/index.vue @@ -0,0 +1,1110 @@ +