Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
customer-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
customer-admin
Commits
5b7d2080
提交
5b7d2080
authored
10月 28, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 限制连点操作
上级
d30cb74f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
39 行增加
和
18 行删除
+39
-18
CreateFollow.vue
src/modules/customer/components/CreateFollow.vue
+25
-13
CustomerFormDialog.vue
src/modules/customer/components/CustomerFormDialog.vue
+13
-3
Index.vue
src/modules/customer/views/Index.vue
+1
-2
没有找到文件。
src/modules/customer/components/CreateFollow.vue
浏览文件 @
5b7d2080
...
...
@@ -69,7 +69,7 @@
<el-input
v-model=
"form.desc"
type=
"textarea"
size=
"small"
rows=
"4"
placeholder=
"请输入跟进记录"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"margin-left: 20px"
@
click=
"submit"
>
提交
</el-button>
<el-button
type=
"primary"
style=
"margin-left: 20px"
@
click=
"submit"
:disabled=
"btnDisabled"
>
提交
</el-button>
<el-button
@
click=
"handleCancle"
style=
"margin-left: 50px"
>
取消
</el-button>
</el-form-item>
</el-form>
...
...
@@ -97,12 +97,14 @@ export default {
staff
:
[{
required
:
true
,
message
:
'请选择跟进员工'
,
trigger
:
''
}],
follow_up_date
:
[{
required
:
true
,
message
:
'请选择跟进时间'
,
trigger
:
'change'
}],
contact_id
:
[{
required
:
true
,
message
:
'请选择联系人'
,
trigger
:
'change'
}],
project_id
:
[{
required
:
true
,
message
:
'请选择跟进项目'
,
trigger
:
'change'
}],
communication_mode
:
[{
required
:
true
,
message
:
'请选择跟进方式'
,
trigger
:
'changge'
}],
desc
:
[{
required
:
true
,
message
:
'请输入跟进记录'
,
trigger
:
'blur'
}],
project_status
:
[{
required
:
true
,
message
:
'请选择当前项目进展'
,
trigger
:
'blur'
}]
},
projectList
:
[],
contactList
:
[]
contactList
:
[],
btnDisabled
:
false
}
},
props
:
{
...
...
@@ -130,18 +132,10 @@ export default {
methods
:
{
// 提交
submit
()
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
const
params
=
Object
.
assign
({},
this
.
form
)
for
(
const
key
in
params
)
{
if
(
params
[
key
]
===
''
||
params
[
key
]
===
null
||
params
[
key
]
===
undefined
)
{
delete
params
[
key
]
}
this
.
$refs
.
form
.
validate
().
then
((
valid
)
=>
{
if
(
valid
)
{
this
.
fetchCreateRecord
()
}
createFollowRecord
(
this
.
customerId
,
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'新建跟进记录成功'
)
this
.
$emit
(
'input'
,
false
)
this
.
$emit
(
'success'
)
})
})
},
handleCancle
()
{
...
...
@@ -152,6 +146,24 @@ export default {
this
.
type
=
''
this
.
$emit
(
'input'
,
false
)
},
fetchCreateRecord
()
{
const
params
=
Object
.
assign
({},
this
.
form
)
// for (const key in params) {
// if (params[key] === '' || params[key] === null || params[key] === undefined) {
// delete params[key]
// }
// }
this
.
btnDisabled
=
true
createFollowRecord
(
this
.
customerId
,
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'新建跟进记录成功'
)
this
.
$emit
(
'input'
,
false
)
this
.
$emit
(
'success'
)
}).
finally
(()
=>
{
window
.
setTimeout
(()
=>
{
this
.
btnDisabled
=
false
},
500
)
})
},
fetchProjectList
()
{
getCoopList
({
page
:
1
,
limit
:
1000
,
customer_id
:
this
.
customerId
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
src/modules/customer/components/CustomerFormDialog.vue
浏览文件 @
5b7d2080
...
...
@@ -38,7 +38,7 @@
<el-input
v-model=
"form.remark"
type=
"textarea"
size=
"small"
rows=
"4"
placeholder=
"请输入备注"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleSubmit"
size=
"mini"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
size=
"mini"
:disabled=
"btnDisabled"
>
提交
</el-button>
<el-button
size=
"mini"
@
click=
"handleClose"
>
取消
</el-button>
</el-form-item>
</el-form>
...
...
@@ -78,7 +78,8 @@ export default {
name
:
{
required
:
true
,
message
:
'请输入客户名称'
,
trigger
:
'blur'
},
source
:
{
required
:
true
,
message
:
'请选择客户来源'
,
trigger
:
'change'
},
region
:
{
required
:
true
,
message
:
'请选择所在地区'
,
trigger
:
'change'
}
}
},
btnDisabled
:
false
}
},
watch
:
{
...
...
@@ -87,7 +88,6 @@ export default {
},
'info.id'
:
{
handler
(
v
)
{
console
.
log
(
v
)
Object
.
keys
(
this
.
form
).
forEach
(
key
=>
{
this
.
form
[
key
]
=
this
.
info
[
key
]
if
(
key
===
'region'
)
this
.
form
[
key
]
=
this
.
form
[
key
].
split
(
'-'
)
...
...
@@ -111,23 +111,33 @@ export default {
fetchCreateCustomer
()
{
const
params
=
Object
.
assign
({},
this
.
form
)
params
.
region
=
this
.
form
.
region
.
join
(
'-'
)
this
.
btnDisabled
=
true
createCustomer
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
id
)
{
this
.
$message
.
success
(
'创建客户成功'
)
this
.
$emit
(
'input'
,
false
)
this
.
$emit
(
'change'
)
}
}).
finally
(()
=>
{
window
.
setTimeout
(()
=>
{
this
.
btnDisabled
=
false
},
500
)
})
},
fetchUpdateCustomer
()
{
const
params
=
Object
.
assign
({},
this
.
form
)
params
.
region
=
this
.
form
.
region
.
join
(
'-'
)
this
.
btnDisabled
=
true
updateCustomer
(
this
.
info
.
id
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
status
)
{
this
.
$message
.
success
(
'更新客户成功'
)
this
.
$emit
(
'input'
,
false
)
this
.
$emit
(
'change'
)
}
}).
finally
(()
=>
{
window
.
setTimeout
(()
=>
{
this
.
btnDisabled
=
false
},
500
)
})
}
}
...
...
src/modules/customer/views/Index.vue
浏览文件 @
5b7d2080
...
...
@@ -46,7 +46,7 @@
</
template
>
</template>
</app-list>
<customer-form-dialog
v-model=
"dialogVisible"
@
change=
"refetchList"
/>
<customer-form-dialog
v-model=
"dialogVisible"
v-if=
"dialogVisible"
@
change=
"refetchList"
/>
</app-card>
</template>
...
...
@@ -261,7 +261,6 @@ export default {
delete
_params
.
region
}
}
console
.
log
(
_params
)
return
_params
},
// 查看
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论