perfect_detect.ftl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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>完善客户信息 - H-ui.filter v2.4</title>
  11. <style>
  12. .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
  13. .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
  14. .tit-2{position: relative;font-size: 16px;padding-left: 10px;color: #50a2ea;display: inline-block;}
  15. .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -3px; background-color: #32a3d8;}
  16. .my-title{font-weight: 500;padding-left: 15px;position: relative;}
  17. .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
  18. .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
  19. .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%;}
  20. .input-box{margin: 18px 0;}
  21. .input-dic{float: left;margin:5px 10px 0 0;font-size: 14px;}
  22. .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
  23. .add-list>li{margin: 10px 0;}
  24. .my-textarea{padding: 5px 10px;width: 77%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
  25. .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
  26. .my-btn-submit{padding: 10px 20px;width: 158px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px 10px 0 10px;}
  27. .my-select {
  28. border: 1px solid rgba(0,0,0,.1);
  29. padding: 6px 50px 6px 15px;
  30. height: 34px;
  31. -webkit-appearance: none;
  32. appearance: none;
  33. background: url(/common/images/pts/select-11.png) right center no-repeat;
  34. background-size: auto 100%;
  35. }
  36. .check-box, .radio-box{padding-left: 0;}
  37. input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  38. input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  39. .huanhang{ float:left}
  40. input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  41. input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  42. </style>
  43. <meta name="keywords" content="${path}">
  44. <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
  45. </head>
  46. <body>
  47. <article class="page-container">
  48. <form class="form form-horizontal" id="form-admin-add">
  49. <div class="row cl">
  50. <label class="form-label col-3">
  51. <div class="tit-2">检测信息</div>
  52. </label>
  53. <div class="formControls col-9">
  54. </div>
  55. </div>
  56. <div class="input-box">
  57. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 11px;"><span class="c-red">*</span>所属公司:</label>
  58. <div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
  59. <#if companyInfoList?? && (companyInfoList?size > 0) >
  60. <#list companyInfoList as companyInfo>
  61. <div class="radio-box">
  62. <input type="radio" name="companyId" <#if companyInfo_index == 0>checked="checked"</#if>value="${companyInfo.companyId!''}" datatype="*" nullmsg="请选择所属公司!">
  63. <label for="tel-1">${companyInfo.companyName!''}</label>
  64. </div>
  65. </#list>
  66. </#if>
  67. </div>
  68. </div>
  69. <div class="input-box">
  70. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>客户问题:</label>
  71. <div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
  72. <select id="questionId" name="questionId" class="chosen" style="width: 93%;">
  73. <option value="">请选择客户问题</option>
  74. <#if (listComplaintQuestionInfo?size > 0)>
  75. <#list listComplaintQuestionInfo as info>
  76. <option value="${info.questionId!""}">${info.questionName!""}</option>
  77. </#list>
  78. </#if>
  79. </select>
  80. </div>
  81. </div>
  82. <div class="input-box">
  83. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>业务员:</label>
  84. <div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
  85. <select id="salesmanAdminId" name="salesmanAdminId" class="chosen" style="width: 93%;">
  86. <option value="">请选择业务员</option>
  87. <#if (listAdmin?size > 0)>
  88. <#list listAdmin as info>
  89. <option value="${info.adminId!""}">${info.adminName!""}</option>
  90. </#list>
  91. </#if>
  92. </select>
  93. </div>
  94. </div>
  95. <div class="input-box">
  96. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>客户信息:</label>
  97. <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
  98. <input class="my-input" type="text" name="detectName" id="detectName" placeholder="请输入客户姓名或昵称" style="width: 146px;"/>
  99. <input class="my-input" type="text" name="detectTel" id="detectTel" placeholder="请输入客户电话或手机号码" style="width: 146px;"/>
  100. </div>
  101. </div>
  102. <div class="input-box" id="updateDetect_3">
  103. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>处理方式:</label>
  104. <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
  105. <select class="my-select" id="procTypeId" name="procTypeId" style="width: 158px;">
  106. </select>
  107. <select class="my-select" id="procMethodId" name="methodId" style="width: 158px;">
  108. </select>
  109. </div>
  110. </div>
  111. <div class="input-box">
  112. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>检测产品:</label>
  113. <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
  114. <select id="productId" name="productId" class="my-select" style="width: 158px;">
  115. <#if (productList?size > 0)>
  116. <#list productList as product>
  117. <option value="${product.productId!""}">${product.productName!""}</option>
  118. </#list>
  119. </#if>
  120. </select>
  121. <select id="productColorId" name="productColorId" class="my-select" style="width: 158px;">
  122. <#if (productColorList?size > 0)>
  123. <#list productColorList as productColor>
  124. <option value="${productColor.colorId!""}">${productColor.colorName!""}</option>
  125. </#list>
  126. </#if>
  127. </select>
  128. </div>
  129. </div>
  130. <div class="input-box" >
  131. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;">备注信息:</label>
  132. <div class="formControls col-xs-9 col-sm-9">
  133. <div class="radio-box">
  134. <textarea rows="3" style="width: 410px;margin-left: -15px;margin-top: 8px;" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请输入备注!"></textarea>
  135. </div>
  136. </div>
  137. </div>
  138. <div class="input-box" style="margin-left: 30%">
  139. <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
  140. <button type="button" class="my-btn-submit" onclick="update();" style="margin-top: 50px;">确认提交</button>
  141. </div>
  142. </form>
  143. </article>
  144. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  145. <script type="text/javascript">
  146. /**
  147. * 客诉处理方式回显 state
  148. */
  149. procType();
  150. $("#procTypeId").change(function (){
  151. var procTypeId = parseInt($(this).val());
  152. procMethod(procTypeId);
  153. });
  154. function procType(){
  155. var procTypeId;
  156. $.ajax({
  157. cache: true,
  158. type: "POST",
  159. url: "${path}/admin/proc/type",
  160. async: false,
  161. success: function(data){
  162. if (data.returnCode == 200) {
  163. var html = '';
  164. if (data.returnCode == 200) {
  165. for(var i=0;i<data.returnMsg.list.length;i++){
  166. listInfo = data.returnMsg.list[i];
  167. if(i == 1 ){
  168. procTypeId = listInfo.procTypeId;
  169. }
  170. if(listInfo.procTypeId === 2 || listInfo.procTypeId === 3 || listInfo.procTypeId === 4 ){
  171. html += '<option value="'+ listInfo.procTypeId +'">'+ listInfo.procTypeName +'</option>';
  172. }
  173. }
  174. }else{
  175. html = '';
  176. }
  177. $("[name='procTypeId']").html(html);
  178. }
  179. },
  180. error: function(XmlHttpRequest, textStatus, errorThrown){
  181. }
  182. })
  183. procMethod(procTypeId);
  184. }
  185. function procMethod(procTypeId){
  186. $.ajax({
  187. cache: true,
  188. type: "POST",
  189. data: {"procTypeId":procTypeId},
  190. url: "${path}/admin/proc/method",
  191. async: false,
  192. success: function(data){
  193. if (data.returnCode == 200) {
  194. var html = '';
  195. if (data.returnCode == 200) {
  196. for(var i=0;i<data.returnMsg.list.length;i++){
  197. listInfo = data.returnMsg.list[i];
  198. html += '<option value="'+ listInfo.procMethodId +'">'+ listInfo.procMethodName +'</option>';
  199. }
  200. }else{
  201. html = '';
  202. }
  203. $("#procMethodId").html(html);
  204. }
  205. },
  206. error: function(XmlHttpRequest, textStatus, errorThrown){
  207. }
  208. })
  209. }
  210. /**
  211. * 客诉处理方式回显 end
  212. */
  213. function inputSelect(){
  214. var input_select=$("#content").val();
  215. var option_length=$("#contentlist option").length;
  216. var option_id='';
  217. for(var i=0;i<option_length;i++){
  218. var option_value=$("#contentlist option").eq(i).attr('data-value');
  219. if(input_select==option_value){
  220. option_id=$("#contentlist option").eq(i).attr('data-id')
  221. break;
  222. }
  223. }
  224. $.ajax({
  225. cache: true,
  226. type: "POST",
  227. url: "${path}/admin/detect/getDetectionBasis",
  228. data:{basisId:option_id},
  229. async: false,
  230. success: function(data){
  231. if (data.returnCode == 200) {
  232. if(data.returnMsg.detectionBasis != null){
  233. $("#detectItemPhenomenon").val(data.returnMsg.detectionBasis.basisPhenomenon);
  234. $("#detectItemClassification").val(data.returnMsg.detectionBasis.basisClassification);
  235. $("#detectItemFailureCause").val(data.returnMsg.detectionBasis.basisFailureCause);
  236. $("#detectItemResults").val(data.returnMsg.detectionBasis.basisResults);
  237. $("#detectItemPoint").val(data.returnMsg.detectionBasis.basisPoint);
  238. $("#detectItemNalysis").val(data.returnMsg.detectionBasis.basisNalysis);
  239. $("#detectItemContent").val(data.returnMsg.detectionBasis.basisContent);
  240. }
  241. }
  242. },
  243. error: function(XmlHttpRequest, textStatus, errorThrown){
  244. layer.msg('添加错误',{icon: 5,time:1000});
  245. }
  246. });
  247. };
  248. //查询产品颜色信息
  249. $('#productId').change(function(){
  250. getProduct($(this).children('option:selected').val())
  251. })
  252. function getProduct(productId) {
  253. $.ajax({
  254. cache: true,
  255. type: "POST",
  256. url: "${path}/admin/product/get_product",
  257. data:{colorProductId:productId},// 你的formid
  258. async: false,
  259. success: function(data){
  260. if (data.returnCode == 200) {
  261. $("#productColorId").empty();
  262. if(data.returnMsg.productColorList.length > 0){
  263. for(var i=0;i<data.returnMsg.productColorList.length;i++){
  264. var productColor = data.returnMsg.productColorList[i];
  265. $("#productColorId").append('<option value='+productColor.colorId+'>'+productColor.colorName+'</option>');
  266. }
  267. }
  268. }
  269. },
  270. error: function(XmlHttpRequest, textStatus, errorThrown){
  271. layer.msg('添加错误',{icon: 5,time:1000});
  272. }
  273. });
  274. }
  275. function update() {
  276. var questionId = $("#questionId").val();
  277. if( questionId == null || questionId == "" ){
  278. layer.msg('请选择客户问题',{icon: 5,time:1000});
  279. return;
  280. }
  281. var salesmanAdminId = $("#salesmanAdminId").val();
  282. if( salesmanAdminId == null || salesmanAdminId == "" ){
  283. layer.msg('请选择业务员',{icon: 5,time:1000});
  284. return;
  285. }
  286. var detectName = $("#detectName").val();
  287. if( detectName == null || detectName == "" ){
  288. layer.msg('请输入客户名称',{icon: 5,time:1000});
  289. return;
  290. }
  291. var detectTel = $("#detectTel").val();
  292. if( detectTel == null || detectTel == "" ){
  293. layer.msg('请输入客户电话',{icon: 5,time:1000});
  294. return;
  295. }
  296. $.ajax({
  297. cache: true,
  298. type: "POST",
  299. url: "${path}/admin/detect/perfect_detect",
  300. data:$('#form-admin-add').serialize(),// 你的formid
  301. async: false,
  302. success: function(data){
  303. if (data.returnCode == 200) {
  304. layer.msg('操作成功',{icon: 1,time:1000},function () {
  305. window.parent.location.reload();
  306. var index = parent.layer.getFrameIndex(window.name);
  307. parent.layer.close(index);
  308. });
  309. } else {
  310. layer.msg('操作失败',{icon: 5,time:1000});
  311. }
  312. },
  313. error: function(XmlHttpRequest, textStatus, errorThrown){
  314. layer.msg('操作错误',{icon: 5,time:1000});
  315. }
  316. });
  317. }
  318. $('.chosen').chosen({
  319. no_results_text: "没有找到结果!",//搜索无结果时显示的提示
  320. search_contains:true, //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
  321. allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
  322. disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
  323. disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
  324. inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
  325. placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
  326. width: '320px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
  327. max_shown_results: 1000, //下拉框最大显示选项数量
  328. display_disabled_options: false,
  329. single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
  330. case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
  331. group_search: false, //选项组是否可搜。此处搜索不可搜
  332. include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
  333. });
  334. $('.chosen2').chosen({
  335. search_contains:false,
  336. enable_split_word_search: true //分词搜索,选项词可通过空格或'[]'分隔。search_contains为false时才能看出效果
  337. });
  338. </script>
  339. </body>
  340. </html>