| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>市场信息简报</title>
- <!--[if lt IE 9]>
- <meta http-equiv="refresh" content="0;ie.html" />
- <![endif]-->
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../js/layui/css/layui.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <script src="../js/laydate/laydate.js"></script>
- <style>
- .zxt-top {
- background: #fefefe;
- height: 60px;
- padding: 10px 20px;
- }
-
- .topCon {
- float: right;
- margin-right: 45px;
- }
-
- .zxt-content {
- width: 90%;
- margin: 20px auto 0 auto;
- }
- .select2-container--default .select2-selection--single{
- border-color: #e5e6e7;
- }
- .time-box select{
- height: 32px;
- line-height: 32px;
- }
- .time-box select option{
- line-height: 32px;
- }
- .Shows {
- display: block !important;
- }
-
- .complain {
- display: none;
- }
-
- .daoHang {
- margin-bottom: 15px;
- }
-
-
- #main {
- width: 788.8px;
- margin: 0 auto;
- margin-top: 20px;
- -webkit-box-shadow: 1px 1px 9px 2px #D2D2D2;
- box-shadow: 1px 1px 9px 2px #D2D2D2;
- background-color: #fff;
- padding: 30px 60px 80px 60px;
- }
-
- .alignC {
- text-align: center;
- }
-
- .alignC h2 {
- font-family: "宋体";
- font-weight: bold;
- font-size: 22pt;
- letter-spacing: -1px;
- }
-
- .headerAlign h3 div:nth-of-type(1) {
- font-size: 14pt;
- padding-top: 20px;
- text-align: left;
- font-weight: normal;
- margin-left: 48px;
- }
-
- #main table {
- margin: 0 auto;
- width: 600px;
- border-collapse: collapse;
- font-size: 13pt;
- font-family: "仿宋";
- }
-
- #main table tr {
- min-height: 49px;
- }
-
- tbody td {
- min-width: 10%;
- padding: 6px 0 6px 0;
- }
-
- .alignC .tableHead {
- text-align: center;
- padding-left: 10px;
- font-weight: 600;
- }
-
- .btn {
- margin-top: 4px;
- margin-bottom: 4px;
- background: #00a1cb;
- color: #fff;
- }
-
- .time-box {
- display: inline-block;
- position: relative;
- }
-
- .toolLeft input {
- padding-right: 30px;
- width: 150px;
- }
-
- .tub {
- position: absolute;
- right: 8px;
- top: 5px;
- font-size: 18px;
- color: #00a0ca;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn>
- <i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="javaScript:;">报表分析</a>>
- <a href="javaScript:;">业务数据分析</a>>
- <a href="" class="nowPosition">市场信息简报</a>
- </sapn>
- </div>
- <div class="dhRight">
- <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div class="wrapper wrapper-content">
-
- <div class="Content_box">
- <div class="complain Shows">
- <div class="tab-content">
- <div class="tab-pane fade active in">
- <div class="zxt-top clearfix">
- <div class="topCon">
- <div class="form-inline th-bar clearfix">
- <div class="time-box form-group">
- <i class="tub fa fa-calendar"></i>
- <input class="form-control" type="text" id="startTime" placeholder="请选择时间" style="width: 228px;">
- </div>
- <div class="form-group tool_bars pull-right">
- <button class="btns sear">搜索</button>
- <a class="btns export">导出</a>
- </div>
- </div>
- </div>
- </div>
-
- <!--startprint1-->
- <div id="main">
- <div class="alignC headerAlign">
- <br />
- <h2 style="margin-bottom: 15px;">市场信息简报</h2>
- </div>
- <table id="weeklist" class="alignC" border="1" cellpadding="4" cellspacing="0" bordercolor="#cbcbcb">
-
- </table>
- </div><!--endprint1-->
- </div>
- </div>
- </div>
- </div>
- </div>
-
-
- <script>
- $(document).ready(function () {
- laydate.render({
- elem: '#startTime',
- range: '~',
- theme: '#1ab394',
- calendar: 'true'
- });
- initTableBrief();
-
- var myDate = new Date();
- $('#startTime').val(myDate.getFullYear() + "-" + turn(myDate.getMonth() + 1) + "-" + "01" + " ~ " + myDate.getFullYear() + "-" + turn(myDate.getMonth() + 1) + "-" + turn(myDate.getDate()));
- function turn(aa) {
- if(aa < 10) {
- aa = "0" + aa;
- }
- return aa;
- }
- })
- //表格
- function initTableBrief(brieftype) {
- $.getJSON(huayi.config.callcenter_url + 'Business/MarketInformation', {
- sdate: $('#startTime').val() ? $('#startTime').val().split('~')[0]:"",
- edate: $('#startTime').val() ? $('#startTime').val().split('~')[1]:"",
- token: $.cookie("token")
- }, function (result) {
- if (result.state.toLowerCase() == "success") {
- var content = result.rows;
- $('#weeklist').html('');
- $("#weeklist").append(
- '<tr><td colspan="8"><h3>时间:<span class="startTimeBrief">-</span><span>至</span><span class="endTimeBrief">-</span></h3></td></tr>'+
- '<tr><td colspan="8" class="tableHead">产品投诉情况</td></tr>'
- )
-
- // 产品投诉
- for (var i=0; i < content.product.length; i+=2) {
- if(content.product[i+1] == undefined) {
- $("#weeklist").append(
- '<tr>'+
- '<td width="20%">'+
- content.product[i].name +
- '</td>'+
- '<td width="15%">'+
- '<span>'+
- content.product[i].number +
- '</span>'+
- '</td>'+
- '<td width="15%">'+
- '<span>'+
- content.product[i].Proportion +
- '</span>'+
- '</td>'+
- '<td width="20%">'+
- '</td>'+
- '<td width="15%">'+
- '<span>'+
- '</span>'+
- '</td>'+
- '<td width="15%">'+
- '<span>'+
- '</span>'+
- '</td>'+
- '</tr>'
- )
- } else {
- $("#weeklist").append(
- '<tr>'+
- '<td width="20%">'+
- content.product[i].name +
- '</td>'+
- '<td width="15%">'+
- '<span>'+
- content.product[i].number +
- '</span>'+
- '</td>'+
- '<td width="15%">'+
- '<span>'+
- content.product[i].Proportion +
- '</span>'+
- '</td>'+
- '<td width="20%">'+
- content.product[i+1].name +
- '</td>'+
- '<td width="15%">'+
- '<span>'+
- content.product[i+1].number +
- '</span>'+
- '</td>'+
- '<td width="15%">'+
- '<span>'+
- content.product[i+1].Proportion +
- '</span>'+
- '</td>'+
- '</tr>'
- )
- }
- }
- $("#weeklist").append(
- '<tr><td colspan="8">服务投诉情况</td></tr>'+
- '<tr><td colspan="8">涉媒投诉</td></tr>'+
- '<tr><td>'+ content.sediainvolved.name + '</td><td><span>'+ content.sediainvolved.number + '</span></td><td><span>'+content.sediainvolved.Proportion + '</span></td><td colspan="4"></td></tr>'+
- '<tr><td colspan="8" class="tableHead">市场抽检</td></tr>'+
- '<tr><td colspan="8" class="tableHead">其他信息</td></tr>'
- )
- addTime();
- }
- })
- }
-
- //搜索
- $(".sear").click(function () {
- initTableBrief();
- });
- //按回车搜索
- document.onkeydown = function (e) { // 回车提交表单
- var theEvent = window.event || e;
- var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
- if (code == 13) {
- initTableBrief();
- }
- }
- //导出
- $(".export").click(function () {
- var url = huayi.config.callcenter_url + "Business/MarketInformation?token=" + $.cookie("token");
- url += "&sdate=" + ($('#startTime').val() ? $('#startTime').val().split('~')[0] : '') + "&edate=" + ($('#startTime').val() ? $('#startTime').val().split('~')[1] : '') + "&isdc=1";
- $(".export").attr('href', url);
- });
- //添加时间
- function addTime() {
- var addStartTime = $('#startTime').val() ? $('#startTime').val().split('~')[0] : '';
- var addEndTime = $('#startTime').val() ? $('#startTime').val().split('~')[1] : '';
- $('.startTimeBrief' + '').html(addStartTime);
- $('.endTimeBrief' + '').html(addEndTime);
- }
- </script>
- </body>
- </html>
|