ChartsData.cshtml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta name="viewport" content="width=device-width" />
  9. <title>ChartsCount</title>
  10. <link href="~/easyui/themes/default/easyui.css" rel="stylesheet" />
  11. <link rel="stylesheet" type="text/css" href="~/easyui/themes/icon.css" />
  12. <link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
  13. <link href="~/Content/js/plugins/layer/skin/layer.css" rel="stylesheet" />
  14. <script src="~/Content/js/jquery.min.js"></script>
  15. <script src="~/Content/js/bootstrap.min.js"></script>
  16. <script src="~/easyui/jquery.easyui.min.js"></script>
  17. <script src="~/easyui/jquery.easyui.mobile.js"></script>
  18. <script src="~/easyui/locale/easyui-lang-zh_CN.js"></script>
  19. <script src="~/Content/js/plugins/layer/laydate/laydate.js"></script>
  20. <script src="~/Content/js/plugins/layer/layer.min.js"></script>
  21. <script src="~/Content/plugins/highcharts/highcharts.js"></script>
  22. <script src="~/js/Utils.js"></script>
  23. <link href="~/Content/css/Style/Markets.css" rel="stylesheet" />
  24. <script src="~/Content/js/js/MarketJs.js"></script>
  25. </head>
  26. <body>
  27. <section class="hidden">
  28. <input type="hidden" id="hid_ReportType" value="@ViewBag.ReportType" />
  29. <input type="hidden" id="hid_ReportTitle" value="@ViewBag.ReportTitle" />
  30. <input id="hid_IsMarketSysAccount" name="hid_IsMarketSysAccount" type="hidden" value="@ViewBag.IsMarketSysAccount" />
  31. <input id="hid_IsSystem" name="hid_IsSystem" type="hidden" value="@ViewBag.IsSystem" />
  32. <input id="hid_MarketID" name="hid_MarketID" type="hidden" value="@ViewBag.MarketID" />
  33. <input id="hid_ChartType" name="hid_ChartType" type="hidden" value="COLUMN" />
  34. <input id="hid_NumberFormat" name="hid_NumberFormat" type="hidden" value="0" />
  35. </section>
  36. <section id="Search_Panel">
  37. <div id="" class="easyui-panel" title="检测数据查询"
  38. style="width: 100%; height: 135px; padding: 8px;"
  39. data-options="closable:false,collapsible:true">
  40. <table class="panel-table">
  41. <tr>
  42. <td class="td-label"><label for="SearchRegionID">辖区工商</label></td>
  43. <td class="td-input">
  44. <select class="easyui-combobox" type="text" id="SearchRegionID" name="SearchRegionID" style="height: 25px; width: 150px" data-options="onSelect:function(){GetMarketSelStr()}">
  45. <option value="">全部</option>
  46. @Html.Raw(ViewBag.SelRegionInfo)
  47. </select>
  48. </td>
  49. <td class="td-label"><label for="SearchMarketID">隶属市场</label></td>
  50. <td class="td-input">
  51. <select class="easyui-combobox" style="height: 25px; width: 150px" id="SearchMarketID" name="SearchMarketID" data-options="">
  52. @Html.Raw(ViewBag.SelMarketInfo)
  53. </select>
  54. </td>
  55. <td class="td-label"><label for="SearchCorpKind">企业类型</label></td>
  56. <td class="td-input">
  57. <select class="easyui-combobox" style="height: 25px; width: 150px" id="SearchCorpKind" name="SearchCorpKind">
  58. <option value="">全部</option>
  59. @Html.Raw(ViewBag.SelCorpKindInfo)
  60. </select>
  61. </td>
  62. <td class="td-label"><label for="SearchCorpName">被检企业</label></td>
  63. <td class="td-input">
  64. <input class="easyui-textbox" style="height: 25px; width: 150px" id="SearchCorpName" name="SearchCorpName">
  65. </td>
  66. </tr>
  67. <tr>
  68. <td class="td-label"><label for="SearchLittleKindName">品种类别</label></td>
  69. <td class="td-input">
  70. <select class="easyui-combobox" style="height: 25px; width: 150px" id="SearchLittleKindName" name="SearchLittleKindName" data-options="onSelect:function(){GetLittleKindSelStr()}">
  71. <option value="">全部</option>
  72. @Html.Raw(ViewBag.SelLittleKindInfo)
  73. </select>
  74. </td>
  75. <td class="td-label"><label for="SearchSampleName">样品名称</label></td>
  76. <td class="td-input">
  77. <input class="easyui-combotree" style="height: 25px; width: 150px" id="SearchSampleName" name="SearchSampleName" data-options="" />
  78. @*<select class="easyui-combobox" style="height: 25px; width: 150px" id="SearchSampleName" name="SearchSampleName" data-options="">
  79. <option value="">全部</option>
  80. @Html.Raw(ViewBag.SelSampleNameInfo)
  81. </select>*@
  82. </td>
  83. <td class="td-label"><label for="SearchCheckProjectTypeID">检测项目</label></td>
  84. <td class="td-input">
  85. <select class="easyui-combobox" style="height: 25px; width: 150px" id="SearchCheckProjectTypeID" name="SearchCheckProjectTypeID">
  86. <option value="">全部</option>
  87. @Html.Raw(ViewBag.SelCheckProjectTypeInfo)
  88. </select>
  89. </td>
  90. <td class="td-label"><label for="SearchProduceUnit">生产单位</label></td>
  91. <td class="td-input">
  92. <input class="easyui-textbox" style="height: 25px; width: 150px" id="SearchProduceUnit" name="SearchProduceUnit">
  93. </td>
  94. </tr>
  95. <tr>
  96. <td class="td-label"><label for="SearchStartTime">开始时间</label></td>
  97. <td class="td-input"><input class="easyui-textbox" type="text" id="SearchStartTime" name="SearchStartTime" style="height: 25px; width: 150px" data-options="" placeholder="输入查询检测时间的开始日期"/></td>
  98. <td class="td-label"><label for="SearchEndTime">截止时间</label></td>
  99. <td class="td-input"><input class="easyui-textbox" type="text" id="SearchEndTime" name="SearchEndTime" style="height: 25px; width: 150px" data-options="" placeholder="输入查询检测时间的截止日期"/></td>
  100. <td class="td-label"><label for="SearchTopQty">查询数量</label></td>
  101. <td class="td-input">
  102. <select class="easyui-combobox" style="height: 25px; width: 150px" id="SearchTopQty" name="SearchTopQty">
  103. <option value="20">最前 20 条</option>
  104. <option value="30">最前 30 条</option>
  105. <option value="50">最前 50 条</option>
  106. <option value="-20">最后 20 条</option>
  107. <option value="-30">最后 30 条</option>
  108. <option value="-50">最后 50 条</option>
  109. <option value="">全部</option>
  110. </select>
  111. </td>
  112. <td class="td-input" colspan="2">
  113. <label style="margin: 0 10px">
  114. <input type="radio" name="ChartType" value="COLUMN" style="margin: 5px 3px 0 0;width: 30px" onclick="ChartType()" checked="checked" /> 柱图
  115. </label>
  116. <label style="margin: 0 10px">
  117. <input type="radio" name="ChartType" value="PIE" style="margin: 5px 3px 0 0;width: 30px" onclick="ChartType()"/> 饼图
  118. </label>
  119. <a href="#" class="easyui-linkbutton" iconCls="icon-search" style="width: 150px;height: 25px" onclick="LoadChart();">查询</a>
  120. </td>
  121. </tr>
  122. </table>
  123. </div>
  124. </section>
  125. <section style="margin:20px auto 0;text-align:center">
  126. <div id="container" style="width:90vw; height: 75vh; margin: 0 auto;">
  127. </div>
  128. </section>
  129. <script>
  130. //根据辖区获取市场下拉框的option
  131. function GetMarketSelStr() {
  132. $.ajax({
  133. url: "/GetResult/GetMarketSelStrResult",
  134. type: "post",
  135. async:false,
  136. dataType: "json",
  137. //data: { RegionID: $("input.combobox-value[name='SearchRegionID']").val() },
  138. data: { RegionID: $("#SearchRegionID").combobox("getValue") },
  139. success: function (data) {
  140. //console.log(msg);
  141. if (CheckAajxData(data) === false) return;
  142. var rows = data.rows;
  143. var first = "{\"MarketID\":\"\",\"Names\":\"全部\"}";
  144. var last = "{\"MarketID\":\"Other\",\"Names\":\"其他\"}";
  145. var firstJson = JSON.parse(first);
  146. var lastJson = JSON.parse(last);
  147. rows.unshift(firstJson);
  148. rows.push(lastJson);
  149. //console.log(rows);
  150. $('#SearchMarketID').combobox("clear").combobox({
  151. data: rows,
  152. valueField: 'MarketID',
  153. textField: 'Names',
  154. onLoadSuccess: function () {
  155. var val = $(this).combobox('getData');
  156. // ReSharper disable once MissingHasOwnPropertyInForeach
  157. for (var item in val[0]) {
  158. if (item === 'MarketID') {
  159. $(this).combobox('select', val[0][item]);
  160. }
  161. }
  162. }
  163. });
  164. }
  165. });
  166. }
  167. //根据小类获取品种名下拉框的option
  168. function GetLittleKindSelStr() {
  169. $.ajax({
  170. url: "/GetResult/GetLittleKindSelStrResult",
  171. type: "post",
  172. async:false,
  173. dataType: "json",
  174. data: { LittleKindName: $("#SearchLittleKindName").combotree("getValue") },
  175. success: function (data) {
  176. //console.log(msg);
  177. if (CheckAajxData(data) === false) return;
  178. if (data.length > 0) {
  179. $("#SearchSampleName").combotree({
  180. data: data
  181. });
  182. } else {
  183. $("#SampleName").combotree({
  184. data: []
  185. });
  186. }
  187. //var rows = data.rows;
  188. ////var first = "{\"SpecialsID\":\"";
  189. ////for (var i = 0; i < rows.length; i++) {
  190. //// first += (first === "{\"SpecialsID\":\"" ? "" : "@@|@@") + rows[i].SpecialsID;
  191. ////}
  192. ////first += "\",\"Name\":\"全部\"}";
  193. //var first = "{\"Name\":\"\",\"Name\":\"全部\"}";
  194. //var firstJson = JSON.parse(first);
  195. //rows.unshift(firstJson);
  196. //$('#SearchSampleName').combobox("clear").combobox({
  197. // data: rows,
  198. // valueField: 'Name',
  199. // textField: 'Name',
  200. // onLoadSuccess: function () {
  201. // var val = $(this).combobox('getData');
  202. // // ReSharper disable once MissingHasOwnPropertyInForeach
  203. // for (var item in val[0]) {
  204. // if (item === 'Name') {
  205. // $(this).combobox('select', val[0][item]);
  206. // }
  207. // }
  208. // }
  209. //});
  210. }
  211. });
  212. }
  213. //根据检测方法获取检测项目下拉框的option
  214. function GetCheckProjectSelStr() {
  215. $.ajax({
  216. url: "/GetResult/GetCheckProjectSelStrResult",
  217. type: "post",
  218. async:false,
  219. dataType: "json",
  220. data: { CheckMethod: $("#SearchCheckMethod").combobox("getValue") },
  221. success: function (data) {
  222. //console.log(msg);
  223. if (CheckAajxData(data) === false) return;
  224. var rows = data.rows;
  225. var first = "{\"CheckProjectTypeID\":\"\",\"Name\":\"全部\"}";
  226. var firstJson = JSON.parse(first);
  227. rows.unshift(firstJson);
  228. $('#SearchCheckProjectTypeID').combobox("clear").combobox({
  229. data: rows,
  230. valueField: 'CheckProjectTypeID',
  231. textField: 'Name',
  232. onLoadSuccess: function () {
  233. var val = $(this).combobox('getData');
  234. // ReSharper disable once MissingHasOwnPropertyInForeach
  235. for (var item in val[0]) {
  236. if (item === 'CheckProjectTypeID') {
  237. $(this).combobox('select', val[0][item]);
  238. }
  239. }
  240. }
  241. });
  242. }
  243. });
  244. }
  245. var chart;
  246. function LoadChart() {
  247. var chartType = $("#hid_ChartType").val();
  248. if (chartType === 'PIE') {
  249. chart = new Highcharts.Chart({
  250. chart: {
  251. renderTo: 'container',
  252. plotBorderColor:"rgba(255, 255, 255, 0)",
  253. events: {
  254. load: ChartQry
  255. },
  256. margin: [50, 200, 100, 80] //marginTop, marginRight, marginBottom and marginLeft
  257. },
  258. title: {
  259. text: $("#hid_ReportTitle").val(),
  260. style:{color: '#3C3C3C',
  261. fontSize: '22px',
  262. fontWeight:500,
  263. letterSpacing:"1px",
  264. marginTop:"10px"
  265. }
  266. },
  267. plotOptions: {
  268. pie: {
  269. allowPointSelect: true,
  270. cursor: 'pointer',
  271. dataLabels: {
  272. enabled: true,
  273. formatter: function() {
  274. return this.point.name + ' (' + Highcharts.numberFormat(this.percentage, 2) + '%)';
  275. },
  276. color: 'black',
  277. connectorColor: '#000000'
  278. },
  279. showInLegend: true
  280. }
  281. },
  282. legend: {
  283. align: 'right',
  284. verticalAlign: 'middle',
  285. layout: 'vertical',
  286. shadow: false,
  287. labelFormatter: function() {
  288. return this.name + '(' + this.y + ')';
  289. }/*,
  290. style: {
  291. left: 'auto',
  292. bottom: 'auto',
  293. right: '40px'
  294. //top: '10px'
  295. }*/
  296. },
  297. tooltip: {
  298. formatter: function() {
  299. return '<b>' + this.point.name + '</b>: ' + Highcharts.numberFormat(this.percentage, 1) + '% (' + Highcharts.numberFormat(this.y, 0, ',') + ' 个)';
  300. }
  301. },
  302. credits: {
  303. enabled: false
  304. },
  305. series: [{
  306. type: 'pie',
  307. data: [ ]
  308. }]
  309. });
  310. }
  311. else if (chartType === 'COLUMN') {
  312. chart = new Highcharts.Chart({
  313. chart: {
  314. renderTo: 'container',
  315. defaultSeriesType: 'column',
  316. plotBorderColor:"rgba(255, 255, 255, 0)",
  317. events: {
  318. load: ChartQry
  319. },
  320. margin: [50, 50, 100, 80]
  321. },
  322. title: {
  323. text: $("#hid_ReportTitle").val(),
  324. style:{color: '#3C3C3C',
  325. fontSize: '22px',
  326. fontWeight:500,
  327. letterSpacing:"1px",
  328. marginTop:"10px"
  329. }
  330. },
  331. xAxis: {
  332. categories: [],
  333. labels: {
  334. rotation: 0,
  335. align: 'center',
  336. style: {
  337. color: '#000000'
  338. //font: 'normal 13px Verdana, sans-serif'
  339. }
  340. }
  341. },
  342. yAxis: {
  343. min: 0,
  344. title: {
  345. text: ''
  346. }
  347. },
  348. legend: {
  349. // 只有一个series,就不要显示了
  350. enabled: false
  351. },
  352. tooltip: {
  353. // 鼠标移到柱上时显示内容
  354. formatter: function() {
  355. return '<b>' + this.x + '</b><br/>' + Highcharts.numberFormat(this.y, $("#hid_NumberFormat").val());
  356. }
  357. },
  358. plotOptions: {
  359. // 只有一个series,用不同的颜色显示各柱子
  360. series: {
  361. colorByPoint: true
  362. }
  363. },
  364. credits: {
  365. enabled: false
  366. },
  367. series: [{
  368. name: 'series0',
  369. data: [],
  370. dataLabels: {
  371. enabled: true,
  372. rotation: 0, // 旋转显示
  373. color: 'black',
  374. align: 'center',
  375. //x: 3,
  376. //y: 15,
  377. formatter: function() {
  378. // 直接在柱上显示数值
  379. return Highcharts.numberFormat(this.y,$("#hid_NumberFormat").val());
  380. }
  381. }
  382. }]
  383. });
  384. }
  385. else if (chartType === 'COMBO_DUALAXES') {
  386. chart = new Highcharts.Chart({
  387. chart: {
  388. renderTo: 'container',
  389. plotBorderColor:"rgba(255, 255, 255, 0)",
  390. events: {
  391. load: ChartQry
  392. }/*,
  393. zoomType: 'xy'*/
  394. },
  395. title: {
  396. text: $("#hid_ReportTitle").val(),
  397. style:{color: '#3C3C3C',
  398. fontSize: '22px',
  399. fontWeight:500,
  400. letterSpacing:"1px",
  401. marginTop:"10px"
  402. }
  403. },
  404. xAxis: [{
  405. categories: [],
  406. labels: {
  407. rotation: 0,
  408. align: 'center'
  409. }
  410. }],
  411. yAxis: [{ // Primary yAxis
  412. title: {
  413. text: null,
  414. margin: -70
  415. },
  416. // min设置为0可以使得合格率曲线看上去波动大一点
  417. //min:0,
  418. labels: {
  419. align: 'right',
  420. x:10,
  421. y:-2,
  422. formatter: function() {
  423. return Highcharts.numberFormat(this.value*100, 2) +'%';
  424. },
  425. //x: 0,
  426. style: {
  427. color: '#89A54E'
  428. }
  429. },
  430. opposite: false
  431. }, { // Secondary yAxis
  432. title: {
  433. text: null,
  434. margin: -20
  435. },
  436. gridLineWidth: 0, // 避免在点击legend后导致各grid线不对齐(HighCharts的bug)
  437. labels: {
  438. align: 'left',
  439. x:-10,
  440. y:-2
  441. },
  442. opposite: true // 坐标是否在正常位置的相反方向(水平轴正常在左边,垂直轴正常在下方)
  443. }],
  444. tooltip: {
  445. formatter: function() {
  446. if (this.series.name === '总检测数') {
  447. return ''+ this.x +': '+ this.y + '个';
  448. }
  449. else if (this.series.name === '合格率') {
  450. return ''+ this.x +': '+ Highcharts.numberFormat(this.y*100, 2) + '%';
  451. }
  452. return ''+ this.x +': '+ this.y + '个';
  453. }
  454. },
  455. legend: {
  456. verticalAlign: 'bottom',
  457. layout: 'horizontal',
  458. backgroundColor: '#FFFFFF'
  459. },
  460. credits: {
  461. enabled: false
  462. },
  463. series: [
  464. {
  465. name: '总检测数',
  466. color: '#4572A7',
  467. type: 'column',
  468. dataLabels: {
  469. enabled: true,
  470. rotation: 0, // 旋转显示
  471. color: 'black',
  472. align: 'center',
  473. formatter: function() {
  474. return Highcharts.numberFormat(this.y, 0);
  475. }
  476. },
  477. yAxis: 1, // 0表示对应chart.yAxis[0],1表示对应chart.yAxis[1]
  478. data: [] // HighChart.js在2.2以上的版本可以为空,后面ChartQry会以setData方式覆盖
  479. }, {
  480. name: '合格率',
  481. color: '#89A54E',
  482. type: 'spline',
  483. data: []
  484. }
  485. ]
  486. });
  487. }
  488. }
  489. function ChartQry() {
  490. var regionId = $("#SearchRegionID").combobox("getValue"),
  491. marketId = $("#SearchMarketID").combobox("getValue"),
  492. corpKind = $("#SearchCorpKind").combobox("getValue"),
  493. corpName = $("#SearchCorpName").textbox("getValue"),
  494. littleKindName = $("#SearchLittleKindName").combobox("getValue"),
  495. sampleName = $("#SearchSampleName").combotree("getValue"),
  496. checkProjectTypeId = $("#SearchCheckProjectTypeID").combobox("getValue"),
  497. produceUnit = $("#SearchProduceUnit").textbox("getValue"),
  498. topQty = $("#SearchTopQty").combobox("getValue"),
  499. order = "Desc",
  500. startTime = $('#SearchStartTime').val(),
  501. endTime = $('#SearchEndTime').val(),
  502. chartType = $("#hid_ChartType").val(),
  503. reportType = $("#hid_ReportType").val();
  504. if (topQty.indexOf("-") > -1) {
  505. order = "";
  506. topQty = topQty.replace("-", "");
  507. }
  508. console.log(topQty, order);
  509. $.ajax({
  510. url: '@Url.Action("DataChartsQryResult", "GetResult")', // 查询接口
  511. type: 'post',
  512. dataType: 'json', // 查询接口返回的数据类型
  513. timeout: 1000000, // 单位=毫秒。为了测试写成1000秒,正式环境下可改为20秒
  514. data: {
  515. RegionID: regionId,
  516. MarketID: marketId,
  517. StartTime: startTime,
  518. EndTime: endTime,
  519. CorpKind: corpKind,
  520. CorpName: corpName,
  521. LittleKindName: littleKindName,
  522. SampleName: sampleName,
  523. CheckProjectTypeID: checkProjectTypeId,
  524. ProduceUnit: produceUnit,
  525. ChartType: chartType,
  526. ReportType: reportType,
  527. TopQty: topQty,
  528. Order: order
  529. },
  530. success: function(data) {
  531. // 查询接口无数据返回
  532. if (CheckAajxData(data) === false) return;
  533. var count = eval(data.__totalcount);
  534. if (count === "" || count === null || count === "undefined" || count <= 0)
  535. return;
  536. if (chartType === 'PIE') {
  537. chart.series[0].setData(data.__data,false);
  538. chart.redraw();
  539. }
  540. else if (chartType === 'COLUMN') {
  541. chart.xAxis[0].setCategories(data.__categories);
  542. chart.series[0].setData(data.__series[0],false);
  543. chart.redraw();
  544. }
  545. else if (chartType === 'COMBO_DUALAXES') {
  546. chart.xAxis[0].setCategories(data.__categories);
  547. if (data.__series.length === 2) {
  548. chart.series[0].setData(data.__series[1],false);
  549. chart.series[1].setData(data.__series[0],false);
  550. chart.redraw();
  551. }
  552. }
  553. },
  554. // 捕获出错信息(服务器应答超时、返回数据不是json格式等,用于调试)
  555. error: function(xmlHttpRequest, textStatus) {
  556. layer.alert(textStatus, {icon:2, title: '提示信息' });
  557. },
  558. cache: false
  559. });
  560. };
  561. function ChartType()
  562. {
  563. var val=$('input[name="ChartType"]:checked').val();
  564. if (val === "COLUMN") {
  565. $("#hid_ChartType").val("COLUMN");
  566. $("#hid_NumberFormat").val("0");
  567. } else if (val === "PIE"){
  568. $("#hid_ChartType").val("PIE");
  569. $("#hid_NumberFormat").val("2");
  570. }
  571. LoadChart();
  572. }
  573. var start = {
  574. elem: "#StartTime",
  575. format: "YYYY-MM-DD",
  576. min: "2010-01-01",
  577. event: "focus",
  578. choose: function(datas) {
  579. end.min = datas; //开始日选好后,重置结束日的最小日期
  580. end.start = datas; //将结束日的初始值设定为开始日
  581. $('#SearchStartTime').val(datas);
  582. }
  583. };
  584. var end = {
  585. elem: "#EndTime",
  586. format: "YYYY-MM-DD",
  587. min: "2010-01-01",
  588. event: "focus",
  589. choose: function(datas) {
  590. start.max = datas; //结束日选好后,重置开始日的最大日期
  591. $('#SearchEndTime').val(datas);
  592. }
  593. };
  594. $(function () {
  595. $("#SearchStartTime").next("span").find("input").attr("id", "StartTime");
  596. $("#SearchEndTime").next("span").find("input").attr("id", "EndTime");
  597. $("#SearchStartTime").textbox("setValue", laydate.now(-30, 'YYYY-MM-DD'));
  598. $("#SearchEndTime").textbox("setValue", laydate.now(0, 'YYYY-MM-DD'));
  599. if ($("#hid_IsMarketSysAccount").val() === "0") {
  600. $("#SearchRegionID").combobox("setValue", @ViewBag.RegionID).combobox("disable");
  601. $("#SearchMarketID").combobox("setValue", $("#hid_MarketID").val()).combobox("disable");
  602. }
  603. GetMarketSelStr();
  604. GetLittleKindSelStr();
  605. //GetCheckProjectSelStr();
  606. //加载图表数据
  607. LoadChart();
  608. //加载日历控件
  609. laydate(start);
  610. laydate(end);
  611. });
  612. </script>
  613. </body>
  614. </html>