liujiankang 6 rokov pred
rodič
commit
276ddbef59

+ 7 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java

@@ -230,4 +230,11 @@ public interface SalesOrderService {
      * @return
      */
     Integer confirmSalesOrder(Integer salesId);
+
+    /**
+     * 批量分配快递方式
+     * @param salesOrder
+     * @return
+     */
+    Integer listSalesPostFirm(SalesOrder salesOrder);
 }

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -852,5 +852,10 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         return flag;
     }
 
+    @Override
+    public Integer listSalesPostFirm(SalesOrder salesOrder) {
+        return salesOrderMapper.listSalesPostFirm(salesOrder);
+    }
+
 
 }

+ 7 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java

@@ -184,4 +184,11 @@ public interface SalesOrderMapper {
      */
     Integer noticeDistribution(SalesOrder salesOrder);
 
+    /**
+     * 批量分配快递方式
+     * @param salesOrder
+     * @return
+     */
+    Integer listSalesPostFirm(SalesOrder salesOrder);
+
 }

+ 10 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml

@@ -800,4 +800,14 @@
           sales_id = #{salesId}
     </update>
 
+
+    <!-- 批量分配快递方式 -->
+    <update id="listSalesPostFirm" parameterType="SalesOrder" >
+        update tb_rst_sales_order_info
+        SET
+        sales_post_firm = #{salesPostFirm}
+        WHERE
+        sales_batch_id = #{salesBatchId}
+        and sales_shipping_status != 1
+    </update>
 </mapper>

+ 46 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderBatchController.java

@@ -1,5 +1,6 @@
 package com.iamberry.rst.controllers.order;
 
+import com.iamberry.rst.core.cm.ComplaintSignclosedInfo;
 import com.iamberry.rst.core.cm.SalesOrder;
 import com.iamberry.rst.core.order.OrderBatch;
 import com.iamberry.rst.core.page.PagedResult;
@@ -86,4 +87,49 @@ public class AdminOrderBatchController {
     }
 
 
+    /**
+     * 按照批次分配快递方式
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("salesOrder:confirm:salesOrder")
+    @RequestMapping("/list_SalesPostFirm")
+    public ResponseJson listSalesPostFirm(HttpServletRequest request, SalesOrder salesOrder) {
+        ResponseJson rj = ResponseJson.getFAILURE();
+        if(salesOrder == null){
+            return rj;
+        }
+        if(salesOrder.getSalesPostFirm() == null || salesOrder.getSalesBatchId() == null){
+            return rj;
+        }
+        /*分配到该批次下的所有订单*/
+        Integer flag = 0;
+        try{
+            flag = salesOrderService.listSalesPostFirm(salesOrder);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        if(flag < 0){
+            return rj;
+        }else{
+            rj = ResponseJson.getSUCCESS();
+            return rj;
+        }
+
+    }
+
+    /**
+     * 跳转到分配快递方式页面
+     *
+     * @return
+     */
+    @RequiresPermissions("salesOrder:confirm:salesOrder")
+    @RequestMapping(value = "/to_distribution_postFirm")
+    public ModelAndView toDistributionPostFirm(HttpServletRequest request,String batchId) {
+        ModelAndView mv = new ModelAndView("order/bacth/distribution_postFirm");
+        mv.addObject("batchId",batchId);
+        return mv;
+    }
+
 }

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/login.ftl

@@ -61,7 +61,7 @@
                         <input type="checkbox" name="online" id="remember_me" value="">&nbsp;&nbsp;使我保持登录状态</label>
                 </div>
             </div>
-            <div>
+            <div class="row loginbox_btn">
                 <div class="formControls col-8 col-offset-3">
                     <input name="" id="login-btn" type="submit" class="btn btn-block btn-primary radius size-L my-btn-login" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
                 </div>

+ 92 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/bacth/distribution_postFirm.ftl

