add_customer.ftl 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543
  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. <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
  11. <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
  12. <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
  13. <style>
  14. .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
  15. .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
  16. .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
  17. .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
  18. #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
  19. #suggest, #suggest2 {width:200px}
  20. .gray {color:gray}
  21. .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
  22. .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
  23. .ac_results li {border:1px solid #fff}
  24. .ac_over, .ac_results li a:hover {background:#c8e3fc}
  25. .ac_results li a span {float:right}
  26. .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
  27. .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
  28. .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
  29. .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
  30. .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
  31. .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent #32a3d8 transparent transparent;font-size:0; line-height:0;}
  32. .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
  33. .dalog-ask .answer{color: #666;margin-bottom: 10px;}
  34. .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
  35. .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
  36. .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
  37. .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
  38. .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
  39. .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
  40. .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
  41. .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent transparent transparent #32a3d8;font-size:0; line-height:0;}
  42. .time-line-list>li:first-child .arrow{display: none;}
  43. .table-bg th{background-color: #e2f6ff;}
  44. .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
  45. .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
  46. .input-produce{height: 25px;line-height: 25px}
  47. .color-div{height: 30px;}
  48. </style>
  49. <title>添加客诉 - 客诉管理 - RST</title>
  50. </head>
  51. <body>
  52. <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
  53. <span class="c-gray en">&gt;</span> 客诉管理
  54. <span class="c-gray en">&gt;</span> 添加客诉
  55. <a class="btn radius r"
  56. style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
  57. href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
  58. </nav>
  59. <article class="page-container" style="padding: 10px;">
  60. <div class="pd-20 cl">
  61. <form action="${path}/admin/customer/save_customer" method="post" class="form form-horizontal" id="form-customer-add" onkeydown="if(event.keyCode==13)return false;">
  62. <div class="row cl">
  63. <label class="form-label col-3">
  64. <div class="tit-2">客诉基本信息</div>
  65. </label>
  66. <div class="formControls col-9">
  67. </div>
  68. </div>
  69. <div class="row cl">
  70. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>跟进客服:</label>
  71. <div class="formControls col-4 col-sm-4"> <span class="select-box">
  72. <select name="adminId" id="adminId" class="select">
  73. </select>
  74. </span>
  75. </div>
  76. </div>
  77. <div class="row cl">
  78. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>来源入口:</label>
  79. <div class="formControls col-10 col-sm-10 skin-minimal">
  80. <div class="radio-box">
  81. <input type="radio" id="tel-1" name="customerSourceType" value="1" datatype="*" checked nullmsg="请选择来源入口!">
  82. <label for="tel-1">400电话</label>
  83. </div>
  84. <div class="radio-box">
  85. <input type="radio" id="tel-2" name="customerSourceType" value="2">
  86. <label for="tel-2">微信公众号</label>
  87. </div>
  88. <div class="radio-box">
  89. <input type="radio" id="tel-3" name="customerSourceType" value="3">
  90. <label for="tel-3">其他</label>
  91. <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" value="" placeholder="" id="customerSource" name="customerSource">
  92. </div>
  93. </div>
  94. </div>
  95. <div class="row cl">
  96. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>咨询类型:</label>
  97. <div class="formControls col-10 col-sm-10 skin-minimal">
  98. <div class="radio-box">
  99. <input type="radio" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1" checked >
  100. <label for="customer-type-1">售前咨询</label>
  101. </div>
  102. <div class="radio-box">
  103. <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2" >
  104. <label for="customer-type-2">售后咨询</label>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="row cl">
  109. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
  110. <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
  111. <#--<div class="radio-box">
  112. <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
  113. <label for="tel-3">净水机</label>
  114. </div>
  115. <div class="radio-box">
  116. <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
  117. <label for="tel-4">冲奶机</label>
  118. </div>-->
  119. </div>
  120. </div>
  121. <div class="row cl" style="position: relative;">
  122. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
  123. <div class="formControls col-2 col-sm-2"> <span class="select-box">
  124. <select name="complaintId" class="select">
  125. <#--<option value="0">使用操作</option>-->
  126. <#--<option value="1">使用操作</option>-->
  127. </select>
  128. </span>
  129. </div>
  130. <div class="formControls col-2 col-sm-2"> <span class="select-box">
  131. <select name="smallClassId" class="select">
  132. <#--<option value="0">使用操作制水出水</option>
  133. <option value="1">使用操作制水出水</option>-->
  134. </select>
  135. </span>
  136. </div>
  137. <div class="formControls col-2 col-sm-2">
  138. <div class="clearfix">
  139. <input type="text" placeholder="搜索关键词" class="input-text ac_input" name="questionId" value="" id="search_text" autocomplete="off" style="width:60%"><button type="button" class="btn btn-primary" id="search_button">搜索</button>
  140. </div>
  141. </div>
  142. <div class="dalog-ask">
  143. <div class="tag">
  144. <em></em>
  145. <strong>相关QA</strong>
  146. <ul id="question">
  147. <#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
  148. <li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
  149. </ul>
  150. </div>
  151. </div>
  152. </div>
  153. <div class="row cl">
  154. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题内容:</label>
  155. <div class="formControls col-5 col-sm-5">
  156. <input type="hidden" name="questionId" id="questionId">
  157. <script id="describeContentText" type="text/plain" style="width:650px;height:250px;"></script>
  158. <input type="hidden" name="describeContent" id="describeContent">
  159. </div>
  160. </div>
  161. <div class="row cl">
  162. <label class="form-label col-1 col-sm-1"></label>
  163. <div class="formControls col-2 col-sm-2">
  164. <input type="text" class="input-text" value="" placeholder="请输入手机号" id="" name="">
  165. </div>
  166. <div class="formControls col-2 col-sm-2">
  167. <input type="button" class="btn btn-primary" value="发短信給用户">
  168. </div>
  169. </div>
  170. <div class="row cl">
  171. <label class="form-label col-1 col-sm-1">
  172. <div class="tit">处理结果</div>
  173. </label>
  174. <div class="formControls col-10 col-sm-10">
  175. </div>
  176. </div>
  177. <div class="row cl">
  178. <label class="form-label col-1 col-sm-1">处理类型:</label>
  179. <div class="formControls col-10 col-sm-10 skin-minimal">
  180. <div class="radio-box" id="solved">
  181. <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" checked>
  182. <label for="customer-process-1">已解决</label>
  183. </div>
  184. <div class="radio-box" id="noSolved">
  185. <input type="radio" id="customer-process-2" value="2" name="customerIsSolve">
  186. <label for="customer-process-2">未解决</label>
  187. </div>
  188. <div class="radio-box" id="renewed">
  189. <input type="radio" id="customer-process-3" value="3" name="customerIsSolve">
  190. <label for="customer-process-3">换新</label>
  191. </div>
  192. <div class="radio-box" id="maintain">
  193. <input type="radio" id="customer-process-4" value="4" name="customerIsSolve">
  194. <label for="customer-process-4">维修</label>
  195. </div>
  196. <div class="radio-box" id="reissue">
  197. <input type="radio" id="customer-process-5" value="5" name="customerIsSolve">
  198. <label for="customer-process-5">补发</label>
  199. </div>
  200. <div class="radio-box" id="backGoods">
  201. <input type="radio" id="customer-process-6" value="6" name="customerIsSolve">
  202. <label for="customer-process-6">退货</label>
  203. </div>
  204. <div class="radio-box" id="noReasonBack">
  205. <input type="radio" id="customer-process-7" value="7" name="customerIsSolve">
  206. <label for="customer-process-7">无理由退货</label>
  207. </div>
  208. </div>
  209. </div>
  210. <div class="row cl">
  211. <label class="form-label col-1 col-sm-1"></label>
  212. <div class="formControls col-10 col-sm-10">
  213. <ul class="time-line-list" id="processResultStatus">
  214. <#-- <li><span class="arrow"></span><div class="number">1</div><div>录入客诉</div></li>
  215. <li><span class="arrow"></span><div class="number">2</div><div>督促用户寄回</div></li>
  216. <li><span class="arrow"></span><div class="number">3</div><div>录入快递单号</div></li>
  217. <li><span class="arrow"></span><div class="number">4</div><div>仓库收货</div></li>
  218. <li><span class="arrow"></span><div class="number">5</div><div>换新发货</div></li>
  219. <li><span class="arrow"></span><div class="number">6</div><div>发货通知用户</div></li>
  220. <li><span class="arrow"></span><div class="number">7</div><div>收货后回访</div></li>-->
  221. </ul>
  222. </div>
  223. </div>
  224. <div class="row cl" id="orderHead" style="display: none;">
  225. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>订单信息:</label>
  226. <div class="formControls col-1 col-sm-1">
  227. <button type="button" class="btn btn-primary" id="selectOrder">搜索订单</button>
  228. </div>
  229. </div>
  230. <div class="row cl" id="order" style="display: none;">
  231. <label class="form-label col-1 col-sm-1"></label>
  232. <div class="formControls col-9 col-sm-9 text-c">
  233. <table class="table table-border table-bg table-bordered">
  234. <tr>
  235. <th style="text-align: center;">销售</th>
  236. <th style="text-align: center;">订单号</th>
  237. <th style="text-align: center;">姓名</th>
  238. <th style="text-align: center;">电话</th>
  239. <th style="text-align: center;">订单金额</th>
  240. <th style="text-align: center;">购买产品</th>
  241. <th style="text-align: center;">购买日期</th>
  242. </tr>
  243. <tr id="showOrder">
  244. <#-- <td>爱贝源-微信商城</td>
  245. <td>1290387806</td>
  246. <td>何小小</td>
  247. <td>1882222888</td>
  248. <td>¥3680</td>
  249. <td>Watero净水机</td>
  250. <td>2017-06-06</td>-->
  251. </tr>
  252. <#--<tr id="showOrderAddress">-->
  253. <#--</tr>-->
  254. </table>
  255. </div>
  256. </div>
  257. <div class="row cl" id="recipientInfo" style="display: none;">
  258. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>收件信息:</label>
  259. <div class="formControls col-2 col-sm-2">
  260. <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="sendName" name="sendName">
  261. </div>
  262. <div class="formControls col-2 col-sm-2">
  263. <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="sendTel" name="sendTel">
  264. </div>
  265. </div>
  266. <div class="row cl" id="recipientAddress" style="display: none;">
  267. <input type="hidden" id="addressInfo">
  268. <label class="form-label col-1 col-sm-1"></label>
  269. <div class="formControls col-2 col-sm-2">
  270. <span class="select-box">
  271. <select id="province" class="select">
  272. </select>
  273. </span>
  274. </div>
  275. <div class="formControls col-2 col-sm-2">
  276. <span class="select-box">
  277. <select id="city" class="select">
  278. </select>
  279. </span>
  280. </div>
  281. <div class="formControls col-2 col-sm-2">
  282. <span class="select-box">
  283. <select id="district" class="select">
  284. </select>
  285. </span>
  286. </div>
  287. </div>
  288. <div class="row cl" id="recipientAddressText" style="display: none;">
  289. <label class="form-label col-1 col-sm-1"></label>
  290. <div class="formControls col-5 col-sm-5">
  291. <textarea name="" id="sendAddress" cols="" rows="2" class="textarea" placeholder="请填写详细地址"></textarea>
  292. <span id="addrssMsg"></span>
  293. </div>
  294. </div>
  295. <div class="row cl" id="renewedProduct" style="display: none;">
  296. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span><span id="relationProduct">换新产品</span>:</label>
  297. <div class="formControls col-9 col-sm-9 text-c" id="produceSelect">
  298. <#--<table class="table table-border table-bg table-bordered">
  299. <thead>
  300. <tr class="text-c">
  301. <th style="text-align: center;" width="60">产品名称</th>
  302. <th style="text-align: center;" width="60">产品颜色</th>
  303. <th style="text-align: center;" width="60">产品配件</th>
  304. </tr>
  305. </thead>
  306. <tbody id="addProduct">
  307. <tr >
  308. <td>冲奶机</td>
  309. <td>
  310. <div>
  311. 白色
  312. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  313. </div>
  314. <div>
  315. 白色
  316. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  317. </div>
  318. </td>
  319. <td>
  320. <div>
  321. 水箱
  322. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  323. </div>
  324. <div>
  325. 水箱
  326. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  327. </div>
  328. </td>
  329. </tr>
  330. </tbody>
  331. </table>
  332. -->
  333. </div>
  334. </div>
  335. <div class="row cl" id="TDScollect" style="display: none;">
  336. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>TDS收集:</label>
  337. <div class="formControls col-2 col-sm-2" style="position: relative;">
  338. <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
  339. <input style="width: 140px;" placeholder="" class="input-text my-search-input" type="text" name="arrcity" id="arrcity" />
  340. <div id="suggest" class="ac_results"></div>
  341. </div>
  342. <div class="formControls col-2 col-sm-2">
  343. <span class="select-box">
  344. <select name="" class="select" id="TDSArea" name="TDSArea">
  345. </select>
  346. </span>
  347. </div>
  348. <input type="hidden" name="customerArea" id="customerArea">
  349. <div class="formControls col-2 col-sm-2">
  350. <input type="text" class="input-text" value="" placeholder="进水tds数值" id="customerInTDS" name="customerInTDS">
  351. </div>
  352. <div class="formControls col-2 col-sm-2">
  353. <input type="text" class="input-text" value="" placeholder="出水tds数值" id="customerOutTDS" name="customerOutTDS">
  354. </div>
  355. </div>
  356. <div class="row cl" id="TDScollectShow" style="display: none;">
  357. <label class="form-label col-1 col-sm-1"></label>
  358. <div class="formControls col-6 col-sm-6">
  359. tds收集:广东省-深圳市-福田区 进水:100ppm 出水:100ppm
  360. </div>
  361. </div>
  362. <div class="row cl" id="sendAddressInfo">
  363. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
  364. <div class="formControls col-5 col-sm-5">
  365. <textarea name="" cols="" rows="2" class="textarea" placeholder="说点什么...">邮寄地址:东莞清溪三中金龙工业区徐福记对面优尼雅电子科技,杨春有,13592708169邮寄备注:您好,麻烦您那边把机器邮寄前请将水箱、接水台中的水倒掉并擦干,不要留有水渍,避免运输途中水或奶粉
  366. 溅入机器内部造成不必要的损失;用原包装或泡沫等材质包裹好机身。避免运输途中造成机器     磕碰、损坏。
  367. 请勿寄顺丰、圆通、EMS以及到付件快递,其他快递物流随意,寄回时,麻烦您在产品里面留下故障原因说明,
  368. 提示:寄回后把单号给我们提供下然后提供下您的姓名、地址和电话方便我们修好后给您寄回去。</textarea>
  369. </div>
  370. </div>
  371. <div class="row cl" id="sendAddressByPhone" style="display: none;">
  372. <label class="form-label col-1 col-sm-1"></label>
  373. <div class="formControls col-2 col-sm-2">
  374. <input type="text" class="input-text" value="" placeholder="请输入手机号" id="" name="">
  375. </div>
  376. <div class="formControls col-2 col-sm-2">
  377. <input type="button" class="btn btn-primary" value="发短信給用户">
  378. </div>
  379. </div>
  380. <div class="row cl" id="updateProduct" style="display: none;">
  381. <label class="form-label col-1 col-sm-1">更换产品:</label>
  382. <div class="formControls col-7 col-sm-7" id="back-product">
  383. <#-- <table class="table table-border table-bg table-bordered">
  384. <thead>
  385. <tr class="text-c">
  386. <th style="text-align: center;" width="60">产品名称</th>
  387. <th style="text-align: center;" width="60">产品颜色</th>
  388. <th style="text-align: center;" width="60">产品配件</th>
  389. </tr>
  390. </thead>
  391. <tbody id="addProduct">
  392. <tr >
  393. <td>冲奶机</td>
  394. <td>
  395. <div>
  396. 白色
  397. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  398. </div>
  399. <div>
  400. 白色
  401. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  402. </div>
  403. </td>
  404. <td>
  405. <div>
  406. 水箱
  407. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  408. </div>
  409. <div>
  410. 水箱
  411. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  412. </div>
  413. </td>
  414. </tr>
  415. </tbody>
  416. </table>-->
  417. </div>
  418. </div>
  419. <div class="row cl">
  420. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>处理描述:</label>
  421. <div class="formControls col-5 col-sm-5">
  422. <script id="describeHandleDescText" type="text/plain" style="width:1024px;height:300px;"></script>
  423. <input type="hidden" id="describeHandleDesc" name="describeHandleDesc">
  424. </div>
  425. </div>
  426. <div class="row cl">
  427. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访信息:</label>
  428. <div class="formControls col-10 col-sm-10 skin-minimal">
  429. <div class="radio-box">
  430. <input type="radio" id="customer-visit-1" name="customerIsVisit" value="2" checked>
  431. <label for="customer-visit-1">需要回访</label>
  432. </div>
  433. <div class="radio-box">
  434. <input type="radio" id="customer-visit-2" name="customerIsVisit" value="1">
  435. <label for="customer-visit-2">不需要回访</label>
  436. </div>
  437. </div>
  438. </div>
  439. <div id="needToVisit">
  440. <div class="row cl" id="needToVisit">
  441. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访人:</label>
  442. <div class="formControls col-2 col-sm-2">
  443. <input type="text" class="input-text" value="" placeholder="填写回访人姓名" id="" name="visit.visitName">
  444. </div>
  445. <div class="formControls col-2 col-sm-2">
  446. <input type="text" class="input-text" value="" placeholder="填写回访人手机号" id="" name="visit.visitTel">
  447. </div>
  448. </div>
  449. <div class="row cl">
  450. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
  451. <div class="formControls col-2 col-sm-2">
  452. <input type="text" placeholder="请选择回访日期" id="datemin" name="visit.visitDate" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})" readonly="readonly">
  453. </div>
  454. </div>
  455. <div class="row cl">
  456. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访时间:</label>
  457. <div class="formControls col-10 col-sm-10 skin-minimal">
  458. <div class="radio-box">
  459. <input type="radio" id="visit-time-1" name="visit.visitTimeSelect">
  460. <label for="visit-time-1">09:00-12:00</label>
  461. </div>
  462. <div class="radio-box">
  463. <input type="radio" id="visit-time-2" name="visit.visitTimeSelect">
  464. <label for="visit-time-2">12:00-14:00</label>
  465. </div>
  466. <div class="radio-box">
  467. <input type="radio" id="visit-time-3" name="visit.visitTimeSelect">
  468. <label for="visit-time-3">14:00-18:00</label>
  469. </div>
  470. </div>
  471. </div>
  472. <div class="row cl">
  473. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
  474. <div class="formControls col-4 col-sm-4"> <span class="select-box">
  475. <select name="" class="select" id="visitAdminId" name="visit.adminId">
  476. </select>
  477. </span>
  478. </div>
  479. </div>
  480. <div class="cl" style="display: table;width: 100%;">
  481. <label class="form-label col-1 col-sm-1"></label>
  482. <div class="formControls col-4 col-sm-4">
  483. <span class="c-red" id="visitAdminIdMsg">您将为自己指定一个回访任务</span>
  484. </div>
  485. </div>
  486. </div>
  487. <div class="row cl">
  488. <div class="col-2 col-sm-2 col-offset-3">
  489. <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
  490. </div>
  491. </div>
  492. </form>
  493. </div>
  494. </article>
  495. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  496. <script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
  497. <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
  498. <script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
  499. <script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
  500. <script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
  501. <#--<script type="text/javascript" src="${path}/common/lib/cm.lib/dimensions.js"></script>-->
  502. <script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
  503. <#--时间控件-->
  504. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  505. <#--百度富文本编译器-->
  506. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
  507. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.js"></script>
  508. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.parse.js"></script>
  509. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
  510. <script type="text/javascript">
  511. $(function(){
  512. $("#province").ProvinceCity();
  513. $('.skin-minimal input').iCheck({
  514. checkboxClass: 'icheckbox-blue',
  515. radioClass: 'iradio-blue',
  516. increaseArea: '20%'
  517. });
  518. $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(result){
  519. console.log($(this)[0].value);
  520. $("#city2").click()
  521. },
  522. attachObject:'#suggest'
  523. });
  524. $("#city2").suggest(citys,{hot_list:commoncitys,attachObject:"#suggest2"})
  525. });
  526. $(document).on('click', '.dalog-ask .answer', function() {
  527. var msg = $(this).find("span").text();
  528. UE.getEditor('describeContentText').setContent(msg,false);
  529. $("#questionId").val($(this).find(".quesId").val());
  530. //$("#answer-textarea").text();
  531. //$(".dalog-ask").hide(); 隐藏qa
  532. });
  533. /*实时监听文本框-- 员工编号*/
  534. document.getElementById("suggest").addEventListener("div", function(){
  535. alert(1);
  536. });
  537. </script>
  538. <script>
  539. /*问题描述*/
  540. var describeContentText = UE.getEditor('describeContentText');
  541. /*处理描述*/
  542. var describeHandleDescText = UE.getEditor('describeHandleDescText');
  543. </script>
  544. <script type="text/javascript">
  545. /*处理结果的执行状态*/
  546. var isSolve = {
  547. solved : [],
  548. noSolved : [],
  549. renewed : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"],
  550. maintain : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"],
  551. reissue : ["录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"],
  552. backGoods : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"],
  553. noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
  554. }
  555. /*个人id*/
  556. var adminId = 0;
  557. /* 咨询类型 1:售前咨询 2:售后咨询 3:其他 */
  558. var allCustomerInfoType = 1;
  559. /*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
  560. var allCustomerType = 1;
  561. /*初始化页面参数*/
  562. $(function () {
  563. /* 初始化单选框样式 */
  564. initCheck();
  565. /*初始化产品类型 -- 客诉头部的产品类型单选 */
  566. initProduceType();
  567. /*初始化问题分类*/
  568. initComplaintTypeInfo();
  569. /*初始化客服*/
  570. initSysAdmin();
  571. /*初始化回访客服*/
  572. initVisitSysAdmin();
  573. /*初始化选择处理结果 -- type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货 */
  574. initProcessResult(1);
  575. /*监听客诉类型选择事件*/
  576. $("input[name='customerCounselType']").change(function (){
  577. allCustomerInfoType = parseInt($(this).val());
  578. initProcessResult(allCustomerType);
  579. })
  580. /*监听处理结果选择事件*/
  581. $("[name='customerIsSolve']").change(function(){
  582. allCustomerType = parseInt($(this).val());
  583. initProcessResult(parseInt($(this).val()));
  584. })
  585. /*监听问题类型 选择事件*/
  586. $("[name='complaintId']").change(function(){
  587. initComplaintSmallClassInfo($(this).val());
  588. })
  589. /*监听问题关键字搜索*/
  590. $(document).on('click', '#search_button', function() {
  591. initComplaintQuestionInfo();
  592. });
  593. /*搜索订单事件*/
  594. $(document).on('click', '#selectOrder', function() {
  595. selectOrder();
  596. });
  597. /*监听省选择事件*/
  598. $(document).on('change', '#province', function() {
  599. var proId = $("#province").val();
  600. var cityId = setCity("",proId,2)
  601. setDistrict("",cityId,2)
  602. });
  603. /*监听市选择事件*/
  604. $(document).on('change', '#city', function() {
  605. var city = $("#city").val();
  606. setDistrict("",city,2)
  607. });
  608. /*监听回访类型选择事件 是否需要回访 1:不需要回访 2:需要回复 */
  609. $("input[name='customerIsVisit']").change(function (){
  610. if($(this).val() == 2){
  611. $("#needToVisit").show();
  612. }else{
  613. $("#needToVisit").hide();
  614. }
  615. })
  616. /*监听回访选择客服的选择事件*/
  617. $(document).on('change', '#visitAdminId', function() {
  618. var visitAdminName = $("#visitAdminId").find("option:selected").text();
  619. var visitAdminId = $("#visitAdminId").val();
  620. if(convertUndefinedToEmpty(visitAdminId) == adminId){
  621. showVisitMsg(1);
  622. }else{
  623. showVisitMsg(2,visitAdminName);
  624. }
  625. });
  626. })
  627. /*初始化单选框样式*/
  628. function initCheck(){
  629. $('.skin-minimal input').iCheck({
  630. checkboxClass: 'icheckbox-blue',
  631. radioClass: 'iradio-blue',
  632. increaseArea: '20%'
  633. });
  634. }
  635. /*初始化客服*/
  636. function initSysAdmin() {
  637. var sysAminList = getSysAdmin();
  638. var html = "";
  639. for(var i=0;i<sysAminList.length;i++){
  640. var adminList = sysAminList[i];
  641. if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
  642. html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
  643. }else{
  644. html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
  645. }
  646. }
  647. $("#adminId").html(html);
  648. }
  649. /*初始化回访客服的选择*/
  650. function initVisitSysAdmin(){
  651. var sysAminList = getSysAdmin();
  652. var html = "";
  653. var flag = false;
  654. for(var i=0;i<sysAminList.length;i++){
  655. var adminList = sysAminList[i];
  656. if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
  657. html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
  658. flag = true;
  659. }else{
  660. html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
  661. }
  662. }
  663. $("#visitAdminId").html(html);
  664. if(flag){
  665. showVisitMsg(1);
  666. }
  667. }
  668. /**
  669. * 用于显示回访指派任务提示信息
  670. * 1 :自己
  671. * 2 :其他人
  672. */
  673. function showVisitMsg(type,adminName) {
  674. if(type == 1){
  675. $("#visitAdminIdMsg").html("您将为自己指定一个回访任务");
  676. }else{
  677. $("#visitAdminIdMsg").html("您将为"+ adminName +"指定一个回访任务");
  678. }
  679. }
  680. /*获取客服*/
  681. function getSysAdmin(){
  682. var sysAminList;
  683. $.ajax({
  684. type: "POST",
  685. data: {
  686. },
  687. url: "${path}/admin/customer/select_sys_admin",
  688. async: false,
  689. success: function(data){
  690. if (data.returnCode == 200) {
  691. sysAminList = data.returnMsg.adminList;
  692. adminId = data.returnMsg.adminId;
  693. }
  694. },
  695. error: function(XmlHttpRequest, textStatus, errorThrown){
  696. }
  697. });
  698. return sysAminList;
  699. }
  700. /*初始化产品类型 -- 客诉头部的产品类型单选*/
  701. function initProduceType(){
  702. var html = "";
  703. $.ajax({
  704. type: "POST",
  705. data: {
  706. },
  707. url: "${path}/admin/customer/select_produce_type",
  708. async: false,
  709. success: function(data){
  710. if (data.returnCode == 200) {
  711. var check = "checked";
  712. for(var i=0;i<data.returnMsg.productTypeList.length;i++){
  713. var produce = data.returnMsg.productTypeList[i];
  714. html += ' <div class="radio-box">' +
  715. '<input type="radio" id="produce-type-'+ i +'" name="typeId" datatype="*" value="'+ produce.typeId +'" '+ check +' nullmsg="请选择产品类型!" >' +
  716. ' <label for="produce-type-'+ i +'">'+ produce.typeName +'</label>' +
  717. ' </div>';
  718. check = "";
  719. }
  720. }else{
  721. html = '';
  722. }
  723. },
  724. error: function(XmlHttpRequest, textStatus, errorThrown){
  725. }
  726. });
  727. $("#produceTypeHtml").html(html);
  728. initCheck();
  729. }
  730. /**
  731. * 选择处理结果-- 默认选择已解决
  732. * type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货
  733. */
  734. function initProcessResult(type){
  735. if(type == null || type == ""){
  736. type = 1;
  737. }
  738. var statusHtml = '<li><span class="arrow"></span><div class="number">status_index</div><div>status_html</div></li>';
  739. var resultHtml = '';
  740. var result = {};
  741. $("#solved").show(); //已解决
  742. $("#noSolved").show();//未解决
  743. if(allCustomerInfoType == 1){ //售前
  744. $("#renewed").hide();
  745. $("#maintain").hide();
  746. $("#reissue").hide();
  747. $("#backGoods").hide();
  748. $("#noReasonBack").hide();
  749. switch(type)
  750. {
  751. case 1:
  752. otherHied();
  753. break;
  754. case 2:
  755. otherHied();
  756. break;
  757. default:
  758. break;
  759. }
  760. }else if(allCustomerInfoType == 2){ //售后
  761. $("#renewed").show();
  762. $("#maintain").show();
  763. $("#reissue").show();
  764. $("#backGoods").show();
  765. $("#noReasonBack").show();
  766. switch(type)
  767. {
  768. case 1:
  769. otherHied();
  770. break;
  771. case 2:
  772. otherHied();
  773. break;
  774. case 3: //换新
  775. result = isSolve.renewed;
  776. $("#relationProduct").html("换新产品");
  777. $("#processResultStatus").show();
  778. $("#orderHead").show();
  779. $("#order").show();
  780. $("#recipientInfo").show();
  781. $("#recipientAddress").show();
  782. $("#recipientAddressText").show();
  783. $("#renewedProduct").show();
  784. $("#TDScollect").show();
  785. $("#TDScollectShow").show();
  786. $("#sendAddressInfo").show();
  787. $("#sendAddressByPhone").show();
  788. $("#updateProduct").show();
  789. break;
  790. case 4: //维修
  791. result = isSolve.maintain;
  792. $("#relationProduct").html("维修产品");
  793. $("#processResultStatus").show();
  794. $("#orderHead").show();
  795. $("#order").show();
  796. $("#recipientInfo").show();
  797. $("#recipientAddress").show();
  798. $("#recipientAddressText").show();
  799. $("#renewedProduct").show();
  800. $("#TDScollect").show();
  801. $("#TDScollectShow").show();
  802. $("#sendAddressInfo").show();
  803. $("#sendAddressByPhone").show();
  804. $("#updateProduct").show();
  805. break;
  806. case 5://补发
  807. result = isSolve.reissue;
  808. $("#relationProduct").html("补发产品");
  809. $("#processResultStatus").show();
  810. $("#orderHead").show();
  811. $("#order").show();
  812. $("#recipientInfo").show();
  813. $("#recipientAddress").show();
  814. $("#recipientAddressText").show();
  815. $("#renewedProduct").show();
  816. $("#TDScollect").show();
  817. $("#TDScollectShow").show();
  818. $("#sendAddressInfo").hide();
  819. $("#sendAddressByPhone").hide();
  820. $("#updateProduct").hide();
  821. break;
  822. case 6: //退货
  823. result = isSolve.backGoods;
  824. $("#relationProduct").html("退货产品");
  825. $("#processResultStatus").show();
  826. $("#orderHead").show();
  827. $("#order").show();
  828. $("#recipientInfo").show();
  829. $("#recipientAddress").show();
  830. $("#recipientAddressText").show();
  831. $("#renewedProduct").show();
  832. $("#TDScollect").show();
  833. $("#TDScollectShow").show();
  834. $("#sendAddressInfo").show();
  835. $("#sendAddressByPhone").show();
  836. $("#updateProduct").hide();
  837. break;
  838. case 7://无理由退货
  839. result = isSolve.noReasonBack;
  840. $("#relationProduct").html("退货产品");
  841. $("#processResultStatus").show();
  842. $("#orderHead").show();
  843. $("#order").show();
  844. $("#recipientInfo").show();
  845. $("#recipientAddress").show();
  846. $("#recipientAddressText").show();
  847. $("#renewedProduct").show();
  848. $("#TDScollect").show();
  849. $("#TDScollectShow").show();
  850. $("#sendAddressInfo").show();
  851. $("#sendAddressByPhone").show();
  852. $("#updateProduct").hide();
  853. break;
  854. default:
  855. break;
  856. }
  857. }
  858. for(var i=0;i< result.length;i++){
  859. var html = statusHtml.replace("status_index",i+1);
  860. html = html.replace("status_html",result[i]);
  861. resultHtml += html;
  862. }
  863. $("#processResultStatus").html(resultHtml);
  864. }
  865. /*已解决|未解决 */
  866. function otherHied(){
  867. $("#processResultStatus").hide(); //处理结果的执行状态 已解决未解决没有该信息
  868. $("#orderHead").hide();
  869. $("#order").hide();
  870. $("#recipientInfo").hide();
  871. $("#recipientAddress").hide();
  872. $("#recipientAddressText").hide();
  873. $("#renewedProduct").hide();
  874. $("#TDScollect").hide();
  875. $("#TDScollectShow").hide();
  876. $("#sendAddressInfo").hide();
  877. $("#sendAddressByPhone").hide();
  878. $("#updateProduct").hide();
  879. }
  880. /*初始化问题大类*/
  881. function initComplaintTypeInfo() {
  882. //默认为售前咨询
  883. var customerCounselTypeOverall = allCustomerInfoType;
  884. var html = "";
  885. $.ajax({
  886. type: "POST",
  887. data: {
  888. complaintConsultingType : customerCounselTypeOverall
  889. },
  890. url: "${path}/admin/complaintQuestion/list_complaintType",
  891. async: false,
  892. success: function(data){
  893. var id;
  894. if (data.returnCode == 200) {
  895. for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
  896. var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
  897. if(i == 0 ){
  898. id = complaintTypeInfo.complaintId;
  899. }
  900. html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
  901. }
  902. }else{
  903. html = '';
  904. }
  905. $("[name='complaintId']").html(html);
  906. initComplaintSmallClassInfo(id)
  907. },
  908. error: function(XmlHttpRequest, textStatus, errorThrown){
  909. }
  910. });
  911. }
  912. /*显示小类*/
  913. function initComplaintSmallClassInfo(complaintId){
  914. var html = "";
  915. $.ajax({
  916. type: "POST",
  917. data: {
  918. complaintId : complaintId
  919. },
  920. url: "${path}/admin/complaintQuestion/list_complaintSmallClass",
  921. async: false,
  922. success: function(data){
  923. if (data.returnCode == 200) {
  924. for(var i=0;i<data.returnMsg.complaintSmallClassInfoList.length;i++){
  925. var ComplaintSmallClassInfo = data.returnMsg.complaintSmallClassInfoList[i];
  926. html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
  927. }
  928. }else{
  929. html = '';
  930. }
  931. $("[name='smallClassId']").html(html);
  932. },
  933. error: function(XmlHttpRequest, textStatus, errorThrown){
  934. }
  935. });
  936. }
  937. /**
  938. * 搜索QA 显示
  939. */
  940. function initComplaintQuestionInfo(){
  941. var complaintId = $("[name='complaintId']").val();
  942. var smallClassId = $("[name='smallClassId']").val();;
  943. var questionName = $("[name='questionId']").val();;;
  944. var html = "";
  945. $.ajax({
  946. type: "POST",
  947. data: {
  948. complaintId : complaintId,
  949. smallClassId : smallClassId,
  950. questionName : questionName
  951. },
  952. url: "${path}/admin/complaintQuestion/list_complaintQuestion",
  953. async: false,
  954. success: function(data){
  955. if (data.returnCode == 200) {
  956. for(var i=0;i<data.returnMsg.complaintQuestionInfoList.length;i++){
  957. var complaintQuestion= data.returnMsg.complaintQuestionInfoList[i];
  958. html += '<li class="ask">'+ complaintQuestion.questionName +'' +
  959. '</li>' +
  960. '<li class="answer" style="height: 65px;overflow: hidden;">答:<span>'+ complaintQuestion.questionProfile +'</span><input class="quesId" value="'+ complaintQuestion.questionId +'"></li>';
  961. }
  962. }else{
  963. html = '';
  964. }
  965. $("#question").html(html);
  966. },
  967. error: function(XmlHttpRequest, textStatus, errorThrown){
  968. }
  969. });
  970. $(".dalog-ask").show();
  971. }
  972. /**
  973. * 发送短信
  974. * @param phone 手机号码
  975. * @param desc 发送内容
  976. * @param node 返回结果显示节点
  977. */
  978. function sendPhone(phone,desc,node){
  979. }
  980. /***
  981. * 打开搜索订单框
  982. */
  983. function selectOrder(){
  984. layer_show("搜索订单","${path}/admin/customer/select_order","1000","500");
  985. }
  986. /**
  987. * 显示选择的订单
  988. */
  989. function setSelectOrder(orderId){
  990. var html = '';
  991. var address = ''; //地址
  992. var orderItemList = {};
  993. $.ajax({
  994. type: "POST",
  995. data: {
  996. salesId : orderId
  997. },
  998. url: "${path}/admin/customer/select_salesOrder",
  999. async: false,
  1000. success: function(data){
  1001. if (data.returnCode == 200) {
  1002. for(var i=0;i<data.returnMsg.salesOrderList.length;i++){
  1003. var salesOrder = data.returnMsg.salesOrderList[i];
  1004. var productsHtml = '';
  1005. var salesOrderItem = salesOrder.salesOrderItemList;
  1006. orderItemList = salesOrder.salesOrderItemList;
  1007. for(var j=0;j<salesOrderItem.length;j++){
  1008. var item = salesOrderItem[j].itemProductName + "*" + salesOrderItem[j].itemNum;
  1009. if(j==0){
  1010. productsHtml += item
  1011. }else{
  1012. productsHtml += '<br>'+ item
  1013. }
  1014. }
  1015. var time = formatDate(new Date(salesOrder.salesCreateTime),"yyyy-MM-dd");
  1016. html += '' +
  1017. ' <td>'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
  1018. ' <td>'+ salesOrder.salesId +'</td>' +
  1019. ' <td>'+ salesOrder.salesAddressName +'</td>' +
  1020. ' <td>'+ salesOrder.salesAddressTel +'</td>' +
  1021. ' <td>'+ salesOrder.salesAmount +'</td>' +
  1022. ' <td>'+ productsHtml +'</td>' +
  1023. ' <td>'+ time +'</td>' +
  1024. '';
  1025. //address = '<td colspan="1">收货地址</td><td colspan="6" class="td-manage text-c" >'+ salesOrder.salesAddressInfo +'&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #0a6999;text-decoration: underline;" href="javascript:void(0);" title="编辑" onclick="updateAdress()">修改地址</a></td>' ;
  1026. address = salesOrder.salesAddressInfo;
  1027. $("#sendName").val(salesOrder.salesAddressName); //订单名称
  1028. $("#sendTel").val(salesOrder.salesAddressTel); //订单电话号码
  1029. }
  1030. // $("#showOrderAddress").html(address);
  1031. }else{
  1032. html = '';
  1033. }
  1034. $("#showOrder").html(html); //显示订单
  1035. },
  1036. error: function(XmlHttpRequest, textStatus, errorThrown){
  1037. }
  1038. });
  1039. $("#addressInfo").val(address);
  1040. setAdress(); //显示地址
  1041. setProduce(orderItemList); //显示产品
  1042. }
  1043. /**
  1044. * 设置地址
  1045. */
  1046. function setAdress(){
  1047. var addres = $("#addressInfo").val();
  1048. $("#addrssMsg").html("");
  1049. if(addres == null){
  1050. $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
  1051. return;
  1052. }
  1053. var addresList = addres.split("-");
  1054. if(addresList[0] == null || addresList[1]==null || addresList[2]==null || addresList[3]==null){
  1055. $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
  1056. return;
  1057. }
  1058. var proId = setPro(getAddress(addresList[0],0),1);
  1059. var cityId = setCity(getAddress(addresList[1],1),proId,1);
  1060. setDistrict(getAddress(addresList[2],2),cityId,1);
  1061. $("#sendAddress").val(addresList[3]);
  1062. }
  1063. /***
  1064. * 删除 “省”,“市”,“区”关键字
  1065. * type : 0:省 2:市 3:区
  1066. */
  1067. function getAddress(addrss,type) {
  1068. var abbreviation = "";
  1069. if(addrss == ""){
  1070. abbreviation = "";
  1071. }else{
  1072. switch(type)
  1073. {
  1074. case 0:
  1075. var proReg = new RegExp("省","g");
  1076. abbreviation = addrss.replace(proReg,"");
  1077. break;
  1078. case 1:
  1079. var cityReg = new RegExp("市","g");
  1080. abbreviation = addrss.replace(cityReg,"");
  1081. break;
  1082. case 2:
  1083. var districtReg = new RegExp("市","g");
  1084. abbreviation = addrss.replace(districtReg,"");
  1085. break;
  1086. default:
  1087. break;
  1088. }
  1089. }
  1090. return abbreviation
  1091. }
  1092. /**
  1093. * 设置省
  1094. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1095. */
  1096. function setPro(provinceName,type) {
  1097. var proId = '';
  1098. var province = listProvince();
  1099. var selectPro = {};
  1100. if(type == 1){
  1101. selectPro = listProvince("",provinceName);
  1102. }else if(type == 2){
  1103. selectPro = null;
  1104. }
  1105. if(province!=null){
  1106. var provinceHtml = ''
  1107. for(var i=0;i<province.length;i++){
  1108. if(selectPro!= null && province[i].provinceId == selectPro[0].provinceId){
  1109. proId = selectPro[0].provinceId;
  1110. provinceHtml += '<option value="'+ province[i].provinceId +'" selected>'+ province[i].province +'</option>';
  1111. }else{
  1112. provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
  1113. }
  1114. }
  1115. $("#province").html(provinceHtml);
  1116. }
  1117. return proId;
  1118. }
  1119. /**
  1120. * 设置市
  1121. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1122. */
  1123. function setCity(cityName,proId,type) {
  1124. var cityId = '';
  1125. var city = listCity(proId,"");
  1126. var selectCity = {};
  1127. if(type == 1){
  1128. selectCity = listCity(proId,cityName);
  1129. }else if(type == 2){
  1130. selectCity = null;
  1131. cityId = city[0].cityId;
  1132. }
  1133. if(city!=null){
  1134. var cityHtml = ''
  1135. for(var i=0;i<city.length;i++){
  1136. if(selectCity != null && city[i].cityId == selectCity[0].cityId){
  1137. cityId = city[i].cityId;
  1138. cityHtml += '<option value="'+ city[i].cityId +'" selected>'+ city[i].city +'</option>';
  1139. }else{
  1140. cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
  1141. }
  1142. }
  1143. $("#city").html(cityHtml);
  1144. }
  1145. return cityId;
  1146. }
  1147. /**
  1148. * 设置区
  1149. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1150. */
  1151. function setDistrict(districtName,cityId,type) {
  1152. var district = listDistrict(cityId,"");
  1153. var selectDistrict = {};
  1154. if(type == 1){
  1155. selectDistrict = listDistrict(cityId,districtName);
  1156. }else if(type == 2){
  1157. selectDistrict = null;
  1158. }
  1159. if(district!=null){
  1160. var districtHtml = ''
  1161. for(var i=0;i<district.length;i++){
  1162. if(selectDistrict != null && district[i].districtId == selectDistrict[0].districtId){
  1163. districtHtml += '<option value="'+ district[i].districtId +'" selected>'+ district[i].district +'</option>';
  1164. }else{
  1165. districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
  1166. }
  1167. }
  1168. $("#district").html(districtHtml);
  1169. }
  1170. }
  1171. /* TDS收集设置区 */
  1172. var TDSCity = '';
  1173. function linkageSetDistrict(){
  1174. var arrcity_3word = $("#arrcity_3word").val();
  1175. var cityName = '北京';
  1176. for(var i = 0;i<citys.length;i++){
  1177. for(var j=0;j<citys[i].length;j++){
  1178. if(j == 0 && arrcity_3word == citys[i][j]){
  1179. cityName = citys[i][1];
  1180. }
  1181. }
  1182. }
  1183. TDSCity = cityName;
  1184. var selectCity = listCity(null,cityName);
  1185. var cityId = selectCity[0].cityId;
  1186. var selectDistrict = listDistrict(cityId,"");
  1187. var html = '';
  1188. for(var i=0;i<selectDistrict.length;i++){
  1189. html += '<option value="'+ selectDistrict[i].districtId +'">'+ selectDistrict[i].district +'</option>';
  1190. }
  1191. $("#TDSArea").html(html);
  1192. $("#TDSArea").find("option").eq(0).prop("selected",true);
  1193. }
  1194. /**
  1195. * 展示产品
  1196. * @param orderItemList
  1197. */
  1198. function setProduce(orderItemList) {
  1199. var productList = getProduct() ; //所有产品
  1200. var html = "";
  1201. var productTypeNo = 0;
  1202. for(var i=0;i<productList.length;i++) {
  1203. var product = productList[i];
  1204. var produceFittings = getProduceFittings(product.productId); //获取该产品的所有配件
  1205. var colorList = product.colorList; //该产品的所有颜色
  1206. var productType = product.productType;
  1207. var colorHtml = '';
  1208. if(colorList != null && colorList.length >0 ){
  1209. for(var k=0;k<orderItemList.length;k++){
  1210. var item = orderItemList[k];
  1211. for(var j=0;j<colorList.length;j++){
  1212. var color = colorList[j];
  1213. var number = "";
  1214. if(item.itemColorId == color.colorId){
  1215. number = item.itemNum;
  1216. }
  1217. if(color.colorProductId == product.productId) {
  1218. colorHtml += '<div class="color-div">' +
  1219. '<input type="hidden" value="' + color.colorId + '">' +
  1220. '<span>' + color.colorName + '<span>&nbsp;&nbsp;' +
  1221. '<input type="text" class="input-text input-produce input-pro-number" style="width: 40px;text-align: center;" value="'+ number +'" placeholder="" id="" name="">' +
  1222. '</div>';
  1223. }
  1224. }
  1225. }
  1226. }else{
  1227. colorHtml += '<span>暂无该产品的颜色!<span>';
  1228. }
  1229. var produceFittingsHtml = '';
  1230. if(produceFittings != null && produceFittings.length > 0){
  1231. for(var m=0;m<produceFittings.length;m++){
  1232. var produceFit = produceFittings[m];
  1233. if(produceFit.productId == product.productId){
  1234. produceFittingsHtml += '<div class="color-div">' +
  1235. '<input type="hidden" value="' + produceFit.fittingsId +'">'+
  1236. '<span>' + produceFit.fittingsName +'<span>&nbsp;&nbsp;'+
  1237. '<input type="text" class="input-text input-produce input-pro-number" style="width: 40px;text-align: center;" value="" placeholder="" id="" name="">' +
  1238. '</div>';
  1239. }
  1240. }
  1241. }else{
  1242. produceFittingsHtml += '<span>暂无产品配件!<span>';
  1243. }
  1244. var produceHtml = '<input type="hidden" value="'+ product.productId +'">' +
  1245. '<span>'+ product.productName +'</span>';
  1246. html += ' <tr >' +
  1247. ' <td>'+ produceHtml +'</td>' +
  1248. ' <td>' +
  1249. colorHtml +
  1250. ' </td>' +
  1251. ' <td>' +
  1252. produceFittingsHtml +
  1253. ' </td>' +
  1254. '</tr>';
  1255. }
  1256. $("#addProduct").html(html);
  1257. initCheck(); //因为需要展示产品,所以再次初始化多选框
  1258. setBackProduct(); //设置寄回产品
  1259. monitorProduct(); //监听产品变化
  1260. }
  1261. /*获取产品*/
  1262. function getProduct(){
  1263. var productList;
  1264. $.ajax({
  1265. type: "POST",
  1266. data: {
  1267. },
  1268. url: "${path}/admin/customer/select_produce",
  1269. async: false,
  1270. success: function(data){
  1271. if (data.returnCode == 200) {
  1272. productList = data.returnMsg.productList;
  1273. }
  1274. },
  1275. error: function(XmlHttpRequest, textStatus, errorThrown){
  1276. }
  1277. });
  1278. return productList;
  1279. }
  1280. /*获取产品配件*/
  1281. function getProduceFittings(productId){
  1282. var produceFittings;
  1283. $.ajax({
  1284. type: "get",
  1285. data: {
  1286. productId : productId
  1287. },
  1288. url: "${path}/admin/customer/select_produce_fittings",
  1289. async: false,
  1290. success: function(data){
  1291. if (data.returnCode == 200) {
  1292. produceFittings = data.returnMsg.produceFittingsList;
  1293. }
  1294. },
  1295. error: function(XmlHttpRequest, textStatus, errorThrown){
  1296. }
  1297. });
  1298. return produceFittings;
  1299. }
  1300. /*监听产品变化*/
  1301. function monitorProduct(){
  1302. /*产品数量*/
  1303. $(".input-pro-number").blur(function (){
  1304. setBackProduct();
  1305. })
  1306. }
  1307. /*添加产品*/
  1308. function addProduct(){
  1309. var html = '';
  1310. var productList = getProduct();
  1311. var produceHtml = '<select name="" class="select" style="width: 100px;">';
  1312. for(var i=0;i<productList.length;i++){
  1313. }
  1314. html+= '<div class="formControls col-1 col-sm-1">\n' +
  1315. ' <a><img src="${path}/common/images/cm/add-produce.png" width="21" height="21"></button></a>\n' +
  1316. ' </div>'
  1317. html += '<div class="skin-minimal">' +
  1318. ' <div class="check-box">' +
  1319. ' <input type="checkbox" id="checkbox-1" checked>' +
  1320. '' +
  1321. ' <label for="checkbox-1">净水机</label> -' +
  1322. '' +
  1323. ' <label for="checkbox-1">净水机</label>' +
  1324. '' +
  1325. ' <select name="" class="select" style="width: 100px;">' +
  1326. ' <option value="0">黑色</option>' +
  1327. ' <option value="1">白色</option>' +
  1328. ' </select>' +
  1329. ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">' +
  1330. ' </div>' +
  1331. '' +
  1332. ' <div class="check-box">' +
  1333. ' <input type="checkbox" id="checkbox-2" checked>' +
  1334. ' <label for="checkbox-2">水箱</label>' +
  1335. ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">' +
  1336. ' </div>' +
  1337. ' <div class="check-box">' +
  1338. ' <input type="checkbox" id="checkbox-3" checked>' +
  1339. ' <label for="checkbox-2">T1</label>' +
  1340. ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">' +
  1341. ' </div>' +
  1342. ' <div class="check-box">' +
  1343. ' <input type="checkbox" id="checkbox-4" checked>' +
  1344. ' <label for="checkbox-2">T2</label>' +
  1345. ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">' +
  1346. ' </div>' +
  1347. ' </div>'
  1348. }
  1349. /*设置寄回产品*/
  1350. function setBackProduct() {
  1351. var html = '';
  1352. $("#back-product").html(html);
  1353. }
  1354. </script>
  1355. <script>
  1356. $(function(){
  1357. $("#form-customer-add").Validform({
  1358. tiptype: function (msg, o, cssctl) {
  1359. if (o.type == 3) {//失败
  1360. layer.msg(msg, {icon: 5, time: 3000});
  1361. $(window).scrollTop(o.obj.offset().top - 40);
  1362. }
  1363. },
  1364. datatype: {//自定义验证类型
  1365. },
  1366. ignoreHidden: true,
  1367. tipSweep: true, //若为true,则只在表单提交时验证
  1368. ajaxPost: true, //异步提交
  1369. beforeCheck: function (curform) { //验证通过之前执行的函数
  1370. },
  1371. beforeSubmit: function (curform) { //验证通过之后执行的函数
  1372. addCustomerReady();
  1373. },
  1374. callback: function (data) {//异步回调函数
  1375. return ;
  1376. if (data) {
  1377. var index = layer.alert(data.resultMsg, function () {
  1378. if (data.resultCode == 200) {
  1379. //location.href = "${path}/admin/bom/_bom_list";
  1380. } else {
  1381. //layer.close(index);
  1382. }
  1383. return ;
  1384. });
  1385. }
  1386. }
  1387. });
  1388. })
  1389. /* 添加客诉的准备 */
  1390. function addCustomerReady(){
  1391. /*----TDS收集模块--start-----*/
  1392. var valicity = $(".ac_result_tip").html();
  1393. if(valicity == null || valicity == "" || typeof(valicity)=="undefined"){
  1394. $("#TDSArea").html("");
  1395. }else if(valicity.indexOf("对不起,找不到") > 0 ){
  1396. $("#TDSArea").html("");
  1397. $("#customerArea").val("");
  1398. }else{
  1399. var TDSArea = $("#TDSArea").find("option:selected").text();
  1400. if(TDSArea != null && TDSArea != ""){
  1401. var area = TDSCity + "-" + TDSArea
  1402. $("#customerArea").val(area);
  1403. }
  1404. }
  1405. /*----TDS收集模块--end-----*/
  1406. /*----问题描述- start --*/
  1407. var describeContentText = UE.getEditor('describeContentText').getContent();
  1408. $("#describeContent").val(describeContentText);
  1409. /*----问题描述--end-----*/
  1410. /*----处理描述- start --*/
  1411. var describeHandleDescText = UE.getEditor('describeHandleDescText').getContent();
  1412. $("#describeHandleDesc").val(describeHandleDescText);
  1413. /*----处理描述--end-----*/
  1414. }
  1415. /* 添加客诉 */
  1416. // function save_submit(){
  1417. // var customerSourceType = $("input[name='customerSourceType']:checked").val();
  1418. // if(customerSourceType == 3){
  1419. // var customerSource = $("#customerSource").val();
  1420. // if(customerSource == null || customerSource ==""){
  1421. // showErrorMsg($("#customerSource"),"请输入来源入口!");
  1422. // }
  1423. // }
  1424. // }
  1425. /*提示错误信息*/
  1426. function showErrorMsg(node,msg){
  1427. node.select();
  1428. layer.msg(msg, {icon: 2, time: 2000});
  1429. }
  1430. </script>
  1431. <!--/请在上方写此页面业务相关的脚本-->
  1432. </body>
  1433. </html>