update_customer.ftl 117 KB

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