Commit 7ea85d4f authored by 季圣华's avatar 季圣华
Browse files

给首页增加统计折线图的功能

parent 028b87a7
......@@ -59,7 +59,6 @@
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="fa fa-users"></i></span>
<div class="info-box-content">
<span class="info-box-text">用户数量</span>
<span id="thisUserSum" class="info-box-number">0</span>
......@@ -68,73 +67,29 @@
</div>
</div>
<div class="row">
<section class="col-md-7 ui-sortable">
<!-- Chat box -->
<div class="nav-tabs-custom">
<!-- Tabs within a box -->
<ul class="nav nav-tabs pull-right ui-sortable-handle">
<li class=""><a href="#revenue-chart" data-toggle="tab" aria-expanded="false">面积图</a></li>
<li class="active"><a href="#sales-chart" data-toggle="tab" aria-expanded="true">饼图</a></li>
<li class="pull-left header"><i class="fa fa-inbox"></i> 销售</li>
</ul>
<div class="tab-content no-padding">
<!-- Morris chart - Sales -->
<div class="chart tab-pane" id="revenue-chart" style="position: relative; height: 350px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><svg height="300" version="1.1" width="717.945" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="overflow: hidden; position: relative; left: -8.98655e-06px; top: -0.899049px;"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.2.0</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><text x="12.5" y="275" text-anchor="end" font-family="sans-serif" font-size="12px" stroke="none" fill="#888888" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: sans-serif; font-size: 12px; font-weight: normal;" font-weight="normal"><tspan dy="275" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">0</tspan></text><path fill="none" stroke="#aaaaaa" d="M25,275H692.945" stroke-width="0.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="12.5" y="212.5" text-anchor="end" font-family="sans-serif" font-size="12px" stroke="none" fill="#888888" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: sans-serif; font-size: 12px; font-weight: normal;" font-weight="normal"><tspan dy="212.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">7,500</tspan></text><path fill="none" stroke="#aaaaaa" d="M25,212.5H692.945" stroke-width="0.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="12.5" y="150" text-anchor="end" font-family="sans-serif" font-size="12px" stroke="none" fill="#888888" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: sans-serif; font-size: 12px; font-weight: normal;" font-weight="normal"><tspan dy="150" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">15,000</tspan></text><path fill="none" stroke="#aaaaaa" d="M25,150H692.945" stroke-width="0.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="12.5" y="87.5" text-anchor="end" font-family="sans-serif" font-size="12px" stroke="none" fill="#888888" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: sans-serif; font-size: 12px; font-weight: normal;" font-weight="normal"><tspan dy="87.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">22,500</tspan></text><path fill="none" stroke="#aaaaaa" d="M25,87.5H692.945" stroke-width="0.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="12.5" y="25" text-anchor="end" font-family="sans-serif" font-size="12px" stroke="none" fill="#888888" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: sans-serif; font-size: 12px; font-weight: normal;" font-weight="normal"><tspan dy="25" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">30,000</tspan></text><path fill="none" stroke="#aaaaaa" d="M25,25H692.945" stroke-width="0.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="570.3937302551641" y="287.5" text-anchor="middle" font-family="sans-serif" font-size="12px" stroke="none" fill="#888888" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: sans-serif; font-size: 12px; font-weight: normal;" font-weight="normal" transform="matrix(1,0,0,1,0,0)"><tspan dy="287.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">2013</tspan></text><path fill="#74a5c2" stroke="none" d="M25,230.56666666666666C43.666749696233296,231.10833333333335,81.00024908869989,234.346875,99.66699878493318,232.73333333333335C118.33374848116648,231.11979166666669,155.66724787363307,220.05887978142076,174.33399756986637,217.65833333333333C192.79784781287975,215.28387978142075,229.72554829890646,215.553125,248.18939854191984,213.63333333333333C266.6532487849332,211.71354166666666,303.58094927095993,204.99249772313297,322.0447995139733,202.3C340.7115492102066,199.57791438979964,378.0450486026732,191.86145833333333,396.7117982989065,191.975C415.3785479951398,192.08854166666666,452.7120473876064,214.80992714025498,471.3787970838397,203.20833333333331C489.842647326853,191.73284380692166,526.7703478128798,106.50842541436462,545.2341980558931,99.66666666666666C563.4951488456866,92.9000920810313,600.0170504252734,141.67163461538462,618.2780012150669,148.775C636.9447509113002,156.03621794871796,674.2782503037668,155.0375,692.945,157.125L692.945,275L25,275Z" fill-opacity="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 1;"></path><path fill="none" stroke="#3c8dbc" d="M25,230.56666666666666C43.666749696233296,231.10833333333335,81.00024908869989,234.346875,99.66699878493318,232.73333333333335C118.33374848116648,231.11979166666669,155.66724787363307,220.05887978142076,174.33399756986637,217.65833333333333C192.79784781287975,215.28387978142075,229.72554829890646,215.553125,248.18939854191984,213.63333333333333C266.6532487849332,211.71354166666666,303.58094927095993,204.99249772313297,322.0447995139733,202.3C340.7115492102066,199.57791438979964,378.0450486026732,191.86145833333333,396.7117982989065,191.975C415.3785479951398,192.08854166666666,452.7120473876064,214.80992714025498,471.3787970838397,203.20833333333331C489.842647326853,191.73284380692166,526.7703478128798,106.50842541436462,545.2341980558931,99.66666666666666C563.4951488456866,92.9000920810313,600.0170504252734,141.67163461538462,618.2780012150669,148.775C636.9447509113002,156.03621794871796,674.2782503037668,155.0375,692.945,157.125" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><circle cx="25" cy="230.56666666666666" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="99.66699878493318" cy="232.73333333333335" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="174.33399756986637" cy="217.65833333333333" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="248.18939854191984" cy="213.63333333333333" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="322.0447995139733" cy="202.3" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="396.7117982989065" cy="191.975" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="471.3787970838397" cy="203.20833333333331" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="545.2341980558931" cy="99.66666666666666" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="618.2780012150669" cy="148.775" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="692.945" cy="157.125" r="4" fill="#3c8dbc" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><path fill="#eaf3f6" stroke="none" d="M25,252.78333333333333C43.666749696233296,252.55,81.00024908869989,254.18958333333333,99.66699878493318,251.85C118.33374848116648,249.51041666666666,155.66724787363307,235.10250455373406,174.33399756986637,234.06666666666666C192.79784781287975,233.0420878870674,229.72554829890646,245.58541666666667,248.18939854191984,243.60833333333335C266.6532487849332,241.63125000000002,303.58094927095993,220.22145947176685,322.0447995139733,218.25C340.7115492102066,216.2568761384335,378.0450486026732,225.67708333333334,396.7117982989065,227.75C415.3785479951398,229.82291666666666,452.7120473876064,244.68164845173044,471.3787970838397,234.83333333333334C489.842647326853,225.0920651183971,526.7703478128798,155.53688996316757,545.2341980558931,149.39166666666665C563.4951488456866,143.3139732965009,600.0170504252734,179.0999771062271,618.2780012150669,185.94166666666666C636.9447509113002,192.93539377289378,674.2782503037668,200.03541666666666,692.945,204.73333333333335L692.945,275L25,275Z" fill-opacity="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 1;"></path><path fill="none" stroke="#a0d0e0" d="M25,252.78333333333333C43.666749696233296,252.55,81.00024908869989,254.18958333333333,99.66699878493318,251.85C118.33374848116648,249.51041666666666,155.66724787363307,235.10250455373406,174.33399756986637,234.06666666666666C192.79784781287975,233.0420878870674,229.72554829890646,245.58541666666667,248.18939854191984,243.60833333333335C266.6532487849332,241.63125000000002,303.58094927095993,220.22145947176685,322.0447995139733,218.25C340.7115492102066,216.2568761384335,378.0450486026732,225.67708333333334,396.7117982989065,227.75C415.3785479951398,229.82291666666666,452.7120473876064,244.68164845173044,471.3787970838397,234.83333333333334C489.842647326853,225.0920651183971,526.7703478128798,155.53688996316757,545.2341980558931,149.39166666666665C563.4951488456866,143.3139732965009,600.0170504252734,179.0999771062271,618.2780012150669,185.94166666666666C636.9447509113002,192.93539377289378,674.2782503037668,200.03541666666666,692.945,204.73333333333335" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><circle cx="25" cy="252.78333333333333" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="99.66699878493318" cy="251.85" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="174.33399756986637" cy="234.06666666666666" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="248.18939854191984" cy="243.60833333333335" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="322.0447995139733" cy="218.25" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="396.7117982989065" cy="227.75" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="471.3787970838397" cy="234.83333333333334" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="545.2341980558931" cy="149.39166666666665" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="618.2780012150669" cy="185.94166666666666" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="692.945" cy="204.73333333333335" r="4" fill="#a0d0e0" stroke="#ffffff" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle></svg><div class="morris-hover morris-default-style" style="left: 547.691px; top: 74px; display: none;"><div class="morris-hover-row-label">2013 Q1</div><div class="morris-hover-point" style="color: #a0d0e0">
Item 1:
10,687
</div><div class="morris-hover-point" style="color: #3c8dbc">
Item 2:
4,460
</div></div></div>
<div class="chart tab-pane active" id="sales-chart" style="position: relative; height: 350px;"><svg height="350" version="1.1" width="687.945" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="overflow: hidden; position: relative;"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.2.0</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><path fill="none" stroke="#3c8dbc" d="M343.9725,243.33333333333331A93.33333333333333,93.33333333333333,0,0,0,432.2002551949771,180.44625304313007" stroke-width="2" opacity="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 0;"></path><path fill="#3c8dbc" stroke="#ffffff" d="M343.9725,246.33333333333331A96.33333333333333,96.33333333333333,0,0,0,435.0361473262442,181.4248826052307L471.58764590702043,194.03833029452744A135,135,0,0,1,343.9725,285Z" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><path fill="none" stroke="#f56954" d="M432.2002551949771,180.44625304313007A93.33333333333333,93.33333333333333,0,0,0,260.2573462783141,108.73398312817662" stroke-width="2" opacity="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 0;"></path><path fill="#f56954" stroke="#ffffff" d="M435.0361473262442,181.4248826052307A96.33333333333333,96.33333333333333,0,0,0,257.5665020515457,107.40757544301087L222.88450979541864,90.31165416754118A135,135,0,0,1,471.58764590702043,194.03833029452744Z" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><path fill="none" stroke="#00a65a" d="M260.2573462783141,108.73398312817662A93.33333333333333,93.33333333333333,0,0,0,343.94317846904886,243.333328727518" stroke-width="2" opacity="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 1;"></path><path fill="#00a65a" stroke="#ffffff" d="M257.5665020515457,107.40757544301087A96.33333333333333,96.33333333333333,0,0,0,343.94223599126826,246.3333285794739L343.9285177035733,289.999993091277A140,140,0,0,1,218.3997694174712,88.10097469226493Z" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="343.9725" y="140" text-anchor="middle" font-family="&quot;Arial&quot;" font-size="15px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: Arial; font-size: 15px; font-weight: 800;" font-weight="800" transform="matrix(1.2407,0,0,1.2407,-82.8045,-36.1969)" stroke-width="0.8059895833333334"><tspan dy="5.7734375" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">当前总量</tspan></text><text x="343.9725" y="160" text-anchor="middle" font-family="&quot;Arial&quot;" font-size="14px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: Arial; font-size: 14px;" transform="matrix(2.0235,0,0,2.0235,-352.0475,-155.8898)" stroke-width="0.49419642857142865"><tspan dy="4.625" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">98</tspan></text></svg></div>
<section class="col-md-6 ui-sortable">
<div class="box box-solid bg-teal-gradient">
<div class="box-header ui-sortable-handle">
<i class="fa fa-th"></i>
<h3 class="box-title">采购统计</h3>
<div class="box-tools pull-right"></div>
</div>
<div class="box-body border-radius-none">
<div id="buyIn" style="min-width:400px;height:380px"></div>
</div>
</div>
</section>
<section class="col-md-5 ui-sortable ui-sortable">
<!-- solid sales graph -->
<section class="col-md-6 ui-sortable ui-sortable">
<div class="box box-solid bg-teal-gradient">
<div class="box-header ui-sortable-handle">
<i class="fa fa-th"></i>
<h3 class="box-title">销售图表</h3>
<div class="box-tools pull-right">
<button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i>
</button>
</div>
<h3 class="box-title">销售统计</h3>
<div class="box-tools pull-right"></div>
</div>
<div class="box-body border-radius-none">
<div class="chart" id="line-chart" style="height: 250px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><svg height="250" version="1.1" width="462.813" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="overflow: hidden; position: relative; left: -0.367824px; top: -0.271661px;"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.2.0</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><text x="44.515625" y="211.9375" text-anchor="end" font-family="Open Sans" font-size="10px" stroke="none" fill="#ffffff" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: &quot;Open Sans&quot;; font-size: 10px; font-weight: normal;" font-weight="normal"><tspan dy="3.46875" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">0</tspan></text><path fill="none" stroke="#efefef" d="M57.015625,211.9375H437.813" stroke-width="0.4" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="44.515625" y="165.203125" text-anchor="end" font-family="Open Sans" font-size="10px" stroke="none" fill="#ffffff" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: &quot;Open Sans&quot;; font-size: 10px; font-weight: normal;" font-weight="normal"><tspan dy="3.46875" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">5,000</tspan></text><path fill="none" stroke="#efefef" d="M57.015625,165.203125H437.813" stroke-width="0.4" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="44.515625" y="118.46875000000001" text-anchor="end" font-family="Open Sans" font-size="10px" stroke="none" fill="#ffffff" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: &quot;Open Sans&quot;; font-size: 10px; font-weight: normal;" font-weight="normal"><tspan dy="3.468750000000014" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">10,000</tspan></text><path fill="none" stroke="#efefef" d="M57.015625,118.46875000000001H437.813" stroke-width="0.4" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="44.515625" y="71.734375" text-anchor="end" font-family="Open Sans" font-size="10px" stroke="none" fill="#ffffff" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: &quot;Open Sans&quot;; font-size: 10px; font-weight: normal;" font-weight="normal"><tspan dy="3.46875" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">15,000</tspan></text><path fill="none" stroke="#efefef" d="M57.015625,71.734375H437.813" stroke-width="0.4" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="44.515625" y="25.00000000000003" text-anchor="end" font-family="Open Sans" font-size="10px" stroke="none" fill="#ffffff" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: end; font-family: &quot;Open Sans&quot;; font-size: 10px; font-weight: normal;" font-weight="normal"><tspan dy="3.4687500000000284" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">20,000</tspan></text><path fill="none" stroke="#efefef" d="M57.015625,25.00000000000003H437.813" stroke-width="0.4" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="367.9461669198056" y="224.4375" text-anchor="middle" font-family="Open Sans" font-size="10px" stroke="none" fill="#ffffff" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: &quot;Open Sans&quot;; font-size: 10px; font-weight: normal;" font-weight="normal" transform="matrix(1,0,0,1,0,6.5313)"><tspan dy="3.46875" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">2013</tspan></text><text x="198.60006819562574" y="224.4375" text-anchor="middle" font-family="Open Sans" font-size="10px" stroke="none" fill="#ffffff" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: &quot;Open Sans&quot;; font-size: 10px; font-weight: normal;" font-weight="normal" transform="matrix(1,0,0,1,0,6.5313)"><tspan dy="3.46875" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">2012</tspan></text><path fill="none" stroke="#efefef" d="M57.015625,187.01873125C67.65759295261239,186.75701875,88.94152885783718,188.59601640625,99.58349681044957,185.97188125C110.22546476306196,183.34774609375,131.50940066828676,167.18747167008198,142.15136862089915,166.02565C152.67766300880925,164.87645682633197,173.7302517846294,178.94536796875002,184.2565461725395,176.72782187500002C194.78284056044959,174.51027578125002,215.83542933626973,150.49651948002048,226.36172372417983,148.28528125C237.00369167679222,146.0497436987705,258.28762758201697,156.61568359375,268.92959553462936,158.94071875C279.57156348724175,161.26575390625,300.8554993924666,177.93167894467211,311.497467345079,166.8855625C322.02376173298904,155.95951253842213,343.07635050880924,77.94468920493786,353.6026448967193,71.05205312500001C364.01326571992706,64.23516029868786,384.8345073663426,104.373636821772,395.24512818955037,112.047446875C405.88709614216276,119.89178604052199,427.1710320473876,127.85534921875,437.813,133.12465" stroke-width="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><circle cx="57.015625" cy="187.01873125" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="99.58349681044957" cy="185.97188125" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="142.15136862089915" cy="166.02565" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="184.2565461725395" cy="176.72782187500002" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="226.36172372417983" cy="148.28528125" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="268.92959553462936" cy="158.94071875" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="311.497467345079" cy="166.8855625" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="353.6026448967193" cy="71.05205312500001" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="395.24512818955037" cy="112.047446875" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle><circle cx="437.813" cy="133.12465" r="4" fill="#efefef" stroke="#efefef" stroke-width="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle></svg><div class="morris-hover morris-default-style" style="left: 89.1081px; top: 83px; display: none;"><div class="morris-hover-row-label">2011 Q3</div><div class="morris-hover-point" style="color: #efefef">
Item 1:
4,912
</div></div></div>
<div id="saleOut" style="min-width:400px;height:380px"></div>
</div>
<!-- /.box-body -->
<div class="box-footer no-border">
<div class="row">
<div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4">
<div style="display:inline;width:60px;height:60px;"><canvas width="77" height="77" style="width: 60px; height: 60px;"></canvas><input type="text" class="knob" data-readonly="true" value="20" data-width="60" data-height="60" data-fgcolor="#39CCCC" readonly="readonly" style="width: 34px; height: 20px; position: absolute; vertical-align: middle; margin-top: 20px; margin-left: -47px; border: 0px; background: none; font: bold 12px Arial; text-align: center; color: rgb(57, 204, 204); padding: 0px; -webkit-appearance: none;"></div>
<div class="knob-label">新订购</div>
</div>
<!-- ./col -->
<div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4">
<div style="display:inline;width:60px;height:60px;"><canvas width="77" height="77" style="width: 60px; height: 60px;"></canvas><input type="text" class="knob" data-readonly="true" value="50" data-width="60" data-height="60" data-fgcolor="#39CCCC" readonly="readonly" style="width: 34px; height: 20px; position: absolute; vertical-align: middle; margin-top: 20px; margin-left: -47px; border: 0px; background: none; font: bold 12px Arial; text-align: center; color: rgb(57, 204, 204); padding: 0px; -webkit-appearance: none;"></div>
<div class="knob-label">进行中</div>
</div>
<!-- ./col -->
<div class="col-xs-4 text-center">
<div style="display:inline;width:60px;height:60px;"><canvas width="77" height="77" style="width: 60px; height: 60px;"></canvas><input type="text" class="knob" data-readonly="true" value="30" data-width="60" data-height="60" data-fgcolor="#39CCCC" readonly="readonly" style="width: 34px; height: 20px; position: absolute; vertical-align: middle; margin-top: 20px; margin-left: -47px; border: 0px; background: none; font: bold 12px Arial; text-align: center; color: rgb(57, 204, 204); padding: 0px; -webkit-appearance: none;"></div>
<div class="knob-label">已成交</div>
</div>
<!-- ./col -->
</div>
<!-- /.row -->
</div>
<!-- /.box-footer -->
</div>
<!-- /.box -->
</section>
</div>
</div>
......@@ -160,7 +115,11 @@
+'<small class="label pull-right bg-red jump">hot</small></span>');
},2000);
}
</script><script src="js/jquery/jquery-ui-sortable-1.12.1.min.js"></script>
</script>
<script src="js/jquery/jquery-ui-sortable-1.12.1.min.js"></script>
<script src="js/highcharts/highcharts.js"></script>
<script src="js/highcharts/exporting.js"></script>
<script src="js/highcharts/highcharts-zh_CN.js"></script>
<script>
$(window).resize(function(){
var footerHeight = $('.main-footer').outerHeight() || 0;
......@@ -219,4 +178,46 @@
}
});
});
function getChartObj(titleName, categories, seriesData) {
var chartObj = {
chart: {
type: 'spline'
},
title: {
text: titleName
},
xAxis: {
categories: categories
},
yAxis: {
title: {
text: '金额(元)'
}
},
series: [{
name: titleName,
data: seriesData
}]
}
return chartObj;
}
$(function () {
$.ajax({
type: "get",
url: "/depotItem/buyOrSalePrice",
dataType: "json",
success: function (res) {
if(res && res.code === 200) {
var data = res.data;
Highcharts.chart('buyIn', getChartObj("采购金额", res.data.monthList, res.data.buyPriceList));
Highcharts.chart('saleOut', getChartObj("销售金额", res.data.monthList, res.data.salePriceList));
}
},
error:function(res){
}
});
});
</script>
\ No newline at end of file
/*
Highcharts JS v2.3.3 (2012-10-04)
Highcharts JS v7.2.0 (2019-09-03)
Exporting module
(c) 2010-2011 Torstein Hønsi
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(){function x(a){for(var b=a.length;b--;)typeof a[b]==="number"&&(a[b]=Math.round(a[b])-0.5);return a}var g=Highcharts,y=g.Chart,z=g.addEvent,B=g.removeEvent,r=g.createElement,u=g.discardElement,t=g.css,s=g.merge,k=g.each,n=g.extend,C=Math.max,h=document,D=window,A=h.documentElement.ontouchstart!==void 0,v=g.getOptions();n(v.lang,{downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",exportButtonTitle:"Export to raster or vector image",
printButtonTitle:"Print the chart"});v.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF"},menuItemStyle:{padding:"0 5px",background:"none",color:"#303030",fontSize:A?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{align:"right",backgroundColor:{linearGradient:[0,0,0,20],stops:[[0.4,"#F7F7F7"],[0.6,"#E3E3E3"]]},borderColor:"#B0B0B0",borderRadius:3,borderWidth:1,height:20,hoverBorderColor:"#909090",hoverSymbolFill:"#81A7CF",hoverSymbolStroke:"#4572A5",
symbolFill:"#E0E0E0",symbolStroke:"#A0A0A0",symbolX:11.5,symbolY:10.5,verticalAlign:"top",width:24,y:10}};v.exporting={type:"image/png",url:"http://export.highcharts.com/",width:800,buttons:{exportButton:{symbol:"exportIcon",x:-10,symbolFill:"#A8BF77",hoverSymbolFill:"#768F3E",_id:"exportButton",_titleKey:"exportButtonTitle",menuItems:[{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",
onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]},printButton:{symbol:"printIcon",x:-36,symbolFill:"#B5C9DF",hoverSymbolFill:"#779ABF",_id:"printButton",_titleKey:"printButtonTitle",onclick:function(){this.print()}}}};n(y.prototype,{getSVG:function(a){var b=this,c,d,e,f=s(b.options,a);if(!h.createElementNS)h.createElementNS=function(a,b){return h.createElement(b)};a=r("div",null,{position:"absolute",
top:"-9999em",width:b.chartWidth+"px",height:b.chartHeight+"px"},h.body);n(f.chart,{renderTo:a,forExport:!0});f.exporting.enabled=!1;f.chart.plotBackgroundImage=null;f.series=[];k(b.series,function(a){e=s(a.options,{animation:!1,showCheckbox:!1,visible:a.visible});if(!e.isInternal){if(e&&e.marker&&/^url\(/.test(e.marker.symbol))e.marker.symbol="circle";f.series.push(e)}});c=new Highcharts.Chart(f);k(["xAxis","yAxis"],function(a){k(b[a],function(b,d){var e=c[a][d],f=b.getExtremes(),g=f.userMin,f=f.userMax;
(g!==void 0||f!==void 0)&&e.setExtremes(g,f,!0,!1)})});d=c.container.innerHTML;f=null;c.destroy();u(a);d=d.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/isTracker="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ href=/g," xlink:href=").replace(/\n/," ").replace(/<\/svg>.*?$/,"</svg>").replace(/&nbsp;/g," ").replace(/&shy;/g,"­").replace(/<IMG /g,
"<image ").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g,'width="$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" ]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()});d=d.replace(/(url\(#highcharts-[0-9]+)&quot;/g,"$1").replace(/&quot;/g,"'");d.match(/ xmlns="/g).length===2&&(d=d.replace(/xmlns="[^"]+"/,""));return d},exportChart:function(a,
b){var c,d=this.getSVG(s(this.options.exporting.chartOptions,b)),a=s(this.options.exporting,a);c=r("form",{method:"post",action:a.url,enctype:"multipart/form-data"},{display:"none"},h.body);k(["filename","type","width","svg"],function(b){r("input",{type:"hidden",name:b,value:{filename:a.filename||"chart",type:a.type,width:a.width,svg:d}[b]},null,c)});c.submit();u(c)},print:function(){var a=this,b=a.container,c=[],d=b.parentNode,e=h.body,f=e.childNodes;if(!a.isPrinting)a.isPrinting=!0,k(f,function(a,
b){if(a.nodeType===1)c[b]=a.style.display,a.style.display="none"}),e.appendChild(b),D.print(),setTimeout(function(){d.appendChild(b);k(f,function(a,b){if(a.nodeType===1)a.style.display=c[b]});a.isPrinting=!1},1E3)},contextMenu:function(a,b,c,d,e,f){var i=this,g=i.options.navigation,h=g.menuItemStyle,o=i.chartWidth,p=i.chartHeight,q="cache-"+a,j=i[q],l=C(e,f),m,w;if(!j)i[q]=j=r("div",{className:"highcharts-"+a},{position:"absolute",zIndex:1E3,padding:l+"px"},i.container),m=r("div",null,n({MozBoxShadow:"3px 3px 10px #888",
WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},g.menuStyle),j),w=function(){t(j,{display:"none"})},z(j,"mouseleave",w),k(b,function(a){if(a){var b=r("div",{onmouseover:function(){t(this,g.menuItemHoverStyle)},onmouseout:function(){t(this,h)},innerHTML:a.text||i.options.lang[a.textKey]},n({cursor:"pointer"},h),m);b[A?"ontouchstart":"onclick"]=function(){w();a.onclick.apply(i,arguments)};i.exportDivElements.push(b)}}),i.exportDivElements.push(m,j),i.exportMenuWidth=j.offsetWidth,
i.exportMenuHeight=j.offsetHeight;a={display:"block"};c+i.exportMenuWidth>o?a.right=o-c-e-l+"px":a.left=c-l+"px";d+f+i.exportMenuHeight>p?a.bottom=p-d-l+"px":a.top=d+f-l+"px";t(j,a)},addButton:function(a){function b(){p.attr(l);o.attr(j)}var c=this,d=c.renderer,e=s(c.options.navigation.buttonOptions,a),f=e.onclick,g=e.menuItems,h=e.width,k=e.height,o,p,q,a=e.borderWidth,j={stroke:e.borderColor},l={stroke:e.symbolStroke,fill:e.symbolFill},m=e.symbolSize||12;if(!c.exportDivElements)c.exportDivElements=
[],c.exportSVGElements=[];e.enabled!==!1&&(o=d.rect(0,0,h,k,e.borderRadius,a).align(e,!0).attr(n({fill:e.backgroundColor,"stroke-width":a,zIndex:19},j)).add(),q=d.rect(0,0,h,k,0).align(e).attr({id:e._id,fill:"rgba(255, 255, 255, 0.001)",title:c.options.lang[e._titleKey],zIndex:21}).css({cursor:"pointer"}).on("mouseover",function(){p.attr({stroke:e.hoverSymbolStroke,fill:e.hoverSymbolFill});o.attr({stroke:e.hoverBorderColor})}).on("mouseout",b).on("click",b).add(),g&&(f=function(){b();var a=q.getBBox();
c.contextMenu("export-menu",g,a.x,a.y,h,k)}),q.on("click",function(){f.apply(c,arguments)}),p=d.symbol(e.symbol,e.symbolX-m/2,e.symbolY-m/2,m,m).align(e,!0).attr(n(l,{"stroke-width":e.symbolStrokeWidth||1,zIndex:20})).add(),c.exportSVGElements.push(o,q,p))},destroyExport:function(){var a,b;for(a=0;a<this.exportSVGElements.length;a++)b=this.exportSVGElements[a],b.onclick=b.ontouchstart=null,this.exportSVGElements[a]=b.destroy();for(a=0;a<this.exportDivElements.length;a++)b=this.exportDivElements[a],
B(b,"mouseleave"),this.exportDivElements[a]=b.onmouseout=b.onmouseover=b.ontouchstart=b.onclick=null,u(b)}});g.Renderer.prototype.symbols.exportIcon=function(a,b,c,d){return x(["M",a,b+c,"L",a+c,b+d,a+c,b+d*0.8,a,b+d*0.8,"Z","M",a+c*0.5,b+d*0.8,"L",a+c*0.8,b+d*0.4,a+c*0.4,b+d*0.4,a+c*0.4,b,a+c*0.6,b,a+c*0.6,b+d*0.4,a+c*0.2,b+d*0.4,"Z"])};g.Renderer.prototype.symbols.printIcon=function(a,b,c,d){return x(["M",a,b+d*0.7,"L",a+c,b+d*0.7,a+c,b+d*0.4,a,b+d*0.4,"Z","M",a+c*0.2,b+d*0.4,"L",a+c*0.2,b,a+c*
0.8,b,a+c*0.8,b+d*0.4,"Z","M",a+c*0.2,b+d*0.7,"L",a,b+d,a+c,b+d,a+c*0.8,b+d*0.7,"Z"])};y.prototype.callbacks.push(function(a){var b,c=a.options.exporting,d=c.buttons;if(c.enabled!==!1){for(b in d)a.addButton(d[b]);z(a,"destroy",a.destroyExport)}})})();
(function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/exporting",["highcharts"],function(k){c(k);c.Highcharts=k;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function k(e,t,c,k){e.hasOwnProperty(t)||(e[t]=k.apply(null,c))}c=c?c._modules:{};k(c,"modules/full-screen.src.js",[c["parts/Globals.js"]],function(e){(e.FullScreen=function(e){this.init(e.parentNode)}).prototype=
{init:function(e){var c;e.requestFullscreen?c=e.requestFullscreen():e.mozRequestFullScreen?c=e.mozRequestFullScreen():e.webkitRequestFullscreen?c=e.webkitRequestFullscreen():e.msRequestFullscreen&&(c=e.msRequestFullscreen());if(c)c["catch"](function(){alert("Full screen is not supported inside a frame")})}}});k(c,"mixins/navigation.js",[],function(){return{initUpdate:function(e){e.navigation||(e.navigation={updates:[],update:function(e,c){this.updates.forEach(function(t){t.update.call(t.context,e,
c)})}})},addUpdate:function(e,c){c.navigation||this.initUpdate(c);c.navigation.updates.push({update:e,context:c})}}});k(c,"modules/exporting.src.js",[c["parts/Globals.js"],c["parts/Utilities.js"],c["mixins/navigation.js"]],function(e,c,k){var t=c.isObject,E=c.objectEach;c=e.defaultOptions;var A=e.doc,C=e.Chart,y=e.addEvent,J=e.removeEvent,D=e.fireEvent,w=e.createElement,F=e.discardElement,u=e.css,p=e.merge,q=e.pick,x=e.extend,K=e.isTouchDevice,z=e.win,H=z.navigator.userAgent,G=e.SVGRenderer,I=e.Renderer.prototype.symbols,
L=/Edge\/|Trident\/|MSIE /.test(H),M=/firefox/i.test(H);x(c.lang,{viewFullscreen:"View in full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"});c.navigation||(c.navigation={});p(!0,c.navigation,{buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}});
p(!0,c.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",color:"#333333",background:"none",fontSize:K?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",color:"#ffffff"},buttonOptions:{symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{padding:5}}});c.exporting={type:"image/png",url:"https://export.highcharts.com/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",
menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:"viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen=new e.FullScreen(this.container)}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",
onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}};e.post=function(a,b,f){var d=w("form",p({method:"post",action:a,enctype:"multipart/form-data"},f),{display:"none"},A.body);E(b,function(b,a){w("input",{type:"hidden",name:a,value:b},null,d)});d.submit();F(d)};x(C.prototype,{sanitizeSVG:function(a,
b){var f=a.indexOf("</svg>")+6,d=a.substr(f);a=a.substr(0,f);b&&b.exporting&&b.exporting.allowHTML&&d&&(d='<foreignObject x="0" y="0" width="'+b.chart.width+'" height="'+b.chart.height+'"><body xmlns="http://www.w3.org/1999/xhtml">'+d+"</body></foreignObject>",a=a.replace("</svg>",d+"</svg>"));a=a.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|&quot;)(.*?)("|&quot;);?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,
'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+:)href=/g," xlink:href=").replace(/\n/," ").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/&nbsp;/g,"\u00a0").replace(/&shy;/g,"\u00ad");this.ieSanitizeSVG&&(a=this.ieSanitizeSVG(a));return a},getChartHTML:function(){this.styledMode&&this.inlineStyles();return this.container.innerHTML},getSVG:function(a){var b,f=p(this.options,a);f.plotOptions=p(this.userOptions.plotOptions,
a&&a.plotOptions);var d=w("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},A.body);var c=this.renderTo.style.width;var r=this.renderTo.style.height;c=f.exporting.sourceWidth||f.chart.width||/px$/.test(c)&&parseInt(c,10)||(f.isGantt?800:600);r=f.exporting.sourceHeight||f.chart.height||/px$/.test(r)&&parseInt(r,10)||400;x(f.chart,{animation:!1,renderTo:d,forExport:!0,renderer:"SVGRenderer",width:c,height:r});f.exporting.enabled=!1;delete f.data;
f.series=[];this.series.forEach(function(a){b=p(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});b.isInternal||f.series.push(b)});this.axes.forEach(function(b){b.userOptions.internalKey||(b.userOptions.internalKey=e.uniqueKey())});var l=new e.Chart(f,this.callback);a&&["xAxis","yAxis","series"].forEach(function(b){var d={};a[b]&&(d[b]=a[b],l.update(d))});this.axes.forEach(function(b){var a=e.find(l.axes,function(a){return a.options.internalKey===b.userOptions.internalKey}),
d=b.getExtremes(),f=d.userMin;d=d.userMax;a&&(void 0!==f&&f!==a.min||void 0!==d&&d!==a.max)&&a.setExtremes(f,d,!0,!1)});c=l.getChartHTML();D(this,"getSVG",{chartCopy:l});c=this.sanitizeSVG(c,f);f=null;l.destroy();F(d);return c},getSVGForExport:function(a,b){var f=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}},f.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||f.sourceWidth,sourceHeight:a&&a.sourceHeight||f.sourceHeight}}))},getFilename:function(){var a=this.userOptions.title&&
this.userOptions.title.text,b=this.options.exporting.filename;if(b)return b;"string"===typeof a&&(b=a.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,""));if(!b||5>b.length)b="chart";return b},exportChart:function(a,b){b=this.getSVGForExport(a,b);a=p(this.options.exporting,a);e.post(a.url,{filename:a.filename||this.getFilename(),type:a.type,width:a.width||0,scale:a.scale,svg:b},
a.formAttributes)},print:function(){function a(a){(b.fixedDiv?[b.fixedDiv,b.scrollingContainer]:[b.container]).forEach(function(b){a.appendChild(b)})}var b=this,f=[],d=A.body,c=d.childNodes,e=b.options.exporting.printMaxWidth,l;if(!b.isPrinting){b.isPrinting=!0;b.pointer.reset(null,0);D(b,"beforePrint");if(l=e&&b.chartWidth>e){var g=[b.options.chart.width,void 0,!1];b.setSize(e,void 0,!1)}[].forEach.call(c,function(b,a){1===b.nodeType&&(f[a]=b.style.display,b.style.display="none")});a(d);setTimeout(function(){z.focus();
z.print();setTimeout(function(){a(b.renderTo);[].forEach.call(c,function(b,a){1===b.nodeType&&(b.style.display=f[a])});b.isPrinting=!1;l&&b.setSize.apply(b,g);D(b,"afterPrint")},1E3)},1)}},contextMenu:function(a,b,f,d,c,r,l){var g=this,m=g.options.navigation,p=g.chartWidth,B=g.chartHeight,n="cache-"+a,h=g[n],v=Math.max(c,r);if(!h){g.exportContextMenu=g[n]=h=w("div",{className:a},{position:"absolute",zIndex:1E3,padding:v+"px",pointerEvents:"auto"},g.fixedDiv||g.container);var k=w("div",{className:"highcharts-menu"},
null,h);g.styledMode||u(k,x({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},m.menuStyle));h.hideMenu=function(){u(h,{display:"none"});l&&l.setState(0);g.openMenu=!1;u(g.renderTo,{overflow:"hidden"});e.clearTimeout(h.hideTimer);D(g,"exportMenuHidden")};g.exportEvents.push(y(h,"mouseleave",function(){h.hideTimer=z.setTimeout(h.hideMenu,500)}),y(h,"mouseenter",function(){e.clearTimeout(h.hideTimer)}),y(A,"mouseup",function(b){g.pointer.inClass(b.target,
a)||h.hideMenu()}),y(h,"click",function(){g.openMenu&&h.hideMenu()}));b.forEach(function(b){"string"===typeof b&&(b=g.options.exporting.menuItemDefinitions[b]);if(t(b,!0)){if(b.separator)var a=w("hr",null,null,k);else a=w("div",{className:"highcharts-menu-item",onclick:function(a){a&&a.stopPropagation();h.hideMenu();b.onclick&&b.onclick.apply(g,arguments)},innerHTML:b.text||g.options.lang[b.textKey]},null,k),g.styledMode||(a.onmouseover=function(){u(this,m.menuItemHoverStyle)},a.onmouseout=function(){u(this,
m.menuItemStyle)},u(a,x({cursor:"pointer"},m.menuItemStyle)));g.exportDivElements.push(a)}});g.exportDivElements.push(k,h);g.exportMenuWidth=h.offsetWidth;g.exportMenuHeight=h.offsetHeight}b={display:"block"};f+g.exportMenuWidth>p?b.right=p-f-c-v+"px":b.left=f-v+"px";d+r+g.exportMenuHeight>B&&"top"!==l.alignOptions.verticalAlign?b.bottom=B-d-v+"px":b.top=d+r-v+"px";u(h,b);u(g.renderTo,{overflow:""});g.openMenu=!0},addButton:function(a){var b=this,f=b.renderer,d=p(b.options.navigation.buttonOptions,
a),c=d.onclick,e=d.menuItems,l=d.symbolSize||12;b.btnCount||(b.btnCount=0);b.exportDivElements||(b.exportDivElements=[],b.exportSVGElements=[]);if(!1!==d.enabled){var g=d.theme,m=g.states,k=m&&m.hover;m=m&&m.select;var B;b.styledMode||(g.fill=q(g.fill,"#ffffff"),g.stroke=q(g.stroke,"none"));delete g.states;c?B=function(a){a&&a.stopPropagation();c.call(b,a)}:e&&(B=function(a){a&&a.stopPropagation();b.contextMenu(n.menuClassName,e,n.translateX,n.translateY,n.width,n.height,n);n.setState(2)});d.text&&
d.symbol?g.paddingLeft=q(g.paddingLeft,25):d.text||x(g,{width:d.width,height:d.height,padding:0});b.styledMode||(g["stroke-linecap"]="round",g.fill=q(g.fill,"#ffffff"),g.stroke=q(g.stroke,"none"));var n=f.button(d.text,0,0,B,g,k,m).addClass(a.className).attr({title:q(b.options.lang[d._titleKey||d.titleKey],"")});n.menuClassName=a.menuClassName||"highcharts-menu-"+b.btnCount++;if(d.symbol){var h=f.symbol(d.symbol,d.symbolX-l/2,d.symbolY-l/2,l,l,{width:l,height:l}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(n);
b.styledMode||h.attr({stroke:d.symbolStroke,fill:d.symbolFill,"stroke-width":d.symbolStrokeWidth||1})}n.add(b.exportingGroup).align(x(d,{width:n.width,x:q(d.x,b.buttonOffset)}),!0,"spacingBox");b.buttonOffset+=(n.width+d.buttonSpacing)*("right"===d.align?-1:1);b.exportSVGElements.push(n,h)}},destroyExport:function(a){var b=a?a.target:this;a=b.exportSVGElements;var f=b.exportDivElements,d=b.exportEvents,c;a&&(a.forEach(function(a,d){a&&(a.onclick=a.ontouchstart=null,c="cache-"+a.menuClassName,b[c]&&
delete b[c],b.exportSVGElements[d]=a.destroy())}),a.length=0);b.exportingGroup&&(b.exportingGroup.destroy(),delete b.exportingGroup);f&&(f.forEach(function(a,d){e.clearTimeout(a.hideTimer);J(a,"mouseleave");b.exportDivElements[d]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;F(a)}),f.length=0);d&&(d.forEach(function(a){a()}),d.length=0)}});G.prototype.inlineToAttributes="fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");G.prototype.inlineBlacklist=[/-/,/^(clipPath|cssText|d|height|width)$/,
/^font$/,/[lL]ogical(Width|Height)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/];G.prototype.unstyledElements=["clipPath","defs","desc"];C.prototype.inlineStyles=function(){function a(a){return a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()})}function b(c){function f(b,f){v=u=!1;if(k){for(r=k.length;r--&&!u;)u=k[r].test(f);v=!u}"transform"===f&&"none"===b&&(v=!0);for(r=e.length;r--&&!v;)v=e[r].test(f)||"function"===typeof b;v||y[f]===b&&"svg"!==c.nodeName||g[c.nodeName][f]===
b||(-1!==d.indexOf(f)?c.setAttribute(a(f),b):h+=a(f)+":"+b+";")}var h="",v,u,r;if(1===c.nodeType&&-1===l.indexOf(c.nodeName)){var t=z.getComputedStyle(c,null);var y="svg"===c.nodeName?{}:z.getComputedStyle(c.parentNode,null);if(!g[c.nodeName]){m=q.getElementsByTagName("svg")[0];var w=q.createElementNS(c.namespaceURI,c.nodeName);m.appendChild(w);g[c.nodeName]=p(z.getComputedStyle(w,null));"text"===c.nodeName&&delete g.text.fill;m.removeChild(w)}if(M||L)for(var x in t)f(t[x],x);else E(t,f);h&&(t=c.getAttribute("style"),
c.setAttribute("style",(t?t+";":"")+h));"svg"===c.nodeName&&c.setAttribute("stroke-width","1px");"text"!==c.nodeName&&[].forEach.call(c.children||c.childNodes,b)}}var c=this.renderer,d=c.inlineToAttributes,e=c.inlineBlacklist,k=c.inlineWhitelist,l=c.unstyledElements,g={},m;c=A.createElement("iframe");u(c,{width:"1px",height:"1px",visibility:"hidden"});A.body.appendChild(c);var q=c.contentWindow.document;q.open();q.write('<svg xmlns="http://www.w3.org/2000/svg"></svg>');q.close();b(this.container.querySelector("svg"));
m.parentNode.removeChild(m)};I.menu=function(a,b,c,d){return["M",a,b+2.5,"L",a+c,b+2.5,"M",a,b+d/2+.5,"L",a+c,b+d/2+.5,"M",a,b+d-1.5,"L",a+c,b+d-1.5]};I.menuball=function(a,b,c,d){a=[];d=d/3-2;return a=a.concat(this.circle(c-d,b,d,d),this.circle(c-d,b+d+4,d,d),this.circle(c-d,b+2*(d+4),d,d))};C.prototype.renderExporting=function(){var a=this,b=a.options.exporting,c=b.buttons,d=a.isDirtyExporting||!a.exportSVGElements;a.buttonOffset=0;a.isDirtyExporting&&a.destroyExport();d&&!1!==b.enabled&&(a.exportEvents=
[],a.exportingGroup=a.exportingGroup||a.renderer.g("exporting-group").attr({zIndex:3}).add(),E(c,function(b){a.addButton(b)}),a.isDirtyExporting=!1);y(a,"destroy",a.destroyExport)};y(C,"init",function(){var a=this;a.exporting={update:function(b,c){a.isDirtyExporting=!0;p(!0,a.options.exporting,b);q(c,!0)&&a.redraw()}};k.addUpdate(function(b,c){a.isDirtyExporting=!0;p(!0,a.options.navigation,b);q(c,!0)&&a.redraw()},a)});C.prototype.callbacks.push(function(a){a.renderExporting();y(a,"redraw",a.renderExporting)})});
k(c,"masters/modules/exporting.src.js",[],function(){})});
//# sourceMappingURL=exporting.js.map
\ No newline at end of file
(function(factory){if(typeof module==="object"&&module.exports){module.exports=factory}else{factory(Highcharts)}})(function(Highcharts){var protocol=window.location.protocol;var defaultOptionsZhCn={lang:{contextButtonTitle:"图表导出菜单",decimalPoint:".",downloadJPEG:"下载 JPEG 图片",downloadPDF:"下载 PDF 文件",downloadPNG:"下载 PNG 文件",downloadSVG:"下载 SVG 文件",downloadXLS:"下载 XLS 文件",openInCloud:"在 Highcharts Cloud 中打开",drillUpText:"返回 {series.name}",invalidDate:"无效的时间",loading:"加载中...",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],noData:"没有数据",numericSymbols:null,printChart:"打印图表",resetZoom:"重置缩放比例",resetZoomTitle:"重置为原始大小",shortMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],thousandsSep:",",weekdays:["星期天","星期一","星期二","星期三","星期四","星期五","星期六"],viewData:"查看数据表格",rangeSelectorFrom:"开始时间",rangeSelectorTo:"结束时间",rangeSelectorZoom:"范围",zoomIn:"缩小",zoomOut:"放大"},global:{canvasToolsURL:protocol+"//cdn.hcharts.cn/highcharts/modules/canvas-tools.js",VMLRadialGradientURL:protocol+ +"//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png"},title:{text:"图表标题"},tooltip:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%Y-%m-%d",week:"%Y-%m-%d",month:"%Y-%m",year:"%Y"},split:false},exporting:{url:protocol+"//export.highcharts.com.cn"},credits:{text:"Highcharts.com.cn",href:"https://www.highcharts.com.cn"},xAxis:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%Y-%m-%d",week:"%Y-%m",month:"%Y-%m",year:"%Y"}},rangeSelector:{inputDateFormat:"%Y-%m-%d",buttons:[{type:"month",count:1,text:""},{type:"month",count:3,text:"季度"},{type:"month",count:6,text:"半年"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:""},{type:"all",text:"所有"}]},plotOptions:{series:{dataGrouping:{dateTimeLabelFormats:{millisecond:["%Y-%m-%d %H:%M:%S.%L","%Y-%m-%d %H:%M:%S.%L"," ~ %H:%M:%S.%L"],second:["%Y-%m-%d %H:%M:%S","%Y-%m-%d %H:%M:%S"," ~ %H:%M:%S"],minute:["%Y-%m-%d %H:%M","%Y-%m-%d %H:%M"," ~ %H:%M"],hour:["%Y-%m-%d %H:%M","%Y-%m-%d %H:%M"," ~ %H:%M"],day:["%Y-%m-%d","%Y-%m-%d"," ~ %Y-%m-%d"],week:["%Y-%m-%d","%Y-%m-%d"," ~ %Y-%m-%d"],month:["%Y-%m","%Y-%m"," ~ %Y-%m"],year:["%Y","%Y"," ~ %Y"]}}},ohlc:{tooltip:{split:false,pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>'+"开盘:{point.open}<br/>"+"最高:{point.high}<br/>"+"最低:{point.low}<br/>"+"收盘:{point.close}<br/>"}},candlestick:{tooltip:{split:false,pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>'+"开盘:{point.open}<br/>"+"最高:{point.high}<br/>"+"最低:{point.low}<br/>"+"收盘:{point.close}<br/>"}}}};Highcharts.setOptions(defaultOptionsZhCn)});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,61 +3,61 @@
* @author jishenghua
*/
$(function () {
unreadMsg()
// unreadMsg()
});
function unreadMsg() {
$.get(ctx + "/msg/unreadMsg?__notUpdateSession=true&__t=" + new Date().getTime(), function (d) {
var b = $("#msgList").empty();
var a = d.count || 0, c = d.list || [];
for (i = 0; i < c.length; i++) {
b.append(js.template("msgListTpl", c[i]))
}
$("#msgNum, #msgNum2").text(a);
$(".timeago").timeago();
pullPoolMsg();
if (window.ppmInt) {
clearInterval(window.ppmInt)
}
window.ppmInt = setInterval(pullPoolMsg, 60 * 1000)
})
}
function pullPoolMsg() {
var a = $("#msgList");
var b = a.attr("data-mergeMsgLimit");
$.get(ctx + "/msg/pullPoolMsg?__notUpdateSession=true&__t=" + new Date().getTime(), function (e) {
for (i = 0; i < e.length; i++) {
if (!(e.length > b)) {
var g = js.template("msgTipTpl", e[i]);
js.showMessage(g, e[i].msgContentEntity.title, "info", 1000 * 60);
doFlashTitle()
}
if (e[i].id && e[i].id != "") {
a.prepend(js.template("msgListTpl", e[i]))
}
}
if (e.length > b) {
var f = {
msgContentEntity: {
title: a.attr("data-mergeMsgTitle"),
content: js.text(a.attr("data-mergeMsgContent"), e.length)
}, sendDate: "", sendUserName: "", id: ""
};
var g = js.template("msgTipTpl", f);
js.showMessage(g, null, "info", 1000 * 60);
doFlashTitle()
}
var c = parseInt($("#msgNum").text());
if (!isNaN(c)) {
c += e.length || 0
} else {
c = a.find("li").length
}
$("#msgNum, #msgNum2").text(c);
$(".timeago").timeago()
})
}
// function unreadMsg() {
// $.get(ctx + "/msg/unreadMsg?__notUpdateSession=true&__t=" + new Date().getTime(), function (d) {
// var b = $("#msgList").empty();
// var a = d.count || 0, c = d.list || [];
// for (i = 0; i < c.length; i++) {
// b.append(js.template("msgListTpl", c[i]))
// }
// $("#msgNum, #msgNum2").text(a);
// $(".timeago").timeago();
// pullPoolMsg();
// if (window.ppmInt) {
// clearInterval(window.ppmInt)
// }
// window.ppmInt = setInterval(pullPoolMsg, 60 * 1000)
// })
// }
//
// function pullPoolMsg() {
// var a = $("#msgList");
// var b = a.attr("data-mergeMsgLimit");
// $.get(ctx + "/msg/pullPoolMsg?__notUpdateSession=true&__t=" + new Date().getTime(), function (e) {
// for (i = 0; i < e.length; i++) {
// if (!(e.length > b)) {
// var g = js.template("msgTipTpl", e[i]);
// js.showMessage(g, e[i].msgContentEntity.title, "info", 1000 * 60);
// doFlashTitle()
// }
// if (e[i].id && e[i].id != "") {
// a.prepend(js.template("msgListTpl", e[i]))
// }
// }
// if (e.length > b) {
// var f = {
// msgContentEntity: {
// title: a.attr("data-mergeMsgTitle"),
// content: js.text(a.attr("data-mergeMsgContent"), e.length)
// }, sendDate: "", sendUserName: "", id: ""
// };
// var g = js.template("msgTipTpl", f);
// js.showMessage(g, null, "info", 1000 * 60);
// doFlashTitle()
// }
// var c = parseInt($("#msgNum").text());
// if (!isNaN(c)) {
// c += e.length || 0
// } else {
// c = a.find("li").length
// }
// $("#msgNum, #msgNum2").text(c);
// $(".timeago").timeago()
// })
// }
function readMsg(c, d, e) {
var a = $(c).data("href");
......
......@@ -21,10 +21,8 @@ import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.text.SimpleDateFormat;
import java.util.*;
import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
......@@ -665,4 +663,46 @@ public class DepotItemController {
}
return res;
}
/**
* 统计采购或销售的总金额
* @param request
* @param response
* @return
* @throws Exception
*/
@GetMapping(value = "/buyOrSalePrice")
public BaseResponseInfo buyOrSalePrice(HttpServletRequest request, HttpServletResponse response)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
String message = "成功";
try {
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
String dateString = formatter.format(date);
List<String> list = Tools.getSixMonth(dateString);
map.put("monthList", list);
List<BigDecimal> buyPriceList = new ArrayList<BigDecimal>();
for(String month: list) {
BigDecimal outPrice = depotItemService.inOrOutPrice("入库", "采购", month);
BigDecimal inPrice = depotItemService.inOrOutPrice("出库", "采购退货", month);
buyPriceList.add(outPrice.subtract(inPrice));
}
map.put("buyPriceList", buyPriceList);
List<BigDecimal> salePriceList = new ArrayList<BigDecimal>();
for(String month: list) {
BigDecimal outPrice = depotItemService.inOrOutPrice("出库", "销售", month);
BigDecimal inPrice = depotItemService.inOrOutPrice("入库", "销售退货", month);
salePriceList.add(outPrice.subtract(inPrice));
}
map.put("salePriceList", salePriceList);
res.code = 200;
res.data = map;
} catch (Exception e) {
e.printStackTrace();
message = "统计失败";
res.code = 500;
}
return res;
}
}
......@@ -63,6 +63,11 @@ public interface DepotItemMapperEx {
@Param("MonthTime") String MonthTime,
@Param("sumType") String sumType);
BigDecimal inOrOutPrice(
@Param("type") String type,
@Param("subType") String subType,
@Param("MonthTime") String MonthTime);
DepotItemVo4Stock getStockByParam(
@Param("depotId") Long depotId,
@Param("mId") Long mId,
......
......@@ -260,6 +260,24 @@ public class DepotItemService {
}
/**
* 统计采购或销售的总金额
* @param type
* @param subType
* @param MonthTime
* @return
* @throws Exception
*/
public BigDecimal inOrOutPrice(String type, String subType, String MonthTime) throws Exception{
BigDecimal result= BigDecimal.ZERO;
try{
result = depotItemMapperEx.inOrOutPrice(type, subType, MonthTime);
}catch(Exception e){
JshException.readFail(logger, e);
}
return result;
}
/**
* 2019-02-02修改
* 我之前对操作数量的理解有偏差
......
......@@ -156,6 +156,41 @@ public class Tools {
return new SimpleDateFormat("yyyy-MM").format(cal.getTime());
}
/**
* 获取当前月份的前6个月(含当前月)
* @param date
* @return
*/
public static List<String> getSixMonth(String date) {
List<String> list = new ArrayList<String>();
int month = Integer.parseInt(date.substring(5, 7));
int year = Integer.parseInt(date.substring(0, 4));
for (int i = 5; i >= 0; i--) {
if (month > 6) {
if (month - i >= 10) {
list.add(year + "-" + String.valueOf(month - i));
} else {
list.add(year + "-0" + String.valueOf(month - i));
}
} else {
if (month - i <= 0) {
if (month - i + 12 >= 10) {
list.add(String.valueOf(year - 1) + "-" + String.valueOf(month - i + 12));
} else {
list.add(String.valueOf(year - 1) + "-0" + String.valueOf(month - i + 12));
}
} else {
if (month - i >= 10) {
list.add(String.valueOf(year) + "-" + String.valueOf(month - i));
} else {
list.add(String.valueOf(year) + "-0" + String.valueOf(month - i));
}
}
}
}
return list;
}
/**
* 截取字符串长度
*
......
......@@ -202,6 +202,15 @@
and ifnull(di.delete_Flag,'0') !='1'
</select>
<select id="inOrOutPrice" resultType="java.math.BigDecimal">
select ifnull(sum(DiscountLastMoney),0) as allMoney from jsh_depothead dh
where 1=1
and dh.type='${type}' and dh.subType='${subType}'
and dh.OperTime &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 23:59:59'
and ifnull(dh.delete_Flag,'0') !='1'
</select>
<select id="getStockByParam" resultMap="StockMap">
select ifnull((curep.inTotal+curep.transfInTotal+curep.assemInTotal+curep.disAssemInTotal),0) as in_stock,
ifnull((curep.transfOutTotal+curep.outTotal+curep.assemOutTotal+curep.disAssemOutTotal),0) out_stock
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment