Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
华国豪
CRM
Commits
31a59c75
Commit
31a59c75
authored
Jan 15, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同业新增联系人
parent
d4d724c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
Contacts.vue
src/components/assembly/Contacts.vue
+12
-2
addContacts.vue
src/components/dialogModel/addContacts.vue
+36
-0
No files found.
src/components/assembly/Contacts.vue
View file @
31a59c75
...
...
@@ -10,7 +10,7 @@
<
template
>
<div
class=
"Contacts"
>
<div
class=
"add-contacts"
>
<el-button
icon=
"el-icon-plus"
class=
"crm-btn query-btn crm-btn-mini margin-right0"
@
click=
"addContactsShow=true"
>
新建联系人
</el-button>
<el-button
icon=
"el-icon-plus"
class=
"crm-btn query-btn crm-btn-mini margin-right0"
@
click=
"
contactID=0,
addContactsShow=true"
>
新建联系人
</el-button>
</div>
<el-table
v-loading=
"loading"
...
...
@@ -42,11 +42,12 @@
<template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.IsFirstContact === 1"
class=
"font-color-warning"
>
首要联系人
</p>
<p
v-else-if=
"IsRead === 0 && scope.row.IsFirstContact !== 1"
class=
"font-color-link cp"
@
click=
"SetFirstContact(scope)"
>
设为首要联系人
</p>
<p
v-if=
"userInfo.EmployeeId==scope.row.CreateBy"
class=
"font-color-link cp"
@
click=
"editContacts(scope.row)"
>
编辑
</p>
</
template
>
</el-table-column>
</el-table>
<div
v-if=
"addContactsShow"
>
<addContacts
:ID=
"CustomerId"
@
addContactsOk=
"addContactsOk"
/>
<addContacts
:ID=
"CustomerId"
:contactID=
"contactID"
@
addContactsOk=
"addContactsOk"
/>
</div>
</div>
</template>
...
...
@@ -71,6 +72,8 @@ export default {
loading
:
false
,
addContactsShow
:
false
,
ContactList
:
[],
userInfo
:
{},
contactID
:
0
,
};
},
watch
:{
CustomerId
:
{
...
...
@@ -81,6 +84,8 @@ export default {
}
},
mounted
()
{
let
userInfo
=
this
.
getLocalStorage
();
this
.
userInfo
=
userInfo
;
let
$this
=
this
this
.
MsgBus
.
$on
(
'closeaddContacts'
,
function
(){
$this
.
addContactsShow
=
false
...
...
@@ -88,6 +93,11 @@ export default {
this
.
GetContactByCustomerID
()
},
methods
:
{
editContacts
(
item
){
console
.
log
(
item
,
'--==='
)
this
.
contactID
=
item
.
ID
this
.
addContactsShow
=
true
},
addContactsOk
(){
this
.
GetContactByCustomerID
()
},
...
...
src/components/dialogModel/addContacts.vue
View file @
31a59c75
...
...
@@ -93,6 +93,13 @@
</el-form-item>
</div>
</el-col>
<el-col
:span=
"8"
v-if=
"!form.ID"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"密码"
prop=
"Password"
>
<el-input
type=
"text"
show-Password
placeholder=
"请输入密码"
v-model=
"form.Password"
></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
...
...
@@ -118,6 +125,10 @@ export default {
type
:
Number
,
default
:
0
,
},
contactID
:
{
type
:
Number
,
default
:
0
,
},
},
data
()
{
return
{
...
...
@@ -138,6 +149,13 @@ export default {
ContactPhone
:
[
{
required
:
true
,
message
:
"请输入联系电话"
,
trigger
:
"blur"
},
],
Password
:
[
{
required
:
true
,
message
:
"请输入密码"
,
trigger
:
"blur"
},
{
pattern
:
/^
(?=
.*
[
a-zA-Z
])(?=
.*
\d)
.
{6,20}
$/
,
message
:
'密码由6-20位字母、数字组成'
}
],
},
zwList
:
[],
form
:
{
...
...
@@ -149,6 +167,8 @@ export default {
IsMain
:
0
,
Remark
:
""
,
ID
:
0
,
InfoID
:
0
,
Password
:
''
,
},
};
},
...
...
@@ -159,6 +179,7 @@ export default {
setTimeout
(()
=>
{
$this
.
dialogTableVisible
=
true
;
},
50
);
if
(
this
.
contactID
)
this
.
getInfo
()
},
methods
:
{
getZw
()
{
...
...
@@ -173,6 +194,20 @@ export default {
(
err
)
=>
{}
);
},
getInfo
()
{
this
.
form
.
ID
=
this
.
contactID
this
.
apipost
(
"/api/Customer/GetAllContactModel"
,
{
Id
:
this
.
contactID
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
.
data
.
data
,
'------'
)
}
}
);
},
closedDialog
()
{
this
.
MsgBus
.
$emit
(
"closeaddContacts"
);
},
...
...
@@ -213,6 +248,7 @@ export default {
IsMain
:
""
,
Remark
:
""
,
ID
:
0
,
Password
:
''
,
};
this
.
$refs
[
formName
].
resetFields
();
},
...
...
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