add_customer.ftl 97 KB

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