123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220 |
- <!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/save_customer" method="post" class="form form-horizontal" id="form-customer-add" onkeydown="if(event.keyCode==13)return false;">
- <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">
- </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" datatype="*" checked nullmsg="请选择来源入口!">
- <label for="tel-1">400电话</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-2" name="customerSourceType" value="2">
- <label for="tel-2">微信公众号</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-3" name="customerSourceType" value="3">
- <label for="tel-3">其他</label>
- <input type="text" style="width: 321px;margin-left: 10px; display: none;" class="input-text" value="" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">
- <input type="hidden" value="" 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" >
- <label for="customer-type-1">售前咨询</label>
- </div>
- <div class="radio-box">
- <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2" checked>
- <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">
- <#--<div class="radio-box">
- <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
- <label for="tel-3">净水机</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
- <label for="tel-4">冲奶机</label>
- </div>-->
- </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>
- <#--<option value="0">使用操作</option>-->
- <#--<option value="1">使用操作</option>-->
- </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>
- <#--<option value="0">使用操作制水出水</option>
- <option value="1">使用操作制水出水</option>-->
- </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">
- </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="">
- </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="" 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%">
- <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" >
- <label for="customer-process-1">已解决</label>
- </div>
- <div class="radio-box" id="noSolved">
- <input type="radio" id="customer-process-2" value="2" name="customerIsSolve">
- <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" checked>
- <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" >
- <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">
- <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">
- <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">
- <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>
- <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;">姓名</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;" colspan="7">暂未选择订单</td>
- </tr>
- </table>
- <input type="hidden" id="companyId" name="companyId" value="" >
- <input type="hidden" id="storeId" name="storeId" value="" >
- <input type="hidden" id="orderId" name="salesId" value="" >
- </div>
- </div>
- <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="" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="s1-20" errormsg="联系人格式不正确!" >
- </div>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text" value="" 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="" 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" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)"></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">
- <tr id="showOrder">
- <td style="text-align: center;" colspan="3">请选择订单之后再选择产品</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="row cl" id="TDScollect" style="display: none;">
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>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" />
- <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">
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text" value="" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
- </div>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text" value="" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="keyFun($(this),999)" onpaste="keyFun($(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"></span>
- <span id="DTS-in"></span> <span id="DTS-out"></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">
- <tr id="showOrder">
- <td style="text-align: center;" colspan="3">请选择订单之后再选择产品</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-1 col-sm-1">处理描述:</label>
- <div class="formControls col-5 col-sm-5">
- <script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
- </script>
- <input type="hidden" id="describeHandleDesc" name="describeHandleDesc">
- </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" >
- <label for="customer-visit-1">需要回访</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="customer-visit-2" name="customerIsVisit" value="1" checked>
- <label for="customer-visit-2">不需要回访</label>
- </div>
- </div>
- </div>
- <div id="needToVisit" style="display: none;">
- <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="" placeholder="填写回访人姓名" id="" name="visitName" datatype="s1-20" errormsg="回访人姓名格式不正确!" >
- </div>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text associated-phone" value="" 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" 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" checked>
- <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">
- <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">
- <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">
- </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 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 /*去掉元素路径*/
- });
- /*邮寄地址*/
- 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 : [["退回产品","退回产品颜色","退回产品配件"],[]]
- }
- /*个人id*/
- var adminId = 0;
- /* 咨询类型 1:售前咨询 2:售后咨询 3:其他 */
- var allCustomerInfoType;
- /*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
- var allCustomerType = 1;
- var allCustomerTypeName = ["已解决","未解决","换新","维修","补发","退货","无理由退货"];
- /* 寄回地址的id */
- var complaint_questionId = 5;
- /* 用于判断是否第一次初始化省市区-- 只在选择类型为售后时使用 */
- var isInitAddress = 0;
- /*初始化页面参数*/
- $(function () {
- /* 初始化单选框样式 */
- //initCheck();
- /*初始化产品类型 -- 客诉头部的产品类型单选 */
- initProduceType();
- /*初始化问题分类*/
- initComplaintTypeInfo();
- /*初始化客服*/
- initSysAdmin();
- /*初始化回访客服*/
- initVisitSysAdmin();
- /*初始化选择处理结果 -- type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货 */
- initProcessResult(3);
- /*监听来源入口选择事件*/
- $("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());
- 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");
- }
- })
- }
- /*关闭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(1 == type){ //不需要回访
- $("#customer-visit-2").prop("checked",true); //不需要回访
- initCheckByNode($("#customer-visit-2"));
- $("#needToVisit").css("display","none");
- }else{
- $("#customer-visit-1").prop("checked",true); //需要回访
- initCheckByNode($("#customer-visit-1"));
- $("#needToVisit").css("display","block");
- }
- initVisitEvent();
- }
- // function keyFun(node){
- // var c=$(node);
- // var temp_amount=c.val().replace(/[^\d]/g,'');
- // $(node).val(Number(temp_amount));
- // }
- /*初始化客服*/
- 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 == 0){
- var proId = setPro(null,2);
- var cityId = setCity(null,proId,2);
- setDistrict(null,cityId,2);
- isInitAddress = 1;
- }
- $("#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;
- }
- /* 根据处理类型来切换 产品列表的列名称 */
- 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){
- 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);
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- }
- /**
- * 搜索QA 显示
- * type p:问题qa; m:邮寄qa
- */
- function initComplaintQuestionInfo(type){
- var complaintId;
- var smallClassId;
- var questionName;
- var questionId;
- if(type == "p"){
- complaintId = $("[name='complaintId']").val();
- smallClassId = $("[name='smallClassId']").val();
- questionName = $("[name='questionIdMsg']").val();
- }else if(type == "m"){
- questionId = complaint_questionId;
- }
- $.ajax({
- type: "POST",
- data: {
- complaintId : complaintId,
- smallClassId : smallClassId,
- questionName : questionName,
- 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="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(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>'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
- ' <td>'+ salesOrder.salesId +'</td>' +
- ' <td>'+ salesOrder.salesAddressName +'</td>' +
- ' <td>'+ salesOrder.salesAddressTel +'</td>' +
- ' <td>'+ salesOrder.salesAmount/100 +'</td>' +
- ' <td>'+ productsHtml +'</td>' +
- ' <td>'+ 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){
- sendAddress += addresList[4];
- }
- $("#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,"");
- break;
- case 1:
- var cityReg = new RegExp("市","g");
- abbreviation = addrss.replace(cityReg,"");
- break;
- case 2:
- var districtReg = new RegExp("市","g");
- abbreviation = addrss.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].cityId;
- }else{
- disId = district[0].cityId;
- }
- $("#city 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){
- number = item.itemNum;
- }
- }
- var fristInputStyle = "border-top: 1px solid #ddd;";
- if(color.colorProductId == product.productId) {
- colorHtml += '<tr >' +
- ' <td width="85" style="border-left: none;text-align: center;'+ fristInputStyle +'">' + color.colorName + '</td>' +
- ' <td width="15" 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="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
- ' </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 produceFit = produceFittings[m];
- if(produceFit.productId == product.productId) {
- var fristInputStyle = "border-top: 1px solid #ddd;";
- produceFittingsHtml += '<tr >' +
- ' <td width="85" style="border-left: none;text-align: center; '+ fristInputStyle +'">' + produceFit.fittingsName +'</td>' +
- ' <td width="15" 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="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
- ' </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);
- // initCheck(); //因为需要展示产品,所以再次初始化多选框
- 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{
- return false;
- // $("#addProduct").find(".input-color-number").each(function(){
- // var number = $(this).val();
- // if(number != null && number != ""){
- // 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 != ""){
- // 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);
- // }
- // }
- // })
- }
- }
- /*设置TDS收集信息*/
- function setTDSCollect(){
- var TDSArea = $("#TDSArea").find("option:selected").text();
- var TDSAddress = TDSCity + '-' + TDSArea;
- if(TDSAddress != null && TDSAddress != ""){
- $("#DTS-address").html("地址:" + TDSAddress);
- var customerInTDS = $("#customerInTDS").val();
- var customerOutTDS = $("#customerOutTDS").val()
- if(customerInTDS != null && customerInTDS != "" && customerOutTDS != null && customerOutTDS != ""){
- $("#DTS-in").html("进水:" + customerInTDS + " PPM");
- $("#DTS-out").html("出水:" + customerOutTDS + " 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 () {
- if (data.resultCode == 200) {
- location.href = "${path}/admin/customer/select_customer_list";
- } else {
- layer.close(index);
- }
- });
- }
- }
- });
- })
- /* 添加客诉的准备 */
- function addCustomerReady(){
- /*验证来源入口*/
- 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});
- 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 != ""){
- 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 != ""){
- 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 != ""){
- //换新、维修,
- 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 != ""){
- //换新、维修
- 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 process = true;
- switch (allCustomerType){
- case 3:
- process = processIsEmpty([closedProdcues,closedFittings]);
- if(!process){
- layer.msg("请选择一个换新寄回的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
- return false;
- }
- process = processIsEmpty([sendProdcues,sendFittings]);
- if(!process){
- layer.msg("请选择一个换新寄送的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
- return false;
- }
- break;
- case 4:
- process = processIsEmpty([closedProdcues,closedFittings]);
- if(!process){
- layer.msg("请选择一个维修寄回的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
- return false;
- }
- process = processIsEmpty([sendProdcues,sendFittings]);
- if(!process){
- layer.msg("请选择一个维修寄送的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
- return false;
- }
- break;
- case 5:
- process = processIsEmpty([sendProdcues,sendFittings]);
- if(!process){
- layer.msg("请选择一个补发寄送的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
- return false;
- }
- break;
- case 6:
- process = processIsEmpty([closedProdcues,closedFittings]);
- if(!process){
- layer.msg("请选择一个退货寄回的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
- return false;
- }
- break;
- case 7:
- process = processIsEmpty([closedProdcues,closedFittings]);
- if(!process){
- layer.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));
- 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>
|