liujiankang пре 6 година
родитељ
комит
319a6909b5

+ 48 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java

@@ -277,4 +277,52 @@ public class AwaitSendController {
         return ResponseJson.getSUCCESS().addResponseKeyValue("json", stringBuilder.toString());
         return ResponseJson.getSUCCESS().addResponseKeyValue("json", stringBuilder.toString());
     }
     }
 
 
+
+    /**
+     * 跳转到手动发货页面
+     *
+     * @return
+     */
+    @RequiresPermissions("salesOrder:confirm:salesOrder")
+    @RequestMapping(value = "/to_manual_delivery")
+    public ModelAndView toDistributionPostFirm(HttpServletRequest request,String salesId) {
+        ModelAndView mv = new ModelAndView("order/salesOrder/manual_delivery");
+        mv.addObject("salesId",salesId);
+        return mv;
+    }
+
+    /**
+     * 手动发货
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("salesOrder:confirm:salesOrder")
+    @RequestMapping("/manual_delivery")
+    public ResponseJson listSalesPostFirm(HttpServletRequest request, SalesOrder salesOrder) {
+        ResponseJson rj = ResponseJson.getFAILURE();
+        if(salesOrder == null){
+            return rj;
+        }
+        if(salesOrder.getSalesPostFirm() == null || salesOrder.getSalesPostNum() == null || salesOrder.getSalesId() == null){
+            return rj;
+        }
+        salesOrder.setSalesSendTime(new Date());
+        salesOrder.setSalesShippingStatus(1);
+        salesOrder.setSalesSendType(2);
+        /*分配到该批次下的所有订单*/
+        Integer flag = 0;
+        try{
+            flag = salesOrderService.updateSalesOrder(salesOrder);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        if(flag < 0){
+            return rj;
+        }else{
+            rj = ResponseJson.getSUCCESS();
+            return rj;
+        }
+
+    }
 }
 }

+ 2 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_custome_list.ftl

@@ -53,6 +53,7 @@
                         <#--<input type="checkbox" class="selectAll" id="selectAll" value="selectAll" >-->
                         <#--<input type="checkbox" class="selectAll" id="selectAll" value="selectAll" >-->
                     </th>
                     </th>
                     <th width="50">客诉编号</th>
                     <th width="50">客诉编号</th>
+                    <th width="50">昵称</th>
                     <th width="50">姓名</th>
                     <th width="50">姓名</th>
                     <th width="50">电话</th>
                     <th width="50">电话</th>
                     <th width="50">问题简述</th>
                     <th width="50">问题简述</th>
@@ -143,6 +144,7 @@
                         html += '<tr class="text-c">' +
                         html += '<tr class="text-c">' +
                                 ' <td><input type="radio" class="customer_id" id="" value="'+ customer.customerId +'" ></td>' +
                                 ' <td><input type="radio" class="customer_id" id="" value="'+ customer.customerId +'" ></td>' +
                                 ' <td>'+ cufte(customer.customerId) +'</td>' +
                                 ' <td>'+ cufte(customer.customerId) +'</td>' +
+                                ' <td>'+ cufte(customer.customerWechatName) +'</td>' +
                                 ' <td>'+ cufte(customer.customerName) +'</td>' +
                                 ' <td>'+ cufte(customer.customerName) +'</td>' +
                                 ' <td>'+ cufte(customer.customerTel) +'</td>' +
                                 ' <td>'+ cufte(customer.customerTel) +'</td>' +
                                 ' <td style="text-align: left">'+ cufte(customer.describeTitle) +'</td>' +
                                 ' <td style="text-align: left">'+ cufte(customer.describeTitle) +'</td>' +

+ 10 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/list_wait_send_order.ftl

@@ -121,6 +121,11 @@
                     <#else>
                     <#else>
                         <a title="重新打单" href="javascript:re_print_order('${(o.salesOrderId)!}')" class="ml-5" style="text-decoration:none">重新打单</a>
                         <a title="重新打单" href="javascript:re_print_order('${(o.salesOrderId)!}')" class="ml-5" style="text-decoration:none">重新打单</a>
                     </#if>
                     </#if>
+                <#if o.salesShippingStatus == 11>
+                    <a style="text-decoration:none;" href="javascript:void(0);" title="手动发货"onclick="distribution_postFirm('手动发货','${path}/admin/await_send/to_manual_delivery?salesId=${o.salesId}','570','450');">
+                        手动发货
+                    </a>
+                </#if>
                 </td>
                 </td>
             </tr>
             </tr>
             </#list>
             </#list>
@@ -130,7 +135,7 @@
 </div>
 </div>
 <div style="position: absolute;margin-left: 20px;">
 <div style="position: absolute;margin-left: 20px;">
     <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="print-order-send"> 打单发货 </button>
     <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="print-order-send"> 打单发货 </button>
-    <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);margin-left: 20px" id="print-all-order"> 打印全部待发货订单 </button>
+    <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);margin-left: 20px" id="print-all-order"> 查询已通知配合的订单 </button>
 </div>
 </div>
 <#include "/base/page_util.ftl">
 <#include "/base/page_util.ftl">
 <script type="text/javascript">
 <script type="text/javascript">
