Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-trialrun
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 631d074d
authored
Oct 23, 2021
by
jack
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化界面展示
1 parent
75741934
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
39 deletions
src/views/reportManage/mileage.vue
src/views/reportManage/oil.vue
src/views/reportManage/mileage.vue
View file @
631d074
...
...
@@ -64,7 +64,7 @@
<!-- 按钮区域 end -->
<!-- 列表 开始 -->
<glsx-table
ref=
"glsxTable"
:list=
"tableData"
:column=
"columnList"
:pageTotal=
"pageTotal"
@
change=
"getList"
>
<glsx-table
ref=
"glsxTable"
v-loading=
"loading"
:list=
"tableData"
:column=
"columnList"
:pageTotal=
"pageTotal"
@
change=
"getList"
>
<div
slot=
"operate"
slot-scope=
"
{scope}">
<el-link
type=
"primary"
:underline=
"false"
@
click=
"lookDetail(scope)"
>
详情
</el-link>
</div>
...
...
@@ -122,6 +122,7 @@ export default {
showPopover
:
false
,
mileageDate
:
[],
cloading
:
false
,
loading
:
false
};
},
...
...
@@ -145,11 +146,15 @@ export default {
console
.
log
(
this
.
searchForm
);
oParams
.
pageSize
=
options
?
options
.
pageSize
||
10
:
10
;
oParams
.
pageNumber
=
options
?
options
.
pageNumber
||
1
:
1
;
this
.
loading
=
true
GETMILEAGESTATISTICS
(
oParams
).
then
((
res
)
=>
{
this
.
loading
=
false
let
{
data
}
=
res
;
let
{
list
,
totalElements
}
=
data
;
this
.
pageTotal
=
totalElements
||
0
;
this
.
tableData
=
list
||
[];
}).
catch
(
error
=>
{
this
.
loading
=
false
});
},
...
...
@@ -226,6 +231,8 @@ export default {
// 重置
rest
()
{
this
.
searchForm
=
{};
this
.
searchText
=
''
;
this
.
preText
=
'orderNo'
this
.
getList
();
this
.
$refs
.
glsxTable
.
rest
();
},
...
...
src/views/reportManage/oil.vue
View file @
631d074
...
...
@@ -8,17 +8,13 @@
<div
class=
"search_box"
>
<el-form
:model=
"searchForm"
:inline=
"true"
size=
"medium"
>
<el-form-item
label=
"关键字:"
>
<el-input
v-model=
"searchForm.key
Word
"
placeholder=
"特约店编码|店名称|车架号|车型"
></el-input>
<el-input
v-model=
"searchForm.key
words
"
placeholder=
"特约店编码|店名称|车架号|车型"
></el-input>
</el-form-item>
<el-form-item
label=
"年份:"
>
<el-select
v-model=
"searchForm.year"
placeholder=
"请选择"
@
change=
"onChange"
>
<el-option
v-for=
"(item,index) in yearList"
:key=
"`year_$
{index}`" :label="`${item}年`" :value="item">
</el-option>
<!--
<el-option
label=
"2020年"
value=
"2020"
></el-option>
<el-option
label=
"2019年"
value=
"2019"
></el-option>
<el-option
label=
"2018年"
value=
"2018"
></el-option>
-->
</el-select>
<el-date-picker
v-model=
"searchForm.dataRange"
type=
"month"
placeholder=
"选择月"
value-format=
"yyyy-MM"
@
change=
"initColumn"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"月份:"
>
<
!--
<
el-form-item
label=
"月份:"
>
<el-select
v-model=
"searchForm.month"
placeholder=
"请选择"
@
change=
"onChange"
>
<el-option
label=
"1月"
value=
"1"
></el-option>
<el-option
label=
"2月"
value=
"2"
></el-option>
...
...
@@ -33,7 +29,7 @@
<el-option
label=
"11月"
value=
"11"
></el-option>
<el-option
label=
"12月"
value=
"12"
></el-option>
</el-select>
</el-form-item>
</el-form-item>
-->
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"getList()"
>
搜索
</el-button>
</el-form-item>
...
...
@@ -74,26 +70,40 @@
<
script
>
import
GlsxTable
from
"@/components/glsx-table"
;
import
{
OIL_STATISTICS_SEARCH
,
OIL_YEARS_LIST
,
OIL_STATISTICS_EXPORT
}
from
"services/report"
;
import
{
OIL_STATISTICS_SEARCH
,
OIL_YEARS_LIST
,
OIL_STATISTICS_EXPORT
,
}
from
"services/report"
;
import
moment
from
"moment"
;
import
{
deepClone
}
from
'@/utils/util'
import
{
deepClone
}
from
"@/utils/util"
;
export
default
{
data
()
{
return
{
searchForm
:
{},
tableData
:
[],
columnList
:
[
{
label
:
"特约店代码"
,
prop
:
"shopCode"
,
fixed
:
'left'
,
width
:
'100px'
},
{
label
:
"特约店名称"
,
prop
:
"shopName"
,
fixed
:
'left'
,
width
:
'100px'
},
{
label
:
"车型"
,
prop
:
"modelName"
,
fixed
:
'left'
,
width
:
'160px'
},
{
label
:
"设备号"
,
prop
:
"sn"
,
fixed
:
'left'
,
width
:
'160px'
},
{
label
:
"车架号VIN码"
,
prop
:
"vin"
,
fixed
:
'left'
,
width
:
'160px'
},
{
label
:
"时间"
,
prop
:
"statDate"
,
fixed
:
'left'
,
width
:
'100px'
},
{
label
:
"特约店代码"
,
prop
:
"shopCode"
,
fixed
:
"left"
,
width
:
"100px"
,
},
{
label
:
"特约店名称"
,
prop
:
"shopName"
,
fixed
:
"left"
,
width
:
"100px"
,
},
{
label
:
"车型"
,
prop
:
"modelName"
,
fixed
:
"left"
,
width
:
"160px"
},
{
label
:
"设备号"
,
prop
:
"sn"
,
fixed
:
"left"
,
width
:
"160px"
},
{
label
:
"车架号VIN码"
,
prop
:
"vin"
,
fixed
:
"left"
,
width
:
"160px"
},
{
label
:
"时间"
,
prop
:
"statDate"
,
fixed
:
"left"
,
width
:
"100px"
},
],
tableColumnList
:[],
tableColumnList
:
[],
pageTotal
:
0
,
yearList
:[],
dloading
:
false
yearList
:
[],
dloading
:
false
,
};
},
components
:
{
...
...
@@ -105,10 +115,17 @@ export default {
this
.
getList
();
},
methods
:
{
// 获取查询参数
getParams
()
{
let
oParams
=
deepClone
(
this
.
searchForm
);
let
o
=
oParams
.
dataRange
;
if
(
o
){
oParams
.
year
=
o
.
split
(
'-'
)[
0
]
oParams
.
month
=
o
.
split
(
'-'
)[
1
]
delete
oParams
.
dataRange
}
return
oParams
;
},
...
...
@@ -133,37 +150,36 @@ export default {
/** 初始化 表格日期 */
initColumn
(
e
)
{
console
.
log
(
e
)
let
y
=
this
.
searchForm
.
year
||
moment
().
date
();
let
m
=
this
.
searchForm
.
month
||
moment
().
month
()
+
1
;
let
y
=
e
?
e
.
split
(
'-'
)[
0
]
:
moment
().
date
();
let
m
=
e
?
e
.
split
(
'-'
)[
1
]
:
moment
().
month
()
+
1
;
let
day
=
moment
(
`
${
y
}
-
${
m
}
`
,
"YYYY-MM"
).
daysInMonth
();
let
list
=
deepClone
(
this
.
columnList
);
for
(
let
i
=
1
,
len
=
day
;
i
<=
len
;
i
++
)
{
let
o
=
{
label
:
`
${
i
}
日`
,
prop
:
`dayNum
${
i
}
`
}
list
.
push
(
o
)
for
(
let
i
=
1
,
len
=
day
;
i
<=
len
;
i
++
)
{
let
o
=
{
label
:
`
${
i
}
日`
,
prop
:
`dayNum
${
i
}
`
};
list
.
push
(
o
)
;
}
list
.
push
({
label
:
'总计'
,
prop
:
'summation'
})
this
.
tableColumnList
=
list
list
.
push
({
label
:
"总计"
,
prop
:
"summation"
});
this
.
tableColumnList
=
list
;
},
//监听月份和年份 切换
onChange
()
{
this
.
initColumn
();
},
// onChange()
{
//
this.initColumn();
//
},
// 重置
rest
(){
rest
()
{
this
.
searchForm
=
{};
this
.
getList
();
this
.
$refs
.
glsxTable
.
rest
();
},
// 获取年份
getYear
(){
OIL_YEARS_LIST
().
then
(
res
=>
{
this
.
yearList
=
res
.
data
||
[]
})
getYear
()
{
OIL_YEARS_LIST
().
then
(
(
res
)
=>
{
this
.
yearList
=
res
.
data
||
[]
;
})
;
},
// 导出excel
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment