wangxiaoming 6 éve
szülő
commit
8a0ae50ab0

+ 0 - 79
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java

@@ -944,85 +944,6 @@ public class AdminOrderController {
      * @param filePath
      * @param postType    快递类型(对应efast)
      * @param productName
-     * @param shopId      efast店铺id
-     * @param request
-     * @return
-     * @throws Exception
-     */
-    /*@ResponseBody
-    @RequestMapping("/toobj_sendefast")
-    public ResponseJson toObjSendEfast(@RequestParam("map[]") String[] maps,
-                                       @RequestParam("name[]") String name,
-                                       @RequestParam("platformOrder[]") String platformOrder,
-                                       @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,
-                                       @RequestParam("shopId") String shopId,
-                                       HttpServletRequest request) throws Exception {
-        logger.info("-----------根据excel内容推送到百胜开始,Excel路径:"+ filePath +"-----------");
-        // 获取产品颜色的映射
-        List<ProductColor> productColors = orderService.listProductColor();
-        Map<String, ProductColor> priceMap = new HashMap<>();
-        for (ProductColor productColor : productColors) {
-            priceMap.put(productColor.getColorBar(), productColor);
-        }
-        // 读取文件中内容
-        List<SalesOrder> salesOrderList = ExcelUtil.readCell(request.getServletContext().getRealPath(filePath),
-                productName, maps, infos, tel, name,platformOrder, num,remark, priceMap, postType, shopId);
-        logger.info("---------orderEfasts订单个数为:"+salesOrderList.size() + "------------");
-        StringBuffer sb = new StringBuffer();
-        for (int i = 0; i < salesOrderList.size(); i++) {
-            //Efast升级只取交易号 2018-6-8
-            //sb.append(orderEfasts.get(i).getPlatformOrderId().trim() + "@");
-            sb.append(salesOrderList.get(i).getSalesId() + "\r\n");
-        }
-        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
-        String dateString = formatter.format(new Date());
-        String webPath = request.getSession().getServletContext().getRealPath("/");
-        String path = webPath + "common/file/upload/file/" + dateString + "/";
-        String fileName = "";
-        try {
-            fileName = createFile(path, sb.toString());
-        } catch (Exception e) {
-            logger.info("推送Efast订单,交易号文件生成失败");
-        }
-        if(fileName != null && !"".equals(fileName)){
-            fileName = fileName.substring(fileName.indexOf("common"),fileName.length());
-        }else{
-            fileName = "";
-        }
-
-        logger.info("-------- 推送订单到Efast开始 - Efast个数:"+ salesOrderList.size() +"--------");
-        // 推送
-        try {
-            efastOrderService.sendOrderInfoToEfast(salesOrderList, null);
-        } catch (Exception e) {
-            logger.error("", e);
-        }
-        logger.info("-------- 推送订单到Efast结束 ---------");
-
-        return new ResponseJson(200, "SUCCESS", 200)
-                .addResponseKeyValue("errorPath", request.getContextPath() + filePath)
-                .addResponseKeyValue("order_list", salesOrderList)
-                .addResponseKeyValue("fileName", fileName);
-    }*/
-
-    /**
-     * 根据excel内容推送到百胜
-     *
-     * @param maps
-     * @param name
-     * @param tel
-     * @param infos
-     * @param num
-     * @param filePath
-     * @param postType    快递类型(对应efast)
-     * @param productName
-     * @param shopId      efast店铺id
      * @param request
      * @return
      * @throws Exception

+ 3 - 7
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSalesOrderController.java

@@ -1,4 +1,4 @@
-package com.iamberry.rst.controllers.cm;
+package com.iamberry.rst.controllers.order;
 
 import com.iamberry.rst.core.cm.SalesOrder;
 import com.iamberry.rst.core.cm.SalesOrderItem;
@@ -14,9 +14,7 @@ import com.iamberry.rst.utils.StitchAttrUtil;
 import com.iamberry.wechat.tools.ResponseJson;
 import net.sf.json.JSONObject;
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.poi.hssf.usermodel.*;
-import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -25,21 +23,17 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
-import java.text.MessageFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-import static com.iamberry.rst.util.SmsConfig.SEND_NOTICE;
-
 /**
  * 订单信息
  * Created by liuzhiwei on 2017/12/4.
@@ -604,4 +598,6 @@ public class AdminSalesOrderController {
         return mv;
     }
 
+
+
 }

+ 10 - 2
watero-rst-web/src/main/java/com/iamberry/rst/utils/ExcelUtil.java

@@ -378,7 +378,7 @@ public class ExcelUtil {
         Map<String, String> map = new HashMap<>();
         for (String t : maps) {
             String[] temp = StringUtils.split(t, "_");
-            map.put(temp[1], (temp[0]));
+            map.put((temp[1].trim()), (temp[0].trim()));
         }
 
         // 判断文件是否存在
@@ -476,7 +476,15 @@ public class ExcelUtil {
                 Cell telCell = temp.getCell(telColumnIndex);
                 String userTel = String.valueOf(getExcelCell(telCell));
                 String OrderProductBarCodeValue = map.get(getValue(temp.getCell(productColumnIndex)).trim()); // 读取对应的产品id
-                if(StringUtils.isEmpty(nameValue) && StringUtils.isEmpty(userTel) && StringUtils.isEmpty(OrderProductBarCodeValue)){
+                if(StringUtils.isEmpty(nameValue)){
+                    errorNum ++;
+                    continue;
+                }
+                if(StringUtils.isEmpty(userTel)){
+                    errorNum ++;
+                    continue;
+                }
+                if(StringUtils.isEmpty(OrderProductBarCodeValue)){
                     errorNum ++;
                     continue;
                 }

+ 5 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/order/excel_to_order_new.ftl

@@ -48,7 +48,7 @@
             <tr class="text-c">
                 <td width="55">收货人姓名</td>
                 <td style="text-align: left;">
-                    <select class="my-select" name="addr-name" id="addr-name" matchSelect="收件人|收货人|客户姓名" style="height: 30px;width: 180px;margin: 0px;">
+                    <select class="my-select" name="addr-name" id="addr-name" matchSelect="收件人|收货人|客户姓名|收件人姓名|收货人姓名" style="height: 30px;width: 180px;margin: 0px;">
                         <#list heads as head>
                             <option value="${head}" >${head}</option>
                         </#list>
@@ -125,7 +125,7 @@
             <tr class="text-c">
                 <td width="55">产品名称</td>
                 <td style="text-align: left;">
-                    <select class="my-select" name="product-name" id="product-name" matchSelect="网店品名|商品名称|产品名称|货品名称|商品信息|商品选项|商品" style="height: 30px;width: 180px;margin: 0px;">
+                    <select class="my-select" name="product-name" id="product-name" matchSelect="网店品名|商品名称|产品名称|货品名称|商品信息|商品选项|商品|SKU|SKU规格" style="height: 30px;width: 180px;margin: 0px;">
                         <#list heads as head>
                             <option value="${head}" >${head}</option>
                         </#list>
@@ -197,7 +197,7 @@
 
                     <div id="store-select-2" style="display: none">
                         <div>
-                            <select class="my-select" name="order_store_info" id="order_store_info" matchSelect="店铺|订单来源" style="height: 30px;width: 180px;margin: 0px;">
+                            <select class="my-select" name="order_store_info" id="order_store_info" matchSelect="店铺|订单来源|渠道商" style="height: 30px;width: 180px;margin: 0px;">
                                 <#list heads as head>
                                     <option value="${head}" >${head}</option>
                                 </#list>
@@ -355,9 +355,9 @@
                         if(currentOption.text().indexOf(ma) > -1){
                             flag++;
                             cuValue = $(this).val();
-                            if(currentOption.text().trim.length == ma.trim.length){
+                            if($.trim(currentOption.text()).length == $.trim(ma).length){
                                 flag++;
-                                if(currentOption.text().trim == ma.trim){
+                                if($.trim(currentOption.text()) == $.trim(ma)){
                                     flag++;
                                 }
                             }

+ 80 - 132
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl

@@ -82,8 +82,8 @@
             private Integer salesShippingFee;       //邮费
             private Date salesPayTime;              //支付时间
             private Date salesCreateTime;           //创建时间
-            private String salesAdminRemark;        //后台的备注 -- 卖家备注
-            private String salesUserRemark;         //用户备注
+                    private String salesAdminRemark;        //后台的备注 -- 卖家备注
+                    private String salesUserRemark;         //用户备注 --
             private String salesPayNumber;          //交易尾号
             private Integer salesStoreId;           //店铺id
             private Integer salesCompanyId;         //销售公司id
@@ -99,23 +99,26 @@
             private Integer salesIsDownload;        //是否下载过
             private Integer salesMainOrderId;       //主订单id(拆单用)
             private String orderNoteRemark;         //订单备注,推送到efast
-            private String storeEfast;              //Efast 的店铺id-->
+            private String storeEfast;              //Efast 的店铺id
+                    salesBatchId        、、批次
+            -->
 
             <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" style=" width: 625px;">
-                    <select class="my-select" name="order_batch" id="order_batch" matchSelect="订单编号|订单号|交易号|序号" style="height: 30px;width: 180px;margin: 0px;">
-                        <option value="1" >新增批次</option>
-                        <#list orderBatchs as orderBatch>
-                            <option value="${orderBatch.batchId}" >${orderBatch.batchId}</option>
-                        </#list>
-                    </select>
-				</span>
+                <label class="form-label col-1 col-sm-1">批次编号:</label>
+                <div class="formControls col-3 col-sm-3" style="">
+                    <span class="select-box">
+                        <select class="select" id="salesBatchId" name="salesBatchId" >
+                            <option value="1" >新增批次</option>
+                            <#list orderBatchs as orderBatch>
+                                <option value="${orderBatch.batchId}" >${orderBatch.batchId}</option>
+                            </#list>
+                        </select>
+				    </span>
                 </div>
             </div>
 
             <div class="row cl" id="" style="">
-                <label class="form-label col-1 col-sm-1"></label>
+                <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="salesAddressName" name="salesAddressName" datatype="*1-16" errormsg="联系人格式不正确!" >
                 </div>
@@ -144,9 +147,61 @@
                         </select>
 				    </span>
                 </div>
+            </div>
+
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">商品信息:</label>
+                <div class="formControls col-6 col-sm-6">
+                    <input type="button" class="btn btn-primary" onclick="add_product()" value="添加商品" >
+
+                    <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+                        <thead>
+                            <tr class="text-c" id="table1">
+                                <th style="text-align: center;" width="60">产品名称</th>
+                                <th style="text-align: center;" width="40">产品颜色</th>
+                                <th style="text-align: center;" width="30">数量</th>
+                                <th style="text-align: center;" width="100">操作</th>
+                            </tr>
+                        </thead>
+                        <tbody id="add_product">
+                            <tr id="">
+                                <td style="text-align: center;" colspan="4">选择订单后展示</td>
+                            </tr>
+                        </tbody>
+                    </table>
+
+                </div>
+            </div>
+
+            <div class="row cl" id="recipientAddressText" style="">
+                <label class="form-label col-1 col-sm-1"></label>
+                <div class="formControls col-6 col-sm-6">
+                    <textarea name="addressDesc" id="addressDesc" cols="" rows="2" datatype="*" errormsg="收货地址不正确!" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)"></textarea>
+                    <span id="addrssMsg"></span>
+                </div>
                 <input type="hidden" name="salesAddressInfo" id="salesAddressInfo" >
             </div>
 
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">用户备注:</label>
+                <div class="formControls col-6 col-sm-6">
+                    <textarea name="salesUserRemark" id="salesUserRemark" cols="" rows="2" datatype="" errormsg="" class="textarea" placeholder="请填写用户备注,最多支持100字符" onKeyUp="$.Huitextarealength(this,100)"></textarea>
+                    <#--<span id="addrssMsg"></span>-->
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">后台备注:</label>
+                <div class="formControls col-6 col-sm-6">
+                    <textarea name="salesAdminRemark" id="salesAdminRemark" cols="" rows="2" datatype="" errormsg="" class="textarea" placeholder="请填写后台备注,最多支持100字符" onKeyUp="$.Huitextarealength(this,100)"></textarea>
+                    <#--<span id="addrssMsg"></span>-->
+                </div>
+            </div>
+
+
+
+
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>来源入口:</label>
@@ -324,27 +379,6 @@
             </div>
 
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题回复:</label>
-                <div class="formControls col-5 col-sm-5">
-                    <input type="hidden" name="questionId" id="questionId" value="">
-                    <script id="describeContentText" type="text/plain" style="width:983px;height:250px;"></script>
-                    </script>
-                    <input type="hidden" name="describeContent" id="describeContent" value="">
-                </div>
-            </div>
-
-            <div class="row cl">
-            <#--处理描述 - 客诉备注-->
-                <label class="form-label col-1 col-sm-1">问题描述:</label>
-                <div class="formControls col-5 col-sm-5">
-                    <span>问题描述详情,内部使用,不会对外公布。</span>
-                    <script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
-                    </script>
-                    <input type="hidden" id="describeHandleDesc" name="describeHandleDesc">
-                </div>
-            </div>
-
-            <div class="row cl">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-2 col-sm-2">
                     <input type="text" class="input-text associated-phone" value="" placeholder="请输入手机号" id="p-phone" name="">
@@ -373,39 +407,6 @@
             <input type="hidden" id="closedFittings" name="closedFittingsJson" value="">
 
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1">处理类型:</label>
-                <div class="formControls col-10 col-sm-10 skin-minimal">
-                    <div class="radio-box" id="solved">
-                        <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" >
-                        <label for="customer-process-1">已解决</label>
-                    </div>
-                    <div class="radio-box" id="noSolved">
-                        <input type="radio" id="customer-process-2" value="2" name="customerIsSolve">
-                        <label for="customer-process-2">未解决</label>
-                    </div>
-                    <div class="radio-box" id="renewed" style="display: none">
-                        <input type="radio" id="customer-process-3" value="3" name="customerIsSolve" checked>
-                        <label for="customer-process-3">换新</label>
-                    </div>
-                    <div class="radio-box" id="maintain" style="display: none">
-                        <input type="radio" id="customer-process-4" value="4" name="customerIsSolve" >
-                        <label for="customer-process-4">维修</label>
-                    </div>
-                    <div class="radio-box" id="reissue" style="display: none">
-                        <input type="radio" id="customer-process-5" value="5" name="customerIsSolve">
-                        <label for="customer-process-5">补发</label>
-                    </div>
-                    <div class="radio-box" id="backGoods" style="display: none">
-                        <input type="radio" id="customer-process-6" value="6" name="customerIsSolve">
-                        <label for="customer-process-6">退货</label>
-                    </div>
-                    <div class="radio-box" id="noReasonBack" style="display: none">
-                        <input type="radio" id="customer-process-7" value="7" name="customerIsSolve">
-                        <label for="customer-process-7">无理由退货</label>
-                    </div>
-                </div>
-            </div>
-            <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" id="processResultStatus">
@@ -425,33 +426,7 @@
                     <button type="button" class="btn btn-primary" id="selectOrder">搜索订单</button>
                 </div>
             </div>
-            <div class="row cl" id="order" style="display: none;">
-                <label class="form-label col-1 col-sm-1"></label>
-                <div class="formControls col-9 col-sm-9 text-c">
-                    <table class="table table-border table-bg table-bordered" >
-                        <thead>
-                        <tr>
-                            <th style="text-align: center;">销售公司</th>
-                            <th style="text-align: center;">店铺名称</th>
-                            <th style="text-align: center;">Efast订单号</th>
-                            <th style="text-align: center;">姓名</th>
-                            <th style="text-align: center;">电话</th>
-                            <th style="text-align: center;">订单金额</th>
-                            <th style="text-align: center;">购买产品</th>
-                            <th style="text-align: center;">购买日期</th>
-                            <th style="text-align: center;">收货地址</th>
-                        </tr>
-                        </thead>
-                        <tbody id="showSalesOrderId">
-                        <tr >
-                            <td style="text-align: center;" colspan="9">暂未选择订单</td>
-                        </tr>
-                        </tbody>
-                    </table>
-                    <input type="hidden" id="orderId" name="salesId" value="" >
-                    <input type="hidden" id="ids" name="ids" value="" >
-                </div>
-            </div>
+
 
             <div class="row cl" id="recipientInfoTitle" style="display: none;">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>收件信息:</label>
@@ -508,42 +483,6 @@
                     &nbsp;&nbsp;&nbsp;&nbsp;<span id="DTS-in"></span>&nbsp;&nbsp;  <span id="DTS-out"></span>
                 </div>
             </div>
-            <div class="row cl" id="customerCostsDiv" style="display: none;">
-                <label class="form-label col-1 col-sm-1">工厂报价:</label>
-                <div class="col-2 col-sm-2">
-                    <input type="text" class="input-text trim_input" placeholder="工厂报价" id="relationFactoryCosts" name="relationFactoryCosts" value="">
-                </div>
-                <label class="form-label col-1 col-sm-1">给客户报价:</label>
-                <div class="col-2 col-sm-2">
-                    <input type="text" class="input-text trim_input" placeholder="客户报价" id="relationCustomerCosts" name="relationCustomerCosts" value="">
-                </div>
-            </div>
-            <div class="row cl" id="sendAddressInfo">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
-                <div class="formControls col-5 col-sm-5" style="height: 240px" id="sendAddressSmsHtml">
-                <#-- <script id="sendAddressSms" type="text/plain" style="width:983px;height:200px;"></script>
-                    </script>-->
-                </div>
-            </div>
-
-            <div class="row cl" id="sendAddressByPhone" 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 associated-phone" value="" placeholder="请输入手机号" id="m-phone" name="">
-                </div>
-                <div class="formControls col-2 col-sm-2" style="width: 10%">
-                    <input type="button" class="btn btn-primary" value="发短信给用户" onclick="sendPhone('m','m-msg');">
-                </div>
-                <div class="formControls col-2 col-sm-2 msg-phone">
-                    <div id="m-msg" style="color: #e00"></div>
-                </div>
-            </div>
-            <div class="row cl" id="customerDescDiv">
-                <label class="form-label col-1 col-sm-1">备注:</label>
-                <div class="col-5 col-sm-5">
-                    <textarea type="text" placeholder="" id="customerDesc" name="customerDesc" style="width: 100%;height: 100px;"></textarea>
-                </div>
-            </div>
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访信息:</label>
@@ -580,9 +519,18 @@
         increaseArea: '20%'
     });
 
+    /*初始化省市区*/
+    $(".address_info").initAddress();
+
+    /**
+     * 打开订单
+     */
+    function add_product() {
+        layer_show("搜索订单",url_path + "/admin/customer/select_order","1000","500");
+    }
+
     $(function(){
-//        initAddress($(".init_province"),$(".init_city"),$(".init_country"));
-        $(".address_info").initAddress();
+
     })
 </script>
 </body>

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

@@ -62,7 +62,7 @@
 <div class="page-container">
     <div class="text-c">
         <form action="${path}/admin/salesOrder/list_order_page" method="post">
-                <div style="position: relative;float: left;display: none;width: 110px;height: 36px;" id="addOrderDiv" >
+                <div style="position: relative;float: left;display: block;width: 110px;height: 36px;" id="addOrderDiv" >
                     <button type="button" style="top: 0px;" class="my-btn-search my-order" id="addOrderType" >录入订单</button>
                     <button type="button" style="top: 36px;display: none;" class="my-btn-search my-order" id="addOrderManual" onclick="toAddOrderManual();">手动录入</button>
                     <button type="button" style="top: 72px;display: none;" class="my-btn-search my-order" id="addOrderExcel" onclick="toAddOrderExcel();">Excel导入</button>

+ 0 - 1
watero-rst-web/src/main/webapp/common/js/common/address.js

@@ -60,7 +60,6 @@
             });
         },
         initCountry:function(cityId){
-            var address = this;
             var $countryNode = $(this.addressInfo.countryNode);
             cityId = this.cufte(cityId);
             $.get(root_path +"/address/list_district?cityId="+cityId, function(result){