@@ -195,6 +200,10 @@
     function openLogistics(title, url, w, h) {
     function openLogistics(title, url, w, h) {
         layer_show(title,url,w,h);
         layer_show(title,url,w,h);
     }
     }
+    /*手动发货*/
+    function distribution_postFirm(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
 </script>
 </script>
 </body>
 </body>
 </html>
 </html>

+ 98 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/manual_delivery.ftl

@@ -0,0 +1,98 @@
+<!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">
+    <title>手动发货</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="input-box"  >
+            <span class="input-dic spanhidth" style="margin-top: 5px;margin-left: 110px;">快递方式:</span>
+            <select class="my-select" name="salesPostFirm" id="salesPostFirm" style="height: 36px;width: 200px">
+                <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>
+        </div>
+
+        <div class="input-box"  >
+            <span class="input-dic spanhidth" style="margin-top: 5px;margin-left: 110px;">快递单号:</span>
+            <input type="text" class="input-text" style="height: 36px;width: 200px;margin-left: 10px;" value="" placeholder="快递单号" id="salesPostNum" name="salesPostNum">
+        </div>
+
+        <div style="text-align:center;" >
+        <#if salesId??>
+            <input type="hidden" value="${salesId!''}" id="salesId" name="salesId">
+        </#if>
+            <button type="button" class="my-btn-submit" onclick="listSalesPostFirm();">确认发货</button>
+        </div>
+
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    /**
+     * 分配快递方式
+     */
+    function listSalesPostFirm(){
+        var salesId = $("#salesId").val();
+        var salesPostFirm = $("#salesPostFirm").val();
+        var salesPostNum = $("#salesPostNum").val();
+        $.ajax('${path}/admin/await_send/manual_delivery?dates=' + new Date().getTime(), {
+            data: {"salesPostFirm":salesPostFirm,"salesPostNum" : salesPostNum,"salesId":salesId},
+            dataType: 'json',
+            type: 'post',
+            timeout: 15000,
+            success: function(dt) {
+                layer.msg('手动发货成功',{icon: 1,time:1000},function () {
+                    window.parent.location.reload();
+                    var index = parent.layer.getFrameIndex(window.name);
+                    parent.layer.close(index)
+                });
+            },
+            error: function(xhr, type, errorThrown) {
+                layer.msg("手动发货失败,请重试!", {icon: 5, time: 3000});
+            }
+        });
+    }
+
+</script>
+</body>
+</html>

+ 38 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

@@ -244,12 +244,16 @@
                                 <font color=#06c>修改</font>
                                 <font color=#06c>修改</font>
                             </a><br/>
                             </a><br/>
                         </#if>
                         </#if>
-
+                        <#if order.salesStatus == 0>
+                        <a style="text-decoration:none" href="javascript:void(0);" title="确认订单" onclick="confirm_one(${order.salesId!''})">
+                            <font color=#06c>确认订单</font>
+                        </a><br/>
+                        </#if>
                     </td>
                     </td>
                 </tr>
                 </tr>
                 </#list>
                 </#list>
             <#else>
             <#else>
-            <tr><td colspan="15" class="td-manage text-c" >暂时没有客诉信息,请添加!</td></tr>
+            <tr><td colspan="15" class="td-manage text-c" >暂时没有订单信息,请添加!</td></tr>
             </#if>
             </#if>
             </tbody>
             </tbody>
         </table>
         </table>
@@ -447,7 +451,7 @@
 
 
 
 
         /**
         /**
-         * 确认订单
+         * 批量确认订单
          */
          */
         function confirmOrder(){
         function confirmOrder(){
             var index = layer.load(1, {
             var index = layer.load(1, {
@@ -565,6 +569,37 @@
             });
             });
 
 
         })
         })
+
+
+        /**
+         * 确认订单
+         */
+        function confirm_one(salesId){
+            var index = layer.load(1, {
+                shade: [0.5,'#fff'] //0.1透明度的白色背景
+            });
+
+            var salesOrderIds = salesId;
+            $.ajax({
+                type:'POST',
+                url: '${path}/admin/salesOrder/confirm_salesOrder',
+                data:{
+                    "salesOrderIds" : salesOrderIds
+                },
+                dataType: 'json',
+                success:function(res) {
+                    if(res.resultCode == 200 && res.returnCode == 200){
+                        location.reload();
+                    }else{
+                        layer.alert("确认订单异常!", function(index){
+                            layer.close(index);
+                        });
+                        layer.close(index);
+                    }
+                    return false;
+                }
+            });
+        }
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>

+ 1 - 1
watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

@@ -27,7 +27,7 @@ $(function(){
         }else{
         }else{
             $("#selectCustomer").show();
             $("#selectCustomer").show();
             $("#salesCustomer").show();
             $("#salesCustomer").show();
-            $("#salesCustomerIdHtml").html("未选择客编号!");
+            $("#salesCustomerIdHtml").html("未选择客编号!");
         }
         }
     })
     })
 })
 })