associated_customer.ftl 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <#include "/base/add_base.ftl">
  10. <title>关联客诉</title>
  11. <style>
  12. .my-title{font-weight: 500;padding-left: 15px;position: relative;}
  13. .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
  14. .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
  15. .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
  16. .input-box{margin: 18px 0;}
  17. .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
  18. .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
  19. .add-list>li{margin: 10px 0;}
  20. .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
  21. .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
  22. .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
  23. .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
  24. input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  25. input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  26. </style>
  27. <meta name="keywords" content="${path}">
  28. <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
  29. </head>
  30. <body>
  31. <article class="page-container">
  32. <form class="form form-horizontal" id="form-admin-add">
  33. <div class="input-box" >
  34. <span class="input-dic spanhidth" style="margin-top: 12px;">客诉编号:</span>
  35. <input type="text" style="width: 400px;" class="input-text" placeholder="客诉编号" id="signclosedCustomerId" name="signclosedCustomerId">
  36. <button type="button" class="my-btn-submit" style="margin-top: 4px;" onclick="select();">查询</button>
  37. </div>
  38. <div id="noCustomerDiv" style="display: none; text-align:center;">
  39. <h3><strong style="color: #93da67">?没有搜索到客诉哦</strong></h3>
  40. </div>
  41. <div id="customerDiv" style="display: none;text-align: -moz-center;text-align: -webkit-center;">
  42. <#--<div class="row cl">
  43. <div class="formControls col-2 col-sm-2 text-r">
  44. <strong>客诉时间:</strong>
  45. </div>
  46. <div class="formControls col-8 col-sm-8" id="customerCreateTime">
  47. </div>
  48. </div>-->
  49. <table class="table table-border table-bg table-bordered" style="margin-top: 10px;width: 500px;">
  50. <thead>
  51. <tr>
  52. <th width="5" style="text-align: center">客诉标题</th>
  53. <td width="50" style="font-weight: normal;"><span id="txtDescribeTitle"></span></td>
  54. </tr>
  55. <tr>
  56. <th width="5" style="text-align: center">客诉回复</th>
  57. <td width="50" style="font-weight: normal;"><span id="txtDescribeContent"></span></td>
  58. </tr>
  59. <tr>
  60. <th width="5" style="text-align: center">客诉人姓名</th>
  61. <td width="50" style="font-weight: normal;"><span id="customerName"></span></td>
  62. </tr>
  63. <tr>
  64. <th width="5" style="text-align: center">客诉人手机号</th>
  65. <td width="50" style="font-weight: normal;"><span id="customerTel"></span></td>
  66. </tr>
  67. <tr>
  68. <th width="5" style="text-align: center">客诉时间</th>
  69. <td width="50" style="font-weight: normal;"><span id="customerCreateTime"></span></td>
  70. </tr>
  71. </thead>
  72. </table>
  73. </div>
  74. <div style="text-align:center;display: none" id="associatedId">
  75. <#if signclosedId??>
  76. <input type="hidden" value="${signclosedId!''}" id="signclosedId" name="signclosedId">
  77. </#if>
  78. <button type="button" class="my-btn-submit" onclick="update();">确认关联</button>
  79. </div>
  80. </form>
  81. </article>
  82. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  83. <script type="text/javascript">
  84. function select() {
  85. var signclosedCustomerId = $("#signclosedCustomerId").val();
  86. $.ajax({
  87. cache: true,
  88. type: "POST",
  89. data: {"customerId":signclosedCustomerId},
  90. url: "${path}/admin/customer/get_describe_info",
  91. async: false,
  92. success: function(data){
  93. if (data.returnCode == 200) {
  94. var describe = data.returnMsg.describe;
  95. var customer = data.returnMsg.customerInfo;
  96. $('#customerCreateTime').html(formatDate(describe.customerCreateTime,"yyyy年MM月dd日"));
  97. $('#txtDescribeTitle').html(describe.describeTitle);
  98. $('#txtDescribeContent').html(describe.describeContent);
  99. $('#customerName').html(customer.customerName);
  100. $('#customerTel').html(customer.customerTel);
  101. $("#noCustomerDiv").hide();
  102. $("#customerDiv").show();
  103. $("#associatedId").show();
  104. }else {
  105. $("#customerDiv").hide();
  106. $("#associatedId").hide();
  107. $("#noCustomerDiv").show();
  108. }
  109. },
  110. error: function(XmlHttpRequest, textStatus, errorThrown){
  111. }
  112. })
  113. }
  114. function update() {
  115. var signclosedCustomerId = $("#signclosedCustomerId").val();
  116. if( signclosedCustomerId != null){
  117. if( signclosedCustomerId.length > 10 ){
  118. layer.msg('编号长度不得大于10个字符',{icon: 5,time:1000});
  119. return;
  120. }
  121. }
  122. $.ajax({
  123. cache: true,
  124. type: "POST",
  125. url: "${path}/admin/signclosed/associated_customer",
  126. data:$('#form-admin-add').serialize(),// 你的formid
  127. async: false,
  128. success: function(data){
  129. if (data.returnCode == 200) {
  130. layer.msg('关联成功',{icon: 1,time:1000},function () {
  131. window.parent.location.reload();
  132. var index = parent.layer.getFrameIndex(window.name);
  133. parent.layer.close(index)
  134. });
  135. } else {
  136. layer.msg('关联失败',{icon: 5,time:1000});
  137. }
  138. },
  139. error: function(XmlHttpRequest, textStatus, errorThrown){
  140. layer.msg('系统错误',{icon: 5,time:1000});
  141. }
  142. });
  143. }
  144. </script>
  145. </body>
  146. </html>