123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
- {{--<link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">--}}
- <link href="{{asset('css/plugins/iCheck/custom.css')}}" rel="stylesheet">
- <style>
- .textAlignLeft {
- text-align: left !important;
- font-weight: normal;
- }
- .demo {
- text-align: center;
- /*position: fixed;*/
- }
- body {
- position: relative;
- }
- .ibox-title {
- background: #f3f3f4;
- }
- .ibox-title.ons {
- width: 100%;
- position: fixed;
- right: 0px;
- top: 0;
- z-index: 2000;
- padding: 20px 20px 0;
- }
- .ibox-title .boxss {
- width: 100%;
- }
- </style>
- @endsection
- @section('content')
- <body class="gray-bg">
- <div class="row">
- <div class="col-sm-12" style="height: 64px;">
- <div class="ibox-title demo" id="ibox-title-boxs" style="padding-bottom: 2px;">
- <div class="boxss">
- @notCustomer
- @if(($data->status??null)==3) {{--待审核 --}}
- <button class="btn btn-success" type="button" onclick="units.pass()">审核通过</button>
- <button class="btn btn-info" type="button" onclick="units.doScore()">打分</button>
- <button class="btn btn-warning" type="button" onclick="units.passFail()">审核失败</button>
- <button class="btn btn-info" type="button" onclick="units.check404()">404检查</button>
- {{--<label><input type="checkbox" onclick="units.chkToggle(this)" class="i-checks"--}}
- {{--id="showCHkToggle">演示地址全选反选</label>--}}
-
- <label><input type="checkbox" class="i-checks" id="showCHkToggle">演示地址全选反选</label>
- <button class="btn btn-success" type="button" onclick="units.urlPass()">链接审核通过</button>
- <button class="btn btn-warning" type="button" onclick="units.urlPassFail()">链接审核失败</button>
- @endif
- <button class="btn btn-primary" type="button" onclick="units.openUrl()">打开链接</button>
- @endNotCustomer
- <button class="btn btn-default closeLayer" type="button">关闭页面</button>
- </div>
- </div>
- </div>
- </div>
- <div class="wrapper wrapper-content animated fadeInRight" style="padding-top: 0px;">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins" style="padding-top: 0;margin-top: 0;">
- <div class="ibox-content">
- <form method="get" class="form-horizontal" id="form">
- <div class="form-group">
- <label class="col-sm-2 control-label">标题:</label>
- <label class="col-sm-10 control-label textAlignLeft">{{$data->title??''}}</label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">兼职人员:</label>
- <label
- class="col-sm-10 control-label textAlignLeft">{{$data->worker->username??''}}</label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">站点名称:</label>
- <label
- class="col-sm-10 control-label textAlignLeft">{{$data->site->cn_title??''}}</label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">状态:</label>
- <label class="col-sm-10 control-label textAlignLeft">{{$data->status_text}}</label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">需求:</label>
- <div class="col-sm-10 textAlignLeft">
- {!! $data->demand??'' !!}
- </div>
- </div>
- @foreach($data->links as $link)
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label">外链库地址:</label>
- <label class="col-sm-10 control-label textAlignLeft">
- {{$link->url??''}}
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">用户名:</label>
- <label class="col-sm-10 control-label textAlignLeft">
- {{$link->pivot->username??''}}
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">密码:</label>
- <label class="col-sm-10 control-label textAlignLeft">
- {{$link->pivot->password??''}}
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">邮箱:</label>
- <label class="col-sm-10 control-label textAlignLeft">
- {{$link->pivot->email??''}}
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">profile演示地址:</label>
- <label class="col-sm-10 control-label textAlignLeft">
- {{--<input type="checkbox" class="i-checks">--}}
- {{$link->pivot->url??''}}
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">备注:</label>
- <label class="col-sm-10 control-label textAlignLeft">
- {{$link->pivot->remark??''}}
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">外链备注:</label>
- <label class="col-sm-10 control-label textAlignLeft">
- {{$link->remark??''}}
- </label>
- </div>
- @php $showUrls =$idMapUrls[$link->pivot->id]??[]; @endphp
- <div class="url-check">
- @foreach($showUrls as $key=>$item)
- <div class="form-group">
- @if($key==0)
- <label class="col-sm-2 control-label" for="url">
- <input type="checkbox" class="i-checks" name="localToggle">
- 演示地址:
- </label>
- @endif
- <div
- class="col-sm-10 control-label textAlignLeft @if($key!=0) col-sm-offset-2 @endif">
- <input type="checkbox" name="show_url" value="{{$item['id']}}"
- class="i-checks" data-href="{{$item['url']??''}}">
- {{--<span>网址:{{$item['url']??''}}</span>--}}
- <span>网址:<input type="text" value="{{$item['url']??''}}"
- class="form-control"
- style="width:320px;display: inline-block"> <button
- class="btn btn-info" type="button"
- onclick='units.urlSave("{{$item['id']}}",this)'>保存</button> </span>
- <span
- style="margin-left: 15px;font-weight: bold">网址状态:
- {{\App\Http\Models\LinkTaskUrl::VALID_STATUS_TITLE[$item['valid_status']]??''}}
- </span>
- <span style="margin-left: 5px;font-weight: bold">
- 审核状态:
- @if(($item['status']??'')==4) {{--未通过--}}
- <b style="color: red">{{\App\Http\Models\LinkTaskUrl::STATUS_TITLE[$item['status']]??''}}</b>
- @elseif(($item['status']??'')==5) {{--已通过--}}
- <b style="color: #2A94E0">{{\App\Http\Models\LinkTaskUrl::STATUS_TITLE[$item['status']]??''}}</b>
- @else
- <b>{{\App\Http\Models\LinkTaskUrl::STATUS_TITLE[$item['status']]??''}}</b>
- @endif
- </span>
- @if($item['status']==4)
- <span>审核原因:{{$item['audit_reason']}}</span>@endif
- </div>
- </div>
- @endforeach
- </div>
- @endforeach
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- @if(($data->status??null)==3)
- <button class="btn btn-primary" type="button"
- onclick="units.save({{$data->id??0}})">
- 保存
- </button>
- @endif
- <button class="btn btn-white closeLayer" type="button">取消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- <div class="ibox-content" id="no-pass" style="display: none">
- <form class="form-horizontal">
- <div class="form-group">
- <div class="col-sm-12">
- <select class="form-control" onchange="units.fillReason(this)">
- <option value="">请选择</option>
- <option value="非常满意">非常满意</option>
- <option value="满意">满意</option>
- <option value="不满意">不满意</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-12">
- <textarea class="form-control" style="height: 200px" title=""></textarea>
- </div>
- </div>
- </form>
- </div>
- <div class="ibox-content" id="scoreDiv" style="display: none">
- <table class="table">
- <thead>
- <tr>
- <td>考核指标12</td>
- <td>分数</td>
- <td>操作</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>头像是否处理</td>
- <td data-max="3">{{$taskScore->avatar??3}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,3)">-3</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- <tr>
- <td>用户名是否用客户域名</td>
- <td data-max="2">{{$taskScore->custom_domain??2}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- <tr>
- <td>是否填写客户公开联系方式</td>
- <td data-max="2">{{$taskScore->custom_link??2}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- <tr>
- <td>简介是否上传完整</td>
- <td data-max="2">{{$taskScore->intro??2}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- <tr>
- <td>锚文本正确率</td>
- <td data-max="8">{{$taskScore->anchor??8}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,3)">-3</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- <tr>
- <td>官网链接是否填写</td>
- <td data-max="4">{{$taskScore->official_website??4}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,3)">-3</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- <tr>
- <td>产品图片是否上传,是否清晰</td>
- <td data-max="4">{{$taskScore->product_img??4}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,3)">-3</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- <tr>
- <td>备注是否有按要求填写</td>
- <td data-max="2">{{$taskScore->note??2}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- <tr>
- <td>除预发布以外产品演示地址是否正确</td>
- <td data-max="3">{{$taskScore->show_url??3}}</td>
- <td>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,1)">-1</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,2)">-2</button>
- <button type="button" class="btn btn-warning" onclick="units.cutScore(this,3)">-3</button>
- <button type="button" class="btn btn-success" onclick="units.resetScore(this)"><span
- class="glyphicon glyphicon-repeat"></span></button>
- </td>
- </tr>
- </tbody>
- <tfoot>
- <tr>
- <td colspan="3" style="text-align: center"><h3>{{$taskScore->total??30}}</h3></td>
- </tr>
- </tfoot>
- </table>
- </div>
- @endsection
- @section('footer')
- <script src="{{asset('js/plugins/iCheck/icheck.min.js')}}"></script>
- <script>
- $(function () {
- $(".i-checks").iCheck({checkboxClass: "icheckbox_square-green", radioClass: "iradio_square-green"});
- });
- $("#showCHkToggle").on('ifChecked', function (event) {
- $("[name=show_url]").iCheck('check');
- }).on('ifUnchecked', function () {
- $("[name=show_url]").iCheck('uncheck');
- });
- //演示地址 局部全选反选
- $("[name=localToggle]").on('ifChecked', function (event) {
- $(this).parentsUntil(".url-check").parent().iCheck('check');
- }).on('ifUnchecked', function () {
- $(this).parentsUntil(".url-check").parent().find("[name=show_url]").iCheck('uncheck');
- });
- var units = {
- urlSave: function (urlId, _this) {
- var urlVal = $(_this).prev().val();
- console.log(urlId);
- if (urlVal == "") {
- layer.alert("地址不能为空", {icon: 5});
- return;
- }
- var ajaxConfig = {
- url: '/admin/link/url/' + urlId,
- type: 'put',
- data: {url: urlVal},
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 750})
- }
- };
- tips.ajax(ajaxConfig);
- },
- getCheckBoxUrl: function () {
- var data = [];
- $("[name=show_url]:checked").each(function () {
- data.push($(this).data('href'));
- });
- return data;
- },
- getCheckBox: function () {
- var data = [];
- $("[name=show_url]:checked").each(function () {
- data.push($(this).val());
- });
- return data;
- },
- check404: function () {
- var url = '/admin/link/check404/' + "{{$data->id??''}}";
- var ajaxConfig = {
- url: url,
- type: 'get',
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- window.location.reload();
- });
- }
- };
- tips.ajax(ajaxConfig);
- },
- openUrl: function () {
- var urlList = units.getCheckBoxUrl();
- $.each(urlList, function (inx, val) {
- if (val.indexOf('http') === -1) {
- window.open('http://' + val);
- } else {
- window.open(val);
- }
- });
- },
- urlPass: function () {
- var chk = units.getCheckBox();
- if (chk.length === 0) {
- layer.alert('请先选择您所要操作的对象', {icon: 0});
- return;
- }
- layer.confirm('您确定要审核通过吗?', {icon: 3, title: '审核操作'}, function () {
- var ajaxConfig = {
- url: '/admin/link/task/url-pass',
- type: 'put',
- data: {urlIds: chk},
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- window.location.reload();
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- },
- doScore: function () {
- var inx = layer.open({
- type: 1,
- content: $('#scoreDiv'),
- title: '打分',
- area: ['500px', '650px'],
- btn: ['确认', '取消'],
- yes: function (index, layero) {
- var total = 0, tempVal, data = {};
- var inxMap = ['avatar', 'custom_domain', 'custom_link', 'intro', 'anchor', 'official_website', 'product_img', 'note', 'show_url'];
- $(layero).find("tbody td:nth-child(2)").each(function (inx, item) {
- tempVal = parseInt($(item).text());
- total += tempVal;
- data[inxMap[inx]] = tempVal;
- });
- data.total = total;
- var ajaxConfig = {
- url: '/admin/link/tasks/score/{{$data->id}}',
- type: 'post',
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- layer.close(inx);
- });
- }
- };
- tips.ajax(ajaxConfig);
- }
- });
- },
- countTotalScore: function (_this) {
- var total = 0;
- var tBodyObj = $(_this).parent().parent().parent();
- tBodyObj.find("td:nth-child(2)").each(function (inx, item) {
- total += parseInt($(item).text());
- });
- tBodyObj.next().find("h3").text(total);
- },
- cutScore: function (_this, val) {
- var scoreObj = $(_this).parent().prev();
- var score = scoreObj.text();
- if (score > 0) {
- var result = score - val;
- scoreObj.text(result > 0 ? result : 0);
- units.countTotalScore(_this);
- }
- },
- resetScore: function (_this) {
- var scoreObj = $(_this).parent().prev();
- var maxScore = scoreObj.data('max');
- scoreObj.text(maxScore);
- units.countTotalScore(_this);
- },
- pass: function () {
- layer.confirm('您确定要审核通过吗?', {icon: 3, title: '审核操作'}, function () {
- var ajaxConfig = {
- url: '/admin/link/tasks/pass',
- type: 'put',
- data: {taskId: "{{$data->id??''}}"},
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- parent.window.tips.tableRefresh('#table');
- tips.closeParentLayer();
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- },
- passFail: function () {
- layer.open({
- type: 1,
- content: $('#no-pass'),
- title: '审核操作',
- area: ['400px', '400px'],
- btn: ['确认', '取消'],
- yes: function (index, layero) {
- var fail_reason = $(layero).find("textarea").val();
- var ajaxConfig = {
- url: '/admin/link/tasks/pass-fail',
- type: 'put',
- data: {taskId: "{{$data->id??''}}", audit_reason: fail_reason, status: status},
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- parent.window.tips.tableRefresh('#table');
- layer.close(index);
- });
- }
- };
- tips.ajax(ajaxConfig);
- }
- });
- },
- urlPassFail: function () {
- var chk = units.getCheckBox();
- if (chk.length === 0) {
- layer.alert('请先选择您所要操作的对象', {icon: 0});
- return;
- }
- layer.open({
- type: 1,
- content: $('#no-pass'),
- title: '审核操作',
- area: ['400px', '400px'],
- btn: ['确认', '取消'],
- yes: function (index, layero) {
- var fail_reason = $(layero).find("textarea").val();
- var ajaxConfig = {
- url: '/admin/link/task/url-pass-fail',
- type: 'put',
- data: {urlIds: chk, audit_reason: fail_reason},
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- // parent.window.tips.tableRefresh('#table');
- layer.close(index);
- window.location.reload();
- });
- }
- };
- tips.ajax(ajaxConfig);
- }
- });
- },
- release: function () {
- layer.confirm('您确定要释放该任务吗?', {icon: 3, title: '释放任务'}, function () {
- var url = '/admin/link/task/' + "{{$data->id??''}}" + '/release';
- var ajaxConfig = {
- url: url,
- type: 'put',
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- },
- fillReason: function (_this) {
- $(_this).parent().parent().next().find("textarea").val($(_this).val())
- }
- };
- $(window).scrollTop(0);
- $(window).scroll(function () {
- var scrollHeight = 160;
- if ($(window).scrollTop() > scrollHeight) {
- $("#ibox-title-boxs").addClass("ons");
- } else {
- $("#ibox-title-boxs").removeClass("ons");
- }
- });
- </script>
- @endsection
|