Pārlūkot izejas kodu

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

# Conflicts:
#	watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java
liujiankang 5 gadi atpakaļ
vecāks
revīzija
73ce3e21d8

+ 11 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java

@@ -155,6 +155,9 @@ public class SalesOrder implements Serializable {
     private Integer takeToBe;//待揽件数量
     private Integer tookTimeout;//揽件超时数量
     private Integer tookAbnormal;//揽件异常数量
+    private Integer haveOutbound;//已出库数量
+
+
     private String salesPostFirmName;//快递公司名称
 
     private Integer dealerId;//客户id
@@ -935,6 +938,14 @@ public class SalesOrder implements Serializable {
         this.tookAbnormal = tookAbnormal;
     }
 
+    public Integer getHaveOutbound() {
+        return haveOutbound;
+    }
+
+    public void setHaveOutbound(Integer haveOutbound) {
+        this.haveOutbound = haveOutbound;
+    }
+
     public List<ComplaintDetectInfo> getComplaintDetectInfoList() {
         return complaintDetectInfoList;
     }

+ 9 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/InventoryInfo.java

@@ -35,6 +35,7 @@ public class InventoryInfo implements Serializable{
     private String warehouseName;//仓库名称
 
     private Integer logType;//类型1.采购 2.发货 3.次品
+    private Integer productIsCombination;//是否组合产品 1.否。2是
 
     public Integer getInventoryId() {
         return inventoryId;
@@ -227,4 +228,12 @@ public class InventoryInfo implements Serializable{
     public void setLogType(Integer logType) {
         this.logType = logType;
     }
+
+    public Integer getProductIsCombination() {
+        return productIsCombination;
+    }
+
+    public void setProductIsCombination(Integer productIsCombination) {
+        this.productIsCombination = productIsCombination;
+    }
 }

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

@@ -2109,7 +2109,8 @@
         sum(CASE WHEN (sales_deliver = 1 AND sales_shipping_status = 1 AND sales_status = 1 AND sales_post_firm IS NOT NULL) then 1 else 0 end) AS outbound,
         sum(CASE WHEN (sales_deliver = 2 AND sales_shipping_status = 1 AND sales_status = 1 AND sales_post_firm IS NOT NULL AND order_case_date IS NULL) then 1 else 0 end) AS takeToBe,
         sum(CASE WHEN (sales_deliver = 2 AND sales_shipping_status = 1 AND sales_status = 1 AND sales_post_firm IS NOT NULL AND order_case_date IS NULL AND TIMESTAMPDIFF(HOUR,sales_deliver_time,NOW()) &gt;= 3 AND TIMESTAMPDIFF(HOUR,sales_deliver_time,NOW()) &lt;= 24) then 1 else 0 end) AS tookTimeout,
-        sum(CASE WHEN (sales_deliver = 2 AND sales_shipping_status = 1 AND sales_status = 1 AND sales_post_firm IS NOT NULL AND order_case_date IS NULL AND TIMESTAMPDIFF(HOUR,sales_deliver_time,NOW()) &gt;= 24) then 1 else 0 end) AS tookAbnormal
+        sum(CASE WHEN (sales_deliver = 2 AND sales_shipping_status = 1 AND sales_status = 1 AND sales_post_firm IS NOT NULL AND order_case_date IS NULL AND TIMESTAMPDIFF(HOUR,sales_deliver_time,NOW()) &gt;= 24) then 1 else 0 end) AS tookAbnormal,
+        sum(CASE WHEN (TO_DAYS(sales_deliver_time) = TO_DAYS(NOW())  ) then 1 else 0 end) AS haveOutbound
         FROM
         tb_rst_sales_order_info
         WHERE

+ 2 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/inventoryMapper.xml

@@ -89,7 +89,8 @@
     pi.product_number,
     pi.product_abbreviation,
     pc.color_name,
-    ow.warehouse_name
+    ow.warehouse_name,
+    pi.product_is_combination
     from
     tb_rst_fm_inventory fi
     LEFT jOIN tb_rst_product_color pc on fi.inventory_product_color_id  = pc.color_id

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

@@ -542,6 +542,10 @@ public class AdminCustomerController {
         List<ProcType> procTypeList = customerService.listProcType();
         //店铺(销售渠道)
         List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
+        //客诉问题
+        ComplaintQuestionInfo complaintQuestionInfo = new ComplaintQuestionInfo();
+        List<ComplaintQuestionInfo> listComplaintQuestionInfo = complaintQuestionInfoService.listQuestionAll(complaintQuestionInfo);
+
         //查询问题集合   第 30 条bug
 //        List<QuestionDescribe> questionDescribeList = questionDescribeService.listQuestionDescribe(new QuestionDescribe());
         //查询跟进客服集合
@@ -549,7 +553,7 @@ public class AdminCustomerController {
         admin.setAdminDept(3);
         admin.setAdminStatus(1);
         List<Admin> adminList = sysService.listSelectAdmin(admin);
-
+        mv.addObject("listComplaintQuestionInfo",listComplaintQuestionInfo);
         mv.addObject("complaintSmallClassInfoList", complaintSmallClassInfoList);
         mv.addObject("loginAdminId", loginAdminId);
         mv.addObject("typeList", typeList);

+ 16 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -2193,4 +2193,20 @@ public class AdminSalesOrderController {
         }
     }
 
+    /**
+     * 获取订单统计数量
+     *
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequestMapping("/getStatusNum")
+    public ResponseJson getStatusNum(HttpServletRequest request) throws Exception {
+        ResponseJson rj =  new ResponseJson(200, "SUCCESS", 200);
+        SalesOrder orderNum = salesOrderService.getStatusNum();//查询订单各个状态数量
+        Admin admin = AdminUtils.getLoginAdmin();
+        rj.addResponseKeyValue("orderNum",orderNum);
+        rj.addResponseKeyValue("admin",admin);
+        return rj;
+    }
 }

+ 38 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl

@@ -122,6 +122,14 @@
                     </#list>
                 </#if>
             </select>
+             <select class="chosen" name="questionId" id="questionId" style="height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
+                 <option value="">请选择客户问题</option>
+                    <#if (listComplaintQuestionInfo?size > 0)>
+                        <#list listComplaintQuestionInfo as info>
+                                <option value ="${info.questionId!}" <#if customerInfo.questionId ??><#if (customerInfo.questionId == info.questionId)>selected="selected"</#if></#if>>${info.questionName!""}</option>
+                        </#list>
+                    </#if>
+             </select>
             <select class="my-select" name="storeId" id="storeId" style="height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
             <option value="">店铺名称</option>
         <#if listStoreInfo?? &&  (listStoreInfo?size > 0) >
@@ -147,6 +155,15 @@
                 <option value="1" <#if customerInfo.detectPlaceorder??><#if customerInfo.detectPlaceorder == 1 >selected="selected"</#if></#if>>未下单</option>
                 <option value="2" <#if customerInfo.detectPlaceorder??><#if customerInfo.detectPlaceorder == 2 >selected="selected"</#if></#if>>已下单</option>
             </select>
+            <select class="my-select" name="tagFlag" id="tagFlag" style="height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
+            <option value="">旗帜状态</option>
+                <option value="1" <#if customerInfo.tagFlag??><#if customerInfo.tagFlag == 1 >selected="selected"</#if></#if>>红色</option>
+                <option value="2" <#if customerInfo.tagFlag??><#if customerInfo.tagFlag == 2 >selected="selected"</#if></#if>>黄色</option>
+                <option value="3" <#if customerInfo.tagFlag??><#if customerInfo.tagFlag == 3 >selected="selected"</#if></#if>>绿色</option>
+                <option value="4" <#if customerInfo.tagFlag??><#if customerInfo.tagFlag == 4 >selected="selected"</#if></#if>>蓝色</option>
+                <option value="5" <#if customerInfo.tagFlag??><#if customerInfo.tagFlag == 5 >selected="selected"</#if></#if>>紫色</option>
+            </select>
+
          </div>
         </form>
     </div>
@@ -187,19 +204,19 @@
                             <td>
                                 <#if customer.tagFlag??>
                                     <#if customer.tagFlag == 1>
-                                        <img style="width: 20px;height: 20px;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/hong.png"><br />
+                                        <img style="width: 20px;height: 20px;cursor: pointer;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/hong.png"><br />
                                     </#if>
                                     <#if customer.tagFlag == 2>
-                                        <img style="width: 20px;height: 20px;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/huang.png"><br />
+                                        <img style="width: 20px;height: 20px;cursor: pointer;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/huang.png"><br />
                                     </#if>
                                     <#if customer.tagFlag == 3>
-                                        <img style="width: 20px;height: 20px;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/lv.png"><br />
+                                        <img style="width: 20px;height: 20px;cursor: pointer;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/lv.png"><br />
                                     </#if>
                                     <#if customer.tagFlag == 4>
-                                        <img style="width: 20px;height: 20px;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/lan.png"><br />
+                                        <img style="width: 20px;height: 20px;cursor: pointer;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/lan.png"><br />
                                     </#if>
                                     <#if customer.tagFlag == 5>
-                                        <img style="width: 20px;height: 20px;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/zi.png"><br />
+                                        <img style="width: 20px;height: 20px;cursor: pointer;" title="${customer.tagDesc!''}" onclick="openLogistics('查看标记记录','${path}/admin/customer/to_tag_list?customerId=${customer.customerId!''}','570','450');" src="/common/images/cm/zi.png"><br />
                                     </#if>
                                 </#if>
 
@@ -874,7 +891,22 @@
 //        var val = $(this).val().replace(/\s/g, "");
 //        $(this).val(val);
 //    })
-
+    $('.chosen').chosen({
+        no_results_text: "没有找到结果!",//搜索无结果时显示的提示
+        search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
+        disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
+        disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
+        inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
+        placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+        width: '9%', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        max_shown_results: 1000, //下拉框最大显示选项数量
+        display_disabled_options: false,
+        single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
+        case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
+        group_search: false, //选项组是否可搜。此处搜索不可搜
+        include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
+    });
 </script>
 </body>
 </html>

+ 16 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inventory/inventory_list.ftl

@@ -114,18 +114,22 @@
                     <td class="text-c" width="150">${info.inventoryRecentRecord!}</td>
                     <!-- 遍历操作 -->
                     <td class="td-manage text-c">
-                        <a style="text-decoration:none" href="javascript:;" title="增加库存"
-                           onclick="update('增加库存','${path}/admin/inventory/to_update_inventory?inventoryId=${info.inventoryId!''}&operationType=2','570','450');">
-                            <i class="Hui-iconfont">入库</i>
-                        </a>
-                        <a style="text-decoration:none" href="javascript:;" title="减少库存"
-                           onclick="update('减少库存','${path}/admin/inventory/to_update_inventory?inventoryId=${info.inventoryId!''}&operationType=1','570','450');">
-                            <i class="Hui-iconfont">出库</i>
-                        </a>
-                        <a style="text-decoration:none" href="javascript:;" title="出入库记录"
-                           onclick="getInventoryLog('${path}/admin/inventory/select_inventoryLog_list?logProductBar=${info.inventoryProductBar!''}&logWarehouseId=${info.warehouseId!''}');">
-                            <i class="Hui-iconfont">出入库记录</i>
-                        </a>
+                        <#if info.productIsCombination??>
+                            <#if info.productIsCombination == 1>
+                            <a style="text-decoration:none" href="javascript:;" title="增加库存"
+                               onclick="update('增加库存','${path}/admin/inventory/to_update_inventory?inventoryId=${info.inventoryId!''}&operationType=2','570','450');">
+                                <i class="Hui-iconfont">入库</i>
+                            </a>
+                            <a style="text-decoration:none" href="javascript:;" title="减少库存"
+                               onclick="update('减少库存','${path}/admin/inventory/to_update_inventory?inventoryId=${info.inventoryId!''}&operationType=1','570','450');">
+                                <i class="Hui-iconfont">出库</i>
+                            </a>
+                            <a style="text-decoration:none" href="javascript:;" title="出入库记录"
+                               onclick="getInventoryLog('${path}/admin/inventory/select_inventoryLog_list?logProductBar=${info.inventoryProductBar!''}&logWarehouseId=${info.warehouseId!''}');">
+                                <i class="Hui-iconfont">出入库记录</i>
+                            </a>
+                            </#if>
+                        </#if>
                     </td>
                 </tr>
                 </#list>

+ 38 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/home/pc_index.ftl

@@ -105,7 +105,6 @@
             <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?salesShippingStatus=0',1,'',this)"  ><span>(</span><span id="toBeAnnounced" style="color: #f00">0</span><span>)待通知配货数量</span></a><br>
             <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?salesShippingStatus=11',1,'',this)"  ><span>(</span><span id="toBeDelivered" style="color: #f00">0</span><span>)待发货数量</span></a><br>
             <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?1=1',1,'today',this)"  ><span>(</span><span id="allToDayOrder" style="color: #f00">0</span><span>)今日订单总数</span></a><br>
-
             <#--<div>客诉</div>-->
             <#--<a onclick="toOrserList('${path}/admin/customer/select_customer_list?customerIsSolve=2&isFirst=1',2,'')"  ><span>(</span><span id="notSolvedCustomer" style="color: #f00">0</span><span>)未解决客诉数量</span></a><br>-->
             <#--<a onclick="toOrserList('${path}/admin/customer/select_customer_list?backStatus=4&isFirst=1',2,'')"  ><span>(</span><span id="amountReceivedCustomer" style="color: #f00">0</span><span>)需要向工厂确认是否已签收的产品数量</span></a><br>-->
@@ -121,6 +120,8 @@
         <li id="closeall">关闭全部 </li>
     </ul>
 </div>
+
+
 </body>
 <script type="text/javascript" src="${path}/common/js/index/index.js"></script>
 <script type="text/javascript" src="${path}/common/lib/layer/2.4/layer.js"></script>
@@ -136,6 +137,22 @@
             shade: 0
         });
     }
+    function toDoShow2(playSingle,outbound){
+        //页面层
+        layer.open({
+            type: 1
+            ,title: '待处理订单提醒'
+            ,offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
+            ,id: 'layerDemo1' //防止重复弹出
+            ,content: '<div style="padding: 7px 100px;"><strong>待打单:</strong>'+playSingle+'</div><br><div style="padding: 7px 100px;"><strong>待出库:</strong>'+outbound+'</div>'
+            ,btn: '知道了'
+            ,btnAlign: 'c' //按钮居中
+            ,shade: 0 //不显示遮罩
+            ,yes: function(){
+                layer.close(layer.index);
+            }
+        });
+    }
     function toOrserList(url,type,type2, obj){
         var titleText = "";
         if (type === 1) {
@@ -172,6 +189,26 @@
                 alert("操作失败,请联系管理员!");
             }
         });
+
+        $.ajax({
+            "type" : "post",
+            "url" : "${path}/admin/salesOrder/getStatusNum",
+            /*"url" : "/admin/order/selectTodo",*/
+            "dataType" : "json",
+            async:false,
+            "success" : function(data) {
+                if(data.returnCode == 200){
+                    /*if(data.returnMsg.admin.adminId === 10061 || data.returnMsg.admin.adminId === 10056|| data.returnMsg.admin.adminId === 10055){
+                        toDoShow2(data.returnMsg.orderNum.playSingle,data.returnMsg.orderNum.outbound);
+                    }*/
+
+                }
+
+            },
+            "error":function(data){
+                alert("操作失败,请联系管理员!");
+            }
+        });
     });
 </script>
 </html>

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

