|
@@ -0,0 +1,629 @@
|
|
|
+<!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" />
|
|
|
+<#--<link href="lib/webuploader/0.1.5/webuploader.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;}
|
|
|
+ </style>
|
|
|
+ <title></title>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<article class="cl pd-20">
|
|
|
+ <form action="" method="post" class="form form-horizontal" id="form-update-repair" name="form-update-repair">
|
|
|
+ <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">
|
|
|
+ <input type="hidden" id="repairId" name="repairId" />
|
|
|
+ <span id="repairSchedule" class="c-red"></span>
|
|
|
+ </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 skin-minimal">
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" name="repairBackStatus" value="1">
|
|
|
+ <label for="tel-3">未寄回</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" name="repairBackStatus" value="2">
|
|
|
+ <label for="tel-4">已寄回</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" name="repairBackStatus" value="3">
|
|
|
+ <label for="tel-4">已收货</label>
|
|
|
+ </div>
|
|
|
+ </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 style="width: 100px;display: inline-block;margin-right: 10px;">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="repairBackLogisticsCompany" id="repairBackLogisticsCompany" class="select">
|
|
|
+ <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="01">其他</option>
|
|
|
+ <option value="02">上门送货</option>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <input style="width: 120px;margin-right: 10px;" type="text" class="input-text text-c" value="" placeholder="请输入快递单号" id="repairBackLogisticsNo" name="repairBackLogisticsNo">
|
|
|
+ <input style="width: 120px;margin-right: 10px;" type="text" class="input-text text-c" value="" placeholder="寄回邮费" id="repairBackPostage" name="repairBackPostage">
|
|
|
+ <input style="width: 120px;margin-right: 10px;" type="text" class="input-text text-c" value="" placeholder="用户支付宝账户" id="" name="">
|
|
|
+ </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 skin-minimal">
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" checked="checked" id="tel-6" name="tel">
|
|
|
+ <label for="tel-6">不需要转账</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-7" name="tel">
|
|
|
+ <label for="tel-7">已转账</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-8" name="tel">
|
|
|
+ <label for="tel-8">代转账</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl" style="position: relative;">
|
|
|
+ <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 text-c" value="" placeholder="寄件人姓名" id="repairBackName" name="repairBackName">
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-5 col-sm-5">
|
|
|
+ <input type="text" class="input-text text-c" value="" placeholder="寄件人电话" id="repairBackTel" name="repairBackTel">
|
|
|
+ </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="repairProduct"></div>
|
|
|
+ </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 skin-minimal">
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" name="repairSendStatus" value="1">
|
|
|
+ <label for="tel-9">未寄出</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" name="repairSendStatus" value="2">
|
|
|
+ <label for="tel-10">已寄出</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" name="repairSendStatus" value="3">
|
|
|
+ <label for="tel-10">已收货</label>
|
|
|
+ </div>
|
|
|
+ Efast订单号<input style="width: 200px;margin:0 10px;" type="text" class="input-text text-c" value="" placeholder="Efast订单号" id="repairBackEfastOrderId" name="repairBackEfastOrderId">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <div class="formControls col-2 col-sm-2 text-r">
|
|
|
+ <strong>用户信息</strong>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <input type="text" class="input-text" placeholder="填写收件人姓名" id="repairSendName" name="repairSendName">
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <input type="text" class="input-text" placeholder="填写收件人手机号" id="repairSendTel" name="repairSendTel">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-2 col-sm-2"></label>
|
|
|
+ <div class="formControls col-4 col-sm-10">
|
|
|
+ <div style="width: 100px;display: inline-block;margin-right: 10px;">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="repairProvinceNumber" id="repairProvinceNumber" class="select"></select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100px;display: inline-block;margin-right: 10px;">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="repairCityNumber" id="repairCityNumber" class="select"></select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100px;display: inline-block;margin-right: 10px;">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="repairAreaNumber" id="repairAreaNumber" class="select"></select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-2 col-sm-2"></label>
|
|
|
+ <div class="formControls col-5 col-sm-5">
|
|
|
+ <input type="text" class="input-text" placeholder="请填写详细地址" id="repairSendAddress" name="repairSendAddress">
|
|
|
+ </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 style="width: 100px;display: inline-block;margin-right: 10px;">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="repairSendLogisticsCompany" id="repairSendLogisticsCompany" class="select">
|
|
|
+ <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="01">其他</option>
|
|
|
+ <option value="02">上门送货</option>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <input style="width: 120px;margin-right: 10px;" type="text" class="input-text text-c" value="" placeholder="快递单号" id="repairSendLogisticsNo" name="repairSendLogisticsNo">
|
|
|
+ </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">
|
|
|
+ <input type="text" class="input-text" placeholder="寄出备注" id="repairDesc" name="repairDesc">
|
|
|
+ </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"><span>红色净水机(wx-1)x 1台</span><span>水箱 x 1件</span><span>t1 x 1件</span><span>t2 x 1件</span></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">
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <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"><tr>
|
|
|
+ <th>工厂检测现象</th><th>故障分类</th><th>故障原因</th><th>判定结果</th><th>故障指向</th><th>原因分析</th><th>生产维修</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td id="repairDetectPhenomenon"></td>
|
|
|
+ <td id="repairDetectFailureClassification"></td>
|
|
|
+ <td id="repairDetectFailureCause"></td>
|
|
|
+ <td id="repairDetectResults"></td>
|
|
|
+ <td id="repairDetectPoint"></td>
|
|
|
+ <td id="repairDetectAnalysis"></td>
|
|
|
+ <td id="repairDetectRevolutionProduced"></td>
|
|
|
+ </tr>
|
|
|
+ </tbody></table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <strong>返修进度</strong>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-10 col-sm-10">
|
|
|
+ <table class="table table-border table-bg table-bordered">
|
|
|
+ <tbody class="text-c"><tr>
|
|
|
+ <th>是否可返修</th><th>返修内容</th><th>返修日期</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td id="repairMaintenanceIdRepair"></td>
|
|
|
+ <td id="repairMaintenanceContent"></td>
|
|
|
+ <td id="repairMaintenanceContentDate"></td>
|
|
|
+ </tr>
|
|
|
+ </tbody></table>
|
|
|
+ </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">
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-8 col-sm-8 text-c">
|
|
|
+ <button onClick="update_repair_info();" class="btn btn-primary" type="button">确认修改</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</article>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/jquery.min.js"></script>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/layer/2.4/layer.js"></script>
|
|
|
+<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" src="lib/Validform/5.3.2/Validform.min.js"></script>
|
|
|
+<script type="text/javascript" src="lib/webuploader/0.1.5/webuploader.min.js"></script>-->
|
|
|
+<script type="text/javascript" src="${path}/common/static/h-ui/js/H-ui.js"></script>
|
|
|
+<script type="text/javascript" src="${path}/common/static/h-ui.admin/js/H-ui.admin.js"></script>
|
|
|
+<#--<script type="text/javascript" src="lib/provincesData.js"></script>
|
|
|
+<script type="text/javascript" src="lib/dimensions.js"></script>
|
|
|
+<script type="text/javascript" src="lib/suggest.js"></script>-->
|
|
|
+<script type="text/javascript">
|
|
|
+
|
|
|
+ var mobile= /^1(3|4|5|7|8)\d{9}$/; //手机号码
|
|
|
+ var uname = /^[\u4e00-\u9fa5a-zA-Z]{1,12}$/; //中文英文
|
|
|
+ var money = /^(([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%'
|
|
|
+ });
|
|
|
+ /*$("#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'
|
|
|
+ });*/
|
|
|
+ get_repair_info();
|
|
|
+//$("#city2").suggest(citys,{hot_list:commoncitys,attachObject:"#suggest2"})
|
|
|
+ });
|
|
|
+
|
|
|
+ /*获取维修信息*/
|
|
|
+ function get_repair_info() {
|
|
|
+ $.ajax({
|
|
|
+ cache: true,
|
|
|
+ type: "POST",
|
|
|
+ data: {"customerId":${customerId}},
|
|
|
+ url: "${path}/admin/customer/_update_repair",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ var repair = data.returnMsg.repair;
|
|
|
+ getProvince('repairProvinceNumber');
|
|
|
+ getCity('repairCityNumber',repair.provinceNumber);
|
|
|
+ getDistrict('repairAreaNumber',repair.cityNumber);
|
|
|
+ console.log(repair);
|
|
|
+ var repairSchedule = '';
|
|
|
+ switch (repair.repairBackStatus) {
|
|
|
+ case 1:repairSchedule += '待寄回,';break;
|
|
|
+ case 2:repairSchedule += '已寄回,';break;
|
|
|
+ case 3:repairSchedule += '已收货,';break;
|
|
|
+ }
|
|
|
+ switch (repair.repairSendStatus) {
|
|
|
+ case 1:repairSchedule += '未寄出,';break;
|
|
|
+ case 2:repairSchedule += '已寄出,';break;
|
|
|
+ case 3:repairSchedule += '已收货,';break;
|
|
|
+ }
|
|
|
+ switch (repair.detectState) {
|
|
|
+ case 1:repairSchedule += '待仓库转入';break;
|
|
|
+ case 2:repairSchedule += '正在检查';break;
|
|
|
+ case 3:repairSchedule += '检查通过';break;
|
|
|
+ case 4:repairSchedule += '检查未通过';break;
|
|
|
+ }
|
|
|
+ var repairProduct = '';
|
|
|
+ if (repair.closedProdcues != null && repair.closedProdcues.length > 0) {
|
|
|
+ $.each(repair.closedProdcues,function(index,element){
|
|
|
+ repairProduct += '<span>'+ this.closedProductName + '*' + this.closedProdcueNumber + '</span>';
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (repair.closedFittings != null && repair.closedFittings.length > 0) {
|
|
|
+ $.each(repair.closedFittings,function(index,element){
|
|
|
+ repairProduct += '<span>'+ this.fittingName + '*' + this.closedFittingNumber + '</span>';
|
|
|
+ })
|
|
|
+ }
|
|
|
+ $('#repairId').val(repair.repairId);
|
|
|
+ $('input[name="repairBackStatus"]').each(function(){
|
|
|
+ if (this.value == repair.repairBackStatus) {
|
|
|
+ $(this).iCheck('check');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('input[name="repairSendStatus"]').each(function(){
|
|
|
+ if (this.value == repair.repairSendStatus) {
|
|
|
+ $(this).iCheck('check');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#repairSchedule').html(repairSchedule);
|
|
|
+ $('#repairProduct').html(repairProduct);
|
|
|
+ $("#repairBackLogisticsCompany option[value='" + repair.repairBackLogisticsCompany + "']").attr("selected","true");
|
|
|
+ $("#repairSendLogisticsCompany option[value='" + repair.repairSendLogisticsCompany + "']").attr("selected","true");
|
|
|
+
|
|
|
+ $("#repairProvinceNumber option[value='" + repair.provinceNumber + "']").attr("selected","true");
|
|
|
+ $("#repairCityNumber option[value='" + repair.cityNumber + "']").attr("selected","true");
|
|
|
+ $("#repairAreaNumber option[value='" + repair.areaNumber + "']").attr("selected","true");
|
|
|
+ $('#repairBackLogisticsNo').val(repair.repairBackLogisticsNo);
|
|
|
+ $('#repairBackPostage').val(repair.repairBackPostage/100);
|
|
|
+ $('#repairBackName').val(repair.repairBackName);
|
|
|
+ $('#repairBackTel').val(repair.repairBackTel);
|
|
|
+ //$('#repairBackMachineNo').val(repair.repairBackMachineNo);
|
|
|
+ $('#repairBackEfastOrderId').html(repair.repairBackEfastOrderId);
|
|
|
+ $('#repairSendName').val(repair.repairSendName);
|
|
|
+ $('#repairSendTel').val(repair.repairSendTel);
|
|
|
+ $('#repairSendAddress').val(repair.repairSendAddress);
|
|
|
+ $('#repairSendLogisticsNo').val(repair.repairSendLogisticsNo);
|
|
|
+ $('#repairDesc').val(repair.repairDesc);
|
|
|
+ $('#detectPhenomenon').val(repair.detectPhenomenon);
|
|
|
+ $('#detectFailureClassification').val(repair.detectFailureClassification);
|
|
|
+ $('#detectFailureCause').val(repair.detectFailureCause);
|
|
|
+ $('#detectResults').val(repair.detectResults);
|
|
|
+ $('#detectPoint').val(repair.detectPoint);
|
|
|
+ $('#detectAnalysis').val(repair.detectAnalysis);
|
|
|
+ $('#detectRevolutionProduced').val(repair.detectRevolutionProduced);
|
|
|
+ $('#maintenanceIdRepair').val(repair.maintenanceIdRepair);
|
|
|
+ $('#maintenanceContent').val(repair.maintenanceContent);
|
|
|
+ $('#maintenanceContentDate').val(repair.maintenanceContentDate);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ /*修改维修信息*/
|
|
|
+ function update_repair_info() {
|
|
|
+ var repair_flag = checkRepair();
|
|
|
+ if (repair_flag) {
|
|
|
+ $.ajax({
|
|
|
+ cache: true,
|
|
|
+ type: "POST",
|
|
|
+ data: $('#form-update-repair').serialize(),
|
|
|
+ url: "${path}/admin/customer/update_repair_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);
|
|
|
+ }
|
|
|
+ $('#update-repair-info').hide();
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ window.parent.admin_result("修改失败!",5);
|
|
|
+ var index = parent.layer.getFrameIndex(window.name);
|
|
|
+ parent.layer.close(index);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /*校验维修填写信息*/
|
|
|
+ function checkRepair() {
|
|
|
+ var repair_flag = true;
|
|
|
+ var repairBackStatus = $('input[name="repairBackStatus"]:checked').val();//寄回状态
|
|
|
+ var repairBackLogisticsNo = $('#repairBackLogisticsNo').val().trim();//物流单号
|
|
|
+ var repairBackPostage = $('#repairBackPostage').val().trim();//寄回邮费
|
|
|
+ var repairBackLogisticsCompany = $("#repairBackLogisticsCompany option:selected").val();//寄回物流公司
|
|
|
+ var repairBackName = $('#repairBackName').val();
|
|
|
+ var repairBackTel = $('#repairBackTel').val();
|
|
|
+ //var repairBackMachineNo = $('#repairBackMachineNo').val();
|
|
|
+ if (repairBackStatus == 1) {
|
|
|
+ if (repairBackLogisticsNo != null && repairBackLogisticsNo != '') {
|
|
|
+ alert("产品未寄回,不能有物流信息!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (repairBackPostage != null && repairBackPostage != '') {
|
|
|
+ alert("产品未寄回,不能有邮费!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (repairBackLogisticsCompany != null && repairBackLogisticsCompany != '') {
|
|
|
+ alert("产品未寄回,不能选择物流公司!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (repairBackName != null && repairBackName != '') {
|
|
|
+ alert("产品未寄回,不能填写寄回人信息!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (repairBackTel != null && repairBackTel != '') {
|
|
|
+ alert("产品未寄回,不能填写寄回人电话号码!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ /*if (repairBackMachineNo != null && repairBackMachineNo != '') {
|
|
|
+ alert("产品未寄回,不能填写机器编号!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }*/
|
|
|
+ } else if (repairBackStatus == 2 || repairBackStatus == 3) {
|
|
|
+ if (repairBackLogisticsNo == null || repairBackLogisticsNo == '') {
|
|
|
+ alert("物流信息不能为空!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (!money.test(repairBackPostage)) {
|
|
|
+ alert("邮费格式不正确,请重新输入!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (repairBackLogisticsCompany == null || repairBackLogisticsCompany == '') {
|
|
|
+ alert("请选择物流公司!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (!uname.test(repairBackName)) {
|
|
|
+ alert("寄回人信息格式不正确,请重新输入!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (!mobile.test(repairBackTel)) {
|
|
|
+ alert("寄回人电话号码格式不正确,请重新输入!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ /*if (repairBackMachineNo == null || repairBackMachineNo == '') {
|
|
|
+ alert("机器编号不能为空!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }*/
|
|
|
+ }
|
|
|
+ var repairSendName = $('#repairSendName').val();
|
|
|
+ if (!uname.test(repairSendName)) {
|
|
|
+ alert("寄回人信息格式不正确,请重新输入!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ var repairSendTel = $('#repairSendTel').val();
|
|
|
+ if (!mobile.test(repairSendTel)) {
|
|
|
+ alert("寄回人电话号码格式不正确,请重新输入!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ var repairSendAddress = $('#repairSendAddress').val();
|
|
|
+ if (repairSendAddress == null || repairSendAddress == '') {
|
|
|
+ alert("寄出地址不能为空!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ var repairSendStatus = $('input[name="repairSendStatus"]:checked').val();//寄回状态
|
|
|
+ var repairSendLogisticsCompany = $('#repairSendLogisticsCompany').val();//寄出物流公司
|
|
|
+ var repairSendLogisticsNo = $('#repairSendLogisticsNo').val();//寄出物流单号
|
|
|
+ if (repairSendLogisticsCompany == 1) {
|
|
|
+ if (repairSendLogisticsCompany != null && repairSendLogisticsCompany != '') {
|
|
|
+ alert("产品未寄送,不能选择物流公司!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (repairSendLogisticsNo != null && repairSendLogisticsNo != '') {
|
|
|
+ alert("产品未寄送,不能填写物流单号!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ } else if (repairSendLogisticsCompany == 2 || repairSendLogisticsCompany == 3) {
|
|
|
+ if (repairSendLogisticsCompany == null || repairSendLogisticsCompany == '') {
|
|
|
+ alert("请选择寄回物流公司!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ if (repairSendLogisticsNo == null || repairSendLogisticsNo == '') {
|
|
|
+ alert("请填写物流单号!");
|
|
|
+ repair_flag = false;
|
|
|
+ return repair_flag;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return repair_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', '#repairCityNumber', function() {
|
|
|
+ var city = $("#repairCityNumber").val();
|
|
|
+ $('#repairAreaNumber option').remove();
|
|
|
+ getDistrict('repairAreaNumber',city);
|
|
|
+ });
|
|
|
+
|
|
|
+ /*监听省选择事件*/
|
|
|
+ $(document).on('change', '#repairProvinceNumber', function() {
|
|
|
+ var proId = $("#repairProvinceNumber").val();
|
|
|
+ $('#repairCityNumber option').remove();
|
|
|
+ getCity('repairCityNumber',proId);
|
|
|
+ var cityId = $("#cityNumber").val();
|
|
|
+ $('#repairAreaNumber option').remove();
|
|
|
+ getDistrict('repairAreaNumber',cityId);
|
|
|
+ });
|
|
|
+
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|