Explorar el Código

修改bug文档问题

liujiankang hace 7 años
padre
commit
6dc540efd4

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -888,7 +888,7 @@ public class CustomerServiceImpl implements CustomerService {
             myAddress =  address[3];
         }
         efastOrder.setOrderAddress(myAddress);
-        efastOrder.setOrderStatus(2);
+        efastOrder.setOrderStatus(1);
 
         efastOrder.setOrderNum(num); //产品数量
         efastOrder.setOrderAmount(amout);   //商品总价

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

@@ -57,7 +57,7 @@
     where customer_id = #{customerId,jdbcType=INTEGER}
   </delete>
 
-  <!-- 查询客诉基本信息列表 -->
+  <!-- 查询客诉基本信息列表 老排序规则 ORDER BY FIELD(c.customer_is_solve, 5, 3, 4, 6, 7, 2, 1),c.customer_id desc -->
   <select id="listCustomer" parameterType="CustomerInfo" resultMap="customerMap">
     select
       c.customer_id,
@@ -137,6 +137,12 @@
       <if test="visitDesignatedAdminId != null">
         and v.designated_admin_id = #{visitDesignatedAdminId}
       </if>
+      <if test="startTime != null">
+        and c.customer_create_time &gt; #{startTime}
+      </if>
+      <if test="endTime != null">
+        and c.customer_create_time &lt; #{endTime}
+      </if>
       <if test="sendLogisticsNo != null and sendLogisticsNo != ''">
         and c.customer_id in (
             SELECT customer_id
@@ -161,7 +167,8 @@
         )
       </if>
     </where>
-    ORDER BY FIELD(c.customer_is_solve, 5, 3, 4, 6, 7, 2, 1),c.customer_id desc
+
+    ORDER BY c.customer_id desc
   </select>
 
   <resultMap id="customerMap" type="CustomerInfo">