@@ -49,6 +49,7 @@
 
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl">
+        <pre style="font-size: 10px;margin-top: -1%;">今日已出库数量:<span id="haveOutbound">0</span>&nbsp;&nbsp;待出库数量:<span id="outbound">0</span></pre>
         <form action="${path}/admin/await_send/deliver" method="post" class="form form-horizontal" id="form-order-add"  >
 
             <div class="row cl">
@@ -189,6 +190,11 @@
                             }
                         }
                         $("#productHtml").html(html);
+                        //减少已发货数量
+                        var outbound = $("#outbound").html();
+                        var haveOutbound = $("#haveOutbound").html();
+                        $("#outbound").html( parseInt(outbound) - parseInt(1) );
+                        $("#haveOutbound").html(parseInt(haveOutbound) + parseInt(1));
                     }else{
                         $("#iconfontId").hide();
                         $("#iconfontId2").show();
@@ -211,6 +217,23 @@
     $(function (){
 //        getdeliver(1);
 //        getdeliver(2);
+        $.ajax({
+            "type" : "post",
+            "url" : "${path}/admin/salesOrder/getStatusNum",
+            /*"url" : "/admin/order/selectTodo",*/
+            "dataType" : "json",
+            async:false,
+            "success" : function(data) {
+                if(data.returnCode == 200){
+                    $("#outbound").html(data.returnMsg.orderNum.outbound);
+                    $("#haveOutbound").html(data.returnMsg.orderNum.haveOutbound);
+                }
+
+            },
+            "error":function(data){
+                alert("操作失败,请联系管理员!");
+            }
+        });
     })
 
     /**

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl