Browse Source

优化系统功能、页面

xian 6 years ago
parent
commit
484852335f

+ 1 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/sys/Dept.java

@@ -24,6 +24,7 @@ public class Dept {
         depts.put(6, new DeptInfo(6, "工厂生产部", "PRODUCE"));
         depts.put(7, new DeptInfo(7, "管理部", "MANAGEMENT"));
         depts.put(8, new DeptInfo(8, "工厂仓库部", "WAREHOUSE"));
+        depts.put(9, new DeptInfo(9, "优尼雅", "YULIAFACTORY"));
         //7.管理部8工厂仓库部
     }
 

+ 1 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -449,6 +449,7 @@ public class AdminCustomerController {
         salesOrder.setSalesIsLocked(0); //是否锁定 0:否 1:是
         salesOrder.setSalesIsSeparate(0);   //是否缺货  0:否 1:是
         salesOrder.setSalesShippingFee(0); //邮费
+        salesOrder.setSalesDeliver(2);      // 已出库
 
         Integer adminId = AdminUtils.getLoginAdminId();
         String orderCode = GenerateKeyUtil.createOrderCode(adminId);

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

@@ -315,7 +315,7 @@ public class AwaitSendController {
         Map<String, Object> product1 = new HashMap<String, Object>();
         product1.put("GoodsName", uuid);
         product1.put("Goodsquantity", Goodsquantity);
-        // 计算产品重量
+        // 计算产品重量deliver_statistics
         product1.put("GoodsWeight", colorIsWeight/1000);
 
         commodity.add(product1);

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

@@ -71,12 +71,12 @@
             </div>
 
             <div class="row cl" id="msg" style="display: none">
-                <div class="formControls col-5 col-sm-5" style="margin-left: 200px">
+                <div class="formControls col-5 col-sm-5" style="width: 100%;margin-left: 200px">
                     <div id="iconfontId" style="display: none;">
                         <i class="Hui-iconfont" style="font-size: 70px;color: #00B83F;" >&#xe676;</i>
                     </div>
                     <div id="iconfontId2" style="display: none;">
-                        <i class="Hui-iconfont" style="font-size: 70px;color: #00B83F;">&#xe706;</i>
+                        <i class="Hui-iconfont" style="font-size: 70px;color: #ff0000;;">&#xe706;</i>
                     </div>
                     <br>
                     <span style="font-size: 30px;;margin-left: -200px" id="isMsgId">出库成功</span>

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

@@ -130,8 +130,8 @@
             </tr>
             <tr>
                 <th width="10">录入人:</th>
-                <td width="10" style="font-weight: normal;"></td>
-                    ${order.salesAdminName!''}
+                <td width="10" style="font-weight: normal;">${order.salesAdminName!''}</td>
+
                 <td width="10"></td>
                 <th width="10"></th>
                 <td width="10" style="font-weight: normal;"><span></span></td>

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

@@ -133,7 +133,7 @@
             <tbody>
             <#if page.dataList?? &&  (page.dataList?size > 0) >
                 <#list page.dataList as order>
-                <tr class="text-c">
+                <tr class="text-c order_tr" status="${order.salesShippingStatus},${order.salesDeliver},${order.salesStatus}">
                     <td width="16"><input type="checkbox" class="sales_id" value="${order.salesId!''}" ></td>
                     <td width="16">
                         <#if (order.salesCustomerId)??>
@@ -175,15 +175,7 @@
                     <td>${order.salesOrderId!''}</td>
                     <td>${order.salesBatchId!''}</td>
                     <td>${order.salesAdminName!''}</td>
-                    <td>${order.salesAddressName!''}
-                        <p>
-                            <#--<#if (order.salesAddressTel)?? && order.salesAddressTel?length gt 7>-->
-                            <#--<#else>-->
-                                <#--${order.salesAddressTel!''}-->
-                            <#--</#if>-->
-                            ${order.salesAddressTel!''}
-                        </p>
-                    </td>
+                    <td>${order.salesAddressName!''}${order.salesAddressTel!''}</td>
                     <td alt="${order.salesAddressInfo!''}" title="${order.salesAddressInfo!''}">
                         <#if order.salesAddressInfo?length gt 15>
                             ${order.salesAddressInfo?substring(0,12)}...
@@ -225,9 +217,6 @@
                         </#if>
                     </td>
                     <td>
-                        <#--<#list logisticsInfoList as logisticsInfo>
-                            <#if order.salesPostFirm??><#if order.salesPostFirm == logisticsInfo.logisticsRstCode>${logisticsInfo.logisticsName}</#if> </#if>
-                        </#list>-->
                         ${order.salesPostFirm!''}
                     <br>
                     ${order.salesPostNum!''}
@@ -240,41 +229,35 @@
                             </#list>
                         </#if>
                     </td>
-
                     <td>
                         ${(order.salesCreateTime?string("yy-MM-dd"))!''}</br>
                         ${(order.salesCreateTime?string("HH:mm:ss"))!''}
                     </td>
-                    <td>
-                        <a style="text-decoration:none" href="javascript:void(0);" title="订单详情" alt="订单详情" onclick="sales_order_detail(${order.salesId!''})">
-                            <i class="Hui-iconfont">&#xe695;</i>
+                    <td class="operating_td">
+                        <a class="confirm_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="确认订单" alt="确认订单" onclick="confirm_one(${order.salesId!''})">
+                            <i class="Hui-iconfont">&#xe615;</i>
                         </a>
-                        <a style="text-decoration:none" href="javascript:void(0);" title="修改订单" alt="修改订单" onclick="sales_order_update(${order.salesId!''})">
+                        <a class="edit_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="修改订单" alt="修改订单" onclick="sales_order_update(${order.salesId!''})">
                             <i class="Hui-iconfont">&#xe6df;</i>
                         </a>
-
-                        <#if order.salesStatus == 0>
-                            <a style="text-decoration:none" href="javascript:void(0);" title="确认订单" alt="确认订单" onclick="confirm_one(${order.salesId!''})">
-                                <i class="Hui-iconfont">&#xe615;</i>
-                            </a>
-                        <#elseif order.salesStatus == 1>
-                            <a style="text-decoration:none" href="javascript:void(0);" title="分配物流" onclick="distribution_express(${order.salesId!''})">
-                                <i class="Hui-iconfont">&#xe669;</i>
-                            </a>
-                            <#if order.salesShippingStatus != 1>
-                                <a style="text-decoration:none" href="javascript:void(0);" title="手动发货" onclick="distribution_postFirm('手动发货','${path}/admin/await_send/to_manual_delivery?salesId=${order.salesId}','570','450');">
-                                    <i class="Hui-iconfont">&#xe642;</i>
-                                </a>
-                            </#if>
-                        </#if>
-                        <#if order.salesStatus != 3>
-                            <a style="text-decoration:none" href="javascript:void(0);" title="作废订单" onclick="invalidation_order(${order.salesId!''})">
-                                <i class="Hui-iconfont">&#xe631;</i>
-                            </a>
-                        </#if>
-                        <a style="text-decoration:none" href="javascript:void(0);" title="删除订单" onclick="delSalesOrder(${order.salesId!''})">
+                        <a class="allocation_logistics_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="分配物流" onclick="distribution_express(${order.salesId!''})">
+                            <i class="Hui-iconfont">&#xe669;</i>
+                        </a>
+                        <a class="notice_distribution_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="通知配货" onclick="noticeOneOrderSend(${order.salesId})">
+                            <i class="Hui-iconfont">&#xe62f;</i>
+                        </a>
+                        <a class="manual_ship_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="手动发货" onclick="distribution_postFirm('手动发货','${path}/admin/await_send/to_manual_delivery?salesId=${order.salesId}','570','450');">
+                            <i class="Hui-iconfont">&#xe642;</i>
+                        </a>
+                        <a class="order_details_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="订单详情" alt="订单详情" onclick="sales_order_detail(${order.salesId!''})">
+                            <i class="Hui-iconfont">&#xe695;</i>
+                        </a>
+                        <a class="invalid_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="作废订单" onclick="invalidation_order(${order.salesId!''})">
+                            <i class="Hui-iconfont">&#xe631;</i>
+                        </a>
+                        <a class="del_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="删除订单" onclick="delSalesOrder(${order.salesId!''})">
                             <i class="Hui-iconfont">&#xe609;</i>
-                        </a><br/>
+                        </a>
                     </td>
                 </tr>
                 </#list>
@@ -286,9 +269,9 @@
 
         <#if identity != 2>
             <div style="float: left;margin-top: 20px;">
-                <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="noticeDistribution()">通知配货</button>
                 <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="confirmOrder()">确认订单</button>
                 <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="distribution_express(null)">分配物流</button>
+                <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="noticeDistribution()">通知配货</button>
                 <button type="button" onClick="upFiles2();"  class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;">上传发货信息</button>
                 <button onClick="downloadOrderPage();" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" type="button" title="下载订单">下载订单</button>
             </div>
@@ -308,12 +291,71 @@
     var editorType;
     var _editor;
 
+    $(function() {
+       var trs = $(".order_tr");
+       if (trs != null && trs.length >= 1) {
+           for (var i = 0; i < trs.length; i++) {
+               var tr = $(trs[i]);
+               var status = tr.attr("status").split(",");
+               // 订单状态  0:未发货、1:已打单、3:备货中、4:收货、11:已通知配货
+               var orderStatus = status[0];
+               // 出库状态  1:未出库、2:已出库
+               var deliverStatus = status[1];
+               // 确认状态  0:未确认、1:确认、2:挂起、3:作废
+               var confimStatus = status[2];
+               if (confimStatus == "2" || confimStatus == "3") {
+                   // 挂起、作废
+                   tr.find(".order_details_target").show();
+               } else {
+                   if (confimStatus == "0") {
+                       // 未确认
+                       tr.find(".confirm_order_target").show();
+                       tr.find(".edit_order_target").show();
+                       tr.find(".allocation_logistics_target").show();
+                       tr.find(".invalid_order_target").show();
+                       tr.find(".del_order_target").show();
+                       tr.find(".order_details_target").show();
+                   } else {
+                       // 已确认
+                       if (orderStatus == "11") {
+                           // 已通知配货
+                           if (deliverStatus == "1") {
+                               // 未出库
+                               tr.find(".order_details_target").show();
+                               tr.find(".allocation_logistics_target").show();
+                               tr.find(".manual_ship_target").show();
+                               tr.find(".invalid_order_target").show();
+                               tr.find(".del_order_target").show();
+                           } else {
+                               // 已出库
+                               tr.find(".order_details_target").show();
+                               tr.find(".invalid_order_target").show();
+                           }
+                       } else if (orderStatus == "0") {
+                           // 未发货
+                           tr.find(".order_details_target").show();
+                           tr.find(".allocation_logistics_target").show();
+                           tr.find(".manual_ship_target").show();
+                           tr.find(".invalid_order_target").show();
+                           tr.find(".notice_distribution_target").show();
+                           tr.find(".del_order_target").show();
+                       } else {
+                           tr.find(".order_details_target").show();
+                           tr.find(".invalid_order_target").show();
+                       }
+                   }
+               }
+           }
+       }
+    });
+
     /**
      *跳转到详情页面
      * @param employee
      */
     function sales_order_detail(orderSaleId) {
-        window.location.href= "${path}/admin/salesOrder/select_sales_order?salesId="+orderSaleId;
+        //window.location.href= "${path}/admin/salesOrder/select_sales_order?salesId="+orderSaleId;
+        layer_show("订单详情","${path}/admin/salesOrder/select_sales_order?salesId="+orderSaleId,800,600);
     }
 
     /*手动发货*/
@@ -321,6 +363,29 @@
         layer_show(title,url,w,h);
     }
 
+    /* 通知配货 */
+    function noticeOneOrderSend(id) {
+        $.ajax({
+            type:'POST',
+            url: '${path}/admin/salesOrder/notice_distribution',
+            data:{
+                "salesOrderIds" : id
+            },
+            dataType: 'json',
+            success:function(res) {
+                if(res.resultCode == 200 && res.returnCode == 200){
+                    location.reload();
+                }else{
+                    layer.alert("通知配货异常!请检查订单状态与物流公司,异常订单ID:"+res.resultMsg, function(indexy){
+                        layer.close(indexy);
+                    });
+                    layer.close(index);
+                }
+                return false;
+            }
+        });
+    }
+
     /**
      *跳转到修改页面
      * @param employee
@@ -741,7 +806,9 @@ function isConfirm(salesOrderIds,isSplit) {
          * @param employee
          */
         function admin_details_customer(customerId) {
-            window.location.href= "${path}/admin/customer/_customer_info?customerId="+customerId;
+
+            layer_show("客诉详情","${path}/admin/customer/_customer_info?customerId="+customerId,800,600);
+            // window.location.href= "${path}/admin/customer/_customer_info?customerId="+customerId;
         }
     </script>
 </body>