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
c918d10c
Commit
c918d10c
authored
Nov 20, 2020
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改导购指标
parent
89c7d41d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
46 deletions
+44
-46
perfect-sale-target.vue
src/views/apps/target-manage/perfect-sale-target.vue
+44
-46
No files found.
src/views/apps/target-manage/perfect-sale-target.vue
View file @
c918d10c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Author: 无尘
* @Date: 2020-11-12 10:48:40
* @Date: 2020-11-12 10:48:40
* @LastEditors: 无尘
* @LastEditors: 无尘
* @LastEditTime: 2020-11-20 1
2:22:45
* @LastEditTime: 2020-11-20 1
4:51:29
-->
-->
<
template
>
<
template
>
<div
class=
"common-app-right"
>
<div
class=
"common-app-right"
>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</el-alert>
</el-alert>
<div
class=
"saler-set-title flex flex-space-between m-b-15"
>
<div
class=
"saler-set-title flex flex-space-between m-b-15"
>
<div
class=
"colorFirst"
>
<div
class=
"colorFirst"
>
<span>
{{
clerkObj
.
yearMonth
}}
</span><span
class=
"p-l-18"
>
{{
clerkObj
.
storeName
}}
</span>
<span>
{{
clerkObj
.
performanceYm
}}
</span><span
class=
"p-l-18"
>
{{
clerkObj
.
storeName
}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"saler-set-table"
>
<div
class=
"saler-set-table"
>
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<el-table-column
label=
"月指标"
>
<el-table-column
label=
"月指标"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div>
<div>
<el-input
class=
"w-120 p-l-8"
maxlength=
"50"
v-model=
"scope.row.
clerkPerformanc
e"
placeholder=
"请输入"
:disabled=
"clerkObj.settingAble == 0 || scope.row.bindFlag == 0"
@
blur=
"value => inputPerformance(value, scope.$index, scope.row)"
>
<el-input
class=
"w-120 p-l-8"
maxlength=
"50"
v-model=
"scope.row.
performanceValu
e"
placeholder=
"请输入"
:disabled=
"clerkObj.settingAble == 0 || scope.row.bindFlag == 0"
@
blur=
"value => inputPerformance(value, scope.$index, scope.row)"
>
<i
slot=
"prefix"
style=
"font-style: normal;position: absolute;top: 4px;left: 12px;"
>
¥
</i>
<i
slot=
"prefix"
style=
"font-style: normal;position: absolute;top: 4px;left: 12px;"
>
¥
</i>
</el-input>
</el-input>
</div>
</div>
...
@@ -38,13 +38,13 @@
...
@@ -38,13 +38,13 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"总计 >= 门店月指标"
width=
"418px"
>
<el-table-column
label=
"总计 >= 门店月指标"
width=
"418px"
>
<
template
>
<
template
>
<div><span
class=
"font-14 color-606266 text-left"
>
总计
</span><span
class=
" p-l-175 font-14 color-606266 text-left"
>
门店月指标
</span></div>
<div><span
class=
"font-14 color-606266 text-left"
>
导购
总计
</span><span
class=
" p-l-175 font-14 color-606266 text-left"
>
门店月指标
</span></div>
<div
style=
"margin-top: 4px;"
>
<div
style=
"margin-top: 4px;"
>
<el-input
class=
"w-161"
v-model=
"performanceSum"
disabled
>
<el-input
class=
"w-161"
v-model=
"performanceSum"
disabled
>
<i
slot=
"prefix"
style=
"font-style: normal;position: absolute;top: 4px;left: 10px;"
>
¥
</i>
<i
slot=
"prefix"
style=
"font-style: normal;position: absolute;top: 4px;left: 10px;"
>
¥
</i>
</el-input>
</el-input>
<span
class=
"p-l-10 p-r-10"
>
>
=
</span>
<span
class=
"p-l-10 p-r-10"
>
>
=
</span>
<el-input
class=
"w-161 p-l-8"
maxlength=
"50"
v-model=
"clerkObj.storePerformance"
placeholder=
"
请输入
指标值"
disabled
>
<el-input
class=
"w-161 p-l-8"
maxlength=
"50"
v-model=
"clerkObj.storePerformance"
placeholder=
"指标值"
disabled
>
<i
slot=
"prefix"
style=
"font-style: normal;position: absolute;top: 4px;left: 16px;"
>
¥
</i>
<i
slot=
"prefix"
style=
"font-style: normal;position: absolute;top: 4px;left: 16px;"
>
¥
</i>
</el-input>
</el-input>
</div>
</div>
...
@@ -78,16 +78,13 @@ export default {
...
@@ -78,16 +78,13 @@ export default {
data
()
{
data
()
{
return
{
return
{
tableH
:
window
.
screen
.
availHeight
-
464
-
126
,
tableH
:
window
.
screen
.
availHeight
-
464
-
126
,
activeTab
:
'1'
,
tableData
:
[],
activeBrand
:
this
.
brandId
,
// 商户(品牌) id
operationStaffName
:
localStorage
.
getItem
(
'userInfos'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'userInfos'
)).
staffDTO
[
'staffName'
]
:
''
,
activeId
:
'4'
,
tableData
:
[
{},
{}
],
performanceSum
:
'0.00'
,
// 总指标
performanceSum
:
'0.00'
,
// 总指标
clerkObj
:
{
clerkObj
:
{
storeId
:
''
,
storeI
nfoI
d
:
''
,
storeName
:
''
,
storeName
:
''
,
yearMonth
:
''
,
performanceYm
:
''
,
performanceSubType
:
''
,
settingAble
:
1
,
settingAble
:
1
,
storePerformance
:
0
storePerformance
:
0
},
},
...
@@ -95,13 +92,16 @@ export default {
...
@@ -95,13 +92,16 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
let
that
=
this
;
const
that
=
this
;
this
.
$emit
(
'showTab'
,
'/target-list'
);
that
.
$emit
(
'showTab'
,
'/target-list'
);
let
bread
=
[
{
name
:
'指标管理'
,
path
:
'/target-list'
},
{
name
:
'查看门店'
,
path
:
'/target-store'
},
{
name
:
'完善导购指标'
}
];
const
{
tab
,
applicationId
,
performanceYm
,
storeInfoId
,
storeName
}
=
that
.
$route
.
query
;
let
bread
=
[
{
name
:
'指标管理'
,
path
:
`/target-list?tab=
${
tab
}
&applicationId=
${
applicationId
}
`
},
{
name
:
'查看门店'
,
path
:
`/target-store?tab=
${
tab
}
&applicationId=
${
applicationId
}
`
},
{
name
:
'完善导购指标'
}
];
// 修改面包屑
// 修改面包屑
this
.
$emit
(
'change-nav'
,
bread
);
that
.
$emit
(
'change-nav'
,
bread
);
if
(
!!
that
.
brandId
)
{
if
(
!!
that
.
brandId
)
{
that
.
clerkObj
.
performanceYm
=
performanceYm
;
that
.
clerkObj
.
storeInfoId
=
storeInfoId
;
that
.
clerkObj
.
storeName
=
storeName
;
that
.
getData
();
that
.
getData
();
}
}
},
},
...
@@ -131,18 +131,18 @@ export default {
...
@@ -131,18 +131,18 @@ export default {
*/
*/
inputPerformance
:
function
(
val
,
index
,
row
)
{
inputPerformance
:
function
(
val
,
index
,
row
)
{
const
that
=
this
;
const
that
=
this
;
row
.
clerkPerformance
=
!!
Number
(
row
.
clerkPerformance
.
replace
(
/
[^\d
.
]
/g
,
''
))
?
row
.
clerkPerformanc
e
.
replace
(
/
[^\d
+(.
\d
+)
]
/g
,
''
)
:
''
;
row
.
performanceValue
=
!!
Number
(
row
.
performanceValue
.
replace
(
/
[^\d
.
]
/g
,
''
))
?
row
.
performanceValu
e
.
replace
(
/
[^\d
+(.
\d
+)
]
/g
,
''
)
:
''
;
row
.
clerkPerformance
=
Number
(
row
.
clerkPerformanc
e
).
toFixed
(
2
);
row
.
performanceValue
=
Number
(
row
.
performanceValu
e
).
toFixed
(
2
);
let
sumData
=
0
;
let
sumData
=
0
;
that
.
tableData
.
forEach
(
ele
=>
{
that
.
tableData
.
forEach
(
ele
=>
{
sumData
+=
Number
(
ele
.
clerkPerformanc
e
);
sumData
+=
Number
(
ele
.
performanceValu
e
);
});
});
that
.
performanceSum
=
Number
(
sumData
).
toFixed
(
2
);
that
.
performanceSum
=
Number
(
sumData
).
toFixed
(
2
);
that
.
diffData
();
that
.
diffData
();
},
},
diffData
()
{
diffData
()
{
le
t
that
=
this
;
cons
t
that
=
this
;
let
dataFlag
=
Number
(
that
.
performanceSum
)
>
Number
(
that
.
clerkObj
.
storePerformance
)
||
Number
(
that
.
performanceSum
)
==
Number
(
that
.
clerkObj
.
storePerformance
);
let
dataFlag
=
Number
(
that
.
performanceSum
)
>
Number
(
that
.
clerkObj
.
storePerformance
)
||
Number
(
that
.
performanceSum
)
==
Number
(
that
.
clerkObj
.
storePerformance
);
if
(
!
dataFlag
)
{
if
(
!
dataFlag
)
{
that
.
equalFlag
=
false
;
that
.
equalFlag
=
false
;
...
@@ -168,20 +168,17 @@ export default {
...
@@ -168,20 +168,17 @@ export default {
});
});
return
false
;
return
false
;
}
}
const
data
=
{
that
.
postSave
();
clerkPerformanceList
:
that
.
tableData
,
storePerformance
:
that
.
clerkObj
.
storePerformance
,
operationStaffName
:
that
.
operationStaffName
};
that
.
postSave
(
data
);
},
500
),
},
500
),
postSave
(
data
)
{
postSave
()
{
const
that
=
this
;
const
that
=
this
;
const
para
=
{
const
para
=
{
enterpriseId
:
that
.
activeBrand
,
enterpriseId
:
that
.
brandId
,
storeId
:
that
.
clerkObj
.
storeId
,
storeInfoId
:
that
.
clerkObj
.
storeInfoId
,
yearMonth
:
that
.
clerkObj
.
yearMonth
,
performanceYear
:
that
.
clerkObj
.
performanceYm
.
split
(
'-'
)[
0
],
performance
:
JSON
.
stringify
(
data
)
performanceYm
:
that
.
clerkObj
.
performanceYm
,
performanceType
:
that
.
$route
.
query
.
performanceType
,
dataJson
:
JSON
.
stringify
(
that
.
tableData
)
};
};
changeStorePerformanceClerk
(
para
)
changeStorePerformanceClerk
(
para
)
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -205,24 +202,25 @@ export default {
...
@@ -205,24 +202,25 @@ export default {
getData
()
{
getData
()
{
const
that
=
this
;
const
that
=
this
;
const
para
=
{
const
para
=
{
enterpriseId
:
that
.
activeBrand
,
enterpriseId
:
that
.
brandId
,
storeId
:
that
.
clerkObj
.
storeId
,
storeInfoId
:
that
.
clerkObj
.
storeInfoId
,
yearMonth
:
that
.
clerkObj
.
yearMonth
performanceYm
:
that
.
clerkObj
.
performanceYm
,
performanceType
:
that
.
$route
.
query
.
performanceType
,
performanceSubType
:
that
.
$route
.
query
.
performanceSubType
};
};
getStorePerformanceClerk
(
para
)
getStorePerformanceClerk
(
para
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
==
'0000'
)
{
if
(
res
.
code
==
'0000'
)
{
if
(
!!
res
.
result
.
clerkPerformanceList
&&
!!
res
.
result
.
clerkPerformanceLis
t
.
length
)
{
if
(
!!
res
.
result
&&
!!
res
.
resul
t
.
length
)
{
res
.
result
.
clerkPerformanceList
.
forEach
(
ele
=>
{
res
.
result
.
forEach
(
ele
=>
{
ele
.
clerkPerformance
=
Number
(
ele
.
clerkPerformanc
e
).
toFixed
(
2
);
ele
.
performanceValue
=
Number
(
ele
.
performanceValu
e
).
toFixed
(
2
);
});
});
that
.
tableData
=
res
.
result
.
clerkPerformanceList
||
[];
that
.
tableData
=
res
.
result
||
[];
}
}
res
.
result
.
storePerformance
=
Number
(
res
.
result
.
storePerformance
).
toFixed
(
2
);
that
.
clerkObj
.
storePerformance
=
Number
(
that
.
$route
.
query
.
perfromanceValue
).
toFixed
(
2
);
that
.
clerkObj
=
res
.
result
;
let
allSum
=
0
;
let
allSum
=
0
;
that
.
tableData
.
forEach
(
ele
=>
{
that
.
tableData
.
forEach
(
ele
=>
{
allSum
+=
Number
(
ele
.
clerkPerformanc
e
);
allSum
+=
Number
(
ele
.
performanceValu
e
);
});
});
that
.
performanceSum
=
Number
(
allSum
).
toFixed
(
2
);
that
.
performanceSum
=
Number
(
allSum
).
toFixed
(
2
);
return
;
return
;
...
@@ -241,9 +239,9 @@ export default {
...
@@ -241,9 +239,9 @@ export default {
brandId
:
function
(
newData
,
oldData
)
{
brandId
:
function
(
newData
,
oldData
)
{
const
that
=
this
;
const
that
=
this
;
if
(
!!
newData
)
{
if
(
!!
newData
)
{
that
.
activeBrand
=
newData
;
that
.
clerkObj
.
performanceYm
=
that
.
$route
.
query
.
performanceYm
;
that
.
clerkObj
.
yearMonth
=
that
.
$route
.
query
.
yearMonth
;
that
.
clerkObj
.
storeInfoId
=
that
.
$route
.
query
.
storeInfoId
;
that
.
clerkObj
.
store
Id
=
that
.
$route
.
query
.
storeId
;
that
.
clerkObj
.
store
Name
=
that
.
$route
.
query
.
storeName
;
that
.
getData
();
that
.
getData
();
}
}
}
}
...
@@ -251,7 +249,7 @@ export default {
...
@@ -251,7 +249,7 @@ export default {
};
};
</
script
>
</
script
>
<
style
type=
"text/
scss"
lang=
"sc
ss"
scoped
>
<
style
type=
"text/
less"
lang=
"le
ss"
scoped
>
.task-set-content
{
.task-set-content
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.w-105
{
.w-105
{
...
...
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