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