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
4cf0bb33
Commit
4cf0bb33
authored
Feb 10, 2020
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增客户
parent
8ed6aef2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
846 additions
and
285 deletions
+846
-285
App.vue
src/App.vue
+4
-1
init.css
src/assets/css/init.css
+7
-0
tablevoerride.css
src/assets/css/tablevoerride.css
+3
-0
kehu1.png
src/assets/img/cust/kehu1.png
+0
-0
kehu2.png
src/assets/img/cust/kehu2.png
+0
-0
upimg.png
src/assets/img/cust/upimg.png
+0
-0
customerManage.vue
src/components/customerManage/customerManage.vue
+637
-254
customerManageDemo.vue
src/components/customerManage/customerManageDemo.vue
+30
-30
select.vue
src/components/select/select.vue
+116
-0
index.js
src/plugins/index.js
+49
-0
No files found.
src/App.vue
View file @
4cf0bb33
...
...
@@ -28,10 +28,13 @@ export default {
<
style
>
@import
'./assets/global/font.css'
;
@import
'//at.alicdn.com/t/font_1627123_
1vlackz9u42
.css'
;
@import
'//at.alicdn.com/t/font_1627123_
qxpux1x1ujg
.css'
;
/* @import './assets/css/common.css'; */
@import
'./assets/css/init.css'
;
@import
'./assets/css/tablevoerride.css'
;
.el-table__fixed-body-wrapper
.el-table__body
{
padding-bottom
:
8px
!important
;
}
body
,
html
{
padding
:
0px
;
margin
:
0px
;
...
...
src/assets/css/init.css
View file @
4cf0bb33
...
...
@@ -153,4 +153,11 @@ table { border-collapse:collapse; border-spacing:0; }
/* 字体大小 */
.font-size-12
{
font-size
:
12px
;
}
/* flex */
.flex-center
{
display
:
flex
;
align-items
:
center
;
}
\ No newline at end of file
src/assets/css/tablevoerride.css
View file @
4cf0bb33
...
...
@@ -34,4 +34,7 @@
}
.el-table--border
{
border-right
:
1px
solid
#E6E6E6
!important
;
}
.el-table__fixed-body-wrapper
.el-table__body
{
padding-bottom
:
8px
!important
;
}
\ No newline at end of file
src/assets/img/cust/kehu1.png
0 → 100644
View file @
4cf0bb33
983 Bytes
src/assets/img/cust/kehu2.png
0 → 100644
View file @
4cf0bb33
625 Bytes
src/assets/img/cust/upimg.png
0 → 100644
View file @
4cf0bb33
1.13 KB
src/components/customerManage/customerManage.vue
View file @
4cf0bb33
...
...
@@ -2,7 +2,7 @@
.customerManage
.tools
{
display
:
flex
;
justify-content
:
space-between
;
padding-bottom
:
2
5
px
;
padding-bottom
:
2
0
px
;
border-bottom
:
1px
solid
rgba
(
226
,
228
,
235
,
1
);
align-items
:
center
;
}
...
...
@@ -29,7 +29,8 @@
padding-left
:
5px
;
}
.customerManage
.query-box
{
padding
:
25px
0
;
padding
:
25px
10px
;
background-color
:
white
;
}
.customerManage
.table-btn
{
display
:
inline-block
;
...
...
@@ -98,6 +99,7 @@
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-top
:
20px
;
max-height
:
600px
;
overflow
:
auto
;
}
.customerManage
.add-box-btn.el-button
{
border-radius
:
0
;
...
...
@@ -152,7 +154,89 @@
display
:
inline-block
;
margin-right
:
10px
;
}
.customerManage
.selection-box
{
display
:
flex
;
align-items
:
center
;
}
.customerManage
.selection-box
span
{
font-size
:
12px
;
text-align
:
center
;
}
.customerManage
.selection-box
.el-button
{
color
:
#666
;
background-color
:
#f6f8fa
;
border-color
:
#f6f8fa
;
font-size
:
12px
;
height
:
28px
;
border-radius
:
14px
;
padding
:
5px
12px
;
margin-left
:
15px
;
}
.customerManage
.selection-box
.el-button
i
{
margin-right
:
5px
;
}
.customerManage
.selection-box
.el-button
:hover
{
background
:
#2362fb
;
border-color
:
#2362fb
;
color
:
#fff
;
}
.customerManage
.up-img-box
.uib-item
{
margin-right
:
30px
;
width
:
120px
;
height
:
120px
;
background-color
:
white
;
position
:
relative
;
margin-bottom
:
30px
;
}
.customerManage
.up-img-box
.uib-item
p
{
position
:
absolute
;
bottom
:
-30px
;
font-size
:
12px
;
text-align
:
center
;
width
:
100%
;
}
.customerManage
.up-img-box
.uib-item
:hover
.imgzhe-btn
{
opacity
:
1
}
.customerManage
.imgzhe
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
top
:
0
;
}
.customerManage
.imgzhe
.imgzhe-btn
{
background
:
rgba
(
0
,
0
,
0
,
0.6
);
width
:
100%
;
height
:
100%
;
text-align
:
center
;
line-height
:
120px
;
position
:
absolute
;
top
:
0
;
opacity
:
1
;
transition
:
all
linear
.5s
}
.customerManage
.imgzhe
.imgzhe-btn
i
{
font-size
:
22px
;
margin-right
:
5px
;
color
:
white
;
cursor
:
pointer
;
}
.customerManage
.up-ctrl
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
}
.customerManage
.up-ctrl
>
div
{
width
:
100%
;
height
:
100%
;
text-align
:
center
;
line-height
:
140px
;
}
.customerManage
.el-dialog
{
min-width
:
760px
;
}
</
style
>
<
template
>
<div
class=
"customerManage"
>
...
...
@@ -178,213 +262,219 @@
</div>
</div>
<div
class=
"query-box"
>
<div
v-if=
"!multipleSelection.length"
>
</div>
<div
v-else
class=
"flex-center"
>
<p
class=
"font-size-12"
>
已选
<span
class=
"font-color-link"
>
{{
multipleSelection
.
length
}}
</span>
项
</p>
<div
class=
"selection-box"
>
<el-button
v-for=
"(item, index) in selectionList"
:key=
"index"
@
click=
"item.myFun"
><i
:class=
"item.class"
></i>
{{
item
.
name
}}
</el-button>
</div>
</div>
</div>
<div
class=
"page-content"
>
<el-table
v-if=
"loading"
v-loading=
"true"
:data=
"[]"
>
<el-table-column
v-for=
"(item, index) in queryType2"
:key=
"index"
:label=
"item.label"
>
</el-table-column>
</el-table>
<el-table
v-if=
"!loading"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width: 100%"
height=
"730"
border
row-class-name=
"font-size-12"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
fixed
type=
"selection"
width=
"40"
></el-table-column>
<el-table-column
fixed
prop=
"CustomerName"
label=
"客户名称"
width=
"120"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<p
@
click=
"openDetails(scope)"
class=
"font-color-link cp"
>
{{
scope
.
row
.
CustomerName
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"MainSourceStr"
label=
"客户来源"
v-if=
"queryType[1].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"Contact"
label=
"联系人"
v-if=
"queryType[2].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"ContactNumber"
label=
"联系电话"
sortable
v-if=
"queryType[3].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"Address"
label=
"地址"
v-if=
"queryType[4].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"BusinessCount"
label=
"商机数"
v-if=
"queryType[5].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"OrderCount"
label=
"交易订单数"
sortable
width=
"100"
v-if=
"queryType[6].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"OrderMoney"
label=
"交易金额"
sortable
v-if=
"queryType[7].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CouponCount"
label=
"优惠券"
sortable
v-if=
"queryType[8].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"Client_Balance"
label=
"幸福存折"
sortable
v-if=
"queryType[9].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CustomerLevelStr"
label=
"客户级别"
sortable
v-if=
"queryType[10].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CustomerStatus"
label=
"审核状态"
v-if=
"queryType[11].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"RealNameAuthentication"
label=
"实名认证状态"
v-if=
"queryType[12].show"
width=
"120"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.RealNameAuthentication === 1"
class=
"font-color-success"
>
已认证
</p>
<p
v-else
class=
"font-color-warning"
>
未认证
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"IsAppLogin"
label=
"APP激活状态"
v-if=
"queryType[13].show"
width=
"120"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.IsAppLogin === 0"
class=
"font-color-warning"
>
未激活
</p>
<p
v-else
class=
"font-color-success"
>
已激活
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"CustomerPublic"
label=
"距进入公海天数"
sortable
v-if=
"queryType[14].show"
width=
"120"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"NowSellName"
label=
"负责人"
width=
"120"
v-if=
"queryType[15].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"Visit"
label=
"近期约访"
sortable
v-if=
"queryType[16].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"UpdateTime"
label=
"更新时间"
sortable
v-if=
"queryType[17].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CreateTimestr"
label=
"创建时间"
sortable
v-if=
"queryType[18].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"IsCarefor"
fixed=
"right"
width=
"50"
label=
"关注"
>
<
template
slot-scope=
"scope"
>
<p>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"关注"
placement=
"top"
>
<i
v-if=
"scope.row.IsCarefor === 0"
class=
"el-icon-star-off cp"
></i>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"取消关注"
placement=
"top"
>
<i
v-if=
"scope.row.IsCarefor === 1"
class=
"el-icon-star-on cp"
></i>
</el-tooltip>
</p>
</
template
>
</el-table-column>
<el-table-column
width=
"40"
fixed=
"right"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
<el-popover
placement=
"bottom"
width=
"240"
>
<mySelect
:queryType=
"queryType"
@
listenTochildEvent=
"showMessageFromChild"
/>
<i
class=
"el-icon-s-operation cp"
slot=
"reference"
></i>
</el-popover>
</
template
>
</el-table-column>
</el-table>
</div>
<el-table
v-if=
"loading"
v-loading=
"true"
:data=
"[]"
>
<el-table-column
v-for=
"(item, index) in queryType2"
:key=
"index"
:label=
"item.label"
>
</el-table-column>
</el-table>
<el-table
v-if=
"!loading"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width: 100%"
height=
"730"
border
row-class-name=
"font-size-12"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
fixed
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
fixed
prop=
"CustomerName"
label=
"客户名称"
width=
"120"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<p
@
click=
"openDetails(scope)"
class=
"font-color-link cp"
>
{{
scope
.
row
.
CustomerName
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"MainSourceStr"
label=
"客户来源"
v-if=
"queryType[1].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"Contact"
label=
"联系人"
v-if=
"queryType[2].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"ContactNumber"
label=
"联系电话"
v-if=
"queryType[3].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"Address"
label=
"地址"
v-if=
"queryType[4].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"BusinessCount"
label=
"商机数"
v-if=
"queryType[5].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"OrderCount"
label=
"交易订单数"
width=
"100"
v-if=
"queryType[6].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"OrderMoney"
label=
"交易金额"
v-if=
"queryType[7].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CouponCount"
label=
"优惠券"
v-if=
"queryType[8].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"Client_Balance"
label=
"幸福存折"
v-if=
"queryType[9].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CustomerLevelStr"
label=
"客户级别"
v-if=
"queryType[10].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CustomerStatus"
label=
"审核状态"
v-if=
"queryType[11].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"RealNameAuthentication"
label=
"实名认证状态"
v-if=
"queryType[12].show"
width=
"120"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.RealNameAuthentication === 1"
class=
"font-color-success"
>
已认证
</p>
<p
v-else
class=
"font-color-warning"
>
未认证
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"IsAppLogin"
label=
"APP激活状态"
v-if=
"queryType[13].show"
width=
"120"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.IsAppLogin === 0"
class=
"font-color-warning"
>
未激活
</p>
<p
v-else
class=
"font-color-success"
>
已激活
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"CustomerPublic"
label=
"距进入公海天数"
v-if=
"queryType[14].show"
width=
"120"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"NowSellName"
label=
"负责人"
width=
"120"
v-if=
"queryType[15].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"Visit"
label=
"近期约访"
v-if=
"queryType[16].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"UpdateTime"
label=
"更新时间"
v-if=
"queryType[17].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CreateTimestr"
label=
"创建时间"
v-if=
"queryType[18].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"IsCarefor"
fixed=
"right"
width=
"50"
label=
"关注"
>
<
template
slot-scope=
"scope"
>
<p>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"关注"
placement=
"top"
>
<i
v-if=
"scope.row.IsCarefor === 0"
class=
"el-icon-star-off cp"
></i>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"取消关注"
placement=
"top"
>
<i
v-if=
"scope.row.IsCarefor === 1"
class=
"el-icon-star-on cp"
></i>
</el-tooltip>
</p>
</
template
>
</el-table-column>
<el-table-column
width=
"40"
fixed=
"right"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
<el-popover
placement=
"bottom"
width=
"240"
:value=
"mySelectCtrl"
>
<mySelect
:queryType=
"queryType"
@
listenTochildEvent=
"showMessageFromChild"
/>
<i
class=
"el-icon-s-operation cp"
@
click=
"showMessageFromChild()"
slot=
"reference"
></i>
</el-popover>
</
template
>
</el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="提醒" placement="top">
<i class="table-btn blue iconfont icontishi"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="联系客户" placement="top">
<i class="table-btn org iconfont icondianhua"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="客户详情" placement="top">
<i class="table-btn green iconfont iconsuosou" @click="drawer = true"></i>
</el-tooltip>
</template>
</el-table-column> -->
</el-table>
<div>
<el-pagination
<
!-- <
el-pagination
class="Mypagination"
background
@current-change="handleCurrentChange"
:page-sizes=
"[
15, 30, 6
0, 100]"
:page-sizes="[
30, 60, 9
0, 100]"
:page-size="msg.pageSize"
layout="sizes, prev, pager, next"
@size-change="handleSizeChange"
:total="total">
</el-pagination>
</el-pagination>
-->
</div>
<el-drawer
title=
"我是标题"
...
...
@@ -408,13 +498,13 @@
</div>
</el-drawer>
<el-dialog
:visible
.
sync=
"dialogTableVisible"
custom-class=
"add-box"
>
<el-dialog
:visible
.
sync=
"dialogTableVisible"
:close-on-click-modal=
"false"
custom-class=
"add-box"
>
<div
class=
"add-tit"
slot=
"title"
>
<p><span></span>
新建客户
</p>
<span
icon=
"el-icon-close"
></span>
</div>
<div
class=
"form-box"
>
<el-form
:model=
"form"
class=
"MyEditForm"
:rules=
"rules"
>
<el-form
:model=
"form"
ref=
"form"
class=
"MyEditForm"
:rules=
"rules"
>
<p
class=
"form-box-tit"
><span
class=
"radius"
></span>
基本信息
</p>
<el-row
:gutter=
"30"
>
<el-col
:span=
"8"
>
...
...
@@ -429,7 +519,7 @@
<el-form-item
label=
"客户级别"
prop=
"CustomerLevel"
>
<el-select
v-model=
"form.CustomerLevel"
placeholder=
"请选择客户级别"
>
<el-option
v-for=
"item in
Source
Enum"
v-for=
"item in
CustomerLevel
Enum"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
...
...
@@ -439,14 +529,14 @@
</div>
</el-col>
<el-col
:span=
"8"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"
客户来源"
prop=
"CustomerSourceType
"
>
<el-select
v-model=
"form.
CustomerSourceType"
placeholder=
"请选择客户来源
"
>
<div
class=
"MyEditForm-item
label-pad-left
"
>
<el-form-item
label=
"
所属品牌"
prop=
"BrandIds
"
>
<el-select
v-model=
"form.
BrandIds"
placeholder=
"请选择所属品牌
"
>
<el-option
v-for=
"item in
SourceEnum
"
:key=
"item.
ID
"
:label=
"item.
N
ame"
:value=
"item.
ID
"
>
v-for=
"item in
CustomerBrandList
"
:key=
"item.
id
"
:label=
"item.
n
ame"
:value=
"item.
id
"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -470,10 +560,10 @@
</el-col>
<el-col
:span=
"8"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"
客户来源"
prop=
"CustomerSourceType
"
>
<el-select
v-model=
"form.
CustomerSourceType
"
placeholder=
"请选择客户来源"
>
<el-form-item
label=
"
经营场所"
prop=
"Premises
"
>
<el-select
v-model=
"form.
Premises
"
placeholder=
"请选择客户来源"
>
<el-option
v-for=
"item in
SourceEnum
"
v-for=
"item in
jycs
"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
...
...
@@ -486,8 +576,8 @@
<el-row
:gutter=
"30"
>
<el-col
:span=
"8"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"
经营场所"
prop=
"Premises
"
>
<el-select
v-model=
"form.
Premises
"
placeholder=
"请选择客户来源"
>
<el-form-item
label=
"
客户来源"
prop=
"CustomerSourceType
"
>
<el-select
v-model=
"form.
CustomerSourceType
"
placeholder=
"请选择客户来源"
>
<el-option
v-for=
"item in SourceEnum"
:key=
"item.ID"
...
...
@@ -498,17 +588,10 @@
</el-form-item>
</div>
</el-col>
<el-col
:span=
"8"
>
<div
class=
"MyEditForm-item label-pad-left"
>
<el-form-item
label=
"所属品牌"
>
<el-select
v-model=
"form.BrandIds"
placeholder=
"请选择所属品牌"
>
<el-option
v-for=
"item in SourceEnum"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
<el-col
:span=
"16"
v-if=
"form.CustomerSourceType === 6"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"客户来源信息"
prop=
"CustomerSource"
>
<el-input
type=
"textarea"
placeholder=
"请输入客户来源信息"
v-model=
"form.CustomerSource"
></el-input>
</el-form-item>
</div>
</el-col>
...
...
@@ -527,9 +610,11 @@
<el-col
:span=
"6"
>
<div
class=
"MyEditForm-item label-pad-left"
>
<el-form-item
label=
"国/省/市/区"
>
<el-select
v-model=
"form.Country"
placeholder=
"国家"
>
<el-select
@
change=
"getProvinceList(form.Country,1)"
v-model=
"form.Country"
placeholder=
"国家"
>
<el-option
v-for=
"item in
SourceEnum
"
v-for=
"item in
countryList
"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
...
...
@@ -541,9 +626,11 @@
<el-col
:span=
"6"
>
<div
class=
"MyEditForm-item label-pad-left"
>
<el-form-item
label=
"国/省/市/区"
>
<el-select
v-model=
"form.Province"
placeholder=
"省份"
>
<el-select
@
change=
"getProvinceList(form.Province,2)"
v-model=
"form.Province"
placeholder=
"省份"
>
<el-option
v-for=
"item in
SourceEnum
"
v-for=
"item in
provinceList
"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
...
...
@@ -555,9 +642,11 @@
<el-col
:span=
"6"
>
<div
class=
"MyEditForm-item label-pad-left"
>
<el-form-item
label=
"国/省/市/区"
>
<el-select
v-model=
"form.City"
placeholder=
"城市"
>
<el-select
@
change=
"getProvinceList(form.City,3)"
v-model=
"form.City"
placeholder=
"城市"
>
<el-option
v-for=
"item in
SourceEnum
"
v-for=
"item in
cityList
"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
...
...
@@ -571,7 +660,7 @@
<el-form-item
label=
"国/省/市/区"
>
<el-select
v-model=
"form.District"
placeholder=
"地区"
>
<el-option
v-for=
"item in
SourceEnum
"
v-for=
"item in
district
"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
...
...
@@ -585,18 +674,75 @@
<el-col
:span=
"24"
>
<div
class=
"MyEditForm-item label-pad-left"
>
<el-form-item
label=
"定位"
>
<el-input
type=
"textarea"
placeholder=
"请输入详情地址"
v-model=
"form.
Remark
"
></el-input>
<el-input
type=
"textarea"
placeholder=
"请输入详情地址"
v-model=
"form.
Address
"
></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<p
class=
"form-box-tit"
><span
class=
"radius"
></span>
上传图片
</p>
<div
class=
"up-img-box flex-center"
>
<div
class=
"uib-item"
>
<
template
>
<div
class=
"imgzhe"
:style=
"
{backgroundImage: 'url(' + form.Images + ')', backgroundSize:'100% 100%'}" v-if="form.Images.length">
<div
class=
"imgzhe-btn"
>
<i
@
click
.
stop=
"showImg(1)"
class=
"el-icon-search"
></i>
<i
@
click=
"delImg(1)"
class=
"el-icon-delete"
></i>
</div>
</div>
<div
v-else
class=
"up-ctrl"
>
<el-upload
:file-list=
"fileList"
:limit=
"1"
:http-request=
"uploadImg"
:multiple=
"true"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
action=
""
>
<img
src=
"../../assets/img/cust/upimg.png"
alt=
""
>
</el-upload>
</div>
</
template
>
<p>
图片
</p>
</div>
<div
class=
"uib-item"
>
<
template
>
<div
class=
"imgzhe"
:style=
"
{backgroundImage: 'url(' + form.BusinessCardPhotos + ')', backgroundSize:'100% 100%'}" v-if="form.BusinessCardPhotos.length">
<div
class=
"imgzhe-btn"
>
<i
@
click
.
stop=
"showImg(2)"
class=
"el-icon-search"
></i>
<i
@
click=
"delImg(2)"
class=
"el-icon-delete"
></i>
</div>
</div>
<div
v-else
class=
"up-ctrl"
>
<el-upload
:file-list=
"fileList"
:limit=
"1"
:http-request=
"uploadImg2"
:multiple=
"true"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
action=
""
>
<img
src=
"../../assets/img/cust/upimg.png"
alt=
""
>
</el-upload>
</div>
</
template
>
<p>
名片照片
</p>
</div>
<div
class=
"uib-item"
>
<
template
>
<div
class=
"imgzhe"
:style=
"
{backgroundImage: 'url(' + form.HousePhotos + ')', backgroundSize:'100% 100%'}" v-if="form.HousePhotos.length">
<div
class=
"imgzhe-btn"
>
<i
@
click
.
stop=
"showImg(3)"
class=
"el-icon-search"
></i>
<i
@
click=
"delImg(3)"
class=
"el-icon-delete"
></i>
</div>
</div>
<div
v-else
class=
"up-ctrl"
>
<el-upload
:file-list=
"fileList"
:limit=
"1"
:http-request=
"uploadImg3"
:multiple=
"true"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
action=
""
>
<img
src=
"../../assets/img/cust/upimg.png"
alt=
""
>
</el-upload>
</div>
</
template
>
<p>
门牌照片
</p>
</div>
</div>
</el-form>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"add-box-btn"
@
click=
"
dialogFormVisible = false
"
>
确 定
</el-button>
<el-button
class=
"add-box-btn add-box-cancel"
@
click=
"dialog
FormVisible = false
"
>
取 消
</el-button>
<el-button
type=
"primary"
class=
"add-box-btn"
@
click=
"
submitForm('form')
"
>
确 定
</el-button>
<el-button
class=
"add-box-btn add-box-cancel"
@
click=
"dialog
TableVisible = false, resetForm('form')
"
>
取 消
</el-button>
</div>
</el-dialog>
<el-dialog
:visible
.
sync=
"dialogVisible"
>
<img
width=
"100%"
:src=
"dialogImageUrl"
alt=
""
>
</el-dialog>
</div>
</template>
<
script
>
...
...
@@ -731,6 +877,9 @@ export default {
CustomerName
:
[
{
required
:
true
,
message
:
'请输入客户名称'
,
trigger
:
'blur'
}
],
CustomerSource
:
[
{
required
:
true
,
message
:
'请输入客户来源信息'
,
trigger
:
'blur'
}
],
CustomerLevel
:
[
{
required
:
true
,
message
:
'请选择客户级别'
,
trigger
:
'change'
}
],
...
...
@@ -745,14 +894,27 @@ export default {
],
Premises
:
[
{
required
:
true
,
message
:
'请选择经营场所'
,
trigger
:
'change'
}
]
],
BrandIds
:
[
{
required
:
true
,
message
:
'请选择所属品牌'
,
trigger
:
'change'
}
],
},
dialogVisible
:
false
,
mySelectCtrl
:
false
,
drawer
:
false
,
loading
:
true
,
dialogTableVisible
:
false
,
tableData
:
[],
multipleSelection
:
[],
CustomerLevelEnum
:
[],
CustomerBrandList
:
[],
fileList
:
[],
countryList
:
""
,
provinceList
:
""
,
dialogImageUrl
:
''
,
cityList
:
""
,
district
:
""
,
jycs
:
[],
value
:
''
,
SourceEnum
:
[],
msg
:
{
...
...
@@ -760,7 +922,7 @@ export default {
CustomerName
:
''
,
Contact
:
''
,
pageIndex
:
1
,
pageSize
:
15
,
pageSize
:
30
,
ContactNumber
:
''
,
WhereType
:
-
1
,
OrderBy
:
''
...
...
@@ -775,7 +937,7 @@ export default {
Address
:
''
,
Remark
:
''
,
Premises
:
''
,
CustomerStatus
:
''
,
CustomerStatus
:
0
,
CustomerSourceType
:
''
,
CustomerSource
:
''
,
Country
:
''
,
...
...
@@ -783,26 +945,47 @@ export default {
City
:
''
,
District
:
''
,
BrandIds
:
''
,
Images
:
''
,
BusinessCardPhotos
:
''
,
HousePhotos
:
''
Images
:
[]
,
BusinessCardPhotos
:
[]
,
HousePhotos
:
[],
},
WhereType
List
:
[
selection
List
:
[
{
id
:
-
1
,
name
:
'全部'
name
:
'转移'
,
class
:
'iconfont iconplus-transfer'
,
myFun
:
this
.
transfer
},{
name
:
'放入公海'
,
class
:
'iconfont icongonghaiguanli'
,
myFun
:
this
.
waters
},{
name
:
'更改成交状态'
,
class
:
'iconfont iconwancheng'
,
myFun
:
this
.
changeState
},{
name
:
'导出选中'
,
class
:
'iconfont icondaochu'
,
myFun
:
this
.
export
},{
id
:
1
,
name
:
'我负责的'
name
:
'删除'
,
class
:
'iconfont icondelete'
,
myFun
:
this
.
delete
},{
id
:
2
,
name
:
'下属的'
name
:
'锁定'
,
class
:
'iconfont iconsuoguan'
,
myFun
:
this
.
locking
},{
id
:
3
,
name
:
'我参与的'
name
:
'解锁'
,
class
:
'iconfont iconsuokai'
,
myFun
:
this
.
Unlock
},{
id
:
4
,
name
:
'我关注的'
name
:
'添加团队成员'
,
class
:
'iconfont icontianjia'
,
myFun
:
this
.
addCust
},{
name
:
'删除团队成员'
,
class
:
'iconfont iconjian'
,
myFun
:
this
.
delCust
},
]
};
...
...
@@ -810,8 +993,141 @@ export default {
mounted
()
{
this
.
getList
()
this
.
GetCustomerSourceEnum
()
this
.
GetCustomerLevelEnum
()
this
.
getJycs
()
this
.
getCustomerBrandList
()
this
.
getCountryList
()
},
methods
:
{
uploadImg
(
file
)
{
//上传
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
url
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
this
.
form
.
Images
.
push
(
url
);
});
},
uploadImg2
(
file
)
{
//上传
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
url
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
this
.
form
.
BusinessCardPhotos
.
push
(
url
);
});
},
uploadImg3
(
file
)
{
//上传
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
url
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
this
.
form
.
HousePhotos
.
push
(
url
);
});
},
showImg
(
i
){
let
url
=
''
if
(
i
===
1
)
{
url
=
this
.
form
.
Images
[
0
]
}
else
if
(
i
===
2
)
{
url
=
this
.
form
.
BusinessCardPhotos
[
0
]
}
else
if
(
i
===
3
)
{
url
=
this
.
form
.
HousePhotos
[
0
]
}
this
.
dialogImageUrl
=
url
;
this
.
dialogVisible
=
true
;
},
delImg
(
i
){
if
(
i
===
1
)
{
this
.
form
.
Images
=
[]
}
else
if
(
i
===
2
)
{
this
.
form
.
BusinessCardPhotos
=
[]
}
else
if
(
i
===
3
)
{
this
.
form
.
HousePhotos
=
[]
}
},
//锁定
locking
(){
console
.
log
(
'锁定'
)
},
//解锁
Unlock
(){
console
.
log
(
'解锁'
)
},
//添加团队成员
addCust
(){
console
.
log
(
'添加团队成员'
)
},
//删除团队成员
delCust
(){
console
.
log
(
'删除团队成员'
)
},
//删除
delete
(){
console
.
log
(
'删除'
)
},
//导出
export
(){
console
.
log
(
'导出'
)
},
// 更改状态
changeState
(){
console
.
log
(
'更改状态'
)
},
// 放入公海
waters
(){
console
.
log
(
'放入公海'
)
},
// 转移
transfer
(){
console
.
log
(
'转移'
)
},
//根据省份获取城市
getProvinceList
(
ID
,
type
)
{
let
msg
=
{
Id
:
ID
};
if
(
type
==
1
)
{
this
.
msg
.
Province
=
""
;
this
.
msg
.
City
=
""
;
this
.
msg
.
District
=
""
;
}
else
if
(
type
==
2
)
{
this
.
msg
.
City
=
""
;
this
.
msg
.
District
=
""
;
}
else
if
(
type
==
3
)
{
this
.
msg
.
District
=
""
;
}
if
(
this
.
msg
.
QCountry
!==
""
)
{
this
.
apipost2
(
"dict_post_Destination_GetChildList"
,
msg
,
res
=>
{
if
(
type
==
1
)
{
this
.
provinceList
=
res
.
data
.
data
;
}
else
if
(
type
==
2
)
{
this
.
cityList
=
res
.
data
.
data
;
}
else
if
(
type
==
3
)
{
this
.
district
=
res
.
data
.
data
;
}
},
err
=>
{}
);
}
},
//获取国家
getCountryList
()
{
this
.
apipost2
(
"dict_post_Destination_GetCountry"
,
{},
res
=>
{
this
.
countryList
=
res
.
data
.
data
;
},
err
=>
{}
);
},
showMessageFromChild
(
list
){
this
.
mySelectCtrl
=!
this
.
mySelectCtrl
if
(
list
)
{
...
...
@@ -834,6 +1150,66 @@ export default {
handleClose
(
done
)
{
done
();
},
addData
(){
this
.
apipost
(
'/api/Customer/CreateMyCustomer'
,
this
.
form
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
dialogTableVisible
=
false
;
this
.
getList
()
this
.
resetForm
(
"form"
);
}
})
},
submitForm
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
addData
();
}
else
{
return
false
;
}
});
},
resetForm
(
formName
)
{
// 重置表单
this
.
form
=
{
CustomerId
:
0
,
CustomerName
:
''
,
CustomerLevel
:
''
,
Contact
:
''
,
ContactNumber
:
''
,
Address
:
''
,
Remark
:
''
,
Premises
:
''
,
CustomerStatus
:
0
,
CustomerSourceType
:
''
,
CustomerSource
:
''
,
Country
:
''
,
Province
:
''
,
City
:
''
,
District
:
''
,
BrandIds
:
''
,
Images
:
''
,
BusinessCardPhotos
:
''
,
HousePhotos
:
''
}
this
.
$refs
[
formName
].
resetFields
();
},
getCustomerBrandList
()
{
// 获取品牌
this
.
apipost2
(
'app_get_customer_brand'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CustomerBrandList
=
res
.
data
.
data
;
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
getJycs
()
{
this
.
apipost2
(
'app_today_visit_GetCustomerPremisesEnum'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
jycs
=
res
.
data
.
data
}
},
err
=>
{})
},
getList
:
function
(){
this
.
tableData
=
[]
this
.
loading
=
true
...
...
@@ -845,6 +1221,13 @@ export default {
}
})
},
GetCustomerLevelEnum
(){
this
.
apipost
(
'/api/Customer/GetCustomerLevelEnum'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CustomerLevelEnum
=
res
.
data
.
data
}
})
},
GetCustomerSourceEnum
(){
this
.
apipost
(
'/api/Customer/GetCustomerSourceEnum'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
...
...
src/components/customerManage/customerManageDemo.vue
View file @
4cf0bb33
<
style
>
.customerManage
.tools
{
.customerManage
2
.tools
{
display
:
flex
;
justify-content
:
space-between
;
padding-bottom
:
15px
;
...
...
@@ -9,39 +9,39 @@
left
:
30px
;
right
:
30px
;
}
.customerManage
.tools
h1
{
.customerManage
2
.tools
h1
{
font-weight
:
bold
;
font-size
:
18px
;
font-family
:
perfectFont
!important
;
}
.customerManage
.tools
.rightmenu
{
.customerManage
2
.tools
.rightmenu
{
display
:
flex
;
align-items
:
center
;
}
.customerManage
.tools
.rightmenu
.el-button
{
.customerManage
2
.tools
.rightmenu
.el-button
{
border-radius
:
0
;
padding
:
9px
30px
;
margin-right
:
20px
;
}
.customerManage
.tools
.gaoji
{
.customerManage
2
.tools
.gaoji
{
font-size
:
12px
;
font-weight
:
400
;
color
:
rgba
(
13
,
36
,
129
,
1
);
margin-right
:
35px
;
cursor
:
pointer
;
}
.customerManage
.tools
.gaoji
:hover
{
.customerManage
2
.tools
.gaoji
:hover
{
color
:
rgba
(
13
,
36
,
129
,
.8
);
}
.customerManage
.tools
.gaoji
.iconfont
{
.customerManage
2
.tools
.gaoji
.iconfont
{
font-size
:
12px
;
padding-left
:
5px
;
}
.customerManage
.query-box
{
.customerManage
2
.query-box
{
padding
:
25px
0
;
display
:
none
;
}
.customerManage
.table-btn
{
.customerManage
2
.table-btn
{
display
:
inline-block
;
width
:
24px
;
height
:
24px
;
...
...
@@ -50,41 +50,41 @@
cursor
:
pointer
;
margin-right
:
10px
;
}
.customerManage
.table-btn.blue
{
.customerManage
2
.table-btn.blue
{
color
:
rgba
(
13
,
36
,
129
,
1
);
background-color
:
rgba
(
13
,
36
,
129
,
.3
);
}
.customerManage
.table-btn.org
{
.customerManage
2
.table-btn.org
{
color
:
#FFA475
;
background-color
:
rgba
(
255
,
164
,
117
,
.3
);
}
.customerManage
.table-btn.green
{
.customerManage
2
.table-btn.green
{
color
:
rgba
(
148
,
184
,
119
,
1
);
background-color
:
rgba
(
148
,
184
,
119
,
.3
);
}
.customerManage
.table-btn.blue
:hover
{
.customerManage
2
.table-btn.blue
:hover
{
background-color
:
rgba
(
13
,
36
,
129
,
.5
);
}
.customerManage
.table-btn.org
:hover
{
.customerManage
2
.table-btn.org
:hover
{
background-color
:
rgba
(
255
,
164
,
117
,
.5
);
}
.customerManage
.table-btn.green
:hover
{
.customerManage
2
.table-btn.green
:hover
{
background-color
:
rgba
(
148
,
184
,
119
,
.5
);
}
.customerManage
.add-box
.add-tit
{
.customerManage
2
.add-box
.add-tit
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
height
:
20px
;
}
.customerManage
.add-box
.add-tit
p
{
.customerManage
2
.add-box
.add-tit
p
{
display
:
flex
;
align-items
:
center
;
font-weight
:
bold
;
color
:
rgba
(
17
,
17
,
17
,
1
);
font-size
:
14px
;
}
.customerManage
.add-box
.add-tit
p
span
{
.customerManage
2
.add-box
.add-tit
p
span
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
...
...
@@ -92,48 +92,48 @@
border-radius
:
50%
;
margin-right
:
10px
;
}
.customerManage
.add-box
.el-dialog__header
{
.customerManage
2
.add-box
.el-dialog__header
{
padding
:
15px
20px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
}
.customerManage
.add-box
.dialog-footer
{
.customerManage
2
.add-box
.dialog-footer
{
text-align
:
center
;
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-bottom
:
20px
;
}
.customerManage
.add-box
.el-dialog__footer
{
.customerManage
2
.add-box
.el-dialog__footer
{
padding
:
0
;
}
.customerManage
.add-box
.el-dialog__body
{
.customerManage
2
.add-box
.el-dialog__body
{
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-top
:
20px
;
}
.customerManage
.add-box-btn.el-button
{
.customerManage
2
.add-box-btn.el-button
{
border-radius
:
0
;
background-color
:
rgba
(
13
,
36
,
129
,
.8
);
border-color
:
rgba
(
13
,
36
,
129
,
.8
);
color
:
white
;
padding
:
12px
43px
;
}
.customerManage
.add-box-btn.el-button
:hover
{
.customerManage
2
.add-box-btn.el-button
:hover
{
background-color
:
rgba
(
13
,
36
,
129
,
1
);
border-color
:
rgba
(
13
,
36
,
129
,
1
);
color
:
white
;
}
.customerManage
.add-box-btn.el-button.add-box-cancel
{
.customerManage
2
.add-box-btn.el-button.add-box-cancel
{
color
:
rgba
(
13
,
36
,
129
,
.8
);
background-color
:
white
;
}
.customerManage
.add-box-btn.el-button.add-box-cancel
:hover
{
.customerManage
2
.add-box-btn.el-button.add-box-cancel
:hover
{
color
:
rgba
(
13
,
36
,
129
,
1
);
background-color
:
white
;
}
.customerManage
.form-box
.form-box-tit
{
.customerManage
2
.form-box
.form-box-tit
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
20px
;
}
.customerManage
.form-box
.radius
{
.customerManage
2
.form-box
.radius
{
display
:
flex
;
width
:
4px
;
height
:
4px
;
...
...
@@ -141,7 +141,7 @@
border-radius
:
50%
;
margin-right
:
10px
;
}
.customerManage
.page-content
{
.customerManage
2
.page-content
{
position
:
absolute
;
bottom
:
30px
;
left
:
30px
;
...
...
@@ -150,7 +150,7 @@
}
</
style
>
<
template
>
<div
class=
"customerManage"
>
<div
class=
"customerManage
2
"
>
<div
class=
"tools"
>
<h1>
客户管理
</h1>
<div
class=
"rightmenu"
>
...
...
src/components/select/select.vue
0 → 100644
View file @
4cf0bb33
<
style
>
.select-main
{
font-size
:
12px
;
}
.select-main
.select-box
{
height
:
300px
;
overflow-y
:
auto
;
}
.select-main
.select-item
{
display
:
flex
;
align-items
:
center
;
padding
:
5px
;
}
.select-main
.select-item
.el-switch
{
margin-right
:
10px
;
}
.select-main
.select-input
{
margin-bottom
:
5px
;
}
.select-main
.select-btn
{
margin-top
:
5px
;
text-align
:
right
;
}
.select-main
.select-btn
.crm-btn.crm-btn-mini
{
margin-right
:
0
;
}
.select-main
.el-switch__core
{
width
:
33px
!important
;
}
</
style
>
<
template
>
<div
class=
"select-main"
>
<div
class=
"select-input"
>
<el-input
@
input=
"queryItem"
v-model=
"input"
size=
"mini"
placeholder=
"请输入内容"
></el-input>
</div>
<ul
class=
"select-box"
>
<li
v-for=
"(item, index) in list"
:key=
"index"
>
<div
class=
"select-item"
v-if=
"index!==0 && item.s"
>
<el-switch
size=
"mini"
v-model=
"item.show"
:active-value=
"true"
:inactive-value=
"false"
>
</el-switch>
<p>
{{
item
.
label
}}
</p>
</div>
</li>
</ul>
<div
class=
"select-btn"
>
<el-button
class=
"crm-btn crm-btn-mini query-btn"
@
click=
"changeSelectState()"
>
保存
</el-button>
<el-button
class=
"crm-btn crm-btn-mini easy-btn"
@
click=
"changeSelectState('reset')"
>
重置
</el-button>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:{
queryType
:{
type
:
Array
,
default
:[]
}
},
data
()
{
return
{
input
:
''
,
list
:
[],
};
},
watch
:{
queryType
:
{
//普通的watch监听
handler
(
val
,
oldVal
){
this
.
init
()
},
deep
:
true
//true 深度监听
}
},
mounted
()
{
this
.
init
()
},
methods
:
{
queryItem
(
text
){
this
.
list
.
map
(
x
=>
{
if
(
x
.
label
.
indexOf
(
text
)
==-
1
)
{
x
.
s
=
false
}
else
{
x
.
s
=
true
}
})
},
init
(){
let
$this
=
this
let
list
=
JSON
.
parse
(
JSON
.
stringify
(
$this
.
queryType
))
list
.
forEach
(
el
=>
{
el
.
s
=
true
});
$this
.
list
=
list
},
changeSelectState
(
type
){
let
i
=
0
;
this
.
list
.
map
(
x
=>
{
if
(
x
.
show
)
{
i
++
}
})
if
(
i
<
2
)
{
return
this
.
$message
.
error
(
'最少显示两列数据'
)
}
if
(
type
)
{
this
.
list
.
map
(
x
=>
{
x
.
show
=
true
})
}
this
.
$emit
(
'listenTochildEvent'
,
this
.
list
);
}
}
}
</
script
>
\ No newline at end of file
src/plugins/index.js
View file @
4cf0bb33
...
...
@@ -24,6 +24,7 @@ export default {
DomainUrl
:
domainUrl
,
//常用提交数据URL
PostUrl
:
domainUrl
,
PostUrl2
:
"http://testapi.oytour.com/api/common/post"
,
javaUrl
:
locationName
.
indexOf
(
'testb2b'
)
==
-
1
?
"http://efficient.oytour.com"
:
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://47.96.12.235:9001"
:
"http://192.168.2.215:9000"
,
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://staticfile.oytour.com"
:
'http://192.168.2.214:8130'
,
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://uploadfile.oytour.com"
:
"http://192.168.2.214:8130"
,
...
...
@@ -154,6 +155,54 @@ export default {
window
.
open
(
'http://'
+
URL
,
'_blank'
);
}
}
//HTTP提交数据
Vue
.
prototype
.
apipost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
var
apiurl
=
this
.
domainManager
().
PostUrl2
;
var
timestamp
=
(
new
Date
()).
valueOf
();
this
.
apiurl
=
apiurl
;
if
(
!
localStorage
.
userInfo
&&
localStorage
.
userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
this
.
$router
.
push
({
path
:
'/login'
})
}
var
token
=
""
;
var
key
=
""
;
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
token
;
key
=
this
.
getLocalStorage
().
SecretKey
;
}
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
let
tempLanguage
=
0
;
var
postData
=
{
"msg"
:
msg
,
"cmd"
:
cmd
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
md5Str
,
"languageId"
:
tempLanguage
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Referer-Viitto'
:
this
.
$route
.
path
}
})
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
==
10000
||
res
.
data
.
resultCode
==
10001
)
{
this
.
$router
.
push
({
path
:
'/login'
});
}
else
if
(
res
.
resultCode
==
10005
)
{
this
.
$router
.
go
(
-
1
);
}
else
{
successCall
(
res
);
}
},
faildCall
)
}
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
...
...
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