From 5b3e02b447fb3b7f19ed26abd040d2e84b52ab6a Mon Sep 17 00:00:00 2001
From: qsh <>
Date: Fri, 7 Jun 2024 17:01:46 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/clue/clueField.js | 40 ++++
src/api/clue/clueGetSet.js | 21 ++
src/api/clue/orderField.js | 40 ++++
src/api/clue/source.js | 31 +++
src/config/axios/service.ts | 2 +-
src/views/Clue/Set/Comp/ClueGet.vue | 86 +++----
src/views/Clue/Set/Comp/ClueSend.vue | 65 ++++--
src/views/Clue/Set/Comp/ClueSource.vue | 77 ++++---
src/views/Clue/Set/Comp/DialogSource.vue | 37 +--
src/views/Clue/Set/Comp/FieldClue.vue | 216 +++++++++++++-----
src/views/Clue/Set/Comp/FieldOrder.vue | 216 +++++++++++++-----
src/views/Clue/Set/index.vue | 45 ++--
src/views/Clue/Skill/index.vue | 28 ++-
.../Inventory/Comp/InventoryRecord.vue | 8 +-
.../MiniMall/Inventory/Comp/Warehouse.vue | 9 +-
15 files changed, 682 insertions(+), 239 deletions(-)
create mode 100644 src/api/clue/clueField.js
create mode 100644 src/api/clue/clueGetSet.js
create mode 100644 src/api/clue/orderField.js
create mode 100644 src/api/clue/source.js
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 @@