Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
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
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
xinzhedeai
CRM
Commits
b495d97a
Commit
b495d97a
authored
Mar 05, 2025
by
lei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码格式美化
parent
ac0d908a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1372 additions
and
1388 deletions
+1372
-1388
.prettierrc
.prettierrc
+9
-0
index.vue
src/views/InforStatistics/index.vue
+638
-645
home.vue
src/views/home.vue
+20
-20
login.vue
src/views/login.vue
+120
-86
management - 副本.vue
src/views/manageClass/management - 副本.vue
+330
-242
management.vue
src/views/manageClass/management.vue
+255
-395
No files found.
.prettierrc
0 → 100644
View file @
b495d97a
{
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true,
"semi": false,
"bracketSpacing": true,
"trailingComma": "none",
"jsxSingleQuote": true
}
src/views/InforStatistics/index.vue
View file @
b495d97a
...
...
@@ -3,22 +3,13 @@
<div
class=
"boxmain"
>
<div
class=
"title"
>
推广部门信息统计
</div>
<div
class=
"box-search"
>
<el-select
v-model=
"dateValue"
placeholder=
"请选择报表统计形式"
@
change=
"setDateRange(dateValue)"
clearable
>
<el-option
v-for=
"item in formallyData"
:label=
"item.name"
:value=
"item.value"
/>
<el-select
v-model=
"dateValue"
placeholder=
"请选择报表统计形式"
@
change=
"setDateRange(dateValue)"
clearable
>
<el-option
v-for=
"item in formallyData"
:label=
"item.name"
:value=
"item.value"
/>
</el-select>
<el-date-picker
size=
"mini"
style=
"margin-left: 30px; height:32px;
"
v-if=
"this.dateValue === 0
"
style=
"margin-left: 30px; height: 32px
"
v-if=
"this.dateValue === 0
"
type=
"year"
placeholder=
"选择年"
v-model=
"preYear"
...
...
@@ -26,8 +17,8 @@
></el-date-picker>
<el-date-picker
size=
"mini"
style=
"margin-left: 30px; height:32px;
"
v-if=
"this.dateValue === 1
"
style=
"margin-left: 30px; height: 32px
"
v-if=
"this.dateValue === 1
"
v-model=
"preMonth"
type=
"month"
placeholder=
"选择月"
...
...
@@ -41,7 +32,7 @@
:editable=
"false"
placeholder=
"请选择周"
v-if=
"this.dateValue === 2"
:picker-options=
"
{'firstDayOfWeek': 1
}"
:picker-options=
"
{ firstDayOfWeek: 1
}"
v-model="seletWeekValue"
format="yyyy年第WW周"
:clearable="false"
...
...
@@ -59,7 +50,6 @@
</div>
</div>
<!--
<el-select
style=
"margin-left: 30px;"
v-model=
"newManage.customerSource"
...
...
@@ -78,23 +68,22 @@
v-model=
"newManage.customerSource"
:options=
"infoTree.menus"
:load-options=
"loadInfoTreeMenus"
style=
"width:230px;margin-left:20px;
"
style=
"width: 230px; margin-left: 20px
"
placeholder=
"请选择类别"
/>
<el-button
type=
"primary"
style=
"margin-left: 30px"
@
click=
"toSearch"
icon=
"el-icon-share"
>
统计
</el-button>
<el-button
type=
"primary"
style=
"margin-left: 30px"
@
click=
"toSearch"
icon=
"el-icon-share"
>
统计
</el-button>
</div>
<div
class=
"box-top"
>
<div
class=
"boxtext"
>
<div>
今日新增信息:
<span>
{{
this
.
typeManage
.
newToday
}}
</span>
条
</div>
<div>
昨日新增信息:
<span>
{{
this
.
typeManage
.
newlyIncreased
}}
</span>
条
</div>
<div>
今日新增信息:
<span>
{{
this
.
typeManage
.
newToday
}}
</span
>
条
</div>
<div>
昨日新增信息:
<span>
{{
this
.
typeManage
.
newlyIncreased
}}
</span
>
条
</div>
</div>
</div>
<div
class=
"box-center"
>
...
...
@@ -104,7 +93,7 @@
</div>
<div
class=
"box-center-right"
>
<div>
推广信息分类统计
</div>
<div
ref=
"pieChart"
class=
"chartTwo"
/>
<div
ref=
"pieChart"
class=
"chartTwo"
/>
</div>
</div>
<div
class=
"box-bottom"
>
...
...
@@ -117,27 +106,24 @@
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
style=
"margin-left: 30px;
"
style=
"margin-left: 30px
"
>
</el-date-picker>
<el-button
type=
"success"
@
click=
"exportRecord"
icon=
"el-icon-share"
style=
"margin-left: 30px;"
>
导出客户跟进情况记录
</el-button>
<el-button
type=
"success"
@
click=
"exportRecord"
icon=
"el-icon-share"
style=
"margin-left: 30px"
>
导出客户跟进情况记录
</el-button
>
</div>
<div
class=
"box-bottom-table"
>
<el-table
:data=
"typeManage.selectdata"
style=
"width: 97%;margin-left: 30px;"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"200"
/>
<el-table-column
prop=
"name"
label=
"姓名"
/>
<el-table-column
prop=
"tel"
label=
"电话"
/>
<el-table-column
prop=
"saleidStr"
label=
"销售人员"
/>
<el-table-column
prop=
"classidStr"
label=
"信息分类"
/>
<el-table-column
prop=
"useridStr"
label=
"推广人员"
/>
<el-table
:data=
"typeManage.selectdata"
style=
"width: 97%; margin-left: 30px"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"200"
/>
<el-table-column
prop=
"name"
label=
"姓名"
/>
<el-table-column
prop=
"tel"
label=
"电话"
/>
<el-table-column
prop=
"saleidStr"
label=
"销售人员"
/>
<el-table-column
prop=
"classidStr"
label=
"信息分类"
/>
<el-table-column
prop=
"useridStr"
label=
"推广人员"
/>
<el-table-column
prop=
"inforStatus"
label=
"信息状态"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.inforStatus===
'0'"
>
未成交
</span>
<span
v-if=
"scope.row.inforStatus ===
'0'"
>
未成交
</span>
<span
v-else
>
已成交
</span>
</
template
>
</el-table-column>
...
...
@@ -148,7 +134,7 @@
:total=
"typeManage.total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
style=
"margin:20px 0px 20px 30px;
"
style=
"margin: 20px 0px 20px 30px
"
/>
</div>
</div>
...
...
@@ -156,261 +142,280 @@
</template>
<
script
>
import
axios
from
"
axios
"
;
import
echarts
from
"
echarts
"
;
import
{
parseTime
,
Tools
,
FileStream
}
from
"
../../utils
"
;
import
{
getAllCategory
,
deliverList
,
allDepartments
,
getEchrtsData
,
expRecord
,
expClientData
}
from
"
@/api/census.js
"
;
import
{
reqInformationTreeList
}
from
"
@/api/treeMenus.js
"
;
import
axios
from
'
axios
'
import
echarts
from
'
echarts
'
import
{
parseTime
,
Tools
,
FileStream
}
from
'
../../utils
'
import
{
getAllCategory
,
deliverList
,
allDepartments
,
getEchrtsData
,
expRecord
,
expClientData
}
from
'
@/api/census.js
'
import
{
reqInformationTreeList
}
from
'
@/api/treeMenus.js
'
import
Treeselect
from
'
@riophae/vue-treeselect
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
export
default
{
data
()
{
return
{
// 周选择器
seletWeekValue
:
""
,
weekTime
:
""
,
startTimeNum
:
""
,
endTimeNum
:
""
,
options
:
[{
seletWeekValue
:
''
,
weekTime
:
''
,
startTimeNum
:
''
,
endTimeNum
:
''
,
options
:
[
{
value
:
'
zhinan
'
,
label
:
'
副总经理
'
,
children
:
[
{
value
:
'
shejiyuanze
'
,
label
:
'
推广一部
'
,
},
{
label
:
'
推广一部
'
},
{
value
:
'
daohang
'
,
label
:
'
销售二中心
'
,
children
:
[{
children
:
[
{
value
:
'
cexiangdaohang
'
,
label
:
'
销售一部
'
},
{
},
{
value
:
'
dingbudaohang
'
,
label
:
'
销售二部
'
},
{
value
:
'
san
'
,
label
:
'
销售三部
'
}]
}]
}],
//默认x轴数据
xAxisData
:[
'
一月
'
,
'
二月
'
,
'
三月
'
,
'
四月
'
,
'
五月
'
,
'
六月
'
,
'
七月
'
,
'
八月
'
,
'
九月
'
,
'
十月
'
,
'
十一月
'
,
'
十二月
'
],
//选择时间后的数组
preYear
:
''
,
preMonth
:
''
,
}
]
}
]
}
],
// 默认x轴数据
xAxisData
:
[
'
一月
'
,
'
二月
'
,
'
三月
'
,
'
四月
'
,
'
五月
'
,
'
六月
'
,
'
七月
'
,
'
八月
'
,
'
九月
'
,
'
十月
'
,
'
十一月
'
,
'
十二月
'
],
// 选择时间后的数组
preYear
:
''
,
preMonth
:
''
,
// 时间状态选择
dateValue
:
2
,
// 信息分类接口
newManage
:
{
page
:
1
,
size
:
10
,
total
:
0
,
newdata
:
[],
customerSource
:
0
,
//
信息分类
departmentValue
:
""
,
//
部门选择
countPeople
:
""
,
//
统计人员
countDepartment
:
""
//
统计部门
newManage
:
{
page
:
1
,
size
:
10
,
total
:
0
,
newdata
:
[],
customerSource
:
0
,
//
信息分类
departmentValue
:
''
,
//
部门选择
countPeople
:
''
,
//
统计人员
countDepartment
:
''
//
统计部门
},
// 日期选择
formallyData
:
[
{
name
:
"
年度
"
,
value
:
0
,
name
:
'
年度
'
,
value
:
0
},
{
name
:
"
月
"
,
value
:
1
,
name
:
'
月
'
,
value
:
1
},
{
name
:
"
周
"
,
value
:
2
,
},
name
:
'
周
'
,
value
:
2
}
],
chooseVal
:
""
,
chooseVal
:
''
,
//销售人员
salesPersonnelfrom
:{
deliverAssign
:[],
department
:[]
},
typeManage
:{
page
:
0
,
size
:
10
,
total
:
0
,
selectdata
:[],
dropData
:[],
addDialog
:
false
,
newToday
:
""
,
//今日新增
newlyIncreased
:
""
,
//昨日新增
editDialog
:
false
,
echartOneData
:[],
echartNewData
:[],
echartTwoData
:[],
},
tatilData
:[],
MonthstartTime
:
""
,
MonthendTime
:
""
,
WeekstartTime
:
""
,
WeekendTime
:
""
,
salesPersonnelfrom
:
{
deliverAssign
:
[],
department
:
[]
},
typeManage
:
{
page
:
0
,
size
:
10
,
total
:
0
,
selectdata
:
[],
dropData
:
[],
addDialog
:
false
,
newToday
:
''
,
// 今日新增
newlyIncreased
:
''
,
// 昨日新增
editDialog
:
false
,
echartOneData
:
[],
echartNewData
:
[],
echartTwoData
:
[]
},
tatilData
:
[],
MonthstartTime
:
''
,
MonthendTime
:
''
,
WeekstartTime
:
''
,
WeekendTime
:
''
,
// 遍历数组
foreachArr
:
[],
data
:
[],
exportTime
:
""
,
//
导出时间
foreachArr
:
[],
data
:
[],
exportTime
:
''
,
//
导出时间
//
infoTree
:
{
menus
:[{
id
:
0
,
label
:
'
信息分类
'
,
children
:
null
}],
},
}
;
infoTree
:
{
menus
:
[{
id
:
0
,
label
:
'
信息分类
'
,
children
:
null
}]
}
}
},
components
:
{
Treeselect
},
components
:
{
Treeselect
},
mounted
()
{
this
.
setDateRange
();
this
.
changeweek
();
this
.
echartshistogram
=
echarts
.
init
(
this
.
$refs
.
histogram
)
;
this
.
setDateRange
()
this
.
changeweek
()
this
.
echartshistogram
=
echarts
.
init
(
this
.
$refs
.
histogram
)
this
.
echrtsOne
()
this
.
echartspie
=
echarts
.
init
(
this
.
$refs
.
pieChart
);
this
.
echartspie
=
echarts
.
init
(
this
.
$refs
.
pieChart
)
this
.
echrtsTwo
()
this
.
classification
()
this
.
getSelectInfo
();
this
.
getSelectInfo
()
// 初始化搜索
this
.
toSearch
();
this
.
toSearch
()
},
methods
:
{
// 获取分类下拉列表
getSelectInfo
()
{
var
typeM
=
this
.
typeManage
;
getSelectInfo
()
{
var
typeM
=
this
.
typeManage
var
params
=
{
page
:
1
,
pageSize
:
999
,
};
page
:
1
,
pageSize
:
999
}
getAllCategory
(
params
).
then
((
res
)
=>
{
var
dropDown
=
res
.
object
.
records
||
[];
typeM
.
dropData
=
dropDown
;
});
var
dropDown
=
res
.
object
.
records
||
[]
typeM
.
dropData
=
dropDown
})
},
// 信息分类接口
classification
(
params
)
{
classification
(
params
)
{
var
params
=
{
page
:
this
.
newManage
.
page
,
pageSize
:
this
.
newManage
.
size
,
};
page
:
this
.
newManage
.
page
,
pageSize
:
this
.
newManage
.
size
}
getAllCategory
(
params
).
then
((
res
)
=>
{
var
newlist
=
res
.
object
.
records
||
[];
this
.
newManage
.
newdata
=
newlist
});
var
newlist
=
res
.
object
.
records
||
[]
this
.
newManage
.
newdata
=
newlist
})
},
// 切换时间
setDateRange
(
val
)
{
this
.
preMonth
=
''
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
()
+
1
;
if
(
val
===
0
){
this
.
preMonth
=
`
${
year
}
`
this
.
xAxisData
=
[
'
一月
'
,
'
二月
'
,
'
三月
'
,
'
四月
'
,
'
五月
'
,
'
六月
'
,
'
七月
'
,
'
八月
'
,
'
九月
'
,
'
十月
'
,
'
十一月
'
,
'
十二月
'
]
setDateRange
(
val
)
{
this
.
preMonth
=
''
var
date
=
new
Date
()
var
year
=
date
.
getFullYear
()
var
month
=
date
.
getMonth
()
+
1
if
(
val
===
0
)
{
this
.
preMonth
=
`
${
year
}
`
this
.
xAxisData
=
[
'
一月
'
,
'
二月
'
,
'
三月
'
,
'
四月
'
,
'
五月
'
,
'
六月
'
,
'
七月
'
,
'
八月
'
,
'
九月
'
,
'
十月
'
,
'
十一月
'
,
'
十二月
'
]
this
.
echrtsOne
()
}
else
if
(
val
===
1
)
{
this
.
preMonth
=
`
${
year
}
-
${
month
}
`
this
.
xAxisData
=
this
.
foreachArr
;
}
else
if
(
val
===
1
)
{
this
.
preMonth
=
`
${
year
}
-
${
month
}
`
this
.
xAxisData
=
this
.
foreachArr
this
.
echrtsOne
()
}
else
if
(
val
===
2
)
{
this
.
xAxisData
=
[
'
星期一
'
,
'
星期二
'
,
'
星期三
'
,
'
星期四
'
,
'
星期五
'
,
'
星期六
'
,
'
星期日
'
]
}
else
if
(
val
===
2
)
{
this
.
xAxisData
=
[
'
星期一
'
,
'
星期二
'
,
'
星期三
'
,
'
星期四
'
,
'
星期五
'
,
'
星期六
'
,
'
星期日
'
]
this
.
echrtsOne
()
}
//
this.dateValue = val
//
this.dateValue = val
},
// 选择年时间
yearChange
(
e
)
{
var
firstDay
=
new
Date
(
e
);
firstDay
.
setDate
(
1
);
firstDay
.
setMonth
(
0
);
var
lastDay
=
new
Date
(
e
);
lastDay
.
setFullYear
(
lastDay
.
getFullYear
()
+
2
);
lastDay
.
setDate
(
0
);
lastDay
.
setMonth
(
-
1
);
var
startTime
=
e
&&
Tools
.
Dates
.
format
.
call
(
new
Date
(
firstDay
),
'
yyyy-MM-dd HH:mm:ss
'
)
||
''
;
var
endTime
=
e
&&
Tools
.
Dates
.
format
.
call
(
new
Date
(
lastDay
.
getTime
()
+
86399000
),
'
yyyy-MM-dd HH:mm:ss
'
)
||
''
;
this
.
MonthstartTime
=
startTime
this
.
MonthendTime
=
endTime
yearChange
(
e
)
{
var
firstDay
=
new
Date
(
e
)
firstDay
.
setDate
(
1
)
firstDay
.
setMonth
(
0
)
var
lastDay
=
new
Date
(
e
)
lastDay
.
setFullYear
(
lastDay
.
getFullYear
()
+
2
)
lastDay
.
setDate
(
0
)
lastDay
.
setMonth
(
-
1
)
var
startTime
=
(
e
&&
Tools
.
Dates
.
format
.
call
(
new
Date
(
firstDay
),
'
yyyy-MM-dd HH:mm:ss
'
))
||
''
var
endTime
=
(
e
&&
Tools
.
Dates
.
format
.
call
(
new
Date
(
lastDay
.
getTime
()
+
86399000
),
'
yyyy-MM-dd HH:mm:ss
'
))
||
''
this
.
MonthstartTime
=
startTime
this
.
MonthendTime
=
endTime
},
// 选择月时间
monthChange
(
e
)
{
var
dateList
=
Tools
.
Dates
.
format
.
call
(
new
Date
(
e
),
'
yyyy-MM
'
).
split
(
'
-
'
);
var
year
=
dateList
[
0
];
var
startMonth
=
dateList
[
1
];
var
endStamp
=
new
Date
(
year
,
startMonth
,
0
).
getTime
()
+
86399000
;
var
startTime
=
e
&&
Tools
.
Dates
.
format
.
call
(
new
Date
(
e
),
'
yyyy-MM-dd HH:mm:ss
'
)
||
''
;
var
endTime
=
e
&&
Tools
.
Dates
.
format
.
call
(
new
Date
(
endStamp
),
'
yyyy-MM-dd HH:mm:ss
'
)
||
''
;
this
.
MonthstartTime
=
startTime
this
.
MonthendTime
=
endTime
monthChange
(
e
)
{
var
dateList
=
Tools
.
Dates
.
format
.
call
(
new
Date
(
e
),
'
yyyy-MM
'
).
split
(
'
-
'
)
var
year
=
dateList
[
0
]
var
startMonth
=
dateList
[
1
]
var
endStamp
=
new
Date
(
year
,
startMonth
,
0
).
getTime
()
+
86399000
var
startTime
=
(
e
&&
Tools
.
Dates
.
format
.
call
(
new
Date
(
e
),
'
yyyy-MM-dd HH:mm:ss
'
))
||
''
var
endTime
=
(
e
&&
Tools
.
Dates
.
format
.
call
(
new
Date
(
endStamp
),
'
yyyy-MM-dd HH:mm:ss
'
))
||
''
this
.
MonthstartTime
=
startTime
this
.
MonthendTime
=
endTime
},
// 计算周时间
timestampToTime
(
timestamp
)
{
var
date
=
new
Date
(
timestamp
);
//
时间戳为10位需*1000,时间戳为13位的话不需乘1000
let
Y
=
date
.
getFullYear
()
+
'
-
'
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
;
let
D
=
date
.
getDate
()
+
'
'
;
return
Y
+
M
+
D
;
var
date
=
new
Date
(
timestamp
)
//
时间戳为10位需*1000,时间戳为13位的话不需乘1000
let
Y
=
date
.
getFullYear
()
+
'
-
'
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
let
D
=
date
.
getDate
()
+
'
'
return
Y
+
M
+
D
},
// 选择周时间
changeweek
(
val
)
{
if
(
val
)
{
var
todayDay
=
new
Date
(
val
);
var
todayDay
=
new
Date
(
val
)
}
else
{
var
todayDay
=
new
Date
();
var
todayDay
=
new
Date
()
}
let
todayOfWeek
=
todayDay
.
getDay
();
let
todayOfmonth
=
todayDay
.
getMonth
();
let
todayOfDate
=
todayDay
.
getDate
();
let
spendDay
=
1
;
let
todayOfWeek
=
todayDay
.
getDay
()
let
todayOfmonth
=
todayDay
.
getMonth
()
let
todayOfDate
=
todayDay
.
getDate
()
let
spendDay
=
1
if
(
todayOfWeek
!=
0
)
{
spendDay
=
7
-
todayOfWeek
;
}
this
.
startTimeNum
=
todayDay
.
valueOf
()
-
(
6
-
spendDay
)
*
86400000
;
this
.
endTimeNum
=
todayDay
.
valueOf
()
+
spendDay
*
86400000
;
var
startTimeStr
=
this
.
timestampToTime
(
this
.
startTimeNum
);
// 时间戳转字符串
var
endTimeStr
=
this
.
timestampToTime
(
this
.
endTimeNum
);
var
startTime
=
Tools
.
Dates
.
format
.
call
(
new
Date
(
startTimeStr
),
'
yyyy-MM-dd HH:mm:ss
'
);
var
endTime
=
Tools
.
Dates
.
format
.
call
(
new
Date
(
endTimeStr
+
"
23:59:59
"
),
'
yyyy-MM-dd HH:mm:ss
'
);
this
.
MonthstartTime
=
startTime
this
.
MonthendTime
=
endTime
;
this
.
weekTime
=
startTimeStr
+
"
-
"
+
endTimeStr
;
// 2020-09-21~2020-09-27默认
spendDay
=
7
-
todayOfWeek
}
this
.
startTimeNum
=
todayDay
.
valueOf
()
-
(
6
-
spendDay
)
*
86400000
this
.
endTimeNum
=
todayDay
.
valueOf
()
+
spendDay
*
86400000
var
startTimeStr
=
this
.
timestampToTime
(
this
.
startTimeNum
)
// 时间戳转字符串
var
endTimeStr
=
this
.
timestampToTime
(
this
.
endTimeNum
)
var
startTime
=
Tools
.
Dates
.
format
.
call
(
new
Date
(
startTimeStr
),
'
yyyy-MM-dd HH:mm:ss
'
)
var
endTime
=
Tools
.
Dates
.
format
.
call
(
new
Date
(
endTimeStr
+
'
23:59:59
'
),
'
yyyy-MM-dd HH:mm:ss
'
)
this
.
MonthstartTime
=
startTime
this
.
MonthendTime
=
endTime
this
.
weekTime
=
startTimeStr
+
'
-
'
+
endTimeStr
// 2020-09-21~2020-09-27默认
},
// 柱状图
echrtsOne
(
xAxisList
)
{
let
that
=
this
;
echrtsOne
(
xAxisList
)
{
let
that
=
this
this
.
echartshistogram
.
setOption
({
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
type
:
'
shadow
'
,
type
:
'
shadow
'
}
},
xAxis
:
[
{
type
:
'
category
'
,
name
:
'
(数量/日)
'
,
data
:
that
.
xAxisData
[
0
]
?
that
.
xAxisData
:
(
xAxisList
||
[])
,
data
:
that
.
xAxisData
[
0
]
?
that
.
xAxisData
:
xAxisList
||
[]
,
axisTick
:
{
alignWithLabel
:
true
},
axisLabel
:
{
interval
:
0
,
//
横轴信息全部显示
margin
:
10
,
//
刻度标签与轴线之间的距离
interval
:
0
,
//
横轴信息全部显示
margin
:
10
,
//
刻度标签与轴线之间的距离
textStyle
:
{
fontSize
:
9
,
//
横轴字体大小
color
:
"
#000000
"
,
//
颜色
},
},
fontSize
:
9
,
//
横轴字体大小
color
:
'
#000000
'
//
颜色
}
}
}
],
yAxis
:
[
{
type
:
'
value
'
,
//
关键
scale
:
true
,
type
:
'
value
'
,
//
关键
scale
:
true
,
name
:
'
(数量/条)
'
,
min
:
(
value
)
=>
{
return
value
.
min
...
...
@@ -420,26 +425,26 @@ export default {
},
interval
:
50
,
nameTextStyle
:
{
color
:
"
#000000
"
,
color
:
'
#000000
'
,
fontSize
:
14
,
fontFamily
:
"
Microsoft YaHei
"
,
fontWeight
:
400
,
},
fontFamily
:
'
Microsoft YaHei
'
,
fontWeight
:
400
}
}
],
series
:
[
{
name
:
'
增加信息总数
'
,
type
:
'
bar
'
,
barWidth
:
20
,
//
柱图宽度
barWidth
:
20
,
//
柱图宽度
color
:
[
'
#5470c6
'
],
data
:
this
.
typeManage
.
echartOneData
data
:
this
.
typeManage
.
echartOneData
}
]
});
})
},
// 饼图
echrtsTwo
()
{
echrtsTwo
()
{
this
.
echartspie
.
setOption
({
tooltip
:
{
trigger
:
'
item
'
...
...
@@ -467,111 +472,105 @@ export default {
itemStyle
:
{
normal
:
{
color
:
function
(
colors
)
{
var
colorList
=
[
'
#5470c6
'
,
'
#91cc75
'
,
'
#fac858
'
,
'
#ee6666
'
,
'
#73c0de
'
,
'
#3ba272
'
];
return
colorList
[
colors
.
dataIndex
];
var
colorList
=
[
'
#5470c6
'
,
'
#91cc75
'
,
'
#fac858
'
,
'
#ee6666
'
,
'
#73c0de
'
,
'
#3ba272
'
]
return
colorList
[
colors
.
dataIndex
]
}
}
},
},
labelLine
:
{
show
:
false
},
data
:
this
.
typeManage
.
echartTwoData
},
data
:
this
.
typeManage
.
echartTwoData
}
]
})
},
// 请求接口根据参数不同获取数据
toSearch
()
{
toSearch
()
{
var
params
=
{
page
:
this
.
typeManage
.
page
,
pageSize
:
this
.
typeManage
.
size
,
form
:
this
.
dateValue
,
startTime
:
this
.
MonthstartTime
,
page
:
this
.
typeManage
.
page
,
pageSize
:
this
.
typeManage
.
size
,
form
:
this
.
dateValue
,
startTime
:
this
.
MonthstartTime
,
endTime
:
this
.
MonthendTime
,
infoClassNo
:
this
.
newManage
.
customerSource
,
};
infoClassNo
:
this
.
newManage
.
customerSource
}
getEchrtsData
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
var
selectArr
=
res
.
object
.
dataList
||
[]
this
.
typeManage
.
selectdata
=
selectArr
this
.
typeManage
.
total
=
res
.
object
.
total
this
.
typeManage
.
newToday
=
res
.
object
.
newInformationToday
this
.
typeManage
.
newlyIncreased
=
res
.
object
.
newInformationYesterday
this
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
res
).
replace
(
/"tableArrayMonth"/g
,
'
"tableArray"
'
))
this
.
typeManage
.
echartOneData
=
this
.
data
.
object
.
tableArray
||
[]
this
.
typeManage
.
echartTwoData
=
res
.
object
.
iconArray
||
[]
var
arr
=
[];
for
(
var
item
of
this
.
typeManage
.
echartOneData
)
{
if
(
res
.
code
===
200
)
{
var
selectArr
=
res
.
object
.
dataList
||
[]
this
.
typeManage
.
selectdata
=
selectArr
this
.
typeManage
.
total
=
res
.
object
.
total
this
.
typeManage
.
newToday
=
res
.
object
.
newInformationToday
this
.
typeManage
.
newlyIncreased
=
res
.
object
.
newInformationYesterday
this
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
res
).
replace
(
/"tableArrayMonth"/g
,
'
"tableArray"
'
))
this
.
typeManage
.
echartOneData
=
this
.
data
.
object
.
tableArray
||
[]
this
.
typeManage
.
echartTwoData
=
res
.
object
.
iconArray
||
[]
var
arr
=
[]
for
(
var
item
of
this
.
typeManage
.
echartOneData
)
{
arr
.
push
(
item
.
data
)
}
this
.
foreachArr
=
arr
;
this
.
foreachArr
=
arr
// 查询成功后调用echarts图一接口
this
.
echrtsOne
(
arr
)
this
.
echrtsTwo
()
}
else
if
(
res
.
object
===
403
)
{
var
self
=
this
;
}
else
if
(
res
.
object
===
403
)
{
var
self
=
this
self
.
$message
({
type
:
"
error
"
,
message
:
"
查询失败!请选择具体日期
"
,
});
type
:
'
error
'
,
message
:
'
查询失败!请选择具体日期
'
})
}
});
})
},
//
获取全部信息分类分页
//
获取全部信息分类分页
handleSizeChange
(
val
)
{
// 每页多少条
this
.
typeManage
.
size
=
val
;
this
.
toSearch
();
this
.
typeManage
.
size
=
val
this
.
toSearch
()
},
handleCurrentChange
(
val
)
{
// 当前是多少页
this
.
typeManage
.
page
=
val
;
this
.
toSearch
();
this
.
typeManage
.
page
=
val
this
.
toSearch
()
},
// 导出数据表格
exportRecord
()
{
var
params
=
{};
exportRecord
()
{
var
params
=
{}
// 时间
if
(
this
.
exportTime
instanceof
Array
)
{
params
.
startTime
=
parseTime
(
new
Date
(
this
.
exportTime
[
0
]));
params
.
endTime
=
parseTime
(
new
Date
(
this
.
exportTime
[
1
]));
if
(
this
.
exportTime
instanceof
Array
)
{
params
.
startTime
=
parseTime
(
new
Date
(
this
.
exportTime
[
0
]))
params
.
endTime
=
parseTime
(
new
Date
(
this
.
exportTime
[
1
]))
}
expRecord
(
params
).
then
((
res
)
=>
{
var
file
=
res
.
object
;
window
.
open
(
'
oa.gemho.cn:8004/customer_follow_form/
'
+
file
);
});
var
file
=
res
.
object
window
.
open
(
'
oa.gemho.cn:8004/customer_follow_form/
'
+
file
)
})
},
// 加载信息分类列表
loadInfoTreeMenus
({
action
,
parentNode
,
callback
})
{
if
(
action
===
'
LOAD_CHILDREN_OPTIONS
'
)
{
reqInformationTreeList
({
pid
:
parentNode
.
id
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
var
list
=
res
.
object
.
records
||
[];
parentNode
.
children
=
list
.
map
(
function
(
obj
)
{
if
(
!
obj
.
leaf
)
{
if
(
action
===
'
LOAD_CHILDREN_OPTIONS
'
)
{
reqInformationTreeList
({
pid
:
parentNode
.
id
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
var
list
=
res
.
object
.
records
||
[]
parentNode
.
children
=
list
.
map
(
function
(
obj
)
{
if
(
!
obj
.
leaf
)
{
obj
.
children
=
null
};
return
obj
});
}
return
obj
})
setTimeout
(()
=>
{
callback
()
},
100
)
};
});
};
},
},
}
;
}
})
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.boxmain
{
.boxmain
{
width
:
100%
;
height
:
100%
;
margin
:
0px
;
...
...
@@ -580,7 +579,7 @@ export default {
flex-direction
:
column
;
overflow
:
hidden
;
}
.title
{
.title
{
width
:
100%
;
height
:
75px
;
display
:
flex
;
...
...
@@ -595,102 +594,96 @@ export default {
.box-search
{
width
:
97%
;
display
:
flex
;
margin
:
30px
30px
30px
30px
;
margin
:
30px
30px
30px
30px
;
}
.box-top
{
.box-top
{
width
:
97%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
start
;
justify-content
:
start
;
margin
:
10px
30px
10px
30px
;
}
.box-top
div
{
.box-top
div
{
font-family
:
'Arial Negreta'
,
'Arial Normal'
,
'Arial'
;
font-weight
:
700
;
font-style
:
normal
;
font-size
:
18px
;
margin
:
0px
30px
10px
0px
;
}
.boxtext
{
.boxtext
{
width
:
50%
;
display
:
flex
;
justify-content
:
start
;
align-items
:
center
;
}
.box-center
{
.box-center
{
width
:
100%
;
display
:
flex
;
}
.box-center-left
{
.box-center-left
{
width
:
60%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.box-center-left
div
{
.box-center-left
div
{
font-family
:
'Arial Negreta'
,
'Arial Normal'
,
'Arial'
;
font-weight
:
700
;
font-style
:
normal
;
font-size
:
18px
;
}
.box-center-right
{
.box-center-right
{
width
:
40%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.box-center-right
div
{
.box-center-right
div
{
font-family
:
'Arial Negreta'
,
'Arial Normal'
,
'Arial'
;
font-weight
:
700
;
font-style
:
normal
;
font-size
:
18px
;
}
.chartOne
{
.chartOne
{
width
:
90%
;
height
:
300px
;
}
.chartTwo
{
.chartTwo
{
width
:
80%
;
height
:
300px
;
}
.box-bottom
{
.box-bottom
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.box-bottom-top
{
.box-bottom-top
{
width
:
97%
;
display
:
flex
;
align-items
:
center
;
margin
:
10px
30px
10px
30px
;
margin
:
10px
30px
10px
30px
;
}
.list
{
.list
{
font-family
:
'Arial Negreta'
,
'Arial Normal'
,
'Arial'
;
font-weight
:
700
;
font-style
:
normal
;
font-size
:
18px
;
}
.export
{
.export
{
font-family
:
Microsoft
YaHei
;
font-size
:
14px
;
color
:
#169bd5
;
text-align
:
center
;
margin-left
:
30px
;
}
.print
{
.print
{
font-family
:
Microsoft
YaHei
;
font-size
:
14px
;
color
:
#169bd5
;
text-align
:
center
;
margin-left
:
30px
;
}
// 周选择器样式
.data_week
{
...
...
@@ -711,16 +704,16 @@ export default {
min-width
:
40px
;
}
}
.weekDataInput
{
.weekDataInput
{
width
:
250px
;
}
}
::v-deep
input
::-webkit-outer-spin-button
,
::v-deep
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
!
important
;
-webkit-appearance
:
none
!
important
;
}
::v-deep
input
[
type
=
‘
number
’
]
{
-moz-appearance
:
textfield
!
important
;
::v-deep
input
[
type
=
'‘number’'
]
{
-moz-appearance
:
textfield
!
important
;
}
</
style
>
src/views/home.vue
View file @
b495d97a
...
...
@@ -3,7 +3,7 @@
<div
class=
"dashboard-editor-container"
>
<github-corner
class=
"github-corner"
/>
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/>
<el-row
style=
"background:
#fff;padding:16px 16px 0;margin-bottom:32px;
"
>
<el-row
style=
"background:
#fff; padding: 16px 16px 0; margin-bottom: 32px
"
>
<line-chart
:chart-data=
"lineChartData"
/>
</el-row>
<el-row
:gutter=
"32"
>
...
...
@@ -78,7 +78,7 @@ export default {
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.dashboard-editor-container
{
.dashboard-editor-container
{
padding
:
32px
;
background-color
:
rgb
(
240
,
242
,
245
);
position
:
relative
;
...
...
@@ -95,11 +95,11 @@ export default {
padding
:
16px
16px
0
;
margin-bottom
:
32px
;
}
}
}
@media
(
max-width
:
1024px
)
{
@media
(
max-width
:
1024px
)
{
.chart-wrapper
{
padding
:
8px
;
}
}
}
</
style
>
src/views/login.vue
View file @
b495d97a
<
template
>
<div
class=
"login"
:style=
"'background-image:url('
+ Background +
');'"
>
<div
class=
"login"
:style=
"'background-image:url('
+ Background +
');'"
>
<h2
class=
"title"
>
<img
src=
"../assets/images/loginlogo.png"
alt=
""
style=
"margin-right: 10px;"
>
<img
src=
"../assets/images/loginlogo.png"
alt=
""
style=
"margin-right: 10px"
/
>
晶合CRM
</h2>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
label-position=
"left"
label-width=
"0px"
class=
"login-form"
>
<div
class=
"loginTitle"
>
用户登录
</div>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
label-position=
"left"
label-width=
"0px"
class=
"login-form"
>
<div
class=
"loginTitle"
>
用户登录
</div>
<el-form-item
prop=
"username"
>
<el-input
v-model=
"loginForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"请输入账号"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
v-model=
"loginForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"请输入密码"
@
keyup.enter.native=
"handleLogin"
>
<el-input
v-model=
"loginForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"请输入密码"
@
keyup.enter.native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item
prop=
"code"
>
<el-input
v-model=
"loginForm.code"
auto-complete=
"off"
placeholder=
"请输入验证码"
style=
"width: 63%"
@
keyup.enter.native=
"handleLogin"
>
<el-input
v-model=
"loginForm.code"
auto-complete=
"off"
placeholder=
"请输入验证码"
style=
"width: 63%"
@
keyup.enter.native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
</el-input>
<div
class=
"login-code"
>
<img
:src=
"codeUrl"
@
click=
"getCode"
>
<img
:src=
"codeUrl"
@
click=
"getCode"
/
>
</div>
</el-form-item>
<!--
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0 0 25px 0;"
>
记住我
</el-checkbox>
-->
<el-form-item
style=
"width:100%;"
>
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click.native.prevent=
"handleLogin"
>
<el-form-item
style=
"width: 100%"
>
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width: 100%"
@
click.native.prevent=
"handleLogin"
>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-else
>
登 录 中...
</span>
</el-button>
...
...
@@ -76,7 +99,7 @@ export default {
},
watch
:
{
$route
:
{
handler
:
function
(
route
)
{
handler
:
function
(
route
)
{
const
data
=
route
.
query
if
(
data
&&
data
.
redirect
)
{
this
.
redirect
=
data
.
redirect
...
...
@@ -99,14 +122,14 @@ export default {
},
methods
:
{
getCode
()
{
getCodeImg
().
then
(
res
=>
{
getCodeImg
().
then
(
(
res
)
=>
{
this
.
codeUrl
=
res
.
img
this
.
loginForm
.
uuid
=
res
.
uuid
})
},
getCookie
()
{
const
username
=
Cookies
.
get
(
'
username
'
)
console
.
log
(
username
,
"
usernameusernameusername
"
)
console
.
log
(
username
,
'
usernameusernameusername
'
)
let
password
=
Cookies
.
get
(
'
password
'
)
const
rememberMe
=
Cookies
.
get
(
'
rememberMe
'
)
// 保存cookie里面的加密后的密码
...
...
@@ -120,7 +143,7 @@ export default {
}
},
handleLogin
()
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
this
.
$refs
.
loginForm
.
validate
(
(
valid
)
=>
{
const
user
=
{
username
:
this
.
loginForm
.
username
,
password
:
this
.
loginForm
.
password
,
...
...
@@ -134,18 +157,27 @@ export default {
if
(
valid
)
{
this
.
loading
=
true
if
(
user
.
rememberMe
)
{
Cookies
.
set
(
'
username
'
,
user
.
username
,
{
expires
:
Config
.
passCookieExpires
})
Cookies
.
set
(
'
password
'
,
user
.
password
,
{
expires
:
Config
.
passCookieExpires
})
Cookies
.
set
(
'
rememberMe
'
,
user
.
rememberMe
,
{
expires
:
Config
.
passCookieExpires
})
Cookies
.
set
(
'
username
'
,
user
.
username
,
{
expires
:
Config
.
passCookieExpires
})
Cookies
.
set
(
'
password
'
,
user
.
password
,
{
expires
:
Config
.
passCookieExpires
})
Cookies
.
set
(
'
rememberMe
'
,
user
.
rememberMe
,
{
expires
:
Config
.
passCookieExpires
})
}
else
{
Cookies
.
remove
(
'
username
'
)
Cookies
.
remove
(
'
password
'
)
Cookies
.
remove
(
'
rememberMe
'
)
}
this
.
$store
.
dispatch
(
'
Login
'
,
user
).
then
(()
=>
{
this
.
$store
.
dispatch
(
'
Login
'
,
user
)
.
then
(()
=>
{
this
.
loading
=
false
this
.
$router
.
push
({
path
:
this
.
redirect
||
'
/
'
})
}).
catch
(()
=>
{
})
.
catch
(()
=>
{
this
.
loading
=
false
this
.
getCode
()
})
...
...
@@ -172,14 +204,14 @@ export default {
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.login
{
.login
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
height
:
100%
;
background-size
:
cover
;
}
.title
{
}
.title
{
width
:
100%
;
height
:
30%
;
display
:
flex
;
...
...
@@ -190,15 +222,15 @@ export default {
font-size
:
35px
;
font-weight
:
bold
;
text-shadow
:
0px
1px
1px
#555
;
}
}
.login-form
{
.login-form
{
border-radius
:
6px
;
background
:
#ffffff
;
width
:
400px
;
height
:
360px
;
padding
:
25px
25px
5px
25px
;
.loginTitle
{
.loginTitle
{
width
:
103px
;
height
:
25px
;
text-align
:
center
;
...
...
@@ -215,23 +247,25 @@ export default {
height
:
45px
;
}
}
.input-icon
{
height
:
45px
;
width
:
20px
;
margin-left
:
2px
;
}
.input-icon
{
height
:
45px
;
width
:
20px
;
margin-left
:
2px
;
}
.login-tip
{
}
.login-tip
{
font-size
:
13px
;
text-align
:
center
;
color
:
#bfbfbf
;
}
.login-code
{
}
.login-code
{
width
:
33%
;
display
:
inline-block
;
height
:
38px
;
float
:
right
;
img
{
img
{
cursor
:
pointer
;
vertical-align
:middle
}
vertical-align
:
middle
;
}
}
</
style
>
src/views/manageClass/management - 副本.vue
View file @
b495d97a
...
...
@@ -13,7 +13,7 @@
clearable
v-model=
"className"
placeholder=
"请选择类别"
style=
"margin-left: 30px;
"
style=
"margin-left: 30px
"
>
<el-option
v-for=
"item in typeManage.dropData"
...
...
@@ -24,7 +24,7 @@
</el-select>
<el-date-picker
:default-time=
"['00:00:00', '23:59:59']"
style=
"width: 380px !important;margin-left: 30px;
"
style=
"width: 380px !important; margin-left: 30px
"
v-model=
"searchTime"
type=
"datetimerange"
range-separator=
"至"
...
...
@@ -47,18 +47,25 @@
@
click=
"toSearch"
>
搜索
</el-button
>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"addDialogData()"
style=
"margin-left: 30px"
>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"addDialogData()"
style=
"margin-left: 30px"
>
自动分配
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"manualAssignment()"
style=
"margin-left: 30px"
>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"manualAssignment()"
style=
"margin-left: 30px"
>
手动分配
</el-button>
</div>
<div
class=
"table-wrapper"
>
<el-table
:data=
"typeManage.selectdata"
style=
"width: 100%"
>
<el-table
:data=
"typeManage.selectdata"
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
/>
<el-table-column
prop=
"name"
label=
"姓名"
width=
"140"
/>
<el-table-column
prop=
"tel"
label=
"电话"
width=
"180"
/>
...
...
@@ -93,15 +100,11 @@
:total=
"typeManage.total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
style=
"margin-top: 20px;
"
style=
"margin-top: 20px
"
/>
</div>
<el-dialog
title=
"自动分配新增信息"
:visible.sync=
"typeManage.addDialog"
>
<el-form
ref=
"addDataForm"
:model=
"addFormInfo.from"
:rules=
"rules"
>
<el-form
ref=
"addDataForm"
:model=
"addFormInfo.from"
:rules=
"rules"
>
<el-form-item
prop=
"type"
label=
"信息分类"
:label-width=
"'120px'"
>
<el-select
clearable
...
...
@@ -120,48 +123,65 @@
</el-form-item>
<div
class=
"contact"
>
<el-form-item
prop=
"name"
label=
"姓名"
>
<el-input
v-model=
"addFormInfo.from.name"
type=
"text"
clearable
/>
<el-input
v-model=
"addFormInfo.from.name"
type=
"text"
clearable
/>
</el-form-item>
<div>
<el-form-item
prop=
"qq"
label=
"QQ号"
>
<el-input
v-model=
"addFormInfo.from.qq"
clearable
/>
<el-form-item
prop=
"qq"
label=
"QQ号"
>
<el-input
v-model=
"addFormInfo.from.qq"
clearable
/>
</el-form-item>
</div>
</div>
<div
class=
"contact"
>
<el-form-item
prop=
"telephone"
label=
"电话"
>
<el-form-item
prop=
"telephone"
label=
"电话"
>
<el-input
v-model=
"addFormInfo.from.telephone"
clearable
type=
"number"
/>
type=
"number"
/>
</el-form-item>
<div>
<el-form-item
prop=
"wechatNumber"
label=
"微信号"
>
<el-input
v-model=
"addFormInfo.from.wechatNumber"
clearable
/>
<el-input
v-model=
"addFormInfo.from.wechatNumber"
clearable
/>
</el-form-item>
</div>
</div>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 67px;margin-top:10px;"
>
<el-input
v-model=
"addFormInfo.from.corporate"
clearable
style=
"width: 80%!important;"
/>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 67px; margin-top: 10px"
>
<el-input
v-model=
"addFormInfo.from.corporate"
clearable
style=
"width: 80% !important"
/>
</el-form-item>
<el-form-item
label=
"需求描述:"
autosize
prop=
"description"
style=
"margin-left: 67px;margin-top:10px;"
>
<el-input
type=
"textarea"
v-model=
"addFormInfo.from.description"
<el-form-item
label=
"需求描述:"
autosize
prop=
"description"
style=
"margin-left: 67px; margin-top: 10px"
>
<el-input
type=
"textarea"
v-model=
"addFormInfo.from.description"
:rows=
"5"
style=
"width: 80%!important;"
></el-input>
style=
"width: 80% !important"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"uploadAddForm"
:loading=
"addFormInfo.flag === 0"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"uploadAddForm"
:loading=
"addFormInfo.flag === 0"
>
确定
</el-button
>
</div>
</el-dialog>
<el-dialog
title=
"手动分配新增信息"
:visible.sync=
"typeManage.manualDialog"
>
<el-form
ref=
"manuaDataForm"
:model=
"addFormInfo.from"
:rules=
"rules"
>
<el-form
ref=
"manuaDataForm"
:model=
"addFormInfo.from"
:rules=
"rules"
>
<el-form-item
prop=
"type"
label=
"信息分类"
:label-width=
"'120px'"
>
<el-select
clearable
...
...
@@ -178,59 +198,85 @@
/>
</el-select>
</el-form-item>
<el-form-item
prop=
"changesalesman"
label=
"选择销售人员"
style=
"margin-left: 30px;"
>
<el-select
v-model=
"addFormInfo.from.changesalesman"
clearable
placeholder=
"请选择销售人员"
>
<el-form-item
prop=
"changesalesman"
label=
"选择销售人员"
style=
"margin-left: 30px"
>
<el-select
v-model=
"addFormInfo.from.changesalesman"
clearable
placeholder=
"请选择销售人员"
>
<el-option
v-for=
"item in addFormInfo.from.deliverAssign"
:key=
"item.nickName"
:label=
"item.nickName"
:value=
"item.userId"
>
:value=
"item.userId"
>
</el-option>
</el-select>
</el-form-item>
<div
class=
"contact"
>
<el-form-item
prop=
"name"
label=
"姓名"
>
<el-input
v-model=
"addFormInfo.from.name"
type=
"text"
clearable
/>
<el-input
v-model=
"addFormInfo.from.name"
type=
"text"
clearable
/>
</el-form-item>
<div>
<el-form-item
prop=
"qq"
label=
"QQ号"
>
<el-input
v-model=
"addFormInfo.from.qq"
clearable
/>
<el-form-item
prop=
"qq"
label=
"QQ号"
>
<el-input
v-model=
"addFormInfo.from.qq"
clearable
/>
</el-form-item>
</div>
</div>
<div
class=
"contact"
>
<el-form-item
prop=
"telephone"
label=
"电话"
>
<el-form-item
prop=
"telephone"
label=
"电话"
>
<el-input
v-model=
"addFormInfo.from.telephone"
clearable
type=
"number"
/>
type=
"number"
/>
</el-form-item>
<div>
<el-form-item
prop=
"wechatNumber"
label=
"微信号"
>
<el-input
v-model=
"addFormInfo.from.wechatNumber"
clearable
/>
<el-input
v-model=
"addFormInfo.from.wechatNumber"
clearable
/>
</el-form-item>
</div>
</div>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 67px;margin-top:10px;"
>
<el-input
v-model=
"addFormInfo.from.corporate"
clearable
style=
"width: 80%!important;"
/>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 67px; margin-top: 10px"
>
<el-input
v-model=
"addFormInfo.from.corporate"
clearable
style=
"width: 80% !important"
/>
</el-form-item>
<el-form-item
label=
"需求描述:"
autosize
prop=
"description"
style=
"margin-left: 67px;margin-top:10px;"
>
<el-input
type=
"textarea"
v-model=
"addFormInfo.from.description"
<el-form-item
label=
"需求描述:"
autosize
prop=
"description"
style=
"margin-left: 67px; margin-top: 10px"
>
<el-input
type=
"textarea"
v-model=
"addFormInfo.from.description"
:rows=
"5"
style=
"width: 80%!important;"
></el-input>
style=
"width: 80% !important"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"manualuploadAddForm"
:loading=
"addFormInfo.flag === 0"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"manualuploadAddForm"
:loading=
"addFormInfo.flag === 0"
>
确定
</el-button
>
</div>
</el-dialog>
<el-dialog
title=
"编辑信息"
:visible.sync=
"editDialog"
>
<el-form
ref=
"addDataForm"
:model=
"editFormInfo.from"
:rules=
"rules"
>
<el-form
ref=
"addDataForm"
:model=
"editFormInfo.from"
:rules=
"rules"
>
<el-form-item
prop=
"type"
label=
"信息分类"
:label-width=
"'120px'"
>
<el-select
v-model=
"editFormInfo.from.type"
...
...
@@ -249,38 +295,64 @@
</el-form-item>
<div
class=
"contact"
>
<el-form-item
prop=
"name"
label=
"姓名"
>
<el-input
v-model=
"editFormInfo.from.name"
type=
"text"
clearable
/>
<el-input
v-model=
"editFormInfo.from.name"
type=
"text"
clearable
/>
</el-form-item>
<el-form-item
prop=
"telephone"
label=
"电话"
>
<el-form-item
prop=
"telephone"
label=
"电话"
>
<el-input
v-model=
"editFormInfo.from.telephone"
type=
"number"
clearable
v-bind:readonly=
"pMobile"
/>
v-model=
"editFormInfo.from.telephone"
type=
"number"
clearable
v-bind:readonly=
"pMobile"
/>
</el-form-item>
</div>
<div
class=
"contact"
>
<div>
<el-form-item
prop=
"qq"
label=
"QQ号"
>
<el-input
v-model=
"editFormInfo.from.qq"
clearable
/>
<el-form-item
prop=
"qq"
label=
"QQ号"
>
<el-input
v-model=
"editFormInfo.from.qq"
clearable
/>
</el-form-item>
</div>
<div>
<el-form-item
prop=
"wechatNumber"
label=
"微信号"
>
<el-input
v-model=
"editFormInfo.from.wechatNumber"
clearable
v-bind:readonly=
"mPassport"
/>
<el-input
v-model=
"editFormInfo.from.wechatNumber"
clearable
v-bind:readonly=
"mPassport"
/>
</el-form-item>
</div>
</div>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 67px;margin-top:10px;"
>
<el-input
v-model=
"editFormInfo.from.corporate"
style=
"width: 80%!important;"
clearable
/>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 67px; margin-top: 10px"
>
<el-input
v-model=
"editFormInfo.from.corporate"
style=
"width: 80% !important"
clearable
/>
</el-form-item>
<el-form-item
label=
"需求描述:"
prop=
"description"
style=
"margin-left: 67px;margin-top:10px;"
>
<el-input
type=
"textarea"
v-model=
"editFormInfo.from.description"
<el-form-item
label=
"需求描述:"
prop=
"description"
style=
"margin-left: 67px; margin-top: 10px"
>
<el-input
type=
"textarea"
v-model=
"editFormInfo.from.description"
:rows=
"5"
style=
"width: 80%!important;
"
style=
"width: 80% !important
"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"editConfig"
:loading=
"editFormInfo.flag === 0"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"editConfig"
:loading=
"editFormInfo.flag === 0"
>
确定
</el-button
>
</div>
</el-dialog>
</div>
...
...
@@ -289,98 +361,116 @@
<
script
>
import
axios
from
"
axios
"
;
import
{
getAllcategory
,
getNamecategory
,
addcategory
,
editcategory
,
deletecategory
,
getAllCategory
,
deliverList
,
manualInfo
}
from
"
@/api/management.js
"
;
getAllcategory
,
getNamecategory
,
addcategory
,
editcategory
,
deletecategory
,
getAllCategory
,
deliverList
,
manualInfo
,
}
from
"
@/api/management.js
"
;
import
{
parseTime
}
from
"
../../utils
"
;
export
default
{
data
()
{
return
{
// 微信电话二选一
pMobile
:
false
,
mPassport
:
false
,
pMobile
:
false
,
mPassport
:
false
,
// 获取其他页数据
newManage
:{
page
:
1
,
size
:
10
,
total
:
0
,
newdata
:[],
newManage
:
{
page
:
1
,
size
:
10
,
total
:
0
,
newdata
:
[],
},
//1.获取全部信息分类
typeManage
:
{
page
:
1
,
size
:
10
,
total
:
0
,
selectdata
:
[],
dropData
:
[],
addDialog
:
false
,
manualDialog
:
false
,
fromData
:[]
typeManage
:
{
page
:
1
,
size
:
10
,
total
:
0
,
selectdata
:
[],
dropData
:
[],
addDialog
:
false
,
manualDialog
:
false
,
fromData
:
[],
},
//2.根据名称获取信息分类
tel
:
''
,
//电话
className
:
''
,
//信息分类
salesName
:
''
,
//销售人员
searchTime
:
""
,
//时间
tel
:
""
,
//电话
className
:
""
,
//信息分类
salesName
:
""
,
//销售人员
searchTime
:
""
,
//时间
// 新增
editDialog
:
false
,
addFormInfo
:
{
from
:
{
localdata
:
[],
type
:
''
,
name
:
''
,
telephone
:
''
,
qq
:
''
,
wechatNumber
:
''
,
corporate
:
''
,
description
:
''
,
user
:
''
,
adduserId
:
''
,
putdata
:
[],
deliverAssign
:
[],
changesalesman
:
''
},
flag
:
1
,
editDialog
:
false
,
addFormInfo
:
{
from
:
{
localdata
:
[],
type
:
""
,
name
:
""
,
telephone
:
""
,
qq
:
""
,
wechatNumber
:
""
,
corporate
:
""
,
description
:
""
,
user
:
""
,
adduserId
:
""
,
putdata
:
[],
deliverAssign
:
[],
changesalesman
:
""
,
},
flag
:
1
,
},
// 4.编辑信息分类
editFormInfo
:
{
from
:
{
type
:
''
,
name
:
''
,
telephone
:
''
,
qq
:
''
,
wechatNumber
:
''
,
corporate
:
''
,
description
:
''
,
userId
:
''
,
id
:
''
,
listid
:
''
,
pushdata
:
[],
},
flag
:
1
,
from
:
{
type
:
""
,
name
:
""
,
telephone
:
""
,
qq
:
""
,
wechatNumber
:
""
,
corporate
:
""
,
description
:
""
,
userId
:
""
,
id
:
""
,
listid
:
""
,
pushdata
:
[],
},
flag
:
1
,
},
// 验证
rules
:
{
name
:
[{
required
:
true
,
message
:
"
请输入姓名
"
,
trigger
:
"
blur
"
}],
rules
:
{
name
:
[{
required
:
true
,
message
:
"
请输入姓名
"
,
trigger
:
"
blur
"
}],
telephone
:
[
{
// required: true, message: "请输入正确的联系方式",
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
"
请输入正确的联系方式
"
,
trigger
:
"
blur
"
}],
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
"
请输入正确的联系方式
"
,
trigger
:
"
blur
"
,
},
],
qq
:
[
// { required: true, message: 'QQ号只可输入5-11位数字', trigger: 'change' },
{
pattern
:
/^
[
1-9
][
0-9
]{0,12}
$/
,
message
:
'
QQ号只可输入5-11位数字
'
,
trigger
:
'
change
'
},
{
pattern
:
/^
\d{5,12}
$/
,
message
:
'
QQ号只可输入5-11位数字
'
,
trigger
:
'
change
'
}
{
pattern
:
/^
[
1-9
][
0-9
]{0,12}
$/
,
message
:
"
QQ号只可输入5-11位数字
"
,
trigger
:
"
change
"
,
},
{
pattern
:
/^
\d{5,12}
$/
,
message
:
"
QQ号只可输入5-11位数字
"
,
trigger
:
"
change
"
,
},
],
// wechatNumber: [
// {pattern:/^[a-zA-Z][a-zA-Z0-9_-]{5,19}$/,message: "请输入正确的微信号码",trigger: "blur"},
// ],
wechatNumber
:
[
{
message
:
"
请输入正确的微信号码
"
,
trigger
:
"
blur
"
},
wechatNumber
:
[{
message
:
"
请输入正确的微信号码
"
,
trigger
:
"
blur
"
}],
type
:
[{
required
:
true
,
message
:
"
请选择类别
"
,
trigger
:
"
blur
"
}],
changesalesman
:
[
{
required
:
true
,
message
:
"
请选择销售人员
"
,
trigger
:
"
blur
"
},
],
type
:
[{
required
:
true
,
message
:
"
请选择类别
"
,
trigger
:
"
blur
"
}],
changesalesman
:
[{
required
:
true
,
message
:
"
请选择销售人员
"
,
trigger
:
"
blur
"
}],
// corporate: [{ required: true, message: "请输入公司名称", trigger: "blur"}],
},
};
},
mounted
()
{
...
...
@@ -388,68 +478,67 @@ export default {
this
.
classification
();
this
.
getSelectInfo
();
// 销售人员列表
deliverList
().
then
(
function
(
res
){
var
deliverData
=
res
.
object
||
[];
deliverList
().
then
(
function
(
res
)
{
var
deliverData
=
res
.
object
||
[];
this
.
addFormInfo
.
from
.
deliverAssign
=
deliverData
;
}.
bind
(
this
));
}.
bind
(
this
)
);
},
watch
:{
watch
:
{
computer
:
{
deep
:
true
,
handler
:
function
(
val
)
{
if
(
val
.
length
>
0
)
{
this
.
mPassport
=
true
this
.
mPassport
=
true
;
}
else
{
this
.
mPassport
=
false
}
this
.
mPassport
=
false
;
}
},
},
mobile
:
{
deep
:
true
,
handler
:
function
(
val
)
{
if
(
val
.
length
>
0
)
{
this
.
pMobile
=
true
this
.
pMobile
=
true
;
}
else
{
this
.
pMobile
=
false
}
this
.
pMobile
=
false
;
}
},
},
},
methods
:
{
// 获取其他页数据
classification
(
params
)
{
classification
(
params
)
{
var
params
=
{
page
:
this
.
newManage
.
page
,
pageSize
:
this
.
newManage
.
size
,
page
:
this
.
newManage
.
page
,
pageSize
:
this
.
newManage
.
size
,
};
getAllCategory
(
params
).
then
((
res
)
=>
{
var
newlist
=
res
.
object
.
records
||
[];
this
.
newManage
.
newdata
=
newlist
;
});
},
// 获取分类下拉列表
getSelectInfo
()
{
getSelectInfo
()
{
var
typeM
=
this
.
typeManage
;
var
params
=
{
page
:
1
,
pageSize
:
999
,
page
:
1
,
pageSize
:
999
,
};
getAllCategory
(
params
).
then
((
res
)
=>
{
var
dropDown
=
res
.
object
.
records
||
[];
typeM
.
dropData
=
dropDown
;
});
},
//1.获取全部信息管理
allManagement
(
params
)
{
allManagement
(
params
)
{
var
typeM
=
this
.
typeManage
;
var
params
=
{
page
:
typeM
.
page
,
pageSize
:
typeM
.
size
,
page
:
typeM
.
page
,
pageSize
:
typeM
.
size
,
};
getAllcategory
(
params
).
then
((
res
)
=>
{
var
selectlist
=
res
.
object
.
records
||
[];
...
...
@@ -460,13 +549,13 @@ export default {
//获取全部信息管理分页
handleSizeChange
(
val
)
{
// 每页多少条
this
.
typeManage
.
size
=
val
;
this
.
toSearch
()
this
.
typeManage
.
size
=
val
;
this
.
toSearch
();
},
handleCurrentChange
(
val
)
{
// 当前是多少页
this
.
typeManage
.
page
=
val
;
this
.
toSearch
()
this
.
toSearch
();
},
//2.根据名称获取信息分类
toSearch
()
{
...
...
@@ -491,31 +580,33 @@ export default {
});
},
// 新增
addDialogData
()
{
addDialogData
()
{
// username
this
.
typeManage
.
addDialog
=
true
;
this
.
addFormInfo
.
from
.
user
=
this
.
$store
.
getters
.
user
.
username
;
this
.
addFormInfo
.
from
.
user
=
this
.
$store
.
getters
.
user
.
username
;
// userId
this
.
addFormInfo
.
from
.
adduserId
=
this
.
$store
.
getters
.
user
.
id
this
.
addFormInfo
.
from
.
adduserId
=
this
.
$store
.
getters
.
user
.
id
;
},
uploadAddForm
()
{
if
(
this
.
addFormInfo
.
flag
)
{
uploadAddForm
()
{
if
(
this
.
addFormInfo
.
flag
)
{
this
.
addFormInfo
.
flag
=
0
;
this
.
$refs
.
addDataForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
var
params
=
{
classidStr
:
this
.
addFormInfo
.
from
.
type
,
name
:
this
.
addFormInfo
.
from
.
name
,
tel
:
this
.
addFormInfo
.
from
.
telephone
,
qqnub
:
this
.
addFormInfo
.
from
.
qq
,
weixin
:
this
.
addFormInfo
.
from
.
wechatNumber
,
company
:
this
.
addFormInfo
.
from
.
corporate
,
remarks
:
this
.
addFormInfo
.
from
.
description
,
username
:
this
.
addFormInfo
.
from
.
user
,
userId
:
this
.
addFormInfo
.
from
.
adduserId
classidStr
:
this
.
addFormInfo
.
from
.
type
,
name
:
this
.
addFormInfo
.
from
.
name
,
tel
:
this
.
addFormInfo
.
from
.
telephone
,
qqnub
:
this
.
addFormInfo
.
from
.
qq
,
weixin
:
this
.
addFormInfo
.
from
.
wechatNumber
,
company
:
this
.
addFormInfo
.
from
.
corporate
,
remarks
:
this
.
addFormInfo
.
from
.
description
,
username
:
this
.
addFormInfo
.
from
.
user
,
userId
:
this
.
addFormInfo
.
from
.
adduserId
,
};
if
((
this
.
addFormInfo
.
from
.
telephone
==
''
)
&&
(
this
.
addFormInfo
.
from
.
wechatNumber
==
''
)){
if
(
this
.
addFormInfo
.
from
.
telephone
==
""
&&
this
.
addFormInfo
.
from
.
wechatNumber
==
""
)
{
this
.
$message
({
type
:
"
error
"
,
message
:
"
电话或微信号必须填一个
"
,
...
...
@@ -524,27 +615,26 @@ export default {
var
self
=
this
;
addcategory
(
params
).
then
((
res
)
=>
{
this
.
typeManage
.
addDialog
=
false
;
setTimeout
(
function
()
{
setTimeout
(
function
()
{
self
.
addFormInfo
.
flag
=
1
;
},
300
);
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
allManagement
();
self
.
$message
({
type
:
"
success
"
,
message
:
"
新增成功
"
,
});
}
else
if
(
res
.
code
===
401
){
}
else
if
(
res
.
code
===
401
)
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
已有客户
"
,
});
}
else
if
(
res
.
code
===
402
)
{
}
else
if
(
res
.
code
===
402
)
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
没有销售被分配了该类别的权重
"
,
});
}
else
{
}
else
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
新增失败
"
,
...
...
@@ -552,37 +642,38 @@ export default {
}
});
}
})
});
}
},
// 手动分配新增信息
manualAssignment
()
{
manualAssignment
()
{
// username
this
.
typeManage
.
manualDialog
=
true
;
this
.
addFormInfo
.
from
.
user
=
this
.
$store
.
getters
.
user
.
username
;
this
.
addFormInfo
.
from
.
user
=
this
.
$store
.
getters
.
user
.
username
;
// userId
this
.
addFormInfo
.
from
.
adduserId
=
this
.
$store
.
getters
.
user
.
id
;
this
.
addFormInfo
.
from
.
adduserId
=
this
.
$store
.
getters
.
user
.
id
;
},
manualuploadAddForm
()
{
if
(
this
.
addFormInfo
.
flag
)
{
manualuploadAddForm
()
{
if
(
this
.
addFormInfo
.
flag
)
{
this
.
addFormInfo
.
flag
=
0
;
this
.
$refs
.
manuaDataForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
var
params
=
{
classidStr
:
this
.
addFormInfo
.
from
.
type
,
name
:
this
.
addFormInfo
.
from
.
name
,
tel
:
this
.
addFormInfo
.
from
.
telephone
,
qqnub
:
this
.
addFormInfo
.
from
.
qq
,
weixin
:
this
.
addFormInfo
.
from
.
wechatNumber
,
company
:
this
.
addFormInfo
.
from
.
corporate
,
remarks
:
this
.
addFormInfo
.
from
.
description
,
username
:
this
.
addFormInfo
.
from
.
user
,
userId
:
this
.
addFormInfo
.
from
.
adduserId
,
saleidStr
:
this
.
addFormInfo
.
from
.
changesalesman
,
classidStr
:
this
.
addFormInfo
.
from
.
type
,
name
:
this
.
addFormInfo
.
from
.
name
,
tel
:
this
.
addFormInfo
.
from
.
telephone
,
qqnub
:
this
.
addFormInfo
.
from
.
qq
,
weixin
:
this
.
addFormInfo
.
from
.
wechatNumber
,
company
:
this
.
addFormInfo
.
from
.
corporate
,
remarks
:
this
.
addFormInfo
.
from
.
description
,
username
:
this
.
addFormInfo
.
from
.
user
,
userId
:
this
.
addFormInfo
.
from
.
adduserId
,
saleidStr
:
this
.
addFormInfo
.
from
.
changesalesman
,
};
if
((
this
.
addFormInfo
.
from
.
telephone
==
''
)
&&
(
this
.
addFormInfo
.
from
.
wechatNumber
==
''
)){
if
(
this
.
addFormInfo
.
from
.
telephone
==
""
&&
this
.
addFormInfo
.
from
.
wechatNumber
==
""
)
{
this
.
$message
({
type
:
"
error
"
,
message
:
"
电话或微信号必须填一个
"
,
...
...
@@ -591,22 +682,21 @@ export default {
var
self
=
this
;
manualInfo
(
params
).
then
((
res
)
=>
{
this
.
typeManage
.
manualDialog
=
false
;
setTimeout
(
function
()
{
setTimeout
(
function
()
{
self
.
addFormInfo
.
flag
=
1
;
},
300
);
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
allManagement
();
self
.
$message
({
type
:
"
success
"
,
message
:
"
新增成功
"
,
});
}
else
if
(
res
.
code
===
401
){
}
else
if
(
res
.
code
===
401
)
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
已有客户
"
,
});
}
else
{
}
else
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
新增失败
"
,
...
...
@@ -614,45 +704,44 @@ export default {
}
});
}
})
});
}
},
// 编辑
typeEdit
(
e
,
index
,
item
)
{
typeEdit
(
e
,
index
,
item
)
{
// userId
this
.
editFormInfo
.
from
.
userData
=
this
.
$store
.
getters
.
user
.
id
this
.
editDialog
=
true
this
.
editFormInfo
.
from
.
type
=
item
.
classidStr
this
.
editFormInfo
.
from
.
name
=
item
.
name
this
.
editFormInfo
.
from
.
telephone
=
item
.
tel
this
.
editFormInfo
.
from
.
wechatNumber
=
item
.
weixin
this
.
editFormInfo
.
from
.
corporate
=
item
.
company
this
.
editFormInfo
.
from
.
description
=
item
.
remarks
this
.
editFormInfo
.
from
.
qq
=
item
.
qqnub
this
.
editFormInfo
.
from
.
listid
=
item
.
id
},
editConfig
()
{
if
(
this
.
editFormInfo
.
flag
){
this
.
editFormInfo
.
from
.
userData
=
this
.
$store
.
getters
.
user
.
id
;
this
.
editDialog
=
true
;
this
.
editFormInfo
.
from
.
type
=
item
.
classidStr
;
this
.
editFormInfo
.
from
.
name
=
item
.
name
;
this
.
editFormInfo
.
from
.
telephone
=
item
.
tel
;
this
.
editFormInfo
.
from
.
wechatNumber
=
item
.
weixin
;
this
.
editFormInfo
.
from
.
corporate
=
item
.
company
;
this
.
editFormInfo
.
from
.
description
=
item
.
remarks
;
this
.
editFormInfo
.
from
.
qq
=
item
.
qqnub
;
this
.
editFormInfo
.
from
.
listid
=
item
.
id
;
},
editConfig
()
{
if
(
this
.
editFormInfo
.
flag
)
{
this
.
editFormInfo
.
flag
=
0
;
this
.
$refs
.
addDataForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
var
params
=
{
classidStr
:
this
.
editFormInfo
.
from
.
type
,
name
:
this
.
editFormInfo
.
from
.
name
,
tel
:
this
.
editFormInfo
.
from
.
telephone
,
qqnub
:
this
.
editFormInfo
.
from
.
qq
,
weixin
:
this
.
editFormInfo
.
from
.
wechatNumber
,
company
:
this
.
editFormInfo
.
from
.
corporate
,
remarks
:
this
.
editFormInfo
.
from
.
description
,
userId
:
this
.
editFormInfo
.
from
.
userData
,
id
:
this
.
editFormInfo
.
from
.
listid
classidStr
:
this
.
editFormInfo
.
from
.
type
,
name
:
this
.
editFormInfo
.
from
.
name
,
tel
:
this
.
editFormInfo
.
from
.
telephone
,
qqnub
:
this
.
editFormInfo
.
from
.
qq
,
weixin
:
this
.
editFormInfo
.
from
.
wechatNumber
,
company
:
this
.
editFormInfo
.
from
.
corporate
,
remarks
:
this
.
editFormInfo
.
from
.
description
,
userId
:
this
.
editFormInfo
.
from
.
userData
,
id
:
this
.
editFormInfo
.
from
.
listid
,
};
var
self
=
this
;
editcategory
(
params
).
then
((
res
)
=>
{
this
.
editDialog
=
false
;
setTimeout
(
function
()
{
setTimeout
(
function
()
{
self
.
editFormInfo
.
flag
=
1
;
},
300
);
this
.
allManagement
();
...
...
@@ -660,23 +749,24 @@ export default {
type
:
"
success
"
,
message
:
"
编辑成功
"
,
});
});
}
})
});
}
},
// 删除
typeDelete
(
item
)
{
var
id
=
item
.
id
;
this
.
$confirm
(
"
销售部门已记录该客户,删除该条信息后,后续无法添加该客户相关信息,请谨慎操作
"
,
"
提示
"
,
{
this
.
$confirm
(
"
销售部门已记录该客户,删除该条信息后,后续无法添加该客户相关信息,请谨慎操作
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
}).
then
(()
=>
{
deletecategory
({
id
:
id
}).
then
(
}
).
then
(()
=>
{
deletecategory
({
id
:
id
}).
then
(
(
res
)
=>
{
this
.
$message
({
message
:
"
删除成功
"
,
...
...
@@ -713,7 +803,7 @@ export default {
}
.datamanage-wrapper
{
width
:
100%
;
height
:
100%
;
height
:
100%
;
padding
:
10px
;
border-radius
:
5px
;
background-color
:
#f5f6fb
;
...
...
@@ -736,18 +826,16 @@ export default {
background
:
#fff
;
}
}
.contact
{
.contact
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-around
;
}
::v-deep
input
::-webkit-outer-spin-button
,
::v-deep
input
::-webkit-outer-spin-button
,
::v-deep
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
!
important
;
-webkit-appearance
:
none
!
important
;
}
::v-deep
input
[
type
=
‘
number
’
]
{
-moz-appearance
:
textfield
!
important
;
::v-deep
input
[
type
=
"‘number’"
]
{
-moz-appearance
:
textfield
!
important
;
}
</
style
>
src/views/manageClass/management.vue
View file @
b495d97a
...
...
@@ -49,27 +49,11 @@
placeholder=
"请输入销售人员"
clearable
/>
<el-button
type=
"success"
style=
"margin-left: 30px"
icon=
"el-icon-search"
@
click=
"toSearch"
>
搜索
</el-button
>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"addDialogData()"
style=
"margin-left: 30px"
>
<el-button
type=
"success"
style=
"margin-left: 30px"
icon=
"el-icon-search"
@
click=
"toSearch"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"addDialogData()"
style=
"margin-left: 30px"
>
自动分配
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"manualAssignment()"
style=
"margin-left: 30px"
>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"manualAssignment()"
style=
"margin-left: 30px"
>
手动分配
</el-button>
</div>
...
...
@@ -88,8 +72,8 @@
<i
v-if=
"item.icon"
:class=
"item.icon"
style=
"font-size:16px;"
></i>
{{
sitem
[
item
.
key
||
'
name
'
]
}}
</span>
</
template
>
</template>
</el-table-column>
-->
</template>
</el-table-column>
-->
<!-- <el-table-column prop="classidStr" label="信息分类" width="120" /> -->
<el-table-column
prop=
"classidStr"
label=
"信息分类"
width=
"120"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -106,20 +90,10 @@
<el-table-column
prop=
"alloStatus"
label=
"分配状态"
width=
"180"
/>
<el-table-column
label=
"操作"
fixed=
"right"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"typeEdit(scope.$index, scope.row)"
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"typeEdit(scope.$index, scope.row)"
>
编辑
</el-button
>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"typeDelete(scope.row)"
>
删除
</el-button
>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"typeDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -158,17 +132,8 @@
/>
</el-form-item>
<div
class=
"contact1"
>
<el-form-item
prop=
"eCommerceId"
label=
"电商ID"
:label-width=
"'100px'"
>
<el-input
v-model=
"addFormInfo.from.eCommerceId"
style=
"width: 180px"
type=
"text"
clearable
/>
<el-form-item
prop=
"eCommerceId"
label=
"电商ID"
:label-width=
"'100px'"
>
<el-input
v-model=
"addFormInfo.from.eCommerceId"
style=
"width: 180px"
type=
"text"
clearable
/>
</el-form-item>
<el-form-item
label=
"是否是内蒙的信息"
:label-width=
"'160px'"
>
<el-radio-group
v-model=
"addFormInfo.from.isNeiMeng"
>
...
...
@@ -193,59 +158,33 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
prop=
"telephone"
label=
"电话"
:label-width=
"'100px'"
>
<el-input
v-model=
"addFormInfo.from.telephone"
clearable
type=
"number"
/>
<el-input
v-model=
"addFormInfo.from.telephone"
clearable
type=
"number"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
prop=
"wechatNumber"
label=
"微信号"
:label-width=
"'100px'"
>
<el-form-item
prop=
"wechatNumber"
label=
"微信号"
:label-width=
"'100px'"
>
<el-input
v-model=
"addFormInfo.from.wechatNumber"
clearable
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
>
<el-form-item
prop=
"corporate"
label=
"公司名称"
:label-width=
"'100px'"
>
<el-form-item
prop=
"corporate"
label=
"公司名称"
:label-width=
"'100px'"
>
<el-input
v-model=
"addFormInfo.from.corporate"
clearable
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"需求描述:"
autosize
prop=
"description"
:label-width=
"'100px'"
>
<el-input
type=
"textarea"
v-model=
"addFormInfo.from.description"
:rows=
"5"
></el-input>
<el-form-item
label=
"需求描述:"
autosize
prop=
"description"
:label-width=
"'100px'"
>
<el-input
type=
"textarea"
v-model=
"addFormInfo.from.description"
:rows=
"5"
></el-input>
</el-form-item>
</el-col>
</el-row>
<div></div>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"uploadAddForm"
:loading=
"addFormInfo.flag === 0"
>
确定
</el-button
>
<el-button
type=
"primary"
@
click=
"uploadAddForm"
:loading=
"addFormInfo.flag === 0"
>
确定
</el-button>
</div>
</el-dialog>
...
...
@@ -273,32 +212,14 @@
placeholder=
"请选择类别"
/>
</el-form-item>
<el-form-item
prop=
"changesalesman"
label=
"选择销售人员"
style=
"margin-left: 30px"
>
<el-select
v-model=
"addFormInfo.from.changesalesman"
clearable
placeholder=
"请选择销售人员"
>
<el-option
v-for=
"item in deliverAssign"
:key=
"item.nickName"
:label=
"item.nickName"
:value=
"item.userId"
>
<el-form-item
prop=
"changesalesman"
label=
"选择销售人员"
style=
"margin-left: 30px"
>
<el-select
v-model=
"addFormInfo.from.changesalesman"
clearable
placeholder=
"请选择销售人员"
>
<el-option
v-for=
"item in deliverAssign"
:key=
"item.nickName"
:label=
"item.nickName"
:value=
"item.userId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
prop=
"eCommerceId"
label=
"电商ID"
:label-width=
"'100px'"
>
<el-input
v-model=
"addFormInfo.from.eCommerceId"
style=
"width: 180px"
type=
"text"
clearable
/>
<el-input
v-model=
"addFormInfo.from.eCommerceId"
style=
"width: 180px"
type=
"text"
clearable
/>
</el-form-item>
<div
class=
"contact"
>
<el-form-item
prop=
"name"
label=
"姓名"
:label-width=
"'60px'"
>
...
...
@@ -312,11 +233,7 @@
</div>
<div
class=
"contact"
>
<el-form-item
prop=
"telephone"
label=
"电话"
:label-width=
"'60px'"
>
<el-input
v-model=
"addFormInfo.from.telephone"
clearable
type=
"number"
/>
<el-input
v-model=
"addFormInfo.from.telephone"
clearable
type=
"number"
/>
</el-form-item>
<div>
<el-form-item
prop=
"wechatNumber"
label=
"微信号"
:label-width=
"'60px'"
>
...
...
@@ -324,23 +241,10 @@
</el-form-item>
</div>
</div>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 40px; margin-top: 10px"
>
<el-input
v-model=
"addFormInfo.from.corporate"
clearable
style=
"width: 80% !important"
/>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 40px; margin-top: 10px"
>
<el-input
v-model=
"addFormInfo.from.corporate"
clearable
style=
"width: 80% !important"
/>
</el-form-item>
<el-form-item
label=
"需求描述:"
autosize
prop=
"description"
style=
"margin-left: 40px; margin-top: 10px"
>
<el-form-item
label=
"需求描述:"
autosize
prop=
"description"
style=
"margin-left: 40px; margin-top: 10px"
>
<el-input
type=
"textarea"
v-model=
"addFormInfo.from.description"
...
...
@@ -350,12 +254,7 @@
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"manualuploadAddForm"
:loading=
"addFormInfo.flag === 0"
>
确定
</el-button
>
<el-button
type=
"primary"
@
click=
"manualuploadAddForm"
:loading=
"addFormInfo.flag === 0"
>
确定
</el-button>
</div>
</el-dialog>
...
...
@@ -385,24 +284,14 @@
/>
</el-form-item>
<el-form-item
prop=
"eCommerceId"
label=
"电商ID"
:label-width=
"'100px'"
>
<el-input
v-model=
"editFormInfo.from.eCommerceId"
style=
"width: 180px"
type=
"text"
clearable
/>
<el-input
v-model=
"editFormInfo.from.eCommerceId"
style=
"width: 180px"
type=
"text"
clearable
/>
</el-form-item>
<div
class=
"contact"
>
<el-form-item
prop=
"name"
label=
"姓名"
>
<el-input
v-model=
"editFormInfo.from.name"
type=
"text"
clearable
/>
</el-form-item>
<el-form-item
prop=
"telephone"
label=
"电话"
>
<el-input
v-model=
"editFormInfo.from.telephone"
type=
"number"
clearable
v-bind:readonly=
"pMobile"
/>
<el-input
v-model=
"editFormInfo.from.telephone"
type=
"number"
clearable
v-bind:readonly=
"pMobile"
/>
</el-form-item>
</div>
<div
class=
"contact"
>
...
...
@@ -413,30 +302,14 @@
</div>
<div>
<el-form-item
prop=
"wechatNumber"
label=
"微信号"
>
<el-input
v-model=
"editFormInfo.from.wechatNumber"
clearable
v-bind:readonly=
"mPassport"
/>
<el-input
v-model=
"editFormInfo.from.wechatNumber"
clearable
v-bind:readonly=
"mPassport"
/>
</el-form-item>
</div>
</div>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 30px; margin-top: 10px"
>
<el-input
v-model=
"editFormInfo.from.corporate"
style=
"width: 80% !important"
clearable
/>
<el-form-item
prop=
"corporate"
label=
"公司名称"
style=
"margin-left: 30px; margin-top: 10px"
>
<el-input
v-model=
"editFormInfo.from.corporate"
style=
"width: 80% !important"
clearable
/>
</el-form-item>
<el-form-item
label=
"需求描述:"
prop=
"description"
style=
"margin-left: 30px; margin-top: 10px"
>
<el-form-item
label=
"需求描述:"
prop=
"description"
style=
"margin-left: 30px; margin-top: 10px"
>
<el-input
type=
"textarea"
v-model=
"editFormInfo.from.description"
...
...
@@ -446,19 +319,14 @@
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"editConfig"
:loading=
"editFormInfo.flag === 0"
>
确定
</el-button
>
<el-button
type=
"primary"
@
click=
"editConfig"
:loading=
"editFormInfo.flag === 0"
>
确定
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
axios
from
"
axios
"
;
import
axios
from
'
axios
'
import
{
getAllcategory
,
getNamecategory
,
...
...
@@ -467,16 +335,12 @@ import {
deletecategory
,
getAllCategory
,
deliverList
,
manualInfo
,
}
from
"
@/api/management.js
"
;
import
{
parseTime
}
from
"
../../utils
"
;
import
{
reqInformationTreeList
,
reqAllInfoTreeList
,
reqAllInfoTreeBuild
,
}
from
"
@/api/treeMenus.js
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
manualInfo
}
from
'
@/api/management.js
'
import
{
parseTime
}
from
'
../../utils
'
import
{
reqInformationTreeList
,
reqAllInfoTreeList
,
reqAllInfoTreeBuild
}
from
'
@/api/treeMenus.js
'
import
Treeselect
from
'
@riophae/vue-treeselect
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
export
default
{
data
()
{
return
{
...
...
@@ -488,7 +352,7 @@ export default {
page
:
1
,
size
:
10
,
total
:
0
,
newdata
:
[]
,
newdata
:
[]
},
//1.获取全部信息分类
typeManage
:
{
...
...
@@ -499,33 +363,33 @@ export default {
dropData
:
[],
addDialog
:
false
,
manualDialog
:
false
,
fromData
:
[]
,
fromData
:
[]
},
//2.根据名称获取信息分类
tel
:
""
,
//电话
tel
:
''
,
//电话
className
:
0
,
//信息分类
salesName
:
""
,
//销售人员
searchTime
:
""
,
//时间
salesName
:
''
,
//销售人员
searchTime
:
''
,
//时间
// 新增
editDialog
:
false
,
addFormInfo
:
{
from
:
{
localdata
:
[],
classidStr
:
0
,
name
:
""
,
telephone
:
""
,
qq
:
""
,
wechatNumber
:
""
,
corporate
:
""
,
description
:
""
,
user
:
""
,
adduserId
:
""
,
name
:
''
,
telephone
:
''
,
qq
:
''
,
wechatNumber
:
''
,
corporate
:
''
,
description
:
''
,
user
:
''
,
adduserId
:
''
,
putdata
:
[],
changesalesman
:
""
,
eCommerceId
:
""
,
isNeiMeng
:
false
,
changesalesman
:
''
,
eCommerceId
:
''
,
isNeiMeng
:
false
},
flag
:
1
,
flag
:
1
},
deliverAssign
:
[],
...
...
@@ -533,86 +397,82 @@ export default {
editFormInfo
:
{
from
:
{
classidStr
:
0
,
name
:
""
,
telephone
:
""
,
qq
:
""
,
wechatNumber
:
""
,
corporate
:
""
,
description
:
""
,
userId
:
""
,
id
:
""
,
listid
:
""
,
name
:
''
,
telephone
:
''
,
qq
:
''
,
wechatNumber
:
''
,
corporate
:
''
,
description
:
''
,
userId
:
''
,
id
:
''
,
listid
:
''
,
pushdata
:
[],
eCommerceId
:
""
,
eCommerceId
:
''
},
flag
:
1
,
flag
:
1
},
// 验证
rules
:
{
name
:
[{
required
:
true
,
message
:
"
请输入姓名
"
,
trigger
:
"
blur
"
}],
name
:
[{
required
:
true
,
message
:
'
请输入姓名
'
,
trigger
:
'
blur
'
}],
telephone
:
[
{
// required: true, message: "请输入正确的联系方式",
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
"
请输入正确的联系方式
"
,
trigger
:
"
blur
"
,
}
,
message
:
'
请输入正确的联系方式
'
,
trigger
:
'
blur
'
}
],
qq
:
[
// { required: true, message: 'QQ号只可输入5-11位数字', trigger: 'change' },
{
pattern
:
/^
[
1-9
][
0-9
]{0,12}
$/
,
message
:
"
QQ号只可输入5-11位数字
"
,
trigger
:
"
change
"
,
message
:
'
QQ号只可输入5-11位数字
'
,
trigger
:
'
change
'
},
{
pattern
:
/^
\d{5,12}
$/
,
message
:
"
QQ号只可输入5-11位数字
"
,
trigger
:
"
change
"
,
}
,
message
:
'
QQ号只可输入5-11位数字
'
,
trigger
:
'
change
'
}
],
// wechatNumber: [
// {pattern:/^[a-zA-Z][a-zA-Z0-9_-]{5,19}$/,message: "请输入正确的微信号码",trigger: "blur"},
// ],
wechatNumber
:
[{
message
:
"
请输入正确的微信号码
"
,
trigger
:
"
blur
"
}],
classidStr
:
[
{
required
:
true
,
message
:
"
请选择类别
"
,
trigger
:
"
blur
"
},
],
changesalesman
:
[
{
required
:
true
,
message
:
"
请选择销售人员
"
,
trigger
:
"
blur
"
},
],
wechatNumber
:
[{
message
:
'
请输入正确的微信号码
'
,
trigger
:
'
blur
'
}],
classidStr
:
[{
required
:
true
,
message
:
'
请选择类别
'
,
trigger
:
'
blur
'
}],
changesalesman
:
[{
required
:
true
,
message
:
'
请选择销售人员
'
,
trigger
:
'
blur
'
}]
// corporate: [{ required: true, message: "请输入公司名称", trigger: "blur"}],
},
infoTree
:
{
menus
:
[{
id
:
0
,
label
:
"
信息分类
"
,
children
:
null
,
pid
:
-
1
}],
Dict
:
[]
,
}
,
}
;
menus
:
[{
id
:
0
,
label
:
'
信息分类
'
,
children
:
null
,
pid
:
-
1
}],
Dict
:
[]
}
}
},
components
:
{
Treeselect
},
mounted
()
{
var
that
=
this
;
var
that
=
this
deliverList
().
then
(
function
(
res
)
{
var
deliverData
=
res
.
object
||
[]
;
this
.
deliverAssign
=
deliverData
;
var
deliverData
=
res
.
object
||
[]
this
.
deliverAssign
=
deliverData
}.
bind
(
this
)
)
;
)
// 信息分类字典
reqAllInfoTreeList
().
then
(
function
(
res
)
{
if
(
res
.
code
===
200
)
{
var
list
=
res
.
object
.
records
||
[]
;
list
.
push
(
that
.
infoTree
.
menus
[
0
])
;
qf
.
Utils
.
treeListBuild
(
list
)
;
that
.
infoTree
.
Dict
=
qf
.
Utils
.
arrayToJsonDict
(
list
,
"
id
"
);
var
list
=
res
.
object
.
records
||
[]
list
.
push
(
that
.
infoTree
.
menus
[
0
])
qf
.
Utils
.
treeListBuild
(
list
)
that
.
infoTree
.
Dict
=
qf
.
Utils
.
arrayToJsonDict
(
list
,
'
id
'
)
}
})
;
})
this
.
allManagement
()
;
this
.
classification
()
;
this
.
getSelectInfo
()
;
this
.
allManagement
()
this
.
classification
()
this
.
getSelectInfo
()
// 销售人员列表
},
...
...
@@ -621,22 +481,22 @@ export default {
deep
:
true
,
handler
:
function
(
val
)
{
if
(
val
.
length
>
0
)
{
this
.
mPassport
=
true
;
this
.
mPassport
=
true
}
else
{
this
.
mPassport
=
false
;
this
.
mPassport
=
false
}
}
},
},
mobile
:
{
deep
:
true
,
handler
:
function
(
val
)
{
if
(
val
.
length
>
0
)
{
this
.
pMobile
=
true
;
this
.
pMobile
=
true
}
else
{
this
.
pMobile
=
false
;
this
.
pMobile
=
false
}
}
}
},
},
},
methods
:
{
...
...
@@ -644,81 +504,81 @@ export default {
classification
(
params
)
{
var
params
=
{
page
:
this
.
newManage
.
page
,
pageSize
:
this
.
newManage
.
size
,
}
;
pageSize
:
this
.
newManage
.
size
}
getAllCategory
(
params
).
then
((
res
)
=>
{
var
newlist
=
res
.
object
.
records
||
[]
;
this
.
newManage
.
newdata
=
newlist
;
})
;
var
newlist
=
res
.
object
.
records
||
[]
this
.
newManage
.
newdata
=
newlist
})
},
// 获取分类下拉列表
getSelectInfo
()
{
var
typeM
=
this
.
typeManage
;
var
typeM
=
this
.
typeManage
var
params
=
{
page
:
1
,
pageSize
:
999
,
}
;
pageSize
:
999
}
getAllCategory
(
params
).
then
((
res
)
=>
{
var
dropDown
=
res
.
object
.
records
||
[]
;
typeM
.
dropData
=
dropDown
;
})
;
var
dropDown
=
res
.
object
.
records
||
[]
typeM
.
dropData
=
dropDown
})
},
//1.获取全部信息管理
allManagement
(
params
)
{
var
typeM
=
this
.
typeManage
;
var
typeM
=
this
.
typeManage
var
params
=
{
page
:
typeM
.
page
,
pageSize
:
typeM
.
size
,
}
;
pageSize
:
typeM
.
size
}
getAllcategory
(
params
).
then
((
res
)
=>
{
var
selectlist
=
res
.
object
.
records
||
[]
;
typeM
.
selectdata
=
selectlist
;
typeM
.
total
=
res
.
object
.
total
;
})
;
var
selectlist
=
res
.
object
.
records
||
[]
typeM
.
selectdata
=
selectlist
typeM
.
total
=
res
.
object
.
total
})
},
//获取全部信息管理分页
handleSizeChange
(
val
)
{
// 每页多少条
this
.
typeManage
.
size
=
val
;
this
.
toSearch
()
;
this
.
typeManage
.
size
=
val
this
.
toSearch
()
},
handleCurrentChange
(
val
)
{
// 当前是多少页
this
.
typeManage
.
page
=
val
;
this
.
toSearch
()
;
this
.
typeManage
.
page
=
val
this
.
toSearch
()
},
//2.根据名称获取信息分类
toSearch
()
{
var
typeM
=
this
.
typeManage
;
var
typeM
=
this
.
typeManage
var
param
=
{
page
:
this
.
typeManage
.
page
,
pageSize
:
this
.
typeManage
.
size
,
}
;
this
.
tel
&&
(
param
.
tel
=
this
.
tel
)
;
this
.
salesName
&&
(
param
.
salesName
=
this
.
salesName
)
;
this
.
className
&&
(
param
.
className
=
this
.
className
)
;
pageSize
:
this
.
typeManage
.
size
}
this
.
tel
&&
(
param
.
tel
=
this
.
tel
)
this
.
salesName
&&
(
param
.
salesName
=
this
.
salesName
)
this
.
className
&&
(
param
.
className
=
this
.
className
)
// 时间
if
(
this
.
searchTime
instanceof
Array
)
{
param
.
startTime
=
parseTime
(
new
Date
(
this
.
searchTime
[
0
]))
;
param
.
endTime
=
parseTime
(
new
Date
(
this
.
searchTime
[
1
]))
;
param
.
startTime
=
parseTime
(
new
Date
(
this
.
searchTime
[
0
]))
param
.
endTime
=
parseTime
(
new
Date
(
this
.
searchTime
[
1
]))
}
var
typeM
=
this
.
typeManage
;
var
typeM
=
this
.
typeManage
getNamecategory
(
param
).
then
((
res
)
=>
{
var
selectlist
=
res
.
object
.
records
||
[]
;
typeM
.
selectdata
=
selectlist
;
typeM
.
total
=
res
.
object
.
total
;
})
;
var
selectlist
=
res
.
object
.
records
||
[]
typeM
.
selectdata
=
selectlist
typeM
.
total
=
res
.
object
.
total
})
},
// 新增
addDialogData
()
{
this
.
typeManage
.
addDialog
=
true
;
this
.
typeManage
.
addDialog
=
true
// this.addFormInfo.from = {
// classidStr: 0,
// };
this
.
addFormInfo
.
from
.
classidStr
=
0
;
this
.
addFormInfo
.
from
.
user
=
this
.
$store
.
getters
.
user
.
username
;
this
.
addFormInfo
.
from
.
classidStr
=
0
this
.
addFormInfo
.
from
.
user
=
this
.
$store
.
getters
.
user
.
username
// userId
this
.
addFormInfo
.
from
.
adduserId
=
this
.
$store
.
getters
.
user
.
id
;
this
.
addFormInfo
.
from
.
adduserId
=
this
.
$store
.
getters
.
user
.
id
},
uploadAddForm
()
{
if
(
this
.
addFormInfo
.
flag
)
{
...
...
@@ -735,61 +595,58 @@ export default {
username
:
this
.
addFormInfo
.
from
.
user
,
userId
:
this
.
addFormInfo
.
from
.
adduserId
,
eCommerceId
:
this
.
addFormInfo
.
from
.
eCommerceId
,
isNeiMeng
:
this
.
addFormInfo
.
from
.
isNeiMeng
,
};
if
(
this
.
addFormInfo
.
from
.
telephone
===
undefined
&&
this
.
addFormInfo
.
from
.
wechatNumber
===
undefined
)
{
isNeiMeng
:
this
.
addFormInfo
.
from
.
isNeiMeng
}
if
(
this
.
addFormInfo
.
from
.
telephone
===
undefined
&&
this
.
addFormInfo
.
from
.
wechatNumber
===
undefined
)
{
this
.
$message
({
type
:
"
error
"
,
message
:
"
电话或微信号必须填一个
"
,
})
;
type
:
'
error
'
,
message
:
'
电话或微信号必须填一个
'
})
}
else
{
var
self
=
this
;
var
self
=
this
addcategory
(
params
).
then
((
res
)
=>
{
this
.
typeManage
.
addDialog
=
false
;
this
.
typeManage
.
addDialog
=
false
setTimeout
(
function
()
{
self
.
addFormInfo
.
flag
=
1
;
},
300
)
;
self
.
addFormInfo
.
flag
=
1
},
300
)
if
(
res
.
code
===
200
)
{
this
.
allManagement
()
;
this
.
allManagement
()
self
.
$message
({
type
:
"
success
"
,
message
:
"
新增成功
"
,
})
;
type
:
'
success
'
,
message
:
'
新增成功
'
})
}
else
if
(
res
.
code
===
401
)
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
已有客户
"
,
})
;
type
:
'
error
'
,
message
:
'
已有客户
'
})
}
else
if
(
res
.
code
===
402
)
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
没有销售被分配了该类别的权重
"
,
})
;
type
:
'
error
'
,
message
:
'
没有销售被分配了该类别的权重
'
})
}
else
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
新增失败
"
,
})
;
type
:
'
error
'
,
message
:
'
新增失败
'
})
}
})
;
})
}
}
})
;
})
}
},
// 手动分配新增信息
manualAssignment
()
{
// username
this
.
typeManage
.
manualDialog
=
true
;
this
.
typeManage
.
manualDialog
=
true
this
.
addFormInfo
.
from
=
{
classidStr
:
0
}
;
this
.
addFormInfo
.
from
.
user
=
this
.
$store
.
getters
.
user
.
username
;
this
.
addFormInfo
.
from
=
{
classidStr
:
0
}
this
.
addFormInfo
.
from
.
user
=
this
.
$store
.
getters
.
user
.
username
// userId
this
.
addFormInfo
.
from
.
adduserId
=
this
.
$store
.
getters
.
user
.
id
;
this
.
addFormInfo
.
from
.
adduserId
=
this
.
$store
.
getters
.
user
.
id
},
manualuploadAddForm
()
{
if
(
this
.
addFormInfo
.
flag
)
{
...
...
@@ -806,67 +663,64 @@ export default {
username
:
this
.
addFormInfo
.
from
.
user
,
userId
:
this
.
addFormInfo
.
from
.
adduserId
,
saleidStr
:
this
.
addFormInfo
.
from
.
changesalesman
,
eCommerceId
:
this
.
addFormInfo
.
from
.
eCommerceId
,
}
;
eCommerceId
:
this
.
addFormInfo
.
from
.
eCommerceId
}
console
.
log
(
params
);
if
(
this
.
addFormInfo
.
from
.
telephone
===
undefined
&&
this
.
addFormInfo
.
from
.
wechatNumber
===
undefined
)
{
console
.
log
(
params
)
if
(
this
.
addFormInfo
.
from
.
telephone
===
undefined
&&
this
.
addFormInfo
.
from
.
wechatNumber
===
undefined
)
{
this
.
$message
({
type
:
"
error
"
,
message
:
"
电话或微信号必须填一个
"
,
})
;
type
:
'
error
'
,
message
:
'
电话或微信号必须填一个
'
})
}
else
{
var
self
=
this
;
var
self
=
this
manualInfo
(
params
).
then
((
res
)
=>
{
this
.
typeManage
.
manualDialog
=
false
;
this
.
typeManage
.
manualDialog
=
false
setTimeout
(
function
()
{
self
.
addFormInfo
.
flag
=
1
;
},
300
)
;
self
.
addFormInfo
.
flag
=
1
},
300
)
if
(
res
.
code
===
200
)
{
this
.
allManagement
()
;
this
.
allManagement
()
self
.
$message
({
type
:
"
success
"
,
message
:
"
新增成功
"
,
})
;
type
:
'
success
'
,
message
:
'
新增成功
'
})
}
else
if
(
res
.
code
===
401
)
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
已有客户
"
,
})
;
type
:
'
error
'
,
message
:
'
已有客户
'
})
}
else
{
self
.
$message
({
type
:
"
error
"
,
message
:
"
新增失败
"
,
})
;
type
:
'
error
'
,
message
:
'
新增失败
'
})
}
})
;
})
}
}
})
;
})
}
},
// 编辑
typeEdit
(
index
,
item
)
{
// userId
this
.
editFormInfo
.
from
.
userData
=
this
.
$store
.
getters
.
user
.
id
;
this
.
editDialog
=
true
;
this
.
editFormInfo
.
from
.
classidStr
=
item
.
classidStr
;
this
.
editFormInfo
.
from
.
name
=
item
.
name
;
this
.
editFormInfo
.
from
.
telephone
=
item
.
tel
;
this
.
editFormInfo
.
from
.
wechatNumber
=
item
.
weixin
;
this
.
editFormInfo
.
from
.
corporate
=
item
.
company
;
this
.
editFormInfo
.
from
.
description
=
item
.
remarks
;
this
.
editFormInfo
.
from
.
qq
=
item
.
qqnub
;
this
.
editFormInfo
.
from
.
listid
=
item
.
id
;
this
.
editFormInfo
.
from
.
eCommerceId
=
item
.
eCommerceId
;
this
.
editFormInfo
.
from
.
userData
=
this
.
$store
.
getters
.
user
.
id
this
.
editDialog
=
true
this
.
editFormInfo
.
from
.
classidStr
=
item
.
classidStr
this
.
editFormInfo
.
from
.
name
=
item
.
name
this
.
editFormInfo
.
from
.
telephone
=
item
.
tel
this
.
editFormInfo
.
from
.
wechatNumber
=
item
.
weixin
this
.
editFormInfo
.
from
.
corporate
=
item
.
company
this
.
editFormInfo
.
from
.
description
=
item
.
remarks
this
.
editFormInfo
.
from
.
qq
=
item
.
qqnub
this
.
editFormInfo
.
from
.
listid
=
item
.
id
this
.
editFormInfo
.
from
.
eCommerceId
=
item
.
eCommerceId
},
editConfig
()
{
if
(
this
.
editFormInfo
.
flag
)
{
this
.
editFormInfo
.
flag
=
0
;
this
.
editFormInfo
.
flag
=
0
this
.
$refs
.
addDataForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
var
params
=
{
...
...
@@ -879,79 +733,75 @@ export default {
remarks
:
this
.
editFormInfo
.
from
.
description
,
userId
:
this
.
editFormInfo
.
from
.
userData
,
id
:
this
.
editFormInfo
.
from
.
listid
,
eCommerceId
:
this
.
editFormInfo
.
from
.
eCommerceId
,
}
;
var
self
=
this
;
eCommerceId
:
this
.
editFormInfo
.
from
.
eCommerceId
}
var
self
=
this
editcategory
(
params
).
then
((
res
)
=>
{
this
.
editDialog
=
false
;
this
.
editDialog
=
false
setTimeout
(
function
()
{
self
.
editFormInfo
.
flag
=
1
;
},
300
)
;
this
.
allManagement
()
;
self
.
editFormInfo
.
flag
=
1
},
300
)
this
.
allManagement
()
self
.
$message
({
type
:
"
success
"
,
message
:
"
编辑成功
"
,
})
;
})
;
type
:
'
success
'
,
message
:
'
编辑成功
'
})
})
}
})
;
})
}
},
// 删除
typeDelete
(
item
)
{
var
id
=
item
.
id
;
this
.
$confirm
(
"
销售部门已记录该客户,删除该条信息后,后续无法添加该客户相关信息,请谨慎操作
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
}
).
then
(()
=>
{
var
id
=
item
.
id
this
.
$confirm
(
'
销售部门已记录该客户,删除该条信息后,后续无法添加该客户相关信息,请谨慎操作
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
deletecategory
({
id
:
id
}).
then
(
(
res
)
=>
{
this
.
$message
({
message
:
"
删除成功
"
,
type
:
"
success
"
,
})
;
this
.
allManagement
()
;
message
:
'
删除成功
'
,
type
:
'
success
'
})
this
.
allManagement
()
},
()
=>
{
this
.
$message
.
error
(
"
删除失败
"
);
this
.
$message
.
error
(
'
删除失败
'
)
}
)
;
})
;
)
})
},
// 加载信息分类列表
loadInfoTreeMenus
({
action
,
parentNode
,
callback
})
{
if
(
action
===
"
LOAD_CHILDREN_OPTIONS
"
)
{
if
(
action
===
'
LOAD_CHILDREN_OPTIONS
'
)
{
setTimeout
(()
=>
{
callback
()
;
},
100
)
;
callback
()
},
100
)
return
;
return
reqInformationTreeList
({
pid
:
parentNode
.
id
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
var
list
=
res
.
object
.
records
||
[]
;
var
list
=
res
.
object
.
records
||
[]
console
.
log
(
"
list ________________
"
,
list
);
console
.
log
(
'
list ________________
'
,
list
)
parentNode
.
children
=
list
.
map
(
function
(
obj
)
{
if
(
!
obj
.
leaf
)
{
obj
.
children
=
null
;
obj
.
children
=
null
}
return
obj
;
})
;
return
obj
})
setTimeout
(()
=>
{
callback
()
;
},
100
)
;
callback
()
},
100
)
}
})
;
})
}
}
,
}
,
}
;
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -959,36 +809,43 @@ export default {
display
:
flex
;
margin
:
20px
0
;
}
.tools-wrapper
{
display
:
flex
;
margin
:
20px
0
;
}
.upload-file-wrapper
{
display
:
flex
;
.file-wrapper
{
width
:
240px
;
height
:
100px
;
background
:
aliceblue
;
}
}
.datamanage-wrapper
{
width
:
100%
;
height
:
100%
;
padding
:
10px
;
border-radius
:
5px
;
background-color
:
#f5f6fb
;
.tool-wrapper
{
padding
:
10px
;
border-radius
:
5px
;
margin
:
10px
10px
;
background
:
#fff
;
}
.search-wrapper
{
padding
:
10px
;
border-radius
:
5px
;
margin
:
10px
10px
;
background
:
#fff
;
}
.table-wrapper
{
padding
:
10px
;
border-radius
:
5px
;
...
...
@@ -996,17 +853,20 @@ export default {
background
:
#fff
;
}
}
.contact
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-around
;
margin-left
:
-100px
;
}
::v-deep
input
::-webkit-outer-spin-button
,
::v-deep
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
!
important
;
}
::v-deep
input
[
type
=
"‘number’"
]
{
::v-deep
input
[
type
=
'‘number’'
]
{
-moz-appearance
:
textfield
!
important
;
}
</
style
>
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