Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
1faa0ab0
Commit
1faa0ab0
authored
Feb 13, 2025
by
Smile
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/jd_dev' into jd_dev
parents
3de041ee
4bfd7d8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
159 additions
and
29 deletions
+159
-29
addPotentialCustom.vue
src/views/ecw/customer/addPotentialCustom.vue
+113
-27
index.vue
src/views/ecw/customer/index.vue
+44
-2
edit.vue
src/views/ecw/offer/edit.vue
+2
-0
No files found.
src/views/ecw/customer/addPotentialCustom.vue
View file @
1faa0ab0
...
...
@@ -2,8 +2,8 @@
<div>
<el-dialog
:title=
"$t('新建潜在客户信息')"
:visible.sync=
"dialogTableVisible"
>
<el-form
ref=
"form"
:rules=
"rules"
:model=
"form"
label-width=
"100px"
style=
"padding: 0 20px;"
>
<el-form-item
prop=
"name"
:label=
"$t('
客户
姓名')"
>
<el-input
v-model=
"form.name"
:placeholder=
"$t('请输入
客户
姓名')"
></el-input>
<el-form-item
prop=
"name"
:label=
"$t('姓名')"
>
<el-input
v-model=
"form.name"
:placeholder=
"$t('请输入姓名')"
></el-input>
</el-form-item>
<el-form-item
required
:label=
"$t('联系方式')"
>
<el-row
:gutter=
"20"
>
...
...
@@ -41,16 +41,21 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item
prop=
"source"
:label=
"$t('
客户
来源')"
>
<el-select
v-model=
"form.source"
:placeholder=
"$t('请选择
客户
来源')"
>
<el-form-item
prop=
"source"
:label=
"$t('来源')"
>
<el-select
v-model=
"form.source"
:placeholder=
"$t('请选择来源')"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('
客户
类别')"
prop=
"type"
>
<el-form-item
:label=
"$t('类别')"
prop=
"type"
>
<dict-selector
v-model=
"form.type"
:type=
"DICT_TYPE.CUSTOMER_TYPE"
form-type=
"checkbox"
multiple
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('角色')"
>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_ROLE"
form-type=
"checkbox"
multiple
v-model=
"form.roles"
></dict-selector>
</el-form-item>
<el-form-item
prop=
"customerService"
:label=
"$t('客户经理')"
>
<el-select
v-model=
"form.customerService"
:placeholder=
"$t('请选择客户经理')"
>
<el-option
v-for=
"item in serviceUserList"
...
...
@@ -63,22 +68,47 @@
<el-form-item
:label=
"$t('公司英文名称')"
>
<el-input
v-model=
"form.companyEn"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('主营类别')"
prop=
"productType"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"11"
>
<el-select
v-model=
"form.productType"
style=
"width: 100%"
@
change=
"getProductListFn"
:placeholder=
"$t('请选择产品类别')"
>
<el-option
:label=
"item.titleZh"
:value=
"item.id"
v-for=
"(item) in productTypeList"
:key=
"item.id"
/>
</el-select>
</el-col>
<el-col
:span=
"11"
>
<el-select
v-model=
"form.productId"
style=
"width: 100%"
:placeholder=
"$t('请选择')"
>
<el-option
:label=
"item.titleZh"
:value=
"parseInt(item.id)"
v-for=
"(item) in productList"
:key=
"item.id"
/>
</el-select>
</el-col>
</el-row>
<!--
<el-form-item
:label=
"$t('主营类别')"
prop=
"productType"
>
-->
<!--
<el-row
:gutter=
"10"
>
-->
<!--
<el-col
:span=
"11"
>
-->
<!--
<el-select
v-model=
"form.productType"
style=
"width: 100%"
@
change=
"getProductListFn"
--
>
<!-- :placeholder="$t('请选择产品类别')">-->
<!--
<el-option
:label=
"item.titleZh"
:value=
"item.id"
v-for=
"(item) in productTypeList"
:key=
"item.id"
/>
-->
<!--
</el-select>
-->
<!--
</el-col>
-->
<!--
<el-col
:span=
"11"
>
-->
<!--
<el-select
v-model=
"form.productId"
style=
"width: 100%"
:placeholder=
"$t('请选择')"
>
-->
<!--
<el-option
:label=
"item.titleZh"
:value=
"parseInt(item.id)"
v-for=
"(item) in productList"
--
>
<!-- :key="item.id"/>-->
<!--
</el-select>
-->
<!--
</el-col>
-->
<!--
</el-row>
-->
<!--
</el-form-item>
-->
<el-form-item
:label=
"$t('主营类别')"
prop=
"products"
>
<div
style=
"overflow: hidden"
>
<div
style=
"margin-bottom: 10px"
v-for=
"(ITEM, INDEX) in form.products"
:key=
"INDEX"
>
<el-row
:gutter=
"2"
>
<el-col
:span=
"9"
style=
"width: auto"
>
<el-select
@
change=
"change(INDEX, $event)"
v-model=
"form.products[INDEX].typeId"
filterable
:placeholder=
"$t('请选择产品类别')"
>
<el-option
:label=
"isChinese ? item.titleZh : item.titleEn"
:value=
"item.id"
v-for=
"item in productTypeList"
:key=
"item.id"
/>
</el-select>
</el-col>
<el-col
:span=
"6"
>
<el-select
@
change=
"productIdsChange(INDEX, $event)"
multiple
filterable
clearable
v-model=
"form.products[INDEX].productIds"
:placeholder=
"$t('请选择')"
>
<el-option
:label=
"`$
{item.titleZh}`" :value="parseInt(item.id)" v-for="item in form.products[INDEX].productList" :key="item.id" />
</el-select>
</el-col>
<el-col
:span=
"6"
>
<el-button
type=
"danger"
@
click=
"form.products.splice(INDEX, 1)"
style=
"padding: 10px"
:disabled=
"!INDEX"
><i
class=
"el-icon-minus"
></i></el-button>
<el-button
type=
"primary"
@
click=
"handleAddProduct"
style=
"padding: 10px"
v-if=
"INDEX === form.products.length - 1"
><i
class=
"el-icon-plus"
></i></el-button>
</el-col>
</el-row>
</div>
</div>
</el-form-item>
<el-form-item
:label=
"$t('图片')"
prop=
"picture"
>
<upload
v-model=
"form.picture"
:limit=
"1"
></upload>
</el-form-item>
...
...
@@ -112,11 +142,48 @@ export default {
name
:
"
addPotentialCustom
"
,
methods
:
{
getDictDatas
,
getProductListFn
(
val
)
{
getProductList
({
typeId
:
val
}).
then
(
r
=>
{
this
.
productList
=
r
.
data
change
(
INDEX
,
val
)
{
this
.
form
.
products
[
INDEX
].
productIds
=
[]
this
.
getProductListFn
(
INDEX
,
[
val
])
this
.
$refs
[
"
form
"
].
validateField
(
"
products
"
)
},
getProductListFn
(
INDEX
,
val
)
{
getProductList
({
typeIds
:
!
val
[
0
]
?
[]
:
val
}).
then
((
r
)
=>
{
this
.
form
.
products
[
INDEX
].
productList
=
r
.
data
})
},
handleAddProduct
()
{
this
.
form
.
products
.
push
({
typeId
:
undefined
,
productIds
:
[],
productList
:
[]
})
this
.
getProductListFn
(
this
.
form
.
products
.
length
-
1
,
[
undefined
])
},
productIdsChange
(
INDEX
,
val
)
{
let
typeIds
=
this
.
form
.
products
[
INDEX
].
productList
.
filter
((
item
)
=>
val
.
indexOf
(
item
.
id
)
>
-
1
).
map
((
item
)
=>
item
.
typeId
)
typeIds
=
[...
new
Set
(
typeIds
)]
let
typeId
=
undefined
if
(
typeIds
.
length
)
{
typeId
=
typeIds
[
0
]
}
if
(
typeId
!==
this
.
form
.
products
[
INDEX
].
typeId
)
{
this
.
form
.
products
[
INDEX
].
typeId
=
typeId
this
.
getProductListFn
(
INDEX
,
[
typeId
])
}
},
productsValidator
(
rule
,
value
,
callback
)
{
let
r
=
this
.
form
.
products
.
some
((
item
)
=>
{
if
(
!
item
.
typeId
)
{
callback
(
new
Error
(
this
.
$t
(
"
主营类别不能为空
"
)))
return
true
}
})
let
typeIds
=
this
.
form
.
products
.
map
((
item
)
=>
item
.
typeId
)
if
(
new
Set
(
typeIds
).
size
!==
typeIds
.
length
)
{
callback
(
new
Error
(
this
.
$t
(
"
主营类别不能重复
"
)))
return
}
if
(
!
r
)
{
callback
()
}
},
reset
()
{
this
.
form
=
{
name
:
undefined
,
...
...
@@ -135,8 +202,9 @@ export default {
company
:
undefined
,
companyEn
:
undefined
,
inquiry
:
undefined
,
productType
:
undefined
,
productId
:
undefined
,
productTypes
:
[],
productIds
:
[],
products
:
[],
picture
:
undefined
,
}
},
...
...
@@ -145,6 +213,9 @@ export default {
if
(
valId
)
{
let
p
=
{...
this
.
form
}
p
.
type
=
p
.
type
.
join
(
'
,
'
)
p
.
roles
=
(
p
.
roles
||
[])?.
join
(
"
,
"
)
p
.
productIds
=
(
p
.
productIds
||
[])?.
join
(
"
,
"
)
p
.
productTypes
=
(
p
.
productTypes
||
[])?.
join
(
"
,
"
)
p
.
customerContacts
[
0
].
name
=
p
.
name
createPotential
(
p
).
then
(
r
=>
{
if
(
r
.
code
===
0
)
{
...
...
@@ -170,22 +241,37 @@ export default {
this
.
productTypeList
=
r
.
data
})
this
.
form
.
products
.
push
({
typeId
:
undefined
,
productIds
:
[],
productList
:
[]
})
this
.
getProductListFn
(
0
,
[
undefined
])
console
.
log
(
'
this.form.products :
'
)
console
.
log
(
this
.
form
.
products
)
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
},
DICT_TYPE
()
{
return
DICT_TYPE
},
rules
()
{
return
{
products
:
[
{
required
:
true
,
trigger
:
"
blur
"
,
validator
:
this
.
productsValidator
}
],
name
:
{
required
:
true
,
message
:
this
.
$t
(
'
请输入名称
'
),
target
:
'
blur
'
},
customerService
:
{
required
:
true
,
message
:
this
.
$t
(
'
请选择客户经理。
'
),
target
:
[
'
blur
'
],
type
:
'
number
'
},
customerContacts
:
[{
areaCode
:
{
required
:
true
,
message
:
this
.
$t
(
'
请输入区号。
'
),
target
:
'
blur
'
},
phoneNew
:
{
required
:
true
,
message
:
this
.
$t
(
'
请输入电话号码。
'
),
target
:
'
blur
'
}
},],
type
:
{
type
:
'
array
'
,
message
:
this
.
$t
(
'
请输入
客户
类别。
'
),
required
:
true
,
target
:
[
'
blur
'
,
'
change
'
]},
source
:
{
message
:
this
.
$t
(
'
前请输入
客户
来源
'
),
required
:
true
,
target
:
'
change
'
,
type
:
'
number
'
}
type
:
{
type
:
'
array
'
,
message
:
this
.
$t
(
'
请输入类别。
'
),
required
:
true
,
target
:
[
'
blur
'
,
'
change
'
]},
source
:
{
message
:
this
.
$t
(
'
前请输入来源
'
),
required
:
true
,
target
:
'
change
'
,
type
:
'
number
'
}
}
}
},
...
...
src/views/ecw/customer/index.vue
View file @
1faa0ab0
...
...
@@ -892,6 +892,8 @@ export default {
customerServiceConfirmedTime
:
[],
firstDealTime
:
[],
createTime
:
[],
autoClearedCreateTime
:
false
,
clearedCreateNum
:
0
,
customerSelect
:
[],
recommended
:
[],
getNodeLists
:
[],
...
...
@@ -1006,6 +1008,19 @@ export default {
}
},
watch
:
{
queryParams
:
{
handler
()
{
this
.
clearedCreateNum
++
// 记录用户改动搜索框次数
console
.
log
(
'
clearedCreateNum:
'
+
this
.
clearedCreateNum
)
// 当页面尚未自动清空过创建时间,并且创建时间不为空时
// 页面加载完成后,这里的值是5,如果查询条件功能做了修改也可能要改动
if
(
this
.
clearedCreateNum
==
5
&&
this
.
createTime
&&
this
.
createTime
.
length
>
0
)
{
this
.
createTime
=
[]
// 清空创建时间条件数据
this
.
autoClearedCreateTime
=
true
// 记录已经清空过
}
},
deep
:
true
,
// 深度监听
},
showSearch
()
{
this
.
$nextTick
(()
=>
{
this
.
getHeight
()
...
...
@@ -1195,10 +1210,28 @@ export default {
//this.$refs.push({path:'/customer-contacts/select',query:{pageNo:1,pageSize:10,searchKey:row.defaultContactPhone}})
})
},
hasNonEmptyQueryCondition
()
{
// 用于判断搜索字段内容是否做了修改
return
Object
.
keys
(
this
.
queryParams
).
some
(
key
=>
{
// 如果不需要判断某个字段,可在此处进行排除
if
(
key
===
'
pageNo
'
)
return
false
;
if
(
key
===
'
pageSize
'
)
return
false
;
if
(
key
===
'
searchKey
'
)
return
false
;
const
value
=
this
.
queryParams
[
key
]
if
(
typeof
value
===
'
string
'
)
{
return
value
.
trim
()
!==
''
}
else
if
(
Array
.
isArray
(
value
))
{
return
value
.
length
>
0
}
else
if
(
typeof
value
===
'
object
'
&&
value
!==
null
)
{
return
Object
.
keys
(
value
).
length
>
0
}
return
value
!==
null
&&
value
!==
undefined
})
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
// 处理查询参数
}
// 处理查询参数
let
params
=
{
...
this
.
queryParams
,
...
this
.
combinedQueryParams
}
// 执行查询
...
...
@@ -1291,6 +1324,15 @@ export default {
},
/** 搜索按钮操作 */
handleQuery
()
{
// 第一次通过查询选择框触发会清空创建时间
if
(
!
this
.
autoClearedCreateTime
&&
this
.
hasNonEmptyQueryCondition
()
&&
(
this
.
createTime
&&
this
.
createTime
.
length
>
0
)
)
{
this
.
createTime
=
[]
// 自动清空创建时间数据
this
.
autoClearedCreateTime
=
true
// 记录已经清空过
}
this
.
queryParams
.
pageNo
=
1
this
.
getList
()
},
...
...
@@ -1392,7 +1434,7 @@ export default {
})
},
setData
(
response
)
{
console
.
log
(
response
,
"
response
"
)
//
console.log(response, "response")
this
.
list
=
response
.
data
.
list
this
.
total
=
response
.
data
.
total
this
.
loading
=
false
...
...
src/views/ecw/offer/edit.vue
View file @
1faa0ab0
...
...
@@ -1079,12 +1079,14 @@ export default {
this
.
form
.
consigneePhone
=
""
this
.
form
.
consigneeCountryCode
=
""
this
.
form
.
consigneeEmail
=
""
this
.
form
.
consigneeId
=
""
}
else
{
this
.
form
.
consignorName
=
""
this
.
form
.
consignorCompany
=
""
this
.
form
.
consignorPhone
=
""
this
.
form
.
consignorCountryCode
=
""
this
.
form
.
consignorEmail
=
""
this
.
form
.
consignorId
=
""
}
},
async
getChannelList
()
{
...
...
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