add_customer.ftl 98 KB

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