123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471 |
- @extends('admin/site/side_layout')
- @section('header_extend')
- <style>
- .tabs-container .tab-content .lists {
- height: 0;
- overflow: hidden;
- }
- .tabs-container .tab-content .lists.active {
- height: auto;
- }
- </style>
- @endsection
- @section('right')
- @php $hasEdit=0; @endphp
- @hasAuth('sites-report-edit')
- @php $hasEdit=1; @endphp
- @endHasAuth
- @hasAuth('sites-report-edit')
- <div style="padding-bottom: 20px">
- <button type="button" class="btn btn-info" onclick="units.report()">月报</button>
- <button type="button" class="btn btn-primary" onclick="units.afresh()">重新生成</button>
- <button type="button" class="btn btn-success" onclick="units.clearLastMonthData()" >清除上月数据</button>
- </div>
- @endHasAuth
- <div class="tabs-container">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true"> 外链文章</a>
- </li>
- <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">月度总结</a>
- </li>
- <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">合同</a>
- </li>
- </ul>
- <div class="tab-content">
- <div id="tab-1" class="lists active">
- <form id="customer">
- <div class="form-group">
- <label class="control-label">外链数量</label>
- <div class="input-group">
- @foreach($sixMonth as $val)
- <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
- <input type="text" class="form-control" title=""
- name="linkCount"
- value="{{$keyCustomList[$val]->link_count ?? ''}}">
- @endforeach
- </div>
- </div>
- <hr class="line">
- <div class="form-group">
- <label class="control-label">文章数量</label>
- <div class="input-group">
- @foreach($sixMonth as $val)
- <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
- <input type="text" class="form-control"
- name="articleCount" title=""
- value="{{$keyCustomList[$val]->article_count ?? '' }}">
- @endforeach
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- @if($hasEdit)
- <button class="btn btn-primary" type="button"
- onclick="units.customerSave();">
- 保存
- </button>
- @endif
- {{--<button class="btn btn-white closeLayer" type="button">取消</button>--}}
- </div>
- </div>
- </form>
- </div>
- <div id="tab-2" class="lists">
- <table width="100%" class="table table-datalist" data-plugin="chk-group" id="table">
- <thead>
- <tr>
- <td style="text-indent: 20px">优化事项</td>
- <td style="text-indent: 15px">引擎力项目经理</td>
- <td style="text-indent: 15px">客户</td>
- <td style="width: 80px;text-align: center" onclick="units.add(this)"><span
- class="glyphicon glyphicon-plus"></span></td>
- </tr>
- </thead>
- <tbody>
- @foreach ($summaryList as $item)
- <tr>
- <td><textarea cols="30" rows="2" name="val1" title="">{{$item->val1}}</textarea></td>
- <td><textarea cols="30" rows="2" name="val2" title="">{{$item->val2}}</textarea></td>
- <td><textarea cols="30" rows="2" name="val3" title="">{{$item->val3}}</textarea></td>
- <td style="width:80px;text-align:center;padding-top:20px" onclick="units.remove(this)">
- <span class="glyphicon glyphicon-minus"></span>
- <input type="hidden" name="summaryId" value="{{$item->id}}">
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <br>
- <textarea style="width: 100%;" rows="6" id="remark" name="remark"
- title="">{{$reportExtend->remark??''}}</textarea>
- @php $selectItems=json_decode($reportExtend->select_item??null,true)??[] @endphp
- @php
- $manageList=$selectItems['manage']??[];
- $customerList=$selectItems['customer']??[];
- @endphp
- <div style="margin-top: 10px">
- <h3>项目经理勾选内容:</h3>
- <div>
- @php $str="网站数据呈平稳上升趋势,将持续推进优化工作。" @endphp
- <input type="checkbox" value="{{$str}}" name="selectManage"
- @if (in_array($str,$manageList)) checked @endif>
- {{$str}}
- </div>
- <div>
- @php $str="网站数据中个别指标有所波动,属于正常现象,我们将持续推进优化工作,使数据平稳上升。" @endphp
- <input type="checkbox" value="{{$str}}" name="selectManage"
- @if (in_array($str,$manageList)) checked @endif>
- {{$str}}
- </div>
- <div>
- @php $str="网站数据波动比较大,正在查找原因,下一步将调整优化方案加强优化。" @endphp
- <input type="checkbox" value="{{$str}}" name="selectManage"
- @if (in_array($str,$manageList)) checked @endif>
- {{$str}}
- </div>
- <br>
- <h3>客户配合:</h3>
- <div>
- @php $customerStr="尽量提供企业、行业、产品相关资讯继信息进行站内更新,形式可以多样:video,pdf,images等。" @endphp
- <input type="checkbox" value="{{$customerStr}}"
- name="selectCustomer" @if (in_array($customerStr,$customerList)) checked @endif>
- {{$customerStr}}
- </div>
- <div>
- @php $customerStr="可以登陆quora平台,参与评论互动,每月3-5条为宜。" @endphp
- <input type="checkbox" value="{{$customerStr}}" name="selectCustomer"
- @if (in_array($customerStr,$customerList)) checked @endif>
- {{$customerStr}}
- </div>
- <div>
- @php $customerStr="发送营销邮件,刺激客户点击访问网站" @endphp
- <input type="checkbox" value="{{$customerStr}}" name="selectCustomer"
- @if (in_array($customerStr,$customerList)) checked @endif>
- {{$customerStr}}
- </div>
- <div>
- @php $customerStr="多与已有网站、合作伙伴、上下游客户进行友情链接" @endphp
- <input type="checkbox" value="{{$customerStr}}" name="selectCustomer"
- @if (in_array($customerStr,$customerList)) checked @endif>
- {{$customerStr}}
- </div>
- <div>
- @php $customerStr="邮件给客户公司的社交主页,让客户关注,让公司员工注册对应社交并关注公司主页,日常互动。" @endphp
- <input type="checkbox" value="{{$customerStr}}"
- name="selectCustomer" @if (in_array($customerStr,$customerList)) checked @endif>
- {{$customerStr}}
- </div>
- </div>
- <div id="fileDiv">
- @if($hasEdit)
- <button type="button" class="btn btn-primary" name="file_upload"
- style="float: left;margin-top: 5px;margin-right:10px;" onclick="units.triggerFile()">
- 文件上传
- </button>
- @endif
- <input type="file" value="" style="display: none" name="uploadFile" id="uploadFile"
- onchange="units.fileUpload(this)">
- @if (!empty($reportExtend->file_list))
- @php $viewFileList = json_decode($reportExtend->file_list, true); @endphp
- @foreach ($viewFileList as $item)
- <div class="input-group input-group-sm"
- style="width: 180px;padding-top:5px;float:left;">
- <span class="input-group-addon"><span
- class="glyphicon glyphicon-remove" onclick="units.removeFile(this)"></span></span>
- <input type="text" class="form-control" name="fileTitle" title=""
- value="{{$item['fileTitle']}}">
- <input type="hidden" class="form-control" name="fileVal" value="{{$item['fileVal']}}">
- </div>
- @endforeach
- @endif
- </div>
- <div>
- @if($hasEdit)
- <button class="btn btn-primary" type="button"
- onclick="units.summarySave()">
- 保存
- </button>
- @endif
- </div>
- @foreach($reportExtendList as $item)
- <hr>
- <div>
- <span style="font-weight: bold">月份:{{$item->ym}}</span>
- <br>
- @php $nowSummary= $reportSummaryList[$item->ym]??[]; @endphp
- @if($nowSummary)
- <table width="80%">
- <thead>
- <tr>
- <td>优化事项</td>
- <td>引擎力项目经理</td>
- <td>客户</td>
- </tr>
- @foreach($nowSummary as $val)
- <tr>
- <td>{{$val['val1']}}</td>
- <td>{{$val['val2']}}</td>
- <td>{{$val['val3']}}</td>
- </tr>
- @endforeach
- </thead>
- </table>
- <br>
- @endif
- <p>
- {!! $item->remark !!}
- </p>
- </div>
- @endforeach
- </div>
- <div id="tab-3" class="tab-pane fade">
- <br>
- <form id="contract" class="form-horizontal">
- <div class="form-group">
- <label class="control-label col-sm-2" for="keyNum">关键词合同数:</label>
- <div class="col-sm-8">
- <input type="number" class="form-control" id="keyNum"
- value="{{$contractList->key_num??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-2" for="articleNum">软文合同数:</label>
- <div class="col-sm-8">
- <input type="number" class="form-control" id="articleNum"
- value="{{$contractList->article_num??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-2" for="linkNum">营销合同数:</label>
- <div class="col-sm-8">
- <input type="number" class="form-control" id="linkNum"
- value="{{$contractList->link_num??''}}">
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- @if($hasEdit)
- <button class="btn btn-primary" type="button"
- onclick="units.contractSave();">
- 保存
- </button>
- @endif
- {{--<button class="btn btn-white closeLayer" type="button">取消</button>--}}
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- @endsection
- @section('footer_extend')
- <script>
- var units = {
- customerSave: function () {
- var linkCount = [], articleCount = [], sixMonth, data = {};
- $("[name=linkCount]").each(function () {
- linkCount.push($(this).val());
- });
- $("[name=articleCount]").each(function () {
- articleCount.push($(this).val());
- });
- sixMonth = JSON.parse('{!! json_encode($sixMonth) !!}');
- $.each(sixMonth, function (inx, val) {
- data[val] = {linkCount: linkCount[inx], articleCount: articleCount[inx]}
- });
- var ajaxConfig = {
- url: '/admin/site/' + "{{$data->old_id}}" + '/report/customer',
- type: 'put',
- data: {ymMapData: data}
- };
- tips.ajax(ajaxConfig);
- },
- contractSave: function () {
- var ajaxConfig = {
- url: '/admin/site/' + "{{$data->old_id}}" + '/report/contract',
- type: 'put',
- data: {
- key_num: $("#keyNum").val(),
- article_num: $("#articleNum").val(),
- link_num: $("#linkNum").val()
- }
- };
- tips.ajax(ajaxConfig);
- },
- summarySave: function () {
- var dataList = [];
- var val1, val2, val3;
- $("#table").find("tbody").find("tr").each(function () {
- val1 = $(this).find("[name=val1]").val();
- val2 = $(this).find("[name=val2]").val();
- val3 = $(this).find("[name=val3]").val();
- if (val1 || val2 || val3) {
- dataList.push({
- summaryId: $(this).find("[name=summaryId]").val(),
- val1: val1,
- val2: val2,
- val3: val3
- });
- }
- });
- var fileList = [];
- $("#fileDiv").find("div").each(function () {
- fileList.push({
- fileTitle: $(this).find("[name=fileTitle]").val(),
- fileVal: $(this).find("[name=fileVal]").val()
- });
- });
- var selectManageList = [];
- $("[name=selectManage]:checked").each(function () {
- selectManageList.push($(this).val());
- });
- var selectCustomerList = [];
- $("[name=selectCustomer]:checked").each(function () {
- selectCustomerList.push($(this).val());
- });
- var ajaxConfig = {
- url: '/admin/site/' + "{{$data->old_id}}" + '/report/summary',
- type: 'put',
- data: {
- dataList: dataList,
- remark: $("#remark").val(),
- fileList: fileList,
- selectManageList: selectManageList,
- selectCustomerList: selectCustomerList
- }
- };
- tips.ajax(ajaxConfig);
- },
- add: function (_this) {
- $(_this).parent().parent().next().append(units.makeHtml());
- },
- remove: function (_this) {
- $(_this).parent().remove();
- },
- makeHtml: function () {
- return '<tr>' +
- '<td><textarea cols="30" rows="2" name="val1"></textarea></td>' +
- '<td><textarea cols="30" rows="2" name="val2"></textarea></td>' +
- '<td> ' +
- '<textarea cols="30" rows="2" name="val3" style="float:left"></textarea>' +
- '</td>' +
- '<td class="cut" style="width:80px;text-align:center;padding-top:20px" onclick="units.remove(this)">' +
- '<span class="glyphicon glyphicon-minus"></span>' +
- '<input type="hidden" name="summaryId" value="0">' +
- '</td>' +
- '</tr>';
- },
- triggerFile: function () { //文件上传
- $("#uploadFile").trigger('click');
- },
- fileUpload: function (_this) {
- var config = {
- url: '/admin/tool/upload'
- };
- config.success = function (result) {
- layer.msg(result.message, {icon: 6, time: 1500});
- $("#fileDiv").append(units.makeFileHtml(result.data.original_name, result.data.file_url));
- };
- tips.fileUpload(_this, config);
- },
- makeFileHtml: function (fileTitle, fileVal) {
- if (!fileTitle) {
- fileTitle = '';
- }
- if (!fileVal) {
- fileVal = '';
- }
- return '<div class="input-group input-group-sm" style="width: 180px;padding-top:5px;float:left;">' +
- '<span class="input-group-addon"><span class="glyphicon glyphicon-remove" onclick="units.removeFile(this)"></span></span>' +
- '<input type="text" class="form-control" name="fileTitle" value="' + fileTitle + '">' +
- '<input type="hidden" class="form-control" name="fileVal" value="' + fileVal + '">' +
- '</div>';
- },
- removeFile: function (_this) {
- $(_this).parent().parent().remove();
- },
- report: function () {
- window.open('https://rank.yinqingli.cn/webmaster/report?projectId=' + "{{base64_encode($data->old_id)}}");
- },
- afresh: function () {
- window.open('https://rank.yinqingli.cn/webmaster/report?noCache=1&projectId=' + "{{base64_encode($data->old_id)}}");
- },
- clearLastMonthData: function () {
- var ajaxConfig = {
- url: '/admin/site/clearLastMonthData/{{$siteId}}',
- type: 'get',
- success: function () {
- layer.msg('操作成功', {
- icon: 1,
- time: 1500 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- window.location.reload()
- });
- }
- };
- tips.ajax(ajaxConfig);
- },
- };
- </script>
- @endsection
|