Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
ef80424a
Commit
ef80424a
authored
Sep 05, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排序
parent
868f6d1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
223 deletions
+73
-223
salesVolumeRank.vue
src/components/rank/salesVolumeRank.vue
+73
-223
No files found.
src/components/rank/salesVolumeRank.vue
View file @
ef80424a
...
...
@@ -111,66 +111,77 @@
</li>
</ul>
</div>
<v-table
v-if=
"isReady"
is-horizontal-resize
column-width-drag
style=
"width: 100%"
:columns=
"columns"
:table-data=
"tableData"
:filter-method=
"filterMethod"
:total=
"total"
:pageSize=
"pageSize"
:pageIndex=
"pageIndex"
:handleCurrentChange=
"handleCurrentChanges"
:multiple-sort=
"multipleSort"
:is-loading=
"loading"
sort-always
@
sort-change=
"sortChange"
@
on-custom-comp=
"customCompFunc"
></v-table>
<el-table
v-if=
"isReady"
ref=
"singleTable"
:data=
"tableData"
highlight-current-row
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
>
</el-table-column>
<el-table-column
property=
"name"
label=
"名称"
width=
"80"
>
</el-table-column>
<el-table-column
property=
""
label=
"销售额"
width=
""
sortable
>
<template
slot-scope=
"scope"
>
<div
class=
"clickText"
@
click=
"goUrl('salesVolumeRankEntryForm',scope.row)"
>
{{
scope
.
row
.
SumPreferPrice
}}
</div>
</
template
>
</el-table-column>
<el-table-column
property=
""
label=
"收款金额"
width=
""
sortable
>
<
template
slot-scope=
"scope"
>
<div
class=
"clickText"
@
click=
"goUrl('salesVolumeRankEntryForm',scope.row)"
>
{{
scope
.
row
.
income
}}
</div>
</
template
>
</el-table-column>
<el-table-column
property=
""
label=
"未收金额"
width=
""
sortable
>
<
template
slot-scope=
"scope"
>
<div
class=
"clickText"
@
click=
"goUrl('salesVolumeRankEntryForm',scope.row)"
>
{{
scope
.
row
.
notInCome
}}
</div>
</
template
>
</el-table-column>
<el-table-column
property=
"peopleCount"
label=
"正常收客数"
width=
""
sortable
>
</el-table-column>
<el-table-column
property=
"CalcheCount"
label=
"取消收客数"
width=
""
sortable
>
</el-table-column>
<el-table-column
property=
"totalGuestNum"
label=
"单项收客数"
width=
""
>
</el-table-column>
<el-table-column
property=
"avgPrice"
label=
"客单价"
width=
""
sortable
>
</el-table-column>
<el-table-column
property=
"zanBi"
label=
"销售额占比"
width=
""
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
import
Vue
from
"vue"
;
import
moment
from
'moment'
// 自定义列组件
Vue
.
component
(
"table-operation"
,
{
template
:
`<span>
<a href="" @click.stop.prevent="update(rowData,index)">
<span>{{content}}</span></a></span>
`
,
props
:
{
rowData
:
{
type
:
Object
,
},
field
:
{
type
:
String
,
},
index
:
{
type
:
Number
,
},
},
data
()
{
return
{
content
:
""
,
};
},
mounted
()
{
if
(
this
.
field
===
"SumPreferPrice"
)
{
this
.
content
=
this
.
rowData
[
"SumPreferPrice"
];
}
else
if
(
this
.
field
===
"income"
)
{
this
.
content
=
this
.
rowData
[
"income"
];
}
else
{
this
.
content
=
this
.
rowData
.
notInCome
.
toFixed
(
2
);
}
},
methods
:
{
update
(
rowData
,
index
)
{
this
.
$emit
(
'on-custom-comp'
,
rowData
);
},
},
});
export
default
{
data
()
{
return
{
...
...
@@ -239,6 +250,9 @@ export default {
//this.pageSize = this.calcPageSize(40); 此页不需要分页
},
methods
:
{
goUrl
(
name
,
rowData
){
if
(
name
==
'salesVolumeRankEntryForm'
)
this
.
customCompFunc
(
rowData
)
},
customCompFunc
(
rowData
)
{
this
.
$router
.
push
({
path
:
"/salesVolumeRankEntryForm"
,
...
...
@@ -260,174 +274,6 @@ export default {
});
},
initColumns
()
{
this
.
isReady
=
false
;
let
that
=
this
;
let
no
=
{
title
:
this
.
$t
(
"active.ad_xuhao"
),
width
:
50
,
titleAlign
:
"center"
,
columnAlign
:
"center"
,
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
return
rowIndex
+
1
;
},
isResize
:
false
,
};
let
account
=
{
field
:
"name"
,
title
:
this
.
$t
(
"system.query_airName"
),
width
:
80
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
result
:
""
,
// filterMultiple: false,
// filters: [{}],
// type: "text"
};
let
sumMoney
=
{
field
:
"SumPreferPrice"
,
title
:
this
.
$t
(
"sm.salemoney"
),
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
orderBy
:
"desc"
,
componentName
:
"table-operation"
,
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
// if (that.authority.indexOf("Sales_Volume_Rank_Show") == -1) {
// let content = "";
// for (let i = 0; i
<
rowData
[
"income"
].
length
;
i
++
)
{
// content += "*";
// }
// return content;
// } else {
return
`
${
rowData
[
"SumPreferPrice"
].
toFixed
(
2
)}
`
;
//}
},
};
let
moneyCount
=
{
field
:
"income"
,
title
:
this
.
$t
(
"fnc.skjine"
),
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
orderBy
:
""
,
componentName
:
"table-operation"
,
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
// if (that.authority.indexOf("Sales_Volume_Rank_Show") == -1) {
// let content = "";
// for (let i = 0; i
<
rowData
[
"income"
].
length
;
i
++
)
{
// content += "*";
// }
// return content;
// } else {
return
`
${
rowData
[
"income"
]}
`
;
//}
},
};
let
notIncome
=
{
field
:
"notInCome"
,
title
:
this
.
$t
(
"fnc.wsjine"
),
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
orderBy
:
""
,
componentName
:
"table-operation"
,
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
// if (that.authority.indexOf("Sales_Volume_Rank_Show") == -1) {
// let content = "";
// for (let i = 0; i
<
rowData
[
"income"
].
length
;
i
++
)
{
// content += "*";
// }
// return `
<
span
style
=
'color:red'
>
$
{
content
}
<
/span>`
;
// } else {
return
`<span style='color:red'>
${
rowData
.
notInCome
.
toFixed
(
2
)}
</span>`
;
//}
},
};
let
pCount
=
{
field
:
"peopleCount"
,
title
:
this
.
$t
(
"sm.sks"
),
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
orderBy
:
""
,
};
let
cCount
=
{
field
:
"CalcheCount"
,
title
:
this
.
$t
(
"sm.exitsks"
),
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
orderBy
:
""
,
};
let
avgPCount
=
{
field
:
"avgPeopleCount"
,
title
:
this
.
$t
(
"sm.personsks"
),
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
orderBy
:
""
,
};
let
customerNum
=
{
field
:
"totalGuestNum"
,
title
:
"单项收客数"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
};
let
unitPrice
=
{
field
:
"avgPrice"
,
title
:
this
.
$t
(
"sm.keprice"
),
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
orderBy
:
""
,
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
// if (that.authority.indexOf("Sales_Volume_Rank_Show") == -1) {
// let content = "";
// for (let i = 0; i
<
rowData
[
"avgPrice"
].
length
;
i
++
)
{
// content += "*";
// }
// return content;
// } else {
return
rowData
[
"avgPrice"
].
toFixed
(
2
);
// }
},
};
let
proportion
=
{
field
:
"zanBi"
,
title
:
this
.
$t
(
"sm.xiaoshouzb"
),
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
};
this
.
columns
=
[];
this
.
columns
.
push
(
no
);
this
.
columns
.
push
(
account
);
this
.
columns
.
push
(
sumMoney
);
this
.
columns
.
push
(
moneyCount
);
this
.
columns
.
push
(
notIncome
);
this
.
columns
.
push
(
pCount
);
this
.
columns
.
push
(
cCount
);
if
(
this
.
activeName
!=
"first"
&&
this
.
activeName
!=
"four"
)
{
unitPrice
.
title
=
this
.
$t
(
"sm.renxiaoshou"
);
this
.
columns
.
push
(
avgPCount
);
}
this
.
columns
.
push
(
customerNum
);
this
.
columns
.
push
(
unitPrice
);
this
.
columns
.
push
(
proportion
);
this
.
isReady
=
true
;
},
initData
()
{
...
...
@@ -620,4 +466,8 @@ export default {
.el-date-editor
.el-range-separator
{
font-size
:
12px
;
}
.clickText
{
color
:
#33B3FF
;
cursor
:
pointer
;
}
</
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