Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d71097ac
authored
Jan 03, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📖
CRM:【客户配置】调整目录结构
parent
4fbb3b88
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
28 deletions
+23
-28
src/api/crm/customer/limitConfig/index.ts
+0
-0
src/api/crm/customer/poolConfig/index.ts
+2
-3
src/views/crm/customer/limitConfig/CustomerLimitConfigForm.vue
+9
-9
src/views/crm/customer/limitConfig/CustomerLimitConfigList.vue
+5
-9
src/views/crm/customer/limitConfig/index.vue
+2
-2
src/views/crm/customer/poolConfig/index.vue
+5
-5
No files found.
src/api/crm/customer
L
imitConfig/index.ts
→
src/api/crm/customer
/l
imitConfig/index.ts
View file @
d71097ac
File moved
src/api/crm/customer
P
oolConfig/index.ts
→
src/api/crm/customer
/p
oolConfig/index.ts
View file @
d71097ac
import
request
from
'@/config/axios'
import
{
ConfigVO
}
from
'@/api/infra/config'
export
interface
CustomerPoolConfigVO
{
enabled
?:
boolean
contactExpireDays
?:
number
dealExpireDays
?:
number
notifyEnabled
?:
boolean
notifyDays
:
number
notifyDays
?
:
number
}
// 获取客户公海规则设置
...
...
@@ -15,6 +14,6 @@ export const getCustomerPoolConfig = async () => {
}
// 更新客户公海规则设置
export
const
saveCustomerPoolConfig
=
async
(
data
:
ConfigVO
)
=>
{
export
const
saveCustomerPoolConfig
=
async
(
data
:
C
ustomerPoolC
onfigVO
)
=>
{
return
await
request
.
put
({
url
:
`/crm/customer-pool-config/save`
,
data
})
}
src/views/crm/c
onfig/customerL
imitConfig/CustomerLimitConfigForm.vue
→
src/views/crm/c
ustomer/l
imitConfig/CustomerLimitConfigForm.vue
View file @
d71097ac
...
...
@@ -56,12 +56,12 @@
</Dialog>
</template>
<
script
setup
lang=
"ts"
>
import
*
as
CustomerLimitConfigApi
from
'@/api/crm/customer
L
imitConfig'
import
*
as
CustomerLimitConfigApi
from
'@/api/crm/customer
/l
imitConfig'
import
*
as
DeptApi
from
'@/api/system/dept'
import
{
defaultProps
,
handleTree
}
from
'@/utils/tree'
import
*
as
UserApi
from
'@/api/system/user'
import
{
cloneDeep
}
from
'lodash-es'
import
{
LimitConfType
}
from
'@/api/crm/customer
L
imitConfig'
import
{
LimitConfType
}
from
'@/api/crm/customer
/l
imitConfig'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -72,7 +72,7 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const
formType
=
ref
(
''
)
// 表单的类型:create - 新增;update - 修改
const
formData
=
ref
({
id
:
undefined
,
type
:
undefined
,
type
:
LimitConfType
.
CUSTOMER_LOCK_LIMIT
,
// 给个默认值,避免 IDE 报错
userIds
:
undefined
,
deptIds
:
undefined
,
maxCount
:
undefined
,
...
...
@@ -88,15 +88,11 @@ const deptTree = ref() // 部门树形结构
const
userTree
=
ref
()
// 用户树形结构
/** 打开弹窗 */
const
open
=
async
(
type
:
string
,
id
?:
number
,
limitConfType
?:
LimitConfType
)
=>
{
const
open
=
async
(
type
:
string
,
limitConfType
:
LimitConfType
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
resetForm
()
// 获得部门树
await
getDeptTree
()
// 获得用户
await
getUserTree
()
// 修改时,设置数据
if
(
id
)
{
formLoading
.
value
=
true
...
...
@@ -108,6 +104,10 @@ const open = async (type: string, id?: number, limitConfType?: LimitConfType) =>
}
else
{
formData
.
value
.
type
=
limitConfType
}
// 获得部门树
await
getDeptTree
()
// 获得用户
await
getUserTree
()
}
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
...
...
@@ -141,7 +141,7 @@ const submitForm = async () => {
const
resetForm
=
()
=>
{
formData
.
value
=
{
id
:
undefined
,
type
:
undefined
,
type
:
LimitConfType
.
CUSTOMER_LOCK_LIMIT
,
userIds
:
undefined
,
deptIds
:
undefined
,
maxCount
:
undefined
,
...
...
src/views/crm/c
onfig/customerL
imitConfig/CustomerLimitConfigList.vue
→
src/views/crm/c
ustomer/l
imitConfig/CustomerLimitConfigList.vue
View file @
d71097ac
<
template
>
<el-button
type=
"primary"
plain
@
click=
"handleQuery"
>
<Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
刷新
</el-button>
<el-button
plain
@
click=
"handleQuery"
>
<Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
刷新
</el-button>
<el-button
type=
"primary"
plain
...
...
@@ -87,10 +85,10 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
CustomerLimitConfigApi
from
'@/api/crm/customer
L
imitConfig'
import
CustomerLimitConfigForm
from
'
@/views/crm/config/customerLimitConfig
/CustomerLimitConfigForm.vue'
import
*
as
CustomerLimitConfigApi
from
'@/api/crm/customer
/l
imitConfig'
import
CustomerLimitConfigForm
from
'
.
/CustomerLimitConfigForm.vue'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
LimitConfType
}
from
'@/api/crm/customer
L
imitConfig'
import
{
LimitConfType
}
from
'@/api/crm/customer
/l
imitConfig'
defineOptions
({
name
:
'CustomerLimitConfigList'
})
...
...
@@ -107,8 +105,6 @@ const queryParams = reactive({
pageSize
:
10
,
type
:
confType
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
exportLoading
=
ref
(
false
)
// 导出的加载中
/** 查询列表 */
const
getList
=
async
()
=>
{
...
...
@@ -125,7 +121,7 @@ const getList = async () => {
/** 添加/修改操作 */
const
formRef
=
ref
()
const
openForm
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
,
confType
)
formRef
.
value
.
open
(
type
,
confType
,
id
)
}
/** 删除按钮操作 */
...
...
src/views/crm/c
onfig/customerL
imitConfig/index.vue
→
src/views/crm/c
ustomer/l
imitConfig/index.vue
View file @
d71097ac
...
...
@@ -12,8 +12,8 @@
</ContentWrap>
</
template
>
<
script
setup
lang=
"ts"
>
import
CustomerLimitConfigList
from
'
@/views/crm/config/customerLimitConfig
/CustomerLimitConfigList.vue'
import
{
LimitConfType
}
from
'@/api/crm/customer
L
imitConfig'
import
CustomerLimitConfigList
from
'
.
/CustomerLimitConfigList.vue'
import
{
LimitConfType
}
from
'@/api/crm/customer
/l
imitConfig'
defineOptions
({
name
:
'CrmCustomerLimitConfig'
})
</
script
>
src/views/crm/c
onfig/customerP
oolConfig/index.vue
→
src/views/crm/c
ustomer/p
oolConfig/index.vue
View file @
d71097ac
...
...
@@ -56,7 +56,7 @@
</ContentWrap>
</template>
<
script
setup
lang=
"ts"
>
import
*
as
CustomerPoolConfigApi
from
'@/api/crm/customer
P
oolConfig'
import
*
as
CustomerPoolConfigApi
from
'@/api/crm/customer
/p
oolConfig'
import
{
CardTitle
}
from
'@/components/Card'
defineOptions
({
name
:
'CrmCustomerPoolConfig'
})
...
...
@@ -67,10 +67,10 @@ const { t } = useI18n() // 国际化
const
formLoading
=
ref
(
false
)
const
formData
=
ref
({
enabled
:
false
,
contactExpireDays
:
0
,
dealExpireDays
:
0
,
contactExpireDays
:
undefined
,
dealExpireDays
:
undefined
,
notifyEnabled
:
false
,
notifyDays
:
0
notifyDays
:
undefined
})
const
formRules
=
reactive
({
enabled
:
[{
required
:
true
,
message
:
'是否启用客户公海不能为空'
,
trigger
:
'blur'
}]
...
...
@@ -100,7 +100,7 @@ const onSubmit = async () => {
// 提交请求
formLoading
.
value
=
true
try
{
const
data
=
formData
.
value
as
unknown
as
CustomerPoolConfigApi
.
CustomerPoolConfigVO
const
data
=
formData
.
value
as
CustomerPoolConfigApi
.
CustomerPoolConfigVO
await
CustomerPoolConfigApi
.
saveCustomerPoolConfig
(
data
)
message
.
success
(
t
(
'common.updateSuccess'
))
await
getConfig
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment