customer.blade.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. @extends('admin/layout')
  2. @section('header')
  3. @include('admin/process/component/style')
  4. @endsection
  5. @section('content')
  6. <body class="gray-bg">
  7. <div class="wrapper wrapper-content animated fadeIn">
  8. <div class="tabs-container fix">
  9. <div class="tab-content-boxs">
  10. @php $scrollTo=null; @endphp
  11. <div id="vertical-timeline" class="vertical-container light-timeline">
  12. @foreach($processes as $process)
  13. @php
  14. $siteProcess=$processIdMapSiteProcessList[$process->id]??null;
  15. $active=$siteProcess['active']??null;
  16. @endphp
  17. <div
  18. class="vertical-timeline-block fix @if(in_array($process->id,[4,8,12,16,17,22,26])) ons @endif @if(in_array($process->id,[5,6,7,8,13,14,15,16,18])) rt @endif @if($process->id==17) widths @endif"
  19. id="process_{{$process->id}}">
  20. <div class="vertical-timeline-icon hide {{$process->color??''}}">
  21. <i class="fa {{$process->icon??''}}"></i>
  22. </div>
  23. <div class="vertical-timeline-content">
  24. {{--<h2>会议</h2>--}}
  25. <div>
  26. <div class="titles-boxs {{$process->color??''}}">
  27. <i></i>
  28. {{$process->title??''}}
  29. </div>
  30. @if($active==1)
  31. <span class="flow_done">已完成</span>
  32. @elseif($active==2)
  33. @php
  34. $scrollTo=$scrollTo?:$process->id;
  35. @endphp
  36. <span class="flow_processing">待处理</span>
  37. @endif
  38. </div>
  39. {{--网页确认--}}
  40. @if($process->id==9)
  41. <button class="btn btn-sm btn-info pull-left">域名:{{$site->domain}}</button>
  42. @endif
  43. {{--@if($process->id==1&& !$siteProcess)--}}
  44. {{--<button class="btn btn-sm btn-info" onclick="units.initProcess({{$site->id}})">--}}
  45. {{--初始化流程--}}
  46. {{--</button>--}}
  47. {{--@endif--}}
  48. @if($active==2)
  49. @php $nowProcessConfirm = sprintf('process-%s-confirm',$process->id); @endphp
  50. {{--关键词确认 设计确认 网页确认 上线确认--}}
  51. @if(in_array($process->id ,[5,8,9,15]))
  52. <a href="javascript:;"
  53. {{--评分客户反馈--}}
  54. @if(in_array($process->id ,[5,9,15,17])&&$siteProcess)
  55. onclick="units.scoreFeedback({{$siteProcess['id']}})"
  56. @else
  57. onclick="units.confirm({{$siteProcess['id']}})"
  58. @endif
  59. class="btn btn-sm btn-info"
  60. >
  61. 确认
  62. </a>
  63. @endif
  64. @endif
  65. @php $nowProcessEdit= sprintf('process-%s-edit',$process->id); @endphp
  66. {{---需要文件上传功能--}}
  67. {{--@if(in_array($process->id,[3,4,5,12])&&$siteProcess)--}}
  68. {{--@php $fileTitle=$siteProcess['file_list']?'文件浏览':'文件上传'; @endphp--}}
  69. {{--<button onclick="units.triggerFile({{$siteProcess['id'].','.'"'.$fileTitle.'"'}})"--}}
  70. {{--class="btn btn-sm btn-primary" style="margin-right: 10px">--}}
  71. {{--{{$fileTitle}}--}}
  72. {{--</button>--}}
  73. {{--@endif--}}
  74. {{--@if(in_array($process->id ,[5,9,15,17])&&$siteProcess)--}}
  75. {{--<a href="javascript:;"--}}
  76. {{--onclick="units.reply({{$siteProcess['id']}})"--}}
  77. {{--class="btn btn-sm btn-info" style="margin-right: 10px"--}}
  78. {{-->回访</a>--}}
  79. {{--@endif--}}
  80. {{--@if(in_array($process->id ,[11,13,16])&&$siteProcess)--}}
  81. {{--<a href="javascript:;"--}}
  82. {{--onclick="units.checkItem({{$siteProcess['id']}})"--}}
  83. {{--class="btn btn-sm btn-info" style="margin-right: 10px"--}}
  84. {{-->--}}
  85. {{--@php--}}
  86. {{--$checkItemScopes=array_column($process->check_item_scopes,'inx');--}}
  87. {{--$diff=array_diff($checkItemScopes,$siteProcess['check_items']??[]);--}}
  88. {{--@endphp--}}
  89. {{--@if($diff)--}}
  90. {{--待检查--}}
  91. {{--@else--}}
  92. {{--已检查--}}
  93. {{--@endif--}}
  94. {{--</a>--}}
  95. {{--@endif--}}
  96. {{--程序开发--}}
  97. @if($process->id==7)
  98. @if(!empty($siteProcess['deploy']))
  99. <a href="http://{{$siteProcess['deploy']['domain']??''}}"
  100. class="btn btn-sm btn-default" target="_blank"
  101. style="margin-right: 10px;float: left;">部署域名: {{$siteProcess['deploy']['domain']??''}}</a>
  102. @endif
  103. {{--@if($active==2)--}}
  104. {{--<a href="javascript:;"--}}
  105. {{--onclick="units.deploy({{$siteProcess['id']}})"--}}
  106. {{--class="btn btn-sm btn-warning"--}}
  107. {{--style="margin-right: 10px">部署</a>--}}
  108. {{--@endif--}}
  109. @endif
  110. {{--续签--}}
  111. {{--@if($process->id==18&&$siteProcess)--}}
  112. {{--<a href="javascript:;"--}}
  113. {{--onclick="units.renewForm({{$siteProcess['id']}})"--}}
  114. {{--class="btn btn-sm btn-info" style="margin-right: 10px"--}}
  115. {{-->续签表单</a>--}}
  116. {{--<a href="javascript:;"--}}
  117. {{--onclick="units.renewHistory({{$siteProcess['site_id']}})"--}}
  118. {{--class="btn btn-sm btn-info" style="margin-right: 10px"--}}
  119. {{-->续签历史</a>--}}
  120. {{--@endif--}}
  121. </div>
  122. @if($process->id==1 || $process->id==19 || $process->id==23)
  123. <div
  124. class="lefts-div-boxs @if($process->id==1) ones @endif @if($process->id==19) twos @endif @if($process->id==23) threes @endif">
  125. <div class="lists">
  126. @if($process->id==1)
  127. 建站期
  128. <i></i>
  129. @endif
  130. @if($process->id==19)
  131. 优化期
  132. <i></i>
  133. @endif
  134. @if($process->id==23)
  135. 服务期
  136. @endif
  137. </div>
  138. </div>
  139. @endif
  140. </div>
  141. @endforeach
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </body>
  147. @endsection
  148. @section('footer')
  149. <script>
  150. $(".li-lists").click(function () {
  151. var i = $(this).index();
  152. $(this).addClass("active").siblings().removeClass("active");
  153. $(".vertical-timeline-block").eq(i).addClass("ons").siblings().removeClass("ons");
  154. });
  155. $(".vertical-timeline-block").each(function () {
  156. if (!!$(this).find("span").hasClass("flow_done")) {
  157. $(this).addClass("active");
  158. }
  159. });
  160. $(".vertical-timeline-block").each(function () {
  161. if (!!$(this).find("span").hasClass("flow_processing")) {
  162. $(this).addClass("selects");
  163. }
  164. });
  165. window.onload = function () {
  166. $(function () {
  167. @if($scrollTo)
  168. var _height1 = document.getElementById("process_{{$scrollTo}}").offsetTop;
  169. console.log(_height1);
  170. $('html,body').animate({scrollTop: _height1}, 500);
  171. @endif
  172. });
  173. };
  174. var units = {
  175. initProcess: function (siteId) {
  176. layer.confirm('是否初始化流程?', {icon: 3, title: '初始化流程'}, function () {
  177. var config = {url: '/admin/process/site/' + siteId + '/init'};
  178. config.success = function (result) {
  179. layer.msg(result.message, {icon: 6, time: 1500}, function () {
  180. window.location.reload();
  181. });
  182. };
  183. tips.ajax(config);
  184. });
  185. },
  186. triggerFile: function (site_process_id, title) {
  187. layer.open({
  188. type: 2,
  189. content: ['/admin/process/file-upload/' + site_process_id],
  190. area: ['60%', '80%'],
  191. title: title
  192. });
  193. },
  194. scoreFeedback: function (site_process_id) {
  195. layer.open({
  196. type: 2,
  197. content: ['/admin/process/score/' + site_process_id],
  198. area: ['60%', '60%'],
  199. title: '评分'
  200. });
  201. },
  202. reply: function (site_process_id) {
  203. layer.open({
  204. type: 2,
  205. content: ['/admin/process/reply/' + site_process_id],
  206. area: ['60%', '60%'],
  207. title: '回访记录'
  208. });
  209. },
  210. checkItem: function (site_process_id) {
  211. layer.open({
  212. type: 2,
  213. content: ['/admin/process/check-item/' + site_process_id],
  214. area: ['60%', '100%'],
  215. title: '检查项'
  216. });
  217. },
  218. renewForm: function (site_process_id) {
  219. layer.open({
  220. type: 2,
  221. content: ['/admin/process/renew-form/' + site_process_id],
  222. area: ['60%', '80%'],
  223. title: '续签表单'
  224. });
  225. },
  226. renewHistory: function (site_id) {
  227. layer.open({
  228. type: 2,
  229. content: ['/admin/process/renew-history/' + site_id],
  230. area: ['60%', '100%'],
  231. title: '续签历史'
  232. });
  233. },
  234. confirm: function (id) {
  235. layer.confirm('是否确认?', {icon: 3, title: '是否确认'}, function () {
  236. var config = {type: 'PUT', url: '/admin/process/confirm/' + id};
  237. config.success = function (result) {
  238. layer.msg(result.message, {icon: 6, time: 1500}, function () {
  239. window.location.reload();
  240. });
  241. };
  242. tips.ajax(config);
  243. });
  244. },
  245. deploy: function (site_process_id) { //部署
  246. var config = {
  247. type: 'GET',
  248. url: '/admin/process/deploy/' + site_process_id
  249. };
  250. config.success = function (result) {
  251. layer.msg(result.message, {icon: 6, time: 1500}, function () {
  252. window.location.reload();
  253. });
  254. };
  255. tips.ajax(config);
  256. }
  257. // customerInfo: function (siteId) {
  258. // layer.open({
  259. // title: '客户信息表',
  260. // type: 2,
  261. // content: '/admin/sites/' + siteId + '/customer?noSide=1',
  262. // area: ['90%', '90%']
  263. //
  264. // });
  265. // }
  266. };
  267. </script>
  268. @endsection