Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
fda716cd
Commit
fda716cd
authored
Jul 08, 2020
by
季圣华
Browse files
优化首页
parent
2f67fc8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
erp_web/home.html
View file @
fda716cd
...
@@ -123,41 +123,53 @@
...
@@ -123,41 +123,53 @@
}).
find
(
'
.box-header, .nav-tabs
'
).
css
(
'
cursor
'
,
'
move
'
);
}).
find
(
'
.box-header, .nav-tabs
'
).
css
(
'
cursor
'
,
'
move
'
);
$
(
function
()
{
$
(
function
()
{
$
.
ajax
({
var
loginName
=
sessionStorage
.
getItem
(
"
loginName
"
);
type
:
"
get
"
,
if
(
loginName
!=
"
admin
"
)
{
url
:
"
/depotHead/getBuyAndSaleStatistics
"
,
$
.
ajax
({
dataType
:
"
json
"
,
type
:
"
get
"
,
success
:
function
(
res
)
{
url
:
"
/depotHead/getBuyAndSaleStatistics
"
,
if
(
res
&&
res
.
code
===
200
)
{
dataType
:
"
json
"
,
if
(
res
.
data
)
{
success
:
function
(
res
)
{
$
(
"
#todaySale
"
).
text
((
res
.
data
.
todaySale
).
toFixed
(
2
));
if
(
res
&&
res
.
code
===
200
)
{
$
(
"
#thisMonthSale
"
).
text
((
res
.
data
.
thisMonthSale
).
toFixed
(
2
));
if
(
res
.
data
)
{
$
(
"
#thisMonthBuy
"
).
text
((
res
.
data
.
thisMonthBuy
).
toFixed
(
2
));
$
(
"
#todaySale
"
).
text
((
res
.
data
.
todaySale
).
toFixed
(
2
));
$
(
"
#thisMonthSale
"
).
text
((
res
.
data
.
thisMonthSale
).
toFixed
(
2
));
$
(
"
#thisMonthBuy
"
).
text
((
res
.
data
.
thisMonthBuy
).
toFixed
(
2
));
}
}
}
}
},
},
error
:
function
(
res
)
{
error
:
function
(
res
){
}
}
});
});
}
else
{
$
(
"
#todaySale
"
).
text
(
"
--
"
);
$
(
"
#thisMonthSale
"
).
text
(
"
--
"
);
$
(
"
#thisMonthBuy
"
).
text
(
"
--
"
);
}
});
});
$
(
function
()
{
$
(
function
()
{
$
.
ajax
({
var
loginName
=
sessionStorage
.
getItem
(
"
loginName
"
);
type
:
"
get
"
,
if
(
loginName
!=
"
admin
"
)
{
url
:
"
/account/getStatistics
"
,
$
.
ajax
({
dataType
:
"
json
"
,
type
:
"
get
"
,
success
:
function
(
res
)
{
url
:
"
/account/getStatistics
"
,
if
(
res
&&
res
.
code
===
200
)
{
dataType
:
"
json
"
,
if
(
res
.
data
)
{
success
:
function
(
res
)
{
$
(
"
#thisMonthAmount
"
).
text
((
res
.
data
.
allMonthAmount
-
0
).
toFixed
(
2
));
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
)
{
$
(
"
#thisMonthAmount
"
).
text
((
res
.
data
.
allMonthAmount
-
0
).
toFixed
(
2
));
}
}
}
}
},
},
error
:
function
(
res
){
error
:
function
(
res
){
}
}
});
});
}
else
{
$
(
"
#thisMonthAmount
"
).
text
(
"
--
"
);
}
});
});
function
getChartObj
(
titleName
,
categories
,
seriesData
)
{
function
getChartObj
(
titleName
,
categories
,
seriesData
)
{
...
@@ -184,21 +196,27 @@
...
@@ -184,21 +196,27 @@
return
chartObj
;
return
chartObj
;
}
}
$
(
function
()
{
$
(
function
()
{
$
.
ajax
({
var
loginName
=
sessionStorage
.
getItem
(
"
loginName
"
);
type
:
"
get
"
,
if
(
loginName
!=
"
admin
"
)
{
url
:
"
/depotItem/buyOrSalePrice
"
,
$
.
ajax
({
dataType
:
"
json
"
,
type
:
"
get
"
,
success
:
function
(
res
)
{
url
:
"
/depotItem/buyOrSalePrice
"
,
if
(
res
&&
res
.
code
===
200
)
{
dataType
:
"
json
"
,
var
data
=
res
.
data
;
success
:
function
(
res
)
{
Highcharts
.
chart
(
'
buyIn
'
,
getChartObj
(
"
最近6个月采购数据
"
,
res
.
data
.
monthList
,
res
.
data
.
buyPriceList
));
if
(
res
&&
res
.
code
===
200
)
{
Highcharts
.
chart
(
'
saleOut
'
,
getChartObj
(
"
最近6个月销售数据
"
,
res
.
data
.
monthList
,
res
.
data
.
salePriceList
));
var
data
=
res
.
data
;
}
Highcharts
.
chart
(
'
buyIn
'
,
getChartObj
(
"
最近6个月采购数据
"
,
res
.
data
.
monthList
,
res
.
data
.
buyPriceList
));
},
Highcharts
.
chart
(
'
saleOut
'
,
getChartObj
(
"
最近6个月销售数据
"
,
res
.
data
.
monthList
,
res
.
data
.
salePriceList
));
error
:
function
(
res
){
}
},
error
:
function
(
res
)
{
}
}
});
});
}
else
{
Highcharts
.
chart
(
'
buyIn
'
,
getChartObj
(
"
最近6个月采购数据
"
,
[],
[]));
Highcharts
.
chart
(
'
saleOut
'
,
getChartObj
(
"
最近6个月销售数据
"
,
[],
[]));
}
});
});
</script>
</script>
\ No newline at end of file
Write
Preview
Supports
Markdown
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