12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="Cache-Control" content="no-siteapp" />
- <#include "/base/add_base.ftl">
- <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
- <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
- <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
- <style>
- .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
- .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
- .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
- .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
- #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
- #suggest, #suggest2 {width:200px}
- .gray {color:gray}
- .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
- .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
- .ac_results li {border:1px solid #fff}
- .ac_over, .ac_results li a:hover {background:#c8e3fc}
- .ac_results li a span {float:right}
- .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
- .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
- .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
- .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
- .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
- .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent #32a3d8 transparent transparent;font-size:0; line-height:0;}
- .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
- .dalog-ask .answer{color: #666;margin-bottom: 10px;}
- .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
- .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
- .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
- .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
- .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
- .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
- .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
- .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent transparent transparent #32a3d8;font-size:0; line-height:0;}
- .time-line-list>li:first-child .arrow{display: none;}
- .table-bg th{background-color: #e2f6ff;}
- .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
- .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
- .input-produce{height: 25px;line-height: 25px}
- .color-div{height: 30px;}
- .table-td-color{}
- .msg-phone{
- height: 35px;
- line-height: 35px;
- }
- </style>
- <title>修改客诉 - 客诉管理 - RST</title>
- </head>
- <body>
- <nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页
- <span class="c-gray en">></span> 客诉管理
- <span class="c-gray en">></span> 修改客诉
- <a class="btn radius r"
- style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
- href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
- </nav>
- <article class="page-container" style="padding: 10px;">
- <div class="pd-20 cl">
- <form action="${path}/admin/customer/update_customer" method="post" class="form form-horizontal" id="form-customer-add" onkeydown="if(event.keyCode==13)return false;">
- <input type="hidden" id="customerId" name="customerId" value="${customerInfo.customerId!''}">
- <input type="hidden" id="customerName" name="customerName" value="">
- <input type="hidden" id="customerTel" name="customerTel" value="">
- <div class="row cl">
- <label class="form-label col-3">
- <div class="tit-2">客诉基本信息</div>
- </label>
- <div class="formControls col-9">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>跟进客服:</label>
- <div class="formControls col-4 col-sm-4"> <span class="select-box" style=" width: 625px;">
- <select name="adminId" id="adminId" class="select">
- <#list adminList as admin>
- <option value ="${admin.adminId!}" <#if customerInfo.adminId??><#if customerInfo.adminId == admin.adminId >selected="selected"</#if></#if>>${admin.adminName!}</option>
- </#list>
- </select>
- </span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>来源入口:</label>
- <div class="formControls col-10 col-sm-10 skin-minimal">
- <div class="radio-box">
- <input type="radio" id="tel-1" name="customerSourceType" value="1" <#if customerInfo.customerSourceType == 1 >checked</#if>>
- <label for="tel-1">400电话</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-2" name="customerSourceType" value="2" <#if customerInfo.customerSourceType == 2 >checked</#if>>
- <label for="tel-2">微信公众号</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-3" name="customerSourceType" value="3" <#if customerInfo.customerSourceType == 3 >checked</#if>>
- <label for="tel-3">其他</label>
- <input type="text" style="width: 321px;margin-left: 10px; <#if customerInfo.customerSourceType != 3 >display: none;</#if>" class="input-text" value="" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">
- <input type="hidden" value="${customerInfo.customerSource!''}" placeholder="" id="customerSource" name="customerSource" >
- </div>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>咨询类型:</label>
- <div class="formControls col-10 col-sm-10 skin-minimal">
- <div class="radio-box">
- <input type="radio" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1" <#if customerInfo.customerCounselType == 1 >checked</#if>>
- <label for="customer-type-1">售前咨询</label>
- </div>
- <div class="radio-box">
- <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2" <#if customerInfo.customerCounselType == 2 >checked</#if>>
- <label for="customer-type-2">售后咨询</label>
- </div>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
- <input type="hidden" id="typeCompany" name="typeCompany" value="">
- <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
- <#list typeList as type>
- <div class="radio-box">
- <input type="radio" id="produceType-${type_index}" name="typeId" typeCompany="${type.typeCompany}" value="${type.typeId!''}" <#if customerInfo.typeId == type.typeId>checked</#if> >
- <label for="produceType-${type_index}">${type.typeName!''}</label>
- </div>
- </#list>
- </div>
- </div>
- <div class="row cl" style="position: relative;">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
- <div class="formControls col-2 col-sm-2"> <span class="select-box">
- <select name="complaintId" class="select">
- <option value="">请选择问题分类</option>
- <#list complaintTypeInfoList as complaintTypeInfo>
- <option value="${complaintTypeInfo.complaintId}" <#if complaintQuestionInfo.complaintId == complaintTypeInfo.complaintId>selected="selected"</#if> >${complaintTypeInfo.complaintClassName}</option>
- </#list>
- </select>
- </span>
- </div>
- <div class="formControls col-2 col-sm-2"> <span class="select-box">
- <select name="smallClassId" id="smallClassId" class="select">
- <option value="">请选择问题分类</option>
- <#list complaintSmallClassInfoList as complaintSmallClassInfo>
- <option value="${complaintSmallClassInfo.smallClassId}" <#if complaintQuestionInfo.smallClassId == complaintSmallClassInfo.smallClassId>selected="selected"</#if>>${complaintSmallClassInfo.smallClassName}</option>
- </#list>
- </select>
- </span>
- </div>
- <div class="formControls col-2 col-sm-2">
- <div class="clearfix">
- <input type="text" placeholder="搜索关键词" class="input-text ac_input" name="questionIdMsg" value="" id="search_text" autocomplete="off" style="width:60%"><button type="button" class="btn btn-primary" id="search_button">搜索</button>
- </div>
- </div>
- <div class="dalog-ask">
- <div class="tag">
- <em></em>
- <strong>相关QA</strong>
- <a href="javascript:void(0)" style="margin-left: 200px;" onclick="closeQA()">关闭</a>
- <ul id="question" style="padding-top: 15px">
- <#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
- <li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
- </ul>
- </div>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题标题:</label>
- <div class="formControls col-5 col-sm-5">
- <input type="text" class="input-text" style="width: 625px;" name="describeTitle" id="describeTitle" datatype="*1-50" errormsg="问题标题不正确!" value="" >
- </div>
- </div>
- <div class="row cl">
- <#--处理描述 - 客诉备注-->
- <label class="form-label col-1 col-sm-1">问题描述:</label>
- <div class="formControls col-5 col-sm-5">
- <span>问题描述详情,内部使用,不会对外公布。</span>
- <script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
- </script>
- <input type="hidden" id="describeHandleDesc" name="describeHandleDesc" value="">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题回复:</label>
- <div class="formControls col-5 col-sm-5">
- <input type="hidden" name="questionId" id="questionId" value="">
- <script id="describeContentText" type="text/plain" style="width:983px;height:250px;"></script>
- </script>
- <input type="hidden" name="describeContent" id="describeContent" value="">
- <input type="hidden" name="describeId" id="describeId" value="">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text associated-phone" value="${customerInfo.customerTel!''}" placeholder="请输入手机号" id="p-phone" name="">
- </div>
- <div class="formControls col-2 col-sm-2" style="width: 10%">
- <input type="button" class="btn btn-primary" value="发送问题回复给用户" onclick="sendPhone('p','p-msg');">
- </div>
- <div class="formControls col-2 col-sm-2" style="width: 10%; margin-left: 40px;">
- <input type="button" class="btn btn-primary" value="保存QA" onclick="saveQuestion();">
- </div>
- <div class="formControls col-2 col-sm-2 msg-phone">
- <div id="p-msg" style="color: #e00"></div>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1">
- <div class="tit">处理结果</div>
- </label>
- <div class="formControls col-10 col-sm-10">
- </div>
- </div>
- <input type="hidden" id="sendProdcues" name="sendProdcuesJson" value="">
- <input type="hidden" id="sendFittings" name="sendFittingsJson" value="">
- <input type="hidden" id="closedProdcues" name="closedProdcuesJson" value="">
- <input type="hidden" id="closedFittings" name="closedFittingsJson" value="">
- <div class="row cl">
- <label class="form-label col-1 col-sm-1">处理类型:</label>
- <div class="formControls col-10 col-sm-10 skin-minimal">
- <div class="radio-box" id="solved">
- <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" <#if customerInfo.customerIsSolve == 1 >checked</#if> >
- <label for="customer-process-1">已解决</label>
- </div>
- <div class="radio-box" id="noSolved">
- <input type="radio" id="customer-process-2" value="2" name="customerIsSolve" <#if customerInfo.customerIsSolve == 2 >checked</#if> >
- <label for="customer-process-2">未解决</label>
- </div>
- <div class="radio-box" id="renewed" style="display: none">
- <input type="radio" id="customer-process-3" value="3" name="customerIsSolve" <#if customerInfo.customerIsSolve == 3 >checked</#if> >
- <label for="customer-process-3">换新</label>
- </div>
- <div class="radio-box" id="maintain" style="display: none">
- <input type="radio" id="customer-process-4" value="4" name="customerIsSolve" <#if customerInfo.customerIsSolve == 4 >checked</#if> >
- <label for="customer-process-4">维修</label>
- </div>
- <div class="radio-box" id="reissue" style="display: none">
- <input type="radio" id="customer-process-5" value="5" name="customerIsSolve" <#if customerInfo.customerIsSolve == 5 >checked</#if> >
- <label for="customer-process-5">补发</label>
- </div>
- <div class="radio-box" id="backGoods" style="display: none">
- <input type="radio" id="customer-process-6" value="6" name="customerIsSolve" <#if customerInfo.customerIsSolve == 6 >checked</#if> >
- <label for="customer-process-6">退货</label>
- </div>
- <div class="radio-box" id="noReasonBack" style="display: none">
- <input type="radio" id="customer-process-7" value="7" name="customerIsSolve" <#if customerInfo.customerIsSolve == 7 >checked</#if> >
- <label for="customer-process-7">无理由退货</label>
- </div>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-10 col-sm-10">
- <ul class="time-line-list" id="processResultStatus">
- <#-- <li><span class="arrow"></span><div class="number">1</div><div>录入客诉</div></li>
- <li><span class="arrow"></span><div class="number">2</div><div>督促用户寄回</div></li>
- <li><span class="arrow"></span><div class="number">3</div><div>录入快递单号</div></li>
- <li><span class="arrow"></span><div class="number">4</div><div>仓库收货</div></li>
- <li><span class="arrow"></span><div class="number">5</div><div>换新发货</div></li>
- <li><span class="arrow"></span><div class="number">6</div><div>发货通知用户</div></li>
- <li><span class="arrow"></span><div class="number">7</div><div>收货后回访</div></li>-->
- </ul>
- </div>
- </div>
- <div class="row cl" id="orderHead" style="display: none;">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>订单信息:</label>
- <div class="formControls col-1 col-sm-1">
- <button type="button" class="btn btn-primary" id="selectOrder">搜索订单</button>
- </div>
- </div>
- <#if salesOrder??>
- <div class="row cl" id="order" style="display: none;">
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-9 col-sm-9 text-c">
- <table class="table table-border table-bg table-bordered">
- <tr>
- <th style="text-align: center;">销售公司</th>
- <th style="text-align: center;">店铺名称</th>
- <th style="text-align: center;">Efast订单号</th>
- <th style="text-align: center;">交易号</th>
- <th style="text-align: center;">姓名</th>
- <th style="text-align: center;">电话</th>
- <th style="text-align: center;">订单金额</th>
- <th style="text-align: center;">购买产品</th>
- <th style="text-align: center;">购买日期</th>
- </tr>
- <tr id="showOrder">
- <td style="text-align: center;">${salesOrder.companyName!''}</td>
- <td style="text-align: center;">${salesOrder.storeName!''}</td>
- <td style="text-align: center;">${salesOrder.salesOrderId!''}</td>
- <td style="text-align: center;">${salesOrder.salesDealCode!''}</td>
- <td style="text-align: center;">${salesOrder.salesAddressName!''}</td>
- <td style="text-align: center;">${salesOrder.salesAddressTel!''}</td>
- <td style="text-align: center;">${salesOrder.salesPayMoney!''}</td>
- <td style="text-align: center;">
- <#list salesOrder.salesOrderItemList as salesOrderItem>
- ${salesOrderItem.itemProductName}* ${salesOrderItem.itemNum}<br>
- </#list>
- </td>
- <td style="text-align: center;">${(salesOrder.salesPayTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
- </tr>
- </table>
- </div>
- </div>
- </#if>
- <input type="hidden" id="companyId" name="companyId" value="<#if salesOrder??>${salesOrder.salesCompanyId}</#if>">
- <input type="hidden" id="storeId" name="storeId" value="<#if salesOrder??>${salesOrder.salesStoreId}</#if>">
- <input type="hidden" id="orderId" name="salesId" value="<#if salesOrder??>${salesOrder.salesId}</#if>">
- <div class="row cl" id="recipientInfoTitle" style="display: none;">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>收件信息:</label>
- <div class="formControls col-8 col-sm-8">请先选择订单,系统自动填充姓名,电话和地址信息。</div>
- </div>
- <div class="row cl" id="recipientInfo" style="display: none;">
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text" value="${customerCommon.relationSendName!''}" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="联系人格式不正确!" >
- </div>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text" value="${customerCommon.relationSendTel!''}" placeholder="填写收件人手机号" id="sendTel" name="relationSendTel" datatype="m" errormsg="联系人电话格式不正确!">
- </div>
- <div class="formControls col-2 col-sm-2" id="postageAccount">
- <input type="text" class="input-text" value="${customerCommon.relationAlipay!''}" placeholder="邮费转账 支付宝账户" id="relationAlipay" name="relationAlipay" errormsg="邮费转账账户!">
- </div>
- </div>
- <div class="row cl" id="recipientAddress" style="display: none;">
- <input type="hidden" id="addressInfo">
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-2 col-sm-2">
- <span class="select-box">
- <select id="province" class="select" name="provinceNumber">
- </select>
- </span>
- </div>
- <div class="formControls col-2 col-sm-2">
- <span class="select-box">
- <select id="city" class="select" name="cityNumber">
- </select>
- </span>
- </div>
- <div class="formControls col-2 col-sm-2">
- <span class="select-box">
- <select id="district" class="select" name="areaNumber">
- </select>
- </span>
- </div>
- <input type="hidden" name="relationSendMergeAddress" id="relationSendMergeAddress">
- </div>
- <div class="row cl" id="recipientAddressText" style="display: none;">
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-5 col-sm-5">
- <textarea name="relationSendAddress" id="sendAddress" cols="" rows="2" datatype="*" errormsg="收货地址不正确!" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)">${customerCommon.relationSendAddress!''}</textarea>
- <span id="addrssMsg"></span>
- </div>
- </div>
- <div class="row cl" id="renewedProduct" style="display: none;">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span><span id="relationProduct">换新产品</span>:</label>
- <div class="formControls col-9 col-sm-9 text-c" id="produceSelect">
- <table class="table table-border table-bg table-bordered">
- <thead>
- <tr class="text-c" id="table1">
- <th style="text-align: center;" width="60">产品名称</th>
- <th style="text-align: center;" width="60">产品颜色</th>
- <th style="text-align: center;" width="60">产品配件</th>
- </tr>
- </thead>
- <tbody id="addProduct">
- <#list productList as product>
- <tr>
- <td width="80">
- <input type="hidden" value="${product.productId}"><span>${product.productName}</span>
- </td>
- <td style="padding: 0px;text-align: center;">
- <table style="height: 100%;">
- <tbody>
- <#list product.colorList as color>
- <tr>
- <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
- ${color.colorName}
- </td>
- <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
- <input type="hidden" class="input-produce-id" value="${product.productId}">
- <input type="hidden" class="input-color-id" value="${color.colorId}">
- <#assign number = ""/>
- <#list customerCommon.sendProdcues as sendProdcues>
- <#if sendProdcues.colorId == color.colorId >
- <#assign number = sendProdcues.sendProdcueNumber/>
- </#if>
- </#list>
- <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
- </td>
- </tr>
- </#list>
- </tbody>
- </table>
- </td>
- <td style="padding: 0px;text-align: center;">
- <table style="height: 100%;">
- <tbody>
- <#list product.fittingsList as fittingsInfo>
- <tr>
- <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">${fittingsInfo.fittingsName}</td>
- <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
- <input type="hidden" class="input-produce-id" value="${fittingsInfo.productId}">
- <input type="hidden" class="input-fittings-id" value="${fittingsInfo.fittingsId}">
- <#assign number = ""/>
- <#list customerCommon.sendFittings as sendFittings>
- <#if sendFittings.fittingsId == fittingsInfo.fittingsId >
- <#assign number = sendFittings.sendFittingNumber/>
- </#if>
- </#list>
- <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
- </td>
- </tr>
- </#list>
- </tbody>
- </table>
- </td>
- </tr>
- </#list>
- </tbody>
- </table>
- </div>
- </div>
- <div class="row cl" id="TDScollect" style="display: none;">
- <label class="form-label col-1 col-sm-1">TDS收集:</label>
- <div class="formControls col-2 col-sm-2" style="position: relative;">
- <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
- <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" value="" />
- <div id="suggest" class="ac_results"></div>
- </div>
- <div class="formControls col-2 col-sm-2">
- <span class="select-box">
- <select name="" class="select" id="TDSArea" name="TDSArea">
- <option value="">请搜索城市</option>
- </select>
- </span>
- </div>
- <input type="hidden" name="customerArea" id="customerArea" value="${customerInfo.customerArea!''}">
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text" value="${customerInfo.customerInTDS!'0'}" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
- </div>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text" value="${customerInfo.customerOutTDS!'0'}" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
- </div>
- </div>
- <div class="row cl" id="TDScollectShow" /*style="display: none;"*/>
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-6 col-sm-6">
- <span id="DTS-address"><#if customerInfo.customerArea??>地址:${customerInfo.customerArea}</#if></span>
- <span id="DTS-in"><#if customerInfo.customerInTDS??>进水:${customerInfo.customerInTDS} PPM</#if></span> <span id="DTS-out"><#if customerInfo.customerOutTDS??>出水:${customerInfo.customerOutTDS} PPM</#if></span>
- </div>
- </div>
- <div class="row cl" id="sendAddressInfo">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
- <div class="formControls col-5 col-sm-5" style="height: 250px">
- <script id="sendAddressSms" type="text/plain" style="width:983px;height:200px;"></script>
- </script>
- </div>
- </div>
- <div class="row cl" id="sendAddressByPhone" style="display: none;">
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text associated-phone" value="" placeholder="请输入手机号" id="m-phone" name="">
- </div>
- <div class="formControls col-2 col-sm-2" style="width: 10%">
- <input type="button" class="btn btn-primary" value="发短信给用户" onclick="sendPhone('m','m-msg');">
- </div>
- <div class="formControls col-2 col-sm-2 msg-phone">
- <div id="m-msg" style="color: #e00"></div>
- </div>
- </div>
- <div class="row cl" id="updateProduct" style="display: none;">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>更换产品:</label>
- <div class="formControls col-9 col-sm-9" >
- <table class="table table-border table-bg table-bordered">
- <thead>
- <tr class="text-c" id="table2">
- <th style="text-align: center;" width="60">产品名称</th>
- <th style="text-align: center;" width="60">产品颜色</th>
- <th style="text-align: center;" width="60">产品配件</th>
- </tr>
- </thead>
- <tbody id="back-product">
- <#list productList as product>
- <tr>
- <td width="80">
- <input type="hidden" value="${product.productId}"><span>${product.productName}</span>
- </td>
- <td style="padding: 0px;text-align: center;">
- <table style="height: 100%;">
- <tbody>
- <#list product.colorList as color>
- <tr>
- <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
- ${color.colorName}
- </td>
- <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
- <input type="hidden" class="input-produce-id" value="${product.productId}">
- <input type="hidden" class="input-color-id" value="${color.colorId}">
- <#assign number = ""/>
- <#list customerCommon.closedProdcues as closedProdcues>
- <#if closedProdcues.colorId == color.colorId >
- <#assign number = closedProdcues.closedProdcueNumber/>
- </#if>
- </#list>
- <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
- </td>
- </tr>
- </#list>
- </tbody>
- </table>
- </td>
- <td style="padding: 0px;text-align: center;">
- <table style="height: 100%;">
- <tbody>
- <#list product.fittingsList as fittingsInfo>
- <tr>
- <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">${fittingsInfo.fittingsName}</td>
- <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
- <input type="hidden" class="input-produce-id" value="${fittingsInfo.productId}">
- <input type="hidden" class="input-fittings-id" value="${fittingsInfo.fittingsId}">
- <#assign number2 = ""/>
- <#list customerCommon.closedFittings as closedFittings>
- <#if closedFittings.fittingsId == fittingsInfo.fittingsId >
- <#assign number2 = closedFittings.closedFittingNumber/>
- </#if>
- </#list>
- <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="${number2}" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
- </td>
- </tr>
- </#list>
- </tbody>
- </table>
- </td>
- </tr>
- </#list>
- </tbody>
- </table>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访信息:</label>
- <div class="formControls col-10 col-sm-10 skin-minimal">
- <div class="radio-box">
- <input type="radio" id="customer-visit-1" name="customerIsVisit" value="2" <#if customerInfo.customerIsVisit == '2' >checked</#if> >
- <label for="customer-visit-1">需要回访</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="customer-visit-2" name="customerIsVisit" value="1" <#if customerInfo.customerIsVisit == '1' >checked</#if> >
- <label for="customer-visit-2">不需要回访</label>
- </div>
- </div>
- </div>
- <div id="needToVisit" style="<#if customerInfo.customerIsVisit == '1' >display: none;</#if>">
- <#if visit??>
- <#assign visitName = visit.visitName/>
- <#assign customerTel = visit.visitTel/>
- <#assign visitDate = visit.visitDate/>
- <#assign visitTimeSelect = visit.visitTimeSelect/>
- <#assign designatedAdminId = visit.designatedAdminId/>
- </#if>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>被回访人:</label>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text" value="${visitName!''}" placeholder="填写回访人姓名" id="" name="visitName" datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="回访人姓名格式不正确!" >
- </div>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text associated-phone" value="${customerTel!''}" placeholder="填写回访人手机号" id="" name="visitTel" datatype="m" errormsg="回访人手机号码格式不正确!">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
- <div class="formControls col-2 col-sm-2">
- <input type="text" placeholder="请选择回访日期" id="datemin" name="visitDate" value="${(visitDate?string("yyyy-MM-dd"))!''}" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})" readonly="readonly">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访时间:</label>
- <div class="formControls col-10 col-sm-10 skin-minimal">
- <div class="radio-box">
- <input type="radio" id="visit-time-1" name="visitTimeSelect" value="1" <#if visitTimeSelect?? && visitTimeSelect== 1 >checked</#if> >
- <label for="visit-time-1">09:00-12:00</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="visit-time-2" name="visitTimeSelect" value="2" <#if visitTimeSelect?? && visitTimeSelect == 2 >checked</#if> >
- <label for="visit-time-2">12:00-14:00</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="visit-time-3" name="visitTimeSelect" value="3" <#if visitTimeSelect?? && visitTimeSelect == 3 >checked</#if> >
- <label for="visit-time-3">14:00-18:00</label>
- </div>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
- <div class="formControls col-4 col-sm-4"> <span class="select-box">
- <select class="select" id="visitAdminId" name="visitAdminId">
- <#list adminList as admin>
- <option value ="${admin.adminId!}" <#if designatedAdminId??><#if designatedAdminId == admin.adminId >selected="selected"</#if></#if>>${admin.adminName!}</option>
- </#list>
- </select>
- </span>
- </div>
- </div>
- <div class="cl" style="display: table;width: 100%;">
- <label class="form-label col-1 col-sm-1"></label>
- <div class="formControls col-4 col-sm-4">
- <span class="c-red" id="visitAdminIdMsg">您将为自己指定一个回访任务</span>
- </div>
- </div>
- </div>
- <div class="row cl">
- <div class="col-2 col-sm-2 col-offset-3">
- <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
- </div>
- </div>
- </form>
- </div>
- </article>
- <#--时间控件-->
- <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
- <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
- <script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
- <script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
- <script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
- <#--<script type="text/javascript" src="${path}/common/lib/cm.lib/dimensions.js"></script>-->
- <script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
- <#--百度富文本编译器-->
- <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
- <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.js"></script>
- <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.parse.js"></script>
- <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
- <script type="text/javascript">
- $(function(){
- $("#province").ProvinceCity();
- $('.skin-minimal input').iCheck({
- checkboxClass: 'icheckbox-blue',
- radioClass: 'iradio-blue',
- increaseArea: '20%'
- });
- $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(result){
- console.log($(this)[0].value);
- $("#city2").click()
- },
- attachObject:'#suggest'
- });
- $("#city2").suggest(citys,{hot_list:commoncitys,attachObject:"#suggest2"})
- });
- $(document).on('click', '.dalog-ask .answer', function() {
- var QA_complaintId = $(this).find(".QA_complaintId").val();
- var QA_smallClassId = $(this).find(".QA_smallClassId").val();
- $("select[name='complaintId']").val(QA_complaintId);
- initComplaintSmallClassInfo(QA_complaintId,QA_smallClassId); //初始化小类
- var questionId = $(this).find(".quesId").val();
- var title = $(this).find("span").html();
- var desc = $(this).find("#questionProfile").html();
- $("#questionId").val(questionId);
- $("#describeTitle").val(title);
- UE.getEditor('describeContentText').setContent(desc);
- //$("#answer-textarea").text();
- $(".dalog-ask").hide(); //隐藏qa
- });
- </script>
- <script>
- var tool = [
- 'anchor', //锚点
- 'undo', //撤销
- 'redo', //重做
- 'bold', //加粗
- 'indent', //首行缩进
- 'snapscreen', //截图
- 'italic', //斜体
- 'underline', //下划线
- 'strikethrough', //删除线
- 'subscript', //下标
- 'fontborder', //字符边框
- 'superscript', //上标
- 'formatmatch', //格式刷
- //'source', //源代码
- 'blockquote', //引用
- 'pasteplain', //纯文本粘贴模式
- 'selectall', //全选
- 'print', //打印
- 'preview', //预览
- 'horizontal', //分隔线
- 'removeformat', //清除格式
- 'time', //时间
- 'date', //日期
- 'unlink', //取消链接
- 'insertrow', //前插入行
- 'insertcol', //前插入列
- 'mergeright', //右合并单元格
- 'mergedown', //下合并单元格
- 'deleterow', //删除行
- 'deletecol', //删除列
- 'splittorows', //拆分成行
- 'splittocols', //拆分成列
- 'splittocells', //完全拆分单元格
- 'deletecaption', //删除表格标题
- 'inserttitle', //插入标题
- 'mergecells', //合并多个单元格
- 'deletetable', //删除表格
- 'cleardoc', //清空文档
- 'insertparagraphbeforetable', //"表格前插入行"
- //'insertcode', //代码语言
- 'fontfamily', //字体
- 'fontsize', //字号
- 'paragraph', //段落格式
- 'simpleupload', //单图上传
- 'insertimage', //多图上传
- 'edittable', //表格属性
- 'edittd', //单元格属性
- 'link', //超链接
- 'emotion', //表情
- 'spechars', //特殊字符
- 'searchreplace', //查询替换
- 'map', //Baidu地图
- 'gmap', //Google地图
- 'insertvideo', //视频
- 'help', //帮助
- 'justifyleft', //居左对齐
- 'justifyright', //居右对齐
- 'justifycenter', //居中对齐
- 'justifyjustify', //两端对齐
- 'forecolor', //字体颜色
- 'backcolor', //背景色
- 'insertorderedlist', //有序列表
- 'insertunorderedlist', //无序列表
- 'fullscreen', //全屏
- 'directionalityltr', //从左向右输入
- 'directionalityrtl', //从右向左输入
- 'rowspacingtop', //段前距
- 'rowspacingbottom', //段后距
- 'pagebreak', //分页
- 'insertframe', //插入Iframe
- 'imagenone', //默认
- 'imageleft', //左浮动
- 'imageright', //右浮动
- 'attachment', //附件
- 'imagecenter', //居中
- 'wordimage', //图片转存
- 'lineheight', //行间距
- 'edittip ', //编辑提示
- 'customstyle', //自定义标题
- 'autotypeset', //自动排版
- // 'webapp', //百度应用
- 'touppercase', //字母大写
- 'tolowercase', //字母小写
- 'background', //背景
- 'template', //模板
- // 'scrawl', //涂鸦
- 'music', //音乐
- 'inserttable', //插入表格
- 'drafts', // 从草稿箱加载
- 'charts' // 图表
- ];
- /*问题描述*/
- var describeContentText = UE.getEditor('describeContentText', {
- toolbars: [tool],
- autoHeightEnabled: true,
- autoFloatEnabled: true,
- elementPathEnabled : false,/*去掉元素路径*/
- zIndex : 5
- });
- /*处理描述*/
- var describeHandleDescText = UE.getEditor('describeHandleDescText', {
- toolbars: [tool],
- autoHeightEnabled: true,
- autoFloatEnabled: true,
- elementPathEnabled : false, /*去掉元素路径*/
- zIndex : 5
- });
- /*邮寄地址*/
- var sendAddressSms = UE.getEditor('sendAddressSms', {
- toolbars: [tool],
- autoHeightEnabled: true,
- autoFloatEnabled: true,
- elementPathEnabled : false /*去掉元素路径*/
- });
- //是否已经初始化过邮寄信息
- var isInitSendAddressSms = false;
- sendAddressSms.ready(function() {
- sendAddressSms.setHeight(130); //固定高度
- });
- </script>
- <script type="text/javascript">
- /*处理结果的执行状态*/
- var isSolve = {
- solved : [],
- noSolved : [],
- renewed : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"],
- maintain : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"],
- reissue : ["录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"],
- backGoods : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"],
- noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
- }
- /*处理结果的变更状态 产品列表表头信息*/
- var isSolveTitleMsg = {
- solved : [[],[]],
- noSolved : [[],[]],
- renewed : [["退回产品","退回产品颜色","退回产品配件"],["更换产品","更换产品颜色","更换产品配件"]],
- maintain : [["需要维修的产品","需要维修的产品颜色","需要维修的产品配件"],["维修产品","维修产品颜色","维修产品配件"]],
- reissue : [["补发产品","补发产品颜色","补发产品配件"],[]],
- backGoods : [["退回产品","退回产品颜色","退回产品配件"],[]],
- noReasonBack : [["退回产品","退回产品颜色","退回产品配件"],[]]
- }
- /*是否是修改页面*/
- var isUpdate = true;
- /*个人id*/
- var adminId = 0;
- /* 咨询类型 1:售前咨询 2:售后咨询 3:其他 */
- var allCustomerInfoType = ${customerInfo.customerCounselType};
- /*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
- var allCustomerType = ${customerInfo.customerIsSolve};
- var allCustomerTypeName = ["已解决","未解决","换新","维修","补发","退货","无理由退货"];
- /* 寄回地址的id */
- var complaint_questionId = 5;
- /* 用于判断是否第一次初始化省市区-- 只在选择类型为售后时使用 */
- var isInitAddress = ${customerInfo.customerIsSolve!''};
- /*初始化页面参数*/
- $(function () {
- /* 初始化单选框样式 */
- //initCheck();
- /*初始化产品类型 -- 客诉头部的产品类型单选 */
- //initProduceType();
- /*初始化问题分类*/
- //initComplaintTypeInfo();
- /*初始化客服*/
- ///initSysAdmin();
- /*初始化回访客服*/
- //initVisitSysAdmin();
- /*初始化问题描述*/
- initQuestionDescribe();
- /*初始化选择处理结果 -- type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货 */
- initProcessResult(allCustomerType);
- /*监听来源入口选择事件*/
- $("input[name='customerSourceType']").change(function (){
- var type = parseInt($(this).val());
- if(type == 3){
- $("#customerSourceOld").show();
- }else{
- $("#customerSourceOld").hide();
- }
- })
- /*监听客诉类型选择事件*/
- $("input[name='customerCounselType']").change(function (){
- allCustomerInfoType = parseInt($(this).val());
- if(allCustomerInfoType == 1){
- $("#customer-process-1").iCheck('check'); //设置已解决
- allCustomerType = 1;
- }else{
- $("#customer-process-3").iCheck('check'); //设置换新
- allCustomerType =3;
- }
- initProcessResult(allCustomerType);
- })
- /*监听处理结果选择事件*/
- $("[name='customerIsSolve']").change(function(){
- initProcessResult(parseInt($(this).val()));
- })
- /*监听问题类型 选择事件*/
- $("[name='complaintId']").change(function(){
- initComplaintSmallClassInfo($(this).val());
- })
- /*监听问题关键字搜索*/
- $(document).on('click', '#search_button', function() {
- initComplaintQuestionInfo("p");
- });
- /*搜索订单事件*/
- $(document).on('click', '#selectOrder', function() {
- selectOrder();
- });
- /*监听省选择事件*/
- $(document).on('change', '#province', function() {
- var proId = $("#province").val();
- var cityId = setCity("",proId,2)
- setDistrict("",cityId,2)
- });
- /*监听市选择事件*/
- $(document).on('change', '#city', function() {
- var city = $("#city").val();
- setDistrict("",city,2)
- });
- /*监听回访类型选择事件 是否需要回访 1:不需要回访 2:需要回复 */
- initVisitEvent();
- /*监听回访选择客服的选择事件*/
- $(document).on('change', '#visitAdminId', function() {
- var visitAdminName = $("#visitAdminId").find("option:selected").text();
- var visitAdminId = $("#visitAdminId").val();
- if(convertUndefinedToEmpty(visitAdminId) == adminId){
- showVisitMsg(1);
- }else{
- showVisitMsg(2,visitAdminName);
- }
- });
- /* 监听TDS收集--地址选择 */
- $(document).on('change', '#TDSArea', function() {
- setTDSCollect();
- });
- /*实时监听文本框-- TDS进水*/
- // document.getElementById("customerInTDS").addEventListener("input", function(){
- // setTDSCollect();
- // });
- /*实时监听文本框-- TDS出水*/
- // document.getElementById("customerOutTDS").addEventListener("input", function(){
- // setTDSCollect();
- // });
- /* 监听手机号 失去焦点时 将其他手机号码未填的 */
- $(".associated-phone").blur(function (){
- var phone = $(this).val();
- $(".associated-phone").each(function(){
- var ph = $(this).val();
- if(ph == null || ph == "" || typeof(ph) == undefined ){
- $(this).val(phone);
- }
- })
- })
- })
- /*用于初始化回访信息的展示*/
- function initVisitEvent(){
- $("input[name='customerIsVisit']").change(function (){
- if($(this).val() == 2){
- $("#needToVisit").css("display","block");
- }else{
- $("#needToVisit").css("display","none");
- }
- })
- }
- /**
- * 初始化问题描述
- */
- function initQuestionDescribe(){
- $.ajax({
- type: "POST",
- data: {
- customerId : "${customerInfo.customerId!''}"
- },
- url: "${path}/admin/customer/select_question_describe",
- success: function(data){
- if (data.returnCode == 200) {
- var questionDescribe = data.returnMsg.questionDescribe;
- $("#describeTitle").val(questionDescribe.describeTitle);
- $("#describeId").val(questionDescribe.describeId);
- $("#describeHandleDesc").val(questionDescribe.describeHandleDesc);
- describeContentText.addListener("ready", function () {
- describeContentText.setContent(questionDescribe.describeContent);
- });
- describeHandleDescText.addListener("ready", function () {
- describeHandleDescText.setContent(questionDescribe.describeHandleDesc);
- });
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- /*关闭qa*/
- function closeQA(){
- $(".dalog-ask").hide(); //隐藏qa
- }
- /*初始化单选框样式*/
- function initCheck(){
- $('.skin-minimal input').iCheck({
- checkboxClass: 'icheckbox-blue',
- radioClass: 'iradio-blue',
- increaseArea: '20%'
- });
- }
- /*初始化单选框样式*/
- function initCheckByNode(node){
- node.iCheck({
- checkboxClass: 'icheckbox-blue',
- radioClass: 'iradio-blue',
- increaseArea: '20%'
- });
- }
- /*
- * type 1:不需要回访 2:需要回访
- * */
- function visitByType(type){
- if(!isUpdate){
- if(1 == type){ //不需要回访
- $("#customer-visit-2").iCheck('check'); //设置不需要回访
- $("#needToVisit").css("display","none");
- }else{
- $("#customer-visit-1").iCheck('check'); //设置需要回访
- $("#needToVisit").css("display","block");
- }
- }
- initVisitEvent();
- }
- /*初始化客服*/
- var sysAminList;
- function initSysAdmin() {
- sysAminList = getSysAdmin();
- var html = "";
- for(var i=0;i<sysAminList.length;i++){
- var adminList = sysAminList[i];
- if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
- html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'(我)</option>';
- }else{
- html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
- }
- }
- $("#adminId").html(html);
- }
- /*初始化回访客服的选择*/
- function initVisitSysAdmin(){
- var html = "";
- var flag = false;
- for(var i=0;i<sysAminList.length;i++){
- var adminList = sysAminList[i];
- if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
- html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'(我)</option>';
- flag = true;
- }else{
- html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
- }
- }
- $("#visitAdminId").html(html);
- if(flag){
- showVisitMsg(1);
- }
- }
- /**
- * 用于显示回访指派任务提示信息
- * 1 :自己
- * 2 :其他人
- */
- function showVisitMsg(type,adminName) {
- if(type == 1){
- $("#visitAdminIdMsg").html("您将为自己指定一个回访任务");
- }else{
- $("#visitAdminIdMsg").html("您将为"+ adminName +"指定一个回访任务");
- }
- }
- /*获取客服*/
- var sysAminList;
- function getSysAdmin(){
- if(sysAminList != null && sysAminList.length > 0){
- return sysAminList
- }
- $.ajax({
- type: "POST",
- data: {
- },
- url: "${path}/admin/customer/select_sys_admin",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- sysAminList = data.returnMsg.adminList;
- adminId = data.returnMsg.adminId;
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- return sysAminList;
- }
- /*初始化产品类型 -- 客诉头部的产品类型单选*/
- function initProduceType(){
- var html = "";
- $.ajax({
- type: "POST",
- data: {
- },
- url: "${path}/admin/customer/select_produce_type",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- var check = "checked";
- for(var i=0;i<data.returnMsg.productTypeList.length;i++){
- var produce = data.returnMsg.productTypeList[i];
- html += ' <div class="radio-box">' +
- '<input type="radio" id="produce-type-'+ i +'" name="typeId" typeCompany="'+ produce.typeCompany +'" datatype="*" value="'+ produce.typeId +'" '+ check +' nullmsg="请选择产品类型!" >' +
- ' <label for="produce-type-'+ i +'">'+ produce.typeName +'</label>' +
- ' </div>';
- check = "";
- }
- }else{
- html = '';
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- $("#produceTypeHtml").html(html);
- initCheck();
- }
- /**
- * 选择处理结果-- 默认选择已解决
- * type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货
- */
- function initProcessResult(type){
- if(type == null || type == ""){
- type = 1;
- }
- allCustomerType = type;
- if(allCustomerInfoType == null || allCustomerInfoType == ""){
- allCustomerInfoType = $("input[name='customerCounselType']:checked").val();
- }
- var statusHtml = '<li><span class="arrow"></span><div class="number">status_index</div><div>status_html</div></li>';
- var resultHtml = '';
- var result = {};
- var resultProductTableTitle = {};
- $("#solved").show(); //已解决
- $("#noSolved").show();//未解决
- if(allCustomerInfoType == 1){ //售前
- $("#renewed").hide();
- $("#maintain").hide();
- $("#reissue").hide();
- $("#backGoods").hide();
- $("#noReasonBack").hide();
- switch(type)
- {
- case 1:
- otherHied();
- visitByType(1);
- break;
- case 2:
- otherHied();
- visitByType(2);
- break;
- default:
- break;
- }
- }else if(allCustomerInfoType == 2){ //售后
- if(!isInitSendAddressSms){
- initComplaintQuestionInfo("m");
- isInitSendAddressSms = true;
- }
- /* 在选择售后类型是,直接初始化省市区,使用isInitAddress 变量来判断 */
- if(isInitAddress == 1 || isInitAddress == 2){
- var proId = setPro(null,2);
- var cityId = setCity(null,proId,2);
- setDistrict(null,cityId,2);
- isInitAddress = 1;
- }else if(isInitAddress == 3 || isInitAddress == 4 || isInitAddress == 5 || isInitAddress == 6 || isInitAddress == 7){
- setPro(null,2); //创建省
- setCity(null,proId,2);
- setDistrict(null, cityId, 2);
- <#if customerCommon.provinceNumber?? >
- var proId = ${customerCommon.provinceNumber!''};
- $("#province option[value='"+ proId +"']").attr("selected","true"); //设置省
- </#if>
- <#if customerCommon.cityNumber?? >
- var cityId = ${customerCommon.cityNumber!''};
- $("#city option[value='" + cityId + "']").attr("selected", "true"); //设置市
- </#if>
- <#if customerCommon.areaNumber?? >
- var disId = ${customerCommon.areaNumber!''};
- $("#district option[value='" + disId + "']").attr("selected", "true"); //设置地区
- isInitAddress = 1;
- </#if>
- }
- $("#renewed").show();
- $("#maintain").show();
- $("#reissue").show();
- $("#backGoods").show();
- $("#noReasonBack").show();
- switch(type)
- {
- case 1:
- otherHied();
- visitByType(1);
- break;
- case 2:
- otherHied();
- visitByType(2); //需要回访
- break;
- case 3: //换新
- result = isSolve.renewed;
- resultProductTableTitle = isSolveTitleMsg.renewed;
- $("#relationProduct").html("换新产品");
- $("#processResultStatus").show();
- $("#orderHead").show();
- $("#order").show();
- $("#recipientInfo").show();
- $("#recipientInfoTitle").show();
- $("#recipientAddress").show();
- $("#recipientAddressText").show();
- $("#renewedProduct").show();
- $("#TDScollect").show();
- $("#TDScollectShow").show();
- $("#sendAddressInfo").show();
- $("#sendAddressByPhone").show();
- $("#updateProduct").show(); //换新产品
- $("#postageAccount").show(); //邮费转账账户
- visitByType(2); //需要回访
- break;
- case 4: //维修
- result = isSolve.maintain;
- resultProductTableTitle = isSolveTitleMsg.maintain;
- $("#relationProduct").html("维修产品");
- $("#processResultStatus").show();
- $("#orderHead").show();
- $("#order").show();
- $("#recipientInfo").show();
- $("#recipientInfoTitle").show();
- $("#recipientAddress").show();
- $("#recipientAddressText").show();
- $("#renewedProduct").show();
- $("#TDScollect").show();
- $("#TDScollectShow").show();
- $("#sendAddressInfo").show();
- $("#sendAddressByPhone").show();
- $("#updateProduct").show();//维修产品
- $("#postageAccount").show(); //邮费转账账户
- visitByType(2); //需要回访
- break;
- case 5://补发
- result = isSolve.reissue;
- resultProductTableTitle = isSolveTitleMsg.reissue;
- $("#relationProduct").html("补发产品");
- $("#processResultStatus").show();
- $("#orderHead").show();
- $("#order").show();
- $("#recipientInfo").show();
- $("#recipientInfoTitle").show();
- $("#recipientAddress").show();
- $("#recipientAddressText").show();
- $("#renewedProduct").show();
- $("#TDScollect").show();
- $("#TDScollectShow").show();
- $("#sendAddressInfo").hide();
- $("#sendAddressByPhone").hide();
- $("#updateProduct").hide();
- $("#postageAccount").hide(); //邮费转账账户 -- 隐藏
- visitByType(2); //需要回访
- break;
- case 6: //退货
- result = isSolve.backGoods;
- resultProductTableTitle = isSolveTitleMsg.backGoods;
- $("#relationProduct").html("退货产品");
- $("#processResultStatus").show();
- $("#orderHead").show();
- $("#order").show();
- $("#recipientInfo").show();
- $("#recipientInfoTitle").show();
- $("#recipientAddress").show();
- $("#recipientAddressText").show();
- $("#renewedProduct").show();
- $("#TDScollect").show();
- $("#TDScollectShow").show();
- $("#sendAddressInfo").show();
- $("#sendAddressByPhone").show();
- $("#updateProduct").hide();
- $("#postageAccount").show(); //邮费转账账户
- visitByType(2); //需要回访
- break;
- case 7://无理由退货
- result = isSolve.noReasonBack;
- resultProductTableTitle = isSolveTitleMsg.noReasonBack;
- $("#relationProduct").html("退货产品");
- $("#processResultStatus").show();
- $("#orderHead").show();
- $("#order").show();
- $("#recipientInfo").show();
- $("#recipientInfoTitle").show();
- $("#recipientAddress").show();
- $("#recipientAddressText").show();
- $("#renewedProduct").show();
- $("#TDScollect").show();
- $("#TDScollectShow").show();
- $("#sendAddressInfo").show();
- $("#sendAddressByPhone").show();
- $("#updateProduct").hide();
- $("#postageAccount").show(); //邮费转账账户
- visitByType(2); //需要回访
- break;
- default:
- break;
- }
- }
- for(var i=0;i< result.length;i++){
- var html = statusHtml.replace("status_index",i+1);
- html = html.replace("status_html",result[i]);
- resultHtml += html;
- }
- if(resultProductTableTitle != null && resultProductTableTitle.length > 0){
- /* 根据处理类型来切换 产品列表的列名称 */
- for(var i=0;i<resultProductTableTitle[0].length;i++){
- $("#table1").find("th").eq(i).html(resultProductTableTitle[0][i]);
- }
- for(var i=0;i<resultProductTableTitle[1].length;i++){
- $("#table2").find("th").eq(i).html(resultProductTableTitle[1][i]);
- }
- }
- $("#processResultStatus").html(resultHtml);
- }
- /*已解决|未解决 */
- function otherHied(){
- $("#processResultStatus").hide(); //处理结果的执行状态 已解决未解决没有该信息
- $("#orderHead").hide();
- $("#order").hide();
- $("#recipientInfo").hide();
- $("#recipientInfoTitle").hide();
- $("#recipientAddress").hide();
- $("#recipientAddressText").hide();
- $("#renewedProduct").hide();
- $("#TDScollect").hide();
- $("#TDScollectShow").hide();
- $("#sendAddressInfo").hide();
- $("#sendAddressByPhone").hide();
- $("#updateProduct").hide();
- }
- /*初始化问题大类*/
- function initComplaintTypeInfo() {
- //默认为售前咨询
- //var customerCounselTypeOverall = allCustomerInfoType;
- var customerCounselTypeOverall = null;
- $.ajax({
- type: "POST",
- data: {
- complaintConsultingType : customerCounselTypeOverall
- },
- url: "${path}/admin/complaintQuestion/list_complaintType",
- async: true,
- success: function(data){
- var html = '<option value="">请选择问题分类</option>';
- var id;
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
- var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
- if(i == 0 ){
- id = complaintTypeInfo.complaintId;
- }
- html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
- }
- }else{
- html = '';
- }
- $("[name='complaintId']").html(html);
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- /*显示小类*/
- function initComplaintSmallClassInfo(complaintId,smallId){
- if(complaintId == null || complaintId == ""){
- var html = '<option value="">请选择问题小类</option>';
- $("[name='smallClassId']").html(html);
- }else{
- $.ajax({
- type: "POST",
- data: {
- complaintId : complaintId
- },
- url: "${path}/admin/complaintQuestion/list_complaintSmallClass",
- async: true,
- success: function(data){
- var html = '<option value="">请选择问题小类</option>';
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.complaintSmallClassInfoList.length;i++){
- var ComplaintSmallClassInfo = data.returnMsg.complaintSmallClassInfoList[i];
- html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
- }
- }else{
- html = '';
- }
- $("[name='smallClassId']").html(html);
- if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
- $("select[name='smallClassId']").val(smallId);
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- }
- /**
- * 搜索QA 显示
- * type p:问题qa; m:邮寄qa
- */
- function initComplaintQuestionInfo(type){
- var complaintId;
- var smallClassId;
- var questionName;
- var customerCounselType;
- var questionId;
- if(type == "p"){
- complaintId = $("[name='complaintId']").val();
- smallClassId = $("[name='smallClassId']").val();
- questionName = $("[name='questionIdMsg']").val();
- customerCounselType = $("[name='customerCounselType']:checked").val();
- }else if(type == "m"){
- questionId = complaint_questionId;
- }
- $.ajax({
- type: "POST",
- data: {
- complaintId : complaintId,
- smallClassId : smallClassId,
- questionName : questionName,
- /*complaintType : customerCounselType,*/
- questionId : questionId
- },
- url: "${path}/admin/complaintQuestion/list_complaintQuestion",
- async: false,
- success: function(data){
- if(type == "p"){
- var html = "";
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.complaintQuestionInfoList.length;i++){
- var complaintQuestion= data.returnMsg.complaintQuestionInfoList[i];
- //html += '<li class="ask">'+ complaintQuestion.questionName +'' +
- // '</li>' +
- // '<li class="answer" style="height: 65px;overflow: hidden;">答:<span>'+ complaintQuestion.questionProfile +'</span><input class="quesId" type="hidden" value="'+ complaintQuestion.questionId +'"></li>';
- html += '' +
- '<li class="answer" style="height: 20px;overflow: hidden;border-bottom: 1px solid #ddd;"><span>'+ complaintQuestion.questionName +'</span>' +
- '<input class="QA_complaintId" type="hidden" value="'+ complaintQuestion.complaintId +'">' +
- '<input class="QA_smallClassId" type="hidden" value="'+ complaintQuestion.smallClassId +'">' +
- '<input class="quesId" type="hidden" value="'+ complaintQuestion.questionId +'">' +
- '<div id="questionProfile" style="display: block">'+ complaintQuestion.questionProfile +'</div>' +
- '</li>';
- }
- }else{
- html = '<span style="font-size: 12px; margin-top: 10px; display: block;">未搜索到QA信息,请更换关键字或者直接录入到系统!</span>';
- }
- $("#question").html(html);
- $(".dalog-ask").show();
- }else if(type == "m"){
- var msg = "";
- if (data.returnCode == 200) {
- msg = data.returnMsg.complaintQuestionInfoList[0].questionProfile;
- }
- addSmsMsg(msg);
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- /*添加邮寄信息*/
- function addSmsMsg(msg){
- sendAddressSms.addListener("ready", function () {
- // editor准备好之后才可以使用
- sendAddressSms.setContent(msg);
- });
- }
- /**
- * 发送短信
- * @param type 类型: "problem" 问题处理; mailAddress:邮寄地址;
- * @param node 返回结果显示节点
- */
- function sendPhone(type,node){
- var index = layer.load(1, {
- shade: [0.5,'#fff'] //0.1透明度的白色背景
- });
- var desc = "";
- var phone = "";
- var questionId = "";
- var describeTitle = "";
- var smallClassId = ""; /* 客诉问题类型小类id */
- var typeCompany = parseInt($("input:radio[name='typeId']:checked").attr("typeCompany"));
- if(type == "p"){
- phone = $("#p-phone").val();
- questionId = $("#questionId").val();
- describeTitle = $("#describeTitle").val();
- desc = UE.getEditor('describeContentText').getContent();
- smallClassId = $("#smallClassId").val();
- if(smallClassId == null || smallClassId == "" ){
- layer.close(index);
- layer.msg("请选择问题分类!", {icon: 5, time: 3000});
- return false;
- }
- if(describeTitle==null || describeTitle == ""){
- layer.close(index);
- layer.msg("请填写问题标题!", {icon: 5, time: 3000});
- return false;
- }
- if(describeTitle.length > 50){
- layer.close(index);
- layer.msg("问题标题长度不能高于50个字符!", {icon: 5, time: 3000});
- return false;
- }
- if(desc == null || desc == ""){
- layer.close(index);
- layer.msg("请填写问题回复!", {icon: 5, time: 3000});
- return false;
- }
- }else if(type == "m"){
- phone = $("#m-phone").val();
- questionId = complaint_questionId;
- desc = UE.getEditor('sendAddressSms').getContent();
- if(desc == null || desc == ""){
- layer.close(index);
- layer.msg("请填写邮寄信息内容!", {icon: 5, time: 3000});
- return false;
- }
- }else{
- layer.close(index);
- layer.msg("发送报错!", {icon: 5, time: 3000});
- return false;
- }
- var reg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
- if(!reg.test(phone)){
- layer.close(index);
- layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
- return false;
- }
- $.ajax({
- type: "POST",
- data: {
- type : type,
- typeCompany : typeCompany,
- phone : phone,
- questionId : questionId,
- smallClassId : smallClassId,
- questionName : describeTitle,
- questionProfile : desc //回复内容
- },
- url: "${path}/admin/customer/send_phone_sms",
- async: true,
- success: function(data){
- if (data.returnCode == 200) {
- if(type == "p"){
- $("#p-msg").html(data.resultMsg);
- }else if(type == "m"){
- $("#m-msg").html(data.resultMsg);
- }
- }else{
- if(type == "p"){
- $("#p-msg").html(data.resultMsg);
- }else if(type == "m"){
- $("#m-msg").html(data.resultMsg);
- }
- }
- layer.close(index);
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- if(type == "p"){
- $("#p-msg").html("发送短信失败!");
- }else if(type == "m"){
- $("#m-msg").html("发送短信失败!");
- }
- layer.close(index);
- }
- });
- }
- /*保存QA问题*/
- function saveQuestion(){
- var index = layer.load(1, {
- shade: [0.5,'#fff'] //0.1透明度的白色背景
- });
- var desc = "";
- var questionId = "";
- var describeTitle = "";
- var smallClassId = ""; /* 客诉问题类型小类id */
- questionId = $("#questionId").val();
- describeTitle = $("#describeTitle").val();
- desc = UE.getEditor('describeContentText').getContent();
- smallClassId = $("#smallClassId").val();
- if((smallClassId == null || smallClassId == "") && (questionId == null || questionId == "") ){
- layer.close(index);
- layer.msg("请选择问题分类!", {icon: 5, time: 3000});
- return false;
- }
- if(describeTitle==null || describeTitle == ""){
- layer.close(index);
- layer.msg("请填写问题标题!", {icon: 5, time: 3000});
- return false;
- }
- if(desc == null || desc == ""){
- layer.close(index);
- layer.msg("请填写问题回复!", {icon: 5, time: 3000});
- return false;
- }
- $.ajax({
- type: "POST",
- data: {
- questionId : questionId,
- smallClassId : smallClassId,
- questionName : describeTitle,
- questionProfile : desc //回复内容
- },
- url: "${path}/admin/complaintQuestion/save_question",
- async: true,
- success: function(data){
- if (data.returnCode == 200) {
- $("#questionId").val(data.returnMsg.questionId);
- layer.msg(data.resultMsg, {icon: 1, time: 3000});
- }else{
- layer.msg(data.resultMsg, {icon: 5, time: 3000});
- }
- layer.close(index);
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- layer.close(index);
- }
- });
- }
- /***
- * 打开搜索订单框
- */
- function selectOrder(){
- layer_show("搜索订单","${path}/admin/customer/select_order","1000","500");
- }
- /**
- * 显示选择的订单
- */
- function setSelectOrder(orderId){
- if(orderId == null || orderId == "" || typeof (orderId)=="undefined"){
- layer.msg("未选中订单", {icon: 5, time: 3000});
- return false
- }
- var html = '';
- var address = ''; //地址
- var orderItemList = {};
- var companyId = ''; //销售公司
- var storeId = ''; //店铺
- $.ajax({
- type: "POST",
- data: {
- salesId : orderId
- },
- url: "${path}/admin/customer/select_salesOrder",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.salesOrderList.length;i++){
- var salesOrder = data.returnMsg.salesOrderList[i];
- companyId = salesOrder.salesCompanyId;
- storeId = salesOrder.salesStoreId;
- var productsHtml = '';
- var salesOrderItem = salesOrder.salesOrderItemList;
- orderItemList = salesOrder.salesOrderItemList;
- for(var j=0;j<salesOrderItem.length;j++){
- var item = salesOrderItem[j].itemProductName + "*" + salesOrderItem[j].itemNum;
- if(j==0){
- productsHtml += item
- }else{
- productsHtml += '<br>'+ item
- }
- }
- var time = formatDate(new Date(salesOrder.salesCreateTime),"yyyy-MM-dd");
- html += '' +
- ' <td style="text-align: center;">'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
- ' <td style="text-align: center;">'+ salesOrder.salesId +'</td>' +
- ' <td style="text-align: center;">'+ salesOrder.salesAddressName +'</td>' +
- ' <td style="text-align: center;">'+ salesOrder.salesAddressTel +'</td>' +
- ' <td style="text-align: center;">'+ salesOrder.salesAmount/100 +'</td>' +
- ' <td style="text-align: center;">'+ productsHtml +'</td>' +
- ' <td style="text-align: center;">'+ time +'</td>' +
- '';
- //address = '<td colspan="1">收货地址</td><td colspan="6" class="td-manage text-c" >'+ salesOrder.salesAddressInfo +' <a style="color: #0a6999;text-decoration: underline;" href="javascript:void(0);" title="编辑" onclick="updateAdress()">修改地址</a></td>' ;
- address = salesOrder.salesAddressInfo;
- $("#sendName").val(salesOrder.salesAddressName); //收件人名称
- $("#sendTel").val(salesOrder.salesAddressTel); //收件人电话号码
- $("#customerName").val(salesOrder.salesAddressName); //收件人名称
- $("#customerTel").val(salesOrder.salesAddressTel); //收件人电话号码
- }
- // $("#showOrderAddress").html(address);
- }else{
- html = '';
- }
- $("#showOrder").html(html); //显示订单
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- $("#addressInfo").val(address);
- setAdress(); //显示地址
- setProduce(orderItemList); //显示产品
- $("#companyId").val(companyId);
- $("#storeId").val(storeId);
- $("#orderId").val(orderId);
- }
- /**
- * 设置地址
- */
- function setAdress(){
- var addres = $("#addressInfo").val();
- $("#addrssMsg").html("");
- if(addres == null){
- $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
- return;
- }
- var addresList = addres.split("-");
- if(addresList[0] == null || addresList[1]==null || addresList[2]==null || addresList[3]==null){
- $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
- return;
- }
- var proId = setPro(getAddress(addresList[0],0),1);
- var cityId = setCity(getAddress(addresList[1],1),proId,1);
- setDistrict(getAddress(addresList[2],2),cityId,1);
- var sendAddress = addresList[3];
- if(addresList.length > 4){
- for(var k = 4;k< addresList.length;k++){
- sendAddress += addresList[k];
- }
- }
- $("#sendAddress").val(sendAddress);
- }
- /***
- * 删除 “省”,“市”,“区”关键字
- * type : 0:省 2:市 3:区
- */
- function getAddress(addrss,type) {
- var abbreviation = "";
- if(addrss == ""){
- abbreviation = "";
- }else{
- switch(type)
- {
- case 0:
- //var proReg = new RegExp("省","g");
- //abbreviation = addrss.replace(proReg,"");
- abbreviation = addrss.substring(0,2);
- break;
- case 1:
- var cityReg = new RegExp("市","g");
- abbreviation = addrss.replace(cityReg,"");
- cityReg = new RegExp("区","g");
- abbreviation = addrss.replace(cityReg,"");
- break;
- case 2:
- var districtReg = new RegExp("区","g");
- abbreviation = addrss.replace(districtReg,"");
- districtReg = new RegExp("市","g");
- abbreviation = abbreviation.replace(districtReg,"");
- break;
- default:
- break;
- }
- }
- return abbreviation
- }
- /**
- * 设置省
- * type 1:搜索订单赋值 2:只查询全部,默认第一个
- */
- function setPro(provinceName,type) {
- var proId = '';
- var province = listProvince();
- var selectPro = new Array();
- if(type == 1){
- selectPro = listProvince("",provinceName);
- }
- if(province!=null){
- var provinceHtml = ''
- for(var i=0;i<province.length;i++){
- provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
- }
- $("#province").html(provinceHtml);
- if(selectPro != null && selectPro.length > 0 ){
- proId = selectPro[0].provinceId;
- }else{
- proId = province[0].provinceId;
- }
- $("#province option[value='" + proId + "']").attr("selected","true");
- }
- return proId;
- }
- /**
- * 设置市
- * type 1:搜索订单赋值 2:只查询全部,默认第一个
- */
- function setCity(cityName,proId,type) {
- var cityId = '';
- var city = listCity(proId,"");
- var selectCity = new Array();
- if(type == 1){
- selectCity = listCity(proId,cityName);
- }
- if(city!=null){
- var cityHtml = ''
- for(var i=0;i<city.length;i++){
- cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
- }
- $("#city").html(cityHtml);
- if(selectCity != null && selectCity.length > 0 ){
- cityId = selectCity[0].cityId;
- }else{
- cityId = city[0].cityId;
- }
- $("#city option[value='" + cityId + "']").attr("selected","true");
- }
- return cityId;
- }
- /**
- * 设置区
- * type 1:搜索订单赋值 2:只查询全部,默认第一个
- */
- function setDistrict(districtName,cityId,type) {
- var district = listDistrict(cityId,"");
- var selectDistrict = new Array();
- if(type == 1){
- selectDistrict = listDistrict(cityId,districtName);
- }
- if(district!=null){
- var districtHtml = ''
- for(var i=0;i<district.length;i++){
- districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
- }
- var disId = "";
- $("#district").html(districtHtml);
- if(selectDistrict != null && selectDistrict.length > 0 ){
- disId = selectDistrict[0].districtId;
- }else{
- disId = district[0].districtId;
- }
- $("#district option[value='" + disId + "']").attr("selected","true");
- }
- }
- /* TDS收集设置区 */
- var TDSCity = '';
- function linkageSetDistrict(){
- var arrcity_3word = $("#arrcity_3word").val();
- var cityName = '北京';
- for(var i = 0;i<citys.length;i++){
- for(var j=0;j<citys[i].length;j++){
- if(j == 0 && arrcity_3word == citys[i][j]){
- cityName = citys[i][1];
- }
- }
- }
- TDSCity = cityName;
- var selectCity = listCity(null,cityName);
- var cityId = selectCity[0].cityId;
- var selectDistrict = listDistrict(cityId,"");
- var html = '';
- for(var i=0;i<selectDistrict.length;i++){
- html += '<option value="'+ selectDistrict[i].districtId +'">'+ selectDistrict[i].district +'</option>';
- }
- $("#TDSArea").html(html);
- $("#TDSArea").find("option").eq(0).prop("selected",true);
- setTDSCollect();
- }
- /**
- * 展示产品
- * @param orderItemList
- */
- function setProduce(orderItemList) {
- var productList = getProduct() ; //所有产品
- var html = "";
- var productTypeNo = 0;
- for(var i=0;i<productList.length;i++) {
- var product = productList[i];
- var produceFittings = getProduceFittings(product.productId); //获取该产品的所有配件
- var colorList = product.colorList; //该产品的所有颜色
- var productType = product.productType;
- var colorHtml = '';
- if(colorList != null && colorList.length >0 ){
- colorHtml += '<table style="height: 100%;">';
- for(var j=0;j<colorList.length;j++){
- var number = "";
- var color = colorList[j];
- for(var k=0;k<orderItemList.length;k++){
- var item = orderItemList[k];
- if(item.itemColorId == color.colorId && item.itemIsSource == 1){
- number = item.itemNum;
- }
- }
- var fristInputStyle = "border-top: 1px solid #ddd;";
- if(color.colorProductId == product.productId) {
- colorHtml += '<tr >' +
- ' <td width="55" style="border-left: none;text-align: center;'+ fristInputStyle +'">' + color.colorName + '</td>' +
- ' <td width="45" style="'+ fristInputStyle +' padding: 0px;width: 25px;">' +
- ' <input type="hidden" class="input-produce-id" value="' + color.colorProductId + '">' +
- ' <input type="hidden" class="input-color-id" value="' + color.colorId + '">' +
- ' <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="产品数量" id="color-' + color.colorProductId + '-' + color.colorId + '" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)" >' +
- ' </td>' +
- ' </tr>';
- fristInputStyle = "";
- }
- }
- colorHtml += '</table>';
- }else{
- colorHtml += '<span>暂无该产品的颜色!<span>';
- }
- var produceFittingsHtml = '';
- if(produceFittings != null && produceFittings.length > 0){
- produceFittingsHtml += '<table style="height: 100%;">';
- for(var m=0;m<produceFittings.length;m++){
- var number = "";
- var fitt = produceFittings[m];
- for(var k=0;k<orderItemList.length;k++){
- var item = orderItemList[k];
- if(item.itemColorId == fitt.fittingsId && item.itemIsSource == 2){
- number = item.itemNum;
- }
- }
- var produceFit = produceFittings[m];
- if(produceFit.productId == product.productId) {
- var fristInputStyle = "border-top: 1px solid #ddd;";
- produceFittingsHtml += '<tr >' +
- ' <td width="55" style="border-left: none;text-align: center; '+ fristInputStyle +'">' + produceFit.fittingsName +'</td>' +
- ' <td width="45" style="'+ fristInputStyle +'padding: 0px;width: 25px;">' +
- ' <input type="hidden" class="input-produce-id" value="' + produceFit.productId + '">' +
- ' <input type="hidden" class="input-fittings-id" value="' + produceFit.fittingsId +'">' +
- ' <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="配件数量" id="fittings-' + produceFit.productId + '-' + produceFit.fittingsId +'" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)" >' +
- ' </td>' +
- ' </tr>';
- fristInputStyle = "";
- }
- }
- produceFittingsHtml += '</table>';
- }else{
- produceFittingsHtml += '<span>暂无产品配件!<span>';
- }
- var produceHtml = '<input type="hidden" value="'+ product.productId +'">' +
- '<span>'+ product.productName +'</span>';
- html += ' <tr >' +
- ' <td width="80">'+ produceHtml +'</td>' +
- ' <td style="padding: 0px;text-align: center;">' +
- colorHtml +
- ' </td>' +
- ' <td style="padding: 0px;text-align: center;">' +
- produceFittingsHtml +
- ' </td>' +
- '</tr>';
- }
- $("#addProduct").html(html);
- setBackProduct(html); //设置寄回产品
- monitorProduct(); //监听产品变化
- }
- /*获取产品*/
- function getProduct(){
- var productList;
- $.ajax({
- type: "POST",
- data: {
- },
- url: "${path}/admin/customer/select_produce",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- productList = data.returnMsg.productList;
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- return productList;
- }
- /*获取产品配件*/
- function getProduceFittings(productId){
- var produceFittings;
- $.ajax({
- type: "get",
- data: {
- productId : productId
- },
- url: "${path}/admin/customer/select_produce_fittings",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- produceFittings = data.returnMsg.produceFittingsList;
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- return produceFittings;
- }
- /*监听产品变化*/
- function monitorProduct(){
- /*产品数量*/
- $("#addProduct").find(".input-color-number").blur(function (){
- setBackProduct();
- })
- /*产品配件*/
- $("#addProduct").find(".input-fittings-number").blur(function (){
- setBackProduct();
- })
- }
- /*设置寄回产品*/
- function setBackProduct(html) {
- if(html != null && html != "" && typeof(html) != "undefined"){
- $("#back-product").html(html);
- }else{
- $("#addProduct").find(".input-color-number").each(function(){
- var number = $(this).val();
- var colorNodeId = $(this).attr("id");
- $("#back-product").find("#"+colorNodeId).val(number);
- })
- $("#addProduct").find(".input-fittings-number").each(function(){
- var number = $(this).val();
- var fittingsNodeId = $(this).attr("id");
- $("#back-product").find("#"+fittingsNodeId).val(number);
- })
- }
- }
- /*设置TDS收集信息*/
- function setTDSCollect(){
- var TDSArea = $("#TDSArea").find("option:selected").text();
- var TDSAddress = TDSCity + '-' + TDSArea;
- if(TDSAddress != null && TDSAddress != ""){
- $("#DTS-address").html("地址:" + TDSAddress);
- }
- }
- /*TDS联动处理*/
- function TDSLinkage(node,maxNumber,minNumber){
- setTDSCollect();
- var number = 0;
- var c=$(node);
- if(c.val() == ""){
- $(node).val("");
- }else{
- var temp_amount=c.val().replace(/[^\d]/g,'');
- number = Number(temp_amount)
- if(maxNumber!= null && maxNumber!= "" && number > maxNumber){
- number = maxNumber;
- }
- if(minNumber!= null && minNumber!= "" && number < minNumber){
- number = minNumber;
- }
- $(node).val(number);
- }
- var nodeName = $(node).attr("id");
- if(nodeName == "customerInTDS" ){
- $("#DTS-in").html("进水:" + number + " PPM");
- }else if(nodeName == "customerOutTDS" ){
- $("#DTS-out").html("出水:" + number + " PPM");
- }
- }
- </script>
- <script>
- $(function(){
- $("#form-customer-add").Validform({
- tiptype: function (msg, o, cssctl) {
- if (o.type == 3) {//失败
- layer.msg(msg, {icon: 5, time: 3000});
- $(window).scrollTop(o.obj.offset().top - 40);
- }
- },
- datatype: {//自定义验证类型
- },
- ignoreHidden: true,
- tipSweep: true, //若为true,则只在表单提交时验证
- ajaxPost: true, //异步提交
- beforeCheck: function (curform) { //验证通过之前执行的函数
- },
- beforeSubmit: function (curform) { //验证通过之后执行的函数
- var flag = addCustomerReady();
- if(!flag){
- return false;
- }
- },
- callback: function (data) {//异步回调函数
- if (data) {
- var index = layer.alert(data.resultMsg, function (index) {
- if (data.resultCode == 200) {
- location.href = "${path}/admin/customer/select_customer_list";
- } else if(data.resultCode == 505){
- location.href = "${path}/admin/customer/select_customer_list";
- }else {
- layer.close(index);
- }
- });
- }
- }
- });
- })
- /* 添加客诉的准备 */
- function addCustomerReady(){
- /* 录入电话号码和姓名到客诉基本信息里面 */
- if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 5 || allCustomerType == 6 || allCustomerType == 7){
- $("#customerName").val($("#sendName").val());
- $("#customerTel").val($("#sendTel").val());
- }
- /*验证来源入口*/
- var customerSourceType = $("input:radio[name='customerSourceType']:checked").val();
- if(customerSourceType == 3){
- var customerSourceOld = $("#customerSourceOld").val();
- if(customerSourceOld == null || customerSourceOld == "" || typeof(customerSourceOld)=="undefined"){
- vailErrorMsg($("#customerSourceOld"),"未填写来源入口");
- return false;
- }else{
- $("#customerSource").val(customerSourceOld);
- }
- }
- /*根据产品类型,获取来源商城*/
- var typeCompany = parseInt($("input:radio[name='typeId']:checked").attr("typeCompany"));
- $("#typeCompany").val(typeCompany);
- /*----TDS收集模块--start-----*/
- var valicity = $(".ac_result_tip").html();
- if(valicity == null || valicity == "" || typeof(valicity)=="undefined"){
- $("#TDSArea").html("");
- }else if(valicity.indexOf("对不起,找不到") > 0 ){
- $("#TDSArea").html("");
- $("#customerArea").val("");
- }else{
- var TDSArea = $("#TDSArea").find("option:selected").text();
- if(TDSArea != null && TDSArea != ""){
- var area = TDSCity + "-" + TDSArea
- $("#customerArea").val(area);
- }
- }
- /*----TDS收集模块--end-----*/
- /* 地址拼接 */
- var province = $("#province").find("option:selected").text();
- var city = $("#city").find("option:selected").text();
- var district = $("#district").find("option:selected").text();
- var relationSendMergeAddress = province + "-" + city + "-" + district;
- $("#relationSendMergeAddress").val(relationSendMergeAddress);
- /* 地址拼接 */
- /*----问题描述- start --*/
- var describeContentText = UE.getEditor('describeContentText').getContent();
- if(describeContentText == null || describeContentText == ""){
- //layer.msg("未填写问题描述", {icon: 5, time: 3000});
- vailErrorMsg($("#describeTitle"),"未填写问题描述");
- return false;
- }
- $("#describeContent").val(describeContentText);
- /*----问题描述--end-----*/
- /*----处理描述- start --*/
- var describeHandleDescText = UE.getEditor('describeHandleDescText').getContent();
- $("#describeHandleDesc").val(describeHandleDescText);
- /*----处理描述--end-----*/
- /* --- 类型:售后 处理结果:维修/换新/补发/退货/无理由退货 -- 处理产品 start---- */
- var sendProdcues = new Array(); //寄出产品表
- var sendFittings = new Array();
- var closedProdcues = new Array();
- var closedFittings = new Array();
- $("#addProduct").find(".input-color-number").each(function(){
- var number = $(this).val();
- if(number != null && number != "" && number != 0){
- var product = new Object();
- product.productId = $(this).parent().find(".input-produce-id").val();
- product.colorId = $(this).parent().find(".input-color-id").val();
- //换新、维修,退货,无理由退货,
- if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 6 || allCustomerType == 7){
- product.closedProdcueNumber = number;
- closedProdcues.push(product);
- }else if(allCustomerType == 5){
- product.sendProdcueNumber = number;
- sendProdcues.push(product);
- }
- }
- })
- $("#addProduct").find(".input-fittings-number").each(function(){
- var number = $(this).val();
- if(number != null && number != "" && number != 0){
- var fittings = new Object();
- fittings.productId = $(this).parent().find(".input-produce-id").val();
- fittings.fittingsId = $(this).parent().find(".input-fittings-id").val();
- //换新、维修,退货,无理由退货,
- if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 6 || allCustomerType == 7){
- fittings.closedFittingNumber = number;
- closedFittings.push(fittings);
- }else if(allCustomerType == 5){
- fittings.sendFittingNumber = number;
- sendFittings.push(fittings);
- }
- }
- })
- $("#back-product").find(".input-color-number").each(function(){
- var number = $(this).val();
- if(number != null && number != "" && number != 0){
- //换新、维修,
- if(allCustomerType == 3 || allCustomerType == 4){
- var fittings = new Object();
- fittings.productId = $(this).parent().find(".input-produce-id").val();
- fittings.colorId = $(this).parent().find(".input-color-id").val();
- fittings.sendProdcueNumber = number;
- sendProdcues.push(fittings);
- }
- }
- })
- $("#back-product").find(".input-fittings-number").each(function(){
- var number = $(this).val();
- if(number != null && number != "" && number != 0){
- //换新、维修
- if(allCustomerType == 3 || allCustomerType == 4){
- var fittings = new Object();
- fittings.productId = $(this).parent().find(".input-produce-id").val();
- fittings.fittingsId = $(this).parent().find(".input-fittings-id").val();
- fittings.sendFittingNumber = number;
- sendFittings.push(fittings);
- }
- }
- })
- var backErrorMsg = "请选择一个replace_error_msg寄回的产品或配件并填写一个以上的数量!"
- var sendErrorMsg = "请选择一个replace_error_msg寄送的产品或配件并填写一个以上的数量!"
- var process = true;
- switch (allCustomerType){
- case 3:
- process = processIsEmpty([closedProdcues,closedFittings]);
- if(!process){
- var msg = backErrorMsg.replace("replace_error_msg","换新");
- layer.msg(msg, {icon: 5, time: 3000});
- return false;
- }
- process = processIsEmpty([sendProdcues,sendFittings]);
- if(!process){
- var msg = sendErrorMsg.replace("replace_error_msg","换新");
- layer.msg(msg, {icon: 5, time: 3000});
- return false;
- }
- break;
- case 4:
- process = processIsEmpty([closedProdcues,closedFittings]);
- if(!process){
- var msg = backErrorMsg.replace("replace_error_msg","维修");
- layer.msg(msg, {icon: 5, time: 3000});
- return false;
- }
- process = processIsEmpty([sendProdcues,sendFittings]);
- if(!process){
- var msg = sendErrorMsg.replace("replace_error_msg","维修");
- layer.msg(msg, {icon: 5, time: 3000});
- return false;
- }
- break;
- case 5:
- process = processIsEmpty([sendProdcues,sendFittings]);
- if(!process){
- var msg = sendErrorMsg.replace("replace_error_msg","补发");
- layer.msg(msg, {icon: 5, time: 3000});
- return false;
- }
- break;
- case 6:
- process = processIsEmpty([closedProdcues,closedFittings]);
- if(!process){
- var msg = backErrorMsg.replace("replace_error_msg","退货");
- layer.msg(msg, {icon: 5, time: 3000});
- return false;
- }
- break;
- case 7:
- process = processIsEmpty([closedProdcues,closedFittings]);
- if(!process){
- var msg = backErrorMsg.replace("replace_error_msg","退货");
- layer.msg(msg, {icon: 5, time: 3000});
- return false;
- }
- break;
- default:
- break;
- }
- $("#sendProdcues").val(JSON.stringify(sendProdcues));
- $("#sendFittings").val(JSON.stringify(sendFittings));
- $("#closedProdcues").val(JSON.stringify(closedProdcues));
- $("#closedFittings").val(JSON.stringify(closedFittings));
- var visitTimeSelect = $("input[name='visitTimeSelect']:checked").val();
- var visit_date = $('#datemin').val();
- var myDate = new Date();
- var date = myDate.getFullYear()+"-"+(myDate.getMonth()+1)+"-"+myDate.getDate();
- var hours = myDate.getHours();
- //如果两个时间相等,则判断可选的回访时间
- if(Date.parse(visit_date) == Date.parse(date)){
- var msg = "该时间已超过当前时间,请重新选择回访时间!";
- if (hours > 12 && visitTimeSelect == 1) {
- vailErrorMsg($("#datemin"),msg);
- return false;
- } else if (hours > 14 && visitTimeSelect == 2) {
- vailErrorMsg($("#datemin"),msg);
- return false;
- } else if (hours > 18 && visitTimeSelect == 3) {
- vailErrorMsg($("#datemin"),msg);
- return false;
- }
- }
- return true;
- }
- /* 判断产品与配件是否填入值 */
- function processIsEmpty(process){
- if(process != null && process != "" && process.length > 0){
- var flag = 2;
- var num = 0;
- if(process[0] == null || process[0].length < 1 ){
- flag -- ;
- }
- if(process[1] == null || process[1].length < 1 ){
- flag -- ;
- }
- for(var j=0; j<process.length;j++){
- for(var i=0;i<process[j].length;i++){
- if(process[j][i].sendProdcueNumber !== undefined){
- num += process[j][i].sendProdcueNumber;
- }
- if(process[j][i].sendFittingNumber !== undefined){
- num += process[j][i].sendFittingNumber;
- }
- if(process[j][i].closedProdcueNumber !== undefined){
- num += process[j][i].closedProdcueNumber ;
- }
- if(process[j][i].closedFittingNumber !== undefined){
- num += process[j][i].closedFittingNumber;
- }
- }
- }
- if(flag == 0){
- return false;
- }
- if(num == 0){
- return false;
- }
- }
- return true;
- }
- </script>
- <!--/请在上方写此页面业务相关的脚本-->
- </body>
- </html>
|