@@ -0,0 +1,92 @@
+<!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: 12px;margin-left: 120px;">快递方式:</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 style="text-align:center;" >
+        <#if batchId??>
+            <input type="hidden" value="${batchId!''}" id="batchId" name="batchId">
+        </#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 batchId = $("#batchId").val();
+        var salesPostFirm = $("#salesPostFirm").val();
+        $.ajax('${path}/admin/order_batch/list_SalesPostFirm?dates=' + new Date().getTime(), {
+            data: {"salesBatchId":batchId,"salesPostFirm" : salesPostFirm},
+            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>

+ 8 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/order/bacth/order_batch_list.ftl

@@ -55,7 +55,7 @@
             <th width="80">店铺</th>
             <th width="50">订单数量</th>
             <th width="50">待审核数量</th>
-            <th width="50">发货数量</th>
+            <th width="50">发货数量</th>
             <th width="50">已发货数量</th>
             <#--<th width="100">Excel下载</th>-->
             <#--<th width="80">交易号下载</th>-->
@@ -85,7 +85,9 @@
                                         确认订单
                                     </a>
                                 </#if>
-
+                                <a style="text-decoration:none;color: #00E;" href="javascript:void(0);" title="分配快递方式"onclick="distribution_postFirm('分配快递方式','${path}/admin/order_batch/to_distribution_postFirm?batchId=${batch.batchId!''}','570','450');">
+                                    分配快递方式
+                                </a>
                             </td>
                         </tr>
                     </#list>
@@ -152,6 +154,10 @@
         });
     }
 
+    /*分配快递方式*/
+    function distribution_postFirm(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
 </script>
 </body>
 </html>

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

@@ -44,7 +44,7 @@
             <th width="80">收货地址</th>
             <th width="80">订单产品</th>
             <th width="40">发货状态</th>
-            <th width="40">客户备注</th>
+            <#--<th width="40">客户备注</th>-->
             <th width="40">后台备注</th>
             <th width="40">下单时间</th>
             <th width="50">操作</th>
@@ -82,7 +82,7 @@
                         <p class="label radius"><a href="#">${(o.salesPostFirm)!}-${(o.salesPostNum)!}</a></p>
                     </#if>
                 </td>
-                <td>${(o.salesUserRemark)!}</td>
+                <#--<td>${(o.salesUserRemark)!}</td>-->
                 <td>${(o.salesAdminRemark)!}</td>
                 <td>${(o.salesCreateTime?string("yyyy-MM-dd"))!}</td>
                 <td class="td-manage">

+ 4 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl

@@ -173,7 +173,7 @@
             var produceModel =  produce.produceModel;        //获取产品型号后两位
             var produceName = produce.produceName;            //获取产品名称
             var produceBrand = produce.produceBrand;            //获取品牌字母
-
+            produceCreateTime = formatDate(new Date());
             var machineNo = "NO." + $("#"+machineBarcode+"Id").val();
             for (var i = 0; i < settingNumber; i++) {
                 code128(machineBarcode);
@@ -188,7 +188,7 @@
                         '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
                         '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
                         '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
-                        '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;">'+ machineNo +'</span>' +
+                        '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;">'+ produceCreateTime +'</span>' +
                         '</div>');
                 /*}*/
                 /*if (machineProduceType == 2) {//冲奶机模板
@@ -350,7 +350,7 @@
         var produceModel =  produce.produceModel;        //获取产品型号后两位
         var produceName = produce.produceName;            //获取产品名称
         var produceBrand = produce.produceBrand;            //获取品牌字母
-
+        produceCreateTime = formatDate(new Date());
         for (var i=0;i<settingNumber;i++){
             code128(machineBarcode);
             var barcodes = $("#bcTarget").html();
@@ -363,7 +363,7 @@
                     '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
                     '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
                     '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
-                    '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;">'+ machineNo +'</span>' +
+                    '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;">'+ produceCreateTime +'</span>' +
                     '</div>');
             /*}*/
             /*if(machineProduceType == 2){//冲奶机模板