update_relation.ftl 164 KB

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