Kaynağa Gözat

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

# Conflicts:
#	watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
wangxiaoming 7 yıl önce
ebeveyn
işleme
302d59459f

+ 48 - 8
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -7,8 +7,8 @@ import com.iamberry.rst.core.sys.Admin;
 import com.iamberry.rst.faces.cm.*;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.faces.sys.SysService;
+import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
-import com.iamberry.rst.faces.address.AddressService;
 import com.iamberry.rst.faces.cm.CompanyInfoService;
 import com.iamberry.rst.faces.cm.SalesOrderService;
 import com.iamberry.rst.faces.cm.StoreInfoService;
@@ -23,10 +23,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
 import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
  * Created by wxm
@@ -52,11 +51,6 @@ public class AdminCustomerController {
     @Autowired
     private VisitService visitService;
 
-    public AdminCustomerController() {
-    }
-
-
-
     /**
      * 获取客诉列表
      *
@@ -263,5 +257,51 @@ public class AdminCustomerController {
             return new ResponseJson(500, "修改失败!", 500);
         }
     }
+
+    /**
+     * 查询客服
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:add:customer")
+    @RequestMapping("/select_sys_admin")
+    public ResponseJson selectSysAdmin(HttpServletRequest request) {
+        ResponseJson rj = new ResponseJson(200, "修改成功!", 200);
+        Integer adminId = AdminUtils.getLoginAdminId();
+        Admin admin = new Admin();
+        List<Admin> adminList = sysService.listSelectAdmin(admin);
+        if (adminList.size()> 0) {
+            rj.addResponseKeyValue("adminList",adminList);
+            rj.addResponseKeyValue("adminId",adminId);
+            return rj;
+        } else {
+            return new ResponseJson(500, "修改失败!", 500);
+        }
+    }
+
+    /**
+     * 查询产品类型
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:add:customer")
+    @RequestMapping("/select_produce_type")
+    public ResponseJson selectProduceType(HttpServletRequest request) {
+        ResponseJson rj = new ResponseJson(200, "修改成功!", 200);
+
+        ProductType productType = new ProductType();
+        List<ProductType> productTypeList = productService.listProductType(productType);
+
+        if (productTypeList != null && productTypeList.size()> 0) {
+            rj.addResponseKeyValue("productTypeList",productTypeList);
+            return rj;
+        } else {
+            return new ResponseJson(500, "修改失败!", 500);
+        }
+    }
+
+
 }
 

+ 12 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/produceUtil.java

@@ -0,0 +1,12 @@
+package com.iamberry.rst.utils;
+
+/**
+ * 产品util类
+ */
+public class produceUtil {
+
+    /*产品颜色:  新建客诉页面颜色  批次颜色*/
+    public static final String[] PRODUCE_COLOR = {"黑色","白色","金色","红色","蓝色","绿色","橙色","黄色","青色","紫色"};
+
+
+}

+ 153 - 18
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl

@@ -70,12 +70,8 @@
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>跟进客服:</label>
                 <div class="formControls col-4 col-sm-4"> <span class="select-box">
-				<select name="" class="select">
-					<option value="0">薇薇</option>
-					<option value="1">薇薇</option>
-					<option value="11">薇薇</option>
-					<option value="12">薇薇</option>
-					<option value="13">薇薇</option>
+				<select name="adminId" id="adminId" class="select">
+
 				</select>
 				</span>
                 </div>
@@ -84,7 +80,7 @@
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>来源入口:</label>
                 <div class="formControls col-10 col-sm-10 skin-minimal">
                     <div class="radio-box">
-                        <input type="radio" id="tel-1" name="sex" datatype="*" nullmsg="请选择来源入口!">
+                        <input type="radio" id="tel-1" name="sex" datatype="*"  checked nullmsg="请选择来源入口!">
                         <label for="tel-1">400电话</label>
                     </div>
                     <div class="radio-box">
@@ -102,15 +98,30 @@
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>咨询类型:</label>
                 <div class="formControls col-10 col-sm-10 skin-minimal">
                     <div class="radio-box">
-                        <input type="radio" id="tel-3" name="customerCounselType" datatype="*" nullmsg="请选择咨询类型!">
+                        <input type="radio" id="tel-3" name="customerCounselType" datatype="*" checked nullmsg="请选择咨询类型!" >
                         <label for="tel-3">售前咨询</label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio" id="tel-4" name="tel">
+                        <input type="radio" id="tel-4" name="customerCounselType" datatype="*" nullmsg="请选择咨询类型!">
                         <label for="tel-4">售后咨询</label>
                     </div>
                 </div>
             </div>
+
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
+                <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
+                    <div class="radio-box">
+                        <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
+                        <label for="tel-3">净水机</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
+                        <label for="tel-4">冲奶机</label>
+                    </div>
+                </div>
+            </div>
+
             <div class="row cl" style="position: relative;">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
                 <div class="formControls col-2 col-sm-2"> <span class="select-box">
@@ -204,7 +215,7 @@
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-10 col-sm-10">
-                    <ul class="time-line-list">
+                    <ul class="time-line-list" id="processResultStatus">
                         <li><span class="arrow"></span><div class="number">1</div><div>录入客诉</div></li>
                         <li><span class="arrow"></span><div class="number">2</div><div>督促用户寄回</div></li>
                         <li><span class="arrow"></span><div class="number">3</div><div>录入快递单号</div></li>
@@ -470,11 +481,7 @@
 <script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
 <script type="text/javascript">
     $(function(){
-        $('.skin-minimal input').iCheck({
-            checkboxClass: 'icheckbox-blue',
-            radioClass: 'iradio-blue',
-            increaseArea: '20%'
-        });
+
 /*        $("#province").ProvinceCity();
         $('.skin-minimal input').iCheck({
             checkboxClass: 'icheckbox-blue',
@@ -496,12 +503,33 @@
 
 </script>
 <script type="text/javascript">
+
+    /*处理结果的执行状态*/
+    var isSolve = {
+        solved : {},
+        noSolved : {},
+        renewed : {"录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"},
+        maintain : {"录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"},
+        reissue : {"录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"},
+        backGoods :{"录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"},
+        noReasonBack :{"录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"}
+    }
+
     /*初始化页面参数*/
     $(function () {
 
         /*初始化问题分类*/
         initComplaintTypeInfo();
 
+        /*初始化客服*/
+        initSysAdmin();
+
+        /*初始化产品类型*/
+        initProduceType();
+
+        /*初始化选择处理结果*/
+        initProcessResult(1);
+
         /*监听问题类型 选择事件*/
         $("[name='complaintId']").change(function(){
             initComplaintSmallClassInfo($(this).val());
@@ -529,8 +557,102 @@
             var city = $("#city").val();
             setDistrict("",city,2)
         });
+
+        /* 初始化单选框样式 */
+        $('.skin-minimal input').iCheck({
+            checkboxClass: 'icheckbox-blue',
+            radioClass: 'iradio-blue',
+            increaseArea: '20%'
+        });
     })
 
+    /*初始化客服*/
+    function initSysAdmin() {
+        var html = "";
+        $.ajax({
+            type: "POST",
+            data: {
+            },
+            url: "${path}/admin/customer/select_sys_admin",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.adminList.length;i++){
+                        var adminList = data.returnMsg.adminList[i];
+                        if(data.returnMsg.adminId != null && data.returnMsg.adminId != "" && data.returnMsg.adminId == adminList.adminId ){
+                            html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
+                        }else{
+                            html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
+                        }
+                    }
+                }else{
+                    html = '';
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+        $("#adminId").html(html);
+    }
+
+    /*初始化产品类型*/
+    function initProduceType(){
+        var html = "";
+        $.ajax({
+            type: "POST",
+            data: {
+            },
+            url: "${path}/admin/customer/select_produce_type",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var check = "checked";
+                    for(var i=0;i<data.returnMsg.productTypeList.length;i++){
+                        var produce = data.returnMsg.productTypeList[i];
+                        html += ' <div class="radio-box">' +
+                                '<input type="radio" id="tel-3" name="produceType" datatype="*" value="'+ produce.typeId +'"  '+ check +' nullmsg="请选择产品类型!" >' +
+                                ' <label for="tel-3">'+ produce.typeName +'</label>' +
+                                ' </div>';
+                        check = "";
+                    }
+                }else{
+                    html = '';
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+        $("#produceTypeHtml").html(html);
+    }
+
+    /**
+     * 选择处理结果-- 默认选择已解决
+     * type : 0 :已解决  1:未解决  2:换新  3:维修  4:补发   5:退货  6:无理由退货
+     */
+    function initProcessResult(type){
+        if(type == null || type == ""){
+            type = 0;
+        }
+        var statusHtml = ' <li><span class="arrow"></span><div class="number">status_index</div><div>status_html</div></li>';
+        var resultHtml = '';
+        switch(type)
+        {
+            case 0:
+                $("#processResultStatus").hide();
+                break;
+            case 1:
+                $("#processResultStatus").hide();
+                break;
+            case 2:
+                resultHtml
+                isSolve();
+                break;
+            default:
+                break;
+        }
+        $("#processResultStatus").html(resultHtml);
+    }
+
     /*初始化问题大类*/
     function initComplaintTypeInfo() {
         //默认为售前咨询
@@ -649,6 +771,7 @@
     function setSelectOrder(orderId){
         var html = '';
         var address = ''; //地址
+        var produceList = {};
         $.ajax({
             type: "POST",
             data: {
@@ -662,7 +785,8 @@
                         var salesOrder = data.returnMsg.salesOrderList[i];
 
                         var productsHtml = '';
-                        var salesOrderItem = salesOrder.salesOrderItemList
+                        var salesOrderItem = salesOrder.salesOrderItemList;
+                        produceList = salesOrder.salesOrderItemList;
                         for(var j=0;j<salesOrderItem.length;j++){
                             var item = salesOrderItem[j].itemProductName + "*" + salesOrderItem[j].itemNum;
                             if(j==0){
@@ -691,13 +815,16 @@
                 }else{
                     html = '';
                 }
-                $("#showOrder").html(html);
+                $("#showOrder").html(html);  //显示订单
             },
             error: function(XmlHttpRequest, textStatus, errorThrown){
             }
         });
         $("#addressInfo").val(address);
-        setAdress();
+        setAdress();  //显示地址
+
+        setProduce(produceList); //显示产品
+
     }
 
     /**
@@ -834,6 +961,14 @@
             $("#district").html(districtHtml);
         }
     }
+
+    /**
+     * 展示产品
+     * @param produceList
+     */
+    function setProduce(produceList) {
+        
+    }
 </script>
 <!--/请在上方写此页面业务相关的脚本-->
 </body>