diff --git a/src/api/clue/clueField.js b/src/api/clue/clueField.js new file mode 100644 index 0000000..2d386a2 --- /dev/null +++ b/src/api/clue/clueField.js @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +// 创建 +export const createField = (data) => { + return request.post({ url: '/admin-api/crm/clue-param/create', data }) +} + +// 更新 +export const updateField = (data) => { + return request.put({ url: '/admin-api/crm/clue-param/update', data }) +} + +// 删除 +export const deleteField = (id) => { + return request.delete({ url: `/admin-api/crm/clue-param/delete?id=${id}` }) +} + +// 获得 +export const getField = (id) => { + return request.get({ url: `/admin-api/crm/clue-param/get?id=${id}` }) +} + +// 获得精简信息列表 +export const getSimpleFieldList = () => { + return request.get({ url: '/admin-api/crm/clue-param/simple-list' }) +} + +// 获取自定义字段 +export const getDiyFieldList = () => { + return request.get({ url: '/admin-api/crm/clue-param/get-diy-param' }) +} + +// 状态修改 +export const updateFieldStatus = (signParamId, status) => { + const data = { + signParamId, + status + } + return request.put({ url: '/admin-api/crm/clue-param/status/update', data: data }) +} diff --git a/src/api/clue/clueGetSet.js b/src/api/clue/clueGetSet.js new file mode 100644 index 0000000..989dbe2 --- /dev/null +++ b/src/api/clue/clueGetSet.js @@ -0,0 +1,21 @@ +import request from '@/config/axios' + +// 线索获取规则 +export const getClueGainRuleList = () => { + return request.get({ url: '/admin-api/crm/sch-clue-gain-rule/list' }) +} + +// 删除 +export const deleteClueGainRule = (id) => { + return request.delete({ url: `/admin-api/crm/sch-clue-gain-rule/delete?id=${id}` }) +} + +// 线索规则 +export const getClueDistributeRuleList = () => { + return request.get({ url: '/admin-api/crm/sch-clue-gain-rule/list' }) +} + +// 删除 +export const deleteClueDistributeRule = (id) => { + return request.delete({ url: `/admin-api/crm/sch-clue-gain-rule/delete?id=${id}` }) +} diff --git a/src/api/clue/orderField.js b/src/api/clue/orderField.js new file mode 100644 index 0000000..23dd285 --- /dev/null +++ b/src/api/clue/orderField.js @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +// 创建 +export const createField = (data) => { + return request.post({ url: '/admin-api/crm/sign-param/create', data }) +} + +// 更新 +export const updateField = (data) => { + return request.put({ url: '/admin-api/crm/sign-param/update', data }) +} + +// 删除 +export const deleteField = (id) => { + return request.delete({ url: `/admin-api/crm/sign-param/delete?id=${id}` }) +} + +// 获得 +export const getField = (id) => { + return request.get({ url: `/admin-api/crm/sign-param/get?id=${id}` }) +} + +// 获得精简信息列表 +export const getSimpleFieldList = () => { + return request.get({ url: '/admin-api/crm/sign-param/simple-list' }) +} + +// 获取自定义字段 +export const getDiyFieldList = () => { + return request.get({ url: '/admin-api/crm/sign-param/get-diy-param' }) +} + +// 状态修改 +export const updateFieldStatus = (signParamId, status) => { + const data = { + signParamId, + status + } + return request.put({ url: '/admin-api/crm/sign-param/status/update', data: data }) +} diff --git a/src/api/clue/source.js b/src/api/clue/source.js new file mode 100644 index 0000000..d0d3890 --- /dev/null +++ b/src/api/clue/source.js @@ -0,0 +1,31 @@ +import request from '@/config/axios' + +// 查询(精简)列表 +export const getSimpleSourceList = async () => { + return await request.get({ url: '/admin-api/crm/source/list-all-simple' }) +} + +// 查询列表 +export const getSourcePage = async (params) => { + return await request.get({ url: '/admin-api/crm/source/list', params }) +} + +// 查询详情 +export const getSource = async (id) => { + return await request.get({ url: '/admin-api/crm/source/get?id=' + id }) +} + +// 新增 +export const createSource = async (data) => { + return await request.post({ url: '/admin-api/crm/source/create', data: data }) +} + +// 修改 +export const updateSource = async (params) => { + return await request.put({ url: '/admin-api/crm/source/update', data: params }) +} + +// 删除 +export const deleteSource = async (id) => { + return await request.delete({ url: '/admin-api/crm/source/delete?id=' + id }) +} diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index 9453910..bca3e1f 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -179,7 +179,7 @@ service.interceptors.response.use( }) } } else if (code === 500) { - ElMessage.error(t('sys.api.errMsg500')) + ElMessage.error(t(msg || 'sys.api.errMsg500')) return Promise.reject(new Error(msg)) } else if (code === 901) { ElMessage.error({ diff --git a/src/views/Clue/Set/Comp/ClueGet.vue b/src/views/Clue/Set/Comp/ClueGet.vue index 038a7e2..9e33da0 100644 --- a/src/views/Clue/Set/Comp/ClueGet.vue +++ b/src/views/Clue/Set/Comp/ClueGet.vue @@ -1,10 +1,10 @@ - + @@ -49,56 +49,60 @@ - diff --git a/src/views/Clue/Set/Comp/ClueSend.vue b/src/views/Clue/Set/Comp/ClueSend.vue index 161f7ce..358973c 100644 --- a/src/views/Clue/Set/Comp/ClueSend.vue +++ b/src/views/Clue/Set/Comp/ClueSend.vue @@ -2,22 +2,33 @@
- - - - + + + + + + @@ -65,16 +76,27 @@
- diff --git a/src/views/Clue/Set/Comp/ClueSource.vue b/src/views/Clue/Set/Comp/ClueSource.vue index 3968c0f..e27a7a2 100644 --- a/src/views/Clue/Set/Comp/ClueSource.vue +++ b/src/views/Clue/Set/Comp/ClueSource.vue @@ -1,9 +1,9 @@ diff --git a/src/views/Clue/Set/Comp/FieldOrder.vue b/src/views/Clue/Set/Comp/FieldOrder.vue index dae2103..2a8dbf9 100644 --- a/src/views/Clue/Set/Comp/FieldOrder.vue +++ b/src/views/Clue/Set/Comp/FieldOrder.vue @@ -2,45 +2,55 @@ 新增属性 - - - + + + + + + + - - - - + + + + + + + + - +
- 新增选项 + 新增选项
- - 删除 + + 删除
- 保存 + 保存
- diff --git a/src/views/Clue/Set/index.vue b/src/views/Clue/Set/index.vue index f50f702..9718b0d 100644 --- a/src/views/Clue/Set/index.vue +++ b/src/views/Clue/Set/index.vue @@ -1,26 +1,34 @@