+ 7 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -375,8 +375,8 @@ public class AdminCustomerController {
         salesOrder.setSalesRemainDeposit(0);
         salesOrder.setSalesType(1);
 
-        salesOrder.setSalesStatus(0);//确认状态:0(未确认)1(确认)2(挂起)3(作废)
-        salesOrder.setSalesShippingStatus(0);    //发货状态: 0(未发货)1(已发货,即已扫描出库)3(备货中)
+        salesOrder.setSalesStatus(1);//确认状态:0(未确认)1(确认)2(挂起)3(作废)
+        salesOrder.setSalesShippingStatus(1);    //发货状态: 0(未发货)1(已发货,即已扫描出库)3(备货中)*****+++
         salesOrder.setSalesPayStatus(2);   //已付款
         salesOrder.setSalesProcessStatus(0);  //单据状态:0(正常单)1(问题单)
         salesOrder.setSalesIsSend(0);        //0:否 1:是  是否通知配货
@@ -484,6 +484,11 @@ public class AdminCustomerController {
                                            @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
                                            @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) throws Exception {
         ModelAndView mv = new ModelAndView("cm/customer/custome_list");
+        if(customerInfo.getAdminId() == null){
+            //获取登录员工id
+            Integer adminId = AdminUtils.getLoginAdminId();
+            customerInfo.setAdminId(adminId);
+        }
         PagedResult<CustomerInfo> pagedResult = customerService.listCustomer(pageNO, pageSize, customerInfo, totalNum == 0);
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);

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

@@ -826,6 +826,7 @@ public class AdminOrderController {
                                        @RequestParam("tel[]") String tel,
                                        @RequestParam("info[]") String[] infos,
                                        @RequestParam("num[]") String num,
+                                       @RequestParam("remark[]") String remark,
                                        @RequestParam("filePath") String filePath,
                                        @RequestParam("postType") String postType,
                                        @RequestParam("productName") String productName,
@@ -840,7 +841,7 @@ public class AdminOrderController {
         }
         // 读取文件中内容
         List<EfastOrder> orderEfasts = ExcelUtil.readCell(request.getServletContext().getRealPath(filePath),
-                productName, maps, infos, tel, name,platformOrder, num, priceMap, postType, shopId);
+                productName, maps, infos, tel, name,platformOrder, num,remark, priceMap, postType, shopId);
         logger.info("---------orderEfasts订单个数为:"+orderEfasts.size() + "------------");
         StringBuffer sb = new StringBuffer();
         for (int i = 0; i < orderEfasts.size(); i++) {

+ 7 - 3
watero-rst-web/src/main/java/com/iamberry/rst/utils/ExcelUtil.java

@@ -306,7 +306,7 @@ public class ExcelUtil {
 
 
     public static List<EfastOrder> readCell(String filePath, String productName, String[] maps,
-                                            String[] infos, String tel, String name,String platformOrder, String num,
+                                            String[] infos, String tel, String name,String platformOrder, String num,String remark,
                                             Map<String, ProductColor> price, String postType, String shopId)
             throws IOException {
         Map<String, String> map = new HashMap<>();
@@ -340,6 +340,7 @@ public class ExcelUtil {
         int telColumnIndex = -1;
         int productColumnIndex = -1;
         int numColumnIndex = -1;
+        int remarkColumnIndex = -1;
         int[] infoColumnIndex = new int[infos.length];
         int infoCount = 0;
 
@@ -363,6 +364,9 @@ public class ExcelUtil {
             } else if (num.equals(cell.getStringCellValue().trim())) {
                 // 匹配购买数量
                 numColumnIndex = cell.getColumnIndex();
+            }  else if (remark.equals(cell.getStringCellValue().trim())) {
+                // 匹配备注
+                remarkColumnIndex = cell.getColumnIndex();
             } else {
                 // 匹配地址(可能是多个,需要组合连接)
                 for (int i = 0; i < infos.length; i++) {
@@ -422,6 +426,7 @@ public class ExcelUtil {
 
                 order.setOrderProductBarCode(OrderProductBarCodeValue);
                 String orderNum = getValue(temp.getCell(numColumnIndex));
+                String orderRemark = getValue(temp.getCell(remarkColumnIndex));
                 if(orderNum == null || "".equals(orderNum)){
                     order.setReturnStatus("error");
                     order.setReturnMsg("数量不正确");
@@ -429,7 +434,7 @@ public class ExcelUtil {
                 }else{
                     order.setOrderNum(Integer.valueOf(orderNum));               // 读取购买数量
                 }
-
+                order.setOrderRemark(orderRemark);
                 if (infoColumnIndex.length == 1){
                     // 如果infoColumnIndex = 1, 则表示需要截取(可能是-、“ ”)
                     Cell cell = temp.getCell(infoColumnIndex[0]);
@@ -475,7 +480,6 @@ public class ExcelUtil {
                 order.setOrderOpenId(order.getOrderAddressTel());
                 order.setOrderProductName(price.get(order.getOrderProductBarCode()).getColorName());
                 order.setOrderId(OrderNoUtil.createOrderCode(Math.abs(new Random().nextInt(1000))));
-                order.setOrderRemark("");
                 order.setOrderStoreId(shopId);           // 微商/代理商仓库
                 order.setOid(oid);                       // oid
                 if (postType.equals("ems")) {

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

@@ -315,7 +315,7 @@
             <div class="row cl" id="recipientInfo" style="display: none;">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="联系人格式不正确!" >
+                    <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="*1-16" errormsg="联系人格式不正确!" >
                 </div>
                 <div class="formControls col-2 col-sm-2">
                     <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="sendTel" name="relationSendTel" datatype="m" errormsg="联系人电话格式不正确!">
@@ -517,10 +517,10 @@
                 <div class="row cl">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>被回访人:</label>
                     <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text" value="" placeholder="填写回访人姓名" id="" name="visitName"  datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="回访人姓名格式不正确!" >
+                        <input type="text" class="input-text" value="" placeholder="填写回访人姓名" id="" name="visitName"  datatype="*1-16" errormsg="回访人姓名格式不正确!" >
                     </div>
                     <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text associated-phone" value="" placeholder="填写回访人手机号" id="" name="visitTel" datatype="m" errormsg="回访人手机号码格式不正确!">
+                        <input type="text" class="input-text associated-phone" value="" placeholder="填写回访人手机号" id="" name="visitTel" datatype="n11-12" ignore="ignore" errormsg="回访人手机号码格式不正确!">
                     </div>
                 </div>
                 <div class="row cl">

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

@@ -42,6 +42,8 @@
             <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.sendLogisticsNo!}" placeholder="物流编号" id="sendLogisticsNo" name="sendLogisticsNo">
             <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.customerName!}" placeholder="请输入姓名" id="customerName" name="customerName">
             <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.customerTel!}" placeholder="请输入电话号码" id="customerTel" name="customerTel">
+            <input type="text" style="width:150px;height:36px;margin-right: 0px;" name="startTime" id="startTime" class="input-text" placeholder="开始时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd',skin:'whyGreen' })" value="${(customerInfo.startTime?string("yyyy-MM-dd"))!''}" readonly="readonly"/>-
+            <input type="text" style="width:150px;height:36px;margin-right: 0px;" name="endTime" id="endTime" class="input-text" placeholder="结束时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd',skin:'whyGreen' })" value="${(customerInfo.endTime?string("yyyy-MM-dd"))!''}" readonly="readonly"/>
 
             <#--<input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.describeTitle!}" placeholder="请输入问题描述" id="describeTitle" name="describeTitle">-->
 
@@ -337,7 +339,6 @@
 <#include "/base/page_util.ftl">
 </tfoot>
 <script type="text/javascript">
-
     /**
      * 跳转到添加customer页面
      */

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

@@ -9,7 +9,7 @@
     <link rel="Bookmark" href="/favicon.ico" >
     <link rel="Shortcut Icon" href="/favicon.ico" />
 <#include "/base/add_base.ftl">
-    <title>客诉列表</title>
+    <title>订单列表</title>
     <style>
         .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
         .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
@@ -58,7 +58,6 @@
 </head>
 <body>
 <div class="page-container">
-
     <div class="order-list">
         <div class="text-c">
             <form action="" method="post">

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

@@ -9,7 +9,7 @@
     <link rel="Bookmark" href="/favicon.ico" >
     <link rel="Shortcut Icon" href="/favicon.ico" />
 <#include "/base/list_base.ftl">
-    <title>客诉列表</title>
+    <title>订单列表</title>
     <style>
         *{padding: 0;margin: 0;}
         .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
@@ -25,7 +25,7 @@
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
     <span class="c-gray en">&gt;</span> 客诉管理
-    <span class="c-gray en">&gt;</span> 客诉列表
+    <span class="c-gray en">&gt;</span> 订单列表
     <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 
@@ -64,7 +64,11 @@
             <input type="text" style="width:150px;height:36px;margin-right: 0px;" name="endDate" id="endDate" class="input-text" placeholder="结束时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',skin:'whyGreen' })" value="${(salesOrder.endDate?string("yyyy-MM-dd HH:mm:ss"))!''}" readonly="readonly"/>
             <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
             <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="order_excel"><i class="Hui-iconfont">&#xe644;</i> 导出</button>
-            <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="synOrder"><i class="Hui-iconfont">&#xe632;</i> 同步订单</button>
+            <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="synOrder"><i class="Hui-iconfont">&#xe632;</i> 同步订单</button><br>
+            <button onClick="upFiles();" class="btn radius" style="background: #32a3d8;color: #fff;" type="button"><i class="Hui-iconfont">&#xe632;</i> 上传Excel(仅支持XLS类型)</button>
+            <button onClick="downloadOrder();" class="btn radius" style="background: #32a3d8;color: #fff;" type="button"><i class="Hui-iconfont">&#xe640;</i> 下载订单</button>
+
+            </div>
         </form>
     </div>
 
@@ -84,6 +88,7 @@
                 <th width="50">支付金额</th>
                 <th width="50">是否付款</th>
                 <th width="50">是否发货</th>
+                <th width="50">订单备注</th>
                 <th width="60">创建时间</th>
                 <th width="50">操作</th>
             </tr>
@@ -155,6 +160,7 @@
                             备货中
                         </#if>
                     </td>
+                    <td>${order.salesAdminRemark!''}</td>
                     <td>${(order.salesCreateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
                     <td>
                         <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="sales_order_detail(${order.salesId!''})">
@@ -172,8 +178,59 @@
 </div>
 <tfoot>
 <#include "/base/page_util.ftl">
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.min.js"> </script>
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
+<script type="text/plain" id="upload_ue"></script>
 </tfoot>
 <script type="text/javascript">
+    /*判断上传类型 1:上传excel推送订单   2:下载订单 */
+    var editorType;
+    var _editor;
+    $(function() {
+        //重新实例化一个编辑器,防止在上面的editor编辑器中显示上传的图片或者文件
+        _editor = UE.getEditor('upload_ue',{
+            initialFrameWidth : 375,
+            initialFrameHeight: 600
+        });
+        _editor.ready(function () {
+            _editor.setDisabled("attachment");//设置编辑器不可用
+            _editor.hide();//隐藏编辑器,因为不会用到这个编辑器实例,所以要隐藏
+            //侦听图片上传
+            _editor.addListener('beforeInsertImage', function (t, arg) {
+                console.log(arg[0].src);
+                $("#picture").attr("value", arg[0].src);//将地址赋值给相应的input,只去第一张图片的路径
+                $("#preview").attr("src", arg[0].src);  //图片预览
+            });
+            //侦听文件上传,取上传文件列表中第一个上传的文件的路径
+            _editor.addListener('afterUpfile', function (t, arg) {
+                console.log(arg[0].url);
+                if(editorType == 1){
+                    window.location.href=root_path + '/admin/order/upload_excel?file='+arg[0].url;
+                    $("#file").attr("value", _editor.options.filePath + arg[0].url);
+                }else{
+                    window.location.href=root_path + '/admin/order/download_excel?file='+arg[0].url;
+                }
+            });
+        });
+    });
+    //弹出文件上传的对话框
+    function upFiles() {
+        var myFiles = _editor.getDialog("attachment");
+        myFiles.open();
+        editorType = 1;
+    }
+    /*  交易号文件上传 */
+    function downloadOrder(){
+        var myFiles = _editor.getDialog("attachment");
+        myFiles.open();
+        editorType = 2;
+    }
+    //弹出图片上传的对话框
+    function upImage() {
+        var myImage = _editor.getDialog("insertimage");
+        myImage.open();
+    }
 
     /*进入订单详情*/
     function sales_order_detail(salesId) {

+ 19 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/excel_to_order.ftl

@@ -71,6 +71,14 @@
                 </td>
             </tr>
             <tr class="text-c">
+                <td>备注</td>
+                <td>
+                <#list heads as head>
+                    <label><input type="radio" value="${head}" class="product-remark" name="product-remark"/>${head}</label>
+                </#list>
+                </td>
+            </tr>
+            <tr class="text-c">
                 <td>物流方式</td>
                 <td>
                     <label><input type="radio" value="ems" checked="checked" class="product-post-type" name="product-post-type"/>EMS</label>
@@ -157,6 +165,7 @@
                             <th width="200">地址</th>
                             <th width="80">产品名称</th>
                             <th width="30">购买数量</th>
+                            <th width="30">备注</th>
                             <th width="80">推送状态</th>
                         </tr>
                         </thead>
@@ -256,6 +265,13 @@
         for (var i = 0; i < productShopNum.length; i++) {
             numArray[i] = productShopNum[i].value;
         }
+
+        var orderRemark = $(".product-remark:checked");// 备注
+        var remarkArray = new Array();
+        for (var i = 0; i < orderRemark.length; i++) {
+            remarkArray[i] = orderRemark[i].value;
+        }
+
         var productName = $(".product-name:checked");
 
         if(platformOrdersName == nameArray[0] ){
@@ -288,7 +304,8 @@
                 "info":infoArray,
                 "postType":$(".product-post-type").val(),
                 "shopId":$("#shop-id").val(),
-                "num":numArray
+                "num":numArray,
+                "remark":remarkArray
         },function(result){
             if (result.returnCode != 200) {
                 layer.msg('加载失败,请重试,请确认选择内容对应无误!',{icon: 5,time:3000});
@@ -313,6 +330,7 @@
                             '<td style="' + style + '">' + order.orderAddress + '</td>'+
                             '<td style="' + style + '">' + order.orderProductName + '</td>'+
                             '<td style="' + style + '">' + order.orderNum + '</td>'+
+                            '<td style="' + style + '">' + order.orderRemark + '</td>'+
                             '<td style="' + style + '">' + order.returnMsg + '</td>'+
                             '</tr>');
                 }