Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
Overview
Overview
Details
Activity
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
office
haoban-4
Commits
a98e2bb1
Commit
a98e2bb1
authored
Nov 20, 2020
by
Kyle_Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 设置列表接口
parent
d176ad86
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
208 additions
and
58 deletions
+208
-58
target-manage-app.js
src/api/target-manage-app.js
+2
-0
gic-select-group-mult.vue
src/components/common/gic-select-group-mult.vue
+1
-1
MonthTarget.vue
src/views/apps/target-manage/MonthTarget.vue
+12
-12
edit-store-quota.vue
src/views/apps/target-manage/edit-store-quota.vue
+5
-4
quota-set.vue
src/views/apps/target-manage/quota-set.vue
+188
-41
No files found.
src/api/target-manage-app.js
View file @
a98e2bb1
...
...
@@ -28,6 +28,8 @@ let api = {
useIntercept
:
false
},
getYearList
:
'/setting/get-year-list'
,
// 获取年份
getStorePerformanceList
:
'/setting/list-store-performance'
,
// 指标设置-已设置门店指标列表
getNoStorePerformanceList
:
'/setting/list-no-store-performance'
,
// 指标设置-未设置门店指标列表
saveStorePerformance
:
{
// 指标设置-新建门店指标
url
:
'/setting/add-store-performance'
,
method
:
'post'
,
...
...
src/components/common/gic-select-group-mult.vue
View file @
a98e2bb1
...
...
@@ -20,7 +20,7 @@
},
-->
<
template
>
<el-popover
placement=
"bottom"
style=
"min-width: 357px"
v-model=
"departmentVisible"
>
<el-popover
placement=
"bottom"
v-model=
"departmentVisible"
>
<div
class=
"select-search"
>
<el-input
placeholder=
"请输入内容"
maxlength=
"50"
v-model=
"searchSelect"
style=
"width: 100%;"
@
keyup
.
native=
"value => toInput(value, searchSelect)"
@
clear=
"clearSearch"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i>
</el-input>
</div>
...
...
src/views/apps/target-manage/MonthTarget.vue
View file @
a98e2bb1
...
...
@@ -25,18 +25,18 @@ export default {
data
()
{
return
{
tableData
:
[
{
head
:
'一月'
,
num
:
'01'
,
val
:
undefined
},
{
head
:
'二月'
,
num
:
'02'
,
val
:
undefined
},
{
head
:
'三月'
,
num
:
'03'
,
val
:
undefined
},
{
head
:
'四月'
,
num
:
'04'
,
val
:
undefined
},
{
head
:
'五月'
,
num
:
'05'
,
val
:
undefined
},
{
head
:
'六月'
,
num
:
'06'
,
val
:
undefined
},
{
head
:
'七月'
,
num
:
'07'
,
val
:
undefined
},
{
head
:
'八月'
,
num
:
'08'
,
val
:
undefined
},
{
head
:
'九月'
,
num
:
'09'
,
val
:
undefined
},
{
head
:
'十月'
,
num
:
'10'
,
val
:
undefined
},
{
head
:
'十一月'
,
num
:
'11'
,
val
:
undefined
},
{
head
:
'十二月'
,
num
:
'12'
,
val
:
undefined
},
{
head
:
'一月'
,
num
:
'01'
,
val
:
0
},
{
head
:
'二月'
,
num
:
'02'
,
val
:
0
},
{
head
:
'三月'
,
num
:
'03'
,
val
:
0
},
{
head
:
'四月'
,
num
:
'04'
,
val
:
0
},
{
head
:
'五月'
,
num
:
'05'
,
val
:
0
},
{
head
:
'六月'
,
num
:
'06'
,
val
:
0
},
{
head
:
'七月'
,
num
:
'07'
,
val
:
0
},
{
head
:
'八月'
,
num
:
'08'
,
val
:
0
},
{
head
:
'九月'
,
num
:
'09'
,
val
:
0
},
{
head
:
'十月'
,
num
:
'10'
,
val
:
0
},
{
head
:
'十一月'
,
num
:
'11'
,
val
:
0
},
{
head
:
'十二月'
,
num
:
'12'
,
val
:
0
},
],
thisYear
:
new
Date
().
getFullYear
(),
month
:
new
Date
().
getMonth
()
...
...
src/views/apps/target-manage/edit-store-quota.vue
View file @
a98e2bb1
...
...
@@ -38,7 +38,7 @@
<el-form-item
label=
"指标类型(必填一项)"
prop=
"type"
>
<el-checkbox
v-model=
"form.performanceFlag"
:true-label=
"1"
:false-label=
"0"
>
业绩指标(元)
<el-select
v-model=
"form.performaceSubType"
style=
"width: 240px;margin: 0 20px 20px 48px"
:disabled=
"form.performanceFlag == 0"
>
<el-select
v-model=
"form.performa
n
ceSubType"
style=
"width: 240px;margin: 0 20px 20px 48px"
:disabled=
"form.performanceFlag == 0"
>
<el-option
v-for=
"item in targetList"
:key=
"item.name"
:label=
"item.name"
:value=
"item.val"
></el-option>
</el-select>
<span
class=
"color2"
>
设置日指标,则需先设置月指标,再设置门店日指标额。指标会计算每日完成度。
</span>
...
...
@@ -101,7 +101,7 @@ export default {
storeValue
:
[],
// 选择的值aaa,bbb,ccc
storeEdit
:
0
,
// 1门店可编辑,0不可
performanceFlag
:
0
,
// 业绩指标 1已勾选
performaceSubType
:
1
,
// 业绩指标:1,日权重,2,指标额
performa
n
ceSubType
:
1
,
// 业绩指标:1,日权重,2,指标额
addMemberFlag
:
0
,
// 新增会员指标1已勾选
addMemebrSubType
:
1
,
// 新增会员指标:1,日权重,2,指标额
},
...
...
@@ -142,7 +142,7 @@ export default {
confirm
()
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
!
valid
)
return
;
const
{
performanceFlag
,
addMemberFlag
,
storeValue
,
performanceYear
}
=
this
.
form
;
const
{
performanceFlag
,
addMemberFlag
,
storeValue
,
performanceYear
,
storeMode
}
=
this
.
form
;
if
(
performanceFlag
&&
this
.
$refs
.
monthTargetRef1
.
validate
())
return
this
.
$message
.
warning
(
'请完善业绩指标'
);
if
(
addMemberFlag
&&
this
.
$refs
.
monthTargetRef2
.
validate
())
return
this
.
$message
.
warning
(
'请完善新增会员指标'
);
...
...
@@ -154,7 +154,8 @@ export default {
submitStaffName
:
staffName
,
submitStaffId
:
staffId
,
enterpriseId
:
this
.
brandId
,
storeValue
:
storeValue
.
map
(
item
=>
item
.
storeGroupId
).
join
(
','
),
// eslint-disable-next-line
storeValue
:
storeValue
.
map
(
item
=>
storeMode
==
1
?
item
.
storeGroupId
:
item
.
storeInfoId
).
join
(
','
),
performanceValue
:
this
.
filterTargetVal
(
'performanceVal'
,
performanceYear
),
addMemebrValue
:
this
.
filterTargetVal
(
'addMemberVal'
,
performanceYear
)
};
...
...
src/views/apps/target-manage/quota-set.vue
View file @
a98e2bb1
...
...
@@ -9,53 +9,65 @@
<!-- -->
<
template
>
<div
class=
"common-app-right"
style=
"padding: 0"
v-loading=
"loading"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"
handleClick
"
>
<el-tab-pane
label=
"已设置指标门店"
name=
"
first
"
></el-tab-pane>
<el-tab-pane
label=
"未设置指标门店"
name=
"
second
"
></el-tab-pane>
<el-tabs
v-model=
"activeName"
@
tab-click=
"
getData
"
>
<el-tab-pane
label=
"已设置指标门店"
name=
"
0
"
></el-tab-pane>
<el-tab-pane
label=
"未设置指标门店"
name=
"
1
"
></el-tab-pane>
</el-tabs>
<div
class=
"list-content"
>
<div
class=
"content-search"
>
<div>
<div
class=
"content-first"
>
<el-input
v-model
.
trim=
"search.
input
"
v-model
.
trim=
"search.
search
"
placeholder=
"请输入名称/code"
prefix-icon=
"el-icon-search"
@
keydown
.
enter
.
native=
"search
Strategy
"
@
keydown
.
enter
.
native=
"search
Change
"
clearable
@
change=
"search
Strategy
"
>
@
change=
"search
Change
"
>
</el-input>
<el-select
v-model=
"search.date"
placeholder=
"选择年份"
style=
"width: 128px"
></el-select>
<el-select
v-model=
"search.performanceYear"
placeholder=
"选择年份"
style=
"width: 100px"
@
change=
"searchChange"
>
<el-option
v-for=
"item in yearList"
:key=
"item"
:label=
"item"
:value=
"item"
></el-option>
</el-select>
<span
v-show=
"activeName === '
first
'"
>
<el-select
v-model=
"search.type"
placeholder=
"全部指标类型"
>
<span
v-show=
"activeName === '
0
'"
>
<el-select
v-model=
"search.type"
placeholder=
"全部指标类型"
clearable
@
change=
"searchChange"
>
<el-option
label=
"业绩指标日权重"
value=
"1"
></el-option>
<el-option
label=
"业绩指标日指标"
value=
"2"
></el-option>
<el-option
label=
"新增会员日权重"
value=
"3"
></el-option>
<el-option
label=
"新增会员日指标"
value=
"4"
></el-option>
</el-select>
<el-select
v-model=
"search.
auth"
placeholder=
"全部编辑权限
"
>
<el-select
v-model=
"search.
storeEdit"
placeholder=
"全部编辑权限"
clearable
@
change=
"searchChange
"
>
<el-option
label=
"店长可编辑"
value=
"1"
></el-option>
<el-option
label=
"店长不可编辑"
value=
"0"
></el-option>
</el-select>
</span>
<el-select
v-model=
"search.st
ate"
style=
"width: 106px;margin-right: -1px
"
>
<el-select
v-model=
"search.st
oreType"
style=
"width: 106px;margin-right: -1px"
@
change=
"storeChange
"
>
<el-option
label=
"门店分组"
value=
"1"
></el-option>
<el-option
label=
"门店标签"
value=
"2"
></el-option>
</el-select>
<el-select
v-model=
"search.store"
placeholder=
"选择门店分组"
></el-select>
<gic-select-group-mult
v-if=
"search.storeType === '1'"
width=
"148px"
@
checkGroupIds=
"checkGroupIds"
>
</gic-select-group-mult>
<gic-select-tag
v-if=
"search.storeType === '2'"
width=
"148px"
@
returnTags=
"checkGroupIds"
>
</gic-select-tag>
</div>
<el-select
placeholder=
"操作"
@
change=
"batchOperation"
>
<el-option
label=
"新增指标"
:value=
"1"
></el-option>
<el-option
label=
"编辑指标"
:value=
"2"
></el-option>
<el-option
label=
"修改编辑权限"
:value=
"3"
></el-option>
<el-option
label=
"编辑指标"
:value=
"2"
v-show=
"activeName === '0'"
></el-option>
<el-option
label=
"修改编辑权限"
:value=
"3"
v-show=
"activeName === '0'"
></el-option>
</el-select>
</div>
...
...
@@ -67,9 +79,9 @@
<span
class=
"color1"
>
100,000
</span>
</div>
<span
v-show=
"activeName === '
second
'"
>
<el-checkbox
v-model=
"search
.noPerformanceFlag"
:true-label=
"1"
:false-label=
"0
"
>
未设置业绩指标门店
</el-checkbox>
<el-checkbox
v-model=
"search
.noAddMemberFlag"
:true-label=
"1"
:false-label=
"0
"
>
未设置新增会员指标门店
</el-checkbox>
<span
v-show=
"activeName === '
1
'"
>
<el-checkbox
v-model=
"search
1.noPerformanceFlag"
:true-label=
"1"
:false-label=
"0"
@
change=
"searchChange
"
>
未设置业绩指标门店
</el-checkbox>
<el-checkbox
v-model=
"search
1.noAddMemberFlag"
:true-label=
"1"
:false-label=
"0"
@
change=
"searchChange
"
>
未设置新增会员指标门店
</el-checkbox>
</span>
</div>
...
...
@@ -81,12 +93,39 @@
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
prop=
"date"
label=
"门店"
></el-table-column>
<el-table-column
prop=
"date"
label=
"年业绩指标"
></el-table-column>
<el-table-column
prop=
"date"
label=
"年新增会员指标"
></el-table-column>
<el-table-column
prop=
"date"
label=
"编辑权限"
></el-table-column>
<el-table-column
prop=
"date"
label=
"更新时间"
></el-table-column>
<el-table-column
prop=
"date"
label=
"提交人"
></el-table-column>
<el-table-column
label=
"门店"
show-overflow-tooltip
>
<template
slot-scope=
"
{row}">
<div>
{{
row
.
storeName
||
'--'
}}
</div>
<div
style=
"color: #909399;font-size:12px"
>
{{
row
.
storeCode
||
'--'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"年业绩指标"
show-overflow-tooltip
>
<
template
slot-scope=
"{row}"
>
{{
row
.
performanceYearValue
?
`¥${row.performanceYearValue
}
`
:
'未设置'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"年新增会员指标"
show
-
overflow
-
tooltip
>
<
template
slot
-
scope
=
"{row
}
"
>
{{
row
.
addMemberValue
?
`¥${row.addMemberValue
}
`
:
'未设置'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"编辑权限"
show
-
overflow
-
tooltip
>
<
template
slot
-
scope
=
"{row
}
"
>
{{
[
'店长不可编辑'
,
'店长可编辑'
][
row
.
storeEdit
]
||
'--'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"更新时间"
show
-
overflow
-
tooltip
>
<
template
slot
-
scope
=
"{row
}
"
>
<
div
style
=
"line-height:18px"
>
{{
row
.
updateTime
|
formatDate
(
'ymd'
)
}}
<
br
/>
{{
row
.
updateTime
|
formatDate
(
'hms'
)
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"提交人"
show
-
overflow
-
tooltip
>
<
template
slot
-
scope
=
"{row
}
"
>
{{
row
.
submitStaffName
||
'--'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"date"
label
=
"操作"
>
<
template
>
...
...
@@ -97,10 +136,11 @@
<
/el-table
>
<
dm
-
pagination
v
-
if
=
"tableData.length"
background
@
size
-
change
=
"handleSizeChange"
@
current
-
change
=
"handleCurrentChange"
:current-page=
"page.
currentPage
"
:
current
-
page
=
"page.
pageNum
"
:
page
-
sizes
=
"[20, 40, 60, 80]"
:
page
-
size
=
"page.pageSize"
layout
=
"total, sizes, prev, pager, next"
...
...
@@ -112,20 +152,34 @@
<
/template
>
<
script
>
import
gicSelectGroupMult
from
'@/components/common/gic-select-group-mult.vue'
;
import
gicSelectTag
from
'@/components/common/gic-select-tag.vue'
;
import
fetch
from
'@/api/target-manage-app.js'
;
const
{
getYearList
,
getStorePerformanceList
,
getNoStorePerformanceList
}
=
fetch
;
export
default
{
name
:
'QuotaSet'
,
components
:
{},
components
:
{
gicSelectGroupMult
,
gicSelectTag
}
,
props
:
{
brandId
:
{
type
:
String
,
default
:
''
}
}
,
data
()
{
return
{
activeName
:
''
,
haoban
:
{
}
,
search
:
{
input
:
''
,
date
:
''
,
search
:
''
,
performanceYear
:
new
Date
().
getFullYear
()
,
type
:
''
,
auth
:
''
,
state
:
'1'
,
store
:
''
,
storeEdit
:
''
,
// 1店长可编辑,0店长不可编辑
storeType
:
'1'
,
// 1门店分组,2门店标签
storeParam
:
''
,
}
,
search1
:
{
noPerformanceFlag
:
'0'
,
noAddMemberFlag
:
'0'
}
,
...
...
@@ -134,28 +188,76 @@ export default {
tableData
:
[],
loading
:
false
,
page
:
{
currentPage
:
1
,
pageNum
:
1
,
pageSize
:
20
,
total
:
0
}
}
,
yearList
:
[],
typeList
:
[
{
performanceType
:
1
,
performanceSubType
:
1
}
,
{
performanceType
:
1
,
performanceSubType
:
2
}
,
{
performanceType
:
2
,
performanceSubType
:
1
}
,
{
performanceType
:
2
,
performanceSubType
:
2
}
,
]
}
;
}
,
created
()
{
const
{
tab
}
=
this
.
$route
.
query
;
this
.
activeName
=
tab
||
'first'
;
console
.
log
(
this
);
this
.
activeName
=
tab
||
'0'
;
const
{
staffId
,
wxEnterpriseId
}
=
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
));
this
.
haoban
=
{
staffId
,
wxEnterpriseId
}
;
}
,
// 生命周期 - 挂载完成(访问DOM元素)
mounted
()
{
this
.
$emit
(
'showTab'
,
'/quota-set'
);
this
.
$emit
(
'change-nav'
,
[
{
name
:
'指标设置'
}
]);
this
.
getData
();
this
.
getYearList
();
}
,
// methods
methods
:
{
getData
()
{
this
.
loading
=
true
;
const
{
storeType
,
storeParam
,
type
}
=
this
.
search
;
let
params
=
{
...
this
.
search
,
...
this
.
haoban
,
...
this
.
page
,
enterpriseId
:
this
.
brandId
,
storeType
:
storeParam
?
storeType
:
''
,
}
;
if
(
this
.
activeName
===
'0'
)
{
// 已设置
params
=
{
...
params
,
...
this
.
typeList
[
type
-
1
]
}
;
}
else
if
(
this
.
activeName
===
'1'
)
{
// 未设置
params
=
{
...
params
,
...
this
.
search1
}
;
}
[
getStorePerformanceList
,
getNoStorePerformanceList
][
this
.
activeName
](
params
,
{
headers
:
{
sign
:
this
.
brandId
}
}
)
.
then
(
res
=>
{
const
{
result
,
totalCount
}
=
res
.
result
||
{
}
;
this
.
tableData
=
result
||
[];
this
.
page
.
total
=
totalCount
;
}
)
.
catch
(()
=>
this
.
tableData
=
[])
.
finally
(()
=>
this
.
loading
=
false
);
}
,
batchOperation
(
val
)
{
console
.
log
(
val
);
switch
(
val
)
{
case
1
:
return
this
.
$router
.
push
({
path
:
'/edit-store-quota'
,
query
:
{
applicationId
:
this
.
applicationId
}
}
);
default
:
break
;
}
}
,
handleSelectionChange
(
val
)
{
...
...
@@ -168,16 +270,57 @@ export default {
handleSizeChange
(
val
)
{
this
.
page
.
pageSize
=
val
;
this
.
page
.
currentPage
=
1
;
// this.getList
();
this
.
page
.
pageNum
=
1
;
this
.
getData
();
}
,
handleCurrentChange
(
val
)
{
this
.
page
.
currentPage
=
val
;
// this.getList();
this
.
page
.
pageNum
=
val
;
this
.
getData
();
}
,
// 获取年份
getYearList
()
{
getYearList
(
''
,
{
headers
:
{
sign
:
this
.
brandId
}
}
).
then
(
res
=>
{
this
.
yearList
=
res
.
result
||
[];
}
);
}
,
// 筛选条件变更
searchChange
()
{
this
.
handleCurrentChange
(
1
);
}
,
// 门店分组change
checkGroupIds
(
nodes
)
{
console
.
log
(
nodes
);
this
.
search
.
storeParam
=
nodes
.
map
(
item
=>
item
[
this
.
form
.
storeType
===
'1'
?
'storeGroupId'
:
'tagId'
]).
join
(
','
);
}
,
storeChange
()
{
this
.
search
.
storeParam
=
''
;
this
.
searchChange
();
}
}
,
filters
:
{
formatDate
(
val
,
format
)
{
if
(
!
val
)
return
'--'
;
val
=
new
Date
(
val
);
let
y
=
val
.
getFullYear
();
let
m
=
(
val
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
let
d
=
val
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
let
h
=
val
.
getHours
().
toString
().
padStart
(
2
,
'0'
);
let
mm
=
val
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
);
let
s
=
val
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
);
if
(
format
==
'ymd'
)
{
return
`${y
}
-${m
}
-${d
}
`
;
}
else
if
(
format
==
'hms'
)
{
return
`${h
}
:${mm
}
:${s
}
`
;
}
return
`${y
}
-${m
}
-${d
}
\xa0\xa0\xa0${h
}
:${mm
}
:${s
}
`
;
}
}
,
watch
:
{
brandId
(
val
)
{
val
&&
this
.
getData
();
}
}
,
watch
:
{}
}
;
<
/script
>
<
style
lang
=
'less'
scoped
>
...
...
@@ -202,6 +345,10 @@ export default {
display
:
flex
;
justify
-
content
:
space
-
between
;
}
.
content
-
first
{
display
:
flex
;
// align-content: center;
}
.
content
-
data
{
display
:
flex
;
justify
-
content
:
space
-
between
;
...
...
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