12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031 |
- <!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/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
- <link href="${path}/common/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
- <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
- <link href="${path}/common/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
- <style>
- #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(images/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
- .select-box{background: url(${path}/common/images/pts/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;}
- .table-bg th{background-color: #e2f6ff;}
- .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
- .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 20px;background-color: #32a3d8;color: #fff;}
- .clearfix:after{content:"\20";display:block;height:0;clear:both;visibility:hidden}.clearfix{zoom:1}
- .tabBar {border-bottom: 2px solid #222}
- .tabBar span {background-color: #e8e8e8;cursor: pointer;display: inline-block;float: left;font-weight: bold;height: 30px;line-height: 30px;padding: 0 15px}
- .tabBar span.current{background-color: #222;color: #fff}
- .tabCon {display: none}
- </style>
- <title></title>
- </head>
- <body>
- <article class="cl pd-20">
- <form action="" method="post" class="form form-horizontal" id="form-update-renewed" name="form-update-renewed">
- <div class="row cl" style="margin-left: -60px;margin-bottom: 20px;">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>当前进度</strong>
- </div>
- <div class="formControls col-10 col-sm-10">
- <input type="hidden" id="relationId" name="relationId" seleType="primary"/>
- <span id="relationSchedule" class="c-red"></span>
- </div>
- </div>
- <div id="tab_demo" class="HuiTab">
- <div class="tabBar clearfix">
- <#if procMethod.procMethodIsBack == 1>
- <span>寄回信息</span>
- <span>邮费信息</span>
- </#if>
- <#if procMethod.procMethodIsSend == 1>
- <span>寄送信息</span>
- </#if>
- <#if procMethod.procMethodIsBack == 1>
- <span>工厂检查信息</span>
- <span>工厂返修进度</span>
- </#if>
- </div>
- <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
- <div class="row cl">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>产品寄回</strong>
- </div>
- <div class="formControls col-8 col-sm-8 skin-minimal">
- <div class="radio-box">
- <input type="radio" id="tel-3" name="relationBackStatus" value="1" seleType="send">
- <label for="tel-3">未寄回</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-4" name="relationBackStatus" value="2" seleType="send">
- <label for="tel-4">已寄回</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-5" name="relationBackStatus" value="4" seleType="send">
- <label for="tel-5">签收待确认</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-6" name="relationBackStatus" value="3" seleType="send">
- <label for="tel-6">已收货</label>
- </div>
- </div>
- </div>
- <div class="row cl" id="backLogisticsInfo">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>寄回信息</strong>
- </div>
- <div class="formControls col-4 col-sm-4">
- <div style="width: 100%;display: inline-block;margin-right: 10px;">
- <span class="select-box">
- <select name="relationBackLogisticsCompany" id="relationBackLogisticsCompany" class="select" seleType="send">
- <option value="">物流公司</option>
- <option value="sto">申通快递</option>
- <option value="yto">圆通快递</option>
- <option value="sf">顺丰快递</option>
- <option value="ems">邮政EMS</option>
- <option value="zto">中通快递</option>
- <option value="zjs">宅急送</option>
- <option value="yunda">韵达快递</option>
- <option value="cces">cces快递</option>
- <option value="pick">上门提货</option>
- <option value="htky">汇通快递</option>
- <option value="ttkdex">天天快递</option>
- <option value="stars">星晨急便</option>
- <option value="jd">京东快递</option>
- <option value="dbkd">德邦快递</option>
- <option value="01">其他</option>
- <option value="02">上门送货</option>
- <option value="lianhaowuliu">联昊通</option>
- </select>
- </span>
- </div>
- </div>
- <div class="formControls col-4 col-sm-4">
- <input style="margin-right: 10px;" type="text" class="input-text" value="" placeholder="请输入快递单号" id="relationBackLogisticsNo" name="relationBackLogisticsNo" seleType="send">
- <#--<input style="width: 150px;margin-right: 10px;" type="text" class="input-text" value="" placeholder="寄回邮费" id="renewedBackPostage" name="renewedBackPostage">
- <input style="width: 150px;" type="text" class="input-text" value="" placeholder="用户支付宝账户" id="renewedAlipay" name="renewedAlipay">-->
- </div>
- </div>
- <div class="row cl" style="position: relative;" id="backUserInfo">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>寄件信息</strong>
- </div>
- <div class="formControls col-4 col-sm-4">
- <input type="text" class="input-text" value="" placeholder="寄件人姓名" id="relationBackName" name="relationBackName" seleType="send">
- </div>
- <div class="formControls col-4 col-sm-4">
- <input type="text" class="input-text" value="" placeholder="寄件人电话" id="relationBackTel" name="relationBackTel" seleType="send">
- </div>
- </div>
- <div class="row cl" style="position: relative;/*display: none;*/">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>仓库签收时间</strong>
- </div>
- <div class="formControls col-4 col-sm-4">
- <input type="text" placeholder="请选择仓库签收时间" id="relationBackReceiptDate" name="relationBackReceiptDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" readonly="readonly" seleType="send">
- </div>
- </div>
- <div class="row cl">
- <div class="formControls col-2 col-sm-2">
- </div>
- <div class="formControls col-8 col-sm-8 text-c">
- <button onClick="update_relation_info(1);" class="btn btn-primary" type="button">确认修改</button>
- </div>
- </div>
- </div>
- <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
- <div class="row cl" id="backTransferInfo">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>邮费处理</strong>
- </div>
- <div class="formControls col-8 col-sm-8 skin-minimal">
- <div class="radio-box">
- <input type="radio" id="tel-6" name="relationIsTransfer" value="0" seleType="postage">
- <label for="tel-6">不需要转账</label>
- </div>
- <#--<div class="radio-box">-->
- <#--<input type="radio" id="tel-10" name="renewedIsTransfer" value="10" seleType="postage">-->
- <#--<label for="tel-10">需要转账</label>-->
- <#--</div>-->
- <div class="radio-box">
- <input type="radio" id="tel-7" name="relationIsTransfer" value="1" seleType="postage">
- <label for="tel-7">已转账</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-8" name="relationIsTransfer" value="2" seleType="postage">
- <label for="tel-8">已申请待转账</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-9" name="relationIsTransfer" value="3" seleType="postage">
- <label for="tel-9">未申请</label>
- </div>
- </div>
- </div>
- <div class="row cl" id="postageInformation">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>邮费信息</strong>
- </div>
- <div class="formControls col-9 col-sm-9 text-r">
- <div class="formControls col-4 col-sm-4 text-r" style="padding-left: 0px;">
- <input type="text" class="input-text" value="" placeholder="寄回邮费" id="relationBackPostage" name="relationBackPostage" seleType="postage">
- </div>
- <div class="formControls col-4 col-sm-4 text-r" style="padding-left: 0px;">
- <input type="text" class="input-text" value="" placeholder="用户支付宝账户" id="relationAlipay" name="relationAlipay" seleType="postage">
- </div>
- <div class="formControls col-4 col-sm-4 text-r" style="padding-left: 0px;">
- <input type="text" class="input-text" value="" placeholder="用户支付宝姓名" id="relationAlipayName" name="relationAlipayName" seleType="postage">
- </div>
- </div>
- </div>
- <div class="row cl">
- <div class="formControls col-2 col-sm-2">
- </div>
- <div class="formControls col-8 col-sm-8 text-c">
- <button onClick="update_relation_info(2);" class="btn btn-primary" type="button">确认修改</button>
- </div>
- </div>
- </div>
- <div <#if procMethod.procMethodIsSend == 1>class="tabCon"</#if>style="display: none;">
- <div class="row cl">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>是否寄出</strong>
- </div>
- <div class="formControls col-10 col-sm-10 skin-minimal">
- <div class="radio-box">
- <input type="radio" id="tel-10" name="relationSendStatus" value="1" seleType="sendInformation">
- <label for="tel-10">未寄出</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-11" name="relationSendStatus" value="2" seleType="sendInformation">
- <label for="tel-11">已寄出</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="tel-12" name="relationSendStatus" value="3" seleType="sendInformation">
- <label for="tel-12">已收货</label>
- </div>
- </div>
- </div>
- <div class="row cl">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>Efast订单号</strong>
- </div>
- <div class="formControls col-5 col-sm-5">
- <input type="text" class="input-text" value="" placeholder="Efast订单号" id="relationBackEfastOrderId" name="relationBackEfastOrderId" seleType="sendInformation">
- </div>
- </div>
- <#--<div class="row cl">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>寄出产品</strong>
- </div>
- <div class="formControls col-10 col-sm-10">
- <div class="update-parts" id="sendProduct"></div>
- </div>
- </div>
- <div class="row cl">
- <div class="formControls col-2 col-sm-2">
- </div>
- <div class="formControls col-10 col-sm-10">
- (如需修改,在Efast系统作废订单,重新生成订单,并与此处修改Efast重新生成的订单号!)
- </div>
- </div>-->
- <div class="row cl" id="sendUserInfo">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>用户信息</strong>
- </div>
- <div class="formControls col-5 col-sm-5">
- <input type="text" class="input-text" placeholder="填写收件人姓名" id="relationSendName" name="relationSendName" seleType="sendInformation">
- </div>
- <div class="formControls col-5 col-sm-5">
- <input type="text" class="input-text" placeholder="填写收件人手机号" id="relationSendTel" name="relationSendTel" seleType="sendInformation">
- </div>
- </div>
- <div class="row cl" id="sendAddressInfo">
- <div class="formControls col-2 col-sm-2 text-r">
- </div>
- <div class="formControls col-10 col-sm-10">
- <div style="width: 188px;display: inline-block;margin-right: 20px;">
- <span class="select-box" style="padding-right: 0px;">
- <select name="provinceNumber" id="provinceNumber" class="select" seleType="sendInformation"></select>
- </span>
- </div>
- <div style="width: 188px;display: inline-block;margin-right: 20px;">
- <span class="select-box" style="padding-right: 0px;">
- <select name="cityNumber" id="cityNumber" class="select" seleType="sendInformation"></select>
- </span>
- </div>
- <div style="width: 189px;display: inline-block;">
- <span class="select-box" style="padding-right: 0px;">
- <select name="areaNumber" id="areaNumber" class="select" seleType="sendInformation"></select>
- <input type="hidden" id="merge_address" name="merge_address" seleType="sendInformation">
- </span>
- </div>
- </div>
- </div>
- <div class="row cl" id="sendaddressDescInfo">
- <label class="form-label col-2 col-sm-2"></label>
- <div class="formControls col-10 col-sm-10">
- <input type="text" class="input-text" placeholder="请填写详细地址" id="relationSendAddress" name="relationSendAddress" seleType="sendInformation">
- </div>
- </div>
- <div class="row cl" id="sendLogisticsInfo">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>寄出信息</strong>
- </div>
- <div class="formControls col-10 col-sm-10">
- <div style="width: 300px;display: inline-block;margin-right: 10px;">
- <span class="select-box">
- <select name="relationSendLogisticsCompany" id="relationSendLogisticsCompany" class="select" seleType="sendInformation">
- <option value="">物流公司</option>
- <option value="sto">申通快递</option>
- <option value="yto">圆通快递</option>
- <option value="sf">顺丰快递</option>
- <option value="ems">邮政EMS</option>
- <option value="zto">中通快递</option>
- <option value="zjs">宅急送</option>
- <option value="yunda">韵达快递</option>
- <option value="cces">cces快递</option>
- <option value="pick">上门提货</option>
- <option value="htky">汇通快递</option>
- <option value="ttkdex">天天快递</option>
- <option value="stars">星晨急便</option>
- <option value="jd">京东快递</option>
- <option value="dbkd">德邦快递</option>
- <option value="02">上门送货</option>
- <option value="lianhaowuliu">联昊通</option>
- </select>
- </span>
- </div>
- <input style="width: 300px;" type="text" class="input-text" value="" placeholder="快递单号" id="relationSendLogisticsNo" name="relationSendLogisticsNo" seleType="sendInformation">
- </div>
- </div>
- <div class="row cl" id="sendDescInfo">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>寄出备注</strong>
- </div>
- <div class="formControls col-10 col-sm-10">
- <input type="text" class="input-text" placeholder="寄出备注" id="relationDesc" name="relationDesc" seleType="sendInformation">
- </div>
- </div>
- <div class="row cl">
- <div class="formControls col-2 col-sm-2">
- </div>
- <div class="formControls col-8 col-sm-8 text-c">
- <button onClick="update_relation_info(3);" class="btn btn-primary" type="button">确认修改</button>
- </div>
- </div>
- </div>
- <#if procMethod.procMethodIsBack == 1>
- <div class="tabCon">
- <div class="row cl" style="margin-left: -70px;">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>QC进度</strong>
- </div>
- <div class="formControls col-10 col-sm-10">
- <table class="table table-border table-bg table-bordered">
- <tbody class="text-c" id="detect_table"><tr>
- <th>工厂检测现象</th><th>故障分类</th><th>故障原因</th><th>判定结果</th><th>故障指向</th><th>原因分析</th><th>生产维修</th>
- </tr>
- </tbody></table>
- </div>
- </div>
- </div>
- <div class="tabCon">
- <div class="row cl" style="margin-left: -70px;">
- <div class="formControls col-2 col-sm-2 text-r">
- <strong>返修进度</strong>
- </div>
- <div class="formControls col-10 col-sm-10">
- <table class="table table-border table-bg table-bordered">
- <tbody class="text-c" id="maintenance_table"><tr>
- <th>是否可返修</th><th>返修内容</th><th>返修日期</th>
- </tr>
- </tbody></table>
- </div>
- </div>
- </div>
- </#if>
- </div>
- <input type="hidden" id="customerId" name="customerId" value="${customerId!''}" seleType="primary">
- </form>
- </article>
- <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
- <script type="text/javascript">
- //产品类型
- var productType = null;
- $(function(){
- $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0")});
- // #tab_demo 父级id
- // #tab_demo .tabBar span 控制条
- // #tab_demo .tabCon 内容区
- // click 事件 点击切换,可以换成mousemove 移动鼠标切换
- // 1 默认第2个tab为当前状态(从0开始)
- var mobile= /^1(3|4|5|7|8)\d{9}$/; //手机号码
- var uname = /^[\u4e00-\u9fa5a-zA-Z]{1,12}$/; //中文英文
- var money = /^(0{1}|([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/;//金额
- $(function(){
- $('.skin-minimal input').iCheck({
- checkboxClass: 'icheckbox-blue',
- radioClass: 'iradio-blue',
- increaseArea: '20%'
- });
- get_cmRelation_info();
- showUpdateSendProduct();
- get_product_type();
- /*/!* 监听寄回状态按钮 *!/
- $("input[name='renewedBackStatus']").change(function (){
- initBackInfo($(this).val());
- })
- /!* 监听寄出状态按钮 *!/
- $("input[name='renewedSendStatus']").change(function (){
- initSendInfo($(this).val());
- })
- /!* 监听邮费状态按钮 *!/
- $("input[name='renewedIsTransfer']").change(function (){
- initPostageInfo($(this).val());
- })*/
- });
- /*/!*初始化寄回信息*!/
- function initBackInfo(statusCode){
- if(statusCode == 1){
- $("#backLogisticsInfo").hide();
- /!*$("#backTransferInfo").hide();*!/
- $("#backUserInfo").hide();
- }else{
- $("#backLogisticsInfo").show();
- $("#backTransferInfo").show();
- $("#backUserInfo").show();
- }
- }
- /!*显示隐藏邮费信息*!/
- function initPostageInfo(statusCode){
- if(statusCode == 1){
- $("#postageInformation").show();
- }else{
- $("#postageInformation").hide();
- }
- }
- /!*初始化寄出信息*!/
- function initSendInfo(statusCode){
- if(statusCode == 1){
- $("#sendUserInfo").hide();
- $("#sendAddressInfo").hide();
- $("#sendaddressDescInfo").hide();
- $("#sendLogisticsInfo").hide();
- $("#sendDescInfo").hide();
- }else{
- $("#sendUserInfo").show();
- $("#sendAddressInfo").show();
- $("#sendaddressDescInfo").show();
- $("#sendLogisticsInfo").show();
- $("#sendDescInfo").show();
- }
- }*/
- /*显示所有产品及配件信息*/
- function showUpdateSendProduct() {
- var productList = getProduct() ; //所有产品
- var html = "";
- if(productList == null){
- return false;
- }
- for(var i=0;i<productList.length;i++) {
- var product = productList[i];
- var produceFittings = product.fittingsList; //获取该产品的所有配件
- var colorList = product.colorList; //该产品的所有颜色
- 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="75" class="input-color-name" style="border-left: none;text-align: center;'+ fristInputStyle +'">' + color.colorName + '</td>' +
- ' <td width="25" style="'+ fristInputStyle +'">' +
- ' <input type="hidden" class="input-produce-id" value="' + color.colorProductId + '">' +
- ' <input type="hidden" class="input-color-id" value="' + color.colorId + '">' +
- ' <input type="hidden" class="input-produce-name" value="' + product.productName + '">' +
- ' <input type="text" class="input-text input-color-number number-input" style="width: 100%;" value="'+ number +'" placeholder="产品数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
- ' </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="75" class="input-fittings-name" style="border-left: none;text-align: center; '+ fristInputStyle +'">' + produceFit.fittingsName +'</td>' +
- ' <td width="25" style="'+ fristInputStyle +'">' +
- ' <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%;" 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="70">'+ produceHtml +'</td>' +
- ' <td style="padding: 0px;text-align: center;">' +
- colorHtml +
- ' </td>' +
- ' <td style="padding: 0px;text-align: center;">' +
- produceFittingsHtml +
- ' </td>' +
- '</tr>';
- }
- html += '<tr><td colspan="3" style="text-align: center;"><button onClick="hideProductList();" class="btn btn-primary" type="button">确认</button></td></tr>'
- $("#addProduct").html(html);
- }
- function showProductList() {
- $('#produceSelect').show();
- }
- function hideProductList() {
- var txt_product = '';
- var color_numbers = '';
- var fittings_numbers = '';
- $("#addProduct").find(".input-color-number").each(function(){
- var number = $(this).val();
- if(number != null && number != ""){
- var productId = $(this).parent().find(".input-produce-id").val();
- var colorId = $(this).parent().find(".input-color-id").val();
- var productName = $(this).parent().find(".input-produce-name").val();
- //var colorName = $(this).parent().find(".input-color-name").val();
- //封装更换的所有产品
- color_numbers += productId + ':' + colorId + ":" + number + ",";
- txt_product += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ productName + '*' + number + '台</span>';
- }
- });
- $("#addProduct").find(".input-fittings-number").each(function(){
- var number = $(this).val();
- if(number != null && number != ""){
- var productId = $(this).parent().find(".input-produce-id").val();
- var fittingsId = $(this).parent().find(".input-fittings-id").val();
- var fittingsName = $(this).parent().parent().find(".input-fittings-name").html();
- //var colorName = $(this).parent().find(".input-color-name").val();
- //封装更换的所有产品
- fittings_numbers += productId + ':' + fittingsId + ":" + number + ",";
- txt_product += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ fittingsName + '*' + number + '件</span>';
- }
- })
- $('#renewedProduct').html(txt_product);
- $('#closed_products').val(color_numbers);
- $('#closed_fittings').val(fittings_numbers);
- $('#produceSelect').hide();
- }
- /*获取产品*/
- function getProduct(){
- var productList;
- var productName = $("#selectProcuct").val();
- if(productName == null || productName == ""){
- var productTable = '<td colspan="3">暂无数据!</td>';
- $("#addProduct").html(productTable);
- return null;
- }
- $.ajax({
- type: "POST",
- data:{'productName':productName},
- url: "${path}/admin/signclosed/select_product",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- $("#addProduct").html("");
- productList = data.returnMsg.productList;
- }else{
- var productTable = '<td colspan="3">暂无数据!</td>';
- $("#addProduct").html(productTable);
- return null;
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- return productList;
- }
- /*获取换新信息*/
- function get_cmRelation_info() {
- $.ajax({
- cache: true,
- type: "POST",
- data: {"customerId":${customerId}},
- url: "${path}/admin/customer/get_cmRelation_info",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- var relation = data.returnMsg.cmRelation;
- console.log(relation);
- getProvince('provinceNumber');
- getCity('cityNumber',relation.provinceNumber);
- getDistrict('areaNumber',relation.cityNumber);
- var relationSchedule = '';
- switch (relation.relationBackStatus) {
- case 1:relationSchedule += '未寄回,';break;
- case 2:relationSchedule += '已寄回,';break;
- case 3:relationSchedule += '已收货,';break;
- }
- switch (relation.relationSendStatus) {
- case 1:relationSchedule += '未寄出';break;
- case 2:relationSchedule += '已寄出';break;
- case 3:relationSchedule += '已收货';break;
- }
- var relationProduct = '';
- if (relation.closedProdcues != null && relation.closedProdcues.length > 0) {
- $.each(relation.closedProdcues,function(index,element){
- relationProduct += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ this.closedProductName + '*' + this.closedProdcueNumber + '台</span>';
- })
- }
- if (relation.closedFittings != null && relation.closedFittings.length > 0) {
- $.each(relation.closedFittings,function(index,element){
- relationProduct += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ this.closedFittingsName + '*' + this.closedFittingNumber + '件</span>';
- })
- }
- $('#relationProduct').html(relationProduct);
- var sendProduct = '';
- if (relation.sendProdcues != null && relation.sendProdcues.length > 0) {
- $.each(relation.sendProdcues,function(index,element){
- sendProduct += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ this.sendProduceName + '*' + this.sendProdcueNumber + '台</span>';
- })
- }
- if (relation.sendFittings != null && relation.sendFittings.length > 0) {
- $.each(relation.sendFittings,function(index,element){
- sendProduct += '<span style="margin-bottom: 10px;display: inline-block;float: left;">'+ this.sendFittingsName + '*' + this.sendFittingNumber + '件</span>';
- })
- }
- $('#sendProduct').html(sendProduct);
- $('#relationId').val(relation.relationId);
- $('input[name="relationBackStatus"]').each(function(){
- if (this.value == relation.relationBackStatus) {
- $(this).iCheck('check');
- }
- });
- $('input[name="relationSendStatus"]').each(function(){
- if (this.value == relation.relationSendStatus) {
- $(this).iCheck('check');
- }
- });
- /*/!*初始化寄回信息*!/
- initBackInfo(renewed.renewedBackStatus);
- /!*初始化寄出信息*!/
- initSendInfo(renewed.renewedSendStatus);
- //初始化邮费信息
- initPostageInfo(renewed.renewedIsTransfer);*/
- $('#relationSchedule').html(relationSchedule);
- $("#relationBackLogisticsCompany option[value='" + relation.relationBackLogisticsCompany + "']").attr("selected","true");
- $("#relationSendLogisticsCompany option[value='" + relation.relationSendLogisticsCompany + "']").attr("selected","true");
- $("#provinceNumber option[value='" + relation.provinceNumber + "']").attr("selected","true");
- $("#cityNumber option[value='" + relation.cityNumber + "']").attr("selected","true");
- $("#areaNumber option[value='" + relation.areaNumber + "']").attr("selected","true");
- $('#relationBackLogisticsNo').val(relation.relationBackLogisticsNo);
- $('#relationBackPostage').val(relation.relationBackPostage/100);
- $('#relationAlipay').val(relation.relationAlipay);
- $('#relationAlipayName').val(relation.relationAlipayName);
- $('input[name="relationIsTransfer"]').each(function(){
- if (this.value == relation.relationIsTransfer) {
- $(this).iCheck('check');
- }
- });
- $('#relationBackName').val(relation.relationBackName);
- $('#relationBackTel').val(relation.relationBackTel);
- //$('#renewedBackMachineNo').val(renewed.renewedBackMachineNo);
- $('#relationBackEfastOrderId').val(relation.relationBackEfastOrderId);
- $('#relationSendName').val(relation.relationSendName);
- $('#relationSendTel').val(relation.relationSendTel);
- $('#relationSendAddress').val(relation.relationSendAddress);
- $('#relationSendLogisticsNo').val(relation.relationSendLogisticsNo);
- $('#relationDesc').val(relation.relationDesc);
- $('#relationBackReceiptDate').val(relation.relationBackReceiptDate);
- var detect_table = $('#detect_table');
- var maintenance_table = $('#maintenance_table');
- if (relation.complaintDetectList != null) {
- $.each(relation.complaintDetectList,function (i,item) {
- var detectRevolutionProducedMsg = "";
- switch (this.detectRevolutionProduced){
- case 1:
- detectRevolutionProducedMsg = "待转入";
- break;
- case 2:
- detectRevolutionProducedMsg = "已转入";
- break;
- case 3:
- detectRevolutionProducedMsg = "不需要转入";
- break;
- }
- var detect_tr = '<tr><td>'+convertUndefinedToEmpty(this.detectPhenomenon)+'</td>'
- + '<td>'+convertUndefinedToEmpty(this.detectFailureClassification)+'</td>'
- + '<td>'+convertUndefinedToEmpty(this.detectFailureCause)+'</td>'
- + '<td>'+convertUndefinedToEmpty(this.detectResults)+'</td>'
- + '<td>'+convertUndefinedToEmpty(this.detectPoint)+'</td>'
- + '<td>'+convertUndefinedToEmpty(this.detectAnalysis)+'</td>'
- + '<td>'+convertUndefinedToEmpty(detectRevolutionProducedMsg)+'</td></tr>';
- detect_table.append(detect_tr);
- var maintenance_tr = '<tr><td>'+convertUndefinedToEmpty(this.maintenanceIdRepair)+'</td>'
- + '<td>'+convertUndefinedToEmpty(this.maintenanceContent)+'</td>'
- + '<td>'+convertUndefinedToEmpty(this.maintenanceContentDate)+'</td></tr>';
- maintenance_table.append(maintenance_tr);
- })
- }
- $('#relationSchedule').html(relationSchedule);
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- })
- }
- function getseleType(type){
- var obj = new Object();
- var oldName = "";
- $("[seleType="+ type +"]").each(function(){
- var name = $(this).attr("name");
- if(oldName != name){
- oldName = name
- if($(this).attr("type") == "radio"){
- obj[name] = $("[name="+ name +"]:checked").val();
- }else{
- obj[name] = $("[name="+ name +"]").val();
- }
- }
- });
- $("[seleType='primary']").each(function(){
- var name = $(this).attr("name");
- if(oldName != name){
- oldName = name;
- obj[name] = $("[name="+ name +"]").val();
- }
- });
- return obj;
- }
- /*修改换新信息*/
- function update_relation_info(type) {
- var relation_flag = checkRenewed(type);
- //省市县
- var provinceNumber = $("#provinceNumber").find("option:selected").text();
- var cityNumber = $("#cityNumber").find("option:selected").text();
- var areaNumber = $("#areaNumber").find("option:selected").text();
- $('#merge_address').val(provinceNumber+'-'+cityNumber+'-'+areaNumber);
- //寄回邮费
- var relationBackPostage = $("#relationBackPostage").val();
- $("#relationBackPostage").val(parseInt(relationBackPostage*100));
- var obj = null;
- if(type == 1){
- obj = getseleType("send");
- }else if(type == 2){
- obj = getseleType("postage");
- }else if(type ==3){
- obj = getseleType("sendInformation");
- }
- if (relation_flag) {
- $.ajax({
- cache: true,
- type: "POST",
- data: obj,
- url: "${path}/admin/customer/update_cmRelation_info",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- window.parent.custome_result(data.resultMsg,1);
- parent.location.reload();
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- } else {
- window.parent.custome_result(data.resultMsg,5);
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- window.parent.admin_result("修改失败!",5);
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- }
- })
- }
- }
- /*校验换新填写信息*/
- function checkRenewed(type) {
- var relation_flag = true;
- var relationBackLogisticsNo = $('#relationBackLogisticsNo').val().trim();//寄回物流单号
- var relationBackLogisticsCompany = $("#relationBackLogisticsCompany option:selected").val();//寄回物流公司
- var relationBackName = $('#relationBackName').val();//寄件人姓名
- var relationBackTel = $('#relationBackTel').val();//寄件人电话
- if(type == 1){
- var relationBackStatus = $('input[name="relationBackStatus"]:checked').val();//寄回状态
- if (relationBackStatus == 1) {
- // if (renewedBackLogisticsNo != null && renewedBackLogisticsNo != '') {
- // layer.msg("产品未寄回,不能有物流信息!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- // if (renewedBackPostage != null && renewedBackPostage != '' && renewedBackPostage != 0) {
- // layer.msg("产品未寄回,不能有邮费!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- // if (renewedBackLogisticsCompany != null && renewedBackLogisticsCompany != '') {
- // layer.msg("产品未寄回,不能选择物流公司!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- // if (renewedBackName != null && renewedBackName != '') {
- // layer.msg("产品未寄回,不能填写寄回人信息!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- // if (renewedBackTel != null && renewedBackTel != '') {
- // layer.msg("产品未寄回,不能填写寄回人电话号码!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- } else if (relationBackStatus == 2 || relationBackStatus == 3) {
- if (relationBackLogisticsNo == null || relationBackLogisticsNo == '') {
- layer.msg("物流单号不能为空!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- if (relationBackLogisticsCompany == null || relationBackLogisticsCompany == '') {
- layer.msg("请选择物流公司!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- // if (!uname.test(renewedBackName)) {
- // layer.msg("寄回人信息格式不正确,请重新输入!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- if (!mobile.test(relationBackTel)) {
- layer.msg("寄回人电话号码格式不正确,请重新输入!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- }
- if (relationBackStatus == 3) {
- var relationBackReceiptDate = $('#relationBackReceiptDate').val();//仓库签收时间
- if (relationBackReceiptDate == null || relationBackReceiptDate == '') {
- layer.msg("仓库签收时间不能为空",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- }
- }else if(type == 2){
- var relationIsTransfer = $('input[name="relationIsTransfer"]:checked').val();
- var relationBackPostage = $('#relationBackPostage').val().trim();//寄回邮费
- var relationAlipay = $('#relationAlipay').val().trim();//支付宝账户
- var relationAlipayName = $('#relationAlipayName').val().trim();//支付宝账户姓名
- if(relationIsTransfer == 1){
- if (!money.test(relationBackPostage)) {
- layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- // if (!money.test(renewedAlipay)) {
- // layer.msg("支付宝账户格式不正确,请重新输入!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- // if (renewedAlipayName == null || renewedAlipayName == '') {
- // layer.msg("支付宝姓名不能为空,请重新输入!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- }
- }else if(type == 3){
- var relationSendStatus = $('input[name="relationSendStatus"]:checked').val();//寄回状态
- var relationSendLogisticsCompany = $('#relationSendLogisticsCompany').val();//寄出物流公司
- var relationSendLogisticsNo = $('#relationSendLogisticsNo').val();//寄出物流单号
- if (relationSendStatus == 1) {
- var relationBackStatus = $('input[name="relationBackStatus"]:checked').val();//寄回状态
- if (productType != 2) {
- var relationBackEfastOrderId = $('#relationBackEfastOrderId').val();//efast订单号
- if (relationBackEfastOrderId == null || relationBackEfastOrderId == '') {
- layer.msg("Efast订单号不能为空!", {icon: 5, time: 1000});
- relation_flag = false;
- return relation_flag;
- }
- }
- // if (renewedSendLogisticsCompany != null && renewedSendLogisticsCompany != '') {
- // layer.msg("产品未寄送,不能选择物流公司!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- // if (renewedSendLogisticsNo != null && renewedSendLogisticsNo != '') {
- // layer.msg("产品未寄送,不能填写物流单号!",{icon: 5,time:1000});
- // renewed_flag = false;
- // return renewed_flag;
- // }
- } else if (relationSendStatus == 2 || relationSendStatus == 3) {
- if (relationSendLogisticsCompany == null || relationSendLogisticsCompany == '') {
- layer.msg("请选择寄回物流公司!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- if (relationSendLogisticsNo == null || relationSendLogisticsNo == '') {
- layer.msg("请填写物流单号!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- var relationSendTel = $('#relationSendTel').val();//收件人电话
- if (!mobile.test(relationSendTel)) {
- layer.msg("收件人电话号码格式不正确,请重新输入!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- var relationSendName = $('#relationSendName').val();//收件人姓名
- if (relationSendName == null || relationSendName == '') {
- layer.msg("收件人姓名格式不正确,请重新输入!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- var relationSendAddress = $('#relationSendAddress').val();
- if (relationSendAddress == null || relationSendAddress == '') {
- layer.msg("寄出地址不能为空!",{icon: 5,time:1000});
- relation_flag = false;
- return relation_flag;
- }
- }
- }
- return relation_flag;
- }
- /**
- * 获取省
- */
- function getProvince(provinceNum) {
- var province = listProvince();
- if(province!=null){
- var provinceHtml = '';
- for(var i=0;i<province.length;i++){
- provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
- }
- $('#'+provinceNum).append(provinceHtml);
- }
- }
- /**
- * 获取市
- */
- function getCity(cityNum,provineceId) {
- var city = listCity(provineceId,'');
- if(city!=null){
- var cityHtml = '';
- for(var i=0;i<city.length;i++){
- cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
- }
- $('#'+cityNum).append(cityHtml);
- }
- }
- /**
- * 获取区
- */
- function getDistrict(districtNum,cityId) {
- var district = listDistrict(cityId,'');
- if(district!=null){
- var districtHtml = '';
- for(var i=0;i<district.length;i++){
- districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
- }
- $('#'+districtNum).append(districtHtml);
- }
- }
- /*监听市选择事件*/
- $(document).on('change', '#cityNumber', function() {
- var city = $("#cityNumber").val();
- $('#areaNumber option').remove();
- getDistrict('areaNumber',city);
- });
- /*监听省选择事件*/
- $(document).on('change', '#provinceNumber', function() {
- var proId = $("#provinceNumber").val();
- $('#cityNumber option').remove();
- getCity('cityNumber',proId);
- var cityId = $("#cityNumber").val();
- $('#areaNumber option').remove();
- getDistrict('areaNumber',cityId);
- });
- /*获取产品信息*/
- function get_product_type() {
- $.ajax({
- cache: true,
- type: "POST",
- data: {"customerId":${customerId}},
- url: "${path}/admin/customer/getProductType",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- productType = data.returnMsg.productType.typeCompany;
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- })
- }
- </script>
- </body>
- </html>
|