add_customer.ftl 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617
  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. .table-td-color{}
  49. </style>
  50. <title>添加客诉 - 客诉管理 - RST</title>
  51. </head>
  52. <body>
  53. <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
  54. <span class="c-gray en">&gt;</span> 客诉管理
  55. <span class="c-gray en">&gt;</span> 添加客诉
  56. <a class="btn radius r"
  57. style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
  58. href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
  59. </nav>
  60. <article class="page-container" style="padding: 10px;">
  61. <div class="pd-20 cl">
  62. <form action="${path}/admin/customer/save_customer" method="post" class="form form-horizontal" id="form-customer-add" onkeydown="if(event.keyCode==13)return false;">
  63. <div class="row cl">
  64. <label class="form-label col-3">
  65. <div class="tit-2">客诉基本信息</div>
  66. </label>
  67. <div class="formControls col-9">
  68. </div>
  69. </div>
  70. <div class="row cl">
  71. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>跟进客服:</label>
  72. <div class="formControls col-4 col-sm-4"> <span class="select-box">
  73. <select name="adminId" id="adminId" class="select">
  74. </select>
  75. </span>
  76. </div>
  77. </div>
  78. <div class="row cl">
  79. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>来源入口:</label>
  80. <div class="formControls col-10 col-sm-10 skin-minimal">
  81. <div class="radio-box">
  82. <input type="radio" id="tel-1" name="customerSourceType" value="1" datatype="*" checked nullmsg="请选择来源入口!">
  83. <label for="tel-1">400电话</label>
  84. </div>
  85. <div class="radio-box">
  86. <input type="radio" id="tel-2" name="customerSourceType" value="2">
  87. <label for="tel-2">微信公众号</label>
  88. </div>
  89. <div class="radio-box">
  90. <input type="radio" id="tel-3" name="customerSourceType" value="3">
  91. <label for="tel-3">其他</label>
  92. <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" value="" placeholder="" id="customerSource" name="customerSource">
  93. </div>
  94. </div>
  95. </div>
  96. <div class="row cl">
  97. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>咨询类型:</label>
  98. <div class="formControls col-10 col-sm-10 skin-minimal">
  99. <div class="radio-box">
  100. <input type="radio" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1" checked >
  101. <label for="customer-type-1">售前咨询</label>
  102. </div>
  103. <div class="radio-box">
  104. <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2" >
  105. <label for="customer-type-2">售后咨询</label>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="row cl">
  110. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
  111. <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
  112. <#--<div class="radio-box">
  113. <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
  114. <label for="tel-3">净水机</label>
  115. </div>
  116. <div class="radio-box">
  117. <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
  118. <label for="tel-4">冲奶机</label>
  119. </div>-->
  120. </div>
  121. </div>
  122. <div class="row cl" style="position: relative;">
  123. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
  124. <div class="formControls col-2 col-sm-2"> <span class="select-box">
  125. <select name="complaintId" class="select">
  126. <#--<option value="0">使用操作</option>-->
  127. <#--<option value="1">使用操作</option>-->
  128. </select>
  129. </span>
  130. </div>
  131. <div class="formControls col-2 col-sm-2"> <span class="select-box">
  132. <select name="smallClassId" class="select">
  133. <#--<option value="0">使用操作制水出水</option>
  134. <option value="1">使用操作制水出水</option>-->
  135. </select>
  136. </span>
  137. </div>
  138. <div class="formControls col-2 col-sm-2">
  139. <div class="clearfix">
  140. <input type="text" placeholder="搜索关键词" class="input-text ac_input" name="questionIdMsg" value="" id="search_text" autocomplete="off" style="width:60%"><button type="button" class="btn btn-primary" id="search_button">搜索</button>
  141. </div>
  142. </div>
  143. <div class="dalog-ask">
  144. <div class="tag">
  145. <em></em>
  146. <strong>相关QA</strong>
  147. <ul id="question">
  148. <#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
  149. <li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
  150. </ul>
  151. </div>
  152. </div>
  153. </div>
  154. <div class="row cl">
  155. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题标题:</label>
  156. <div class="formControls col-5 col-sm-5">
  157. <input type="text" class="input-text" style="width: 625px;" name="describeTitle" id="describeTitle">
  158. </div>
  159. </div>
  160. <div class="row cl">
  161. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题内容:</label>
  162. <div class="formControls col-5 col-sm-5">
  163. <input type="hidden" name="questionId" id="questionId">
  164. <script id="describeContentText" type="text/plain" style="width:650px;height:250px;">
  165. </script>
  166. </script>
  167. <input type="hidden" name="describeContent" id="describeContent">
  168. </div>
  169. </div>
  170. <div class="row cl">
  171. <label class="form-label col-1 col-sm-1"></label>
  172. <div class="formControls col-2 col-sm-2">
  173. <input type="text" class="input-text" value="" placeholder="请输入手机号" id="" name="">
  174. </div>
  175. <div class="formControls col-2 col-sm-2">
  176. <input type="button" class="btn btn-primary" value="发短信給用户">
  177. </div>
  178. </div>
  179. <div class="row cl">
  180. <label class="form-label col-1 col-sm-1">
  181. <div class="tit">处理结果</div>
  182. </label>
  183. <div class="formControls col-10 col-sm-10">
  184. </div>
  185. </div>
  186. <input type="hidden" id="sendProdcues" name="sendProdcuesJson" value="">
  187. <input type="hidden" id="sendFittings" name="sendFittingsJson" value="">
  188. <input type="hidden" id="closedProdcues" name="closedProdcuesJson" value="">
  189. <input type="hidden" id="closedFittings" name="closedFittingsJson" value="">
  190. <div class="row cl">
  191. <label class="form-label col-1 col-sm-1">处理类型:</label>
  192. <div class="formControls col-10 col-sm-10 skin-minimal">
  193. <div class="radio-box" id="solved">
  194. <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" checked>
  195. <label for="customer-process-1">已解决</label>
  196. </div>
  197. <div class="radio-box" id="noSolved">
  198. <input type="radio" id="customer-process-2" value="2" name="customerIsSolve">
  199. <label for="customer-process-2">未解决</label>
  200. </div>
  201. <div class="radio-box" id="renewed">
  202. <input type="radio" id="customer-process-3" value="3" name="customerIsSolve">
  203. <label for="customer-process-3">换新</label>
  204. </div>
  205. <div class="radio-box" id="maintain">
  206. <input type="radio" id="customer-process-4" value="4" name="customerIsSolve">
  207. <label for="customer-process-4">维修</label>
  208. </div>
  209. <div class="radio-box" id="reissue">
  210. <input type="radio" id="customer-process-5" value="5" name="customerIsSolve">
  211. <label for="customer-process-5">补发</label>
  212. </div>
  213. <div class="radio-box" id="backGoods">
  214. <input type="radio" id="customer-process-6" value="6" name="customerIsSolve">
  215. <label for="customer-process-6">退货</label>
  216. </div>
  217. <div class="radio-box" id="noReasonBack">
  218. <input type="radio" id="customer-process-7" value="7" name="customerIsSolve">
  219. <label for="customer-process-7">无理由退货</label>
  220. </div>
  221. </div>
  222. </div>
  223. <div class="row cl">
  224. <label class="form-label col-1 col-sm-1"></label>
  225. <div class="formControls col-10 col-sm-10">
  226. <ul class="time-line-list" id="processResultStatus">
  227. <#-- <li><span class="arrow"></span><div class="number">1</div><div>录入客诉</div></li>
  228. <li><span class="arrow"></span><div class="number">2</div><div>督促用户寄回</div></li>
  229. <li><span class="arrow"></span><div class="number">3</div><div>录入快递单号</div></li>
  230. <li><span class="arrow"></span><div class="number">4</div><div>仓库收货</div></li>
  231. <li><span class="arrow"></span><div class="number">5</div><div>换新发货</div></li>
  232. <li><span class="arrow"></span><div class="number">6</div><div>发货通知用户</div></li>
  233. <li><span class="arrow"></span><div class="number">7</div><div>收货后回访</div></li>-->
  234. </ul>
  235. </div>
  236. </div>
  237. <div class="row cl" id="orderHead" style="display: none;">
  238. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>订单信息:</label>
  239. <div class="formControls col-1 col-sm-1">
  240. <button type="button" class="btn btn-primary" id="selectOrder">搜索订单</button>
  241. </div>
  242. </div>
  243. <div class="row cl" id="order" style="display: none;">
  244. <label class="form-label col-1 col-sm-1"></label>
  245. <div class="formControls col-9 col-sm-9 text-c">
  246. <table class="table table-border table-bg table-bordered">
  247. <tr>
  248. <th style="text-align: center;">销售</th>
  249. <th style="text-align: center;">订单号</th>
  250. <th style="text-align: center;">姓名</th>
  251. <th style="text-align: center;">电话</th>
  252. <th style="text-align: center;">订单金额</th>
  253. <th style="text-align: center;">购买产品</th>
  254. <th style="text-align: center;">购买日期</th>
  255. </tr>
  256. <tr id="showOrder">
  257. <#-- <td>爱贝源-微信商城</td>
  258. <td>1290387806</td>
  259. <td>何小小</td>
  260. <td>1882222888</td>
  261. <td>¥3680</td>
  262. <td>Watero净水机</td>
  263. <td>2017-06-06</td>-->
  264. </tr>
  265. <#--<tr id="showOrderAddress">-->
  266. <#--</tr>-->
  267. </table>
  268. <input type="hidden" id="companyId" name="companyId" value="" >
  269. <input type="hidden" id="storeId" name="storeId" value="" >
  270. <input type="hidden" id="orderId" name="salesId" value="" >
  271. </div>
  272. </div>
  273. <div class="row cl" id="recipientInfo" style="display: none;">
  274. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>收件信息:</label>
  275. <div class="formControls col-2 col-sm-2">
  276. <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="s1-20" errormsg="联系人格式不正确!" >
  277. </div>
  278. <div class="formControls col-2 col-sm-2">
  279. <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="sendTel" name="relationSendTel" datatype="m" errormsg="联系人电话格式不正确!">
  280. </div>
  281. </div>
  282. <div class="row cl" id="recipientAddress" style="display: none;">
  283. <input type="hidden" id="addressInfo">
  284. <label class="form-label col-1 col-sm-1"></label>
  285. <div class="formControls col-2 col-sm-2">
  286. <span class="select-box">
  287. <select id="province" class="select" name="provinceNumber">
  288. </select>
  289. </span>
  290. </div>
  291. <div class="formControls col-2 col-sm-2">
  292. <span class="select-box">
  293. <select id="city" class="select" name="cityNumber">
  294. </select>
  295. </span>
  296. </div>
  297. <div class="formControls col-2 col-sm-2">
  298. <span class="select-box">
  299. <select id="district" class="select" name="areaNumber">
  300. </select>
  301. </span>
  302. </div>
  303. <input type="hidden" name="relationSendMergeAddress" id="relationSendMergeAddress">
  304. </div>
  305. <div class="row cl" id="recipientAddressText" style="display: none;">
  306. <label class="form-label col-1 col-sm-1"></label>
  307. <div class="formControls col-5 col-sm-5">
  308. <textarea name="relationSendAddress" id="sendAddress" cols="" rows="2" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)"></textarea>
  309. <span id="addrssMsg"></span>
  310. </div>
  311. </div>
  312. <div class="row cl" id="renewedProduct" style="display: none;">
  313. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span><span id="relationProduct">换新产品</span>:</label>
  314. <div class="formControls col-9 col-sm-9 text-c" id="produceSelect">
  315. <table class="table table-border table-bg table-bordered">
  316. <thead>
  317. <tr class="text-c">
  318. <th style="text-align: center;" width="60">产品名称</th>
  319. <th style="text-align: center;" width="60">产品颜色</th>
  320. <th style="text-align: center;" width="60">产品配件</th>
  321. </tr>
  322. </thead>
  323. <tbody id="addProduct">
  324. <#--<tr >
  325. <td>冲奶机</td>
  326. <td>
  327. <div>
  328. 白色
  329. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  330. </div>
  331. <div>
  332. 白色
  333. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  334. </div>
  335. </td>
  336. <td>
  337. <div>
  338. 水箱
  339. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  340. </div>
  341. <div>
  342. 水箱
  343. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  344. </div>
  345. </td>
  346. </tr>-->
  347. </tbody>
  348. </table>
  349. </div>
  350. </div>
  351. <div class="row cl" id="TDScollect" style="display: none;">
  352. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>TDS收集:</label>
  353. <div class="formControls col-2 col-sm-2" style="position: relative;">
  354. <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
  355. <input style="width: 140px;" placeholder="" class="input-text my-search-input" type="text" name="arrcity" id="arrcity" />
  356. <div id="suggest" class="ac_results"></div>
  357. </div>
  358. <div class="formControls col-2 col-sm-2">
  359. <span class="select-box">
  360. <select name="" class="select" id="TDSArea" name="TDSArea">
  361. </select>
  362. </span>
  363. </div>
  364. <input type="hidden" name="customerArea" id="customerArea">
  365. <div class="formControls col-2 col-sm-2">
  366. <input type="text" class="input-text" value="" placeholder="进水tds数值" id="customerInTDS" name="customerInTDS">
  367. </div>
  368. <div class="formControls col-2 col-sm-2">
  369. <input type="text" class="input-text" value="" placeholder="出水tds数值" id="customerOutTDS" name="customerOutTDS">
  370. </div>
  371. </div>
  372. <div class="row cl" id="TDScollectShow" style="display: none;">
  373. <label class="form-label col-1 col-sm-1"></label>
  374. <div class="formControls col-6 col-sm-6">
  375. tds收集:广东省-深圳市-福田区 进水:100ppm 出水:100ppm
  376. </div>
  377. </div>
  378. <div class="row cl" id="sendAddressInfo">
  379. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
  380. <div class="formControls col-5 col-sm-5">
  381. <textarea name="" cols="" rows="2" class="textarea" placeholder="说点什么...">邮寄地址:东莞清溪三中金龙工业区徐福记对面优尼雅电子科技,杨春有,13592708169邮寄备注:您好,麻烦您那边把机器邮寄前请将水箱、接水台中的水倒掉并擦干,不要留有水渍,避免运输途中水或奶粉
  382. 溅入机器内部造成不必要的损失;用原包装或泡沫等材质包裹好机身。避免运输途中造成机器     磕碰、损坏。
  383. 请勿寄顺丰、圆通、EMS以及到付件快递,其他快递物流随意,寄回时,麻烦您在产品里面留下故障原因说明,
  384. 提示:寄回后把单号给我们提供下然后提供下您的姓名、地址和电话方便我们修好后给您寄回去。</textarea>
  385. </div>
  386. </div>
  387. <div class="row cl" id="sendAddressByPhone" style="display: none;">
  388. <label class="form-label col-1 col-sm-1"></label>
  389. <div class="formControls col-2 col-sm-2">
  390. <input type="text" class="input-text" value="" placeholder="请输入手机号" id="" name="">
  391. </div>
  392. <div class="formControls col-2 col-sm-2">
  393. <input type="button" class="btn btn-primary" value="发短信給用户">
  394. </div>
  395. </div>
  396. <div class="row cl" id="updateProduct" style="display: none;">
  397. <label class="form-label col-1 col-sm-1">更换产品:</label>
  398. <div class="formControls col-9 col-sm-9" >
  399. <table class="table table-border table-bg table-bordered">
  400. <thead>
  401. <tr class="text-c">
  402. <th style="text-align: center;" width="60">产品名称</th>
  403. <th style="text-align: center;" width="60">产品颜色</th>
  404. <th style="text-align: center;" width="60">产品配件</th>
  405. </tr>
  406. </thead>
  407. <tbody id="back-product">
  408. </tbody>
  409. </table>
  410. </div>
  411. </div>
  412. <div class="row cl">
  413. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>处理描述:</label>
  414. <div class="formControls col-5 col-sm-5">
  415. <script id="describeHandleDescText" type="text/plain" style="width:650px;height:250px;"></script>
  416. </script>
  417. <input type="hidden" id="describeHandleDesc" name="describeHandleDesc">
  418. </div>
  419. </div>
  420. <div class="row cl">
  421. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访信息:</label>
  422. <div class="formControls col-10 col-sm-10 skin-minimal">
  423. <div class="radio-box">
  424. <input type="radio" id="customer-visit-1" name="customerIsVisit" value="2" checked>
  425. <label for="customer-visit-1">需要回访</label>
  426. </div>
  427. <div class="radio-box">
  428. <input type="radio" id="customer-visit-2" name="customerIsVisit" value="1">
  429. <label for="customer-visit-2">不需要回访</label>
  430. </div>
  431. </div>
  432. </div>
  433. <div id="needToVisit">
  434. <div class="row cl">
  435. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访人:</label>
  436. <div class="formControls col-2 col-sm-2">
  437. <input type="text" class="input-text" value="" placeholder="填写回访人姓名" id="" name="visitName" datatype="s1-20" errormsg="回访人姓名格式不正确!" >
  438. </div>
  439. <div class="formControls col-2 col-sm-2">
  440. <input type="text" class="input-text" value="" placeholder="填写回访人手机号" id="" name="visitTel" datatype="m" errormsg="回访人手机号码格式不正确!">
  441. </div>
  442. </div>
  443. <div class="row cl">
  444. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
  445. <div class="formControls col-2 col-sm-2">
  446. <input type="text" placeholder="请选择回访日期" id="datemin" name="visitDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})" readonly="readonly">
  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-10 col-sm-10 skin-minimal">
  452. <div class="radio-box">
  453. <input type="radio" id="visit-time-1" name="visitTimeSelect" value="1" checked>
  454. <label for="visit-time-1">09:00-12:00</label>
  455. </div>
  456. <div class="radio-box">
  457. <input type="radio" id="visit-time-2" name="visitTimeSelect" value="2">
  458. <label for="visit-time-2">12:00-14:00</label>
  459. </div>
  460. <div class="radio-box">
  461. <input type="radio" id="visit-time-3" name="visitTimeSelect" value="3">
  462. <label for="visit-time-3">14:00-18:00</label>
  463. </div>
  464. </div>
  465. </div>
  466. <div class="row cl">
  467. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
  468. <div class="formControls col-4 col-sm-4"> <span class="select-box">
  469. <select class="select" id="visitAdminId" name="visitAdminId">
  470. </select>
  471. </span>
  472. </div>
  473. </div>
  474. <div class="cl" style="display: table;width: 100%;">
  475. <label class="form-label col-1 col-sm-1"></label>
  476. <div class="formControls col-4 col-sm-4">
  477. <span class="c-red" id="visitAdminIdMsg">您将为自己指定一个回访任务</span>
  478. </div>
  479. </div>
  480. </div>
  481. <div class="row cl">
  482. <div class="col-2 col-sm-2 col-offset-3">
  483. <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
  484. </div>
  485. </div>
  486. </form>
  487. </div>
  488. </article>
  489. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  490. <script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
  491. <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
  492. <script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
  493. <script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
  494. <script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
  495. <#--<script type="text/javascript" src="${path}/common/lib/cm.lib/dimensions.js"></script>-->
  496. <script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
  497. <#--时间控件-->
  498. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  499. <#--百度富文本编译器-->
  500. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
  501. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.js"></script>
  502. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.parse.js"></script>
  503. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
  504. <script type="text/javascript">
  505. $(function(){
  506. $("#province").ProvinceCity();
  507. $('.skin-minimal input').iCheck({
  508. checkboxClass: 'icheckbox-blue',
  509. radioClass: 'iradio-blue',
  510. increaseArea: '20%'
  511. });
  512. $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(result){
  513. console.log($(this)[0].value);
  514. $("#city2").click()
  515. },
  516. attachObject:'#suggest'
  517. });
  518. $("#city2").suggest(citys,{hot_list:commoncitys,attachObject:"#suggest2"})
  519. });
  520. $(document).on('click', '.dalog-ask .answer', function() {
  521. var msg = $(this).find("span").text();
  522. UE.getEditor('describeContentText').setContent(msg,false);
  523. $("#questionId").val($(this).find(".quesId").val());
  524. var title = $(this).prev().html();
  525. $("#describeTitle").val(title);
  526. //$("#questionId").val(.find(".quesId").val());
  527. //$("#answer-textarea").text();
  528. $(".dalog-ask").hide(); //隐藏qa
  529. });
  530. /*实时监听文本框-- 员工编号*/
  531. document.getElementById("suggest").addEventListener("div", function(){
  532. alert(1);
  533. });
  534. </script>
  535. <script>
  536. /*问题描述*/
  537. var describeContentText = UE.getEditor('describeContentText');
  538. /*处理描述*/
  539. var describeHandleDescText = UE.getEditor('describeHandleDescText');
  540. </script>
  541. <script type="text/javascript">
  542. /*处理结果的执行状态*/
  543. var isSolve = {
  544. solved : [],
  545. noSolved : [],
  546. renewed : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"],
  547. maintain : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"],
  548. reissue : ["录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"],
  549. backGoods : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"],
  550. noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
  551. }
  552. /*个人id*/
  553. var adminId = 0;
  554. /* 咨询类型 1:售前咨询 2:售后咨询 3:其他 */
  555. var allCustomerInfoType = 1;
  556. /*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
  557. var allCustomerType = 1;
  558. /*初始化页面参数*/
  559. $(function () {
  560. /* 初始化单选框样式 */
  561. initCheck();
  562. /*初始化产品类型 -- 客诉头部的产品类型单选 */
  563. initProduceType();
  564. /*初始化问题分类*/
  565. initComplaintTypeInfo();
  566. /*初始化客服*/
  567. initSysAdmin();
  568. /*初始化回访客服*/
  569. initVisitSysAdmin();
  570. /*初始化选择处理结果 -- type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货 */
  571. initProcessResult(1);
  572. /*监听客诉类型选择事件*/
  573. $("input[name='customerCounselType']").change(function (){
  574. allCustomerInfoType = parseInt($(this).val());
  575. initProcessResult(allCustomerType);
  576. })
  577. /*监听处理结果选择事件*/
  578. $("[name='customerIsSolve']").change(function(){
  579. allCustomerType = parseInt($(this).val());
  580. initProcessResult(parseInt($(this).val()));
  581. })
  582. /*监听问题类型 选择事件*/
  583. $("[name='complaintId']").change(function(){
  584. initComplaintSmallClassInfo($(this).val());
  585. })
  586. /*监听问题关键字搜索*/
  587. $(document).on('click', '#search_button', function() {
  588. initComplaintQuestionInfo();
  589. });
  590. /*搜索订单事件*/
  591. $(document).on('click', '#selectOrder', function() {
  592. selectOrder();
  593. });
  594. /*监听省选择事件*/
  595. $(document).on('change', '#province', function() {
  596. var proId = $("#province").val();
  597. var cityId = setCity("",proId,2)
  598. setDistrict("",cityId,2)
  599. });
  600. /*监听市选择事件*/
  601. $(document).on('change', '#city', function() {
  602. var city = $("#city").val();
  603. setDistrict("",city,2)
  604. });
  605. /*监听回访类型选择事件 是否需要回访 1:不需要回访 2:需要回复 */
  606. $("input[name='customerIsVisit']").change(function (){
  607. if($(this).val() == 2){
  608. $("#needToVisit").css("display","block");
  609. }else{
  610. $("#needToVisit").css("display","none");
  611. }
  612. })
  613. /*监听回访选择客服的选择事件*/
  614. $(document).on('change', '#visitAdminId', function() {
  615. var visitAdminName = $("#visitAdminId").find("option:selected").text();
  616. var visitAdminId = $("#visitAdminId").val();
  617. if(convertUndefinedToEmpty(visitAdminId) == adminId){
  618. showVisitMsg(1);
  619. }else{
  620. showVisitMsg(2,visitAdminName);
  621. }
  622. });
  623. })
  624. /*初始化单选框样式*/
  625. function initCheck(){
  626. $('.skin-minimal input').iCheck({
  627. checkboxClass: 'icheckbox-blue',
  628. radioClass: 'iradio-blue',
  629. increaseArea: '20%'
  630. });
  631. }
  632. /*初始化客服*/
  633. function initSysAdmin() {
  634. var sysAminList = getSysAdmin();
  635. var html = "";
  636. for(var i=0;i<sysAminList.length;i++){
  637. var adminList = sysAminList[i];
  638. if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
  639. html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
  640. }else{
  641. html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
  642. }
  643. }
  644. $("#adminId").html(html);
  645. }
  646. /*初始化回访客服的选择*/
  647. function initVisitSysAdmin(){
  648. var sysAminList = getSysAdmin();
  649. var html = "";
  650. var flag = false;
  651. for(var i=0;i<sysAminList.length;i++){
  652. var adminList = sysAminList[i];
  653. if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
  654. html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
  655. flag = true;
  656. }else{
  657. html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
  658. }
  659. }
  660. $("#visitAdminId").html(html);
  661. if(flag){
  662. showVisitMsg(1);
  663. }
  664. }
  665. /**
  666. * 用于显示回访指派任务提示信息
  667. * 1 :自己
  668. * 2 :其他人
  669. */
  670. function showVisitMsg(type,adminName) {
  671. if(type == 1){
  672. $("#visitAdminIdMsg").html("您将为自己指定一个回访任务");
  673. }else{
  674. $("#visitAdminIdMsg").html("您将为"+ adminName +"指定一个回访任务");
  675. }
  676. }
  677. /*获取客服*/
  678. var sysAminList;
  679. function getSysAdmin(){
  680. if(sysAminList != null && sysAminList.length > 0){
  681. return sysAminList
  682. }
  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='questionIdMsg']").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. var companyId = ''; //销售公司
  994. var storeId = ''; //店铺
  995. $.ajax({
  996. type: "POST",
  997. data: {
  998. salesId : orderId
  999. },
  1000. url: "${path}/admin/customer/select_salesOrder",
  1001. async: false,
  1002. success: function(data){
  1003. if (data.returnCode == 200) {
  1004. for(var i=0;i<data.returnMsg.salesOrderList.length;i++){
  1005. var salesOrder = data.returnMsg.salesOrderList[i];
  1006. companyId = salesOrder.salesCompanyId;
  1007. storeId = salesOrder.salesStoreId;
  1008. var productsHtml = '';
  1009. var salesOrderItem = salesOrder.salesOrderItemList;
  1010. orderItemList = salesOrder.salesOrderItemList;
  1011. for(var j=0;j<salesOrderItem.length;j++){
  1012. var item = salesOrderItem[j].itemProductName + "*" + salesOrderItem[j].itemNum;
  1013. if(j==0){
  1014. productsHtml += item
  1015. }else{
  1016. productsHtml += '<br>'+ item
  1017. }
  1018. }
  1019. var time = formatDate(new Date(salesOrder.salesCreateTime),"yyyy-MM-dd");
  1020. html += '' +
  1021. ' <td>'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
  1022. ' <td>'+ salesOrder.salesId +'</td>' +
  1023. ' <td>'+ salesOrder.salesAddressName +'</td>' +
  1024. ' <td>'+ salesOrder.salesAddressTel +'</td>' +
  1025. ' <td>'+ salesOrder.salesAmount +'</td>' +
  1026. ' <td>'+ productsHtml +'</td>' +
  1027. ' <td>'+ time +'</td>' +
  1028. '';
  1029. //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>' ;
  1030. address = salesOrder.salesAddressInfo;
  1031. $("#sendName").val(salesOrder.salesAddressName); //订单名称
  1032. $("#sendTel").val(salesOrder.salesAddressTel); //订单电话号码
  1033. }
  1034. // $("#showOrderAddress").html(address);
  1035. }else{
  1036. html = '';
  1037. }
  1038. $("#showOrder").html(html); //显示订单
  1039. },
  1040. error: function(XmlHttpRequest, textStatus, errorThrown){
  1041. }
  1042. });
  1043. $("#addressInfo").val(address);
  1044. setAdress(); //显示地址
  1045. setProduce(orderItemList); //显示产品
  1046. $("#companyId").val(companyId);
  1047. $("#storeId").val(storeId);
  1048. $("#orderId").val(orderId);
  1049. }
  1050. /**
  1051. * 设置地址
  1052. */
  1053. function setAdress(){
  1054. var addres = $("#addressInfo").val();
  1055. $("#addrssMsg").html("");
  1056. if(addres == null){
  1057. $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
  1058. return;
  1059. }
  1060. var addresList = addres.split("-");
  1061. if(addresList[0] == null || addresList[1]==null || addresList[2]==null || addresList[3]==null){
  1062. $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
  1063. return;
  1064. }
  1065. var proId = setPro(getAddress(addresList[0],0),1);
  1066. var cityId = setCity(getAddress(addresList[1],1),proId,1);
  1067. setDistrict(getAddress(addresList[2],2),cityId,1);
  1068. var sendAddress = addresList[3];
  1069. if(addresList.length > 4){
  1070. sendAddress += addresList[4];
  1071. }
  1072. $("#sendAddress").val(sendAddress);
  1073. }
  1074. /***
  1075. * 删除 “省”,“市”,“区”关键字
  1076. * type : 0:省 2:市 3:区
  1077. */
  1078. function getAddress(addrss,type) {
  1079. var abbreviation = "";
  1080. if(addrss == ""){
  1081. abbreviation = "";
  1082. }else{
  1083. switch(type)
  1084. {
  1085. case 0:
  1086. var proReg = new RegExp("省","g");
  1087. abbreviation = addrss.replace(proReg,"");
  1088. break;
  1089. case 1:
  1090. var cityReg = new RegExp("市","g");
  1091. abbreviation = addrss.replace(cityReg,"");
  1092. break;
  1093. case 2:
  1094. var districtReg = new RegExp("市","g");
  1095. abbreviation = addrss.replace(districtReg,"");
  1096. break;
  1097. default:
  1098. break;
  1099. }
  1100. }
  1101. return abbreviation
  1102. }
  1103. /**
  1104. * 设置省
  1105. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1106. */
  1107. function setPro(provinceName,type) {
  1108. var proId = '';
  1109. var province = listProvince();
  1110. var selectPro = {};
  1111. if(type == 1){
  1112. selectPro = listProvince("",provinceName);
  1113. }else if(type == 2){
  1114. selectPro = null;
  1115. }
  1116. if(province!=null){
  1117. var provinceHtml = ''
  1118. for(var i=0;i<province.length;i++){
  1119. if(selectPro!= null && province[i].provinceId == selectPro[0].provinceId){
  1120. proId = selectPro[0].provinceId;
  1121. provinceHtml += '<option value="'+ province[i].provinceId +'" selected>'+ province[i].province +'</option>';
  1122. }else{
  1123. provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
  1124. }
  1125. }
  1126. $("#province").html(provinceHtml);
  1127. }
  1128. return proId;
  1129. }
  1130. /**
  1131. * 设置市
  1132. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1133. */
  1134. function setCity(cityName,proId,type) {
  1135. var cityId = '';
  1136. var city = listCity(proId,"");
  1137. var selectCity = {};
  1138. if(type == 1){
  1139. selectCity = listCity(proId,cityName);
  1140. }else if(type == 2){
  1141. selectCity = null;
  1142. cityId = city[0].cityId;
  1143. }
  1144. if(city!=null){
  1145. var cityHtml = ''
  1146. for(var i=0;i<city.length;i++){
  1147. if(selectCity != null && city[i].cityId == selectCity[0].cityId){
  1148. cityId = city[i].cityId;
  1149. cityHtml += '<option value="'+ city[i].cityId +'" selected>'+ city[i].city +'</option>';
  1150. }else{
  1151. cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
  1152. }
  1153. }
  1154. $("#city").html(cityHtml);
  1155. }
  1156. return cityId;
  1157. }
  1158. /**
  1159. * 设置区
  1160. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1161. */
  1162. function setDistrict(districtName,cityId,type) {
  1163. var district = listDistrict(cityId,"");
  1164. var selectDistrict = {};
  1165. if(type == 1){
  1166. selectDistrict = listDistrict(cityId,districtName);
  1167. }else if(type == 2){
  1168. selectDistrict = null;
  1169. }
  1170. if(district!=null){
  1171. var districtHtml = ''
  1172. for(var i=0;i<district.length;i++){
  1173. if(selectDistrict != null && district[i].districtId == selectDistrict[0].districtId){
  1174. districtHtml += '<option value="'+ district[i].districtId +'" selected>'+ district[i].district +'</option>';
  1175. }else{
  1176. districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
  1177. }
  1178. }
  1179. $("#district").html(districtHtml);
  1180. }
  1181. }
  1182. /* TDS收集设置区 */
  1183. var TDSCity = '';
  1184. function linkageSetDistrict(){
  1185. var arrcity_3word = $("#arrcity_3word").val();
  1186. var cityName = '北京';
  1187. for(var i = 0;i<citys.length;i++){
  1188. for(var j=0;j<citys[i].length;j++){
  1189. if(j == 0 && arrcity_3word == citys[i][j]){
  1190. cityName = citys[i][1];
  1191. }
  1192. }
  1193. }
  1194. TDSCity = cityName;
  1195. var selectCity = listCity(null,cityName);
  1196. var cityId = selectCity[0].cityId;
  1197. var selectDistrict = listDistrict(cityId,"");
  1198. var html = '';
  1199. for(var i=0;i<selectDistrict.length;i++){
  1200. html += '<option value="'+ selectDistrict[i].districtId +'">'+ selectDistrict[i].district +'</option>';
  1201. }
  1202. $("#TDSArea").html(html);
  1203. $("#TDSArea").find("option").eq(0).prop("selected",true);
  1204. }
  1205. /**
  1206. * 展示产品
  1207. * @param orderItemList
  1208. */
  1209. function setProduce(orderItemList) {
  1210. var productList = getProduct() ; //所有产品
  1211. var html = "";
  1212. var productTypeNo = 0;
  1213. for(var i=0;i<productList.length;i++) {
  1214. var product = productList[i];
  1215. var produceFittings = getProduceFittings(product.productId); //获取该产品的所有配件
  1216. var colorList = product.colorList; //该产品的所有颜色
  1217. var productType = product.productType;
  1218. var colorHtml = '';
  1219. if(colorList != null && colorList.length >0 ){
  1220. colorHtml += '<table style="height: 100%;">';
  1221. for(var j=0;j<colorList.length;j++){
  1222. var number = "";
  1223. var color = colorList[j];
  1224. for(var k=0;k<orderItemList.length;k++){
  1225. var item = orderItemList[k];
  1226. if(item.itemColorId == color.colorId){
  1227. number = item.itemNum;
  1228. }
  1229. }
  1230. var fristInputStyle = "border-top: 1px solid #ddd;";
  1231. if(color.colorProductId == product.productId) {
  1232. colorHtml += '<tr >' +
  1233. ' <td width="85" style="border-left: none;text-align: center;'+ fristInputStyle +'">' + color.colorName + '</td>' +
  1234. ' <td width="15" style="'+ fristInputStyle +'">' +
  1235. ' <input type="hidden" class="input-produce-id" value="' + color.colorProductId + '">' +
  1236. ' <input type="hidden" class="input-color-id" value="' + color.colorId + '">' +
  1237. ' <input type="text" class="input-text input-color-number" style="width: 100%;" value="'+ number +'" placeholder="产品数量" id="" name="">' +
  1238. ' </td>' +
  1239. ' </tr>';
  1240. fristInputStyle = "";
  1241. }
  1242. }
  1243. colorHtml += '</table>';
  1244. }else{
  1245. colorHtml += '<span>暂无该产品的颜色!<span>';
  1246. }
  1247. var produceFittingsHtml = '';
  1248. if(produceFittings != null && produceFittings.length > 0){
  1249. produceFittingsHtml += '<table style="height: 100%;">';
  1250. for(var m=0;m<produceFittings.length;m++){
  1251. var produceFit = produceFittings[m];
  1252. if(produceFit.productId == product.productId) {
  1253. var fristInputStyle = "border-top: 1px solid #ddd;";
  1254. produceFittingsHtml += '<tr >' +
  1255. ' <td width="85" style="border-left: none;text-align: center; '+ fristInputStyle +'">' + produceFit.fittingsName +'</td>' +
  1256. ' <td width="15" style="'+ fristInputStyle +'">' +
  1257. ' <input type="hidden" class="input-produce-id" value="' + produceFit.productId + '">' +
  1258. ' <input type="hidden" class="input-fittings-id" value="' + produceFit.fittingsId +'">' +
  1259. ' <input type="text" class="input-text input-fittings-number" style="width: 100%;" value="'+ number +'" placeholder="产品数量" id="" name="">' +
  1260. ' </td>' +
  1261. ' </tr>';
  1262. fristInputStyle = "";
  1263. }
  1264. }
  1265. produceFittingsHtml += '</table>';
  1266. }else{
  1267. produceFittingsHtml += '<span>暂无产品配件!<span>';
  1268. }
  1269. var produceHtml = '<input type="hidden" value="'+ product.productId +'">' +
  1270. '<span>'+ product.productName +'</span>';
  1271. html += ' <tr >' +
  1272. ' <td width="80">'+ produceHtml +'</td>' +
  1273. ' <td style="padding: 0px;text-align: center;">' +
  1274. colorHtml +
  1275. ' </td>' +
  1276. ' <td style="padding: 0px;text-align: center;">' +
  1277. produceFittingsHtml +
  1278. ' </td>' +
  1279. '</tr>';
  1280. }
  1281. $("#addProduct").html(html);
  1282. initCheck(); //因为需要展示产品,所以再次初始化多选框
  1283. setBackProduct(html); //设置寄回产品
  1284. monitorProduct(); //监听产品变化
  1285. }
  1286. /*获取产品*/
  1287. function getProduct(){
  1288. var productList;
  1289. $.ajax({
  1290. type: "POST",
  1291. data: {
  1292. },
  1293. url: "${path}/admin/customer/select_produce",
  1294. async: false,
  1295. success: function(data){
  1296. if (data.returnCode == 200) {
  1297. productList = data.returnMsg.productList;
  1298. }
  1299. },
  1300. error: function(XmlHttpRequest, textStatus, errorThrown){
  1301. }
  1302. });
  1303. return productList;
  1304. }
  1305. /*获取产品配件*/
  1306. function getProduceFittings(productId){
  1307. var produceFittings;
  1308. $.ajax({
  1309. type: "get",
  1310. data: {
  1311. productId : productId
  1312. },
  1313. url: "${path}/admin/customer/select_produce_fittings",
  1314. async: false,
  1315. success: function(data){
  1316. if (data.returnCode == 200) {
  1317. produceFittings = data.returnMsg.produceFittingsList;
  1318. }
  1319. },
  1320. error: function(XmlHttpRequest, textStatus, errorThrown){
  1321. }
  1322. });
  1323. return produceFittings;
  1324. }
  1325. /*监听产品变化*/
  1326. function monitorProduct(){
  1327. /*产品数量*/
  1328. $("#addProduct").find(".input-color-number").blur(function (){
  1329. setBackProduct();
  1330. })
  1331. /*产品配件*/
  1332. $("#addProduct").find(".input-fittings-number").blur(function (){
  1333. setBackProduct();
  1334. })
  1335. }
  1336. /*设置寄回产品*/
  1337. function setBackProduct(html) {
  1338. if(html != null && html != "" && typeof(html) != "undefined"){
  1339. $("#back-product").html(html);
  1340. }else{
  1341. }
  1342. }
  1343. </script>
  1344. <script>
  1345. $(function(){
  1346. $("#form-customer-add").Validform({
  1347. tiptype: function (msg, o, cssctl) {
  1348. if (o.type == 3) {//失败
  1349. layer.msg(msg, {icon: 5, time: 3000});
  1350. $(window).scrollTop(o.obj.offset().top - 40);
  1351. }
  1352. },
  1353. datatype: {//自定义验证类型
  1354. },
  1355. ignoreHidden: true,
  1356. tipSweep: true, //若为true,则只在表单提交时验证
  1357. ajaxPost: true, //异步提交
  1358. beforeCheck: function (curform) { //验证通过之前执行的函数
  1359. },
  1360. beforeSubmit: function (curform) { //验证通过之后执行的函数
  1361. addCustomerReady();
  1362. },
  1363. callback: function (data) {//异步回调函数
  1364. return ;
  1365. if (data) {
  1366. var index = layer.alert(data.resultMsg, function () {
  1367. if (data.resultCode == 200) {
  1368. location.href = "${path}/admin/customer/select_customer_list";
  1369. } else {
  1370. layer.close(index);
  1371. }
  1372. return ;
  1373. });
  1374. }
  1375. }
  1376. });
  1377. })
  1378. /* 添加客诉的准备 */
  1379. function addCustomerReady(){
  1380. /*----TDS收集模块--start-----*/
  1381. var valicity = $(".ac_result_tip").html();
  1382. if(valicity == null || valicity == "" || typeof(valicity)=="undefined"){
  1383. $("#TDSArea").html("");
  1384. }else if(valicity.indexOf("对不起,找不到") > 0 ){
  1385. $("#TDSArea").html("");
  1386. $("#customerArea").val("");
  1387. }else{
  1388. var TDSArea = $("#TDSArea").find("option:selected").text();
  1389. if(TDSArea != null && TDSArea != ""){
  1390. var area = TDSCity + "-" + TDSArea
  1391. $("#customerArea").val(area);
  1392. }
  1393. }
  1394. /*----TDS收集模块--end-----*/
  1395. /* 地址拼接 */
  1396. var province = $("#province").find("option:selected").text();
  1397. var city = $("#city").find("option:selected").text();
  1398. var district = $("#district").find("option:selected").text();
  1399. var relationSendMergeAddress = province + "-" + city + "-" + district;
  1400. $("#relationSendMergeAddress").val(relationSendMergeAddress);
  1401. /* 地址拼接 */
  1402. /*----问题描述- start --*/
  1403. var describeContentText = UE.getEditor('describeContentText').getContent();
  1404. $("#describeContent").val(describeContentText);
  1405. /*----问题描述--end-----*/
  1406. /*----处理描述- start --*/
  1407. var describeHandleDescText = UE.getEditor('describeHandleDescText').getContent();
  1408. $("#describeHandleDesc").val(describeHandleDescText);
  1409. /*----处理描述--end-----*/
  1410. /* --- 类型:售后 处理结果:维修/换新/补发/退货/无理由退货 -- 处理产品 start---- */
  1411. var sendProdcues = new Array(); //寄出产品表
  1412. var sendFittings = new Array();
  1413. var closedProdcues = new Array();
  1414. var closedFittings = new Array();
  1415. $("#addProduct").find(".input-color-number").each(function(){
  1416. var number = $(this).val();
  1417. if(number != null && number != ""){
  1418. var product = new Object();
  1419. product.productId = $(this).parent().find(".input-produce-id").val();
  1420. product.colorId = $(this).parent().find(".input-color-id").val();
  1421. //换新、维修,退货,无理由退货,
  1422. if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 6 || allCustomerType == 7){
  1423. product.closedProdcueNumber = number;
  1424. closedProdcues.push(product);
  1425. }else if(allCustomerType == 5){
  1426. product.sendProdcueNumber = number;
  1427. sendProdcues.push(product);
  1428. }
  1429. }
  1430. })
  1431. $("#addProduct").find(".input-fittings-number").each(function(){
  1432. var number = $(this).val();
  1433. if(number != null && number != ""){
  1434. var fittings = new Object();
  1435. fittings.productId = $(this).parent().find(".input-produce-id").val();
  1436. fittings.fittingsId = $(this).parent().find(".input-fittings-id").val();
  1437. //换新、维修,退货,无理由退货,
  1438. if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 6 || allCustomerType == 7){
  1439. fittings.closedFittingNumber = number;
  1440. closedFittings.push(fittings);
  1441. }else if(allCustomerType == 5){
  1442. fittings.sendFittingNumber = number;
  1443. sendFittings.push(fittings);
  1444. }
  1445. }
  1446. })
  1447. $("#back-product").find(".input-color-number").each(function(){
  1448. var number = $(this).val();
  1449. if(number != null && number != ""){
  1450. //换新、维修,
  1451. if(allCustomerType == 3 || allCustomerType == 4){
  1452. var fittings = new Object();
  1453. fittings.productId = $(this).parent().find(".input-produce-id").val();
  1454. fittings.colorId = $(this).parent().find(".input-color-id").val();
  1455. fittings.sendProdcueNumber = number;
  1456. sendProdcues.push(fittings);
  1457. }
  1458. }
  1459. })
  1460. $("#back-product").find(".input-fittings-number").each(function(){
  1461. var number = $(this).val();
  1462. if(number != null && number != ""){
  1463. //换新、维修
  1464. if(allCustomerType == 3 || allCustomerType == 4){
  1465. var fittings = new Object();
  1466. fittings.productId = $(this).parent().find(".input-produce-id").val();
  1467. fittings.fittingsId = $(this).parent().find(".input-fittings-id").val();
  1468. fittings.sendFittingNumber = number;
  1469. sendFittings.push(fittings);
  1470. }
  1471. }
  1472. })
  1473. $("#sendProdcues").val(JSON.stringify(sendProdcues));
  1474. $("#sendFittings").val(JSON.stringify(sendFittings));
  1475. $("#closedProdcues").val(JSON.stringify(closedProdcues));
  1476. $("#closedFittings").val(JSON.stringify(closedFittings));
  1477. }
  1478. /* 添加客诉 */
  1479. // function save_submit(){
  1480. // var customerSourceType = $("input[name='customerSourceType']:checked").val();
  1481. // if(customerSourceType == 3){
  1482. // var customerSource = $("#customerSource").val();
  1483. // if(customerSource == null || customerSource ==""){
  1484. // showErrorMsg($("#customerSource"),"请输入来源入口!");
  1485. // }
  1486. // }
  1487. // }
  1488. /*提示错误信息*/
  1489. function showErrorMsg(node,msg){
  1490. node.select();
  1491. layer.msg(msg, {icon: 2, time: 2000});
  1492. }
  1493. </script>
  1494. <!--/请在上方写此页面业务相关的脚本-->
  1495. </body>
  1496. </html>