update_relation.ftl 177 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440
  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/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
  11. <link href="${path}/common/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
  12. <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
  13. <link href="${path}/common/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
  14. <style>
  15. #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(images/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
  16. .select-box{background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size: auto 100%;}
  17. .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 15px;}
  18. .table-bg th{background-color: #e2f6ff;text-align: center;}
  19. .table-bordered td{text-align: center;}
  20. .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
  21. .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 20px;background-color: #32a3d8;color: #fff;}
  22. .clearfix:after{content:"\20";display:block;height:0;clear:both;visibility:hidden}.clearfix{zoom:1}
  23. .tabBar span {background-color: #fff;cursor: pointer;display: inline-block;float: left;font-weight: bold;height: 30px;line-height: 30px;padding: 0 15px;position: relative;}
  24. .tabCon {display: none}
  25. .tabBar span.current{background-color: #fff;color: #50a2ea;}
  26. .tabBar span.current:after{content: '';width: 2em;height: 2px;background: #50a2ea;position: absolute;left: 50%;bottom: 0;margin-left: -1em;}
  27. .tabBar{border-bottom: 1px solid #ccc;}
  28. .table-bg thead th{background: #f7fafd;}
  29. .td-manage>a{color: #50a2ea;}
  30. input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  31. input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  32. .all_down{text-decoration: underline;color: #00c;}
  33. </style>
  34. <title></title>
  35. </head>
  36. <body>
  37. <article class="cl pd-20">
  38. <form action="" method="post" class="form form-horizontal" id="form-update-renewed" name="form-update-renewed">
  39. <div class="row cl" style="margin-left: -60px;margin-bottom: 20px;">
  40. <div class="formControls col-2 col-sm-2 text-r">
  41. <strong>当前进度</strong>
  42. </div>
  43. <div class="formControls col-10 col-sm-10">
  44. <input type="hidden" id="relationId" name="relationId" seleType="primary"/>
  45. <span id="relationSchedule" class="c-red"></span>
  46. </div>
  47. </div>
  48. <div id="tab_demo" class="HuiTab">
  49. <div class="tabBar clearfix">
  50. <#if procMethod.procMethodIsBack == 1>
  51. <span>寄回信息</span>
  52. <span>邮费信息</span>
  53. </#if>
  54. <#if procMethod.procMethodIsSend == 1>
  55. <span>寄送信息</span>
  56. </#if>
  57. <#if procMethod.procMethodIsBack == 1>
  58. <span>收费信息</span>
  59. <span>签收信息</span>
  60. <span>维修信息</span>
  61. <#--<span>工厂检查信息</span>
  62. <span>工厂返修进度</span>-->
  63. </#if>
  64. </div>
  65. <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
  66. <div class="row cl">
  67. <#--<div class="formControls col-2 col-sm-2 text-r">
  68. <strong>寄回信息</strong>
  69. </div>-->
  70. <div class="formControls col-12 col-sm-12">
  71. <table class="table table-border table-bg table-bordered" >
  72. <thead>
  73. <tr>
  74. <th>物流公司</th>
  75. <th>物流单号</th>
  76. <th>寄回人信息</th>
  77. <th>状态</th>
  78. <th>产品</th>
  79. <th>操作</th>
  80. </tr>
  81. </thead>
  82. <tbody id="SendbackbodyId">
  83. <#if listSendbackInfo?? && (listSendbackInfo?size > 0) >
  84. <#list listSendbackInfo as sendbackInfo>
  85. <tr id="deleteSendbackId${(sendbackInfo.sendbackId)!''}">
  86. <td>${(sendbackInfo.sendbackLogisticsName)!''}</td>
  87. <td>${(sendbackInfo.sendbackLogisticsNo)!''}</td>
  88. <td>${(sendbackInfo.sendbackName)!''}<br>${(sendbackInfo.sendbackTel)!''}</td>
  89. <td>
  90. <#if sendbackInfo.sendbackStatus == 1><span class="c-warning">未配送</span></#if>
  91. <#if sendbackInfo.sendbackStatus == 2>配送中</#if>
  92. <#if sendbackInfo.sendbackStatus == 3><span class="c-success">已签收</span></#if>
  93. </td>
  94. <td>
  95. <#if sendbackInfo.listSendbackItem?? && (sendbackInfo.listSendbackItem?size > 0) >
  96. <#list sendbackInfo.listSendbackItem as sendbackItem>
  97. ${sendbackItem.sendbackProductName}(${sendbackItem.sendbackColorName})* ${sendbackItem.sendbackProdcueNumber}<br>
  98. </#list>
  99. </#if>
  100. </td>
  101. <td><#if sendbackInfo.sendbackStatus != 3><a onclick="deleteSendbackInfo(${(sendbackInfo.sendbackId)!});">删除</a>&nbsp;&nbsp;<a onclick="getSendbackInfo(${(sendbackInfo.sendbackId)!});">修改</a>&nbsp;&nbsp;
  102. <#if sendbackInfo.sendbackStatus == 2>
  103. <a onclick="updateSendbackStatus(${(sendbackInfo.sendbackId)!});">签收</a>
  104. </#if>
  105. </#if>
  106. </td>
  107. </tr>
  108. </#list>
  109. <#else>
  110. <tr id="colspanSendbackId"><td colspan="7" class="td-manage text-c" >暂时没有寄回信息,请添加!</td></tr>
  111. </#if>
  112. </tbody>
  113. </table>
  114. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;display: block;margin: 20px auto;" id="" name="" onclick="showSendbackDiv();">添加寄回信息</button>
  115. </div>
  116. </div>
  117. <div class="row cl" id="addSendBackDiv" style="display:none;">
  118. <div class="formControls col-2 col-sm-2 text-r">
  119. <strong></strong>
  120. </div>
  121. <div class="formControls col-12 col-sm-12">
  122. <div class="row cl">
  123. <div class="formControls col-2 col-sm-2 text-r">
  124. <strong>寄回信息</strong>
  125. </div>
  126. <div class="formControls col-12 col-sm-12">
  127. <div class="formControls col-2 col-sm-2 text-r">
  128. <strong>寄回状态</strong>
  129. </div>
  130. <div class="radio-box">
  131. <input type="radio" id="tel-b1" name="sendbackStatus" value="1">
  132. <label for="tel-b1">未寄回</label>
  133. </div>
  134. <div class="radio-box">
  135. <input type="radio" id="tel-b2" name="sendbackStatus" checked value="2">
  136. <label for="tel-b2">已寄回</label>
  137. </div>
  138. <#--<div class="radio-box">
  139. <input type="radio" id="tel-b3" name="sendbackStatus" value="3">
  140. <label for="tel-b3">已签收</label>
  141. </div>-->
  142. </div>
  143. </div>
  144. <div class="row cl">
  145. <div class="formControls col-12 col-sm-12">
  146. <div class="formControls col-2 col-sm-2 text-r">
  147. <strong>是否使用</strong>
  148. </div>
  149. <div class="radio-box">
  150. <input type="radio" id="tel-b4" name="sendbackIsUse" checked value="1">
  151. <label for="tel-b4">未使用</label>
  152. </div>
  153. <div class="radio-box">
  154. <input type="radio" id="tel-b5" name="sendbackIsUse" value="2">
  155. <label for="tel-b5">已使用</label>
  156. </div>
  157. <#--<div class="radio-box">
  158. <input type="radio" id="tel-b3" name="sendbackStatus" value="3">
  159. <label for="tel-b3">已签收</label>
  160. </div>-->
  161. </div>
  162. </div>
  163. <div class="row cl" id="backLogisticsInfo">
  164. <div class="formControls col-2 col-sm-2 text-r">
  165. <strong>物流信息</strong>
  166. </div>
  167. <div class="formControls col-4 col-sm-4">
  168. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  169. <span class="select-box">
  170. <select name="sendbackLogisticsCompany" id="sendbackLogisticsCompany" class="select" seleType="send">
  171. <option value="">请选择物流公司</option>
  172. <#if logisticsInfoList?? && (logisticsInfoList?size > 0) >
  173. <#list logisticsInfoList as logisticsInfo>
  174. <option value="${logisticsInfo.logisticsRstCode!''}" >${logisticsInfo.logisticsName!''}(${logisticsInfo.logisticsRstCode!''})</option>
  175. </#list>
  176. </#if>
  177. </select>
  178. </span>
  179. </div>
  180. </div>
  181. <div class="formControls col-4 col-sm-4">
  182. <input style="margin-right: 10px;" type="text" class="input-text" value="" placeholder="请输入快递单号" id="sendbackLogisticsNo" name="sendbackLogisticsNo">
  183. <#--<input style="width: 150px;margin-right: 10px;" type="text" class="input-text" value="" placeholder="寄回邮费" id="renewedBackPostage" name="renewedBackPostage">
  184. <input style="width: 150px;" type="text" class="input-text" value="" placeholder="用户支付宝账户" id="renewedAlipay" name="renewedAlipay">-->
  185. </div>
  186. </div>
  187. <div class="row cl" style="position: relative;" id="backUserInfo">
  188. <div class="formControls col-2 col-sm-2 text-r">
  189. <strong>寄件人</strong>
  190. </div>
  191. <div class="formControls col-4 col-sm-4">
  192. <input type="text" class="input-text" value="" placeholder="寄件人姓名" id="sendbackName" name="sendbackName">
  193. </div>
  194. <div class="formControls col-4 col-sm-4">
  195. <input type="text" class="input-text" value="" placeholder="寄件人电话" id="sendbackTel" name="sendbackTel">
  196. </div>
  197. </div>
  198. <div class="row cl">
  199. <div class="formControls col-6 col-sm-6">
  200. <div class="formControls col-4 col-sm-4 text-r">
  201. <strong>通知售前客服</strong>
  202. </div>
  203. <div class="radio-box">
  204. <input type="radio" id="tel-Notice1" name="sendbackNoticeCustomer" onclick="noticeCustomer();" checked value="1">
  205. <label for="tel-Notice1">是&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
  206. </div>
  207. <div class="radio-box">
  208. <input type="radio" id="tel-Notice2" name="sendbackNoticeCustomer" onclick="noticeCustomer();" value="2">
  209. <label for="tel-Notice2">否</label>
  210. </div>
  211. </div>
  212. <div id="sendbackPresaleAdminDiv">
  213. <div class="formControls col-4 col-sm-4">
  214. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  215. <span class="select-box">
  216. <select name="sendbackPresaleAdminId" id="sendbackPresaleAdminId" class="select" seleType="send">
  217. <#if adminlist?? && (adminlist?size > 0) >
  218. <#list adminlist as admin>
  219. <option value="${admin.adminId!''}" >${admin.adminName!''}</option>
  220. </#list>
  221. </#if>
  222. </select>
  223. </span>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. <#--<div class="row cl" id="sendbackPresaleAdminDiv" &lt;#&ndash;style="display: none;"&ndash;&gt;>
  229. <div class="formControls col-2 col-sm-2 text-r">
  230. <strong>售前客服</strong>
  231. </div>
  232. <div class="formControls col-4 col-sm-4">
  233. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  234. <span class="select-box">
  235. <select name="sendbackPresaleAdminId" id="sendbackPresaleAdminId" class="select" seleType="send">
  236. <#if adminlist?? && (adminlist?size > 0) >
  237. <#list adminlist as admin>
  238. <option value="${admin.adminId!''}" >${admin.adminName!''}</option>
  239. </#list>
  240. </#if>
  241. </select>
  242. </span>
  243. </div>
  244. </div>
  245. </div>-->
  246. <div class="row cl" style="position: relative;" id="backUserInfo">
  247. <div class="formControls col-2 col-sm-2 text-r">
  248. <strong>寄回产品</strong>
  249. </div>
  250. <div class="formControls col-8 col-sm-8">
  251. <table class="table table-border table-bg table-bordered" >
  252. <thead>
  253. <tr>
  254. <th>产品</th>
  255. <th>颜色</th>
  256. <th>数量</th>
  257. </tr>
  258. </thead>
  259. <tbody id="productbodyId">
  260. <#if listClosedProdcue?? && (listClosedProdcue?size > 0) >
  261. <#list listClosedProdcue as prodcue>
  262. <tr>
  263. <td>${(prodcue.closedProductName)!''}</td>
  264. <td>${(prodcue.closedColorName)!''}</td>
  265. <td><input type="text" class="input-text input-prodcueNumber-id" value="${(prodcue.closedProdcueNumber)!''}"></td>
  266. <input type="hidden" class="input-produce-id" value="${(prodcue.productId)!''}">
  267. <input type="hidden" class="input-color-id" value="${(prodcue.colorId)!''}">
  268. </tr>
  269. </#list>
  270. <#else>
  271. <tr id="colspanId"><td colspan="3" class="td-manage text-c" >没有产品信息!</td></tr>
  272. </#if>
  273. </tbody>
  274. </table>
  275. <input type="hidden" id="sendProdcues" value="">
  276. </div>
  277. </div>
  278. <div class="row cl" style="position: relative;/*display: none;*/">
  279. <div class="formControls col-2 col-sm-2 text-r">
  280. <strong>仓库签收时间</strong>
  281. </div>
  282. <div class="formControls col-4 col-sm-4">
  283. <input type="text" placeholder="请选择仓库签收时间" id="sendbackSignTime" name="sendbackSignTime" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" readonly="readonly" seleType="send">
  284. </div>
  285. </div>
  286. <div class="row cl">
  287. <div class="formControls col-2 col-sm-2">
  288. </div>
  289. <div class="formControls col-8 col-sm-8 text-c">
  290. <button onClick="addSendbackInfo();" class="btn btn-primary" type="button">确认添加寄回信息</button>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. <div class="row cl" id="updateSendBackDiv" style="display:none;">
  296. <input type="hidden" value="" id="sendbackIds">
  297. <div class="formControls col-2 col-sm-2 text-r">
  298. <strong></strong>
  299. </div>
  300. <div class="formControls col-12 col-sm-12">
  301. <div class="row cl">
  302. <div class="formControls col-2 col-sm-2 text-r">
  303. <strong>寄回信息</strong>
  304. </div>
  305. <div class="formControls col-12 col-sm-12">
  306. <div class="formControls col-2 col-sm-2 text-r">
  307. <strong>寄回状态</strong>
  308. </div>
  309. <div class="radio-box">
  310. <input type="radio" id="tel-c1" name="sendbackStatuss" value="1">
  311. <label for="tel-c1">未寄回</label>
  312. </div>
  313. <div class="radio-box">
  314. <input type="radio" id="tel-c2" name="sendbackStatuss" value="2">
  315. <label for="tel-c2">已寄回</label>
  316. </div>
  317. <#--<div class="radio-box">
  318. <input type="radio" id="tel-c3" name="sendbackStatuss" value="3">
  319. <label class="c-success">已签收</label>
  320. </div>-->
  321. </div>
  322. </div>
  323. <div class="row cl" id="backLogisticsInfos">
  324. <div class="formControls col-2 col-sm-2 text-r">
  325. <strong>物流信息</strong>
  326. </div>
  327. <div class="formControls col-4 col-sm-4">
  328. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  329. <span class="select-box">
  330. <select name="sendbackLogisticsCompanys" id="sendbackLogisticsCompanys" class="select" seleType="send">
  331. <option value="">请选择物流公司</option>
  332. <#if logisticsInfoList?? && (logisticsInfoList?size > 0) >
  333. <#list logisticsInfoList as logisticsInfo>
  334. <option value="${logisticsInfo.logisticsRstCode!''}" >${logisticsInfo.logisticsName!''}(${logisticsInfo.logisticsRstCode!''})</option>
  335. </#list>
  336. </#if>
  337. </select>
  338. </span>
  339. </div>
  340. </div>
  341. <div class="formControls col-4 col-sm-4">
  342. <input style="margin-right: 10px;" type="text" class="input-text" value="" placeholder="请输入快递单号" id="sendbackLogisticsNos" name="sendbackLogisticsNos">
  343. </div>
  344. </div>
  345. <div class="row cl" style="position: relative;" id="backUserInfo">
  346. <div class="formControls col-2 col-sm-2 text-r">
  347. <strong>寄件人</strong>
  348. </div>
  349. <div class="formControls col-4 col-sm-4">
  350. <input type="text" class="input-text" value="" placeholder="寄件人姓名" id="sendbackNames" name="sendbackNames">
  351. </div>
  352. <div class="formControls col-4 col-sm-4">
  353. <input type="text" class="input-text" value="" placeholder="寄件人电话" id="sendbackTels" name="sendbackTels">
  354. </div>
  355. </div>
  356. <div class="row cl">
  357. <div class="formControls col-12 col-sm-12">
  358. <div class="formControls col-2 col-sm-2 text-r">
  359. <strong>通知售前客服</strong>
  360. </div>
  361. <div class="radio-box">
  362. <input type="radio" id="tel-Notice1" name="sendbackNoticeCustomers" onclick="noticeCustomer();" checked value="1">
  363. <label for="tel-Notice1">是&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
  364. </div>
  365. <div class="radio-box">
  366. <input type="radio" id="tel-Notice2" name="sendbackNoticeCustomers" onclick="noticeCustomer();" value="2">
  367. <label for="tel-Notice2">否</label>
  368. </div>
  369. </div>
  370. </div>
  371. <div class="row cl" id="sendbackPresaleAdminDiv" <#--style="display: none;"-->>
  372. <div class="formControls col-2 col-sm-2 text-r">
  373. <strong>售前客服</strong>
  374. </div>
  375. <div class="formControls col-4 col-sm-4">
  376. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  377. <span class="select-box">
  378. <select name="sendbackPresaleAdminIds" id="sendbackPresaleAdminIds" class="select" seleType="send">
  379. <#if adminlist?? && (adminlist?size > 0) >
  380. <#list adminlist as admin>
  381. <option value="${admin.adminId!''}" >${admin.adminName!''}</option>
  382. </#list>
  383. </#if>
  384. </select>
  385. </span>
  386. </div>
  387. </div>
  388. </div>
  389. <div class="row cl" style="position: relative;" id="backUserInfos">
  390. <div class="formControls col-2 col-sm-2 text-r">
  391. <strong>寄回产品</strong>
  392. </div>
  393. <div class="formControls col-8 col-sm-8">
  394. <table class="table table-border table-bg table-bordered" >
  395. <thead>
  396. <tr>
  397. <th>产品</th>
  398. <th>颜色</th>
  399. <th>数量</th>
  400. </tr>
  401. </thead>
  402. <tbody id="productbodyIds">
  403. <#if listClosedProdcue?? && (listClosedProdcue?size > 0) >
  404. <#list listClosedProdcue as prodcue>
  405. <tr>
  406. <td>${(prodcue.closedProductName)!''}</td>
  407. <td>${(prodcue.closedColorName)!''}</td>
  408. <td><input type="text" class="input-text input-prodcueNumber-ids" value="${(prodcue.closedProdcueNumber)!''}"></td>
  409. <input type="hidden" class="input-produce-ids" value="${(prodcue.productId)!''}">
  410. <input type="hidden" class="input-color-ids" value="${(prodcue.colorId)!''}">
  411. </tr>
  412. </#list>
  413. <#else>
  414. <tr id="productcolspanIds"><td colspan="3" class="td-manage text-c" >没有产品信息!</td></tr>
  415. </#if>
  416. </tbody>
  417. </table>
  418. <input type="hidden" id="sendProdcuess" value="">
  419. </div>
  420. </div>
  421. <#--<div class="row cl" style="position: relative;/*display: none;*/">
  422. <div class="formControls col-2 col-sm-2 text-r">
  423. <strong>仓库签收时间</strong>
  424. </div>
  425. <div class="formControls col-4 col-sm-4">
  426. <input type="text" placeholder="请选择仓库签收时间" id="sendbackSignTimes" name="sendbackSignTimes" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" readonly="readonly">
  427. </div>
  428. </div>-->
  429. <div class="row cl">
  430. <div class="formControls col-2 col-sm-2">
  431. </div>
  432. <div class="formControls col-8 col-sm-8 text-c">
  433. <button onClick="updateSendbackInfo();" class="btn btn-primary" type="button">确认修改寄回信息</button>
  434. </div>
  435. </div>
  436. </div>
  437. </div>
  438. </div>
  439. <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
  440. <#--<div class="row cl" id="backTransferInfo">
  441. <div class="formControls col-2 col-sm-2 text-r">
  442. <strong>邮费处理</strong>
  443. </div>
  444. <div class="formControls col-8 col-sm-8">
  445. <div class="radio-box">
  446. <input type="radio" id="tel-6" name="relationIsTransfer" onclick="isRelationIsTransfer(0)" value="0" seleType="postage">
  447. <label for="tel-6">不需要转账</label>
  448. </div>
  449. <div class="radio-box">
  450. <input type="radio" id="tel-7" name="relationIsTransfer" onclick="isRelationIsTransfer(10)" value="10" seleType="postage">
  451. <label for="tel-7">需要</label>
  452. </div>
  453. </div>
  454. </div>-->
  455. <div class="row cl" id="postageInformation">
  456. <#--<div class="formControls col-2 col-sm-2 text-r">
  457. <strong>邮费信息</strong>
  458. </div>-->
  459. <div class="formControls col-12 col-sm-12">
  460. <table class="table table-border table-bg table-bordered" >
  461. <thead>
  462. <tr>
  463. <th>邮费id</th>
  464. <th>邮费金额</th>
  465. <th>支付宝姓名</th>
  466. <th>支付宝账号</th>
  467. <th>付款类型</th>
  468. <th>状态</th>
  469. <th>备注</th>
  470. <th>操作</th>
  471. </tr>
  472. </thead>
  473. <tbody id="trbodyId">
  474. <#if listPostageInfo?? && (listPostageInfo?size > 0) >
  475. <#list listPostageInfo as postageInfo>
  476. <tr id="deleteId${(postageInfo.postageId)!''}">
  477. <td>${(postageInfo.postageId)!''}</td>
  478. <td>${(postageInfo.postageAmount)!''}</td>
  479. <td>${(postageInfo.postageAlipayName)!''}</td>
  480. <td>${(postageInfo.postageAlipay)!''}</td>
  481. <td>
  482. <#if postageInfo.postageAlipayType??>
  483. <#if postageInfo.postageAlipayType == 1>用户付款</#if>
  484. <#if postageInfo.postageAlipayType == 2>客户付款</#if>
  485. <#if postageInfo.postageAlipayType == 3>公司付款</#if>
  486. </#if>
  487. </td>
  488. <#if postageInfo.postageStatus??>
  489. <#if postageInfo.postageStatus == 0><td>未申请</td></#if>
  490. <#if postageInfo.postageStatus == 1><td>未申请</td></#if>
  491. <#if postageInfo.postageStatus == 2><td>已申请(待转账)</td></#if>
  492. <#if postageInfo.postageStatus == 3><td>已转账</td></#if>
  493. <#if postageInfo.postageStatus == 4><td>未知</td></#if>
  494. <#else>
  495. <td></td>
  496. </#if>
  497. <td>${postageInfo.postageDesc!''}</td>
  498. <td><a onclick="deletePostage(${(postageInfo.postageId)!});">删除</a>&nbsp;&nbsp;<a onclick="getPostage(${(postageInfo.postageId)!});">修改</a></td>
  499. </tr>
  500. </#list>
  501. <#else>
  502. <tr id="colspanId"><td colspan="8" class="td-manage text-c" >暂时没有邮费信息,请添加!</td></tr>
  503. </#if>
  504. </tbody>
  505. </table>
  506. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="showPostageDiv();">录入邮费转账</button>
  507. </div>
  508. </div>
  509. <div class="row cl" id="addPostageId" style="display: none;">
  510. <div class="formControls col-2 col-sm-2 text-r">
  511. <strong></strong>
  512. </div>
  513. <div class="formControls col-12 col-sm-12">
  514. <div >
  515. <div class="row cl">
  516. <div class="formControls col-2 col-sm-2 text-r">
  517. <strong>状态</strong>
  518. </div>
  519. <div class="formControls col-12 col-sm-12">
  520. <div class="radio-box">
  521. <input type="radio" id="tel-66" name="postageStatus" checked value="1">
  522. <label for="tel-66">未申请</label>
  523. </div>
  524. <div class="radio-box">
  525. <input type="radio" id="tel-77" name="postageStatus" value="2">
  526. <label for="tel-77">已申请(待转账)</label>
  527. </div>
  528. <div class="radio-box">
  529. <input type="radio" id="tel-88" name="postageStatus" value="3">
  530. <label for="tel-88">已转账</label>
  531. </div>
  532. </div>
  533. </div>
  534. <div class="row cl">
  535. <div class="formControls col-2 col-sm-2 text-r">
  536. <strong>运费金额</strong>
  537. </div>
  538. <div class="formControls col-5 col-sm-5">
  539. <input type="text" class="input-text" placeholder="运费金额" id="postageAmount" name="postageAmount">
  540. </div>
  541. </div>
  542. <div class="row cl">
  543. <div class="formControls col-2 col-sm-2 text-r">
  544. <strong>支付宝</strong>
  545. </div>
  546. <div class="formControls col-5 col-sm-5">
  547. <input type="text" class="input-text" placeholder="填写支付宝姓名" id="postageAlipayName" name="postageAlipayName">
  548. </div>
  549. <div class="formControls col-5 col-sm-5">
  550. <input type="text" class="input-text" placeholder="填写支付宝账号" id="postageAlipay" name="postageAlipay">
  551. </div>
  552. </div>
  553. <div class="row cl">
  554. <div class="formControls col-2 col-sm-2 text-r">
  555. <strong>付款类型</strong>
  556. </div>
  557. <div class="formControls col-5 col-sm-5">
  558. <span class="select-box" >
  559. <select name="postageAlipayType" id="postageAlipayType" class="select">
  560. <option value="1">用户付款</option>
  561. <option value="2">客户付款</option>
  562. <option value="3">公司付款</option>
  563. </select>
  564. </span>
  565. </div>
  566. </div>
  567. <div class="row cl">
  568. <div class="formControls col-2 col-sm-2 text-r">
  569. <strong>备注信息</strong>
  570. </div>
  571. <div class="formControls col-5 col-sm-5">
  572. <textarea type="text" placeholder="" id="postageDesc" name="postageDesc" style="width: 100%;height: 80px;"></textarea>
  573. </div>
  574. </div>
  575. <div class="row cl">
  576. <div class="formControls col-2 col-sm-2 text-r">
  577. <strong></strong>
  578. </div>
  579. <div class="formControls col-5 col-sm-5">
  580. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="addPostage()">确定录入邮费转账</button>
  581. </div>
  582. </div>
  583. </div>
  584. </div>
  585. </div>
  586. <div class="row cl" id="updatePostageId" style="display: none;">
  587. <div class="formControls col-2 col-sm-2 text-r">
  588. <strong></strong>
  589. </div>
  590. <div class="formControls col-12 col-sm-12">
  591. <div>
  592. <div class="row cl">
  593. <div class="formControls col-2 col-sm-2 text-r">
  594. <strong>状态</strong>
  595. </div>
  596. <div class="formControls col-12 col-sm-12 skin-minimal">
  597. <div class="radio-box">
  598. <input type="radio" id="tel-666" name="postageStatuss" value="1">
  599. <label for="tel-666">未申请</label>
  600. </div>
  601. <div class="radio-box">
  602. <input type="radio" id="tel-777" name="postageStatuss" value="2">
  603. <label for="tel-777">已申请(待转账)</label>
  604. </div>
  605. <div class="radio-box">
  606. <input type="radio" id="tel-888" name="postageStatuss" value="3">
  607. <label for="tel-888">已转账</label>
  608. </div>
  609. </div>
  610. </div>
  611. <div class="row cl">
  612. <div class="formControls col-2 col-sm-2 text-r">
  613. <strong>运费金额</strong>
  614. </div>
  615. <div class="formControls col-5 col-sm-5">
  616. <input type="text" class="input-text" placeholder="运费金额" id="postageAmounts" name="postageAmounts">
  617. </div>
  618. </div>
  619. <div class="row cl">
  620. <div class="formControls col-2 col-sm-2 text-r">
  621. <strong>支付宝</strong>
  622. </div>
  623. <div class="formControls col-5 col-sm-5">
  624. <input type="text" class="input-text" placeholder="填写支付宝姓名" id="postageAlipayNames" name="postageAlipayNames">
  625. </div>
  626. <div class="formControls col-5 col-sm-5">
  627. <input type="text" class="input-text" placeholder="填写支付宝账号" id="postageAlipays" name="postageAlipays">
  628. </div>
  629. </div>
  630. <div class="row cl">
  631. <div class="formControls col-2 col-sm-2 text-r">
  632. <strong>付款类型</strong>
  633. </div>
  634. <div class="formControls col-5 col-sm-5">
  635. <span class="select-box" >
  636. <select name="postageAlipayTypes" id="postageAlipayTypes" class="select">
  637. <option value="1">用户付款</option>
  638. <option value="2">客户付款</option>
  639. <option value="3">公司付款</option>
  640. </select>
  641. </span>
  642. </div>
  643. </div>
  644. <div class="row cl">
  645. <div class="formControls col-2 col-sm-2 text-r">
  646. <strong>备注信息</strong>
  647. </div>
  648. <div class="formControls col-5 col-sm-5">
  649. <textarea type="text" placeholder="" id="postageDescs" name="postageDescs" style="width: 100%;height: 80px;"></textarea>
  650. </div>
  651. </div>
  652. <input type="hidden" value="" id="postageIds">
  653. <div class="row cl">
  654. <div class="formControls col-2 col-sm-2 text-r">
  655. <strong></strong>
  656. </div>
  657. <div class="formControls col-5 col-sm-5">
  658. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="updatePostage()">确定修改邮费信息</button>
  659. </div>
  660. </div>
  661. </div>
  662. </div>
  663. <div class="row cl">
  664. <div class="formControls col-2 col-sm-2">
  665. </div>
  666. <div class="formControls col-8 col-sm-8 text-c">
  667. <button onClick="update_relation_info(2);" class="btn btn-primary" type="button">确认修改</button>
  668. </div>
  669. </div>
  670. </div>
  671. </div>
  672. <div <#if procMethod.procMethodIsSend == 1>class="tabCon"</#if>style="display: none;">
  673. <table class="table table-border table-bg table-bordered" style="margin-top: 10px;display: none;" id="sendSalesOrder">
  674. <thead>
  675. <tr class="text-c" id="">
  676. <th style="text-align: center;" width="20" >订单号</th>
  677. <th style="text-align: center;" width="20" >收件人信息</th>
  678. <th style="text-align: center;" width="10">状态</th>
  679. <th style="text-align: center;" width="20">物流信息</th>
  680. <th style="text-align: center;" width="30">产品</th>
  681. </tr>
  682. </thead>
  683. <tbody id="sendSalesOrdertbody">
  684. </tbody>
  685. </table>
  686. <div class="row cl">
  687. <div class="formControls col-5 col-sm-5">
  688. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="to_add_order_by_update()">录入寄出订单</button>
  689. </div>
  690. </div>
  691. </div>
  692. <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if>style="display: none;">
  693. <div class="row cl" id="informationInformation">
  694. <#--<div class="formControls col-2 col-sm-2 text-r">
  695. <strong>收费信息</strong>
  696. </div>-->
  697. <div class="formControls col-12 col-sm-12">
  698. <table class="table table-border table-bg table-bordered" >
  699. <thead>
  700. <tr>
  701. <th>id</th>
  702. <th>收费金额</th>
  703. <th>收费原由</th>
  704. <th>支付渠道</th>
  705. <th>交易图片</th>
  706. <th>状态</th>
  707. <th>备注</th>
  708. <th>操作</th>
  709. </tr>
  710. </thead>
  711. <tbody id="trbodyInformationInfoId">
  712. <#if listInformationInfo?? && (listInformationInfo?size > 0) >
  713. <#list listInformationInfo as informationInfo>
  714. <tr id="deleteInfoId${(informationInfo.feeId)!''}">
  715. <td>${(informationInfo.feeId)!''}</td>
  716. <td>
  717. <#if informationInfo.feeCharges??>
  718. ${(informationInfo.feeCharges)/100}
  719. </#if>
  720. </td>
  721. <td>
  722. <#if informationInfo.feePayChannel??>
  723. <#if informationInfo.feeOriginally == 1>以旧换新</#if>
  724. <#if informationInfo.feeOriginally == 2>机器维修</#if>
  725. <#if informationInfo.feeOriginally == 3>机器运费</#if>
  726. </#if>
  727. </td>
  728. <td>
  729. <#if informationInfo.feePayChannel??>
  730. <#if informationInfo.feePayChannel == 1>微信</#if>
  731. <#if informationInfo.feePayChannel == 2>支付宝</#if>
  732. <#if informationInfo.feePayChannel == 3>银行卡</#if>
  733. </#if>
  734. </td>
  735. <td>
  736. <#if informationInfo.feePayPicture?? && informationInfo.feePayPicture!='' >
  737. <a href="${path}/${informationInfo.feePayPicture!''}" target="_Blank"><img style="width: 75px;" src="${path}/${informationInfo.feePayPicture!''}" ></a>
  738. </#if>
  739. </td>
  740. <td>
  741. <#if informationInfo.feeStatus??>
  742. <#if informationInfo.feeStatus == 1>代付款</#if>
  743. <#if informationInfo.feeStatus == 2>已收款</#if>
  744. </#if>
  745. </td>
  746. <td>${informationInfo.feeDesc!''}</td>
  747. <td style="color: #50a2ea;"><a onclick="deleteInformationInfo(${(informationInfo.feeId)!});">删除</a>&nbsp;&nbsp;<a onclick="getInformationInfo(${(informationInfo.feeId)!});">修改</a></td>
  748. </tr>
  749. </#list>
  750. <#else>
  751. <tr id="colspanInformationId"><td colspan="8" class="td-manage text-c" >暂时没有收费信息,请添加!</td></tr>
  752. </#if>
  753. </tbody>
  754. </table>
  755. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;display: block;margin: 20px auto;" id="" name="" onclick="showInformationInfoDiv();">录入收费信息</button>
  756. </div>
  757. </div>
  758. <div class="row cl" id="addInformationInfoId" style="display: none;">
  759. <div class="formControls col-2 col-sm-2 text-r">
  760. <strong></strong>
  761. </div>
  762. <div class="formControls col-12 col-sm-12">
  763. <div >
  764. <div class="row cl">
  765. <div class="formControls col-2 col-sm-2 text-r">
  766. <strong>状态</strong>
  767. </div>
  768. <div class="formControls col-12 col-sm-12">
  769. <div class="radio-box">
  770. <input type="radio" id="tel-333" name="feeStatus" checked value="1">
  771. <label for="tel-333">待付款</label>
  772. </div>
  773. <div class="radio-box">
  774. <input type="radio" id="tel-334" name="feeStatus" value="2">
  775. <label for="tel-334">已付款</label>
  776. </div>
  777. </div>
  778. </div>
  779. <div class="row cl">
  780. <div class="formControls col-2 col-sm-2 text-r">
  781. <strong>收费金额</strong>
  782. </div>
  783. <div class="formControls col-5 col-sm-5">
  784. <input type="text" class="input-text" placeholder="收费金额" id="feeCharges" name="feeCharges">
  785. </div>
  786. <div class="formControls col-5 col-sm-5">
  787. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  788. <span class="select-box">
  789. <select name="feeOriginally" id="feeOriginally" class="select">
  790. <option value="1">以旧换新</option>
  791. <option value="2">机器维修</option>
  792. <option value="3">机器运费</option>
  793. </select>
  794. </span>
  795. </div>
  796. </div>
  797. </div>
  798. <div class="row cl">
  799. <div class="formControls col-2 col-sm-2 text-r">
  800. <strong>支付信息</strong>
  801. </div>
  802. <div class="formControls col-5 col-sm-5">
  803. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  804. <span class="select-box">
  805. <select name="feePayChannel" id="feePayChannel" class="select">
  806. <option value="1">支付宝</option>
  807. <option value="2">微信</option>
  808. <option value="3">银行卡</option>
  809. </select>
  810. </span>
  811. </div>
  812. </div>
  813. <#--<div class="formControls col-5 col-sm-5">-->
  814. <#--<input type="text" class="input-text" placeholder="填写支付账号" id="feePayAccount" name="feePayAccount">-->
  815. <#--</div>-->
  816. </div>
  817. <div class="row cl">
  818. <div class="formControls col-2 col-sm-2 text-r">
  819. <strong>交易图片</strong>
  820. </div>
  821. <div class="formControls col-5 col-sm-5">
  822. <input type="file" class="up_file" name="file" id="addFeePayPicture_file" style="display: none">
  823. <div class="upload_file"><a href="javascript:void(0)" class="del_product all_down" onclick="fileOnclick(this)">上传交易图片</a></div>
  824. <input type="hidden" class="addFeePayPicture_img" name="feePayPicture" id="add_feePayPicture" value="" >
  825. </div>
  826. </div>
  827. <div class="row cl">
  828. <div class="formControls col-2 col-sm-2 text-r">
  829. <strong>备注信息</strong>
  830. </div>
  831. <div class="formControls col-5 col-sm-5">
  832. <textarea type="text" placeholder="" id="feeDesc" name="feeDesc" style="width: 100%;height: 80px;"></textarea>
  833. </div>
  834. </div>
  835. <div class="row cl">
  836. <div class="formControls col-2 col-sm-2 text-r">
  837. <strong></strong>
  838. </div>
  839. <div class="formControls col-5 col-sm-5">
  840. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="addInformationInfo()">确定录入收费信息</button>
  841. </div>
  842. </div>
  843. </div>
  844. </div>
  845. </div>
  846. <div class="row cl" id="updateInformationInfoId" style="display: none;">
  847. <div class="formControls col-2 col-sm-2 text-r">
  848. <strong></strong>
  849. </div>
  850. <div class="formControls col-12 col-sm-12">
  851. <div >
  852. <div class="row cl">
  853. <div class="formControls col-2 col-sm-2 text-r">
  854. <strong>状态</strong>
  855. </div>
  856. <div class="formControls col-12 col-sm-12">
  857. <div class="radio-box">
  858. <input type="radio" id="tel-333s" name="feeStatuss" checked value="1">
  859. <label for="tel-333s">待付款</label>
  860. </div>
  861. <div class="radio-box">
  862. <input type="radio" id="tel-334s" name="feeStatuss" value="2">
  863. <label for="tel-334s">已付款</label>
  864. </div>
  865. </div>
  866. </div>
  867. <div class="row cl">
  868. <div class="formControls col-2 col-sm-2 text-r">
  869. <strong>收费金额</strong>
  870. </div>
  871. <div class="formControls col-5 col-sm-5">
  872. <input type="text" class="input-text" placeholder="收费金额" id="feeChargess" name="feeChargess">
  873. </div>
  874. <div class="formControls col-5 col-sm-5">
  875. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  876. <span class="select-box">
  877. <select name="feeOriginallys" id="feeOriginallys" class="select">
  878. <option value="1">以旧换新</option>
  879. <option value="2">机器维修</option>
  880. <option value="3">机器运费</option>
  881. </select>
  882. </span>
  883. </div>
  884. </div>
  885. </div>
  886. <div class="row cl">
  887. <div class="formControls col-2 col-sm-2 text-r">
  888. <strong>支付信息</strong>
  889. </div>
  890. <div class="formControls col-5 col-sm-5">
  891. <div style="width: 100%;display: inline-block;margin-right: 10px;">
  892. <span class="select-box">
  893. <select name="feePayChannels" id="feePayChannels" class="select">
  894. <option value="1">支付宝</option>
  895. <option value="2">微信</option>
  896. <option value="3">银行卡</option>
  897. </select>
  898. </span>
  899. </div>
  900. </div>
  901. <#--<div class="formControls col-5 col-sm-5">-->
  902. <#--<input type="text" class="input-text" placeholder="填写支付账号" id="feePayAccounts" name="feePayAccounts">-->
  903. <#--</div>-->
  904. </div>
  905. <div class="row cl">
  906. <div class="formControls col-2 col-sm-2 text-r">
  907. <strong>交易图片</strong>
  908. </div>
  909. <div class="formControls col-5 col-sm-5" id="update_file">
  910. <input type="file" class="up_file" name="file" id="updateFeePayPicture_file" style="display: none">
  911. <div class="upload_file"><img style="width: 75px;" class="fee_file_img add_file" id="update_file_img"><br><a href="javascript:void(0)" style="padding-left: 10px;" class="del_product all_down" onclick="fileOnclick(this)">重新上传</a></div>
  912. <input type="hidden" class="addFeePayPicture_img" name="feePayPicture" id="update_feePayPicture" value="" >
  913. </div>
  914. </div>
  915. <div class="row cl">
  916. <div class="formControls col-2 col-sm-2 text-r">
  917. <strong>备注信息</strong>
  918. </div>
  919. <div class="formControls col-5 col-sm-5">
  920. <textarea type="text" placeholder="" id="feeDescs" name="feeDescs" style="width: 100%;height: 80px;"></textarea>
  921. </div>
  922. </div>
  923. <div class="row cl">
  924. <div class="formControls col-2 col-sm-2 text-r">
  925. <strong></strong>
  926. </div>
  927. <input type="hidden" value="" id="feeIds">
  928. <div class="formControls col-5 col-sm-5">
  929. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="updateInformationInfo()">确定修改收费信息</button>
  930. </div>
  931. </div>
  932. </div>
  933. </div>
  934. </div>
  935. </div>
  936. <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if>style="display: none;">
  937. <div class="row cl" id="signclosedDiv">
  938. <div class="formControls col-12 col-sm-12">
  939. <table class="table table-border table-bordered table-bg table-hover table-sort">
  940. <thead>
  941. <tr class="text-c">
  942. <th width="90">签收id</th>
  943. <th width="90">物流状态</th>
  944. <th width="160">物流</th>
  945. <th width="100">寄件人信息</th>
  946. <th width="250">签收产品</th>
  947. <th width="150">签收日期</th>
  948. <th width="150">签收图片</th>
  949. <th width="100">备注</th>
  950. </tr>
  951. </thead>
  952. <tbody id="listid">
  953. <#if (signclosedList?size > 0)>
  954. <#list signclosedList as signclosed>
  955. <tr>
  956. <td class="text-c" width="100">${signclosed.signclosedId!}</td>
  957. <td class="text-c" width="100">
  958. <#if signclosed.signclosedIsReceiving??>
  959. <#if signclosed.signclosedIsReceiving == 1>
  960. 待签收
  961. <#elseif signclosed.signclosedIsReceiving == 2>
  962. 已签收
  963. </#if>
  964. </#if>
  965. </td>
  966. <td class="text-c" width="160">
  967. <#if signclosed.signclosedLogisticsName??>
  968. ${signclosed.signclosedLogisticsName!}
  969. -
  970. </#if>
  971. ${signclosed.signclosedLogisticsNumber!}</td>
  972. <td class="text-c" width="100">${signclosed.signclosedSendName!}<br>${signclosed.signclosedSendTel!}</td>
  973. <td style="text-align: left;" width="100">
  974. <div>
  975. <#if signclosed.signclosedProductInfoList??>
  976. <#if (signclosed.signclosedProductInfoList?size > 0)>
  977. <#list signclosed.signclosedProductInfoList as info>
  978. <#--<#if info.signclosedProductType == 1 >
  979. <span class="label label-success radius" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
  980. <#else >-->
  981. <span class="label label-success radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''}-${info.colorName!''} x ${info.productNum!''}件</span><br>
  982. <#--</#if>-->
  983. </#list>
  984. <#else >
  985. 暂无数据!
  986. </#if>
  987. <#else >
  988. 暂无数据!
  989. </#if>
  990. </div>
  991. </td>
  992. <#--<td class="text-c" width="100">${signclosed.signclosedCustomerDesc!}</td>-->
  993. <td class="text-c" width="100">${(signclosed.signclosedDate?string("yyyy-MM-dd"))!''}</td>
  994. <td class="text-c" width="100">
  995. <#if (signclosed.signclosedImgInfoList?size > 0)>
  996. <#list signclosed.signclosedImgInfoList as signclosedImgInfo>
  997. <img src="${signclosedImgInfo.imgUrl!}" style="widows: 50px;height: 50px;">
  998. </#list>
  999. </#if>
  1000. </td>
  1001. <td class="text-c" width="100">${signclosed.signclosedDesc!}</td>
  1002. </tr>
  1003. </#list>
  1004. <#else >
  1005. <tr><td class="td-manage text-c" colspan = "14">暂时没有签收信息</td></tr>
  1006. </#if>
  1007. </tbody>
  1008. </table>
  1009. </div>
  1010. </div>
  1011. <#--<#if procMethod.procMethodIsBack == 1>
  1012. <div class="tabCon">
  1013. <div class="row cl" style="margin-left: -70px;">
  1014. <div class="formControls col-2 col-sm-2 text-r">
  1015. <strong>QC进度</strong>
  1016. </div>
  1017. <div class="formControls col-12 col-sm-12">
  1018. <table class="table table-border table-bg table-bordered">
  1019. <tbody class="text-c" id="detect_table"><tr>
  1020. <th>工厂检测现象</th><th>故障分类</th><th>故障原因</th><th>判定结果</th><th>故障指向</th><th>原因分析</th><th>生产维修</th>
  1021. </tr>
  1022. </tbody></table>
  1023. </div>
  1024. </div>
  1025. </div>
  1026. <div class="tabCon">
  1027. <div class="row cl" style="margin-left: -70px;">
  1028. <div class="formControls col-2 col-sm-2 text-r">
  1029. <strong>返修进度</strong>
  1030. </div>
  1031. <div class="formControls col-12 col-sm-12">
  1032. <table class="table table-border table-bg table-bordered">
  1033. <tbody class="text-c" id="maintenance_table"><tr>
  1034. <th>是否可返修</th><th>返修内容</th><th>返修日期</th>
  1035. </tr>
  1036. </tbody></table>
  1037. </div>
  1038. </div>
  1039. </div>
  1040. </#if>-->
  1041. </div>
  1042. <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if>style="display: none;">
  1043. <div class="row cl" id="detectDiv">
  1044. <div class="formControls col-12 col-sm-12">
  1045. <table class="table table-border table-bg table-bordered" >
  1046. <thead>
  1047. <tr>
  1048. <th>维修编号</th>
  1049. <th>当前状态</th>
  1050. <th>产品</th>
  1051. <th>是否有故障</th>
  1052. <th>是否可翻新</th>
  1053. <th>维修报价</th>
  1054. <th>维修内容</th>
  1055. <th>QC检测状态</th>
  1056. <th>操作</th>
  1057. </tr>
  1058. </thead>
  1059. <tbody id="trbodyInformationInfoId">
  1060. <#if (detectList?size > 0)>
  1061. <#list detectList as detect>
  1062. <tr>
  1063. <#--<td class="text-c" width="100">${detect.customerId!}</td>-->
  1064. <td class="text-c" width="100">${detect.detectNumber!''}</td>
  1065. <td class="text-c" width="100" id="detectState${(detect.detectId)!}">
  1066. <#if detect.detectState == 1>
  1067. 待检测机器
  1068. </#if>
  1069. <#if detect.detectState == 30>
  1070. 待用户确认
  1071. </#if>
  1072. <#if detect.detectState == 31>
  1073. 用户同意维修(待维修)
  1074. </#if>
  1075. <#if detect.detectState == 32>
  1076. 维修完成
  1077. </#if>
  1078. <#if detect.detectState == 33>
  1079. 用户不维修(原机退回)
  1080. </#if>
  1081. <#if detect.detectState == 34>
  1082. 待客服确认维修
  1083. </#if>
  1084. <#if detect.detectState == 35>
  1085. 客服确认维修,(待维修)
  1086. </#if>
  1087. <#if detect.detectState == 36>
  1088. 维修完成
  1089. </#if>
  1090. <#if detect.detectState == 37>
  1091. 机器无故障,待用户确认
  1092. </#if>
  1093. <#if detect.detectState == 38>
  1094. 机器故障,待用户确认
  1095. </#if>
  1096. <#if detect.detectState == 39>
  1097. 机器无故障,原机退回
  1098. </#if>
  1099. <#if detect.detectState == 20>
  1100. 待翻新入库
  1101. </#if>
  1102. <#if detect.detectState == 21>
  1103. 已翻新入库
  1104. </#if>
  1105. <#if detect.detectState == 22>
  1106. 不能翻新,待报废
  1107. </#if>
  1108. <#if detect.detectState == 23>
  1109. 已报废回收
  1110. </#if>
  1111. </td>
  1112. <td class="text-c" width="100">${detect.productName!'暂无产品'}(${detect.colorName!'暂无颜色'})</td>
  1113. <td class="text-c" width="100">
  1114. <#if detect.isMaintenance??>
  1115. <#if detect.isMaintenance == 1>
  1116. <#elseif detect.isMaintenance == 2>
  1117. <#else>
  1118. 机器待检测
  1119. </#if>
  1120. </#if>
  1121. </td>
  1122. <td class="text-c" width="100">
  1123. <#if detect.detectRenovation??>
  1124. <#if detect.detectRenovation == 1>
  1125. 可翻新
  1126. <#elseif detect.detectRenovation == 2>
  1127. 不可翻新
  1128. <#else>
  1129. 机器待检测
  1130. </#if>
  1131. </#if>
  1132. </td>
  1133. <td class="text-c" width="100"><#if detect.detectOffer??>${detect.detectOffer/100}<#else>-</#if></td>
  1134. <td class="text-c" width="100"><div title="${detect.detectContent!}">${detect.detectContent!'-'}</div></td>
  1135. <td class="text-c" width="100">
  1136. <#if detect.maintenanceResults??>
  1137. <#if detect.maintenanceResults == 1>
  1138. 通过
  1139. <#elseif detect.maintenanceResults == 2>
  1140. 不通过
  1141. </#if>
  1142. </#if>
  1143. </td>
  1144. <!-- 遍历操作 -->
  1145. <td class="td-manage text-c" width="100">
  1146. <a onclick="getDetectInfo('${detect.detectId}');">查看详情</a><br>
  1147. <#if detect.detectState == 30 || detect.detectState == 34 || detect.detectState == 38 || detect.detectState == 37>
  1148. <a onclick="to_updateDetectInfo('${(detect.detectId)!}','${(detect.detectState)!}');">维修处理</a>
  1149. </#if>
  1150. </td>
  1151. </tr>
  1152. </#list>
  1153. <#else >
  1154. <tr><td class="td-manage text-c" colspan = "18">暂时没有检测信息</td></tr>
  1155. </#if>
  1156. </tbody>
  1157. </table>
  1158. </div>
  1159. </div>
  1160. <div class="row cl" id="updateDetect" style="display: none;">
  1161. <div class="formControls col-12 col-sm-12">
  1162. <div >
  1163. <div class="row cl" id="updateDetect_1" style="display: none;">
  1164. <div class="formControls col-2 col-sm-2 text-r">
  1165. <strong>处理结果:</strong>
  1166. </div>
  1167. <div class="formControls col-12 col-sm-12">
  1168. <div class="radio-box">
  1169. <input type="radio" id="tel-001" name="detectProcessingResults_1" checked value="1">
  1170. <label for="tel-001">付费维修</label>
  1171. </div>
  1172. <div class="radio-box" id="updateDetect_1_1">
  1173. <input type="radio" id="tel-002" name="detectProcessingResults_1" value="2">
  1174. <label for="tel-002">免费维修</label>
  1175. </div>
  1176. <div class="radio-box" >
  1177. <input type="radio" id="tel-003" name="detectProcessingResults_1" value="3">
  1178. <label for="tel-003">退货处理</label>
  1179. </div>
  1180. <div class="radio-box">
  1181. <input type="radio" id="tel-004" name="detectProcessingResults_1" value="4">
  1182. <label for="tel-004">换货处理</label>
  1183. </div>
  1184. <div class="radio-box">
  1185. <input type="radio" id="tel-005" name="detectProcessingResults_1" value="5">
  1186. <label for="tel-005">原机退回</label>
  1187. </div>
  1188. </div>
  1189. </div>
  1190. <div class="row cl" id="updateDetect_2" style="display: none;">
  1191. <div class="formControls col-2 col-sm-2 text-r">
  1192. <strong>处理结果:</strong>
  1193. </div>
  1194. <div class="formControls col-12 col-sm-12">
  1195. <div class="radio-box">
  1196. <input type="radio" id="tel-002" name="detectProcessingResults_2" checked value="2">
  1197. <label for="tel-002">免费维修</label>
  1198. </div>
  1199. <div class="radio-box">
  1200. <input type="radio" id="tel-005" name="detectProcessingResults_2" value="5">
  1201. <label for="tel-005">原机退回</label>
  1202. </div>
  1203. </div>
  1204. </div>
  1205. <div class="row cl" id="updateDetect_3" style="display: none;">
  1206. <div class="formControls col-2 col-sm-2 text-r">
  1207. <strong>客诉处理:</strong>
  1208. </div>
  1209. <div class="formControls col-5 col-sm-5">
  1210. <span class="select-box">
  1211. <select class="select" id="procTypeId" name="procTypeId">
  1212. </select>
  1213. </span>
  1214. </div>
  1215. <div class="formControls col-5 col-sm-5">
  1216. <span class="select-box">
  1217. <select class="select" id="procMethodId" name="procMethodId" >
  1218. </select>
  1219. </span>
  1220. </div>
  1221. </div>
  1222. <div class="row cl">
  1223. <div class="formControls col-2 col-sm-2 text-r">
  1224. <strong>备注信息:</strong>
  1225. </div>
  1226. <div class="formControls col-5 col-sm-5">
  1227. <textarea type="text" placeholder="" id="detectCustomerDesc" name="detectCustomerDesc" style="width: 100%;height: 80px;"></textarea>
  1228. </div>
  1229. </div>
  1230. <div class="row cl">
  1231. <div class="formControls col-2 col-sm-2 text-r">
  1232. <strong></strong>
  1233. </div>
  1234. <div class="formControls col-5 col-sm-5">
  1235. <input type="hidden" value="" id="detectId" name="detectId">
  1236. <input type="hidden" value="" id="detectState" name="detectState">
  1237. <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="customerConfirm()">确定处理</button>
  1238. </div>
  1239. </div>
  1240. </div>
  1241. </div>
  1242. </div>
  1243. <div class="row cl" id="getDetect" style="display: none;">
  1244. <div class="formControls col-12 col-sm-12">
  1245. <div class="row cl" >
  1246. <div class="formControls col-2 col-sm-2 text-r">
  1247. <strong>维修编号:</strong>
  1248. </div>
  1249. <div class="formControls col-4 col-sm-4" id="detectNumberDiv">
  1250. </div>
  1251. <div class="formControls col-2 col-sm-2 text-r">
  1252. <strong>当前状态:</strong>
  1253. </div>
  1254. <div class="formControls col-4 col-sm-4" id="detectStateDIV">
  1255. </div>
  1256. </div>
  1257. <div class="row cl">
  1258. <div class="formControls col-2 col-sm-2 text-r">
  1259. <strong>维修产品:</strong>
  1260. </div>
  1261. <div class="formControls col-4 col-sm-4" id="productTypeNameDIV">
  1262. </div>
  1263. <div class="formControls col-2 col-sm-2 text-r">
  1264. <strong>维修价格:</strong>
  1265. </div>
  1266. <div class="formControls col-4 col-sm-4" id="detectOfferDIV">
  1267. </div>
  1268. </div>
  1269. <div class="row cl">
  1270. <div class="formControls col-2 col-sm-2 text-r">
  1271. <strong>是否故障:</strong>
  1272. </div>
  1273. <div class="formControls col-4 col-sm-4" id="isMaintenanceDiv">
  1274. </div>
  1275. <div class="formControls col-2 col-sm-2 text-r">
  1276. <strong>可否翻新:</strong>
  1277. </div>
  1278. <div class="formControls col-4 col-sm-4" id="detectRenovationDiv">
  1279. </div>
  1280. </div>
  1281. <div class="row cl">
  1282. <div class="formControls col-2 col-sm-2 text-r">
  1283. <strong>检测现象:</strong>
  1284. </div>
  1285. <div class="formControls col-4 col-sm-4" id="detectPhenomenonDiv">
  1286. </div>
  1287. <div class="formControls col-2 col-sm-2 text-r">
  1288. <strong>故障分类:</strong>
  1289. </div>
  1290. <div class="formControls col-4 col-sm-4" id="detectClassificationDiv">
  1291. </div>
  1292. </div>
  1293. <div class="row cl">
  1294. <div class="formControls col-2 col-sm-2 text-r">
  1295. <strong>原因分析:</strong>
  1296. </div>
  1297. <div class="formControls col-4 col-sm-4" id="detectNalysisDiv">
  1298. </div>
  1299. <div class="formControls col-2 col-sm-2 text-r">
  1300. <strong>故障指向:</strong>
  1301. </div>
  1302. <div class="formControls col-4 col-sm-4" id="detectPointDiv">
  1303. </div>
  1304. </div>
  1305. <div class="row cl">
  1306. <div class="formControls col-2 col-sm-2 text-r">
  1307. <strong>维修备注:</strong>
  1308. </div>
  1309. <div class="formControls col-4 col-sm-4" id="detectDescDiv">
  1310. </div>
  1311. <div class="formControls col-2 col-sm-2 text-r">
  1312. <strong>维修内容:</strong>
  1313. </div>
  1314. <div class="formControls col-4 col-sm-4" id="detectContentDiv">
  1315. </div>
  1316. </div>
  1317. <div class="row cl">
  1318. <div class="formControls col-2 col-sm-2 text-r">
  1319. <strong>附件内容:</strong>
  1320. </div>
  1321. <div class="formControls col-4 col-sm-4" id="imgDiv">
  1322. <img href="">
  1323. </div>
  1324. </div>
  1325. </div>
  1326. </div>
  1327. </div>
  1328. <input type="hidden" id="customerId" name="customerId" value="${customerId!''}" seleType="primary">
  1329. </form>
  1330. </article>
  1331. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  1332. <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
  1333. <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
  1334. <script type="text/javascript">
  1335. //产品类型
  1336. var productType = null;
  1337. $(function(){
  1338. $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0")});
  1339. // #tab_demo 父级id
  1340. // #tab_demo .tabBar span 控制条
  1341. // #tab_demo .tabCon 内容区
  1342. // click 事件 点击切换,可以换成mousemove 移动鼠标切换
  1343. // 1 默认第2个tab为当前状态(从0开始)
  1344. var mobile= /^1(3|4|5|7|8)\d{9}$/; //手机号码
  1345. var uname = /^[\u4e00-\u9fa5a-zA-Z]{1,12}$/; //中文英文
  1346. var money = /^(0{1}|([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/;//金额
  1347. //添加寄回信息按钮
  1348. function showSendbackDiv() {
  1349. $("#updateSendBackDiv").hide();
  1350. $("#addSendBackDiv").show();
  1351. }
  1352. //添加邮费信息按钮
  1353. function showPostageDiv() {
  1354. $("#updatePostageId").hide();
  1355. $("#addPostageId").show();
  1356. }
  1357. function isRelationIsTransfer(type) {
  1358. if(type == 0){
  1359. $("#postageInformation").hide();
  1360. $("#updatePostageId").hide();
  1361. $("#addPostageId").hide();
  1362. }else{
  1363. $("#postageInformation").show();
  1364. }
  1365. }
  1366. function showInformationInfoDiv(){
  1367. $("#updateInformationInfoId").hide();
  1368. $("#addInformationInfoId").show();
  1369. }
  1370. /*查询寄回信息*/
  1371. function getSendbackInfo(sendbackId) {
  1372. var info;
  1373. $.ajax({
  1374. cache: true,
  1375. type: "POST",
  1376. data: {"sendbackId" : sendbackId},
  1377. url: "${path}/admin/customer/get_SendbackInfo",
  1378. async: false,
  1379. success: function(data){
  1380. if (data.returnCode == 200) {
  1381. $("#addSendBackDiv").hide();
  1382. $("#updateSendBackDiv").show();
  1383. info = data.returnMsg.sendbackInfo;
  1384. $("#sendbackIds").val(info.sendbackId);
  1385. $("input[type=radio][name=sendbackStatuss][value='"+info.sendbackStatus+"']").prop("checked",true);
  1386. $("#sendbackLogisticsCompanys").val(info.sendbackLogisticsCompany);
  1387. $("#sendbackLogisticsNos").val(info.sendbackLogisticsNo);
  1388. $("#sendbackNames").val(info.sendbackName);
  1389. $("#sendbackTels").val(info.sendbackTel);
  1390. $("input[type=radio][name=sendbackNoticeCustomers][value='"+info.sendbackNoticeCustomer+"']").prop("checked",true);
  1391. $("#sendbackPresaleAdminIds").val(info.sendbackPresaleAdminId);
  1392. /*$("#sendbackSignTimes").val(info.sendbackSignTime);*/
  1393. if(info.sendbackNoticeCustomer === 1){
  1394. $("#sendbackPresaleAdminDiv").show();
  1395. }else if(info.sendbackNoticeCustomer === 2){
  1396. $("#sendbackPresaleAdminDiv").hide();
  1397. }
  1398. $("#productbodyIds").find(".input-prodcueNumber-ids").each(function () {
  1399. for(var i=0;i<info.listSendbackItem.length;i++){
  1400. if(info.listSendbackItem[i].sendbackProductId == $(this).parents("tr").find(".input-produce-ids").eq(0).val()
  1401. && info.listSendbackItem[i].sendbackColorId == $(this).parents("tr").find(".input-color-ids").eq(0).val()) {
  1402. $(this).val(info.listSendbackItem[i].sendbackProdcueNumber);
  1403. }
  1404. }
  1405. });
  1406. } else {
  1407. layer.msg("修改失败!",{icon: 5,time:1000});
  1408. }
  1409. },
  1410. error: function(XmlHttpRequest, textStatus, errorThrown){
  1411. window.parent.admin_result("修改失败!",5);
  1412. }
  1413. })
  1414. }
  1415. /*添加寄回信息*/
  1416. function addSendbackInfo() {
  1417. var relationId = $("#relationId").val();
  1418. var sendbackStatus = parseInt($("input[name='sendbackStatus']:checked").val());
  1419. var sendbackLogisticsCompany = $("#sendbackLogisticsCompany").val();
  1420. var sendbackLogisticsNo = $("#sendbackLogisticsNo").val();
  1421. var sendbackName = $("#sendbackName").val();
  1422. var sendbackTel = $("#sendbackTel").val();
  1423. var sendbackSignTime = $("#sendbackSignTime").val();
  1424. var sendbackNoticeCustomer = parseInt($("input[name='sendbackNoticeCustomer']:checked").val());
  1425. var sendbackPresaleAdminId = $("#sendbackPresaleAdminId").val();
  1426. var sendbackIsUse = parseInt($("input[name='sendbackIsUse']:checked").val());
  1427. if(sendbackNoticeCustomer === 2){
  1428. sendbackPresaleAdminId = null;
  1429. }
  1430. var sendProdcues = new Array(); //寄出产品表
  1431. var num = 0;
  1432. $("#productbodyId").find(".input-prodcueNumber-id").each(function () {
  1433. var product = new Object();
  1434. product.sendbackProdcueNumber = $(this).val();
  1435. product.sendbackProductId = $(this).parents("tr").find(".input-produce-id").eq(0).val(); //产品id
  1436. product.sendbackColorId = $(this).parents("tr").find(".input-color-id").eq(0).val(); //颜色id
  1437. sendProdcues.push(product);
  1438. num = num+ parseInt(product.sendbackProdcueNumber);
  1439. });
  1440. if(num === 0){
  1441. layer.msg("产品数量不能为0!",{icon: 5,time:2000});
  1442. return;
  1443. }
  1444. $("#sendProdcues").val(JSON.stringify(sendProdcues));
  1445. var SendProdcues = $("#sendProdcues").val();
  1446. if(sendbackStatus == null || sendbackStatus == ""){
  1447. layer.msg("请选择寄回状态!",{icon: 5,time:1000});
  1448. return;
  1449. }
  1450. /*if(sendbackLogisticsCompany == null || sendbackLogisticsCompany == ""){
  1451. layer.msg("请输入物流公司!",{icon: 5,time:1000});
  1452. return;
  1453. }
  1454. if(sendbackLogisticsNo == null || sendbackLogisticsNo == ""){
  1455. layer.msg("请输入物流单号!",{icon: 5,time:1000});
  1456. return;
  1457. }*/
  1458. if(sendbackName == null || sendbackName == ""){
  1459. layer.msg("请输入寄回人姓名!",{icon: 5,time:1000});
  1460. return;
  1461. }
  1462. if(sendbackTel == null || sendbackTel == ""){
  1463. layer.msg("请输入寄回人电话!",{icon: 5,time:1000});
  1464. return;
  1465. }
  1466. /*if(sendbackSignTime == null || postageAlipayName == ""){
  1467. layer.msg("请输入签收时间!",{icon: 5,time:1000});
  1468. return;
  1469. }*/
  1470. $.ajax({
  1471. cache: true,
  1472. type: "POST",
  1473. data: {"relationId" : relationId,
  1474. "sendbackStatus" : sendbackStatus,
  1475. "sendbackLogisticsCompany" : sendbackLogisticsCompany,
  1476. "sendbackLogisticsNo" : sendbackLogisticsNo,
  1477. "sendbackName" : sendbackName,
  1478. "sendbackTel" : sendbackTel,
  1479. "sendProdcues" : SendProdcues,
  1480. "sendbackSignTime" : sendbackSignTime,
  1481. "sendbackNoticeCustomer" : sendbackNoticeCustomer,
  1482. "sendbackPresaleAdminId" : sendbackPresaleAdminId,
  1483. "sendbackIsUse" : sendbackIsUse
  1484. },
  1485. url: "${path}/admin/customer/add_SendbackInfo",
  1486. async: false,
  1487. success: function(data){
  1488. if (data.returnCode == 200) {
  1489. $("#colspanSendbackId").remove();
  1490. sendbackInfo = data.returnMsg.sendbackInfo;
  1491. var sendbackStatus;
  1492. /*var htmls = '<a onclick="deleteSendbackInfo('+sendbackInfo.sendbackId+');">删除</a>&nbsp&nbsp<a onclick="getSendbackInfo('+sendbackInfo.sendbackId+');">修改</a>&nbsp&nbsp<a onclick="updateSendbackStatus('+sendbackInfo.sendbackId+');">签收</a>';*/
  1493. var htmls = '<a onclick="deleteSendbackInfo('+sendbackInfo.sendbackId+');">删除</a>&nbsp&nbsp<a onclick="getSendbackInfo('+sendbackInfo.sendbackId+');">修改</a>';
  1494. if(sendbackInfo.sendbackStatus == 1){
  1495. sendbackStatus = "未配送";
  1496. }
  1497. if(sendbackInfo.sendbackStatus == 2){
  1498. sendbackStatus = "配送中";
  1499. htmls = '<a onclick="deleteSendbackInfo('+sendbackInfo.sendbackId+');">删除</a>&nbsp&nbsp<a onclick="getSendbackInfo('+sendbackInfo.sendbackId+');">修改</a>';
  1500. }
  1501. if(sendbackInfo.sendbackStatus == 3){
  1502. sendbackStatus = "已签收";
  1503. }
  1504. var html = "";
  1505. for(var i=0;i<sendbackInfo.listSendbackItem.length;i++){
  1506. var sendbackItem = sendbackInfo.listSendbackItem[i]
  1507. html += sendbackItem.sendbackProductName+'('+sendbackItem.sendbackColorName+')*'+ sendbackItem.sendbackProdcueNumber+ '<br>';
  1508. };
  1509. $("#SendbackbodyId").append('<tr id="deleteSendbackId'+sendbackInfo.sendbackId+'">' +
  1510. '<td>'+sendbackInfo.sendbackLogisticsName+'</td>' +
  1511. '<td>'+sendbackInfo.sendbackLogisticsNo+'</td>' +
  1512. '<td>'+sendbackInfo.sendbackName+'<br>'+sendbackInfo.sendbackTel+'</td>' +
  1513. '<td>'+sendbackStatus+'</td>' +
  1514. '<td>'+html+'</td>' +
  1515. '<td>'+htmls+'</td></tr>');
  1516. $("#addSendBackDiv").hide();
  1517. layer.msg("添加成功!",{icon: 1,time:1000});
  1518. } else {
  1519. layer.msg("添加失败,核查快递单号是否重复!",{icon: 5,time:1000});
  1520. }
  1521. },
  1522. error: function(XmlHttpRequest, textStatus, errorThrown){
  1523. window.parent.admin_result("添加失败!",5);
  1524. }
  1525. })
  1526. }
  1527. /*修改寄回信息*/
  1528. function updateSendbackInfo() {
  1529. var sendbackIds = $("#sendbackIds").val();
  1530. var sendbackStatus = parseInt($("input[name='sendbackStatuss']:checked").val());
  1531. var sendbackLogisticsCompany = $("#sendbackLogisticsCompanys").val();
  1532. var sendbackLogisticsNo = $("#sendbackLogisticsNos").val();
  1533. var sendbackName = $("#sendbackNames").val();
  1534. var sendbackTel = $("#sendbackTels").val();
  1535. /*var sendbackSignTime = $("#sendbackSignTimes").val();*/
  1536. var sendbackNoticeCustomers = parseInt($("input[name='sendbackNoticeCustomers']:checked").val());
  1537. var sendbackPresaleAdminIds = $("#sendbackPresaleAdminIds").val();
  1538. if(sendbackNoticeCustomers === 2){
  1539. sendbackPresaleAdminIds = null;
  1540. }
  1541. var sendProdcues = new Array(); //寄出产品表
  1542. var num = 0;
  1543. $("#productbodyIds").find(".input-prodcueNumber-ids").each(function () {
  1544. var product = new Object();
  1545. product.sendbackProdcueNumber = $(this).val();
  1546. product.sendbackProductId = $(this).parents("tr").find(".input-produce-ids").eq(0).val(); //产品id
  1547. product.sendbackColorId = $(this).parents("tr").find(".input-color-ids").eq(0).val(); //颜色id
  1548. product.sendbackItemId = $(this).parents("tr").find(".input-item-ids").eq(0).val(); //寄回项主键
  1549. sendProdcues.push(product);
  1550. num = num+ parseInt(product.sendbackProdcueNumber);
  1551. });
  1552. if(num === 0){
  1553. layer.msg("产品数量不能为0!",{icon: 5,time:2000});
  1554. return;
  1555. }
  1556. $("#sendProdcues").val(JSON.stringify(sendProdcues));
  1557. var SendProdcues = $("#sendProdcues").val();
  1558. if(sendbackStatus == null || sendbackStatus == ""){
  1559. layer.msg("请选择寄回状态!",{icon: 5,time:1000});
  1560. return;
  1561. }
  1562. /*if(sendbackLogisticsCompany == null || sendbackLogisticsCompany == ""){
  1563. layer.msg("请输入物流公司!",{icon: 5,time:1000});
  1564. return;
  1565. }
  1566. if(sendbackLogisticsNo == null || sendbackLogisticsNo == ""){
  1567. layer.msg("请输入物流单号!",{icon: 5,time:1000});
  1568. return;
  1569. }*/
  1570. if(sendbackName == null || sendbackName == ""){
  1571. layer.msg("请输入寄回人姓名!",{icon: 5,time:1000});
  1572. return;
  1573. }
  1574. if(sendbackTel == null || sendbackTel == ""){
  1575. layer.msg("请输入寄回人电话!",{icon: 5,time:1000});
  1576. return;
  1577. }
  1578. /*if(sendbackSignTime == null || postageAlipayName == ""){
  1579. layer.msg("请输入签收时间!",{icon: 5,time:1000});
  1580. return;
  1581. }*/
  1582. $.ajax({
  1583. cache: true,
  1584. type: "POST",
  1585. data: {"sendbackId" : sendbackIds,
  1586. "sendbackStatus" : sendbackStatus,
  1587. "sendbackLogisticsCompany" : sendbackLogisticsCompany,
  1588. "sendbackLogisticsNo" : sendbackLogisticsNo,
  1589. "sendbackName" : sendbackName,
  1590. "sendbackTel" : sendbackTel,
  1591. "sendProdcues" : SendProdcues,
  1592. "sendbackNoticeCustomer" : sendbackNoticeCustomers,
  1593. "sendbackPresaleAdminId" : sendbackPresaleAdminIds
  1594. },
  1595. url: "${path}/admin/customer/update_SendbackInfo",
  1596. async: false,
  1597. success: function(data){
  1598. if (data.returnCode == 200) {
  1599. $("#deleteSendbackId"+sendbackIds).html();
  1600. sendbackInfo = data.returnMsg.sendbackInfo;
  1601. var sendbackStatus;
  1602. var htmls = '<a onclick="deleteSendbackInfo('+sendbackInfo.sendbackId+');">删除</a>&nbsp&nbsp<a onclick="getSendbackInfo('+sendbackInfo.sendbackId+');">修改</a>&nbsp&nbsp<a onclick="updateSendbackStatus('+sendbackInfo.sendbackId+');">签收</a>';
  1603. if(sendbackInfo.sendbackStatus == 1){
  1604. sendbackStatus = "未配送";
  1605. }
  1606. if(sendbackInfo.sendbackStatus == 2){
  1607. sendbackStatus = "配送中";
  1608. htmls = '<a onclick="deleteSendbackInfo('+sendbackInfo.sendbackId+');">删除</a>&nbsp&nbsp<a onclick="getSendbackInfo('+sendbackInfo.sendbackId+');">修改</a>';
  1609. }
  1610. if(sendbackInfo.sendbackStatus == 3){
  1611. sendbackStatus = "已签收";
  1612. }
  1613. var html = "";
  1614. for(var i=0;i<sendbackInfo.listSendbackItem.length;i++){
  1615. var sendbackItem = sendbackInfo.listSendbackItem[i];
  1616. html += sendbackItem.sendbackProductName+'('+sendbackItem.sendbackColorName+')*'+ sendbackItem.sendbackProdcueNumber+ '<br>';
  1617. };
  1618. $("#deleteSendbackId"+sendbackIds).html('<td>'+sendbackInfo.sendbackLogisticsName+'</td>' +
  1619. '<td>'+sendbackInfo.sendbackLogisticsNo+'</td>' +
  1620. '<td>'+sendbackInfo.sendbackName+'<br>'+sendbackInfo.sendbackTel+'</td>' +
  1621. '<td>'+sendbackStatus+'</td>' +
  1622. '<td>'+html+'</td>' +
  1623. '<td>'+htmls+'</td>');
  1624. $("#addSendBackDiv").hide();
  1625. layer.msg("修改成功!",{icon: 1,time:1000});
  1626. } else {
  1627. layer.msg("修改失败!",{icon: 5,time:1000});
  1628. }
  1629. },
  1630. error: function(XmlHttpRequest, textStatus, errorThrown){
  1631. window.parent.admin_result("修改失败!",5);
  1632. }
  1633. })
  1634. }
  1635. /*修改寄回状态*/
  1636. function updateSendbackStatus(sendbackId) {
  1637. $.ajax({
  1638. cache: true,
  1639. type: "POST",
  1640. data: {"sendbackId" : sendbackId,
  1641. "sendbackStatus" : 3
  1642. },
  1643. url: "${path}/admin/customer/update_SendbackStatus",
  1644. async: false,
  1645. success: function(data){
  1646. if (data.returnCode == 200) {
  1647. $("#deleteSendbackId"+sendbackId).html();
  1648. sendbackInfo = data.returnMsg.sendbackInfo;
  1649. var sendbackStatus;
  1650. var htmls = '<a onclick="deleteSendbackInfo('+sendbackInfo.sendbackId+');">删除</a>&nbsp&nbsp<a onclick="getSendbackInfo('+sendbackInfo.sendbackId+');">修改</a>&nbsp&nbsp<a onclick="updateSendbackStatus('+sendbackInfo.sendbackId+');">签收</a>';
  1651. if(sendbackInfo.sendbackStatus == 1){
  1652. sendbackStatus = "未配送";
  1653. }
  1654. if(sendbackInfo.sendbackStatus == 2){
  1655. sendbackStatus = "配送中";
  1656. htmls = '<a onclick="deleteSendbackInfo('+sendbackInfo.sendbackId+');">删除</a>&nbsp&nbsp<a onclick="getSendbackInfo('+sendbackInfo.sendbackId+');">修改</a>';
  1657. }
  1658. if(sendbackInfo.sendbackStatus == 3){
  1659. sendbackStatus = "已签收";
  1660. }
  1661. var html = "";
  1662. for(var i=0;i<sendbackInfo.listSendbackItem.length;i++){
  1663. var sendbackItem = sendbackInfo.listSendbackItem[i];
  1664. html += sendbackItem.sendbackProductName+'('+sendbackItem.sendbackColorName+')*'+ sendbackItem.sendbackProdcueNumber+ '<br>';
  1665. };
  1666. $("#deleteSendbackId"+sendbackId).html('<td>'+sendbackInfo.sendbackLogisticsName+'</td>' +
  1667. '<td>'+sendbackInfo.sendbackLogisticsNo+'</td>' +
  1668. '<td>'+sendbackInfo.sendbackName+'<br>'+sendbackInfo.sendbackTel+'</td>' +
  1669. '<td>'+sendbackStatus+'</td>' +
  1670. '<td>'+html+'</td>' +
  1671. '<td>'+htmls+'</td>');
  1672. layer.msg("签收成功!",{icon: 1,time:1000});
  1673. } else {
  1674. layer.msg("签收失败!",{icon: 5,time:1000});
  1675. }
  1676. },
  1677. error: function(XmlHttpRequest, textStatus, errorThrown){
  1678. window.parent.admin_result("签收失败!",5);
  1679. }
  1680. })
  1681. }
  1682. /*删除邮费信息*/
  1683. function deleteSendbackInfo(sendbackId) {
  1684. $.ajax({
  1685. cache: true,
  1686. type: "POST",
  1687. data: {"sendbackId" : sendbackId},
  1688. url: "${path}/admin/customer/delete_SendbackInfo",
  1689. async: false,
  1690. success: function(data){
  1691. if (data.returnCode == 200) {
  1692. $("#deleteSendbackId"+sendbackId).remove();
  1693. layer.msg("删除成功!",{icon: 1,time:1000});
  1694. } else {
  1695. layer.msg("删除失败!",{icon: 5,time:1000});
  1696. }
  1697. },
  1698. error: function(XmlHttpRequest, textStatus, errorThrown){
  1699. window.parent.admin_result("删除失败!",5);
  1700. }
  1701. })
  1702. }
  1703. /*添加邮费信息*/
  1704. function addPostage() {
  1705. var postageInfo;
  1706. var relationId = $("#relationId").val();
  1707. var postageStatus = parseInt($("input[name='postageStatus']:checked").val());
  1708. var postageAmount = $("#postageAmount").val()*100;
  1709. var postageAlipayName = $("#postageAlipayName").val();
  1710. var postageAlipay = $("#postageAlipay").val();
  1711. var postageDesc = $("#postageDesc").val();
  1712. var postageAlipayType = $("#postageAlipayType").val();
  1713. if(postageStatus == null || postageStatus == ""){
  1714. layer.msg("请选择邮费状态!",{icon: 5,time:1000});
  1715. return;
  1716. }
  1717. if(postageAmount == null || postageAmount == ""){
  1718. layer.msg("请输入邮费金额!",{icon: 5,time:1000});
  1719. return;
  1720. }
  1721. if (!money.test(postageAmount)) {
  1722. layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
  1723. return;
  1724. }
  1725. if(postageAlipayName == null || postageAlipayName == ""){
  1726. layer.msg("请输入支付宝姓名!",{icon: 5,time:1000});
  1727. return;
  1728. }
  1729. if(postageAlipay == null || postageAlipay == ""){
  1730. layer.msg("请输入支付宝账号!",{icon: 5,time:1000});
  1731. return;
  1732. }
  1733. $.ajax({
  1734. cache: true,
  1735. type: "POST",
  1736. data: {"relationId" : relationId,
  1737. "postageStatus" : postageStatus,
  1738. "postageAmount" : postageAmount,
  1739. "postageAlipayName" : postageAlipayName,
  1740. "postageAlipay" : postageAlipay,
  1741. "postageAlipayType" : postageAlipayType,
  1742. "postageDesc" : postageDesc},
  1743. url: "${path}/admin/customer/add_PostageInfo",
  1744. async: false,
  1745. success: function(data){
  1746. if (data.returnCode == 200) {
  1747. $("#colspanId").remove();
  1748. postageInfo = data.returnMsg.postageInfo;
  1749. var postageStatuss
  1750. if(postageInfo.postageStatus == 1){
  1751. postageStatuss = "未申请";
  1752. }
  1753. if(postageInfo.postageStatus == 2){
  1754. postageStatuss = "已申请(待转账)";
  1755. }
  1756. if(postageInfo.postageStatus == 3){
  1757. postageStatuss = "已转账";
  1758. }
  1759. if(postageInfo.postageStatus == 4){
  1760. postageStatuss = "未知";
  1761. }
  1762. //付款类型 1:用户付款 2:客户付款 3:公司付款
  1763. var postageAlipayType = ''
  1764. if(postageInfo.postageAlipayType == 1){
  1765. postageAlipayType = '用户付款';
  1766. }else if(postageInfo.postageAlipayType == 2){
  1767. postageAlipayType = '客户付款';
  1768. }else if(postageInfo.postageAlipayType == 3){
  1769. postageAlipayType = '公司付款';
  1770. }
  1771. $("#trbodyId").append('<tr id="deleteId'+postageInfo.postageId+'"><td>'+postageInfo.postageId+'</td>' +
  1772. '<td>'+(postageInfo.postageAmount)/100+'</td>' +
  1773. '<td>'+postageInfo.postageAlipayName+'</td>' +
  1774. '<td>'+postageInfo.postageAlipay+'</td>' +
  1775. '<td>'+postageAlipayType+'</td>' +
  1776. '<td>'+postageStatuss+'</td>' +
  1777. '<td>'+postageInfo.postageDesc+'</td>' +
  1778. '<td><a onclick="deletePostage('+postageInfo.postageId+');">删除</a>&nbsp&nbsp<a onclick="getPostage('+postageInfo.postageId+');">修改</a></td></tr>');
  1779. layer.msg("添加成功!",{icon: 1,time:1000});
  1780. } else {
  1781. layer.msg("添加失败!",{icon: 5,time:1000});
  1782. }
  1783. },
  1784. error: function(XmlHttpRequest, textStatus, errorThrown){
  1785. window.parent.admin_result("修改失败!",5);
  1786. }
  1787. })
  1788. }
  1789. /*删除邮费信息*/
  1790. function deletePostage(postageId) {
  1791. $.ajax({
  1792. cache: true,
  1793. type: "POST",
  1794. data: {"postageId" : postageId},
  1795. url: "${path}/admin/customer/delete_PostageInfo",
  1796. async: false,
  1797. success: function(data){
  1798. if (data.returnCode == 200) {
  1799. $("#deleteId"+postageId).remove();
  1800. layer.msg("删除成功!",{icon: 1,time:1000});
  1801. } else {
  1802. layer.msg("删除失败!",{icon: 5,time:1000});
  1803. }
  1804. },
  1805. error: function(XmlHttpRequest, textStatus, errorThrown){
  1806. window.parent.admin_result("修改失败!",5);
  1807. }
  1808. })
  1809. }
  1810. /*查询邮费信息*/
  1811. function getPostage(postageId) {
  1812. var postageInfo;
  1813. $.ajax({
  1814. cache: true,
  1815. type: "POST",
  1816. data: {"postageId" : postageId},
  1817. url: "${path}/admin/customer/get_PostageInfo",
  1818. async: false,
  1819. success: function(data){
  1820. if (data.returnCode == 200) {
  1821. $("#addPostageId").hide();
  1822. $("#updatePostageId").show();
  1823. postageInfo = data.returnMsg.postageInfo;
  1824. $("#postageDescs").val("");
  1825. $("#postageIds").val(postageInfo.postageId);
  1826. $("input[type=radio][name=postageStatuss][value='"+postageInfo.postageStatus+"']").prop("checked",true);
  1827. $("#postageAmounts").val(postageInfo.postageAmount/100);
  1828. $("#postageAlipays").val(postageInfo.postageAlipay);
  1829. $("#postageAlipayNames").val(postageInfo.postageAlipayName);
  1830. $("#postageAlipayTypes").val(postageInfo.postageAlipayTypes);
  1831. $("#postageDescs").val(postageInfo.postageDesc);
  1832. } else {
  1833. layer.msg("修改失败!",{icon: 5,time:1000});
  1834. }
  1835. },
  1836. error: function(XmlHttpRequest, textStatus, errorThrown){
  1837. window.parent.admin_result("修改失败!",5);
  1838. }
  1839. })
  1840. }
  1841. /*修改邮费信息*/
  1842. function updatePostage() {
  1843. var postageInfo;
  1844. var postageId = $("#postageIds").val();
  1845. var postageStatus = parseInt($("input[name='postageStatuss']:checked").val());
  1846. var postageAmount = $("#postageAmounts").val()*100;
  1847. var postageAlipayName = $("#postageAlipayNames").val();
  1848. var postageAlipay = $("#postageAlipays").val();
  1849. var postageAlipayTypes = $("#postageAlipayTypes").val();
  1850. var postageDesc = $("#postageDescs").val();
  1851. if(postageStatus == null || postageStatus == ""){
  1852. layer.msg("请选择邮费状态!",{icon: 5,time:1000});
  1853. return;
  1854. }
  1855. if(postageAmount == null || postageAmount == ""){
  1856. layer.msg("请输入邮费金额!",{icon: 5,time:1000});
  1857. return;
  1858. }
  1859. if (!money.test(postageAmount)) {
  1860. layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
  1861. return;
  1862. }
  1863. if(postageAlipayName == null || postageAlipayName == ""){
  1864. layer.msg("请输入支付宝姓名!",{icon: 5,time:1000});
  1865. return;
  1866. }
  1867. if(postageAlipay == null || postageAlipay == ""){
  1868. layer.msg("请输入支付宝账号!",{icon: 5,time:1000});
  1869. return;
  1870. }
  1871. $.ajax({
  1872. cache: true,
  1873. type: "POST",
  1874. data: {
  1875. "postageId" : postageId,
  1876. "postageStatus" : postageStatus,
  1877. "postageAmount" : postageAmount,
  1878. "postageAlipayName" : postageAlipayName,
  1879. "postageAlipay" : postageAlipay,
  1880. "postageAlipayType" : postageAlipayTypes,
  1881. "postageDesc" : postageDesc},
  1882. url: "${path}/admin/customer/update_PostageInfo",
  1883. async: false,
  1884. success: function(data){
  1885. if (data.returnCode == 200) {
  1886. postageInfo = data.returnMsg.postageInfo;
  1887. var postageStatuss
  1888. if(postageInfo.postageStatus == 1){
  1889. postageStatuss = "未申请";
  1890. }
  1891. if(postageInfo.postageStatus == 2){
  1892. postageStatuss = "已申请(待转账)";
  1893. }
  1894. if(postageInfo.postageStatus == 3){
  1895. postageStatuss = "已转账";
  1896. }
  1897. if(postageInfo.postageStatus == 4){
  1898. postageStatuss = "未知";
  1899. }
  1900. $("#deleteId"+postageId).html("");
  1901. $("#deleteId"+postageId).append('<td>'+postageInfo.postageId+'</td>' +
  1902. '<td>'+(postageInfo.postageAmount)/100+'</td>' +
  1903. '<td>'+postageInfo.postageAlipayName+'</td>' +
  1904. '<td>'+postageInfo.postageAlipay+'</td>' +
  1905. '<td>'+postageStatuss+'</td>' +
  1906. '<td>'+postageInfo.postageDesc+'</td>' +
  1907. '<td><a onclick="deletePostage('+postageInfo.postageId+');">删除</a>&nbsp&nbsp<a onclick="getPostage('+postageInfo.postageId+');">修改</a></td>');
  1908. layer.msg("修改成功!",{icon: 1,time:1000});
  1909. } else {
  1910. layer.msg("修改失败!",{icon: 5,time:1000});
  1911. }
  1912. },
  1913. error: function(XmlHttpRequest, textStatus, errorThrown){
  1914. window.parent.admin_result("修改失败!",5);
  1915. }
  1916. })
  1917. }
  1918. /*添加收费信息*/
  1919. function addInformationInfo() {
  1920. var informationInfo;
  1921. var relationId = $("#relationId").val();
  1922. var feeStatus = parseInt($("input[name='feeStatus']:checked").val());
  1923. var feeOriginally = $("#feeOriginally").val();
  1924. var feePayChannel = $("#feePayChannel").val();
  1925. var feeCharges = $("#feeCharges").val()*100;
  1926. var feePayPicture = $("#add_feePayPicture").val();
  1927. var feeDesc = $("#feeDesc").val();
  1928. if(feeStatus == null || feeStatus == ""){
  1929. layer.msg("请选择状态!",{icon: 5,time:1000});
  1930. return;
  1931. }
  1932. if (!money.test(feeCharges)) {
  1933. layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
  1934. return;
  1935. }
  1936. // if(feePayAccount == null || feePayAccount == ""){
  1937. // layer.msg("请输入支付账号!",{icon: 5,time:1000});
  1938. // return;
  1939. // }
  1940. $.ajax({
  1941. cache: true,
  1942. type: "POST",
  1943. data: {"relationId" : relationId,
  1944. "feeStatus" : feeStatus,
  1945. "feeOriginally" : feeOriginally,
  1946. "feePayChannel" : feePayChannel,
  1947. "feeCharges" : feeCharges,
  1948. "feePayPicture" : feePayPicture,
  1949. "feeDesc" : feeDesc},
  1950. url: "${path}/admin/customer/add_informationInfo",
  1951. async: false,
  1952. success: function(data){
  1953. if (data.returnCode == 200) {
  1954. $("#colspanInformationId").remove();
  1955. informationInfo = data.returnMsg.informationInfo;
  1956. var feeStatus;
  1957. if(informationInfo.feeStatus == 1){
  1958. feeStatus = "待付款";
  1959. }
  1960. if(informationInfo.feeStatus == 2){
  1961. feeStatus = "已付款";
  1962. }
  1963. var feeOriginally;
  1964. if(informationInfo.feeOriginally == 1){
  1965. feeOriginally = "以旧换新";
  1966. }
  1967. if(informationInfo.feeOriginally == 2){
  1968. feeOriginally = "机器维修";
  1969. }
  1970. if(informationInfo.feeOriginally == 3){
  1971. feeOriginally = "机器运费";
  1972. }
  1973. var feePayChannel;
  1974. if(informationInfo.feePayChannel == 1){
  1975. feePayChannel = "支付宝";
  1976. }
  1977. if(informationInfo.feePayChannel == 2){
  1978. feePayChannel = "微信";
  1979. }
  1980. if(informationInfo.feePayChannel == 3){
  1981. feePayChannel = "银行卡";
  1982. }
  1983. var feePayImg = "";
  1984. if(isEmpty(feePayPicture)){
  1985. feePayImg = '<a href="${path}/'+ feePayPicture +'" target="_Blank"><img style="width: 75px;" src="${path}/'+ feePayPicture +'" ></a>';
  1986. }
  1987. $("#trbodyInformationInfoId").append('<tr id="deleteInfoId'+informationInfo.feeId+'"><td>'+informationInfo.feeId+'</td>' +
  1988. '<td>'+(informationInfo.feeCharges)/100+'</td>' +
  1989. '<td>'+feeOriginally+'</td>' +
  1990. '<td>'+feePayChannel+'</td>' +
  1991. '<td>'+ feePayImg +'</td>' +
  1992. '<td>'+feeStatus+'</td>' +
  1993. '<td>'+cufte(informationInfo.feeDesc)+'</td>' +
  1994. '<td><a onclick="deleteInformationInfo('+informationInfo.feeId+');">删除</a>&nbsp&nbsp<a onclick="getInformationInfo('+informationInfo.feeId+');">修改</a></td></tr>');
  1995. layer.msg("添加成功!",{icon: 1,time:1000});
  1996. } else {
  1997. layer.msg("添加失败!",{icon: 5,time:1000});
  1998. }
  1999. },
  2000. error: function(XmlHttpRequest, textStatus, errorThrown){
  2001. window.parent.admin_result("添加失败!",5);
  2002. }
  2003. })
  2004. }
  2005. /*查询信息*/
  2006. function getInformationInfo(feeId) {
  2007. var informationInfo;
  2008. $.ajax({
  2009. cache: true,
  2010. type: "POST",
  2011. data: {"feeId" : feeId},
  2012. url: "${path}/admin/customer/get_informationInfo",
  2013. async: false,
  2014. success: function(data){
  2015. if (data.returnCode == 200) {
  2016. $("#addInformationInfoId").hide();
  2017. $("#updateInformationInfoId").show();
  2018. informationInfo = data.returnMsg.informationInfo;
  2019. $("#feeDescs").val("");
  2020. $("#feeIds").val(informationInfo.feeId);
  2021. $("input[type=radio][name=feeStatuss][value='"+informationInfo.feeStatus+"']").prop("checked",true);
  2022. $("#feeChargess").val(informationInfo.feeCharges/100);
  2023. $("#feeOriginallys").val(informationInfo.feeOriginally);
  2024. $("#feePayChannels").val(informationInfo.feePayChannel);
  2025. //$("#update_file_img").val(informationInfo.feePayPicture);
  2026. if(isEmpty(informationInfo.feePayPicture)){
  2027. var html = '<input type="file" class="up_file" name="file" id="updateFeePayPicture_file" style="display: none">'
  2028. + '<div class="upload_file"><img style="width: 75px;" src="${path}/'+ informationInfo.feePayPicture +'" class="fee_file_img add_file" id="update_file_img"><br><a href="javascript:void(0)" style="padding-left: 10px;" class="del_product all_down" onclick="fileOnclick(this)">重新上传</a></div>'
  2029. + '<input type="hidden" class="addFeePayPicture_img" name="feePayPicture" id="update_feePayPicture" value="'+ informationInfo.feePayPicture +'" >';
  2030. }else{
  2031. var html = '<input type="file" class="up_file" name="file" id="updateFeePayPicture_file" style="display: none">'
  2032. + ' <div class="upload_file"><a href="javascript:void(0)" class="del_product all_down" onclick="fileOnclick(this)">上传交易图片</a></div>'
  2033. + '<input type="hidden" class="addFeePayPicture_img" name="feePayPicture" id="update_feePayPicture" value="'+ cufte(informationInfo.feePayPicture) +'" >';
  2034. }
  2035. $("#update_file").html(html);
  2036. $("#feeDescs").val(informationInfo.feeDesc);
  2037. $("#updateFeePayPicture_file").change(function() {
  2038. fileUpload("updateFeePayPicture_file");
  2039. });
  2040. } else {
  2041. layer.msg("修改失败!",{icon: 5,time:1000});
  2042. }
  2043. },
  2044. error: function(XmlHttpRequest, textStatus, errorThrown){
  2045. window.parent.admin_result("修改失败!",5);
  2046. }
  2047. })
  2048. }
  2049. /*修改收费信息*/
  2050. function updateInformationInfo() {
  2051. var informationInfo;
  2052. var feeId = $("#feeIds").val();
  2053. var feeStatus = parseInt($("input[name='feeStatuss']:checked").val());
  2054. var feeOriginally = $("#feeOriginallys").val();
  2055. var feePayChannel = $("#feePayChannels").val();
  2056. var feeCharges = $("#feeChargess").val()*100;
  2057. var feePayPicture = $("#update_feePayPicture").val();
  2058. var feeDesc = $("#feeDescs").val();
  2059. if (!money.test(feeCharges)) {
  2060. layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
  2061. return;
  2062. }
  2063. // if(feePayAccount == null || feePayAccount == ""){
  2064. // layer.msg("请输入支付账号!",{icon: 5,time:1000});
  2065. // return;
  2066. // }
  2067. $.ajax({
  2068. cache: true,
  2069. type: "POST",
  2070. data: {"feeId" : feeId,
  2071. "feeStatus" : feeStatus,
  2072. "feeOriginally" : feeOriginally,
  2073. "feePayChannel" : feePayChannel,
  2074. "feeCharges" : feeCharges,
  2075. "feePayPicture" : feePayPicture,
  2076. "feeDesc" : feeDesc},
  2077. url: "${path}/admin/customer/update_informationInfo",
  2078. async: false,
  2079. success: function(data){
  2080. if (data.returnCode == 200) {
  2081. $("#colspanInformationId").remove();
  2082. informationInfo = data.returnMsg.informationInfo;
  2083. var feeStatus;
  2084. if(informationInfo.feeStatus == 1){
  2085. feeStatus = "待付款";
  2086. }
  2087. if(informationInfo.feeStatus == 2){
  2088. feeStatus = "已付款";
  2089. }
  2090. var feeOriginally;
  2091. if(informationInfo.feeOriginally == 1){
  2092. feeOriginally = "以旧换新";
  2093. }
  2094. if(informationInfo.feeOriginally == 2){
  2095. feeOriginally = "机器维修";
  2096. }
  2097. if(informationInfo.feeOriginally == 3){
  2098. feeOriginally = "机器运费";
  2099. }
  2100. var feePayChannel;
  2101. if(informationInfo.feePayChannel == 1){
  2102. feePayChannel = "支付宝";
  2103. }
  2104. if(informationInfo.feePayChannel == 2){
  2105. feePayChannel = "微信";
  2106. }
  2107. if(informationInfo.feePayChannel == 3){
  2108. feePayChannel = "银行卡";
  2109. }
  2110. var feePayImg = "";
  2111. if(isEmpty(feePayPicture)){
  2112. feePayImg = '<a href="${path}/'+ feePayPicture +'" target="_Blank"><img style="width: 75px;" src="${path}/'+ feePayPicture +'" ></a>';
  2113. }
  2114. $("#deleteInfoId"+feeId).html("");
  2115. $("#deleteInfoId"+feeId).append('<td>'+informationInfo.feeId+'</td>' +
  2116. '<td>'+(informationInfo.feeCharges)/100+'</td>' +
  2117. '<td>'+feeOriginally+'</td>' +
  2118. '<td>'+feePayChannel+'</td>' +
  2119. '<td>'+feePayImg+'</td>' +
  2120. '<td>'+feeStatus+'</td>' +
  2121. '<td>'+cufte(informationInfo.feeDesc)+'</td>' +
  2122. '<td><a onclick="deleteInformationInfo('+informationInfo.feeId+');">删除</a>&nbsp&nbsp<a onclick="getInformationInfo('+informationInfo.feeId+');">修改</a></td>');
  2123. layer.msg("添加成功!",{icon: 1,time:1000});
  2124. } else {
  2125. layer.msg("添加失败!",{icon: 5,time:1000});
  2126. }
  2127. },
  2128. error: function(XmlHttpRequest, textStatus, errorThrown){
  2129. window.parent.admin_result("添加失败!",5);
  2130. }
  2131. })
  2132. }
  2133. /*删除收费信息*/
  2134. function deleteInformationInfo(feeId) {
  2135. $.ajax({
  2136. cache: true,
  2137. type: "POST",
  2138. data: {"feeId" : feeId},
  2139. url: "${path}/admin/customer/delete_informationInfo",
  2140. async: false,
  2141. success: function(data){
  2142. if (data.returnCode == 200) {
  2143. $("#deleteInfoId"+feeId).remove();
  2144. layer.msg("删除成功!",{icon: 1,time:1000});
  2145. } else {
  2146. layer.msg("删除失败!",{icon: 5,time:1000});
  2147. }
  2148. },
  2149. error: function(XmlHttpRequest, textStatus, errorThrown){
  2150. window.parent.admin_result("修改失败!",5);
  2151. }
  2152. })
  2153. }
  2154. $(function(){
  2155. get_cmRelation_info();
  2156. showUpdateSendProduct();
  2157. get_product_type();
  2158. get_customer();
  2159. /*/!* 监听寄回状态按钮 *!/
  2160. $("input[name='renewedBackStatus']").change(function (){
  2161. initBackInfo($(this).val());
  2162. })
  2163. /!* 监听寄出状态按钮 *!/
  2164. $("input[name='renewedSendStatus']").change(function (){
  2165. initSendInfo($(this).val());
  2166. })
  2167. /!* 监听邮费状态按钮 *!/
  2168. $("input[name='renewedIsTransfer']").change(function (){
  2169. initPostageInfo($(this).val());
  2170. })*/
  2171. });
  2172. /*/!*初始化寄回信息*!/
  2173. function initBackInfo(statusCode){
  2174. if(statusCode == 1){
  2175. $("#backLogisticsInfo").hide();
  2176. /!*$("#backTransferInfo").hide();*!/
  2177. $("#backUserInfo").hide();
  2178. }else{
  2179. $("#backLogisticsInfo").show();
  2180. $("#backTransferInfo").show();
  2181. $("#backUserInfo").show();
  2182. }
  2183. }
  2184. /!*显示隐藏邮费信息*!/
  2185. function initPostageInfo(statusCode){
  2186. if(statusCode == 1){
  2187. $("#postageInformation").show();
  2188. }else{
  2189. $("#postageInformation").hide();
  2190. }
  2191. }
  2192. /!*初始化寄出信息*!/
  2193. function initSendInfo(statusCode){
  2194. if(statusCode == 1){
  2195. $("#sendUserInfo").hide();
  2196. $("#sendAddressInfo").hide();
  2197. $("#sendaddressDescInfo").hide();
  2198. $("#sendLogisticsInfo").hide();
  2199. $("#sendDescInfo").hide();
  2200. }else{
  2201. $("#sendUserInfo").show();
  2202. $("#sendAddressInfo").show();
  2203. $("#sendaddressDescInfo").show();
  2204. $("#sendLogisticsInfo").show();
  2205. $("#sendDescInfo").show();
  2206. }
  2207. }*/
  2208. /*显示所有产品及配件信息*/
  2209. function showUpdateSendProduct() {
  2210. var productList = getProduct() ; //所有产品
  2211. var html = "";
  2212. if(productList == null){
  2213. return false;
  2214. }
  2215. for(var i=0;i<productList.length;i++) {
  2216. var product = productList[i];
  2217. var produceFittings = product.fittingsList; //获取该产品的所有配件
  2218. var colorList = product.colorList; //该产品的所有颜色
  2219. var colorHtml = '';
  2220. if(colorList != null && colorList.length >0 ){
  2221. colorHtml += '<table style="height: 100%;">';
  2222. for(var j=0;j<colorList.length;j++){
  2223. var number = "";
  2224. var color = colorList[j];
  2225. /*for(var k=0;k<orderItemList.length;k++){
  2226. var item = orderItemList[k];
  2227. if(item.itemColorId == color.colorId){
  2228. number = item.itemNum;
  2229. }
  2230. }*/
  2231. var fristInputStyle = "border-top: 1px solid #ddd;";
  2232. if(color.colorProductId == product.productId) {
  2233. colorHtml += '<tr >' +
  2234. ' <td width="75" class="input-color-name" style="border-left: none;text-align: center;'+ fristInputStyle +'">' + color.colorName + '</td>' +
  2235. ' <td width="25" style="'+ fristInputStyle +'">' +
  2236. ' <input type="hidden" class="input-produce-id" value="' + color.colorProductId + '">' +
  2237. ' <input type="hidden" class="input-color-id" value="' + color.colorId + '">' +
  2238. ' <input type="hidden" class="input-produce-name" value="' + product.productName + '">' +
  2239. ' <input type="text" class="input-text input-color-number number-input" style="width: 100%;" value="'+ number +'" placeholder="产品数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
  2240. ' </td>' +
  2241. ' </tr>';
  2242. fristInputStyle = "";
  2243. }
  2244. }
  2245. colorHtml += '</table>';
  2246. }else{
  2247. colorHtml += '<span>暂无该产品的颜色!<span>';
  2248. }
  2249. var produceFittingsHtml = '';
  2250. if(produceFittings != null && produceFittings.length > 0){
  2251. produceFittingsHtml += '<table style="height: 100%;">';
  2252. for(var m=0;m<produceFittings.length;m++){
  2253. var produceFit = produceFittings[m];
  2254. if(produceFit.productId == product.productId) {
  2255. var fristInputStyle = "border-top: 1px solid #ddd;";
  2256. produceFittingsHtml += '<tr >' +
  2257. ' <td width="75" class="input-fittings-name" style="border-left: none;text-align: center; '+ fristInputStyle +'">' + produceFit.fittingsName +'</td>' +
  2258. ' <td width="25" style="'+ fristInputStyle +'">' +
  2259. ' <input type="hidden" class="input-produce-id" value="' + produceFit.productId + '">' +
  2260. ' <input type="hidden" class="input-fittings-id" value="' + produceFit.fittingsId +'">' +
  2261. ' <input type="text" class="input-text input-fittings-number" style="width: 100%;" value="'+ number +'" placeholder="配件数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
  2262. ' </td>' +
  2263. ' </tr>';
  2264. fristInputStyle = "";
  2265. }
  2266. }
  2267. produceFittingsHtml += '</table>';
  2268. }else{
  2269. produceFittingsHtml += '<span>暂无产品配件!<span>';
  2270. }
  2271. var produceHtml = '<input type="hidden" value="'+ product.productId +'">' +
  2272. '<span>'+ product.productName +'</span>';
  2273. html += ' <tr >' +
  2274. ' <td width="70">'+ produceHtml +'</td>' +
  2275. ' <td style="padding: 0px;text-align: center;">' +
  2276. colorHtml +
  2277. ' </td>' +
  2278. ' <td style="padding: 0px;text-align: center;">' +
  2279. produceFittingsHtml +
  2280. ' </td>' +
  2281. '</tr>';
  2282. }
  2283. html += '<tr><td colspan="3" style="text-align: center;"><button onClick="hideProductList();" class="btn btn-primary" type="button">确认</button></td></tr>'
  2284. $("#addProduct").html(html);
  2285. }
  2286. function showProductList() {
  2287. $('#produceSelect').show();
  2288. }
  2289. function hideProductList() {
  2290. var txt_product = '';
  2291. var color_numbers = '';
  2292. var fittings_numbers = '';
  2293. $("#addProduct").find(".input-color-number").each(function(){
  2294. var number = $(this).val();
  2295. if(number != null && number != ""){
  2296. var productId = $(this).parent().find(".input-produce-id").val();
  2297. var colorId = $(this).parent().find(".input-color-id").val();
  2298. var productName = $(this).parent().find(".input-produce-name").val();
  2299. //var colorName = $(this).parent().find(".input-color-name").val();
  2300. //封装更换的所有产品
  2301. color_numbers += productId + ':' + colorId + ":" + number + ",";
  2302. txt_product += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ productName + '*' + number + '台</span>';
  2303. }
  2304. });
  2305. $("#addProduct").find(".input-fittings-number").each(function(){
  2306. var number = $(this).val();
  2307. if(number != null && number != ""){
  2308. var productId = $(this).parent().find(".input-produce-id").val();
  2309. var fittingsId = $(this).parent().find(".input-fittings-id").val();
  2310. var fittingsName = $(this).parent().parent().find(".input-fittings-name").html();
  2311. //var colorName = $(this).parent().find(".input-color-name").val();
  2312. //封装更换的所有产品
  2313. fittings_numbers += productId + ':' + fittingsId + ":" + number + ",";
  2314. txt_product += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ fittingsName + '*' + number + '件</span>';
  2315. }
  2316. })
  2317. $('#renewedProduct').html(txt_product);
  2318. $('#closed_products').val(color_numbers);
  2319. $('#closed_fittings').val(fittings_numbers);
  2320. $('#produceSelect').hide();
  2321. }
  2322. /*获取产品*/
  2323. function getProduct(){
  2324. var productList;
  2325. var productName = $("#selectProcuct").val();
  2326. if(productName == null || productName == ""){
  2327. var productTable = '<td colspan="3">暂无数据!</td>';
  2328. $("#addProduct").html(productTable);
  2329. return null;
  2330. }
  2331. $.ajax({
  2332. type: "POST",
  2333. data:{'productName':productName},
  2334. url: "${path}/admin/signclosed/select_product",
  2335. async: false,
  2336. success: function(data){
  2337. if (data.returnCode == 200) {
  2338. $("#addProduct").html("");
  2339. productList = data.returnMsg.productList;
  2340. }else{
  2341. var productTable = '<td colspan="3">暂无数据!</td>';
  2342. $("#addProduct").html(productTable);
  2343. return null;
  2344. }
  2345. },
  2346. error: function(XmlHttpRequest, textStatus, errorThrown){
  2347. }
  2348. });
  2349. return productList;
  2350. }
  2351. /*获取换新信息*/
  2352. function get_cmRelation_info() {
  2353. $.ajax({
  2354. cache: true,
  2355. type: "POST",
  2356. data: {"customerId":${customerId}},
  2357. url: "${path}/admin/customer/get_cmRelation_info",
  2358. async: false,
  2359. success: function(data){
  2360. if (data.returnCode == 200) {
  2361. var relation = data.returnMsg.cmRelation;
  2362. console.log(relation);
  2363. getProvince('provinceNumber');
  2364. getCity('cityNumber',relation.provinceNumber);
  2365. getDistrict('areaNumber',relation.cityNumber);
  2366. var relationSchedule = '';
  2367. if(relation.procMethodIsBack == 1){
  2368. switch (relation.relationBackStatus) {
  2369. case 1:relationSchedule += '未寄回';break;
  2370. case 2:relationSchedule += '已寄回';break;
  2371. case 3:relationSchedule += '已收货';break;
  2372. }
  2373. }
  2374. if(relation.procMethodIsBack == 1 && relation.procMethodIsSend == 1){
  2375. relationSchedule += ',';
  2376. }
  2377. if(relation.procMethodIsSend == 1) {
  2378. switch (relation.relationSendStatus) {
  2379. case 1:
  2380. relationSchedule += '已发货';
  2381. break;
  2382. case 0:
  2383. relationSchedule += '未发货';
  2384. break;
  2385. case 11:
  2386. relationSchedule += '已通知配货';
  2387. break;
  2388. }
  2389. }
  2390. var relationProduct = '';
  2391. if (relation.closedProdcues != null && relation.closedProdcues.length > 0) {
  2392. $.each(relation.closedProdcues,function(index,element){
  2393. relationProduct += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ this.closedProductName + '*' + this.closedProdcueNumber + '台</span>';
  2394. })
  2395. }
  2396. if (relation.closedFittings != null && relation.closedFittings.length > 0) {
  2397. $.each(relation.closedFittings,function(index,element){
  2398. relationProduct += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ this.closedFittingsName + '*' + this.closedFittingNumber + '件</span>';
  2399. })
  2400. }
  2401. $('#relationProduct').html(relationProduct);
  2402. var sendProduct = '';
  2403. if (relation.sendProdcues != null && relation.sendProdcues.length > 0) {
  2404. $.each(relation.sendProdcues,function(index,element){
  2405. sendProduct += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ this.sendProduceName + '*' + this.sendProdcueNumber + '台</span>';
  2406. })
  2407. }
  2408. if (relation.sendFittings != null && relation.sendFittings.length > 0) {
  2409. $.each(relation.sendFittings,function(index,element){
  2410. sendProduct += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ this.sendFittingsName + '*' + this.sendFittingNumber + '件</span>';
  2411. })
  2412. }
  2413. $('#sendProduct').html(sendProduct);
  2414. $('#relationId').val(relation.relationId);
  2415. $('input[name="relationBackStatus"]').each(function(){
  2416. if (this.value == relation.relationBackStatus) {
  2417. $(this).iCheck('check');
  2418. }
  2419. });
  2420. $('input[name="relationSendStatus"]').each(function(){
  2421. if (this.value == relation.relationSendStatus) {
  2422. $(this).iCheck('check');
  2423. }
  2424. });
  2425. /*/!*初始化寄回信息*!/
  2426. initBackInfo(renewed.renewedBackStatus);
  2427. /!*初始化寄出信息*!/
  2428. initSendInfo(renewed.renewedSendStatus);
  2429. //初始化邮费信息
  2430. initPostageInfo(renewed.renewedIsTransfer);*/
  2431. $('#relationSchedule').html(relationSchedule);
  2432. $("#relationBackLogisticsCompany option[value='" + relation.relationBackLogisticsCompany + "']").attr("selected","true");
  2433. $("#relationSendLogisticsCompany option[value='" + relation.relationSendLogisticsCompany + "']").attr("selected","true");
  2434. $("#provinceNumber option[value='" + relation.provinceNumber + "']").attr("selected","true");
  2435. $("#cityNumber option[value='" + relation.cityNumber + "']").attr("selected","true");
  2436. $("#areaNumber option[value='" + relation.areaNumber + "']").attr("selected","true");
  2437. $('#relationBackLogisticsNo').val(relation.relationBackLogisticsNo);
  2438. /*$('#relationBackPostage').val(relation.relationBackPostage/100);
  2439. $('#relationAlipay').val(relation.relationAlipay);
  2440. $('#relationAlipayName').val(relation.relationAlipayName);*/
  2441. $('input[name="relationIsTransfer"]').each(function(){
  2442. if (this.value == relation.relationIsTransfer) {
  2443. $(this).iCheck('check');
  2444. if(relation.relationIsTransfer == 0){
  2445. $("#postageInformation").hide();
  2446. }else{
  2447. $("#postageInformation").show();
  2448. }
  2449. }
  2450. });
  2451. $('#relationBackName').val(relation.relationBackName);
  2452. $('#relationBackTel').val(relation.relationBackTel);
  2453. //$('#renewedBackMachineNo').val(renewed.renewedBackMachineNo);
  2454. $('#relationBackEfastOrderId').val(relation.relationBackEfastOrderId);
  2455. $('#relationSendName').val(relation.relationSendName);
  2456. $('#relationSendTel').val(relation.relationSendTel);
  2457. $('#relationSendAddress').val(relation.relationSendAddress);
  2458. $('#relationSendLogisticsNo').val(relation.relationSendLogisticsNo);
  2459. $('#relationDesc').val(relation.relationDesc);
  2460. $('#relationBackReceiptDate').val(relation.relationBackReceiptDate);
  2461. var detect_table = $('#detect_table');
  2462. var maintenance_table = $('#maintenance_table');
  2463. if (relation.complaintDetectList != null) {
  2464. $.each(relation.complaintDetectList,function (i,item) {
  2465. var detectRevolutionProducedMsg = "";
  2466. switch (this.detectRevolutionProduced){
  2467. case 1:
  2468. detectRevolutionProducedMsg = "待转入";
  2469. break;
  2470. case 2:
  2471. detectRevolutionProducedMsg = "已转入";
  2472. break;
  2473. case 3:
  2474. detectRevolutionProducedMsg = "不需要转入";
  2475. break;
  2476. }
  2477. var detect_tr = '<tr><td>'+convertUndefinedToEmpty(this.detectPhenomenon)+'</td>'
  2478. + '<td>'+convertUndefinedToEmpty(this.detectFailureClassification)+'</td>'
  2479. + '<td>'+convertUndefinedToEmpty(this.detectFailureCause)+'</td>'
  2480. + '<td>'+convertUndefinedToEmpty(this.detectResults)+'</td>'
  2481. + '<td>'+convertUndefinedToEmpty(this.detectPoint)+'</td>'
  2482. + '<td>'+convertUndefinedToEmpty(this.detectAnalysis)+'</td>'
  2483. + '<td>'+convertUndefinedToEmpty(detectRevolutionProducedMsg)+'</td></tr>';
  2484. detect_table.append(detect_tr);
  2485. var maintenance_tr = '<tr><td>'+convertUndefinedToEmpty(this.maintenanceIdRepair)+'</td>'
  2486. + '<td>'+convertUndefinedToEmpty(this.maintenanceContent)+'</td>'
  2487. + '<td>'+convertUndefinedToEmpty(this.maintenanceContentDate)+'</td></tr>';
  2488. maintenance_table.append(maintenance_tr);
  2489. })
  2490. }
  2491. $('#relationSchedule').html(relationSchedule);
  2492. }
  2493. },
  2494. error: function(XmlHttpRequest, textStatus, errorThrown){
  2495. }
  2496. })
  2497. }
  2498. function getseleType(type){
  2499. var obj = new Object();
  2500. var oldName = "";
  2501. $("[seleType="+ type +"]").each(function(){
  2502. var name = $(this).attr("name");
  2503. if(oldName != name){
  2504. oldName = name
  2505. if($(this).attr("type") == "radio"){
  2506. obj[name] = $("[name="+ name +"]:checked").val();
  2507. }else{
  2508. obj[name] = $("[name="+ name +"]").val();
  2509. }
  2510. }
  2511. });
  2512. $("[seleType='primary']").each(function(){
  2513. var name = $(this).attr("name");
  2514. if(oldName != name){
  2515. oldName = name;
  2516. obj[name] = $("[name="+ name +"]").val();
  2517. }
  2518. });
  2519. return obj;
  2520. }
  2521. /*修改换新信息*/
  2522. function update_relation_info(type) {
  2523. /*var relation_flag = checkRenewed(type);*/
  2524. var relation_flag = true;
  2525. //省市县
  2526. var provinceNumber = $("#provinceNumber").find("option:selected").text();
  2527. var cityNumber = $("#cityNumber").find("option:selected").text();
  2528. var areaNumber = $("#areaNumber").find("option:selected").text();
  2529. $('#merge_address').val(provinceNumber+'-'+cityNumber+'-'+areaNumber);
  2530. //寄回邮费
  2531. /*var relationBackPostage = $("#relationBackPostage").val();
  2532. $("#relationBackPostage").val(parseInt(relationBackPostage*100));*/
  2533. var obj = null;
  2534. if(type == 1){
  2535. obj = getseleType("send");
  2536. }else if(type == 2){
  2537. obj = getseleType("postage");
  2538. }else if(type ==3){
  2539. obj = getseleType("sendInformation");
  2540. }
  2541. if (relation_flag) {
  2542. $.ajax({
  2543. cache: true,
  2544. type: "POST",
  2545. data: obj,
  2546. url: "${path}/admin/customer/update_cmRelation_info",
  2547. async: false,
  2548. success: function(data){
  2549. if (data.returnCode == 200) {
  2550. window.parent.custome_result(data.resultMsg,1);
  2551. parent.location.reload();
  2552. var index = parent.layer.getFrameIndex(window.name);
  2553. parent.layer.close(index);
  2554. } else {
  2555. window.parent.custome_result(data.resultMsg,5);
  2556. }
  2557. },
  2558. error: function(XmlHttpRequest, textStatus, errorThrown){
  2559. window.parent.admin_result("修改失败!",5);
  2560. var index = parent.layer.getFrameIndex(window.name);
  2561. parent.layer.close(index);
  2562. }
  2563. })
  2564. }
  2565. }
  2566. /*校验换新填写信息*/
  2567. function checkRenewed(type) {
  2568. var relation_flag = true;
  2569. var relationBackLogisticsNo = $('#relationBackLogisticsNo').val().trim();//寄回物流单号
  2570. var relationBackLogisticsCompany = $("#relationBackLogisticsCompany option:selected").val();//寄回物流公司
  2571. var relationBackName = $('#relationBackName').val();//寄件人姓名
  2572. var relationBackTel = $('#relationBackTel').val();//寄件人电话
  2573. if(type == 1){
  2574. var relationBackStatus = $('input[name="relationBackStatus"]:checked').val();//寄回状态
  2575. if (relationBackStatus == 1) {
  2576. // if (renewedBackLogisticsNo != null && renewedBackLogisticsNo != '') {
  2577. // layer.msg("产品未寄回,不能有物流信息!",{icon: 5,time:1000});
  2578. // renewed_flag = false;
  2579. // return renewed_flag;
  2580. // }
  2581. // if (renewedBackPostage != null && renewedBackPostage != '' && renewedBackPostage != 0) {
  2582. // layer.msg("产品未寄回,不能有邮费!",{icon: 5,time:1000});
  2583. // renewed_flag = false;
  2584. // return renewed_flag;
  2585. // }
  2586. // if (renewedBackLogisticsCompany != null && renewedBackLogisticsCompany != '') {
  2587. // layer.msg("产品未寄回,不能选择物流公司!",{icon: 5,time:1000});
  2588. // renewed_flag = false;
  2589. // return renewed_flag;
  2590. // }
  2591. // if (renewedBackName != null && renewedBackName != '') {
  2592. // layer.msg("产品未寄回,不能填写寄回人信息!",{icon: 5,time:1000});
  2593. // renewed_flag = false;
  2594. // return renewed_flag;
  2595. // }
  2596. // if (renewedBackTel != null && renewedBackTel != '') {
  2597. // layer.msg("产品未寄回,不能填写寄回人电话号码!",{icon: 5,time:1000});
  2598. // renewed_flag = false;
  2599. // return renewed_flag;
  2600. // }
  2601. } else if (relationBackStatus == 2 || relationBackStatus == 3) {
  2602. if (relationBackLogisticsNo == null || relationBackLogisticsNo == '') {
  2603. layer.msg("物流单号不能为空!",{icon: 5,time:1000});
  2604. relation_flag = false;
  2605. return relation_flag;
  2606. }
  2607. if (relationBackLogisticsCompany == null || relationBackLogisticsCompany == '') {
  2608. layer.msg("请选择物流公司!",{icon: 5,time:1000});
  2609. relation_flag = false;
  2610. return relation_flag;
  2611. }
  2612. // if (!uname.test(renewedBackName)) {
  2613. // layer.msg("寄回人信息格式不正确,请重新输入!",{icon: 5,time:1000});
  2614. // renewed_flag = false;
  2615. // return renewed_flag;
  2616. // }
  2617. if (!mobile.test(relationBackTel)) {
  2618. layer.msg("寄回人电话号码格式不正确,请重新输入!",{icon: 5,time:1000});
  2619. relation_flag = false;
  2620. return relation_flag;
  2621. }
  2622. }
  2623. /*if (relationBackStatus == 3) {
  2624. var relationBackReceiptDate = $('#relationBackReceiptDate').val();//仓库签收时间
  2625. if (relationBackReceiptDate == null || relationBackReceiptDate == '') {
  2626. layer.msg("仓库签收时间不能为空",{icon: 5,time:1000});
  2627. relation_flag = false;
  2628. return relation_flag;
  2629. }
  2630. }*/
  2631. }else if(type == 2){
  2632. var relationIsTransfer = $('input[name="relationIsTransfer"]:checked').val();
  2633. /*var relationBackPostage = $('#relationBackPostage').val().trim();//寄回邮费
  2634. var relationAlipay = $('#relationAlipay').val().trim();//支付宝账户
  2635. var relationAlipayName = $('#relationAlipayName').val().trim();//支付宝账户姓名*/
  2636. if(relationIsTransfer == 1){
  2637. /*if (!money.test(relationBackPostage)) {
  2638. layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
  2639. relation_flag = false;
  2640. return relation_flag;
  2641. }*/
  2642. // if (!money.test(renewedAlipay)) {
  2643. // layer.msg("支付宝账户格式不正确,请重新输入!",{icon: 5,time:1000});
  2644. // renewed_flag = false;
  2645. // return renewed_flag;
  2646. // }
  2647. // if (renewedAlipayName == null || renewedAlipayName == '') {
  2648. // layer.msg("支付宝姓名不能为空,请重新输入!",{icon: 5,time:1000});
  2649. // renewed_flag = false;
  2650. // return renewed_flag;
  2651. // }
  2652. }
  2653. }else if(type == 3){
  2654. var relationSendStatus = $('input[name="relationSendStatus"]:checked').val();//寄回状态
  2655. var relationSendLogisticsCompany = $('#relationSendLogisticsCompany').val();//寄出物流公司
  2656. var relationSendLogisticsNo = $('#relationSendLogisticsNo').val();//寄出物流单号
  2657. if (relationSendStatus == 1) {
  2658. var relationBackStatus = $('input[name="relationBackStatus"]:checked').val();//寄回状态
  2659. if (productType != 2) {
  2660. var relationBackEfastOrderId = $('#relationBackEfastOrderId').val();//efast订单号
  2661. if (relationBackEfastOrderId == null || relationBackEfastOrderId == '') {
  2662. layer.msg("Efast订单号不能为空!", {icon: 5, time: 1000});
  2663. relation_flag = false;
  2664. return relation_flag;
  2665. }
  2666. }
  2667. // if (renewedSendLogisticsCompany != null && renewedSendLogisticsCompany != '') {
  2668. // layer.msg("产品未寄送,不能选择物流公司!",{icon: 5,time:1000});
  2669. // renewed_flag = false;
  2670. // return renewed_flag;
  2671. // }
  2672. // if (renewedSendLogisticsNo != null && renewedSendLogisticsNo != '') {
  2673. // layer.msg("产品未寄送,不能填写物流单号!",{icon: 5,time:1000});
  2674. // renewed_flag = false;
  2675. // return renewed_flag;
  2676. // }
  2677. } else if (relationSendStatus == 2 || relationSendStatus == 3) {
  2678. if (relationSendLogisticsCompany == null || relationSendLogisticsCompany == '') {
  2679. layer.msg("请选择寄回物流公司!",{icon: 5,time:1000});
  2680. relation_flag = false;
  2681. return relation_flag;
  2682. }
  2683. if (relationSendLogisticsNo == null || relationSendLogisticsNo == '') {
  2684. layer.msg("请填写物流单号!",{icon: 5,time:1000});
  2685. relation_flag = false;
  2686. return relation_flag;
  2687. }
  2688. var relationSendTel = $('#relationSendTel').val();//收件人电话
  2689. if (!mobile.test(relationSendTel)) {
  2690. layer.msg("收件人电话号码格式不正确,请重新输入!",{icon: 5,time:1000});
  2691. relation_flag = false;
  2692. return relation_flag;
  2693. }
  2694. var relationSendName = $('#relationSendName').val();//收件人姓名
  2695. if (relationSendName == null || relationSendName == '') {
  2696. layer.msg("收件人姓名格式不正确,请重新输入!",{icon: 5,time:1000});
  2697. relation_flag = false;
  2698. return relation_flag;
  2699. }
  2700. var relationSendAddress = $('#relationSendAddress').val();
  2701. if (relationSendAddress == null || relationSendAddress == '') {
  2702. layer.msg("寄出地址不能为空!",{icon: 5,time:1000});
  2703. relation_flag = false;
  2704. return relation_flag;
  2705. }
  2706. }
  2707. }
  2708. return relation_flag;
  2709. }
  2710. /**
  2711. * 获取省
  2712. */
  2713. function getProvince(provinceNum) {
  2714. var province = listProvince();
  2715. if(province!=null){
  2716. var provinceHtml = '';
  2717. for(var i=0;i<province.length;i++){
  2718. provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
  2719. }
  2720. $('#'+provinceNum).append(provinceHtml);
  2721. }
  2722. }
  2723. /**
  2724. * 获取市
  2725. */
  2726. function getCity(cityNum,provineceId) {
  2727. var city = listCity(provineceId,'');
  2728. if(city!=null){
  2729. var cityHtml = '';
  2730. for(var i=0;i<city.length;i++){
  2731. cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
  2732. }
  2733. $('#'+cityNum).append(cityHtml);
  2734. }
  2735. }
  2736. /**
  2737. * 获取区
  2738. */
  2739. function getDistrict(districtNum,cityId) {
  2740. var district = listDistrict(cityId,'');
  2741. if(district!=null){
  2742. var districtHtml = '';
  2743. for(var i=0;i<district.length;i++){
  2744. districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
  2745. }
  2746. $('#'+districtNum).append(districtHtml);
  2747. }
  2748. }
  2749. /*监听市选择事件*/
  2750. $(document).on('change', '#cityNumber', function() {
  2751. var city = $("#cityNumber").val();
  2752. $('#areaNumber option').remove();
  2753. getDistrict('areaNumber',city);
  2754. });
  2755. /*监听省选择事件*/
  2756. $(document).on('change', '#provinceNumber', function() {
  2757. var proId = $("#provinceNumber").val();
  2758. $('#cityNumber option').remove();
  2759. getCity('cityNumber',proId);
  2760. var cityId = $("#cityNumber").val();
  2761. $('#areaNumber option').remove();
  2762. getDistrict('areaNumber',cityId);
  2763. });
  2764. /*获取产品信息*/
  2765. function get_product_type() {
  2766. $.ajax({
  2767. cache: true,
  2768. type: "POST",
  2769. data: {"customerId":${customerId}},
  2770. url: "${path}/admin/customer/getProductType",
  2771. async: false,
  2772. success: function(data){
  2773. if (data.returnCode == 200) {
  2774. productType = data.returnMsg.productType.typeCompany;
  2775. }
  2776. },
  2777. error: function(XmlHttpRequest, textStatus, errorThrown){
  2778. }
  2779. })
  2780. }
  2781. /*获取客诉信息*/
  2782. function get_customer() {
  2783. $.ajax({
  2784. cache: true,
  2785. type: "POST",
  2786. data: {"customerId":${customerId}},
  2787. url: "${path}/admin/customer/get_customer",
  2788. async: false,
  2789. success: function(data){
  2790. if (data.returnCode == 200) {
  2791. var salesOrderList = data.returnMsg.salesOrderList;
  2792. if(salesOrderList!=null && salesOrderList.length > 0){
  2793. $("#sendSalesOrder").show();
  2794. }
  2795. for (var i=0;i<salesOrderList.length;i++){
  2796. var salesOrder = salesOrderList[i];
  2797. var status = '';
  2798. if(salesOrder.salesShippingStatus == 0){ //发货状态 0(未发货)1(已发货,即已扫描出库)3(备货中)4(收货) 11(已通知配货,后加)
  2799. status = '未发货';
  2800. }else if(salesOrder.salesShippingStatus == 1){
  2801. status = '已发货';
  2802. }else if(salesOrder.salesShippingStatus == 11){
  2803. status = '已通知配货';
  2804. }
  2805. var product = '';
  2806. for(var k=0;k<salesOrder.salesOrderItemList.length;k++){
  2807. var Item = salesOrder.salesOrderItemList[k];
  2808. product += Item.itemProductName+"("+ Item.itemProductColor +")" +"*"+ Item.itemNum;
  2809. if(salesOrder.salesOrderItemList.length > 1){
  2810. product += "<br>";
  2811. }
  2812. }
  2813. var html = ' <tr class="text-c">'
  2814. +'<td>'+ salesOrder.salesDealCode +'</td>'
  2815. +'<td>'+ salesOrder.salesAddressName +'<br>'+ salesOrder.salesAddressTel +'</td>'
  2816. +'<td>'+ status +'</td>'
  2817. +'<td>'+ cufte(salesOrder.salesPostFirm) +'<br>'+ cufte(salesOrder.salesPostNum)
  2818. +'</td>'
  2819. +'<td>'+ product +'</td>'
  2820. +'</tr>';
  2821. $("#sendSalesOrdertbody").append(html)
  2822. }
  2823. }
  2824. },
  2825. error: function(XmlHttpRequest, textStatus, errorThrown){
  2826. }
  2827. })
  2828. }
  2829. /**
  2830. *到添加订单页面
  2831. */
  2832. function to_add_order_by_update(){
  2833. var customerId = ${customerId};
  2834. parent.to_add_order(customerId);
  2835. parent.layer.close(parent.layer.getFrameIndex(window.name));
  2836. }
  2837. /**
  2838. * 查询维修详情
  2839. */
  2840. function getDetectInfo(detectId){
  2841. $.ajax({
  2842. cache: true,
  2843. type: "POST",
  2844. data: {"detectId" : detectId},
  2845. url: "${path}/admin/detect/get_detect",
  2846. async: false,
  2847. success: function(data){
  2848. console.log(data)
  2849. if (data.returnCode == 200) {
  2850. var detectInfo = data.returnMsg.detectInfo;
  2851. var detectImg = data.returnMsg.detectImg;
  2852. var detectStateName;
  2853. switch (detectInfo.detectState){
  2854. case 1:
  2855. detectStateName = "待检测机器";
  2856. break
  2857. case 30:
  2858. detectStateName = "待用户确认";
  2859. break
  2860. case 31:
  2861. detectStateName = "用户同意维修(待维修)";
  2862. break
  2863. case 32:
  2864. detectStateName = "维修完成";
  2865. break
  2866. case 33:
  2867. detectStateName = "用户不维修(原机退回)";
  2868. break
  2869. case 34:
  2870. detectStateName = "待客服确认维修";
  2871. break
  2872. case 35:
  2873. detectStateName = "客服确认维修,(待维修)";
  2874. break
  2875. case 36:
  2876. detectStateName = "维修完成";
  2877. break
  2878. case 37:
  2879. detectStateName = "机器无故障,原机退回";
  2880. break
  2881. case 38:
  2882. detectStateName = "机器故障,待用户确认";
  2883. break
  2884. case 20:
  2885. detectStateName = "待翻新入库";
  2886. break
  2887. case 21:
  2888. detectStateName = "已翻新入库";
  2889. break
  2890. case 22:
  2891. detectStateName = "不能翻新,待报废";
  2892. break
  2893. case 23:
  2894. detectStateName = "已报废回收";
  2895. break
  2896. }
  2897. var isMaintenanceName;
  2898. if(detectInfo.isMaintenance === 1){
  2899. isMaintenanceName = "有故障";
  2900. }
  2901. if(detectInfo.isMaintenance === 2){
  2902. isMaintenanceName = "无故障";
  2903. }
  2904. var detectRenovationName;
  2905. if(detectInfo.detectRenovation === 1){
  2906. detectRenovationName = "可翻新";
  2907. }
  2908. if(detectInfo.detectRenovation === 2){
  2909. detectRenovationName = "不可翻新";
  2910. }
  2911. var detectOfferName;
  2912. if(detectInfo.detectOffer != null && detectInfo.detectOffer != ""){
  2913. detectOfferName = detectInfo.detectOffer/100;
  2914. detectOfferName = detectOfferName+"元";
  2915. }else{
  2916. detectOfferName = "0元";
  2917. }
  2918. $("#detectNumberDiv").html("");
  2919. $("#detectStateDIV").html("");
  2920. $("#productTypeNameDIV").html("");
  2921. $("#detectOfferDIV").html("");
  2922. $("#isMaintenanceDiv").html("");
  2923. $("#detectRenovationDiv").html("");
  2924. $("#detectPhenomenonDiv").html("");
  2925. $("#detectClassificationDiv").html("");
  2926. $("#detectNalysisDiv").html("");
  2927. $("#detectPointDiv").html("");
  2928. $("#detectDescDiv").html("");
  2929. $("#detectContentDiv").html("");
  2930. $("#imgDiv").html();
  2931. $("#detectNumberDiv").html(detectInfo.detectNumber);
  2932. $("#detectStateDIV").html(detectStateName);
  2933. $("#productTypeNameDIV").html(detectInfo.productName+"("+detectInfo.colorName+")");
  2934. $("#detectOfferDIV").html(detectOfferName);
  2935. $("#isMaintenanceDiv").html(isMaintenanceName);
  2936. $("#detectRenovationDiv").html(detectRenovationName);
  2937. $("#detectPhenomenonDiv").html(detectInfo.detectPhenomenon);
  2938. $("#detectClassificationDiv").html(detectInfo.detectClassification);
  2939. $("#detectNalysisDiv").html(detectInfo.detectNalysis);
  2940. $("#detectPointDiv").html(detectInfo.detectPoint);
  2941. $("#detectDescDiv").html(detectInfo.detectDesc);
  2942. $("#detectContentDiv").html(detectInfo.detectContent);
  2943. var imgs = "";
  2944. $.each(detectImg,function (i,value) {
  2945. imgs += '<img href="'+value.detectImgUrl+'">';
  2946. })
  2947. $("#imgDiv").html(imgs);
  2948. $("#getDetect").show();
  2949. } else {
  2950. layer.msg("查询失败!",{icon: 5,time:1000});
  2951. }
  2952. },
  2953. error: function(XmlHttpRequest, textStatus, errorThrown){
  2954. layer.msg("操作失败!",{icon: 5,time:1000});
  2955. }
  2956. })
  2957. }
  2958. /**
  2959. * 打开维修处理
  2960. */
  2961. function to_updateDetectInfo(detectId,detectState){
  2962. $("#detectId").val(detectId);
  2963. $("#detectState").val(detectState);
  2964. if(detectState === "30"){
  2965. $("#updateDetect_1").show();
  2966. $("#updateDetect_2").hide();
  2967. /*$("#updateDetect_3").hide();*/
  2968. $("#updateDetect_1_1").hide();
  2969. }
  2970. if(detectState === "34"){
  2971. $("#updateDetect_1").hide();
  2972. $("#updateDetect_2").show();
  2973. $("#updateDetect_3").hide();
  2974. }
  2975. if(detectState === "38" || detectState === "37"){
  2976. $("#updateDetect_1").show();
  2977. $("#updateDetect_2").hide();
  2978. $("#updateDetect_3").show();
  2979. }
  2980. $("#updateDetect").show();
  2981. }
  2982. /**
  2983. * 客诉处理方式回显 state
  2984. */
  2985. procType();
  2986. $("#procTypeId").change(function (){
  2987. var procTypeId = parseInt($(this).val());
  2988. procMethod(procTypeId);
  2989. });
  2990. function procType(){
  2991. var procTypeId;
  2992. $.ajax({
  2993. cache: true,
  2994. type: "POST",
  2995. url: "${path}/admin/proc/type",
  2996. async: false,
  2997. success: function(data){
  2998. if (data.returnCode == 200) {
  2999. var html = '';
  3000. if (data.returnCode == 200) {
  3001. for(var i=0;i<data.returnMsg.list.length;i++){
  3002. listInfo = data.returnMsg.list[i];
  3003. if(i == 0 ){
  3004. procTypeId = listInfo.procTypeId;
  3005. }
  3006. html += '<option value="'+ listInfo.procTypeId +'">'+ listInfo.procTypeName +'</option>';
  3007. }
  3008. }else{
  3009. html = '';
  3010. }
  3011. $("[name='procTypeId']").html(html);
  3012. }
  3013. },
  3014. error: function(XmlHttpRequest, textStatus, errorThrown){
  3015. }
  3016. })
  3017. procMethod(procTypeId);
  3018. }
  3019. function procMethod(procTypeId){
  3020. $.ajax({
  3021. cache: true,
  3022. type: "POST",
  3023. data: {"procTypeId":procTypeId},
  3024. url: "${path}/admin/proc/method",
  3025. async: false,
  3026. success: function(data){
  3027. if (data.returnCode == 200) {
  3028. var html = '';
  3029. if (data.returnCode == 200) {
  3030. for(var i=0;i<data.returnMsg.list.length;i++){
  3031. listInfo = data.returnMsg.list[i];
  3032. html += '<option value="'+ listInfo.procMethodId +'">'+ listInfo.procMethodName +'</option>';
  3033. }
  3034. }else{
  3035. html = '';
  3036. }
  3037. $("#procMethodId").html(html);
  3038. }
  3039. },
  3040. error: function(XmlHttpRequest, textStatus, errorThrown){
  3041. }
  3042. })
  3043. }
  3044. /**
  3045. * 客诉处理方式回显 end
  3046. */
  3047. /**
  3048. *确认结果
  3049. */
  3050. function customerConfirm(){
  3051. var detectState = $("#detectState").val();
  3052. var detectProcessingResults;
  3053. var procMethodId = $("#procMethodId").val();
  3054. if(detectState === "30"){
  3055. detectProcessingResults = $('input[name="detectProcessingResults_1"]:checked').val();//处理结果
  3056. if(detectProcessingResults === "1"/* || detectProcessingResults === "5"*/){
  3057. procMethodId = null;
  3058. }
  3059. }
  3060. if(detectState === "34"){
  3061. detectProcessingResults = $('input[name="detectProcessingResults_2"]:checked').val();//处理结果
  3062. procMethodId = null;
  3063. }
  3064. if(detectState === "38" || detectState === "37"){
  3065. detectProcessingResults = $('input[name="detectProcessingResults_1"]:checked').val();//处理结果
  3066. /*if(detectProcessingResults === "5"){
  3067. procMethodId = null;
  3068. }*/
  3069. }
  3070. var detectCustomerDesc = $("#detectCustomerDesc").val();
  3071. var detectId = $("#detectId").val();
  3072. if(procMethodId != null){
  3073. layer.confirm('请确认是否已经正确选择客诉的处理方式', {
  3074. btn: ['确定','取消'] //按钮
  3075. }, function(){
  3076. $.ajax({
  3077. cache: true,
  3078. type: "POST",
  3079. data: {"detectProcessingResults" : detectProcessingResults,
  3080. "detectCustomerDesc" : detectCustomerDesc,
  3081. "procMethodId" : procMethodId,
  3082. "detectId" : detectId,
  3083. "customerId" : ${customerId},
  3084. "detectState" : detectState},
  3085. url: "${path}/admin/detect/customer_confirm",
  3086. async: false,
  3087. success: function(data){
  3088. if (data.returnCode == 200) {
  3089. layer.msg("操作成功!",{icon: 1,time:1000});
  3090. var detectInfo = data.returnMsg.detectInfo;
  3091. var detectStateName;
  3092. switch (detectInfo.detectState){
  3093. case 1:
  3094. detectStateName = "待检测机器";
  3095. break
  3096. case 30:
  3097. detectStateName = "待用户确认";
  3098. break
  3099. case 31:
  3100. detectStateName = "用户同意维修(待维修)";
  3101. break
  3102. case 32:
  3103. detectStateName = "维修完成";
  3104. break
  3105. case 33:
  3106. detectStateName = "用户不维修(原机退回)";
  3107. break
  3108. case 34:
  3109. detectStateName = "待客服确认维修";
  3110. break
  3111. case 35:
  3112. detectStateName = "客服确认维修,(待维修)";
  3113. break
  3114. case 36:
  3115. detectStateName = "维修完成";
  3116. break
  3117. case 37:
  3118. detectStateName = "机器无故障,原机退回";
  3119. break
  3120. case 38:
  3121. detectStateName = "机器故障,待用户确认";
  3122. break
  3123. case 39:
  3124. detectStateName = "机器无故障,原机退回";
  3125. break
  3126. case 20:
  3127. detectStateName = "待翻新入库";
  3128. break
  3129. case 21:
  3130. detectStateName = "已翻新入库";
  3131. break
  3132. case 22:
  3133. detectStateName = "不能翻新,待报废";
  3134. break
  3135. case 23:
  3136. detectStateName = "已报废回收";
  3137. break
  3138. }
  3139. /*alert(detectStateName);*/
  3140. $("#detectState"+detectInfo.detectId).html(detectStateName);
  3141. $("#updateDetect").hide();
  3142. } else {
  3143. layer.msg("操作失败!",{icon: 5,time:1000});
  3144. }
  3145. },
  3146. error: function(XmlHttpRequest, textStatus, errorThrown){
  3147. window.parent.admin_result("操作失败!",5);
  3148. }
  3149. })
  3150. }, function(){
  3151. });
  3152. }else{
  3153. $.ajax({
  3154. cache: true,
  3155. type: "POST",
  3156. data: {"detectProcessingResults" : detectProcessingResults,
  3157. "detectCustomerDesc" : detectCustomerDesc,
  3158. "procMethodId" : procMethodId,
  3159. "detectId" : detectId,
  3160. "customerId" : ${customerId},
  3161. "detectState" : detectState},
  3162. url: "${path}/admin/detect/customer_confirm",
  3163. async: false,
  3164. success: function(data){
  3165. if (data.returnCode == 200) {
  3166. layer.msg("操作成功!",{icon: 1,time:1000});
  3167. var detectInfo = data.returnMsg.detectInfo;
  3168. var detectStateName;
  3169. switch (detectInfo.detectState){
  3170. case 1:
  3171. detectStateName = "待检测机器";
  3172. break
  3173. case 30:
  3174. detectStateName = "待用户确认";
  3175. break
  3176. case 31:
  3177. detectStateName = "用户同意维修(待维修)";
  3178. break
  3179. case 32:
  3180. detectStateName = "维修完成";
  3181. break
  3182. case 33:
  3183. detectStateName = "用户不维修(原机退回)";
  3184. break
  3185. case 34:
  3186. detectStateName = "待客服确认维修";
  3187. break
  3188. case 35:
  3189. detectStateName = "客服确认维修,(待维修)";
  3190. break
  3191. case 36:
  3192. detectStateName = "维修完成";
  3193. break
  3194. case 37:
  3195. detectStateName = "机器无故障,原机退回";
  3196. break
  3197. case 38:
  3198. detectStateName = "机器故障,待用户确认";
  3199. break
  3200. case 20:
  3201. detectStateName = "待翻新入库";
  3202. break
  3203. case 21:
  3204. detectStateName = "已翻新入库";
  3205. break
  3206. case 22:
  3207. detectStateName = "不能翻新,待报废";
  3208. break
  3209. case 23:
  3210. detectStateName = "已报废回收";
  3211. break
  3212. }
  3213. /*alert(detectStateName);*/
  3214. $("#detectState"+detectInfo.detectId).html(detectStateName);
  3215. $("#updateDetect").hide();
  3216. } else {
  3217. layer.msg("操作失败!",{icon: 5,time:1000});
  3218. }
  3219. },
  3220. error: function(XmlHttpRequest, textStatus, errorThrown){
  3221. window.parent.admin_result("操作失败!",5);
  3222. }
  3223. })
  3224. }
  3225. }
  3226. $("#tel-001").click(function (){
  3227. if($("#detectState").val() == "30"){
  3228. $("#updateDetect_3").hide();
  3229. };
  3230. $("#procTypeId").val(3);//回显客诉处理方式
  3231. procMethod(3);
  3232. $("#procMethodId").val(7);
  3233. });
  3234. $("#tel-002").click(function (){
  3235. if($("#detectState").val() == "30"){
  3236. $("#updateDetect_3").hide();
  3237. };
  3238. $("#procTypeId").val(3);//回显客诉处理方式
  3239. procMethod(3);
  3240. $("#procMethodId").val(6);
  3241. });
  3242. $("#tel-003").click(function (){
  3243. $("#updateDetect_3").show();
  3244. $("#procTypeId").val(4);//回显客诉处理方式
  3245. procMethod(4);
  3246. $("#procMethodId").val(8);
  3247. });
  3248. $("#tel-004").click(function (){
  3249. $("#updateDetect_3").show();
  3250. $("#procTypeId").val(2);//回显客诉处理方式
  3251. procMethod(2);
  3252. $("#procMethodId").val(21);
  3253. });
  3254. $("#tel-005").click(function (){
  3255. $("#updateDetect_3").show();
  3256. $("#procTypeId").val(3);//回显客诉处理方式
  3257. procMethod(3);
  3258. $("#procMethodId").val(44);
  3259. });
  3260. $(function () {
  3261. $("#addFeePayPicture_file").change(function() {
  3262. fileUpload("addFeePayPicture_file");
  3263. });
  3264. $("#updateFeePayPicture_file").change(function() {
  3265. fileUpload("updateFeePayPicture_file");
  3266. });
  3267. });
  3268. function fileOnclick(node){
  3269. $(node).parent().siblings('.up_file').click();
  3270. }
  3271. /**
  3272. * 上传交易图片
  3273. * @param idValue
  3274. */
  3275. function fileUpload(idValue) {
  3276. $.ajaxFileUpload({
  3277. url:"/admin/customer/fee_fileUpload",
  3278. secureuri:false,
  3279. fileElementId : idValue,//文件选择框的id属性/名称
  3280. dataType: 'json', //json
  3281. success: function (data) {
  3282. if(data.returnCode == 200){
  3283. var imghtml = '<img style="width: 75px;" src="/'+ data.returnMsg.imgUrl +'" class="fee_file_img add_file"><br><a href="javascript:void(0)" style="padding-left: 10px;" class="del_product all_down" onclick="fileOnclick(this)">重新上传</a>';
  3284. $("#"+idValue).parent().find(".upload_file").eq(0).html(imghtml);
  3285. $("#"+idValue).change(function() {
  3286. fileUpload(idValue);
  3287. });
  3288. $("#"+idValue).parent().find(".addFeePayPicture_img").eq(0).val(data.returnMsg.imgUrl);
  3289. }else{
  3290. layer.msg('上传失败,请重试!',{icon: 5,time:2000});
  3291. }
  3292. }
  3293. });
  3294. }
  3295. function noticeCustomer() {
  3296. var sendbackStatus = parseInt($("input[name='sendbackNoticeCustomer']:checked").val());
  3297. if(sendbackStatus === 1){
  3298. $("#sendbackPresaleAdminDiv").show();
  3299. }else if(sendbackStatus === 2){
  3300. $("#sendbackPresaleAdminDiv").hide();
  3301. }
  3302. }
  3303. </script>
  3304. </body>
  3305. </html>