Browse Source

修改bug文档问题

liujiankang 7 years ago
parent
commit
e7ee2859ef

+ 11 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -971,13 +971,23 @@ public class CustomerServiceImpl implements CustomerService {
         EfastOrder efastOrder = new EfastOrder();
         List<EfastOrderItem> itemList = new ArrayList<>();
 
-        for(int i=0;i<customerCommon.getSendProdcues().size();i++){
+        /*for(int i=0;i<customerCommon.getSendProdcues().size();i++){
             SendProdcue sendProdcue = customerCommon.getSendProdcues().get(i);
             EfastOrderItem efastOrderItem = new EfastOrderItem();
             efastOrderItem.setItemColorBar(sendProdcue.getProductColor().getColorBar());
             efastOrderItem.setItemNum(sendProdcue.getSendProdcueNumber());
             efastOrderItem.setItemDiscount(sendProdcue.getProductColor().getColorPrice());
             itemList.add(efastOrderItem);
+        }*/
+        SalesOrderItem salesOrderItem = new SalesOrderItem();
+        salesOrderItem.setItemOrderId(salesOrder.getSalesId());
+        List<SalesOrderItem> salesOrderItemList = salesOrderMapper.listSalesOrderItem(salesOrderItem);
+        for(SalesOrderItem item : salesOrderItemList){
+            EfastOrderItem efastOrderItem = new EfastOrderItem();
+            efastOrderItem.setItemColorBar(item.getItemColorBar());
+            efastOrderItem.setItemNum(item.getItemNum());
+            efastOrderItem.setItemDiscount(item.getItemProductPrice());
+            itemList.add(efastOrderItem);
         }
         efastOrder.setOrderDealCode(salesOrder.getSalesDealCode()); //交易号
         efastOrder.setOrderPostFirm(salesOrder.getSalesPostFirm()); //物流代码

+ 7 - 6
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -1272,8 +1272,8 @@ public class AdminCustomerController {
     @RequiresPermissions("customer:update:renewed")
     @RequestMapping("/update_renewed_info")
     public ResponseJson updateRenewedInfo(HttpServletRequest request, Renewed renewed) throws Exception {
-        String closedProducts = request.getParameter("closed_products");
-        String closedFittings = request.getParameter("closed_fittings");
+        /*String closedProducts = request.getParameter("closed_products");
+        String closedFittings = request.getParameter("closed_fittings");*/
         String mergeAddress = request.getParameter("merge_address");
         if (!StringUtils.isNotEmpty(renewed.getRenewedId().toString())) {
             return new ResponseJson(500, "该换新信息不能修改!", 500);
@@ -1281,13 +1281,13 @@ public class AdminCustomerController {
 //        if (StringUtils.isNotEmpty(renewed.getRenewedBackPostage().toString())) {
 //            renewed.setRenewedBackPostage(renewed.getRenewedBackPostage().intValue() * 100);
 //        }
-        if (!StringUtils.isNotEmpty(renewed.getRenewedBackEfastOrderId())) {
+        /*if (!StringUtils.isNotEmpty(renewed.getRenewedBackEfastOrderId())) {
             return new ResponseJson(500, "请输入efast订单号!", 500);
-        }
+        }*/
         if (StringUtils.isNotEmpty(mergeAddress)) {
             renewed.setRenewedSendMergeAddress(mergeAddress);
         }
-
+    if(renewed.getRenewedBackStatus() != null){
         if(renewed.getRenewedBackStatus() != 1){
             ComplaintSignclosedInfo cs = new ComplaintSignclosedInfo();
             cs.setSignclosedCustomerId(renewed.getCustomerId());
@@ -1295,9 +1295,10 @@ public class AdminCustomerController {
             cs.setSignclosedLogisticsNumber(renewed.getRenewedBackLogisticsNo());
             complaintSignclosedInfoService.updateSignclosedByCustomerId(cs);
         }
+    }
 
         //修改换新信息
-        int num = renewedService.updateRenewedInfo(renewed, closedProducts, closedFittings);
+        int num = renewedService.updateRenewedInfo(renewed, null, null);
         if (num > 0) {
             return new ResponseJson(200, "修改成功!", 200);
         } else {

+ 363 - 268
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_renewed.ftl

@@ -18,49 +18,74 @@
         .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">
+        <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="renewedId" name="renewedId" />
+                <input type="hidden" id="renewedId" name="renewedId" seleType="primary"/>
                 <span id="renewedSchedule" class="c-red"></span>
             </div>
         </div>
-        <input type="hidden" id="customerId" name="customerId" value="${customerId!''}">
-        <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-3" name="renewedBackStatus" value="1">
-                    <label for="tel-3">未寄回</label>
+        <div id="tab_demo" class="HuiTab">
+        <div class="tabBar clearfix"><span>寄回信息</span><span>邮费信息</span><span>寄送信息</span><span>工厂检查信息</span><span>工厂返修进度</span></div>
+        <div class="tabCon">
+            <#--<div class="row cl">
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <strong>寄回产品</strong>
                 </div>
-                <div class="radio-box">
-                    <input type="radio" id="tel-4" name="renewedBackStatus" value="2">
-                    <label for="tel-4">已寄回</label>
+                <div class="formControls col-10 col-sm-10">
+                    <div class="update-parts" id="renewedProduct" style="float: left;width: 514px;"></div>
+                    <input type="hidden" id="closed_products" name="closed_products" />
+                    <input type="hidden" id="closed_fittings" name="closed_fittings" />
+                    &lt;#&ndash;<div style="float: left;">
+                        <button type="button" style="cursor:pointer;height: 30px;" class="my-btn-search" onclick="showProductList();">修改产品</button>
+                    </div>&ndash;&gt;
                 </div>
-                <div class="radio-box">
-                    <input type="radio" id="tel-5" name="renewedBackStatus" value="3">
-                    <label for="tel-5">已收货</label>
+            </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" id="tel-3" name="renewedBackStatus" value="1" seleType="send">
+                        <label for="tel-3">未寄回</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-4" name="renewedBackStatus" value="2" seleType="send">
+                        <label for="tel-4">已寄回</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-5" name="renewedBackStatus" value="3" seleType="send">
+                        <label for="tel-5">已收货</label>
+                    </div>
                 </div>
             </div>
-        </div>
-        <div class="row cl" id="backLogisticsInfo" style="display: none">
-            <div class="formControls col-2 col-sm-2 text-r">
-                <strong>寄回信息</strong>
-            </div>
-            <div class="formControls col-10 col-sm-10">
-                <div style="width: 120px;display: inline-block;margin-right: 10px;">
+
+            <div class="row cl" id="backLogisticsInfo" style="display: none">
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <strong>寄回信息</strong>
+                </div>
+                <div class="formControls col-10 col-sm-10">
+                    <div style="width: 120px;display: inline-block;margin-right: 10px;">
 			<span class="select-box">
-				<select name="renewedBackLogisticsCompany" id="renewedBackLogisticsCompany" class="select">
+				<select name="renewedBackLogisticsCompany" id="renewedBackLogisticsCompany" class="select" seleType="send">
                     <option value="">物流公司</option>
 					<option value="sto">申通快递</option>
                     <option value="yto">圆通快递</option>
@@ -79,143 +104,156 @@
                     <option value="02">上门送货</option>
 				</select>
 			</span>
+                    </div>
+                    <input style="width: 150px;margin-right: 10px;" type="text" class="input-text" value="" placeholder="请输入快递单号" id="renewedBackLogisticsNo" name="renewedBackLogisticsNo" 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>
-                <input style="width: 150px;margin-right: 10px;" type="text" class="input-text" value="" placeholder="请输入快递单号" id="renewedBackLogisticsNo" name="renewedBackLogisticsNo">
-                <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" id="backTransferInfo" style="display: none">
-            <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-6" name="renewedIsTransfer" value="0">
-                    <label for="tel-6">不需要转账</label>
+
+            <div class="row cl" style="position: relative;display: none;" id="backUserInfo">
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <strong>寄件信息</strong>
                 </div>
-                <div class="radio-box">
-                    <input type="radio" id="tel-7" name="renewedIsTransfer" value="1">
-                    <label for="tel-7">已转账</label>
+                <div class="formControls col-5 col-sm-5">
+                    <input type="text" class="input-text" value="" placeholder="寄件人姓名" id="renewedBackName" name="renewedBackName" seleType="send">
                 </div>
-                <div class="radio-box">
-                    <input type="radio" id="tel-8" name="renewedIsTransfer" value="2">
-                    <label for="tel-8">待转账</label>
+                <div class="formControls col-5 col-sm-5">
+                    <input type="text" class="input-text" value="" placeholder="寄件人电话" id="renewedBackTel" name="renewedBackTel" 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_renewed_info(1);" class="btn btn-primary" type="button">确认修改</button>
+                    </div>
+                </div>
         </div>
-        <div class="row cl" style="position: relative;display: none;" id="backUserInfo">
-            <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" value="" placeholder="寄件人姓名" id="renewedBackName" name="renewedBackName">
-            </div>
-            <div class="formControls col-5 col-sm-5">
-                <input type="text" class="input-text" value="" placeholder="寄件人电话" id="renewedBackTel" name="renewedBackTel">
-            </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="renewedProduct" style="float: left;width: 514px;"></div>
-                <input type="hidden" id="closed_products" name="closed_products" />
-                <input type="hidden" id="closed_fittings" name="closed_fittings" />
-                <div style="float: left;">
-                    <button type="button" style="cursor:pointer;height: 30px;" class="my-btn-search" onclick="showProductList();">修改产品</button>
+        <div class="tabCon">
+            <div class="row cl" id="backTransferInfo" <#--style="display: none"-->>
+                <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-6" name="renewedIsTransfer" value="0" seleType="postage">
+                        <label for="tel-6">不需要转账</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-7" name="renewedIsTransfer" value="1" seleType="postage">
+                        <label for="tel-7">已转账</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-8" name="renewedIsTransfer" value="2" seleType="postage">
+                        <label for="tel-8">待转账</label>
+                    </div>
                 </div>
             </div>
-        </div>
-        <div class="cl">
-            <div class="formControls col-2 col-sm-2 text-r">
+            <div class="row cl" id="postageInformation">
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <strong>邮费信息</strong>
+                </div>
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <input style="width: 150px;margin-right: 10px;" type="text" class="input-text" value="" placeholder="寄回邮费" id="renewedBackPostage" name="renewedBackPostage" seleType="postage">
+                    <input style="width: 150px;margin-top: 20px;" type="text" class="input-text" value="" placeholder="用户支付宝账户" id="renewedAlipay" name="renewedAlipay" seleType="postage">
+                </div>
             </div>
-            <div class="formControls col-10 col-sm-10" id="produceSelect" style="padding-top: 10px;display: none;">
-                <div>
-                    <input type="text" oninput="showUpdateSendProduct();" onpropertychange="showUpdateSendProduct();" class="input-text" style="width: 100%" id="selectProcuct" name="selectProcuct" placeholder="请输入产品名称搜索">
+
+            <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_renewed_info(2);" class="btn btn-primary" type="button">确认修改</button>
                 </div>
-                <table class="table table-border table-bg table-bordered">
-                    <thead>
-                    <tr class="text-c">
-                        <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">
-                    </tbody>
-                </table>
             </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" id="tel-10" name="renewedSendStatus" value="1">
-                    <label for="tel-10">未寄出</label>
+        <div class="tabCon">
+            <div class="row cl">
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <strong>是否寄出</strong>
                 </div>
-                <div class="radio-box">
-                    <input type="radio" id="tel-11" name="renewedSendStatus" value="2">
-                    <label for="tel-11">已寄出</label>
+                <div class="formControls col-10 col-sm-10 skin-minimal">
+                    <div class="radio-box">
+                        <input type="radio" id="tel-10" name="renewedSendStatus" value="1" seleType="sendInformation">
+                        <label for="tel-10">未寄出</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-11" name="renewedSendStatus" value="2" seleType="sendInformation">
+                        <label for="tel-11">已寄出</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-12" name="renewedSendStatus" value="3" seleType="sendInformation">
+                        <label for="tel-12">已收货</label>
+                    </div>
+                    Efast订单号<input style="width: 231px;margin-left:20px;" type="text" class="input-text" value="" placeholder="Efast订单号" id="renewedBackEfastOrderId" name="renewedBackEfastOrderId" seleType="sendInformation">
                 </div>
-                <div class="radio-box">
-                    <input type="radio" id="tel-12" name="renewedSendStatus" value="3">
-                    <label for="tel-12">已收货</label>
+
+                <#--<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>
-                Efast订单号<input style="width: 231px;margin-left:20px;" type="text" class="input-text" value="" placeholder="Efast订单号" id="renewedBackEfastOrderId" name="renewedBackEfastOrderId">
-            </div>
-        </div>
-        <div class="row cl" id="sendUserInfo" style="display: none;">
-            <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="renewedSendName" name="renewedSendName">
-            </div>
-            <div class="formControls col-5 col-sm-5">
-                <input type="text" class="input-text" placeholder="填写收件人手机号" id="renewedSendTel" name="renewedSendTel">
-            </div>
-        </div>
-        <div class="row cl" id="sendAddressInfo" style="display: none">
-            <div class="formControls col-2 col-sm-2 text-r">
+                <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" style="display: none;">
+                    <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="renewedSendName" name="renewedSendName" seleType="sendInformation">
+                    </div>
+                    <div class="formControls col-5 col-sm-5">
+                        <input type="text" class="input-text" placeholder="填写收件人手机号" id="renewedSendTel" name="renewedSendTel" seleType="sendInformation">
+                    </div>
+                </div>
+                <div class="row cl" id="sendAddressInfo" style="display: none">
+                    <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;">
+                    </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"></select>
+                        <select name="provinceNumber" id="provinceNumber" class="select" seleType="sendInformation"></select>
                     </span>
-                </div>
-                <div style="width: 188px;display: inline-block;margin-right: 20px;">
+                        </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"></select>
+                        <select name="cityNumber" id="cityNumber" class="select" seleType="sendInformation"></select>
                     </span>
-                </div>
-                <div style="width: 189px;display: inline-block;">
+                        </div>
+                        <div style="width: 189px;display: inline-block;">
                     <span class="select-box" style="padding-right: 0px;">
-                        <select name="areaNumber" id="areaNumber" class="select"></select>
-                        <input type="hidden" id="merge_address" name="merge_address">
+                        <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>
-        </div>
-        <div class="row cl" id="sendaddressDescInfo" style="display: none">
-            <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="renewedSendAddress" name="renewedSendAddress">
-            </div>
-        </div>
-        <div class="row cl"  id="sendLogisticsInfo" style="display: none">
-            <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;">
+                <div class="row cl" id="sendaddressDescInfo" style="display: none">
+                    <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="renewedSendAddress" name="renewedSendAddress" seleType="sendInformation">
+                    </div>
+                </div>
+                <div class="row cl"  id="sendLogisticsInfo" style="display: none">
+                    <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="renewedSendLogisticsCompany" id="renewedSendLogisticsCompany" class="select">
+				<select name="renewedSendLogisticsCompany" id="renewedSendLogisticsCompany" class="select" seleType="sendInformation">
 					<option value="">物流公司</option>
                     <option value="sto">申通快递</option>
                     <option value="yto">圆通快递</option>
@@ -234,78 +272,73 @@
                     <option value="02">上门送货</option>
 				</select>
 			</span>
+                        </div>
+                        <input style="width: 300px;" type="text" class="input-text" value="" placeholder="快递单号" id="renewedSendLogisticsNo" name="renewedSendLogisticsNo" seleType="sendInformation">
+                    </div>
+                </div>
+                <div class="row cl" id="sendDescInfo" style="display: none">
+                    <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="renewedDesc" name="renewedDesc" seleType="sendInformation">
+                    </div>
                 </div>
-                <input style="width: 300px;" type="text" class="input-text" value="" placeholder="快递单号" id="renewedSendLogisticsNo" name="renewedSendLogisticsNo">
-            </div>
-        </div>
-        <div class="row cl" id="sendDescInfo" style="display: none">
-            <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="renewedDesc" name="renewedDesc">
-            </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">
-            <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 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_renewed_info(3);" class="btn btn-primary" type="button">确认修改</button>
+                </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">
-                <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 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="row cl">
-            <div class="formControls col-2 col-sm-2">
-            </div>
-            <div class="formControls col-10 col-sm-10">
-                寄送产品将自动推送Efast,系统自动获取物流信息,并更新。如果在Efast作废订单等操作后,无法获取物流信息,请手动填写物流信息。
+        <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>
-        <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_renewed_info();" class="btn btn-primary" type="button">确认修改</button>
-            </div>
         </div>
+        <input type="hidden" id="customerId" name="customerId" value="${customerId!''}" seleType="primary">
     </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/icheck/jquery.icheck.min.js"></script>
 <script type="text/javascript">
+    $(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}$/; //中文英文
@@ -329,13 +362,18 @@
         $("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();
+            /*$("#backTransferInfo").hide();*/
             $("#backUserInfo").hide();
         }else{
             $("#backLogisticsInfo").show();
@@ -344,6 +382,15 @@
         }
     }
 
+    /*显示隐藏邮费信息*/
+    function initPostageInfo(statusCode){
+        if(statusCode == 1){
+            $("#postageInformation").show();
+        }else{
+            $("#postageInformation").hide();
+        }
+    }
+
     /*初始化寄出信息*/
     function initSendInfo(statusCode){
         if(statusCode == 1){
@@ -537,9 +584,9 @@
                         case 3:renewedSchedule += '已收货,';break;
                     }
                     switch (renewed.renewedSendStatus) {
-                        case 1:renewedSchedule += '未寄出,';break;
-                        case 2:renewedSchedule += '已寄出,';break;
-                        case 3:renewedSchedule += '已收货,';break;
+                        case 1:renewedSchedule += '未寄出';break;
+                        case 2:renewedSchedule += '已寄出';break;
+                        case 3:renewedSchedule += '已收货';break;
                     }
 
                     var renewedProduct = '';
@@ -578,11 +625,12 @@
                             $(this).iCheck('check');
                         }
                     });
-
                     /*初始化寄回信息*/
                     initBackInfo(renewed.renewedBackStatus);
                     /*初始化寄出信息*/
                     initSendInfo(renewed.renewedSendStatus);
+                    //初始化邮费信息
+                    initPostageInfo(renewed.renewedIsTransfer);
 
                     $('#renewedSchedule').html(renewedSchedule);
                     $("#renewedBackLogisticsCompany option[value='" + renewed.renewedBackLogisticsCompany + "']").attr("selected","true");
@@ -613,14 +661,14 @@
                     var maintenance_table = $('#maintenance_table');
                     if (renewed.complaintDetectList != null) {
                         $.each(renewed.complaintDetectList,function (i,item) {
-                            if (i == 0) {
+                            /*if (i == 0) {
                                 switch (this.detectState) {
                                     case 1:renewedSchedule += '待仓库转入';break;
                                     case 2:renewedSchedule += '正在检查';break;
                                     case 3:renewedSchedule += '检查通过';break;
                                     case 4:renewedSchedule += '检查未通过';break;
                                 }
-                            }
+                            }*/
                             var detectRevolutionProducedMsg = "";
                             switch (this.detectRevolutionProduced){
                                 case 1:
@@ -655,21 +703,54 @@
         })
     }
 
+   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_renewed_info() {
-        var renewed_flag = checkRenewed();
+    function update_renewed_info(type) {
+        var renewed_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 renewedBackPostage = $("#renewedBackPostage").val();
         $("#renewedBackPostage").val(parseInt(renewedBackPostage*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 (renewed_flag) {
             $.ajax({
                 cache: true,
                 type: "POST",
-                data: $('#form-update-renewed').serialize(),
+                data: obj,
                 url: "${path}/admin/customer/update_renewed_info",
                 async: false,
                 success: function(data){
@@ -692,15 +773,15 @@
     }
 
     /*校验换新填写信息*/
-    function checkRenewed() {
+    function checkRenewed(type) {
         var renewed_flag = true;
-        var renewedBackStatus = $('input[name="renewedBackStatus"]:checked').val();//寄回状态
-        var renewedBackLogisticsNo = $('#renewedBackLogisticsNo').val().trim();//物流单号
-        var renewedBackPostage = $('#renewedBackPostage').val().trim();//寄回邮费
+        var renewedBackLogisticsNo = $('#renewedBackLogisticsNo').val().trim();//寄回物流单号
         var renewedBackLogisticsCompany = $("#renewedBackLogisticsCompany option:selected").val();//寄回物流公司
-        var renewedBackName = $('#renewedBackName').val();
-        var renewedBackTel = $('#renewedBackTel').val();
-        if (renewedBackStatus == 1) {
+        var renewedBackName = $('#renewedBackName').val();//寄件人姓名
+        var renewedBackTel = $('#renewedBackTel').val();//寄件人电话
+        if(type == 1){
+            var renewedBackStatus = $('input[name="renewedBackStatus"]:checked').val();//寄回状态
+            if (renewedBackStatus == 1) {
 //            if (renewedBackLogisticsNo != null && renewedBackLogisticsNo != '') {
 //                layer.msg("产品未寄回,不能有物流信息!",{icon: 5,time:1000});
 //                renewed_flag = false;
@@ -726,56 +807,51 @@
 //                renewed_flag = false;
 //                return renewed_flag;
 //            }
-        } else if (renewedBackStatus == 2 || renewedBackStatus == 3) {
-            if (renewedBackLogisticsNo == null || renewedBackLogisticsNo == '') {
-                layer.msg("物流信息不能为空!",{icon: 5,time:1000});
-                renewed_flag = false;
-                return renewed_flag;
-            }
-            if (!money.test(renewedBackPostage)) {
-                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 (!uname.test(renewedBackName)) {
-                layer.msg("寄回人信息格式不正确,请重新输入!",{icon: 5,time:1000});
-                renewed_flag = false;
-                return renewed_flag;
+            } else if (renewedBackStatus == 2 || renewedBackStatus == 3) {
+                if (renewedBackLogisticsNo == null || renewedBackLogisticsNo == '') {
+                    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 (!uname.test(renewedBackName)) {
+                    layer.msg("寄回人信息格式不正确,请重新输入!",{icon: 5,time:1000});
+                    renewed_flag = false;
+                    return renewed_flag;
+                }
+                if (!mobile.test(renewedBackTel)) {
+                    layer.msg("寄回人电话号码格式不正确,请重新输入!",{icon: 5,time:1000});
+                    renewed_flag = false;
+                    return renewed_flag;
+                }
             }
-            if (!mobile.test(renewedBackTel)) {
-                layer.msg("寄回人电话号码格式不正确,请重新输入!",{icon: 5,time:1000});
-                renewed_flag = false;
-                return renewed_flag;
+        }else if(type == 2){
+            var renewedIsTransfer = $('input[name="renewedIsTransfer"]:checked').val();
+            var renewedBackPostage = $('#renewedBackPostage').val().trim();//寄回邮费
+            var renewedAlipay = $('#renewedAlipay').val().trim();//支付宝账户
+
+            if(renewedIsTransfer == 1){
+                if (!money.test(renewedBackPostage)) {
+                    layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
+                    renewed_flag = false;
+                    return renewed_flag;
+                }
+                if (!money.test(renewedAlipay)) {
+                    layer.msg("支付宝账户格式不正确,请重新输入!",{icon: 5,time:1000});
+                    renewed_flag = false;
+                    return renewed_flag;
+                }
             }
-        }
-        var renewedSendName = $('#renewedSendName').val();
-        if (!uname.test(renewedSendName)) {
-            layer.msg("寄回人信息格式不正确,请重新输入!",{icon: 5,time:1000});
-            renewed_flag = false;
-            return renewed_flag;
-        }
-        var renewedSendTel = $('#renewedSendTel').val();
-        if (!mobile.test(renewedSendTel)) {
-            layer.msg("寄回人电话号码格式不正确,请重新输入!",{icon: 5,time:1000});
-            renewed_flag = false;
-            return renewed_flag;
-        }
-        var renewedSendAddress = $('#renewedSendAddress').val();
-        if (renewedSendAddress == null || renewedSendAddress == '') {
-            layer.msg("寄出地址不能为空!",{icon: 5,time:1000});
-            renewed_flag = false;
-            return renewed_flag;
-        }
-        var renewedSendStatus = $('input[name="renewedSendStatus"]:checked').val();//寄回状态
-        var renewedSendLogisticsCompany = $('#renewedSendLogisticsCompany').val();//寄出物流公司
-        var renewedSendLogisticsNo = $('#renewedSendLogisticsNo').val();//寄出物流单号
+        }else if(type == 3){
+            var renewedSendStatus = $('input[name="renewedSendStatus"]:checked').val();//寄回状态
+            var renewedSendLogisticsCompany = $('#renewedSendLogisticsCompany').val();//寄出物流公司
+            var renewedSendLogisticsNo = $('#renewedSendLogisticsNo').val();//寄出物流单号
 
-        if (renewedSendStatus == 1) {
+            if (renewedSendStatus == 1) {
 //            if (renewedSendLogisticsCompany != null && renewedSendLogisticsCompany != '') {
 //                layer.msg("产品未寄送,不能选择物流公司!",{icon: 5,time:1000});
 //                renewed_flag = false;
@@ -786,16 +862,35 @@
 //                renewed_flag = false;
 //                return renewed_flag;
 //            }
-        } else if (renewedSendStatus == 2 || renewedSendStatus == 3) {
-            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 (renewedSendStatus == 2 || renewedSendStatus == 3) {
+                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;
+                }
+                var renewedSendTel = $('#renewedSendTel').val();//收件人电话
+                if (!mobile.test(renewedSendTel)) {
+                    layer.msg("收件人电话号码格式不正确,请重新输入!",{icon: 5,time:1000});
+                    renewed_flag = false;
+                    return renewed_flag;
+                }
+                var renewedSendName = $('#renewedSendName').val();//收件人姓名
+                if (renewedSendName == null || renewedSendName == '') {
+                    layer.msg("收件人姓名格式不正确,请重新输入!",{icon: 5,time:1000});
+                    renewed_flag = false;
+                    return renewed_flag;
+                }
+                var renewedSendAddress = $('#renewedSendAddress').val();
+                if (renewedSendAddress == null || renewedSendAddress == '') {
+                    layer.msg("寄出地址不能为空!",{icon: 5,time:1000});
+                    renewed_flag = false;
+                    return renewed_flag;
+                }
             }
         }
         return renewed_flag;