score_feedback.blade.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. @extends('admin/layout')
  2. @section('content')
  3. <body class="gray-bg">
  4. <div class="wrapper wrapper-content animated fadeInRight">
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <div class="ibox float-e-margins">
  8. <div class="ibox-content">
  9. @php
  10. $evaluate=$siteProcess->evaluate??[];
  11. @endphp
  12. <form class="form-horizontal">
  13. <div class="form-group">
  14. <label class="col-sm-6 control-label" style="font-weight: normal">总分10分:非常满意10分,满意8-9分,不满意7分及以下</label>
  15. </div>
  16. <div class="form-group">
  17. <label class="col-sm-2 control-label" for="score"><span class="red">* </span>评分:</label>
  18. <div class="col-sm-4">
  19. <select class="form-control" name="score" id="score" style="width: 90px">
  20. <option value="">请选择</option>
  21. @for($i=10;$i>0;$i--)
  22. <option value="{{$i}}"
  23. @if (($evaluate['score']??0)==$i) selected @endif>{{$i}}
  24. </option>
  25. @endfor
  26. </select>
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label class="col-sm-2 control-label" for="feedback"><span
  31. class="red">* </span>客户反馈:</label>
  32. <div class="col-sm-4">
  33. <textarea name="feedback" id="feedback" cols="30" rows="4"
  34. class="form-control">{{$evaluate['feedback']??''}}</textarea>
  35. </div>
  36. </div>
  37. {{--<div class="form-group">--}}
  38. {{--<label class="col-sm-2 control-label" for="feedback_reply"><span class="red">* </span>回访记录:</label>--}}
  39. {{--<div class="col-sm-4">--}}
  40. {{--<textarea name="feedback_reply" id="feedback_reply" cols="30" rows="4"--}}
  41. {{--class="form-control"--}}
  42. {{--@if($isCustomer) disabled @endif>{{$evaluate['feedback_reply']['reply']??''}}</textarea>--}}
  43. {{--</div>--}}
  44. {{--</div>--}}
  45. <div class="form-group">
  46. <div class="col-sm-offset-2 col-sm-8">
  47. <button class="btn btn-sm btn-primary" type="button" onclick="units.save()">提交
  48. </button>
  49. <button class="btn btn-sm btn-white closeLayer" type="button">取消</button>
  50. </div>
  51. </div>
  52. </form>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </body>
  59. @endsection
  60. @section('footer')
  61. <script>
  62. var units = {
  63. save: function () {
  64. var data, score, feedback;
  65. score = $("#score").val();
  66. feedback = $("#feedback").val();
  67. if (score === "") {
  68. layer.alert('请先评分', {icon: 5});
  69. return;
  70. }
  71. if (feedback.length === 0) {
  72. layer.alert('请填写客户反馈', {icon: 5});
  73. return;
  74. }
  75. data = {score: score, feedback: feedback};
  76. var config = {
  77. url: '/admin/process/score/' + "{{$siteProcess->id}}",
  78. type: 'put',
  79. data: data
  80. };
  81. config.success = function (result) {
  82. layer.msg(result.message, {icon: 1, time: 1000}, function () {
  83. parent.window.location.reload();
  84. tips.closeParentLayer();
  85. });
  86. };
  87. tips.ajax(config);
  88. }
  89. };
  90. </script>
  91. @endsection