Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
238438a2
Commit
238438a2
authored
Nov 11, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0d1d85af
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1042 additions
and
761 deletions
+1042
-761
MyCustomer.vue
src/components/SalesModule/MyCustomer.vue
+1042
-761
No files found.
src/components/SalesModule/MyCustomer.vue
View file @
238438a2
<
style
>
.page_MyCustomer
._mc_addbox
{
height
:
52px
;
width
:
100%
;
margin-top
:
20px
;}
.page_MyCustomer
._mc_addbox
>
li
{
float
:
left
;
width
:
116px
;
font-size
:
14px
;
height
:
52px
;
color
:
#666
;
text-align
:
center
;
line-height
:
52px
;
background
:
#E9E9E9
;
cursor
:
pointer
;}
.page_MyCustomer
._mc_addbox
>
li
.active
{
background
:
#fff
;
color
:
#333
;}
.page_MyCustomer
._mc_addbox
.divActive
{
margin
:
-3px
auto
;
width
:
26px
;
height
:
3px
;
background
:
#E95252
;}
.page_MyCustomer
._mc_edit
{
overflow
:
auto
;
display
:
none
;
position
:
absolute
;
z-index
:
50
;
bottom
:
0
;
left
:
0
;
border-top
:
3px
solid
#38425d
;
background-color
:
#f9f9f9
;
padding
:
10px
;
width
:
100%
;
min-width
:
1146px
;}
.page_MyCustomer
.edHeightOne
{
display
:
block
!important
;
height
:
450px
;}
.page_MyCustomer
._mc_list
{
overflow-x
:
auto
;
background
:
#fff
;
padding-top
:
20px
;
padding-left
:
15px
;}
.page_MyCustomer
._mc_list
>
ul
>
li
{
padding
:
20px
20px
0
20px
;
width
:
260px
;
box-sizing
:
border-box
;
height
:
410px
;
float
:
left
;
border
:
1px
solid
#F1F2F5
;
background
:
#fff
;
margin-right
:
10px
;
margin-bottom
:
20px
;
border-radius
:
10px
;
position
:
relative
;
cursor
:
pointer
;}
.page_MyCustomer
._mc_list
>
ul
>
li
:hover
{
box-shadow
:
0px
0px
10px
rgba
(
191
,
191
,
191
,
1
);
transition
:
all
linear
0.3s
;}
.page_MyCustomer
._mc_list
>
ul
>
li
.iconDelete
{
cursor
:
pointer
;
display
:
none
;
position
:
absolute
;
top
:
-4px
;
right
:
0
;
color
:
#E95252
;
z-index
:
5
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
:hover
.iconDelete
{
display
:
block
;}
.page_MyCustomer
._mc_list
>
ul
>
li
.iconDelete1
{
cursor
:
pointer
;
display
:
none
;
position
:
absolute
;
top
:
-4px
;
right
:
16px
;
color
:
#2CA4F0
;
z-index
:
5
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
:hover
.iconDelete1
{
display
:
block
;}
.page_MyCustomer
._mc_list
>
ul
>
li
.iconDelete2
{
cursor
:
pointer
;
display
:
none
;
position
:
absolute
;
top
:
-4px
;
right
:
32px
;
color
:
#34BFA3
;
z-index
:
5
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
:hover
.iconDelete2
{
display
:
block
;}
.page_MyCustomer
._mc_list
>
ul
>
li
>
img
{
position
:
absolute
;
z-index
:
5
;}
.page_MyCustomer
._head_info_box
{
text-align
:
center
;
font-size
:
14px
;
color
:
#333333
}
.page_MyCustomer
._head_info_box
img
{
height
:
48px
;
width
:
48px
;
border-radius
:
50%
;
margin-bottom
:
5px
}
.page_MyCustomer
._head_info_box
p
{
margin-bottom
:
8px
;}
.page_MyCustomer
._head_info_box
.icon-img_dianhua
{
color
:
#09D49D
}
.page_MyCustomer
._addr
{
color
:
#666666
}
.page_MyCustomer
._record
{
padding
:
5px
10px
15px
;
border-bottom
:
1px
solid
#F5F5F5
;
min-height
:
120px
}
.page_MyCustomer
._record
p
{
margin-bottom
:
10px
;
text-align
:
center
;
font-size
:
14px
;
border-radius
:
4px
;
padding
:
2px
;
color
:
white
;
background-color
:
#257BF1
;}
.page_MyCustomer
._record
p
._other_n
{
color
:
#666666
;
background-color
:
#F5F5F5
;}
.page_MyCustomer
._record
p
._fist_n
{
color
:
#09D49D
;
background-color
:
#E9F7F1
;}
.page_MyCustomer
._record
p
._other
{
color
:
#257BF1
;
background-color
:
#E4EFFF
;}
.page_MyCustomer
._bt
{
font-size
:
14px
;
margin-top
:
15px
;
text-align
:
center
;
color
:
#666
;}
.page_MyCustomer
._bt
span
{
color
:
#FF9000
}
.page_MyCustomer
._edHeight
{
height
:
340px
;}
.page_MyCustomer
._scrollbar
::-webkit-scrollbar
{
width
:
4px
;
height
:
8px
;}
.page_MyCustomer
._scrollbar
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
-webkit-box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#c9c9c9
;}
.page_MyCustomer
._scrollbar
::-webkit-scrollbar-track
{
-webkit-box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
4px
;
background
:
#EDEDED
;}
.page_MyCustomer
._mc_edit
._tit
{
padding-left
:
10px
;
border-left
:
3px
solid
#E95252
;
font-size
:
16px
;
font-family
:
'PingFangSc-Fine'
;
color
:
#000000
}
.page_MyCustomer
._mc_edit
._info_box
ul
._form
li
{
float
:
left
;}
.page_MyCustomer
._check_list
{
padding-left
:
120px
;
margin-bottom
:
20px
;}
.page_MyCustomer
._check_box
.el-form-item
{
margin-bottom
:
0
}
.page_MyCustomer
._info_box
.el-form-item__label
{
font-size
:
12px
;
color
:
#666
;}
._remark
textarea
{
resize
:
none
;
width
:
646px
;
height
:
100px
}
.page_MyCustomer
._mc_addbox
{
height
:
52px
;
width
:
100%
;
margin-top
:
20px
;
}
.page_MyCustomer
._mc_addbox
>
li
{
float
:
left
;
width
:
116px
;
font-size
:
14px
;
height
:
52px
;
color
:
#666
;
text-align
:
center
;
line-height
:
52px
;
background
:
#E9E9E9
;
cursor
:
pointer
;
}
.page_MyCustomer
._mc_addbox
>
li
.active
{
background
:
#fff
;
color
:
#333
;
}
.page_MyCustomer
._mc_addbox
.divActive
{
margin
:
-3px
auto
;
width
:
26px
;
height
:
3px
;
background
:
#E95252
;
}
.page_MyCustomer
._mc_edit
{
overflow
:
auto
;
display
:
none
;
position
:
absolute
;
z-index
:
50
;
bottom
:
0
;
left
:
0
;
border-top
:
3px
solid
#38425d
;
background-color
:
#f9f9f9
;
padding
:
10px
;
width
:
100%
;
min-width
:
1146px
;
}
.page_MyCustomer
.edHeightOne
{
display
:
block
!important
;
height
:
450px
;
}
.page_MyCustomer
._mc_list
{
overflow-x
:
auto
;
background
:
#fff
;
padding-top
:
20px
;
padding-left
:
15px
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
{
padding
:
20px
20px
0
20px
;
width
:
260px
;
box-sizing
:
border-box
;
height
:
410px
;
float
:
left
;
border
:
1px
solid
#F1F2F5
;
background
:
#fff
;
margin-right
:
10px
;
margin-bottom
:
20px
;
border-radius
:
10px
;
position
:
relative
;
cursor
:
pointer
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
:hover
{
box-shadow
:
0px
0px
10px
rgba
(
191
,
191
,
191
,
1
);
transition
:
all
linear
0.3s
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
.iconDelete
{
cursor
:
pointer
;
display
:
none
;
position
:
absolute
;
top
:
-4px
;
right
:
0
;
color
:
#E95252
;
z-index
:
5
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
:hover
.iconDelete
{
display
:
block
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
.iconDelete1
{
cursor
:
pointer
;
display
:
none
;
position
:
absolute
;
top
:
-4px
;
right
:
16px
;
color
:
#2CA4F0
;
z-index
:
5
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
:hover
.iconDelete1
{
display
:
block
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
.iconDelete2
{
cursor
:
pointer
;
display
:
none
;
position
:
absolute
;
top
:
-4px
;
right
:
32px
;
color
:
#34BFA3
;
z-index
:
5
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
:hover
.iconDelete2
{
display
:
block
;
}
.page_MyCustomer
._mc_list
>
ul
>
li
>
img
{
position
:
absolute
;
z-index
:
5
;
}
.page_MyCustomer
._head_info_box
{
text-align
:
center
;
font-size
:
14px
;
color
:
#333333
}
.page_MyCustomer
._head_info_box
img
{
height
:
48px
;
width
:
48px
;
border-radius
:
50%
;
margin-bottom
:
5px
}
.page_MyCustomer
._head_info_box
p
{
margin-bottom
:
8px
;
}
.page_MyCustomer
._head_info_box
.icon-img_dianhua
{
color
:
#09D49D
}
.page_MyCustomer
._addr
{
color
:
#666666
}
.page_MyCustomer
._record
{
padding
:
5px
10px
15px
;
border-bottom
:
1px
solid
#F5F5F5
;
min-height
:
120px
}
.page_MyCustomer
._record
p
{
margin-bottom
:
10px
;
text-align
:
center
;
font-size
:
14px
;
border-radius
:
4px
;
padding
:
2px
;
color
:
white
;
background-color
:
#257BF1
;
}
.page_MyCustomer
._record
p
._other_n
{
color
:
#666666
;
background-color
:
#F5F5F5
;
}
.page_MyCustomer
._record
p
._fist_n
{
color
:
#09D49D
;
background-color
:
#E9F7F1
;
}
.page_MyCustomer
._record
p
._other
{
color
:
#257BF1
;
background-color
:
#E4EFFF
;
}
.page_MyCustomer
._bt
{
font-size
:
14px
;
margin-top
:
15px
;
text-align
:
center
;
color
:
#666
;
}
.page_MyCustomer
._bt
span
{
color
:
#FF9000
}
.page_MyCustomer
._edHeight
{
height
:
340px
;
}
.page_MyCustomer
._scrollbar
::-webkit-scrollbar
{
width
:
4px
;
height
:
8px
;
}
.page_MyCustomer
._scrollbar
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
-webkit-box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#c9c9c9
;
}
.page_MyCustomer
._scrollbar
::-webkit-scrollbar-track
{
-webkit-box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
4px
;
background
:
#EDEDED
;
}
.page_MyCustomer
._mc_edit
._tit
{
padding-left
:
10px
;
border-left
:
3px
solid
#E95252
;
font-size
:
16px
;
font-family
:
'PingFangSc-Fine'
;
color
:
#000000
}
.page_MyCustomer
._mc_edit
._info_box
ul
._form
li
{
float
:
left
;
}
.page_MyCustomer
._check_list
{
padding-left
:
120px
;
margin-bottom
:
20px
;
}
.page_MyCustomer
._check_box
.el-form-item
{
margin-bottom
:
0
}
.page_MyCustomer
._info_box
.el-form-item__label
{
font-size
:
12px
;
color
:
#666
;
}
._remark
textarea
{
resize
:
none
;
width
:
646px
;
height
:
100px
}
.page_MyCustomer
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
...
...
@@ -46,9 +249,11 @@
position
:
relative
;
overflow
:
hidden
;
}
.page_MyCustomer
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
.page_MyCustomer
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
...
...
@@ -57,22 +262,50 @@
line-height
:
148px
;
text-align
:
center
;
}
.page_MyCustomer
.avatar
{
width
:
148px
;
height
:
148px
;
display
:
block
;
}
.page_MyCustomerSearch
{
width
:
100%
;
min-height
:
auto
;
overflow
:
hidden
;
padding
:
0
0
20px
0
;}
.page_MyCustomerSearch
li
{
float
:
left
;
font-size
:
12px
;
color
:
#666
;
margin
:
20px
0
0px
0
;}
.page_MyCustomerSearch
li
>
span
{
display
:
inline-block
;
}
.page_MyCustomerSearch
li
span
>
em
{
display
:
inline-block
;
min-width
:
60px
;
text-align
:
right
;
font-style
:
normal
;
margin
:
0
12px
0
0
;}
.page_MyCustomerSearch
li
:last-child
{
float
:
right
;}
.page_MyCustomerSearch
._class_b
{
.page_MyCustomerSearch
{
width
:
100%
;
min-height
:
auto
;
overflow
:
hidden
;
padding
:
0
0
20px
0
;
}
.page_MyCustomerSearch
li
{
float
:
left
;
font-size
:
12px
;
color
:
#666
;
margin
:
20px
0
0px
0
;
}
.page_MyCustomerSearch
li
>
span
{
display
:
inline-block
;
}
.page_MyCustomerSearch
li
span
>
em
{
display
:
inline-block
;
min-width
:
60px
;
text-align
:
right
;
font-style
:
normal
;
margin
:
0
12px
0
0
;
}
.page_MyCustomerSearch
li
:last-child
{
float
:
right
;
}
.page_MyCustomerSearch
._class_b
{
color
:
#257BF1
!important
}
.xqBtn
{
}
.xqBtn
{
background
:
#09D49D
;
color
:
#fff
!important
;
color
:
#fff
!important
;
width
:
100%
;
display
:
inline-block
;
border-radius
:
4px
;
...
...
@@ -80,17 +313,21 @@
height
:
38px
;
line-height
:
38px
;
text-align
:
center
;
}
.page_MyCustomer
.upload-demo
{
}
.page_MyCustomer
.upload-demo
{
text-align
:
center
;
}
}
</
style
>
<
template
>
<div
class=
"page_MyCustomer"
>
<div
class=
"page_MyCustomerSearch"
>
<li>
<span>
<em>
{{
$t
(
'salesModule.keyWords'
)
}}
:
</em><el-input
class=
'w220'
v-model=
'msg.CustomerName'
@
keyup
.
enter
.
native=
"getList()"
:placeholder=
"$t('salesModule.enterPhone')"
></el-input>
<em>
{{
$t
(
'salesModule.keyWords'
)
}}
:
</em>
<el-input
class=
'w220'
v-model=
'msg.CustomerName'
@
keyup
.
enter
.
native=
"getList()"
:placeholder=
"$t('salesModule.enterPhone')"
></el-input>
</span>
</li>
<li>
...
...
@@ -122,31 +359,38 @@
<ul
class=
"clearfix"
>
<li
v-for=
"(item,index) in dataList"
@
click=
"goUrl(type,item.customerId)"
>
<i
class=
"iconDelete1 iconfont icon-kehuguanxi_kehu"
@
click
.
stop=
"goUrlT('empBankAccount',item.customerId)"
></i>
<i
class=
"iconDelete1 iconfont icon-kehuguanxi_kehu"
@
click
.
stop=
"goUrlT('empBankAccount',item.customerId)"
></i>
<i
class=
"iconDelete iconfont icon-kehuguanxi_delete1"
@
click
.
stop=
"deleteCustomer(item)"
></i>
<img
src=
"../../assets/img/vip.png"
style=
"left: 134px; top: 50px;"
v-show=
"item.isMember==1&&type==2"
/>
<img
src=
"../../assets/img/nopass.png"
style=
"left: 152px; top:75px;"
v-show=
"type==3"
/>
<img
src=
"../../assets/img/vip.png"
style=
"left: 134px; top: 50px;"
v-show=
"item.isMember==1&&type==2"
/>
<img
src=
"../../assets/img/nopass.png"
style=
"left: 152px; top:75px;"
v-show=
"type==3"
/>
<div
class=
"_head_info_box"
>
<img
v-if=
'!item.icon'
src=
"../../assets/img/litheader.png"
/>
<img
v-if=
'item.icon'
:onerror=
"defaultImg"
:src=
'item.icon'
/>
<img
v-if=
'!item.icon'
src=
"../../assets/img/litheader.png"
/>
<img
v-if=
'item.icon'
:onerror=
"defaultImg"
:src=
'item.icon'
/>
<p>
{{
item
.
contact
}}
</p>
<p><i
class=
"iconfont icon-img_dianhua"
></i>
{{
item
.
contactNumber
}}
</p>
<p
class=
"_addr"
>
{{
item
.
customerName
}}
<i
class=
"iconfont icon-shimingrenzheng"
:class=
"
{'_class_b': item.RealNameAuthentication===1}">
</i>
<i
class=
"iconfont icon-heimingdan"
v-show=
"item.customerStatus===4"
:title=
"$t('salesModule.OntheBlackList')"
></i>
<p
class=
"_addr"
>
{{
item
.
customerName
}}
<i
class=
"iconfont icon-shimingrenzheng"
:class=
"
{'_class_b': item.RealNameAuthentication===1}">
</i>
<i
class=
"iconfont icon-heimingdan"
v-show=
"item.customerStatus===4"
:title=
"$t('salesModule.OntheBlackList')"
></i>
</p>
</div>
<div
class=
"_record"
v-if=
"item.customerAccountId!=0"
>
<p
class=
"_fist_n"
v-if=
"item.customerVisitList.length>0"
>
{{
$t
(
'salesModule.Yuefang'
)
}}
:
{{
item
.
customerVisitList
[
0
].
visitDateTime
}}
</p>
<p
class=
"_fist_n"
v-if=
"item.customerVisitList.length>0"
>
{{
$t
(
'salesModule.Yuefang'
)
}}
:
{{
item
.
customerVisitList
[
0
].
visitDateTime
}}
</p>
<p
class=
"_fist_n"
v-else
>
{{
$t
(
'salesModule.noYuefang'
)
}}
</p>
<p
class=
"_other"
v-if=
"item.customerVisitList[1]"
>
{{
$t
(
'salesModule.Visit'
)
}}
:
{{
item
.
customerVisitList
[
1
].
visitDateTime
}}
</p>
<p
class=
"_other"
v-if=
"item.customerVisitList[1]"
>
{{
$t
(
'salesModule.Visit'
)
}}
:
{{
item
.
customerVisitList
[
1
].
visitDateTime
}}
</p>
<p
class=
"_other"
v-else
>
{{
$t
(
'salesModule.noVisit'
)
}}
</p>
<p
class=
"_other"
>
{{
$t
(
'salesModule.TotalVisit'
)
}}
:
{{
item
.
visiteCount
}}
</p>
<p
class=
"_fist_n"
>
{{
$t
(
'salesModule.HappinessPassbook'
)
}}
<span>
{{
item
.
cL_Balance
}}
</span></p>
</div>
<div
class=
"_record"
v-else
>
<p
class=
"_fist_n"
v-if=
"item.customerVisitList.length>0"
>
{{
$t
(
'salesModule.Yuefang'
)
}}
:
{{
item
.
customerVisitList
[
0
].
visitDateTime
}}
</p>
<p
class=
"_fist_n"
v-if=
"item.customerVisitList.length>0"
>
{{
$t
(
'salesModule.Yuefang'
)
}}
:
{{
item
.
customerVisitList
[
0
].
visitDateTime
}}
</p>
<p
class=
"_fist_n"
v-else
>
{{
$t
(
'salesModule.noYuefang'
)
}}
</p>
<p
class=
"_other_n"
v-if=
"item.customerVisitList[1]"
>
{{
$t
(
'salesModule.Visit'
)
}}
:
{{
item
.
customerVisitList
[
1
].
visitDateTime
}}
</p>
<p
class=
"_other_n"
v-if=
"item.customerVisitList[1]"
>
{{
$t
(
'salesModule.Visit'
)
}}
:
{{
item
.
customerVisitList
[
1
].
visitDateTime
}}
</p>
<p
class=
"_other_n"
v-else
>
{{
$t
(
'salesModule.noVisit'
)
}}
</p>
<p
class=
"_fist_n"
>
{{
$t
(
'salesModule.HappinessPassbook'
)
}}
<span>
{{
item
.
cL_Balance
}}
</span></p>
</div>
...
...
@@ -158,7 +402,8 @@
<p>
{{
$t
(
'salesModule.belongUnion'
)
}}
<span>
{{
item
.
allianceName
}}
</span></p>
</el-col>
<el-col
:span=
"6"
style=
"text-align:right;padding:0"
>
<span
class=
"xqBtn"
@
click
.
stop=
"goUrC('CustomerAnalysis',item.customerId)"
>
{{
$t
(
'fnc.xiangqing'
)
}}
</span>
<span
class=
"xqBtn"
@
click
.
stop=
"goUrC('CustomerAnalysis',item.customerId)"
>
{{
$t
(
'fnc.xiangqing'
)
}}
</span>
</el-col>
</el-row>
...
...
@@ -167,13 +412,8 @@
<div
class=
"clearfix"
></div>
<p
v-show=
"dataList.length==0"
class=
"fz14 color333 alcenter"
>
{{
$t
(
'system.content_noData'
)
}}
</p>
</ul>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
"this.msg.pageSize"
:total=
"total"
>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
"this.msg.pageSize"
:total=
"total"
>
</el-pagination>
</div>
<div
class=
"_mc_edit _scrollbar"
:class=
"addShow==true?'edHeightOne':''"
>
...
...
@@ -186,18 +426,21 @@
<el-form
class=
"_info_box clearfix"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"120px"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('restaurant.res_ContactNumber')"
prop=
"contactNumber"
>
<el-input
:disabled=
"isOldPerson"
v-model=
"addMsg.contactNumber"
@
input=
'searchHistory(addMsg.contactNumber)'
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
<el-form-item
:label=
"$t('restaurant.res_ContactNumber')"
prop=
"contactNumber"
>
<el-input
:disabled=
"isOldPerson"
v-model=
"addMsg.contactNumber"
@
input=
'searchHistory(addMsg.contactNumber)'
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('salesModule.storeName')"
prop=
"customerName"
>
<el-input
:disabled=
"isOldPerson"
v-model=
"addMsg.customerName"
:placeholder=
"$t('pub.pleaseImport')"
maxlength=
"20"
></el-input>
<el-input
:disabled=
"isOldPerson"
v-model=
"addMsg.customerName"
:placeholder=
"$t('pub.pleaseImport')"
maxlength=
"20"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('hotel.suplier_contact')"
prop=
"contact"
>
<el-input
:disabled=
"isOldPerson"
v-model=
"addMsg.contact"
:placeholder=
"$t('pub.pleaseImport')"
maxlength=
"20"
></el-input>
<el-input
:disabled=
"isOldPerson"
v-model=
"addMsg.contact"
:placeholder=
"$t('pub.pleaseImport')"
maxlength=
"20"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
...
...
@@ -207,42 +450,31 @@
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('pub.area')"
>
<el-select
filterable
v-model=
'addMsg.Province'
@
change=
'getCity'
>
<el-option
v-for=
'item in provinceList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
<el-option
v-for=
'item in provinceList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
<el-select
filterable
v-model=
'addMsg.City'
@
change=
'getRegion'
>
<el-option
v-for=
'item in cityList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
<el-option
v-for=
'item in cityList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
<el-select
filterable
v-model=
'addMsg.District'
>
<el-option
v-for=
'item in regionList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
<el-option
v-for=
'item in regionList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('hotel.hotel_detailinfo')"
prop=
"address"
>
<el-input
v-model=
"addMsg.address"
:placeholder=
"$t('salesModule.HouseNumber')"
maxlength=
"50"
></el-input>
<el-input
v-model=
"addMsg.address"
:placeholder=
"$t('salesModule.HouseNumber')"
maxlength=
"50"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('salesModule.Belongbrand')"
prop=
"brandIds"
>
<el-select
filterable
class=
'multiple_input'
multiple
v-model=
'addMsg.brandIds'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
'item in CustomerBrandList'
:label=
'item.name'
:value=
'item.id'
:key=
'item.id'
>
<el-select
filterable
class=
'multiple_input'
multiple
v-model=
'addMsg.brandIds'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
'item in CustomerBrandList'
:label=
'item.name'
:value=
'item.id'
:key=
'item.id'
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -250,10 +482,7 @@
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('visaT.post')"
prop=
"Duty"
>
<el-select
filterable
v-model=
'addMsg.Duty'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
'item in zw'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
<el-option
v-for=
'item in zw'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -261,10 +490,7 @@
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('salesModule.premises')"
prop=
"Premises"
>
<el-select
filterable
v-model=
'addMsg.Premises'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
'item in jycs'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
<el-option
v-for=
'item in jycs'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -272,10 +498,7 @@
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('salesModule.CustomerSource')"
prop=
"CustomerSourceType"
>
<el-select
filterable
v-model=
'addMsg.CustomerSourceType'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
'item in khly'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
<el-option
v-for=
'item in khly'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -296,12 +519,8 @@
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('salesModule.BusinessPhoto')"
>
<el-upload
class=
"avatar-uploader"
action=
""
:http-request=
"uploadImg"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
>
<el-upload
class=
"avatar-uploader"
action=
""
:http-request=
"uploadImg"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
>
<img
v-if=
"BusinessCardPhotos"
:src=
"BusinessCardPhotos"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
...
...
@@ -309,12 +528,8 @@
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('salesModule.doorPhoto')"
>
<el-upload
class=
"avatar-uploader"
action=
""
:http-request=
"uploadImg1"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
>
<el-upload
class=
"avatar-uploader"
action=
""
:http-request=
"uploadImg1"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
>
<img
v-if=
"HousePhotos"
:src=
"HousePhotos"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
...
...
@@ -322,12 +537,8 @@
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('salesModule.businessPhoto')"
>
<el-upload
class=
"avatar-uploader"
action=
""
:http-request=
"uploadImg2"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
>
<el-upload
class=
"avatar-uploader"
action=
""
:http-request=
"uploadImg2"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
>
<img
v-if=
"Images"
:src=
"Images"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
...
...
@@ -354,96 +565,139 @@
</div>
</
template
>
<
script
>
export
default
{
data
(){
return
{
allowAdd
:
true
,
export
default
{
data
()
{
return
{
allowAdd
:
true
,
defaultImg
:
'this.src="'
+
require
(
"../../assets/img/litheader.png"
)
+
'"'
,
BusinessCardPhotos
:
''
,
HousePhotos
:
''
,
Images
:
''
,
isOldPerson
:
false
,
type
:
2
,
msg
:{
pageIndex
:
1
,
pageSize
:
12
,
CustomerStatus
:
2
,
CustomerName
:
''
,
Address
:
''
,
Country
:
'-1'
,
Province
:
'-1'
,
City
:
'-1'
,
District
:
'-1'
,
},
addMsg
:{
CustomerId
:
0
,
customerName
:
''
,
contact
:
''
,
contactNumber
:
''
,
address
:
''
,
brandIds
:[],
remark
:
''
,
Duty
:
''
,
Premises
:
''
,
CustomerId
:
'0'
,
BusinessCardPhotos
:[],
HousePhotos
:[],
Images
:[],
CustomerSourceType
:
''
,
CustomerSource
:
''
,
Country
:
'2'
,
Province
:
''
,
City
:
''
,
District
:
''
,
},
addMsgS
:{
isPreFilled
:
true
,
customerInfo
:{},
customerVisit
:{
remark
:
''
,
expectVisitDateTime
:
''
,
expectHour
:
0
}
},
rules
:{
contact
:[{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterContratPerson'
),
trigger
:
"blur"
}],
customerName
:[{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterCustomer'
),
trigger
:
"blur"
}],
contactNumber
:[
{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterPNum'
),
trigger
:
"blur"
},
{
pattern
:
/^1
[
123457890
]\d{9}
$/
,
message
:
this
.
$t
(
'rule.EnterRightNum'
)
}
BusinessCardPhotos
:
''
,
HousePhotos
:
''
,
Images
:
''
,
isOldPerson
:
false
,
type
:
2
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
CustomerStatus
:
2
,
CustomerName
:
''
,
Address
:
''
,
Country
:
'-1'
,
Province
:
'-1'
,
City
:
'-1'
,
District
:
'-1'
,
},
addMsg
:
{
CustomerId
:
0
,
customerName
:
''
,
contact
:
''
,
contactNumber
:
''
,
address
:
''
,
brandIds
:
[],
remark
:
''
,
Duty
:
''
,
Premises
:
''
,
CustomerId
:
'0'
,
BusinessCardPhotos
:
[],
HousePhotos
:
[],
Images
:
[],
CustomerSourceType
:
''
,
CustomerSource
:
''
,
Country
:
'2'
,
Province
:
''
,
City
:
''
,
District
:
''
,
},
addMsgS
:
{
isPreFilled
:
true
,
customerInfo
:
{},
customerVisit
:
{
remark
:
''
,
expectVisitDateTime
:
''
,
expectHour
:
0
}
},
rules
:
{
contact
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterContratPerson'
),
trigger
:
"blur"
}],
customerName
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterCustomer'
),
trigger
:
"blur"
}],
contactNumber
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterPNum'
),
trigger
:
"blur"
},
{
pattern
:
/^1
[
123457890
]\d{9}
$/
,
message
:
this
.
$t
(
'rule.EnterRightNum'
)
}
],
brandIds
:[{
required
:
true
,
message
:
this
.
$t
(
'rule.ChoiceBrand'
),
trigger
:
"change"
}],
Duty
:[{
required
:
true
,
message
:
this
.
$t
(
'rule.ChoiceJob'
),
trigger
:
"change"
}],
remark
:[{
required
:
false
,
message
:
this
.
$t
(
'rule.ChoiceJob'
),
trigger
:
"change"
}],
Premises
:[{
required
:
true
,
message
:
this
.
$t
(
'rule.ChoiceJYCS'
),
trigger
:
"change"
}],
CustomerSourceType
:[{
required
:
true
,
message
:
this
.
$t
(
'rule.ChoiceCusFrom'
),
trigger
:
"change"
}],
customerName
:[{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterCusName'
),
trigger
:
"blur"
}],
address
:[{
required
:
true
,
message
:
this
.
$t
(
'visaT.qsradder'
),
trigger
:
"blur"
}],
},
dataList
:[],
CustomerBrandList
:[],
checkedCities
:[],
checkAll
:
false
,
addShow
:
false
,
noData
:
false
,
loading
:
true
,
isIndeterminate
:
true
,
brandIds
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.ChoiceBrand'
),
trigger
:
"change"
}],
Duty
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.ChoiceJob'
),
trigger
:
"change"
}],
remark
:
[{
required
:
false
,
message
:
this
.
$t
(
'rule.ChoiceJob'
),
trigger
:
"change"
}],
Premises
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.ChoiceJYCS'
),
trigger
:
"change"
}],
CustomerSourceType
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.ChoiceCusFrom'
),
trigger
:
"change"
}],
customerName
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterCusName'
),
trigger
:
"blur"
}],
address
:
[{
required
:
true
,
message
:
this
.
$t
(
'visaT.qsradder'
),
trigger
:
"blur"
}],
},
dataList
:
[],
CustomerBrandList
:
[],
checkedCities
:
[],
checkAll
:
false
,
addShow
:
false
,
noData
:
false
,
loading
:
true
,
isIndeterminate
:
true
,
total
:
0
,
currentPage
:
1
,
provinceList
:[],
cityList
:[],
regionList
:[],
jycs
:[],
//经营场所
zw
:[],
//职务
khly
:[],
//客户来源
outerVisible
:
false
,
}
},
methods
:{
provinceList
:
[],
cityList
:
[],
regionList
:
[],
jycs
:
[],
//经营场所
zw
:
[],
//职务
khly
:
[],
//客户来源
outerVisible
:
false
,
}
},
methods
:
{
//导入
getImportFileUrl
()
{
let
url
=
this
.
domainManager
().
UploadFileUrl
+
"?cmd=dmc_post_LocalFileUpload&fileType=1&fileLimit=1&Type=2&ui
d="
+
"?cmd=dmc_post_LocalFileUpload&fileType=1&fileLimit=1&Type=9&EmployeeI
d="
+
this
.
getLocalStorage
().
EmployeeId
+
"&importType="
+
this
.
importType
;
...
...
@@ -460,12 +714,13 @@ export default {
//下载模板文件
getDownList
()
{
this
.
apipost
(
"AirTicket_post_DownAirticket
"
,
{},
"app_customer_GetCustomerTemplate
"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
downList
=
this
.
domainManager
().
LocalTemplateFileDownLoadUrl
+
res
.
data
.
data
.
FileUrl
;
window
.
open
(
this
.
downList
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -473,19 +728,20 @@ export default {
err
=>
{}
);
},
deleteCustomer
(
obj
){
deleteCustomer
(
obj
)
{
this
.
$confirm
(
this
.
$t
(
'tips.shifoushanchu'
),
this
.
$t
(
'tips.tips'
),
{
confirmButtonText
:
this
.
$t
(
'pub.sureBtn'
),
cancelButtonText
:
this
.
$t
(
'pub.cancelBtn'
),
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'app_customer_Remove'
,{
ID
:
obj
.
customerId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
apipost
(
'app_customer_Remove'
,
{
ID
:
obj
.
customerId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
getList
()
}
},
err
=>
{})
},
err
=>
{})
}).
catch
(()
=>
{
this
.
Error
(
'已取消删除!'
);
});
...
...
@@ -496,7 +752,7 @@ export default {
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
this
.
BusinessCardPhotos
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
this
.
BusinessCardPhotos
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
});
},
uploadImg1
(
file
)
{
...
...
@@ -505,7 +761,7 @@ export default {
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
this
.
HousePhotos
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
this
.
HousePhotos
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
});
},
uploadImg2
(
file
)
{
...
...
@@ -514,249 +770,272 @@ export default {
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
this
.
Images
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
this
.
Images
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
});
},
searchHistory
(
val
){
if
(
val
.
length
==
11
){
this
.
apipost
(
'app_customer_GetCustomerByContactNumber'
,{
ContactNumber
:
val
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
if
(
res
.
data
.
data
.
customerInfo
.
customerId
>
0
)
{
searchHistory
(
val
)
{
if
(
val
.
length
==
11
)
{
this
.
apipost
(
'app_customer_GetCustomerByContactNumber'
,
{
ContactNumber
:
val
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
data
.
customerInfo
.
customerId
>
0
)
{
this
.
isOldPerson
=
true
let
x
=
res
.
data
.
data
.
customerInfo
this
.
addMsg
=
x
this
.
addMsg
.
Province
=
x
.
province
this
.
addMsg
.
customerId
=
x
.
customerId
this
.
isOldPerson
=
true
let
x
=
res
.
data
.
data
.
customerInfo
this
.
addMsg
=
x
this
.
addMsg
.
Province
=
x
.
province
this
.
addMsg
.
customerId
=
x
.
customerId
this
.
getCity1
()
this
.
addMsg
.
City
=
x
.
city
this
.
addMsg
.
City
=
x
.
city
this
.
getRegion1
()
this
.
addMsg
.
District
=
x
.
district
this
.
addMsg
.
Duty
=
x
.
duty
this
.
addMsg
.
Premises
=
x
.
premises
this
.
addMsg
.
CustomerSourceType
=
x
.
customerSourceType
let
dictid
=
[]
res
.
data
.
data
.
brandList
.
forEach
(
x
=>
{
this
.
addMsg
.
District
=
x
.
district
this
.
addMsg
.
Duty
=
x
.
duty
this
.
addMsg
.
Premises
=
x
.
premises
this
.
addMsg
.
CustomerSourceType
=
x
.
customerSourceType
let
dictid
=
[]
res
.
data
.
data
.
brandList
.
forEach
(
x
=>
{
dictid
.
push
(
x
.
dictId
)
})
this
.
addMsg
.
brandIds
=
dictid
this
.
addMsg
.
brandIds
=
dictid
if
(
x
.
businessCardPhotos
&&
x
.
businessCardPhotos
.
length
>
0
)
{
this
.
BusinessCardPhotos
=
x
.
businessCardPhotos
[
0
]
if
(
x
.
businessCardPhotos
&&
x
.
businessCardPhotos
.
length
>
0
)
{
this
.
BusinessCardPhotos
=
x
.
businessCardPhotos
[
0
]
}
if
(
x
.
images
&&
x
.
images
.
length
>
0
)
{
this
.
Images
=
x
.
images
[
0
]
if
(
x
.
images
&&
x
.
images
.
length
>
0
)
{
this
.
Images
=
x
.
images
[
0
]
}
if
(
x
.
housePhotos
&&
x
.
housePhotos
.
length
>
0
)
{
this
.
HousePhotos
=
x
.
housePhotos
[
0
]
if
(
x
.
housePhotos
&&
x
.
housePhotos
.
length
>
0
)
{
this
.
HousePhotos
=
x
.
housePhotos
[
0
]
}
}
this
.
allowAdd
=
true
}
else
{
if
(
res
.
data
.
message
.
indexOf
(
'已注册客户信息'
)
!=-
1
)
{
this
.
allowAdd
=
false
this
.
allowAdd
=
true
}
else
{
if
(
res
.
data
.
message
.
indexOf
(
'已注册客户信息'
)
!=
-
1
)
{
this
.
allowAdd
=
false
}
this
.
$message
.
error
(
res
.
data
.
message
)
}
},
err
=>
{})
}
else
{}
},
err
=>
{})
}
else
{}
},
getJycs
()
{
this
.
apipost
(
'app_today_visit_GetCustomerPremisesEnum'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
jycs
=
res
.
data
.
data
getJycs
()
{
this
.
apipost
(
'app_today_visit_GetCustomerPremisesEnum'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
jycs
=
res
.
data
.
data
}
},
err
=>
{})
},
err
=>
{})
},
getZw
()
{
this
.
apipost
(
'app_today_visit_GetCustomerDutyEnum'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
zw
=
res
.
data
.
data
getZw
()
{
this
.
apipost
(
'app_today_visit_GetCustomerDutyEnum'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
zw
=
res
.
data
.
data
}
},
err
=>
{})
},
err
=>
{})
},
getKhly
()
{
this
.
apipost
(
'app_customer_GetCustomerSourceEnum'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
khly
=
res
.
data
.
data
getKhly
()
{
this
.
apipost
(
'app_customer_GetCustomerSourceEnum'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
khly
=
res
.
data
.
data
}
},
err
=>
{})
},
err
=>
{})
},
getProvince
(){
this
.
apipost
(
'app_customer_GetChildList'
,{
Id
:
2
,
"level"
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
provinceList
=
res
.
data
.
data
getProvince
()
{
this
.
apipost
(
'app_customer_GetChildList'
,
{
Id
:
2
,
"level"
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
provinceList
=
res
.
data
.
data
}
},
err
=>
{})
},
err
=>
{})
},
getCity
(){
this
.
apipost
(
'app_customer_GetChildList'
,{
Id
:
this
.
addMsg
.
Province
,
"level"
:
2
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
cityList
=
res
.
data
.
data
this
.
regionList
=
[]
this
.
addMsg
.
City
=
''
this
.
addMsg
.
District
=
''
getCity
()
{
this
.
apipost
(
'app_customer_GetChildList'
,
{
Id
:
this
.
addMsg
.
Province
,
"level"
:
2
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
cityList
=
res
.
data
.
data
this
.
regionList
=
[]
this
.
addMsg
.
City
=
''
this
.
addMsg
.
District
=
''
}
},
err
=>
{})
},
err
=>
{})
},
getRegion
(){
this
.
apipost
(
'app_customer_GetChildList'
,{
Id
:
this
.
addMsg
.
City
,
"level"
:
3
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
regionList
=
res
.
data
.
data
this
.
addMsg
.
District
=
''
getRegion
()
{
this
.
apipost
(
'app_customer_GetChildList'
,
{
Id
:
this
.
addMsg
.
City
,
"level"
:
3
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
regionList
=
res
.
data
.
data
this
.
addMsg
.
District
=
''
}
},
err
=>
{})
},
err
=>
{})
},
getCity1
(){
this
.
apipost
(
'app_customer_GetChildList'
,{
Id
:
this
.
addMsg
.
Province
,
"level"
:
2
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
cityList
=
res
.
data
.
data
getCity1
()
{
this
.
apipost
(
'app_customer_GetChildList'
,
{
Id
:
this
.
addMsg
.
Province
,
"level"
:
2
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
cityList
=
res
.
data
.
data
}
},
err
=>
{})
},
err
=>
{})
},
getRegion1
(){
this
.
apipost
(
'app_customer_GetChildList'
,{
Id
:
this
.
addMsg
.
City
,
"level"
:
3
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
regionList
=
res
.
data
.
data
getRegion1
()
{
this
.
apipost
(
'app_customer_GetChildList'
,
{
Id
:
this
.
addMsg
.
City
,
"level"
:
3
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
regionList
=
res
.
data
.
data
}
},
err
=>
{})
},
err
=>
{})
},
goUrl
(
type
,
id
){
this
.
$router
.
push
({
name
:
'MyCustomerDetail'
,
query
:{
"id"
:
id
}
})
goUrl
(
type
,
id
)
{
this
.
$router
.
push
({
name
:
'MyCustomerDetail'
,
query
:
{
"id"
:
id
}
})
},
goUrC
(
path
,
customerId
){
this
.
$router
.
push
({
name
:
path
,
query
:{
"customerId"
:
customerId
,
blank
:
'y'
}
})
goUrC
(
path
,
customerId
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
"customerId"
:
customerId
,
blank
:
'y'
}
})
},
goUrlT
(
path
,
id
){
this
.
$router
.
push
({
name
:
path
,
query
:{
"id"
:
id
,
"type"
:
8
}
})
goUrlT
(
path
,
id
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
"id"
:
id
,
"type"
:
8
}
})
},
clickGetList
(
type
)
{
this
.
msg
.
pageIndex
=
1
clickGetList
(
type
)
{
this
.
msg
.
pageIndex
=
1
this
.
currentPage
=
1
this
.
msg
.
CustomerStatus
=
type
this
.
msg
.
CustomerStatus
=
type
this
.
getList
()
},
getList
(){
// 获取列表数据
this
.
apipost
(
'app_get_my_customer_list'
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
0
)
{
getList
()
{
// 获取列表数据
this
.
apipost
(
'app_get_my_customer_list'
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
0
)
{
this
.
loading
=
false
;
this
.
dataList
=
[]
}
else
{
this
.
dataList
=
[]
}
else
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
this
.
loading
=
false
;
}
},
err
=>
{})
},
err
=>
{})
},
getCustomerBrandList
(){
// 获取品牌
this
.
apipost
(
'app_get_customer_brand'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
getCustomerBrandList
()
{
// 获取品牌
this
.
apipost
(
'app_get_customer_brand'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CustomerBrandList
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
err
=>
{})
},
saveVisa
(){
// 保存
if
(
this
.
addMsg
.
District
==
''
)
{
this
.
addMsg
.
District
=
0
saveVisa
()
{
// 保存
if
(
this
.
addMsg
.
District
==
''
)
{
this
.
addMsg
.
District
=
0
}
this
.
addMsgS
.
customerInfo
=
this
.
addMsg
if
(
this
.
BusinessCardPhotos
)
{
this
.
addMsg
.
BusinessCardPhotos
=
[]
if
(
this
.
BusinessCardPhotos
)
{
this
.
addMsg
.
BusinessCardPhotos
=
[]
this
.
addMsg
.
BusinessCardPhotos
.
push
(
this
.
BusinessCardPhotos
)
}
if
(
this
.
HousePhotos
)
{
this
.
addMsg
.
HousePhotos
=
[]
if
(
this
.
HousePhotos
)
{
this
.
addMsg
.
HousePhotos
=
[]
this
.
addMsg
.
HousePhotos
.
push
(
this
.
HousePhotos
)
}
if
(
this
.
Images
)
{
this
.
addMsg
.
Images
=
[]
if
(
this
.
Images
)
{
this
.
addMsg
.
Images
=
[]
this
.
addMsg
.
Images
.
push
(
this
.
Images
)
}
let
sheng
=
''
let
shi
=
''
let
qu
=
''
if
(
this
.
addMsg
.
District
==
''
)
{
this
.
addMsg
.
District
=
0
let
sheng
=
''
let
shi
=
''
let
qu
=
''
if
(
this
.
addMsg
.
District
==
''
)
{
this
.
addMsg
.
District
=
0
}
if
(
this
.
addMsg
.
City
==
''
)
{
this
.
addMsg
.
City
=
0
if
(
this
.
addMsg
.
City
==
''
)
{
this
.
addMsg
.
City
=
0
}
this
.
provinceList
.
forEach
(
item
=>
{
if
(
this
.
addMsg
.
Province
==
item
.
ID
)
{
sheng
=
item
.
Name
this
.
provinceList
.
forEach
(
item
=>
{
if
(
this
.
addMsg
.
Province
==
item
.
ID
)
{
sheng
=
item
.
Name
}
})
this
.
cityList
.
forEach
(
item
=>
{
if
(
this
.
addMsg
.
City
==
item
.
ID
)
{
shi
=
item
.
Name
this
.
cityList
.
forEach
(
item
=>
{
if
(
this
.
addMsg
.
City
==
item
.
ID
)
{
shi
=
item
.
Name
}
})
this
.
regionList
.
forEach
(
item
=>
{
if
(
this
.
addMsg
.
District
==
item
.
ID
)
{
qu
=
item
.
Name
this
.
regionList
.
forEach
(
item
=>
{
if
(
this
.
addMsg
.
District
==
item
.
ID
)
{
qu
=
item
.
Name
}
})
let
AreaName
=
sheng
+
shi
+
qu
this
.
addMsg
.
address
=
AreaName
+
','
+
this
.
addMsg
.
address
this
.
apipost
(
'app_add_new_visit_customer'
,
this
.
addMsgS
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
{
customerName
:
''
,
contact
:
''
,
contactNumber
:
''
,
address
:
''
,
brandIds
:
[],
remark
:
''
,
Duty
:
''
,
Premises
:
''
,
CustomerId
:
'0'
,
BusinessCardPhotos
:
[],
HousePhotos
:
[],
Images
:
[],
CustomerSourceType
:
''
,
CustomerSource
:
''
,
Country
:
'2'
,
Province
:
''
,
City
:
''
,
District
:
''
,
}
this
.
addMsgS
.
customerVisit
.
expectVisitDateTime
=
''
let
AreaName
=
sheng
+
shi
+
qu
this
.
addMsg
.
address
=
AreaName
+
','
+
this
.
addMsg
.
address
this
.
apipost
(
'app_add_new_visit_customer'
,
this
.
addMsgS
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
{
customerName
:
''
,
contact
:
''
,
contactNumber
:
''
,
address
:
''
,
brandIds
:
[],
remark
:
''
,
Duty
:
''
,
Premises
:
''
,
CustomerId
:
'0'
,
BusinessCardPhotos
:
[],
HousePhotos
:
[],
Images
:
[],
CustomerSourceType
:
''
,
CustomerSource
:
''
,
Country
:
'2'
,
Province
:
''
,
City
:
''
,
District
:
''
,
}
this
.
addMsgS
.
customerVisit
.
expectVisitDateTime
=
''
this
.
$message
.
success
(
res
.
data
.
message
)
this
.
addShow
=
false
this
.
addShow
=
false
this
.
getList
()
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
cancelEdit
(){
// 取消新增
this
.
addShow
=
false
this
.
addMsg
=
{
customerName
:
''
,
contact
:
''
,
contactNumber
:
''
,
address
:
''
,
remark
:
''
,
brandIds
:
[],
}
this
.
BusinessCardPhotos
=
''
,
this
.
HousePhotos
=
''
,
this
.
Images
=
''
,
this
.
addMsgS
.
customerVisit
.
expectVisitDateTime
=
''
},
err
=>
{})
},
cancelEdit
()
{
// 取消新增
this
.
addShow
=
false
this
.
addMsg
=
{
customerName
:
''
,
contact
:
''
,
contactNumber
:
''
,
address
:
''
,
remark
:
''
,
brandIds
:
[],
}
this
.
BusinessCardPhotos
=
''
,
this
.
HousePhotos
=
''
,
this
.
Images
=
''
,
this
.
addMsgS
.
customerVisit
.
expectVisitDateTime
=
''
this
.
resetForm
(
'addMsg'
)
},
resetForm
(
formName
)
{
// 重置表单
...
...
@@ -766,7 +1045,8 @@ export default {
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
},
mounted
(){
},
mounted
()
{
this
.
getList
()
this
.
getCustomerBrandList
()
this
.
getProvince
()
...
...
@@ -774,5 +1054,6 @@ export default {
this
.
getZw
()
this
.
getKhly
()
}
}
}
</
script
>
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