update_customer.ftl 116 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480
  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. .msg-phone{
  50. height: 35px;
  51. line-height: 35px;
  52. }
  53. </style>
  54. <title>修改客诉 - 客诉管理 - RST</title>
  55. </head>
  56. <body>
  57. <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
  58. <span class="c-gray en">&gt;</span> 客诉管理
  59. <span class="c-gray en">&gt;</span> 修改客诉
  60. <a class="btn radius r"
  61. style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
  62. href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
  63. </nav>
  64. <article class="page-container" style="padding: 10px;">
  65. <div class="pd-20 cl">
  66. <form action="${path}/admin/customer/update_customer" method="post" class="form form-horizontal" id="form-customer-add" onkeydown="if(event.keyCode==13)return false;">
  67. <input type="hidden" id="customerId" name="customerId" value="${customerInfo.customerId!''}">
  68. <input type="hidden" id="customerName" name="customerName" value="">
  69. <input type="hidden" id="customerTel" name="customerTel" value="">
  70. <div class="row cl">
  71. <label class="form-label col-3">
  72. <div class="tit-2">客诉基本信息</div>
  73. </label>
  74. <div class="formControls col-9">
  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-4 col-sm-4"> <span class="select-box" style=" width: 625px;">
  80. <select name="adminId" id="adminId" class="select">
  81. <#list adminList as admin>
  82. <option value ="${admin.adminId!}" <#if customerInfo.adminId??><#if customerInfo.adminId == admin.adminId >selected="selected"</#if></#if>>${admin.adminName!}</option>
  83. </#list>
  84. </select>
  85. </span>
  86. </div>
  87. </div>
  88. <div class="row cl">
  89. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>来源入口:</label>
  90. <div class="formControls col-10 col-sm-10 skin-minimal">
  91. <div class="radio-box">
  92. <input type="radio" id="tel-1" name="customerSourceType" value="1" <#if customerInfo.customerSourceType == 1 >checked</#if>>
  93. <label for="tel-1">400电话</label>
  94. </div>
  95. <div class="radio-box">
  96. <input type="radio" id="tel-2" name="customerSourceType" value="2" <#if customerInfo.customerSourceType == 2 >checked</#if>>
  97. <label for="tel-2">微信公众号</label>
  98. </div>
  99. <div class="radio-box">
  100. <input type="radio" id="tel-3" name="customerSourceType" value="3" <#if customerInfo.customerSourceType == 3 >checked</#if>>
  101. <label for="tel-3">其他</label>
  102. <input type="text" style="width: 321px;margin-left: 10px; <#if customerInfo.customerSourceType != 3 >display: none;</#if>" class="input-text" value="" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">
  103. <input type="hidden" value="${customerInfo.customerSource!''}" placeholder="" id="customerSource" name="customerSource" >
  104. </div>
  105. </div>
  106. </div>
  107. <div class="row cl">
  108. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>咨询类型:</label>
  109. <div class="formControls col-10 col-sm-10 skin-minimal">
  110. <div class="radio-box">
  111. <input type="radio" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1" <#if customerInfo.customerCounselType == 1 >checked</#if>>
  112. <label for="customer-type-1">售前咨询</label>
  113. </div>
  114. <div class="radio-box">
  115. <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2" <#if customerInfo.customerCounselType == 2 >checked</#if>>
  116. <label for="customer-type-2">售后咨询</label>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="row cl">
  121. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
  122. <input type="hidden" id="typeCompany" name="typeCompany" value="">
  123. <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
  124. <#list typeList as type>
  125. <div class="radio-box">
  126. <input type="radio" id="produceType-${type_index}" name="typeId" typeCompany="${type.typeCompany}" value="${type.typeId!''}" <#if customerInfo.typeId == type.typeId>checked</#if> >
  127. <label for="produceType-${type_index}">${type.typeName!''}</label>
  128. </div>
  129. </#list>
  130. </div>
  131. </div>
  132. <div class="row cl" style="position: relative;">
  133. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
  134. <div class="formControls col-2 col-sm-2"> <span class="select-box">
  135. <select name="complaintId" class="select">
  136. <option value="">请选择问题分类</option>
  137. <#list complaintTypeInfoList as complaintTypeInfo>
  138. <option value="${complaintTypeInfo.complaintId}" <#if complaintQuestionInfo.complaintId == complaintTypeInfo.complaintId>selected="selected"</#if> >${complaintTypeInfo.complaintClassName}</option>
  139. </#list>
  140. </select>
  141. </span>
  142. </div>
  143. <div class="formControls col-2 col-sm-2"> <span class="select-box">
  144. <select name="smallClassId" id="smallClassId" class="select">
  145. <option value="">请选择问题分类</option>
  146. <#list complaintSmallClassInfoList as complaintSmallClassInfo>
  147. <option value="${complaintSmallClassInfo.smallClassId}" <#if complaintQuestionInfo.smallClassId == complaintSmallClassInfo.smallClassId>selected="selected"</#if>>${complaintSmallClassInfo.smallClassName}</option>
  148. </#list>
  149. </select>
  150. </span>
  151. </div>
  152. <div class="formControls col-2 col-sm-2">
  153. <div class="clearfix">
  154. <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>
  155. </div>
  156. </div>
  157. <div class="dalog-ask">
  158. <div class="tag">
  159. <em></em>
  160. <strong>相关QA</strong>
  161. <a href="javascript:void(0)" style="margin-left: 200px;" onclick="closeQA()">关闭</a>
  162. <ul id="question" style="padding-top: 15px">
  163. <#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
  164. <li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
  165. </ul>
  166. </div>
  167. </div>
  168. </div>
  169. <div class="row cl">
  170. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题标题:</label>
  171. <div class="formControls col-5 col-sm-5">
  172. <input type="text" class="input-text" style="width: 625px;" name="describeTitle" id="describeTitle" datatype="*1-50" errormsg="问题标题不正确!" value="" >
  173. </div>
  174. </div>
  175. <div class="row cl">
  176. <#--处理描述 - 客诉备注-->
  177. <label class="form-label col-1 col-sm-1">问题描述:</label>
  178. <div class="formControls col-5 col-sm-5">
  179. <span>问题描述详情,内部使用,不会对外公布。</span>
  180. <script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
  181. </script>
  182. <input type="hidden" id="describeHandleDesc" name="describeHandleDesc" value="">
  183. </div>
  184. </div>
  185. <div class="row cl">
  186. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题回复:</label>
  187. <div class="formControls col-5 col-sm-5">
  188. <input type="hidden" name="questionId" id="questionId" value="">
  189. <script id="describeContentText" type="text/plain" style="width:983px;height:250px;"></script>
  190. </script>
  191. <input type="hidden" name="describeContent" id="describeContent" value="">
  192. <input type="hidden" name="describeId" id="describeId" value="">
  193. </div>
  194. </div>
  195. <div class="row cl">
  196. <label class="form-label col-1 col-sm-1"></label>
  197. <div class="formControls col-2 col-sm-2">
  198. <input type="text" class="input-text associated-phone" value="${customerInfo.customerTel!''}" placeholder="请输入手机号" id="p-phone" name="">
  199. </div>
  200. <div class="formControls col-2 col-sm-2" style="width: 10%">
  201. <input type="button" class="btn btn-primary" value="发送问题回复给用户" onclick="sendPhone('p','p-msg');">
  202. </div>
  203. <div class="formControls col-2 col-sm-2" style="width: 10%; margin-left: 40px;">
  204. <input type="button" class="btn btn-primary" value="保存QA" onclick="saveQuestion();">
  205. </div>
  206. <div class="formControls col-2 col-sm-2 msg-phone">
  207. <div id="p-msg" style="color: #e00"></div>
  208. </div>
  209. </div>
  210. <div class="row cl">
  211. <label class="form-label col-1 col-sm-1">
  212. <div class="tit">处理结果</div>
  213. </label>
  214. <div class="formControls col-10 col-sm-10">
  215. </div>
  216. </div>
  217. <input type="hidden" id="sendProdcues" name="sendProdcuesJson" value="">
  218. <input type="hidden" id="sendFittings" name="sendFittingsJson" value="">
  219. <input type="hidden" id="closedProdcues" name="closedProdcuesJson" value="">
  220. <input type="hidden" id="closedFittings" name="closedFittingsJson" value="">
  221. <div class="row cl">
  222. <label class="form-label col-1 col-sm-1">处理类型:</label>
  223. <div class="formControls col-10 col-sm-10 skin-minimal">
  224. <div class="radio-box" id="solved">
  225. <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" <#if customerInfo.customerIsSolve == 1 >checked</#if> >
  226. <label for="customer-process-1">已解决</label>
  227. </div>
  228. <div class="radio-box" id="noSolved">
  229. <input type="radio" id="customer-process-2" value="2" name="customerIsSolve" <#if customerInfo.customerIsSolve == 2 >checked</#if> >
  230. <label for="customer-process-2">未解决</label>
  231. </div>
  232. <div class="radio-box" id="renewed" style="display: none">
  233. <input type="radio" id="customer-process-3" value="3" name="customerIsSolve" <#if customerInfo.customerIsSolve == 3 >checked</#if> >
  234. <label for="customer-process-3">换新</label>
  235. </div>
  236. <div class="radio-box" id="maintain" style="display: none">
  237. <input type="radio" id="customer-process-4" value="4" name="customerIsSolve" <#if customerInfo.customerIsSolve == 4 >checked</#if> >
  238. <label for="customer-process-4">维修</label>
  239. </div>
  240. <div class="radio-box" id="reissue" style="display: none">
  241. <input type="radio" id="customer-process-5" value="5" name="customerIsSolve" <#if customerInfo.customerIsSolve == 5 >checked</#if> >
  242. <label for="customer-process-5">补发</label>
  243. </div>
  244. <div class="radio-box" id="backGoods" style="display: none">
  245. <input type="radio" id="customer-process-6" value="6" name="customerIsSolve" <#if customerInfo.customerIsSolve == 6 >checked</#if> >
  246. <label for="customer-process-6">退货</label>
  247. </div>
  248. <div class="radio-box" id="noReasonBack" style="display: none">
  249. <input type="radio" id="customer-process-7" value="7" name="customerIsSolve" <#if customerInfo.customerIsSolve == 7 >checked</#if> >
  250. <label for="customer-process-7">无理由退货</label>
  251. </div>
  252. </div>
  253. </div>
  254. <div class="row cl">
  255. <label class="form-label col-1 col-sm-1"></label>
  256. <div class="formControls col-10 col-sm-10">
  257. <ul class="time-line-list" id="processResultStatus">
  258. <#-- <li><span class="arrow"></span><div class="number">1</div><div>录入客诉</div></li>
  259. <li><span class="arrow"></span><div class="number">2</div><div>督促用户寄回</div></li>
  260. <li><span class="arrow"></span><div class="number">3</div><div>录入快递单号</div></li>
  261. <li><span class="arrow"></span><div class="number">4</div><div>仓库收货</div></li>
  262. <li><span class="arrow"></span><div class="number">5</div><div>换新发货</div></li>
  263. <li><span class="arrow"></span><div class="number">6</div><div>发货通知用户</div></li>
  264. <li><span class="arrow"></span><div class="number">7</div><div>收货后回访</div></li>-->
  265. </ul>
  266. </div>
  267. </div>
  268. <div class="row cl" id="orderHead" style="display: none;">
  269. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>订单信息:</label>
  270. <div class="formControls col-1 col-sm-1">
  271. <button type="button" class="btn btn-primary" id="selectOrder">搜索订单</button>
  272. </div>
  273. </div>
  274. <#if salesOrder??>
  275. <div class="row cl" id="order" style="display: none;">
  276. <label class="form-label col-1 col-sm-1"></label>
  277. <div class="formControls col-9 col-sm-9 text-c">
  278. <table class="table table-border table-bg table-bordered">
  279. <tr>
  280. <th style="text-align: center;">销售公司</th>
  281. <th style="text-align: center;">店铺名称</th>
  282. <th style="text-align: center;">Efast订单号</th>
  283. <th style="text-align: center;">交易号</th>
  284. <th style="text-align: center;">姓名</th>
  285. <th style="text-align: center;">电话</th>
  286. <th style="text-align: center;">订单金额</th>
  287. <th style="text-align: center;">购买产品</th>
  288. <th style="text-align: center;">购买日期</th>
  289. </tr>
  290. <tr id="showOrder">
  291. <td style="text-align: center;">${salesOrder.companyName!''}</td>
  292. <td style="text-align: center;">${salesOrder.storeName!''}</td>
  293. <td style="text-align: center;">${salesOrder.salesOrderId!''}</td>
  294. <td style="text-align: center;">${salesOrder.salesDealCode!''}</td>
  295. <td style="text-align: center;">${salesOrder.salesAddressName!''}</td>
  296. <td style="text-align: center;">${salesOrder.salesAddressTel!''}</td>
  297. <td style="text-align: center;">${salesOrder.salesPayMoney!''}</td>
  298. <td style="text-align: center;">
  299. <#list salesOrder.salesOrderItemList as salesOrderItem>
  300. ${salesOrderItem.itemProductName}* ${salesOrderItem.itemNum}<br>
  301. </#list>
  302. </td>
  303. <td style="text-align: center;">${(salesOrder.salesPayTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
  304. </tr>
  305. </table>
  306. </div>
  307. </div>
  308. </#if>
  309. <input type="hidden" id="companyId" name="companyId" value="<#if salesOrder??>${salesOrder.salesCompanyId}</#if>">
  310. <input type="hidden" id="storeId" name="storeId" value="<#if salesOrder??>${salesOrder.salesStoreId}</#if>">
  311. <input type="hidden" id="orderId" name="salesId" value="<#if salesOrder??>${salesOrder.salesId}</#if>">
  312. <div class="row cl" id="recipientInfoTitle" style="display: none;">
  313. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>收件信息:</label>
  314. <div class="formControls col-8 col-sm-8">请先选择订单,系统自动填充姓名,电话和地址信息。</div>
  315. </div>
  316. <div class="row cl" id="recipientInfo" style="display: none;">
  317. <label class="form-label col-1 col-sm-1"></label>
  318. <div class="formControls col-2 col-sm-2">
  319. <input type="text" class="input-text" value="${customerCommon.relationSendName!''}" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="联系人格式不正确!" >
  320. </div>
  321. <div class="formControls col-2 col-sm-2">
  322. <input type="text" class="input-text" value="${customerCommon.relationSendTel!''}" placeholder="填写收件人手机号" id="sendTel" name="relationSendTel" datatype="m" errormsg="联系人电话格式不正确!">
  323. </div>
  324. <div class="formControls col-2 col-sm-2" id="postageAccount">
  325. <input type="text" class="input-text" value="${customerCommon.relationAlipay!''}" placeholder="邮费转账 支付宝账户" id="relationAlipay" name="relationAlipay" errormsg="邮费转账账户!">
  326. </div>
  327. </div>
  328. <div class="row cl" id="recipientAddress" style="display: none;">
  329. <input type="hidden" id="addressInfo">
  330. <label class="form-label col-1 col-sm-1"></label>
  331. <div class="formControls col-2 col-sm-2">
  332. <span class="select-box">
  333. <select id="province" class="select" name="provinceNumber">
  334. </select>
  335. </span>
  336. </div>
  337. <div class="formControls col-2 col-sm-2">
  338. <span class="select-box">
  339. <select id="city" class="select" name="cityNumber">
  340. </select>
  341. </span>
  342. </div>
  343. <div class="formControls col-2 col-sm-2">
  344. <span class="select-box">
  345. <select id="district" class="select" name="areaNumber">
  346. </select>
  347. </span>
  348. </div>
  349. <input type="hidden" name="relationSendMergeAddress" id="relationSendMergeAddress">
  350. </div>
  351. <div class="row cl" id="recipientAddressText" style="display: none;">
  352. <label class="form-label col-1 col-sm-1"></label>
  353. <div class="formControls col-5 col-sm-5">
  354. <textarea name="relationSendAddress" id="sendAddress" cols="" rows="2" datatype="*" errormsg="收货地址不正确!" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)">${customerCommon.relationSendAddress!''}</textarea>
  355. <span id="addrssMsg"></span>
  356. </div>
  357. </div>
  358. <div class="row cl" id="renewedProduct" style="display: none;">
  359. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span><span id="relationProduct">换新产品</span>:</label>
  360. <div class="formControls col-9 col-sm-9 text-c" id="produceSelect">
  361. <table class="table table-border table-bg table-bordered">
  362. <thead>
  363. <tr class="text-c" id="table1">
  364. <th style="text-align: center;" width="60">产品名称</th>
  365. <th style="text-align: center;" width="60">产品颜色</th>
  366. <th style="text-align: center;" width="60">产品配件</th>
  367. </tr>
  368. </thead>
  369. <tbody id="addProduct">
  370. <#list productList as product>
  371. <tr>
  372. <td width="80">
  373. <input type="hidden" value="${product.productId}"><span>${product.productName}</span>
  374. </td>
  375. <td style="padding: 0px;text-align: center;">
  376. <table style="height: 100%;">
  377. <tbody>
  378. <#list product.colorList as color>
  379. <tr>
  380. <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
  381. ${color.colorName}
  382. </td>
  383. <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
  384. <input type="hidden" class="input-produce-id" value="${product.productId}">
  385. <input type="hidden" class="input-color-id" value="${color.colorId}">
  386. <#assign number = ""/>
  387. <#list customerCommon.sendProdcues as sendProdcues>
  388. <#if sendProdcues.colorId == color.colorId >
  389. <#assign number = sendProdcues.sendProdcueNumber/>
  390. </#if>
  391. </#list>
  392. <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
  393. </td>
  394. </tr>
  395. </#list>
  396. </tbody>
  397. </table>
  398. </td>
  399. <td style="padding: 0px;text-align: center;">
  400. <table style="height: 100%;">
  401. <tbody>
  402. <#list product.fittingsList as fittingsInfo>
  403. <tr>
  404. <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">${fittingsInfo.fittingsName}</td>
  405. <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
  406. <input type="hidden" class="input-produce-id" value="${fittingsInfo.productId}">
  407. <input type="hidden" class="input-fittings-id" value="${fittingsInfo.fittingsId}">
  408. <#assign number = ""/>
  409. <#list customerCommon.sendFittings as sendFittings>
  410. <#if sendFittings.fittingsId == fittingsInfo.fittingsId >
  411. <#assign number = sendFittings.sendFittingNumber/>
  412. </#if>
  413. </#list>
  414. <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
  415. </td>
  416. </tr>
  417. </#list>
  418. </tbody>
  419. </table>
  420. </td>
  421. </tr>
  422. </#list>
  423. </tbody>
  424. </table>
  425. </div>
  426. </div>
  427. <div class="row cl" id="TDScollect" style="display: none;">
  428. <label class="form-label col-1 col-sm-1">TDS收集:</label>
  429. <div class="formControls col-2 col-sm-2" style="position: relative;">
  430. <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
  431. <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" value="" />
  432. <div id="suggest" class="ac_results"></div>
  433. </div>
  434. <div class="formControls col-2 col-sm-2">
  435. <span class="select-box">
  436. <select name="" class="select" id="TDSArea" name="TDSArea">
  437. <option value="">请搜索城市</option>
  438. </select>
  439. </span>
  440. </div>
  441. <input type="hidden" name="customerArea" id="customerArea" value="${customerInfo.customerArea!''}">
  442. <div class="formControls col-2 col-sm-2">
  443. <input type="text" class="input-text" value="${customerInfo.customerInTDS!'0'}" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
  444. </div>
  445. <div class="formControls col-2 col-sm-2">
  446. <input type="text" class="input-text" value="${customerInfo.customerOutTDS!'0'}" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
  447. </div>
  448. </div>
  449. <div class="row cl" id="TDScollectShow" /*style="display: none;"*/>
  450. <label class="form-label col-1 col-sm-1"></label>
  451. <div class="formControls col-6 col-sm-6">
  452. <span id="DTS-address"><#if customerInfo.customerArea??>地址:${customerInfo.customerArea}</#if></span>
  453. &nbsp;&nbsp;&nbsp;&nbsp;<span id="DTS-in"><#if customerInfo.customerInTDS??>进水:${customerInfo.customerInTDS} PPM</#if></span>&nbsp;&nbsp; <span id="DTS-out"><#if customerInfo.customerOutTDS??>出水:${customerInfo.customerOutTDS} PPM</#if></span>
  454. </div>
  455. </div>
  456. <div class="row cl" id="sendAddressInfo">
  457. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
  458. <div class="formControls col-5 col-sm-5" style="height: 250px">
  459. <script id="sendAddressSms" type="text/plain" style="width:983px;height:200px;"></script>
  460. </script>
  461. </div>
  462. </div>
  463. <div class="row cl" id="sendAddressByPhone" style="display: none;">
  464. <label class="form-label col-1 col-sm-1"></label>
  465. <div class="formControls col-2 col-sm-2">
  466. <input type="text" class="input-text associated-phone" value="" placeholder="请输入手机号" id="m-phone" name="">
  467. </div>
  468. <div class="formControls col-2 col-sm-2" style="width: 10%">
  469. <input type="button" class="btn btn-primary" value="发短信给用户" onclick="sendPhone('m','m-msg');">
  470. </div>
  471. <div class="formControls col-2 col-sm-2 msg-phone">
  472. <div id="m-msg" style="color: #e00"></div>
  473. </div>
  474. </div>
  475. <div class="row cl" id="updateProduct" style="display: none;">
  476. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>更换产品:</label>
  477. <div class="formControls col-9 col-sm-9" >
  478. <table class="table table-border table-bg table-bordered">
  479. <thead>
  480. <tr class="text-c" id="table2">
  481. <th style="text-align: center;" width="60">产品名称</th>
  482. <th style="text-align: center;" width="60">产品颜色</th>
  483. <th style="text-align: center;" width="60">产品配件</th>
  484. </tr>
  485. </thead>
  486. <tbody id="back-product">
  487. <#list productList as product>
  488. <tr>
  489. <td width="80">
  490. <input type="hidden" value="${product.productId}"><span>${product.productName}</span>
  491. </td>
  492. <td style="padding: 0px;text-align: center;">
  493. <table style="height: 100%;">
  494. <tbody>
  495. <#list product.colorList as color>
  496. <tr>
  497. <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
  498. ${color.colorName}
  499. </td>
  500. <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
  501. <input type="hidden" class="input-produce-id" value="${product.productId}">
  502. <input type="hidden" class="input-color-id" value="${color.colorId}">
  503. <#assign number = ""/>
  504. <#list customerCommon.closedProdcues as closedProdcues>
  505. <#if closedProdcues.colorId == color.colorId >
  506. <#assign number = closedProdcues.closedProdcueNumber/>
  507. </#if>
  508. </#list>
  509. <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
  510. </td>
  511. </tr>
  512. </#list>
  513. </tbody>
  514. </table>
  515. </td>
  516. <td style="padding: 0px;text-align: center;">
  517. <table style="height: 100%;">
  518. <tbody>
  519. <#list product.fittingsList as fittingsInfo>
  520. <tr>
  521. <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">${fittingsInfo.fittingsName}</td>
  522. <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
  523. <input type="hidden" class="input-produce-id" value="${fittingsInfo.productId}">
  524. <input type="hidden" class="input-fittings-id" value="${fittingsInfo.fittingsId}">
  525. <#assign number2 = ""/>
  526. <#list customerCommon.closedFittings as closedFittings>
  527. <#if closedFittings.fittingsId == fittingsInfo.fittingsId >
  528. <#assign number2 = closedFittings.closedFittingNumber/>
  529. </#if>
  530. </#list>
  531. <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="${number2}" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
  532. </td>
  533. </tr>
  534. </#list>
  535. </tbody>
  536. </table>
  537. </td>
  538. </tr>
  539. </#list>
  540. </tbody>
  541. </table>
  542. </div>
  543. </div>
  544. <div class="row cl">
  545. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访信息:</label>
  546. <div class="formControls col-10 col-sm-10 skin-minimal">
  547. <div class="radio-box">
  548. <input type="radio" id="customer-visit-1" name="customerIsVisit" value="2" <#if customerInfo.customerIsVisit == '2' >checked</#if> >
  549. <label for="customer-visit-1">需要回访</label>
  550. </div>
  551. <div class="radio-box">
  552. <input type="radio" id="customer-visit-2" name="customerIsVisit" value="1" <#if customerInfo.customerIsVisit == '1' >checked</#if> >
  553. <label for="customer-visit-2">不需要回访</label>
  554. </div>
  555. </div>
  556. </div>
  557. <div id="needToVisit" style="<#if customerInfo.customerIsVisit == '1' >display: none;</#if>">
  558. <#if visit??>
  559. <#assign visitName = visit.visitName/>
  560. <#assign customerTel = visit.visitTel/>
  561. <#assign visitDate = visit.visitDate/>
  562. <#assign visitTimeSelect = visit.visitTimeSelect/>
  563. <#assign designatedAdminId = visit.designatedAdminId/>
  564. </#if>
  565. <div class="row cl">
  566. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>被回访人:</label>
  567. <div class="formControls col-2 col-sm-2">
  568. <input type="text" class="input-text" value="${visitName!''}" placeholder="填写回访人姓名" id="" name="visitName" datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="回访人姓名格式不正确!" >
  569. </div>
  570. <div class="formControls col-2 col-sm-2">
  571. <input type="text" class="input-text associated-phone" value="${customerTel!''}" placeholder="填写回访人手机号" id="" name="visitTel" datatype="m" errormsg="回访人手机号码格式不正确!">
  572. </div>
  573. </div>
  574. <div class="row cl">
  575. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
  576. <div class="formControls col-2 col-sm-2">
  577. <input type="text" placeholder="请选择回访日期" id="datemin" name="visitDate" value="${(visitDate?string("yyyy-MM-dd"))!''}" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})" readonly="readonly">
  578. </div>
  579. </div>
  580. <div class="row cl">
  581. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访时间:</label>
  582. <div class="formControls col-10 col-sm-10 skin-minimal">
  583. <div class="radio-box">
  584. <input type="radio" id="visit-time-1" name="visitTimeSelect" value="1" <#if visitTimeSelect?? && visitTimeSelect== 1 >checked</#if> >
  585. <label for="visit-time-1">09:00-12:00</label>
  586. </div>
  587. <div class="radio-box">
  588. <input type="radio" id="visit-time-2" name="visitTimeSelect" value="2" <#if visitTimeSelect?? && visitTimeSelect == 2 >checked</#if> >
  589. <label for="visit-time-2">12:00-14:00</label>
  590. </div>
  591. <div class="radio-box">
  592. <input type="radio" id="visit-time-3" name="visitTimeSelect" value="3" <#if visitTimeSelect?? && visitTimeSelect == 3 >checked</#if> >
  593. <label for="visit-time-3">14:00-18:00</label>
  594. </div>
  595. </div>
  596. </div>
  597. <div class="row cl">
  598. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
  599. <div class="formControls col-4 col-sm-4"> <span class="select-box">
  600. <select class="select" id="visitAdminId" name="visitAdminId">
  601. <#list adminList as admin>
  602. <option value ="${admin.adminId!}" <#if designatedAdminId??><#if designatedAdminId == admin.adminId >selected="selected"</#if></#if>>${admin.adminName!}</option>
  603. </#list>
  604. </select>
  605. </span>
  606. </div>
  607. </div>
  608. <div class="cl" style="display: table;width: 100%;">
  609. <label class="form-label col-1 col-sm-1"></label>
  610. <div class="formControls col-4 col-sm-4">
  611. <span class="c-red" id="visitAdminIdMsg">您将为自己指定一个回访任务</span>
  612. </div>
  613. </div>
  614. </div>
  615. <div class="row cl">
  616. <div class="col-2 col-sm-2 col-offset-3">
  617. <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
  618. </div>
  619. </div>
  620. </form>
  621. </div>
  622. </article>
  623. <#--时间控件-->
  624. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  625. <script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
  626. <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
  627. <script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
  628. <script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
  629. <script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
  630. <#--<script type="text/javascript" src="${path}/common/lib/cm.lib/dimensions.js"></script>-->
  631. <script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
  632. <#--百度富文本编译器-->
  633. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
  634. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.js"></script>
  635. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.parse.js"></script>
  636. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
  637. <script type="text/javascript">
  638. $(function(){
  639. $("#province").ProvinceCity();
  640. $('.skin-minimal input').iCheck({
  641. checkboxClass: 'icheckbox-blue',
  642. radioClass: 'iradio-blue',
  643. increaseArea: '20%'
  644. });
  645. $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(result){
  646. console.log($(this)[0].value);
  647. $("#city2").click()
  648. },
  649. attachObject:'#suggest'
  650. });
  651. $("#city2").suggest(citys,{hot_list:commoncitys,attachObject:"#suggest2"})
  652. });
  653. $(document).on('click', '.dalog-ask .answer', function() {
  654. var QA_complaintId = $(this).find(".QA_complaintId").val();
  655. var QA_smallClassId = $(this).find(".QA_smallClassId").val();
  656. $("select[name='complaintId']").val(QA_complaintId);
  657. initComplaintSmallClassInfo(QA_complaintId,QA_smallClassId); //初始化小类
  658. var questionId = $(this).find(".quesId").val();
  659. var title = $(this).find("span").html();
  660. var desc = $(this).find("#questionProfile").html();
  661. $("#questionId").val(questionId);
  662. $("#describeTitle").val(title);
  663. UE.getEditor('describeContentText').setContent(desc);
  664. //$("#answer-textarea").text();
  665. $(".dalog-ask").hide(); //隐藏qa
  666. });
  667. </script>
  668. <script>
  669. var tool = [
  670. 'anchor', //锚点
  671. 'undo', //撤销
  672. 'redo', //重做
  673. 'bold', //加粗
  674. 'indent', //首行缩进
  675. 'snapscreen', //截图
  676. 'italic', //斜体
  677. 'underline', //下划线
  678. 'strikethrough', //删除线
  679. 'subscript', //下标
  680. 'fontborder', //字符边框
  681. 'superscript', //上标
  682. 'formatmatch', //格式刷
  683. //'source', //源代码
  684. 'blockquote', //引用
  685. 'pasteplain', //纯文本粘贴模式
  686. 'selectall', //全选
  687. 'print', //打印
  688. 'preview', //预览
  689. 'horizontal', //分隔线
  690. 'removeformat', //清除格式
  691. 'time', //时间
  692. 'date', //日期
  693. 'unlink', //取消链接
  694. 'insertrow', //前插入行
  695. 'insertcol', //前插入列
  696. 'mergeright', //右合并单元格
  697. 'mergedown', //下合并单元格
  698. 'deleterow', //删除行
  699. 'deletecol', //删除列
  700. 'splittorows', //拆分成行
  701. 'splittocols', //拆分成列
  702. 'splittocells', //完全拆分单元格
  703. 'deletecaption', //删除表格标题
  704. 'inserttitle', //插入标题
  705. 'mergecells', //合并多个单元格
  706. 'deletetable', //删除表格
  707. 'cleardoc', //清空文档
  708. 'insertparagraphbeforetable', //"表格前插入行"
  709. //'insertcode', //代码语言
  710. 'fontfamily', //字体
  711. 'fontsize', //字号
  712. 'paragraph', //段落格式
  713. 'simpleupload', //单图上传
  714. 'insertimage', //多图上传
  715. 'edittable', //表格属性
  716. 'edittd', //单元格属性
  717. 'link', //超链接
  718. 'emotion', //表情
  719. 'spechars', //特殊字符
  720. 'searchreplace', //查询替换
  721. 'map', //Baidu地图
  722. 'gmap', //Google地图
  723. 'insertvideo', //视频
  724. 'help', //帮助
  725. 'justifyleft', //居左对齐
  726. 'justifyright', //居右对齐
  727. 'justifycenter', //居中对齐
  728. 'justifyjustify', //两端对齐
  729. 'forecolor', //字体颜色
  730. 'backcolor', //背景色
  731. 'insertorderedlist', //有序列表
  732. 'insertunorderedlist', //无序列表
  733. 'fullscreen', //全屏
  734. 'directionalityltr', //从左向右输入
  735. 'directionalityrtl', //从右向左输入
  736. 'rowspacingtop', //段前距
  737. 'rowspacingbottom', //段后距
  738. 'pagebreak', //分页
  739. 'insertframe', //插入Iframe
  740. 'imagenone', //默认
  741. 'imageleft', //左浮动
  742. 'imageright', //右浮动
  743. 'attachment', //附件
  744. 'imagecenter', //居中
  745. 'wordimage', //图片转存
  746. 'lineheight', //行间距
  747. 'edittip ', //编辑提示
  748. 'customstyle', //自定义标题
  749. 'autotypeset', //自动排版
  750. // 'webapp', //百度应用
  751. 'touppercase', //字母大写
  752. 'tolowercase', //字母小写
  753. 'background', //背景
  754. 'template', //模板
  755. // 'scrawl', //涂鸦
  756. 'music', //音乐
  757. 'inserttable', //插入表格
  758. 'drafts', // 从草稿箱加载
  759. 'charts' // 图表
  760. ];
  761. /*问题描述*/
  762. var describeContentText = UE.getEditor('describeContentText', {
  763. toolbars: [tool],
  764. autoHeightEnabled: true,
  765. autoFloatEnabled: true,
  766. elementPathEnabled : false,/*去掉元素路径*/
  767. zIndex : 5
  768. });
  769. /*处理描述*/
  770. var describeHandleDescText = UE.getEditor('describeHandleDescText', {
  771. toolbars: [tool],
  772. autoHeightEnabled: true,
  773. autoFloatEnabled: true,
  774. elementPathEnabled : false, /*去掉元素路径*/
  775. zIndex : 5
  776. });
  777. /*邮寄地址*/
  778. var sendAddressSms = UE.getEditor('sendAddressSms', {
  779. toolbars: [tool],
  780. autoHeightEnabled: true,
  781. autoFloatEnabled: true,
  782. elementPathEnabled : false /*去掉元素路径*/
  783. });
  784. //是否已经初始化过邮寄信息
  785. var isInitSendAddressSms = false;
  786. sendAddressSms.ready(function() {
  787. sendAddressSms.setHeight(130); //固定高度
  788. });
  789. </script>
  790. <script type="text/javascript">
  791. /*处理结果的执行状态*/
  792. var isSolve = {
  793. solved : [],
  794. noSolved : [],
  795. renewed : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"],
  796. maintain : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"],
  797. reissue : ["录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"],
  798. backGoods : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"],
  799. noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
  800. }
  801. /*处理结果的变更状态 产品列表表头信息*/
  802. var isSolveTitleMsg = {
  803. solved : [[],[]],
  804. noSolved : [[],[]],
  805. renewed : [["退回产品","退回产品颜色","退回产品配件"],["更换产品","更换产品颜色","更换产品配件"]],
  806. maintain : [["需要维修的产品","需要维修的产品颜色","需要维修的产品配件"],["维修产品","维修产品颜色","维修产品配件"]],
  807. reissue : [["补发产品","补发产品颜色","补发产品配件"],[]],
  808. backGoods : [["退回产品","退回产品颜色","退回产品配件"],[]],
  809. noReasonBack : [["退回产品","退回产品颜色","退回产品配件"],[]]
  810. }
  811. /*是否是修改页面*/
  812. var isUpdate = true;
  813. /*个人id*/
  814. var adminId = 0;
  815. /* 咨询类型 1:售前咨询 2:售后咨询 3:其他 */
  816. var allCustomerInfoType = ${customerInfo.customerCounselType};
  817. /*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
  818. var allCustomerType = ${customerInfo.customerIsSolve};
  819. var allCustomerTypeName = ["已解决","未解决","换新","维修","补发","退货","无理由退货"];
  820. /* 寄回地址的id */
  821. var complaint_questionId = 5;
  822. /* 用于判断是否第一次初始化省市区-- 只在选择类型为售后时使用 */
  823. var isInitAddress = ${customerInfo.customerIsSolve!''};
  824. /*初始化页面参数*/
  825. $(function () {
  826. /* 初始化单选框样式 */
  827. //initCheck();
  828. /*初始化产品类型 -- 客诉头部的产品类型单选 */
  829. //initProduceType();
  830. /*初始化问题分类*/
  831. //initComplaintTypeInfo();
  832. /*初始化客服*/
  833. ///initSysAdmin();
  834. /*初始化回访客服*/
  835. //initVisitSysAdmin();
  836. /*初始化问题描述*/
  837. initQuestionDescribe();
  838. /*初始化选择处理结果 -- type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货 */
  839. initProcessResult(allCustomerType);
  840. /*监听来源入口选择事件*/
  841. $("input[name='customerSourceType']").change(function (){
  842. var type = parseInt($(this).val());
  843. if(type == 3){
  844. $("#customerSourceOld").show();
  845. }else{
  846. $("#customerSourceOld").hide();
  847. }
  848. })
  849. /*监听客诉类型选择事件*/
  850. $("input[name='customerCounselType']").change(function (){
  851. allCustomerInfoType = parseInt($(this).val());
  852. if(allCustomerInfoType == 1){
  853. $("#customer-process-1").iCheck('check'); //设置已解决
  854. allCustomerType = 1;
  855. }else{
  856. $("#customer-process-3").iCheck('check'); //设置换新
  857. allCustomerType =3;
  858. }
  859. initProcessResult(allCustomerType);
  860. })
  861. /*监听处理结果选择事件*/
  862. $("[name='customerIsSolve']").change(function(){
  863. initProcessResult(parseInt($(this).val()));
  864. })
  865. /*监听问题类型 选择事件*/
  866. $("[name='complaintId']").change(function(){
  867. initComplaintSmallClassInfo($(this).val());
  868. })
  869. /*监听问题关键字搜索*/
  870. $(document).on('click', '#search_button', function() {
  871. initComplaintQuestionInfo("p");
  872. });
  873. /*搜索订单事件*/
  874. $(document).on('click', '#selectOrder', function() {
  875. selectOrder();
  876. });
  877. /*监听省选择事件*/
  878. $(document).on('change', '#province', function() {
  879. var proId = $("#province").val();
  880. var cityId = setCity("",proId,2)
  881. setDistrict("",cityId,2)
  882. });
  883. /*监听市选择事件*/
  884. $(document).on('change', '#city', function() {
  885. var city = $("#city").val();
  886. setDistrict("",city,2)
  887. });
  888. /*监听回访类型选择事件 是否需要回访 1:不需要回访 2:需要回复 */
  889. initVisitEvent();
  890. /*监听回访选择客服的选择事件*/
  891. $(document).on('change', '#visitAdminId', function() {
  892. var visitAdminName = $("#visitAdminId").find("option:selected").text();
  893. var visitAdminId = $("#visitAdminId").val();
  894. if(convertUndefinedToEmpty(visitAdminId) == adminId){
  895. showVisitMsg(1);
  896. }else{
  897. showVisitMsg(2,visitAdminName);
  898. }
  899. });
  900. /* 监听TDS收集--地址选择 */
  901. $(document).on('change', '#TDSArea', function() {
  902. setTDSCollect();
  903. });
  904. /*实时监听文本框-- TDS进水*/
  905. // document.getElementById("customerInTDS").addEventListener("input", function(){
  906. // setTDSCollect();
  907. // });
  908. /*实时监听文本框-- TDS出水*/
  909. // document.getElementById("customerOutTDS").addEventListener("input", function(){
  910. // setTDSCollect();
  911. // });
  912. /* 监听手机号 失去焦点时 将其他手机号码未填的 */
  913. $(".associated-phone").blur(function (){
  914. var phone = $(this).val();
  915. $(".associated-phone").each(function(){
  916. var ph = $(this).val();
  917. if(ph == null || ph == "" || typeof(ph) == undefined ){
  918. $(this).val(phone);
  919. }
  920. })
  921. })
  922. })
  923. /*用于初始化回访信息的展示*/
  924. function initVisitEvent(){
  925. $("input[name='customerIsVisit']").change(function (){
  926. if($(this).val() == 2){
  927. $("#needToVisit").css("display","block");
  928. }else{
  929. $("#needToVisit").css("display","none");
  930. }
  931. })
  932. }
  933. /**
  934. * 初始化问题描述
  935. */
  936. function initQuestionDescribe(){
  937. $.ajax({
  938. type: "POST",
  939. data: {
  940. customerId : "${customerInfo.customerId!''}"
  941. },
  942. url: "${path}/admin/customer/select_question_describe",
  943. success: function(data){
  944. if (data.returnCode == 200) {
  945. var questionDescribe = data.returnMsg.questionDescribe;
  946. $("#describeTitle").val(questionDescribe.describeTitle);
  947. $("#describeId").val(questionDescribe.describeId);
  948. $("#describeHandleDesc").val(questionDescribe.describeHandleDesc);
  949. describeContentText.addListener("ready", function () {
  950. describeContentText.setContent(questionDescribe.describeContent);
  951. });
  952. describeHandleDescText.addListener("ready", function () {
  953. describeHandleDescText.setContent(questionDescribe.describeHandleDesc);
  954. });
  955. }
  956. },
  957. error: function(XmlHttpRequest, textStatus, errorThrown){
  958. }
  959. });
  960. }
  961. /*关闭qa*/
  962. function closeQA(){
  963. $(".dalog-ask").hide(); //隐藏qa
  964. }
  965. /*初始化单选框样式*/
  966. function initCheck(){
  967. $('.skin-minimal input').iCheck({
  968. checkboxClass: 'icheckbox-blue',
  969. radioClass: 'iradio-blue',
  970. increaseArea: '20%'
  971. });
  972. }
  973. /*初始化单选框样式*/
  974. function initCheckByNode(node){
  975. node.iCheck({
  976. checkboxClass: 'icheckbox-blue',
  977. radioClass: 'iradio-blue',
  978. increaseArea: '20%'
  979. });
  980. }
  981. /*
  982. * type 1:不需要回访 2:需要回访
  983. * */
  984. function visitByType(type){
  985. if(!isUpdate){
  986. if(1 == type){ //不需要回访
  987. $("#customer-visit-2").iCheck('check'); //设置不需要回访
  988. $("#needToVisit").css("display","none");
  989. }else{
  990. $("#customer-visit-1").iCheck('check'); //设置需要回访
  991. $("#needToVisit").css("display","block");
  992. }
  993. }
  994. initVisitEvent();
  995. }
  996. /*初始化客服*/
  997. var sysAminList;
  998. function initSysAdmin() {
  999. sysAminList = getSysAdmin();
  1000. var html = "";
  1001. for(var i=0;i<sysAminList.length;i++){
  1002. var adminList = sysAminList[i];
  1003. if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
  1004. html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'(我)</option>';
  1005. }else{
  1006. html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
  1007. }
  1008. }
  1009. $("#adminId").html(html);
  1010. }
  1011. /*初始化回访客服的选择*/
  1012. function initVisitSysAdmin(){
  1013. var html = "";
  1014. var flag = false;
  1015. for(var i=0;i<sysAminList.length;i++){
  1016. var adminList = sysAminList[i];
  1017. if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
  1018. html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'(我)</option>';
  1019. flag = true;
  1020. }else{
  1021. html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
  1022. }
  1023. }
  1024. $("#visitAdminId").html(html);
  1025. if(flag){
  1026. showVisitMsg(1);
  1027. }
  1028. }
  1029. /**
  1030. * 用于显示回访指派任务提示信息
  1031. * 1 :自己
  1032. * 2 :其他人
  1033. */
  1034. function showVisitMsg(type,adminName) {
  1035. if(type == 1){
  1036. $("#visitAdminIdMsg").html("您将为自己指定一个回访任务");
  1037. }else{
  1038. $("#visitAdminIdMsg").html("您将为"+ adminName +"指定一个回访任务");
  1039. }
  1040. }
  1041. /*获取客服*/
  1042. var sysAminList;
  1043. function getSysAdmin(){
  1044. if(sysAminList != null && sysAminList.length > 0){
  1045. return sysAminList
  1046. }
  1047. $.ajax({
  1048. type: "POST",
  1049. data: {
  1050. },
  1051. url: "${path}/admin/customer/select_sys_admin",
  1052. async: false,
  1053. success: function(data){
  1054. if (data.returnCode == 200) {
  1055. sysAminList = data.returnMsg.adminList;
  1056. adminId = data.returnMsg.adminId;
  1057. }
  1058. },
  1059. error: function(XmlHttpRequest, textStatus, errorThrown){
  1060. }
  1061. });
  1062. return sysAminList;
  1063. }
  1064. /*初始化产品类型 -- 客诉头部的产品类型单选*/
  1065. function initProduceType(){
  1066. var html = "";
  1067. $.ajax({
  1068. type: "POST",
  1069. data: {
  1070. },
  1071. url: "${path}/admin/customer/select_produce_type",
  1072. async: false,
  1073. success: function(data){
  1074. if (data.returnCode == 200) {
  1075. var check = "checked";
  1076. for(var i=0;i<data.returnMsg.productTypeList.length;i++){
  1077. var produce = data.returnMsg.productTypeList[i];
  1078. html += ' <div class="radio-box">' +
  1079. '<input type="radio" id="produce-type-'+ i +'" name="typeId" typeCompany="'+ produce.typeCompany +'" datatype="*" value="'+ produce.typeId +'" '+ check +' nullmsg="请选择产品类型!" >' +
  1080. ' <label for="produce-type-'+ i +'">'+ produce.typeName +'</label>' +
  1081. ' </div>';
  1082. check = "";
  1083. }
  1084. }else{
  1085. html = '';
  1086. }
  1087. },
  1088. error: function(XmlHttpRequest, textStatus, errorThrown){
  1089. }
  1090. });
  1091. $("#produceTypeHtml").html(html);
  1092. initCheck();
  1093. }
  1094. /**
  1095. * 选择处理结果-- 默认选择已解决
  1096. * type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货
  1097. */
  1098. function initProcessResult(type){
  1099. if(type == null || type == ""){
  1100. type = 1;
  1101. }
  1102. allCustomerType = type;
  1103. if(allCustomerInfoType == null || allCustomerInfoType == ""){
  1104. allCustomerInfoType = $("input[name='customerCounselType']:checked").val();
  1105. }
  1106. var statusHtml = '<li><span class="arrow"></span><div class="number">status_index</div><div>status_html</div></li>';
  1107. var resultHtml = '';
  1108. var result = {};
  1109. var resultProductTableTitle = {};
  1110. $("#solved").show(); //已解决
  1111. $("#noSolved").show();//未解决
  1112. if(allCustomerInfoType == 1){ //售前
  1113. $("#renewed").hide();
  1114. $("#maintain").hide();
  1115. $("#reissue").hide();
  1116. $("#backGoods").hide();
  1117. $("#noReasonBack").hide();
  1118. switch(type)
  1119. {
  1120. case 1:
  1121. otherHied();
  1122. visitByType(1);
  1123. break;
  1124. case 2:
  1125. otherHied();
  1126. visitByType(2);
  1127. break;
  1128. default:
  1129. break;
  1130. }
  1131. }else if(allCustomerInfoType == 2){ //售后
  1132. if(!isInitSendAddressSms){
  1133. initComplaintQuestionInfo("m");
  1134. isInitSendAddressSms = true;
  1135. }
  1136. /* 在选择售后类型是,直接初始化省市区,使用isInitAddress 变量来判断 */
  1137. if(isInitAddress == 1 || isInitAddress == 2){
  1138. var proId = setPro(null,2);
  1139. var cityId = setCity(null,proId,2);
  1140. setDistrict(null,cityId,2);
  1141. isInitAddress = 1;
  1142. }else if(isInitAddress == 3 || isInitAddress == 4 || isInitAddress == 5 || isInitAddress == 6 || isInitAddress == 7){
  1143. setPro(null,2); //创建省
  1144. setCity(null,proId,2);
  1145. setDistrict(null, cityId, 2);
  1146. <#if customerCommon.provinceNumber?? >
  1147. var proId = ${customerCommon.provinceNumber!''};
  1148. $("#province option[value='"+ proId +"']").attr("selected","true"); //设置省
  1149. </#if>
  1150. <#if customerCommon.cityNumber?? >
  1151. var cityId = ${customerCommon.cityNumber!''};
  1152. $("#city option[value='" + cityId + "']").attr("selected", "true"); //设置市
  1153. </#if>
  1154. <#if customerCommon.areaNumber?? >
  1155. var disId = ${customerCommon.areaNumber!''};
  1156. $("#district option[value='" + disId + "']").attr("selected", "true"); //设置地区
  1157. isInitAddress = 1;
  1158. </#if>
  1159. }
  1160. $("#renewed").show();
  1161. $("#maintain").show();
  1162. $("#reissue").show();
  1163. $("#backGoods").show();
  1164. $("#noReasonBack").show();
  1165. switch(type)
  1166. {
  1167. case 1:
  1168. otherHied();
  1169. visitByType(1);
  1170. break;
  1171. case 2:
  1172. otherHied();
  1173. visitByType(2); //需要回访
  1174. break;
  1175. case 3: //换新
  1176. result = isSolve.renewed;
  1177. resultProductTableTitle = isSolveTitleMsg.renewed;
  1178. $("#relationProduct").html("换新产品");
  1179. $("#processResultStatus").show();
  1180. $("#orderHead").show();
  1181. $("#order").show();
  1182. $("#recipientInfo").show();
  1183. $("#recipientInfoTitle").show();
  1184. $("#recipientAddress").show();
  1185. $("#recipientAddressText").show();
  1186. $("#renewedProduct").show();
  1187. $("#TDScollect").show();
  1188. $("#TDScollectShow").show();
  1189. $("#sendAddressInfo").show();
  1190. $("#sendAddressByPhone").show();
  1191. $("#updateProduct").show(); //换新产品
  1192. $("#postageAccount").show(); //邮费转账账户
  1193. visitByType(2); //需要回访
  1194. break;
  1195. case 4: //维修
  1196. result = isSolve.maintain;
  1197. resultProductTableTitle = isSolveTitleMsg.maintain;
  1198. $("#relationProduct").html("维修产品");
  1199. $("#processResultStatus").show();
  1200. $("#orderHead").show();
  1201. $("#order").show();
  1202. $("#recipientInfo").show();
  1203. $("#recipientInfoTitle").show();
  1204. $("#recipientAddress").show();
  1205. $("#recipientAddressText").show();
  1206. $("#renewedProduct").show();
  1207. $("#TDScollect").show();
  1208. $("#TDScollectShow").show();
  1209. $("#sendAddressInfo").show();
  1210. $("#sendAddressByPhone").show();
  1211. $("#updateProduct").show();//维修产品
  1212. $("#postageAccount").show(); //邮费转账账户
  1213. visitByType(2); //需要回访
  1214. break;
  1215. case 5://补发
  1216. result = isSolve.reissue;
  1217. resultProductTableTitle = isSolveTitleMsg.reissue;
  1218. $("#relationProduct").html("补发产品");
  1219. $("#processResultStatus").show();
  1220. $("#orderHead").show();
  1221. $("#order").show();
  1222. $("#recipientInfo").show();
  1223. $("#recipientInfoTitle").show();
  1224. $("#recipientAddress").show();
  1225. $("#recipientAddressText").show();
  1226. $("#renewedProduct").show();
  1227. $("#TDScollect").show();
  1228. $("#TDScollectShow").show();
  1229. $("#sendAddressInfo").hide();
  1230. $("#sendAddressByPhone").hide();
  1231. $("#updateProduct").hide();
  1232. $("#postageAccount").hide(); //邮费转账账户 -- 隐藏
  1233. visitByType(2); //需要回访
  1234. break;
  1235. case 6: //退货
  1236. result = isSolve.backGoods;
  1237. resultProductTableTitle = isSolveTitleMsg.backGoods;
  1238. $("#relationProduct").html("退货产品");
  1239. $("#processResultStatus").show();
  1240. $("#orderHead").show();
  1241. $("#order").show();
  1242. $("#recipientInfo").show();
  1243. $("#recipientInfoTitle").show();
  1244. $("#recipientAddress").show();
  1245. $("#recipientAddressText").show();
  1246. $("#renewedProduct").show();
  1247. $("#TDScollect").show();
  1248. $("#TDScollectShow").show();
  1249. $("#sendAddressInfo").show();
  1250. $("#sendAddressByPhone").show();
  1251. $("#updateProduct").hide();
  1252. $("#postageAccount").show(); //邮费转账账户
  1253. visitByType(2); //需要回访
  1254. break;
  1255. case 7://无理由退货
  1256. result = isSolve.noReasonBack;
  1257. resultProductTableTitle = isSolveTitleMsg.noReasonBack;
  1258. $("#relationProduct").html("退货产品");
  1259. $("#processResultStatus").show();
  1260. $("#orderHead").show();
  1261. $("#order").show();
  1262. $("#recipientInfo").show();
  1263. $("#recipientInfoTitle").show();
  1264. $("#recipientAddress").show();
  1265. $("#recipientAddressText").show();
  1266. $("#renewedProduct").show();
  1267. $("#TDScollect").show();
  1268. $("#TDScollectShow").show();
  1269. $("#sendAddressInfo").show();
  1270. $("#sendAddressByPhone").show();
  1271. $("#updateProduct").hide();
  1272. $("#postageAccount").show(); //邮费转账账户
  1273. visitByType(2); //需要回访
  1274. break;
  1275. default:
  1276. break;
  1277. }
  1278. }
  1279. for(var i=0;i< result.length;i++){
  1280. var html = statusHtml.replace("status_index",i+1);
  1281. html = html.replace("status_html",result[i]);
  1282. resultHtml += html;
  1283. }
  1284. if(resultProductTableTitle != null && resultProductTableTitle.length > 0){
  1285. /* 根据处理类型来切换 产品列表的列名称 */
  1286. for(var i=0;i<resultProductTableTitle[0].length;i++){
  1287. $("#table1").find("th").eq(i).html(resultProductTableTitle[0][i]);
  1288. }
  1289. for(var i=0;i<resultProductTableTitle[1].length;i++){
  1290. $("#table2").find("th").eq(i).html(resultProductTableTitle[1][i]);
  1291. }
  1292. }
  1293. $("#processResultStatus").html(resultHtml);
  1294. }
  1295. /*已解决|未解决 */
  1296. function otherHied(){
  1297. $("#processResultStatus").hide(); //处理结果的执行状态 已解决未解决没有该信息
  1298. $("#orderHead").hide();
  1299. $("#order").hide();
  1300. $("#recipientInfo").hide();
  1301. $("#recipientInfoTitle").hide();
  1302. $("#recipientAddress").hide();
  1303. $("#recipientAddressText").hide();
  1304. $("#renewedProduct").hide();
  1305. $("#TDScollect").hide();
  1306. $("#TDScollectShow").hide();
  1307. $("#sendAddressInfo").hide();
  1308. $("#sendAddressByPhone").hide();
  1309. $("#updateProduct").hide();
  1310. }
  1311. /*初始化问题大类*/
  1312. function initComplaintTypeInfo() {
  1313. //默认为售前咨询
  1314. //var customerCounselTypeOverall = allCustomerInfoType;
  1315. var customerCounselTypeOverall = null;
  1316. $.ajax({
  1317. type: "POST",
  1318. data: {
  1319. complaintConsultingType : customerCounselTypeOverall
  1320. },
  1321. url: "${path}/admin/complaintQuestion/list_complaintType",
  1322. async: true,
  1323. success: function(data){
  1324. var html = '<option value="">请选择问题分类</option>';
  1325. var id;
  1326. if (data.returnCode == 200) {
  1327. for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
  1328. var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
  1329. if(i == 0 ){
  1330. id = complaintTypeInfo.complaintId;
  1331. }
  1332. html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
  1333. }
  1334. }else{
  1335. html = '';
  1336. }
  1337. $("[name='complaintId']").html(html);
  1338. },
  1339. error: function(XmlHttpRequest, textStatus, errorThrown){
  1340. }
  1341. });
  1342. }
  1343. /*显示小类*/
  1344. function initComplaintSmallClassInfo(complaintId,smallId){
  1345. if(complaintId == null || complaintId == ""){
  1346. var html = '<option value="">请选择问题小类</option>';
  1347. $("[name='smallClassId']").html(html);
  1348. }else{
  1349. $.ajax({
  1350. type: "POST",
  1351. data: {
  1352. complaintId : complaintId
  1353. },
  1354. url: "${path}/admin/complaintQuestion/list_complaintSmallClass",
  1355. async: true,
  1356. success: function(data){
  1357. var html = '<option value="">请选择问题小类</option>';
  1358. if (data.returnCode == 200) {
  1359. for(var i=0;i<data.returnMsg.complaintSmallClassInfoList.length;i++){
  1360. var ComplaintSmallClassInfo = data.returnMsg.complaintSmallClassInfoList[i];
  1361. html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
  1362. }
  1363. }else{
  1364. html = '';
  1365. }
  1366. $("[name='smallClassId']").html(html);
  1367. if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
  1368. $("select[name='smallClassId']").val(smallId);
  1369. }
  1370. },
  1371. error: function(XmlHttpRequest, textStatus, errorThrown){
  1372. }
  1373. });
  1374. }
  1375. }
  1376. /**
  1377. * 搜索QA 显示
  1378. * type p:问题qa; m:邮寄qa
  1379. */
  1380. function initComplaintQuestionInfo(type){
  1381. var complaintId;
  1382. var smallClassId;
  1383. var questionName;
  1384. var customerCounselType;
  1385. var questionId;
  1386. if(type == "p"){
  1387. complaintId = $("[name='complaintId']").val();
  1388. smallClassId = $("[name='smallClassId']").val();
  1389. questionName = $("[name='questionIdMsg']").val();
  1390. customerCounselType = $("[name='customerCounselType']:checked").val();
  1391. }else if(type == "m"){
  1392. questionId = complaint_questionId;
  1393. }
  1394. $.ajax({
  1395. type: "POST",
  1396. data: {
  1397. complaintId : complaintId,
  1398. smallClassId : smallClassId,
  1399. questionName : questionName,
  1400. /*complaintType : customerCounselType,*/
  1401. questionId : questionId
  1402. },
  1403. url: "${path}/admin/complaintQuestion/list_complaintQuestion",
  1404. async: false,
  1405. success: function(data){
  1406. if(type == "p"){
  1407. var html = "";
  1408. if (data.returnCode == 200) {
  1409. for(var i=0;i<data.returnMsg.complaintQuestionInfoList.length;i++){
  1410. var complaintQuestion= data.returnMsg.complaintQuestionInfoList[i];
  1411. //html += '<li class="ask">'+ complaintQuestion.questionName +'' +
  1412. // '</li>' +
  1413. // '<li class="answer" style="height: 65px;overflow: hidden;">答:<span>'+ complaintQuestion.questionProfile +'</span><input class="quesId" type="hidden" value="'+ complaintQuestion.questionId +'"></li>';
  1414. html += '' +
  1415. '<li class="answer" style="height: 20px;overflow: hidden;border-bottom: 1px solid #ddd;"><span>'+ complaintQuestion.questionName +'</span>' +
  1416. '<input class="QA_complaintId" type="hidden" value="'+ complaintQuestion.complaintId +'">' +
  1417. '<input class="QA_smallClassId" type="hidden" value="'+ complaintQuestion.smallClassId +'">' +
  1418. '<input class="quesId" type="hidden" value="'+ complaintQuestion.questionId +'">' +
  1419. '<div id="questionProfile" style="display: block">'+ complaintQuestion.questionProfile +'</div>' +
  1420. '</li>';
  1421. }
  1422. }else{
  1423. html = '<span style="font-size: 12px; margin-top: 10px; display: block;">未搜索到QA信息,请更换关键字或者直接录入到系统!</span>';
  1424. }
  1425. $("#question").html(html);
  1426. $(".dalog-ask").show();
  1427. }else if(type == "m"){
  1428. var msg = "";
  1429. if (data.returnCode == 200) {
  1430. msg = data.returnMsg.complaintQuestionInfoList[0].questionProfile;
  1431. }
  1432. addSmsMsg(msg);
  1433. }
  1434. },
  1435. error: function(XmlHttpRequest, textStatus, errorThrown){
  1436. }
  1437. });
  1438. }
  1439. /*添加邮寄信息*/
  1440. function addSmsMsg(msg){
  1441. sendAddressSms.addListener("ready", function () {
  1442. // editor准备好之后才可以使用
  1443. sendAddressSms.setContent(msg);
  1444. });
  1445. }
  1446. /**
  1447. * 发送短信
  1448. * @param type 类型: "problem" 问题处理; mailAddress:邮寄地址;
  1449. * @param node 返回结果显示节点
  1450. */
  1451. function sendPhone(type,node){
  1452. var index = layer.load(1, {
  1453. shade: [0.5,'#fff'] //0.1透明度的白色背景
  1454. });
  1455. var desc = "";
  1456. var phone = "";
  1457. var questionId = "";
  1458. var describeTitle = "";
  1459. var smallClassId = ""; /* 客诉问题类型小类id */
  1460. var typeCompany = parseInt($("input:radio[name='typeId']:checked").attr("typeCompany"));
  1461. if(type == "p"){
  1462. phone = $("#p-phone").val();
  1463. questionId = $("#questionId").val();
  1464. describeTitle = $("#describeTitle").val();
  1465. desc = UE.getEditor('describeContentText').getContent();
  1466. smallClassId = $("#smallClassId").val();
  1467. if(smallClassId == null || smallClassId == "" ){
  1468. layer.close(index);
  1469. layer.msg("请选择问题分类!", {icon: 5, time: 3000});
  1470. return false;
  1471. }
  1472. if(describeTitle==null || describeTitle == ""){
  1473. layer.close(index);
  1474. layer.msg("请填写问题标题!", {icon: 5, time: 3000});
  1475. return false;
  1476. }
  1477. if(describeTitle.length > 50){
  1478. layer.close(index);
  1479. layer.msg("问题标题长度不能高于50个字符!", {icon: 5, time: 3000});
  1480. return false;
  1481. }
  1482. if(desc == null || desc == ""){
  1483. layer.close(index);
  1484. layer.msg("请填写问题回复!", {icon: 5, time: 3000});
  1485. return false;
  1486. }
  1487. }else if(type == "m"){
  1488. phone = $("#m-phone").val();
  1489. questionId = complaint_questionId;
  1490. desc = UE.getEditor('sendAddressSms').getContent();
  1491. if(desc == null || desc == ""){
  1492. layer.close(index);
  1493. layer.msg("请填写邮寄信息内容!", {icon: 5, time: 3000});
  1494. return false;
  1495. }
  1496. }else{
  1497. layer.close(index);
  1498. layer.msg("发送报错!", {icon: 5, time: 3000});
  1499. return false;
  1500. }
  1501. var reg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
  1502. if(!reg.test(phone)){
  1503. layer.close(index);
  1504. layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
  1505. return false;
  1506. }
  1507. $.ajax({
  1508. type: "POST",
  1509. data: {
  1510. type : type,
  1511. typeCompany : typeCompany,
  1512. phone : phone,
  1513. questionId : questionId,
  1514. smallClassId : smallClassId,
  1515. questionName : describeTitle,
  1516. questionProfile : desc //回复内容
  1517. },
  1518. url: "${path}/admin/customer/send_phone_sms",
  1519. async: true,
  1520. success: function(data){
  1521. if (data.returnCode == 200) {
  1522. if(type == "p"){
  1523. $("#p-msg").html(data.resultMsg);
  1524. }else if(type == "m"){
  1525. $("#m-msg").html(data.resultMsg);
  1526. }
  1527. }else{
  1528. if(type == "p"){
  1529. $("#p-msg").html(data.resultMsg);
  1530. }else if(type == "m"){
  1531. $("#m-msg").html(data.resultMsg);
  1532. }
  1533. }
  1534. layer.close(index);
  1535. },
  1536. error: function(XmlHttpRequest, textStatus, errorThrown){
  1537. if(type == "p"){
  1538. $("#p-msg").html("发送短信失败!");
  1539. }else if(type == "m"){
  1540. $("#m-msg").html("发送短信失败!");
  1541. }
  1542. layer.close(index);
  1543. }
  1544. });
  1545. }
  1546. /*保存QA问题*/
  1547. function saveQuestion(){
  1548. var index = layer.load(1, {
  1549. shade: [0.5,'#fff'] //0.1透明度的白色背景
  1550. });
  1551. var desc = "";
  1552. var questionId = "";
  1553. var describeTitle = "";
  1554. var smallClassId = ""; /* 客诉问题类型小类id */
  1555. questionId = $("#questionId").val();
  1556. describeTitle = $("#describeTitle").val();
  1557. desc = UE.getEditor('describeContentText').getContent();
  1558. smallClassId = $("#smallClassId").val();
  1559. if((smallClassId == null || smallClassId == "") && (questionId == null || questionId == "") ){
  1560. layer.close(index);
  1561. layer.msg("请选择问题分类!", {icon: 5, time: 3000});
  1562. return false;
  1563. }
  1564. if(describeTitle==null || describeTitle == ""){
  1565. layer.close(index);
  1566. layer.msg("请填写问题标题!", {icon: 5, time: 3000});
  1567. return false;
  1568. }
  1569. if(desc == null || desc == ""){
  1570. layer.close(index);
  1571. layer.msg("请填写问题回复!", {icon: 5, time: 3000});
  1572. return false;
  1573. }
  1574. $.ajax({
  1575. type: "POST",
  1576. data: {
  1577. questionId : questionId,
  1578. smallClassId : smallClassId,
  1579. questionName : describeTitle,
  1580. questionProfile : desc //回复内容
  1581. },
  1582. url: "${path}/admin/complaintQuestion/save_question",
  1583. async: true,
  1584. success: function(data){
  1585. if (data.returnCode == 200) {
  1586. $("#questionId").val(data.returnMsg.questionId);
  1587. layer.msg(data.resultMsg, {icon: 1, time: 3000});
  1588. }else{
  1589. layer.msg(data.resultMsg, {icon: 5, time: 3000});
  1590. }
  1591. layer.close(index);
  1592. },
  1593. error: function(XmlHttpRequest, textStatus, errorThrown){
  1594. layer.close(index);
  1595. }
  1596. });
  1597. }
  1598. /***
  1599. * 打开搜索订单框
  1600. */
  1601. function selectOrder(){
  1602. layer_show("搜索订单","${path}/admin/customer/select_order","1000","500");
  1603. }
  1604. /**
  1605. * 显示选择的订单
  1606. */
  1607. function setSelectOrder(orderId){
  1608. if(orderId == null || orderId == "" || typeof (orderId)=="undefined"){
  1609. layer.msg("未选中订单", {icon: 5, time: 3000});
  1610. return false
  1611. }
  1612. var html = '';
  1613. var address = ''; //地址
  1614. var orderItemList = {};
  1615. var companyId = ''; //销售公司
  1616. var storeId = ''; //店铺
  1617. $.ajax({
  1618. type: "POST",
  1619. data: {
  1620. salesId : orderId
  1621. },
  1622. url: "${path}/admin/customer/select_salesOrder",
  1623. async: false,
  1624. success: function(data){
  1625. if (data.returnCode == 200) {
  1626. for(var i=0;i<data.returnMsg.salesOrderList.length;i++){
  1627. var salesOrder = data.returnMsg.salesOrderList[i];
  1628. companyId = salesOrder.salesCompanyId;
  1629. storeId = salesOrder.salesStoreId;
  1630. var productsHtml = '';
  1631. var salesOrderItem = salesOrder.salesOrderItemList;
  1632. orderItemList = salesOrder.salesOrderItemList;
  1633. for(var j=0;j<salesOrderItem.length;j++){
  1634. var item = salesOrderItem[j].itemProductName + "*" + salesOrderItem[j].itemNum;
  1635. if(j==0){
  1636. productsHtml += item
  1637. }else{
  1638. productsHtml += '<br>'+ item
  1639. }
  1640. }
  1641. var time = formatDate(new Date(salesOrder.salesCreateTime),"yyyy-MM-dd");
  1642. html += '' +
  1643. ' <td style="text-align: center;">'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
  1644. ' <td style="text-align: center;">'+ salesOrder.salesId +'</td>' +
  1645. ' <td style="text-align: center;">'+ salesOrder.salesAddressName +'</td>' +
  1646. ' <td style="text-align: center;">'+ salesOrder.salesAddressTel +'</td>' +
  1647. ' <td style="text-align: center;">'+ salesOrder.salesAmount/100 +'</td>' +
  1648. ' <td style="text-align: center;">'+ productsHtml +'</td>' +
  1649. ' <td style="text-align: center;">'+ time +'</td>' +
  1650. '';
  1651. //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>' ;
  1652. address = salesOrder.salesAddressInfo;
  1653. $("#sendName").val(salesOrder.salesAddressName); //收件人名称
  1654. $("#sendTel").val(salesOrder.salesAddressTel); //收件人电话号码
  1655. $("#customerName").val(salesOrder.salesAddressName); //收件人名称
  1656. $("#customerTel").val(salesOrder.salesAddressTel); //收件人电话号码
  1657. }
  1658. // $("#showOrderAddress").html(address);
  1659. }else{
  1660. html = '';
  1661. }
  1662. $("#showOrder").html(html); //显示订单
  1663. },
  1664. error: function(XmlHttpRequest, textStatus, errorThrown){
  1665. }
  1666. });
  1667. $("#addressInfo").val(address);
  1668. setAdress(); //显示地址
  1669. setProduce(orderItemList); //显示产品
  1670. $("#companyId").val(companyId);
  1671. $("#storeId").val(storeId);
  1672. $("#orderId").val(orderId);
  1673. }
  1674. /**
  1675. * 设置地址
  1676. */
  1677. function setAdress(){
  1678. var addres = $("#addressInfo").val();
  1679. $("#addrssMsg").html("");
  1680. if(addres == null){
  1681. $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
  1682. return;
  1683. }
  1684. var addresList = addres.split("-");
  1685. if(addresList[0] == null || addresList[1]==null || addresList[2]==null || addresList[3]==null){
  1686. $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
  1687. return;
  1688. }
  1689. var proId = setPro(getAddress(addresList[0],0),1);
  1690. var cityId = setCity(getAddress(addresList[1],1),proId,1);
  1691. setDistrict(getAddress(addresList[2],2),cityId,1);
  1692. var sendAddress = addresList[3];
  1693. if(addresList.length > 4){
  1694. for(var k = 4;k< addresList.length;k++){
  1695. sendAddress += addresList[k];
  1696. }
  1697. }
  1698. $("#sendAddress").val(sendAddress);
  1699. }
  1700. /***
  1701. * 删除 “省”,“市”,“区”关键字
  1702. * type : 0:省 2:市 3:区
  1703. */
  1704. function getAddress(addrss,type) {
  1705. var abbreviation = "";
  1706. if(addrss == ""){
  1707. abbreviation = "";
  1708. }else{
  1709. switch(type)
  1710. {
  1711. case 0:
  1712. //var proReg = new RegExp("省","g");
  1713. //abbreviation = addrss.replace(proReg,"");
  1714. abbreviation = addrss.substring(0,2);
  1715. break;
  1716. case 1:
  1717. var cityReg = new RegExp("市","g");
  1718. abbreviation = addrss.replace(cityReg,"");
  1719. cityReg = new RegExp("区","g");
  1720. abbreviation = addrss.replace(cityReg,"");
  1721. break;
  1722. case 2:
  1723. var districtReg = new RegExp("区","g");
  1724. abbreviation = addrss.replace(districtReg,"");
  1725. districtReg = new RegExp("市","g");
  1726. abbreviation = abbreviation.replace(districtReg,"");
  1727. break;
  1728. default:
  1729. break;
  1730. }
  1731. }
  1732. return abbreviation
  1733. }
  1734. /**
  1735. * 设置省
  1736. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1737. */
  1738. function setPro(provinceName,type) {
  1739. var proId = '';
  1740. var province = listProvince();
  1741. var selectPro = new Array();
  1742. if(type == 1){
  1743. selectPro = listProvince("",provinceName);
  1744. }
  1745. if(province!=null){
  1746. var provinceHtml = ''
  1747. for(var i=0;i<province.length;i++){
  1748. provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
  1749. }
  1750. $("#province").html(provinceHtml);
  1751. if(selectPro != null && selectPro.length > 0 ){
  1752. proId = selectPro[0].provinceId;
  1753. }else{
  1754. proId = province[0].provinceId;
  1755. }
  1756. $("#province option[value='" + proId + "']").attr("selected","true");
  1757. }
  1758. return proId;
  1759. }
  1760. /**
  1761. * 设置市
  1762. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1763. */
  1764. function setCity(cityName,proId,type) {
  1765. var cityId = '';
  1766. var city = listCity(proId,"");
  1767. var selectCity = new Array();
  1768. if(type == 1){
  1769. selectCity = listCity(proId,cityName);
  1770. }
  1771. if(city!=null){
  1772. var cityHtml = ''
  1773. for(var i=0;i<city.length;i++){
  1774. cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
  1775. }
  1776. $("#city").html(cityHtml);
  1777. if(selectCity != null && selectCity.length > 0 ){
  1778. cityId = selectCity[0].cityId;
  1779. }else{
  1780. cityId = city[0].cityId;
  1781. }
  1782. $("#city option[value='" + cityId + "']").attr("selected","true");
  1783. }
  1784. return cityId;
  1785. }
  1786. /**
  1787. * 设置区
  1788. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1789. */
  1790. function setDistrict(districtName,cityId,type) {
  1791. var district = listDistrict(cityId,"");
  1792. var selectDistrict = new Array();
  1793. if(type == 1){
  1794. selectDistrict = listDistrict(cityId,districtName);
  1795. }
  1796. if(district!=null){
  1797. var districtHtml = ''
  1798. for(var i=0;i<district.length;i++){
  1799. districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
  1800. }
  1801. var disId = "";
  1802. $("#district").html(districtHtml);
  1803. if(selectDistrict != null && selectDistrict.length > 0 ){
  1804. disId = selectDistrict[0].districtId;
  1805. }else{
  1806. disId = district[0].districtId;
  1807. }
  1808. $("#district option[value='" + disId + "']").attr("selected","true");
  1809. }
  1810. }
  1811. /* TDS收集设置区 */
  1812. var TDSCity = '';
  1813. function linkageSetDistrict(){
  1814. var arrcity_3word = $("#arrcity_3word").val();
  1815. var cityName = '北京';
  1816. for(var i = 0;i<citys.length;i++){
  1817. for(var j=0;j<citys[i].length;j++){
  1818. if(j == 0 && arrcity_3word == citys[i][j]){
  1819. cityName = citys[i][1];
  1820. }
  1821. }
  1822. }
  1823. TDSCity = cityName;
  1824. var selectCity = listCity(null,cityName);
  1825. var cityId = selectCity[0].cityId;
  1826. var selectDistrict = listDistrict(cityId,"");
  1827. var html = '';
  1828. for(var i=0;i<selectDistrict.length;i++){
  1829. html += '<option value="'+ selectDistrict[i].districtId +'">'+ selectDistrict[i].district +'</option>';
  1830. }
  1831. $("#TDSArea").html(html);
  1832. $("#TDSArea").find("option").eq(0).prop("selected",true);
  1833. setTDSCollect();
  1834. }
  1835. /**
  1836. * 展示产品
  1837. * @param orderItemList
  1838. */
  1839. function setProduce(orderItemList) {
  1840. var productList = getProduct() ; //所有产品
  1841. var html = "";
  1842. var productTypeNo = 0;
  1843. for(var i=0;i<productList.length;i++) {
  1844. var product = productList[i];
  1845. var produceFittings = getProduceFittings(product.productId); //获取该产品的所有配件
  1846. var colorList = product.colorList; //该产品的所有颜色
  1847. var productType = product.productType;
  1848. var colorHtml = '';
  1849. if(colorList != null && colorList.length >0 ){
  1850. colorHtml += '<table style="height: 100%;">';
  1851. for(var j=0;j<colorList.length;j++){
  1852. var number = "";
  1853. var color = colorList[j];
  1854. for(var k=0;k<orderItemList.length;k++){
  1855. var item = orderItemList[k];
  1856. if(item.itemColorId == color.colorId && item.itemIsSource == 1){
  1857. number = item.itemNum;
  1858. }
  1859. }
  1860. var fristInputStyle = "border-top: 1px solid #ddd;";
  1861. if(color.colorProductId == product.productId) {
  1862. colorHtml += '<tr >' +
  1863. ' <td width="55" style="border-left: none;text-align: center;'+ fristInputStyle +'">' + color.colorName + '</td>' +
  1864. ' <td width="45" style="'+ fristInputStyle +' padding: 0px;width: 25px;">' +
  1865. ' <input type="hidden" class="input-produce-id" value="' + color.colorProductId + '">' +
  1866. ' <input type="hidden" class="input-color-id" value="' + color.colorId + '">' +
  1867. ' <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="产品数量" id="color-' + color.colorProductId + '-' + color.colorId + '" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)" >' +
  1868. ' </td>' +
  1869. ' </tr>';
  1870. fristInputStyle = "";
  1871. }
  1872. }
  1873. colorHtml += '</table>';
  1874. }else{
  1875. colorHtml += '<span>暂无该产品的颜色!<span>';
  1876. }
  1877. var produceFittingsHtml = '';
  1878. if(produceFittings != null && produceFittings.length > 0){
  1879. produceFittingsHtml += '<table style="height: 100%;">';
  1880. for(var m=0;m<produceFittings.length;m++){
  1881. var number = "";
  1882. var fitt = produceFittings[m];
  1883. for(var k=0;k<orderItemList.length;k++){
  1884. var item = orderItemList[k];
  1885. if(item.itemColorId == fitt.fittingsId && item.itemIsSource == 2){
  1886. number = item.itemNum;
  1887. }
  1888. }
  1889. var produceFit = produceFittings[m];
  1890. if(produceFit.productId == product.productId) {
  1891. var fristInputStyle = "border-top: 1px solid #ddd;";
  1892. produceFittingsHtml += '<tr >' +
  1893. ' <td width="55" style="border-left: none;text-align: center; '+ fristInputStyle +'">' + produceFit.fittingsName +'</td>' +
  1894. ' <td width="45" style="'+ fristInputStyle +'padding: 0px;width: 25px;">' +
  1895. ' <input type="hidden" class="input-produce-id" value="' + produceFit.productId + '">' +
  1896. ' <input type="hidden" class="input-fittings-id" value="' + produceFit.fittingsId +'">' +
  1897. ' <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="配件数量" id="fittings-' + produceFit.productId + '-' + produceFit.fittingsId +'" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)" >' +
  1898. ' </td>' +
  1899. ' </tr>';
  1900. fristInputStyle = "";
  1901. }
  1902. }
  1903. produceFittingsHtml += '</table>';
  1904. }else{
  1905. produceFittingsHtml += '<span>暂无产品配件!<span>';
  1906. }
  1907. var produceHtml = '<input type="hidden" value="'+ product.productId +'">' +
  1908. '<span>'+ product.productName +'</span>';
  1909. html += ' <tr >' +
  1910. ' <td width="80">'+ produceHtml +'</td>' +
  1911. ' <td style="padding: 0px;text-align: center;">' +
  1912. colorHtml +
  1913. ' </td>' +
  1914. ' <td style="padding: 0px;text-align: center;">' +
  1915. produceFittingsHtml +
  1916. ' </td>' +
  1917. '</tr>';
  1918. }
  1919. $("#addProduct").html(html);
  1920. setBackProduct(html); //设置寄回产品
  1921. monitorProduct(); //监听产品变化
  1922. }
  1923. /*获取产品*/
  1924. function getProduct(){
  1925. var productList;
  1926. $.ajax({
  1927. type: "POST",
  1928. data: {
  1929. },
  1930. url: "${path}/admin/customer/select_produce",
  1931. async: false,
  1932. success: function(data){
  1933. if (data.returnCode == 200) {
  1934. productList = data.returnMsg.productList;
  1935. }
  1936. },
  1937. error: function(XmlHttpRequest, textStatus, errorThrown){
  1938. }
  1939. });
  1940. return productList;
  1941. }
  1942. /*获取产品配件*/
  1943. function getProduceFittings(productId){
  1944. var produceFittings;
  1945. $.ajax({
  1946. type: "get",
  1947. data: {
  1948. productId : productId
  1949. },
  1950. url: "${path}/admin/customer/select_produce_fittings",
  1951. async: false,
  1952. success: function(data){
  1953. if (data.returnCode == 200) {
  1954. produceFittings = data.returnMsg.produceFittingsList;
  1955. }
  1956. },
  1957. error: function(XmlHttpRequest, textStatus, errorThrown){
  1958. }
  1959. });
  1960. return produceFittings;
  1961. }
  1962. /*监听产品变化*/
  1963. function monitorProduct(){
  1964. /*产品数量*/
  1965. $("#addProduct").find(".input-color-number").blur(function (){
  1966. setBackProduct();
  1967. })
  1968. /*产品配件*/
  1969. $("#addProduct").find(".input-fittings-number").blur(function (){
  1970. setBackProduct();
  1971. })
  1972. }
  1973. /*设置寄回产品*/
  1974. function setBackProduct(html) {
  1975. if(html != null && html != "" && typeof(html) != "undefined"){
  1976. $("#back-product").html(html);
  1977. }else{
  1978. $("#addProduct").find(".input-color-number").each(function(){
  1979. var number = $(this).val();
  1980. var colorNodeId = $(this).attr("id");
  1981. $("#back-product").find("#"+colorNodeId).val(number);
  1982. })
  1983. $("#addProduct").find(".input-fittings-number").each(function(){
  1984. var number = $(this).val();
  1985. var fittingsNodeId = $(this).attr("id");
  1986. $("#back-product").find("#"+fittingsNodeId).val(number);
  1987. })
  1988. }
  1989. }
  1990. /*设置TDS收集信息*/
  1991. function setTDSCollect(){
  1992. var TDSArea = $("#TDSArea").find("option:selected").text();
  1993. var TDSAddress = TDSCity + '-' + TDSArea;
  1994. if(TDSAddress != null && TDSAddress != ""){
  1995. $("#DTS-address").html("地址:" + TDSAddress);
  1996. }
  1997. }
  1998. /*TDS联动处理*/
  1999. function TDSLinkage(node,maxNumber,minNumber){
  2000. setTDSCollect();
  2001. var number = 0;
  2002. var c=$(node);
  2003. if(c.val() == ""){
  2004. $(node).val("");
  2005. }else{
  2006. var temp_amount=c.val().replace(/[^\d]/g,'');
  2007. number = Number(temp_amount)
  2008. if(maxNumber!= null && maxNumber!= "" && number > maxNumber){
  2009. number = maxNumber;
  2010. }
  2011. if(minNumber!= null && minNumber!= "" && number < minNumber){
  2012. number = minNumber;
  2013. }
  2014. $(node).val(number);
  2015. }
  2016. var nodeName = $(node).attr("id");
  2017. if(nodeName == "customerInTDS" ){
  2018. $("#DTS-in").html("进水:" + number + " PPM");
  2019. }else if(nodeName == "customerOutTDS" ){
  2020. $("#DTS-out").html("出水:" + number + " PPM");
  2021. }
  2022. }
  2023. </script>
  2024. <script>
  2025. $(function(){
  2026. $("#form-customer-add").Validform({
  2027. tiptype: function (msg, o, cssctl) {
  2028. if (o.type == 3) {//失败
  2029. layer.msg(msg, {icon: 5, time: 3000});
  2030. $(window).scrollTop(o.obj.offset().top - 40);
  2031. }
  2032. },
  2033. datatype: {//自定义验证类型
  2034. },
  2035. ignoreHidden: true,
  2036. tipSweep: true, //若为true,则只在表单提交时验证
  2037. ajaxPost: true, //异步提交
  2038. beforeCheck: function (curform) { //验证通过之前执行的函数
  2039. },
  2040. beforeSubmit: function (curform) { //验证通过之后执行的函数
  2041. var flag = addCustomerReady();
  2042. if(!flag){
  2043. return false;
  2044. }
  2045. },
  2046. callback: function (data) {//异步回调函数
  2047. if (data) {
  2048. var index = layer.alert(data.resultMsg, function (index) {
  2049. if (data.resultCode == 200) {
  2050. location.href = "${path}/admin/customer/select_customer_list";
  2051. } else if(data.resultCode == 505){
  2052. location.href = "${path}/admin/customer/select_customer_list";
  2053. }else {
  2054. layer.close(index);
  2055. }
  2056. });
  2057. }
  2058. }
  2059. });
  2060. })
  2061. /* 添加客诉的准备 */
  2062. function addCustomerReady(){
  2063. /* 录入电话号码和姓名到客诉基本信息里面 */
  2064. if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 5 || allCustomerType == 6 || allCustomerType == 7){
  2065. $("#customerName").val($("#sendName").val());
  2066. $("#customerTel").val($("#sendTel").val());
  2067. }
  2068. /*验证来源入口*/
  2069. var customerSourceType = $("input:radio[name='customerSourceType']:checked").val();
  2070. if(customerSourceType == 3){
  2071. var customerSourceOld = $("#customerSourceOld").val();
  2072. if(customerSourceOld == null || customerSourceOld == "" || typeof(customerSourceOld)=="undefined"){
  2073. vailErrorMsg($("#customerSourceOld"),"未填写来源入口");
  2074. return false;
  2075. }else{
  2076. $("#customerSource").val(customerSourceOld);
  2077. }
  2078. }
  2079. /*根据产品类型,获取来源商城*/
  2080. var typeCompany = parseInt($("input:radio[name='typeId']:checked").attr("typeCompany"));
  2081. $("#typeCompany").val(typeCompany);
  2082. /*----TDS收集模块--start-----*/
  2083. var valicity = $(".ac_result_tip").html();
  2084. if(valicity == null || valicity == "" || typeof(valicity)=="undefined"){
  2085. $("#TDSArea").html("");
  2086. }else if(valicity.indexOf("对不起,找不到") > 0 ){
  2087. $("#TDSArea").html("");
  2088. $("#customerArea").val("");
  2089. }else{
  2090. var TDSArea = $("#TDSArea").find("option:selected").text();
  2091. if(TDSArea != null && TDSArea != ""){
  2092. var area = TDSCity + "-" + TDSArea
  2093. $("#customerArea").val(area);
  2094. }
  2095. }
  2096. /*----TDS收集模块--end-----*/
  2097. /* 地址拼接 */
  2098. var province = $("#province").find("option:selected").text();
  2099. var city = $("#city").find("option:selected").text();
  2100. var district = $("#district").find("option:selected").text();
  2101. var relationSendMergeAddress = province + "-" + city + "-" + district;
  2102. $("#relationSendMergeAddress").val(relationSendMergeAddress);
  2103. /* 地址拼接 */
  2104. /*----问题描述- start --*/
  2105. var describeContentText = UE.getEditor('describeContentText').getContent();
  2106. if(describeContentText == null || describeContentText == ""){
  2107. //layer.msg("未填写问题描述", {icon: 5, time: 3000});
  2108. vailErrorMsg($("#describeTitle"),"未填写问题描述");
  2109. return false;
  2110. }
  2111. $("#describeContent").val(describeContentText);
  2112. /*----问题描述--end-----*/
  2113. /*----处理描述- start --*/
  2114. var describeHandleDescText = UE.getEditor('describeHandleDescText').getContent();
  2115. $("#describeHandleDesc").val(describeHandleDescText);
  2116. /*----处理描述--end-----*/
  2117. /* --- 类型:售后 处理结果:维修/换新/补发/退货/无理由退货 -- 处理产品 start---- */
  2118. var sendProdcues = new Array(); //寄出产品表
  2119. var sendFittings = new Array();
  2120. var closedProdcues = new Array();
  2121. var closedFittings = new Array();
  2122. $("#addProduct").find(".input-color-number").each(function(){
  2123. var number = $(this).val();
  2124. if(number != null && number != "" && number != 0){
  2125. var product = new Object();
  2126. product.productId = $(this).parent().find(".input-produce-id").val();
  2127. product.colorId = $(this).parent().find(".input-color-id").val();
  2128. //换新、维修,退货,无理由退货,
  2129. if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 6 || allCustomerType == 7){
  2130. product.closedProdcueNumber = number;
  2131. closedProdcues.push(product);
  2132. }else if(allCustomerType == 5){
  2133. product.sendProdcueNumber = number;
  2134. sendProdcues.push(product);
  2135. }
  2136. }
  2137. })
  2138. $("#addProduct").find(".input-fittings-number").each(function(){
  2139. var number = $(this).val();
  2140. if(number != null && number != "" && number != 0){
  2141. var fittings = new Object();
  2142. fittings.productId = $(this).parent().find(".input-produce-id").val();
  2143. fittings.fittingsId = $(this).parent().find(".input-fittings-id").val();
  2144. //换新、维修,退货,无理由退货,
  2145. if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 6 || allCustomerType == 7){
  2146. fittings.closedFittingNumber = number;
  2147. closedFittings.push(fittings);
  2148. }else if(allCustomerType == 5){
  2149. fittings.sendFittingNumber = number;
  2150. sendFittings.push(fittings);
  2151. }
  2152. }
  2153. })
  2154. $("#back-product").find(".input-color-number").each(function(){
  2155. var number = $(this).val();
  2156. if(number != null && number != "" && number != 0){
  2157. //换新、维修,
  2158. if(allCustomerType == 3 || allCustomerType == 4){
  2159. var fittings = new Object();
  2160. fittings.productId = $(this).parent().find(".input-produce-id").val();
  2161. fittings.colorId = $(this).parent().find(".input-color-id").val();
  2162. fittings.sendProdcueNumber = number;
  2163. sendProdcues.push(fittings);
  2164. }
  2165. }
  2166. })
  2167. $("#back-product").find(".input-fittings-number").each(function(){
  2168. var number = $(this).val();
  2169. if(number != null && number != "" && number != 0){
  2170. //换新、维修
  2171. if(allCustomerType == 3 || allCustomerType == 4){
  2172. var fittings = new Object();
  2173. fittings.productId = $(this).parent().find(".input-produce-id").val();
  2174. fittings.fittingsId = $(this).parent().find(".input-fittings-id").val();
  2175. fittings.sendFittingNumber = number;
  2176. sendFittings.push(fittings);
  2177. }
  2178. }
  2179. })
  2180. var backErrorMsg = "请选择一个replace_error_msg寄回的产品或配件并填写一个以上的数量!"
  2181. var sendErrorMsg = "请选择一个replace_error_msg寄送的产品或配件并填写一个以上的数量!"
  2182. var process = true;
  2183. switch (allCustomerType){
  2184. case 3:
  2185. process = processIsEmpty([closedProdcues,closedFittings]);
  2186. if(!process){
  2187. var msg = backErrorMsg.replace("replace_error_msg","换新");
  2188. layer.msg(msg, {icon: 5, time: 3000});
  2189. return false;
  2190. }
  2191. process = processIsEmpty([sendProdcues,sendFittings]);
  2192. if(!process){
  2193. var msg = sendErrorMsg.replace("replace_error_msg","换新");
  2194. layer.msg(msg, {icon: 5, time: 3000});
  2195. return false;
  2196. }
  2197. break;
  2198. case 4:
  2199. process = processIsEmpty([closedProdcues,closedFittings]);
  2200. if(!process){
  2201. var msg = backErrorMsg.replace("replace_error_msg","维修");
  2202. layer.msg(msg, {icon: 5, time: 3000});
  2203. return false;
  2204. }
  2205. process = processIsEmpty([sendProdcues,sendFittings]);
  2206. if(!process){
  2207. var msg = sendErrorMsg.replace("replace_error_msg","维修");
  2208. layer.msg(msg, {icon: 5, time: 3000});
  2209. return false;
  2210. }
  2211. break;
  2212. case 5:
  2213. process = processIsEmpty([sendProdcues,sendFittings]);
  2214. if(!process){
  2215. var msg = sendErrorMsg.replace("replace_error_msg","补发");
  2216. layer.msg(msg, {icon: 5, time: 3000});
  2217. return false;
  2218. }
  2219. break;
  2220. case 6:
  2221. process = processIsEmpty([closedProdcues,closedFittings]);
  2222. if(!process){
  2223. var msg = backErrorMsg.replace("replace_error_msg","退货");
  2224. layer.msg(msg, {icon: 5, time: 3000});
  2225. return false;
  2226. }
  2227. break;
  2228. case 7:
  2229. process = processIsEmpty([closedProdcues,closedFittings]);
  2230. if(!process){
  2231. var msg = backErrorMsg.replace("replace_error_msg","退货");
  2232. layer.msg(msg, {icon: 5, time: 3000});
  2233. return false;
  2234. }
  2235. break;
  2236. default:
  2237. break;
  2238. }
  2239. $("#sendProdcues").val(JSON.stringify(sendProdcues));
  2240. $("#sendFittings").val(JSON.stringify(sendFittings));
  2241. $("#closedProdcues").val(JSON.stringify(closedProdcues));
  2242. $("#closedFittings").val(JSON.stringify(closedFittings));
  2243. var visitTimeSelect = $("input[name='visitTimeSelect']:checked").val();
  2244. var visit_date = $('#datemin').val();
  2245. var myDate = new Date();
  2246. var date = myDate.getFullYear()+"-"+(myDate.getMonth()+1)+"-"+myDate.getDate();
  2247. var hours = myDate.getHours();
  2248. //如果两个时间相等,则判断可选的回访时间
  2249. if(Date.parse(visit_date) == Date.parse(date)){
  2250. var msg = "该时间已超过当前时间,请重新选择回访时间!";
  2251. if (hours > 12 && visitTimeSelect == 1) {
  2252. vailErrorMsg($("#datemin"),msg);
  2253. return false;
  2254. } else if (hours > 14 && visitTimeSelect == 2) {
  2255. vailErrorMsg($("#datemin"),msg);
  2256. return false;
  2257. } else if (hours > 18 && visitTimeSelect == 3) {
  2258. vailErrorMsg($("#datemin"),msg);
  2259. return false;
  2260. }
  2261. }
  2262. return true;
  2263. }
  2264. /* 判断产品与配件是否填入值 */
  2265. function processIsEmpty(process){
  2266. if(process != null && process != "" && process.length > 0){
  2267. var flag = 2;
  2268. var num = 0;
  2269. if(process[0] == null || process[0].length < 1 ){
  2270. flag -- ;
  2271. }
  2272. if(process[1] == null || process[1].length < 1 ){
  2273. flag -- ;
  2274. }
  2275. for(var j=0; j<process.length;j++){
  2276. for(var i=0;i<process[j].length;i++){
  2277. if(process[j][i].sendProdcueNumber !== undefined){
  2278. num += process[j][i].sendProdcueNumber;
  2279. }
  2280. if(process[j][i].sendFittingNumber !== undefined){
  2281. num += process[j][i].sendFittingNumber;
  2282. }
  2283. if(process[j][i].closedProdcueNumber !== undefined){
  2284. num += process[j][i].closedProdcueNumber ;
  2285. }
  2286. if(process[j][i].closedFittingNumber !== undefined){
  2287. num += process[j][i].closedFittingNumber;
  2288. }
  2289. }
  2290. }
  2291. if(flag == 0){
  2292. return false;
  2293. }
  2294. if(num == 0){
  2295. return false;
  2296. }
  2297. }
  2298. return true;
  2299. }
  2300. </script>
  2301. <!--/请在上方写此页面业务相关的脚本-->
  2302. </body>
  2303. </html>